use of com.android.server.statusbar.StatusBarManagerInternal in project android_frameworks_base by ResurrectionRemix.
the class PhoneWindowManager method preloadRecentApps.
private void preloadRecentApps() {
mPreloadedRecentApps = true;
StatusBarManagerInternal statusbar = getStatusBarManagerInternal();
if (statusbar != null) {
statusbar.preloadRecentApps();
}
}
use of com.android.server.statusbar.StatusBarManagerInternal in project android_frameworks_base by ResurrectionRemix.
the class PhoneWindowManager method launchAssistAction.
private void launchAssistAction(String hint, int deviceId) {
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_ASSIST);
if (!isUserSetupComplete()) {
// Disable opening assist window during setup
return;
}
Bundle args = null;
if (deviceId > Integer.MIN_VALUE) {
args = new Bundle();
args.putInt(Intent.EXTRA_ASSIST_INPUT_DEVICE_ID, deviceId);
}
if ((mContext.getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK) == Configuration.UI_MODE_TYPE_TELEVISION) {
// On TV, use legacy handling until assistants are implemented in the proper way.
((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE)).launchLegacyAssist(hint, UserHandle.myUserId(), args);
} else {
if (hint != null) {
if (args == null) {
args = new Bundle();
}
args.putBoolean(hint, true);
}
StatusBarManagerInternal statusbar = getStatusBarManagerInternal();
if (statusbar != null) {
statusbar.startAssist(args);
}
}
}
use of com.android.server.statusbar.StatusBarManagerInternal in project android_frameworks_base by ResurrectionRemix.
the class PhoneWindowManager method showRecentApps.
private void showRecentApps(boolean triggeredFromAltTab, boolean fromHome) {
if (mOmniSwitchRecents == 1) {
if (fromHome) {
OmniSwitchConstants.restoreHomeStack(mContext, UserHandle.CURRENT);
} else {
OmniSwitchConstants.toggleOmniSwitchRecents(mContext, UserHandle.CURRENT);
}
} else {
// preloading no longer needs to be canceled
mPreloadedRecentApps = false;
StatusBarManagerInternal statusbar = getStatusBarManagerInternal();
if (statusbar != null) {
statusbar.showRecentApps(triggeredFromAltTab, fromHome);
}
}
}
use of com.android.server.statusbar.StatusBarManagerInternal in project android_frameworks_base by ResurrectionRemix.
the class GestureLauncherService method handleCameraLaunchGesture.
/**
* @return true if camera was launched, false otherwise.
*/
private boolean handleCameraLaunchGesture(boolean useWakelock, int source) {
boolean userSetupComplete = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
if (!userSetupComplete) {
if (DBG)
Slog.d(TAG, String.format("userSetupComplete = %s, ignoring camera launch gesture.", userSetupComplete));
return false;
}
if (DBG)
Slog.d(TAG, String.format("userSetupComplete = %s, performing camera launch gesture.", userSetupComplete));
if (useWakelock) {
// Make sure we don't sleep too early
mWakeLock.acquire(500L);
}
StatusBarManagerInternal service = LocalServices.getService(StatusBarManagerInternal.class);
service.onCameraLaunchGestureDetected(source);
return true;
}
use of com.android.server.statusbar.StatusBarManagerInternal in project android_frameworks_base by DirtyUnicorns.
the class GestureLauncherService method handleCameraLaunchGesture.
/**
* @return true if camera was launched, false otherwise.
*/
private boolean handleCameraLaunchGesture(boolean useWakelock, int source) {
boolean userSetupComplete = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
if (!userSetupComplete) {
if (DBG)
Slog.d(TAG, String.format("userSetupComplete = %s, ignoring camera launch gesture.", userSetupComplete));
return false;
}
if (DBG)
Slog.d(TAG, String.format("userSetupComplete = %s, performing camera launch gesture.", userSetupComplete));
if (useWakelock) {
// Make sure we don't sleep too early
mWakeLock.acquire(500L);
}
StatusBarManagerInternal service = LocalServices.getService(StatusBarManagerInternal.class);
service.onCameraLaunchGestureDetected(source);
return true;
}
Aggregations