Search in sources :

Example 1 with NavigationModeChangeListener

use of com.android.quickstep.SysUINavigationMode.NavigationModeChangeListener in project Neo-Launcher by NeoApplications.

the class UiFactory method enableLiveUIChanges.

public static Runnable enableLiveUIChanges(Launcher launcher) {
    NavigationModeChangeListener listener = m -> {
        launcher.getDragLayer().recreateControllers();
        launcher.getRotationHelper().setRotationHadDifferentUI(m != Mode.NO_BUTTON);
    };
    SysUINavigationMode mode = SysUINavigationMode.INSTANCE.get(launcher);
    SysUINavigationMode.Mode m = mode.addModeChangeListener(listener);
    launcher.getRotationHelper().setRotationHadDifferentUI(m != Mode.NO_BUTTON);
    return () -> mode.removeModeChangeListener(listener);
}
Also used : Context(android.content.Context) Bundle(android.os.Bundle) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Intent(android.content.Intent) OVERVIEW(com.android.launcher3.LauncherState.OVERVIEW) NavigationModeChangeListener(com.android.quickstep.SysUINavigationMode.NavigationModeChangeListener) IntentSender(android.content.IntentSender) QuickstepAppTransitionManagerImpl(com.android.launcher3.QuickstepAppTransitionManagerImpl) TouchInteractionService(com.android.quickstep.TouchInteractionService) ProxyActivityStarter(com.android.launcher3.proxy.ProxyActivityStarter) StartActivityParams(com.android.launcher3.proxy.StartActivityParams) HOME_BOUNCE_SEEN(com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN) TYPE_ALL(com.android.launcher3.AbstractFloatingView.TYPE_ALL) AnimatorSet(android.animation.AnimatorSet) StateHandler(com.android.launcher3.LauncherStateManager.StateHandler) OverviewInteractionState(com.android.quickstep.OverviewInteractionState) SHELF_BOUNCE_SEEN(com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN) SHELF_BOUNCE_COUNT(com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_COUNT) Utilities(com.android.launcher3.Utilities) PrintWriter(java.io.PrintWriter) RESULT_CANCELED(android.app.Activity.RESULT_CANCELED) SysUINavigationMode(com.android.quickstep.SysUINavigationMode) BOUNCE_MAX_COUNT(com.android.launcher3.allapps.DiscoveryBounce.BOUNCE_MAX_COUNT) Launcher(com.android.launcher3.Launcher) ScaleAndTranslation(com.android.launcher3.LauncherState.ScaleAndTranslation) TYPE_HIDE_BACK_BUTTON(com.android.launcher3.AbstractFloatingView.TYPE_HIDE_BACK_BUTTON) ShortcutInfo(android.content.pm.ShortcutInfo) Mode(com.android.quickstep.SysUINavigationMode.Mode) CancellationSignal(android.os.CancellationSignal) HOME_BOUNCE_COUNT(com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_COUNT) Deflater(java.util.zip.Deflater) LauncherState(com.android.launcher3.LauncherState) ALL_APPS(com.android.launcher3.LauncherState.ALL_APPS) ActivityCompat(com.android.systemui.shared.system.ActivityCompat) RecentsModel(com.android.quickstep.RecentsModel) RemoteFadeOutAnimationListener(com.android.quickstep.util.RemoteFadeOutAnimationListener) Base64(android.util.Base64) AbstractFloatingView(com.android.launcher3.AbstractFloatingView) Activity(android.app.Activity) LauncherStateManager(com.android.launcher3.LauncherStateManager) NORMAL(com.android.launcher3.LauncherState.NORMAL) ValueAnimator(android.animation.ValueAnimator) Mode(com.android.quickstep.SysUINavigationMode.Mode) NavigationModeChangeListener(com.android.quickstep.SysUINavigationMode.NavigationModeChangeListener) SysUINavigationMode(com.android.quickstep.SysUINavigationMode)

Aggregations

AnimatorSet (android.animation.AnimatorSet)1 ValueAnimator (android.animation.ValueAnimator)1 Activity (android.app.Activity)1 RESULT_CANCELED (android.app.Activity.RESULT_CANCELED)1 Context (android.content.Context)1 Intent (android.content.Intent)1 IntentSender (android.content.IntentSender)1 ShortcutInfo (android.content.pm.ShortcutInfo)1 Bundle (android.os.Bundle)1 CancellationSignal (android.os.CancellationSignal)1 Base64 (android.util.Base64)1 AbstractFloatingView (com.android.launcher3.AbstractFloatingView)1 TYPE_ALL (com.android.launcher3.AbstractFloatingView.TYPE_ALL)1 TYPE_HIDE_BACK_BUTTON (com.android.launcher3.AbstractFloatingView.TYPE_HIDE_BACK_BUTTON)1 Launcher (com.android.launcher3.Launcher)1 LauncherState (com.android.launcher3.LauncherState)1 ALL_APPS (com.android.launcher3.LauncherState.ALL_APPS)1 NORMAL (com.android.launcher3.LauncherState.NORMAL)1 OVERVIEW (com.android.launcher3.LauncherState.OVERVIEW)1 ScaleAndTranslation (com.android.launcher3.LauncherState.ScaleAndTranslation)1