Java Code Examples for org.chromium.base.ApiCompatibilityUtils#isInteractive()
The following examples show how to use
org.chromium.base.ApiCompatibilityUtils#isInteractive() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OmahaClient.java From delion with Apache License 2.0 | 5 votes |
/** * Determine whether or not Chrome is currently being used actively. */ @VisibleForTesting protected boolean isChromeBeingUsed() { boolean isChromeVisible = ApplicationStatus.hasVisibleActivities(); boolean isScreenOn = ApiCompatibilityUtils.isInteractive(this); return isChromeVisible && isScreenOn; }
Example 2
Source File: OmahaClient.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Determine whether or not Chrome is currently being used actively. */ @VisibleForTesting protected boolean isChromeBeingUsed() { boolean isChromeVisible = ApplicationStatus.hasVisibleActivities(); boolean isScreenOn = ApiCompatibilityUtils.isInteractive(this); return isChromeVisible && isScreenOn; }
Example 3
Source File: IntentHandler.java From 365browser with Apache License 2.0 | 5 votes |
@VisibleForTesting boolean isIntentUserVisible() { // Only process Intents if the screen is on and the device is unlocked; // i.e. the user will see what is going on. Context appContext = ContextUtils.getApplicationContext(); if (!ApiCompatibilityUtils.isInteractive(appContext)) return false; if (!ApiCompatibilityUtils.isDeviceProvisioned(appContext)) return true; return !((KeyguardManager) appContext.getSystemService(Context.KEYGUARD_SERVICE)) .inKeyguardRestrictedInputMode(); }
Example 4
Source File: PowerBroadcastReceiver.java From delion with Apache License 2.0 | 4 votes |
/** @return whether the screen is on or not. */ public boolean isScreenOn(Context context) { return ApiCompatibilityUtils.isInteractive(context); }
Example 5
Source File: PowerBroadcastReceiver.java From AndroidChromium with Apache License 2.0 | 4 votes |
/** @return whether the screen is on or not. */ public boolean isScreenOn(Context context) { return ApiCompatibilityUtils.isInteractive(context); }
Example 6
Source File: PowerBroadcastReceiver.java From 365browser with Apache License 2.0 | 4 votes |
/** @return whether the screen is on or not. */ public boolean isScreenOn(Context context) { return ApiCompatibilityUtils.isInteractive(context); }
Example 7
Source File: OmahaDelegateBase.java From 365browser with Apache License 2.0 | 4 votes |
@Override boolean isChromeBeingUsed() { boolean isChromeVisible = ApplicationStatus.hasVisibleActivities(); boolean isScreenOn = ApiCompatibilityUtils.isInteractive(getContext()); return isChromeVisible && isScreenOn; }