Loading packages/SystemUI/multivalentTests/src/com/android/systemui/navigationbar/NavBarHelperTest.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -150,6 +150,7 @@ public class NavBarHelperTest extends SysuiTestCase { when(mUserTracker.getUserId()).thenReturn(1); when(mUserTracker.getUserId()).thenReturn(1); when(mDisplayTracker.getDefaultDisplayId()).thenReturn(0); when(mDisplayTracker.getDefaultDisplayId()).thenReturn(0); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mLauncherProxyService.isSystemOrVisibleBgUser()).thenReturn(true); doAnswer((invocation) -> mAccessibilityServicesStateChangeListener = doAnswer((invocation) -> mAccessibilityServicesStateChangeListener = invocation.getArgument(0)).when( invocation.getArgument(0)).when( Loading packages/SystemUI/multivalentTests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -275,6 +275,7 @@ public class NavigationBarTest extends SysuiTestCase { when(mNavigationBarView.getResources()).thenReturn(mResources); when(mNavigationBarView.getResources()).thenReturn(mResources); when(mNavigationBarView.getViewRootImpl()).thenReturn(mViewRootImpl); when(mNavigationBarView.getViewRootImpl()).thenReturn(mViewRootImpl); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mLauncherProxyService.isSystemOrVisibleBgUser()).thenReturn(true); setupSysuiDependency(); setupSysuiDependency(); // This class inflates views that call Dependency.get, thus these injections are still // This class inflates views that call Dependency.get, thus these injections are still // necessary. // necessary. Loading packages/SystemUI/src/com/android/systemui/LauncherProxyService.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -853,6 +853,10 @@ public class LauncherProxyService implements CallbackController<LauncherProxyLis assistUtils.registerVoiceInteractionSessionListener(mVoiceInteractionSessionListener); assistUtils.registerVoiceInteractionSessionListener(mVoiceInteractionSessionListener); } } public boolean isSystemOrVisibleBgUser() { return mIsSystemOrVisibleBgUser; } public void onVoiceSessionWindowVisibilityChanged(boolean visible) { public void onVoiceSessionWindowVisibilityChanged(boolean visible) { mDefaultDisplaySysUIState.setFlag(SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING, visible) mDefaultDisplaySysUIState.setFlag(SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING, visible) .commitUpdate(mContext.getDisplayId()); .commitUpdate(mContext.getDisplayId()); Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,6 @@ import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.Handler; import android.os.Handler; import android.os.Looper; import android.os.Looper; import android.os.Process; import android.os.RemoteException; import android.os.RemoteException; import android.os.UserHandle; import android.os.UserHandle; import android.provider.Settings; import android.provider.Settings; Loading Loading @@ -214,7 +213,7 @@ public final class NavBarHelper implements @Main Executor mainExecutor, @Main Executor mainExecutor, @Background Handler bgHandler) { @Background Handler bgHandler) { // b/319489709: This component shouldn't be running for a non-primary user // b/319489709: This component shouldn't be running for a non-primary user if (!Process.myUserHandle().equals(UserHandle.SYSTEM)) { if (!launcherProxyService.isSystemOrVisibleBgUser()) { Log.wtf(TAG, "Unexpected initialization for non-primary user", new Throwable()); Log.wtf(TAG, "Unexpected initialization for non-primary user", new Throwable()); } } mContext = context; mContext = context; Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/navigationbar/NavBarHelperTest.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -150,6 +150,7 @@ public class NavBarHelperTest extends SysuiTestCase { when(mUserTracker.getUserId()).thenReturn(1); when(mUserTracker.getUserId()).thenReturn(1); when(mDisplayTracker.getDefaultDisplayId()).thenReturn(0); when(mDisplayTracker.getDefaultDisplayId()).thenReturn(0); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mLauncherProxyService.isSystemOrVisibleBgUser()).thenReturn(true); doAnswer((invocation) -> mAccessibilityServicesStateChangeListener = doAnswer((invocation) -> mAccessibilityServicesStateChangeListener = invocation.getArgument(0)).when( invocation.getArgument(0)).when( Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -275,6 +275,7 @@ public class NavigationBarTest extends SysuiTestCase { when(mNavigationBarView.getResources()).thenReturn(mResources); when(mNavigationBarView.getResources()).thenReturn(mResources); when(mNavigationBarView.getViewRootImpl()).thenReturn(mViewRootImpl); when(mNavigationBarView.getViewRootImpl()).thenReturn(mViewRootImpl); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mEdgeBackGestureHandlerFactory.create(any())).thenReturn(mEdgeBackGestureHandler); when(mLauncherProxyService.isSystemOrVisibleBgUser()).thenReturn(true); setupSysuiDependency(); setupSysuiDependency(); // This class inflates views that call Dependency.get, thus these injections are still // This class inflates views that call Dependency.get, thus these injections are still // necessary. // necessary. Loading
packages/SystemUI/src/com/android/systemui/LauncherProxyService.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -853,6 +853,10 @@ public class LauncherProxyService implements CallbackController<LauncherProxyLis assistUtils.registerVoiceInteractionSessionListener(mVoiceInteractionSessionListener); assistUtils.registerVoiceInteractionSessionListener(mVoiceInteractionSessionListener); } } public boolean isSystemOrVisibleBgUser() { return mIsSystemOrVisibleBgUser; } public void onVoiceSessionWindowVisibilityChanged(boolean visible) { public void onVoiceSessionWindowVisibilityChanged(boolean visible) { mDefaultDisplaySysUIState.setFlag(SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING, visible) mDefaultDisplaySysUIState.setFlag(SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING, visible) .commitUpdate(mContext.getDisplayId()); .commitUpdate(mContext.getDisplayId()); Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,6 @@ import android.net.Uri; import android.os.Bundle; import android.os.Bundle; import android.os.Handler; import android.os.Handler; import android.os.Looper; import android.os.Looper; import android.os.Process; import android.os.RemoteException; import android.os.RemoteException; import android.os.UserHandle; import android.os.UserHandle; import android.provider.Settings; import android.provider.Settings; Loading Loading @@ -214,7 +213,7 @@ public final class NavBarHelper implements @Main Executor mainExecutor, @Main Executor mainExecutor, @Background Handler bgHandler) { @Background Handler bgHandler) { // b/319489709: This component shouldn't be running for a non-primary user // b/319489709: This component shouldn't be running for a non-primary user if (!Process.myUserHandle().equals(UserHandle.SYSTEM)) { if (!launcherProxyService.isSystemOrVisibleBgUser()) { Log.wtf(TAG, "Unexpected initialization for non-primary user", new Throwable()); Log.wtf(TAG, "Unexpected initialization for non-primary user", new Throwable()); } } mContext = context; mContext = context; Loading