Loading packages/SystemUI/src/com/android/systemui/model/SysUiState.java +8 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.model; import static android.view.Display.DEFAULT_DISPLAY; import android.annotation.NonNull; import android.util.Log; import com.android.systemui.Dumpable; import com.android.systemui.shared.system.QuickStepContract; Loading @@ -37,6 +38,9 @@ import javax.inject.Singleton; @Singleton public class SysUiState implements Dumpable { private static final String TAG = SysUiState.class.getSimpleName(); public static final boolean DEBUG = true; private @QuickStepContract.SystemUiStateFlags int mFlags; private final List<SysUiStateCallback> mCallbacks = new ArrayList<>(); private int mFlagsToSet = 0; Loading Loading @@ -76,6 +80,7 @@ public class SysUiState implements Dumpable { private void updateFlags(int displayId) { if (displayId != DEFAULT_DISPLAY) { // Ignore non-default displays for now Log.w(TAG, "Ignoring flag update for display: " + displayId, new Throwable()); return; } Loading @@ -87,6 +92,9 @@ public class SysUiState implements Dumpable { /** Notify all those who are registered that the state has changed. */ private void notifyAndSetSystemUiStateChanged(int newFlags, int oldFlags) { if (DEBUG) { Log.d(TAG, "SysUiState changed: old=" + oldFlags + " new=" + newFlags); } if (newFlags != oldFlags) { mCallbacks.forEach(callback -> callback.onSystemUiStateChanged(newFlags)); mFlags = newFlags; Loading packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +11 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,9 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private final ServiceConnection mOverviewServiceConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { if (SysUiState.DEBUG) { Log.d(TAG_OPS, "Overview proxy service connected"); } mConnectionBackoffAttempts = 0; mHandler.removeCallbacks(mDeferredConnectionCallback); try { Loading Loading @@ -570,6 +573,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis mNavBarController.getDefaultNavigationBarFragment(); final NavigationBarView navBarView = mNavBarController.getNavigationBarView(mContext.getDisplayId()); if (SysUiState.DEBUG) { Log.d(TAG_OPS, "Updating sysui state flags: navBarFragment=" + navBarFragment + " navBarView=" + navBarView); } if (navBarFragment != null) { navBarFragment.updateSystemUiStateFlags(-1); Loading @@ -584,6 +591,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } private void notifySystemUiStateFlags(int flags) { if (SysUiState.DEBUG) { Log.d(TAG_OPS, "Notifying sysui state change to overview service: proxy=" + mOverviewProxy + " flags=" + flags); } try { if (mOverviewProxy != null) { mOverviewProxy.onSystemUiStateChanged(flags); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +7 −0 Original line number Diff line number Diff line Loading @@ -770,7 +770,14 @@ public class NavigationBarView extends FrameLayout implements public void updatePanelSystemUiStateFlags() { int displayId = mContext.getDisplayId(); if (SysUiState.DEBUG) { Log.d(TAG, "Updating panel sysui state flags: panelView=" + mPanelView); } if (mPanelView != null) { if (SysUiState.DEBUG) { Log.d(TAG, "Updating panel sysui state flags: fullyExpanded=" + mPanelView.isFullyExpanded() + " inQs=" + mPanelView.isInSettings()); } mSysUiFlagContainer.setFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED, mPanelView.isFullyExpanded() && !mPanelView.isInSettings()) .setFlag(SYSUI_STATE_QUICK_SETTINGS_EXPANDED, Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java +5 −4 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ import javax.inject.Singleton; public class NavigationModeController implements Dumpable { private static final String TAG = NavigationModeController.class.getSimpleName(); private static final boolean DEBUG = false; private static final boolean DEBUG = true; public interface ModeChangedListener { void onNavigationModeChanged(int mode); Loading Loading @@ -248,8 +248,7 @@ public class NavigationModeController implements Dumpable { Secure.NAVIGATION_MODE, String.valueOf(mode)); }); if (DEBUG) { Log.e(TAG, "updateCurrentInteractionMode: mode=" + mMode + " contextUser=" + mCurrentUserContext.getUserId()); Log.e(TAG, "updateCurrentInteractionMode: mode=" + mMode); dumpAssetPaths(mCurrentUserContext); } Loading Loading @@ -293,6 +292,7 @@ public class NavigationModeController implements Dumpable { 0 /* flags */, UserHandle.of(userId)); } catch (PackageManager.NameNotFoundException e) { // Never happens for the sysui package Log.e(TAG, "Failed to create package context", e); return null; } } Loading Loading @@ -408,6 +408,7 @@ public class NavigationModeController implements Dumpable { } private void dumpAssetPaths(Context context) { Log.d(TAG, " contextUser=" + mCurrentUserContext.getUserId()); Log.d(TAG, " assetPaths="); ApkAssets[] assets = context.getResources().getAssets().getApkAssets(); for (ApkAssets a : assets) { Loading Loading
packages/SystemUI/src/com/android/systemui/model/SysUiState.java +8 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.model; import static android.view.Display.DEFAULT_DISPLAY; import android.annotation.NonNull; import android.util.Log; import com.android.systemui.Dumpable; import com.android.systemui.shared.system.QuickStepContract; Loading @@ -37,6 +38,9 @@ import javax.inject.Singleton; @Singleton public class SysUiState implements Dumpable { private static final String TAG = SysUiState.class.getSimpleName(); public static final boolean DEBUG = true; private @QuickStepContract.SystemUiStateFlags int mFlags; private final List<SysUiStateCallback> mCallbacks = new ArrayList<>(); private int mFlagsToSet = 0; Loading Loading @@ -76,6 +80,7 @@ public class SysUiState implements Dumpable { private void updateFlags(int displayId) { if (displayId != DEFAULT_DISPLAY) { // Ignore non-default displays for now Log.w(TAG, "Ignoring flag update for display: " + displayId, new Throwable()); return; } Loading @@ -87,6 +92,9 @@ public class SysUiState implements Dumpable { /** Notify all those who are registered that the state has changed. */ private void notifyAndSetSystemUiStateChanged(int newFlags, int oldFlags) { if (DEBUG) { Log.d(TAG, "SysUiState changed: old=" + oldFlags + " new=" + newFlags); } if (newFlags != oldFlags) { mCallbacks.forEach(callback -> callback.onSystemUiStateChanged(newFlags)); mFlags = newFlags; Loading
packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +11 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,9 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private final ServiceConnection mOverviewServiceConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { if (SysUiState.DEBUG) { Log.d(TAG_OPS, "Overview proxy service connected"); } mConnectionBackoffAttempts = 0; mHandler.removeCallbacks(mDeferredConnectionCallback); try { Loading Loading @@ -570,6 +573,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis mNavBarController.getDefaultNavigationBarFragment(); final NavigationBarView navBarView = mNavBarController.getNavigationBarView(mContext.getDisplayId()); if (SysUiState.DEBUG) { Log.d(TAG_OPS, "Updating sysui state flags: navBarFragment=" + navBarFragment + " navBarView=" + navBarView); } if (navBarFragment != null) { navBarFragment.updateSystemUiStateFlags(-1); Loading @@ -584,6 +591,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } private void notifySystemUiStateFlags(int flags) { if (SysUiState.DEBUG) { Log.d(TAG_OPS, "Notifying sysui state change to overview service: proxy=" + mOverviewProxy + " flags=" + flags); } try { if (mOverviewProxy != null) { mOverviewProxy.onSystemUiStateChanged(flags); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +7 −0 Original line number Diff line number Diff line Loading @@ -770,7 +770,14 @@ public class NavigationBarView extends FrameLayout implements public void updatePanelSystemUiStateFlags() { int displayId = mContext.getDisplayId(); if (SysUiState.DEBUG) { Log.d(TAG, "Updating panel sysui state flags: panelView=" + mPanelView); } if (mPanelView != null) { if (SysUiState.DEBUG) { Log.d(TAG, "Updating panel sysui state flags: fullyExpanded=" + mPanelView.isFullyExpanded() + " inQs=" + mPanelView.isInSettings()); } mSysUiFlagContainer.setFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED, mPanelView.isFullyExpanded() && !mPanelView.isInSettings()) .setFlag(SYSUI_STATE_QUICK_SETTINGS_EXPANDED, Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java +5 −4 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ import javax.inject.Singleton; public class NavigationModeController implements Dumpable { private static final String TAG = NavigationModeController.class.getSimpleName(); private static final boolean DEBUG = false; private static final boolean DEBUG = true; public interface ModeChangedListener { void onNavigationModeChanged(int mode); Loading Loading @@ -248,8 +248,7 @@ public class NavigationModeController implements Dumpable { Secure.NAVIGATION_MODE, String.valueOf(mode)); }); if (DEBUG) { Log.e(TAG, "updateCurrentInteractionMode: mode=" + mMode + " contextUser=" + mCurrentUserContext.getUserId()); Log.e(TAG, "updateCurrentInteractionMode: mode=" + mMode); dumpAssetPaths(mCurrentUserContext); } Loading Loading @@ -293,6 +292,7 @@ public class NavigationModeController implements Dumpable { 0 /* flags */, UserHandle.of(userId)); } catch (PackageManager.NameNotFoundException e) { // Never happens for the sysui package Log.e(TAG, "Failed to create package context", e); return null; } } Loading Loading @@ -408,6 +408,7 @@ public class NavigationModeController implements Dumpable { } private void dumpAssetPaths(Context context) { Log.d(TAG, " contextUser=" + mCurrentUserContext.getUserId()); Log.d(TAG, " assetPaths="); ApkAssets[] assets = context.getResources().getAssets().getApkAssets(); for (ApkAssets a : assets) { Loading