Loading cmds/statsd/src/atoms.proto +17 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,8 @@ message Atom { LocationManagerApiUsageReported location_manager_api_usage_reported = 210; ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = 211 [(log_from_module) = "permissioncontroller"]; RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = 212 [(log_from_module) = "permissioncontroller"]; } // Pulled events will start at field 10000. Loading Loading @@ -6567,3 +6569,18 @@ message ReviewPermissionsFragmentResultReported { // The result of the permission grant optional bool permission_granted = 5; } /** * Information about results of permission upgrade by RuntimePermissionsUpgradeController * Logged from: RuntimePermissionUpdgradeController */ message RuntimePermissionsUpgradeResult { // Permission granted as result of upgrade optional string permission_name = 1; // UID of package granted permission optional int32 uid = 2 [(is_uid) = true]; // Name of package granted permission optional string package_name = 3; } No newline at end of file core/java/android/service/notification/ConditionProviderService.java +6 −5 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public abstract class ConditionProviderService extends Service { private Provider mProvider; private INotificationManager mNoMan; boolean mIsConnected; /** * The {@link Intent} that must be declared as handled by the service. Loading Loading @@ -179,7 +180,7 @@ public abstract class ConditionProviderService extends Service { try { noMan.requestUnbindProvider(mProvider); // Disable future messages. mProvider = null; mIsConnected = false; } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } Loading Loading @@ -233,16 +234,16 @@ public abstract class ConditionProviderService extends Service { */ @TestApi public boolean isBound() { if (mProvider == null) { if (!mIsConnected) { Log.w(TAG, "Condition provider service not yet bound."); return false; } return true; return mIsConnected; } private final class Provider extends IConditionProvider.Stub { @Override public void onConnected() { mIsConnected = true; mHandler.obtainMessage(H.ON_CONNECTED).sendToTarget(); } Loading @@ -265,7 +266,7 @@ public abstract class ConditionProviderService extends Service { @Override public void handleMessage(Message msg) { String name = null; if (!isBound()) { if (!mIsConnected) { return; } try { Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +7 −0 Original line number Diff line number Diff line Loading @@ -55,9 +55,16 @@ interface ISystemUiProxy { /** * Control the {@param alpha} of the back button in the navigation bar and {@param animate} if * needed from current value * @deprecated */ void setBackButtonAlpha(float alpha, boolean animate) = 8; /** * Control the {@param alpha} of the option nav bar button (back-button in 2 button mode * and home bar in no-button mode) and {@param animate} if needed from current value */ void setNavBarButtonAlpha(float alpha, boolean animate) = 19; /** * Proxies motion events from the homescreen UI to the status bar. Only called when * swipe down is detected on WORKSPACE. The sender guarantees the following order of events on Loading packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +4 −0 Original line number Diff line number Diff line Loading @@ -365,6 +365,10 @@ public class BatteryMeterView extends LinearLayout implements } else { setPercentTextAtCurrentLevel(); } } else { setContentDescription( getContext().getString(mCharging ? R.string.accessibility_battery_level_charging : R.string.accessibility_battery_level, mLevel)); } } Loading packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +38 −16 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_INP import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SUPPORTS_WINDOW_CORNERS; import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SYSUI_PROXY; import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_WINDOW_CORNER_RADIUS; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED; import android.annotation.FloatRange; import android.app.ActivityTaskManager; Loading Loading @@ -67,6 +70,7 @@ import com.android.systemui.statusbar.phone.NavigationBarFragment; import com.android.systemui.statusbar.phone.NavigationBarView; import com.android.systemui.statusbar.phone.NavigationModeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.statusbar.phone.StatusBarWindowController; import com.android.systemui.statusbar.policy.CallbackController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; Loading @@ -90,7 +94,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private static final String ACTION_QUICKSTEP = "android.intent.action.QUICKSTEP_SERVICE"; public static final String TAG_OPS = "OverviewProxyService"; public static final boolean DEBUG_OVERVIEW_PROXY = false; private static final long BACKOFF_MILLIS = 1000; private static final long DEFERRED_CALLBACK_MILLIS = 5000; Loading @@ -115,7 +118,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private boolean mBound; private boolean mIsEnabled; private int mCurrentBoundedUserId = -1; private float mBackButtonAlpha; private float mNavBarButtonAlpha; private MotionEvent mStatusBarGestureDownEvent; private float mWindowCornerRadius; private boolean mSupportsRoundedCornersOnWindows; Loading Loading @@ -241,21 +244,24 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } @Override public void setBackButtonAlpha(float alpha, boolean animate) { if (!verifyCaller("setBackButtonAlpha")) { public void setNavBarButtonAlpha(float alpha, boolean animate) { if (!verifyCaller("setNavBarButtonAlpha")) { return; } long token = Binder.clearCallingIdentity(); try { mBackButtonAlpha = alpha; mHandler.post(() -> { notifyBackButtonAlphaChanged(alpha, animate); }); mNavBarButtonAlpha = alpha; mHandler.post(() -> notifyNavBarButtonAlphaChanged(alpha, animate)); } finally { Binder.restoreCallingIdentity(token); } } @Override public void setBackButtonAlpha(float alpha, boolean animate) { setNavBarButtonAlpha(alpha, animate); } @Override public void onAssistantProgress(@FloatRange(from = 0.0, to = 1.0) float progress) { if (!verifyCaller("onAssistantProgress")) { Loading Loading @@ -442,6 +448,8 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } }; private final StatusBarWindowCallback mStatusBarWindowCallback = this::onStatusBarStateChanged; // This is the death handler for the binder from the launcher service private final IBinder.DeathRecipient mOverviewServiceDeathRcpt = this::cleanupAfterDeath; Loading @@ -465,7 +473,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis .supportsRoundedCornersOnWindows(mContext.getResources()); // Assumes device always starts with back button until launcher tells it that it does not mBackButtonAlpha = 1.0f; mNavBarButtonAlpha = 1.0f; // Listen for nav bar mode changes mNavBarMode = navModeController.addListener(this); Loading @@ -481,6 +489,9 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis PatternMatcher.PATTERN_LITERAL); filter.addAction(Intent.ACTION_PACKAGE_CHANGED); mContext.registerReceiver(mLauncherStateChangedReceiver, filter); // Listen for status bar state changes statusBarWinController.registerCallback(mStatusBarWindowCallback); } public void notifyBackAction(boolean completed, int downX, int downY, boolean isButton, Loading Loading @@ -531,7 +542,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis navBarView.updateSystemUiStateFlags(); } if (mStatusBarWinController != null) { mStatusBarWinController.updateSystemUiStateFlags(); mStatusBarWinController.notifyStateChangedCallbacks(); } notifySystemUiStateFlags(mSysUiStateFlags); } Loading @@ -546,6 +557,16 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } } private void onStatusBarStateChanged(boolean keyguardShowing, boolean keyguardOccluded, boolean bouncerShowing) { int displayId = mContext.getDisplayId(); setSystemUiStateFlag(SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING, keyguardShowing && !keyguardOccluded, displayId); setSystemUiStateFlag(SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED, keyguardShowing && keyguardOccluded, displayId); setSystemUiStateFlag(SYSUI_STATE_BOUNCER_SHOWING, bouncerShowing, displayId); } /** * Sets the navbar region which can receive touch inputs */ Loading @@ -565,7 +586,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } public float getBackButtonAlpha() { return mBackButtonAlpha; return mNavBarButtonAlpha; } public void cleanupAfterDeath() { Loading Loading @@ -637,7 +658,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis public void addCallback(OverviewProxyListener listener) { mConnectionCallbacks.add(listener); listener.onConnectionChanged(mOverviewProxy != null); listener.onBackButtonAlphaChanged(mBackButtonAlpha, false); listener.onNavBarButtonAlphaChanged(mNavBarButtonAlpha, false); listener.onSystemUiStateChanged(mSysUiStateFlags); } Loading Loading @@ -668,14 +689,14 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis if (mOverviewProxy != null) { mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0); mOverviewProxy = null; notifyBackButtonAlphaChanged(1f, false /* animate */); notifyNavBarButtonAlphaChanged(1f, false /* animate */); notifyConnectionChanged(); } } private void notifyBackButtonAlphaChanged(float alpha, boolean animate) { private void notifyNavBarButtonAlphaChanged(float alpha, boolean animate) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onBackButtonAlphaChanged(alpha, animate); mConnectionCallbacks.get(i).onNavBarButtonAlphaChanged(alpha, animate); } } Loading Loading @@ -766,7 +787,8 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis default void onQuickStepStarted() {} default void onOverviewShown(boolean fromHome) {} default void onQuickScrubStarted() {} default void onBackButtonAlphaChanged(float alpha, boolean animate) {} /** Notify changes in the nav bar button alpha */ default void onNavBarButtonAlphaChanged(float alpha, boolean animate) {} default void onSystemUiStateChanged(int sysuiStateFlags) {} default void onAssistantProgress(@FloatRange(from = 0.0, to = 1.0) float progress) {} default void onAssistantGestureCompletion(float velocity) {} Loading Loading
cmds/statsd/src/atoms.proto +17 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,8 @@ message Atom { LocationManagerApiUsageReported location_manager_api_usage_reported = 210; ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = 211 [(log_from_module) = "permissioncontroller"]; RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = 212 [(log_from_module) = "permissioncontroller"]; } // Pulled events will start at field 10000. Loading Loading @@ -6567,3 +6569,18 @@ message ReviewPermissionsFragmentResultReported { // The result of the permission grant optional bool permission_granted = 5; } /** * Information about results of permission upgrade by RuntimePermissionsUpgradeController * Logged from: RuntimePermissionUpdgradeController */ message RuntimePermissionsUpgradeResult { // Permission granted as result of upgrade optional string permission_name = 1; // UID of package granted permission optional int32 uid = 2 [(is_uid) = true]; // Name of package granted permission optional string package_name = 3; } No newline at end of file
core/java/android/service/notification/ConditionProviderService.java +6 −5 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public abstract class ConditionProviderService extends Service { private Provider mProvider; private INotificationManager mNoMan; boolean mIsConnected; /** * The {@link Intent} that must be declared as handled by the service. Loading Loading @@ -179,7 +180,7 @@ public abstract class ConditionProviderService extends Service { try { noMan.requestUnbindProvider(mProvider); // Disable future messages. mProvider = null; mIsConnected = false; } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } Loading Loading @@ -233,16 +234,16 @@ public abstract class ConditionProviderService extends Service { */ @TestApi public boolean isBound() { if (mProvider == null) { if (!mIsConnected) { Log.w(TAG, "Condition provider service not yet bound."); return false; } return true; return mIsConnected; } private final class Provider extends IConditionProvider.Stub { @Override public void onConnected() { mIsConnected = true; mHandler.obtainMessage(H.ON_CONNECTED).sendToTarget(); } Loading @@ -265,7 +266,7 @@ public abstract class ConditionProviderService extends Service { @Override public void handleMessage(Message msg) { String name = null; if (!isBound()) { if (!mIsConnected) { return; } try { Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +7 −0 Original line number Diff line number Diff line Loading @@ -55,9 +55,16 @@ interface ISystemUiProxy { /** * Control the {@param alpha} of the back button in the navigation bar and {@param animate} if * needed from current value * @deprecated */ void setBackButtonAlpha(float alpha, boolean animate) = 8; /** * Control the {@param alpha} of the option nav bar button (back-button in 2 button mode * and home bar in no-button mode) and {@param animate} if needed from current value */ void setNavBarButtonAlpha(float alpha, boolean animate) = 19; /** * Proxies motion events from the homescreen UI to the status bar. Only called when * swipe down is detected on WORKSPACE. The sender guarantees the following order of events on Loading
packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +4 −0 Original line number Diff line number Diff line Loading @@ -365,6 +365,10 @@ public class BatteryMeterView extends LinearLayout implements } else { setPercentTextAtCurrentLevel(); } } else { setContentDescription( getContext().getString(mCharging ? R.string.accessibility_battery_level_charging : R.string.accessibility_battery_level, mLevel)); } } Loading
packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +38 −16 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_INP import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SUPPORTS_WINDOW_CORNERS; import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SYSUI_PROXY; import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_WINDOW_CORNER_RADIUS; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED; import android.annotation.FloatRange; import android.app.ActivityTaskManager; Loading Loading @@ -67,6 +70,7 @@ import com.android.systemui.statusbar.phone.NavigationBarFragment; import com.android.systemui.statusbar.phone.NavigationBarView; import com.android.systemui.statusbar.phone.NavigationModeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.statusbar.phone.StatusBarWindowController; import com.android.systemui.statusbar.policy.CallbackController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; Loading @@ -90,7 +94,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private static final String ACTION_QUICKSTEP = "android.intent.action.QUICKSTEP_SERVICE"; public static final String TAG_OPS = "OverviewProxyService"; public static final boolean DEBUG_OVERVIEW_PROXY = false; private static final long BACKOFF_MILLIS = 1000; private static final long DEFERRED_CALLBACK_MILLIS = 5000; Loading @@ -115,7 +118,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private boolean mBound; private boolean mIsEnabled; private int mCurrentBoundedUserId = -1; private float mBackButtonAlpha; private float mNavBarButtonAlpha; private MotionEvent mStatusBarGestureDownEvent; private float mWindowCornerRadius; private boolean mSupportsRoundedCornersOnWindows; Loading Loading @@ -241,21 +244,24 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } @Override public void setBackButtonAlpha(float alpha, boolean animate) { if (!verifyCaller("setBackButtonAlpha")) { public void setNavBarButtonAlpha(float alpha, boolean animate) { if (!verifyCaller("setNavBarButtonAlpha")) { return; } long token = Binder.clearCallingIdentity(); try { mBackButtonAlpha = alpha; mHandler.post(() -> { notifyBackButtonAlphaChanged(alpha, animate); }); mNavBarButtonAlpha = alpha; mHandler.post(() -> notifyNavBarButtonAlphaChanged(alpha, animate)); } finally { Binder.restoreCallingIdentity(token); } } @Override public void setBackButtonAlpha(float alpha, boolean animate) { setNavBarButtonAlpha(alpha, animate); } @Override public void onAssistantProgress(@FloatRange(from = 0.0, to = 1.0) float progress) { if (!verifyCaller("onAssistantProgress")) { Loading Loading @@ -442,6 +448,8 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } }; private final StatusBarWindowCallback mStatusBarWindowCallback = this::onStatusBarStateChanged; // This is the death handler for the binder from the launcher service private final IBinder.DeathRecipient mOverviewServiceDeathRcpt = this::cleanupAfterDeath; Loading @@ -465,7 +473,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis .supportsRoundedCornersOnWindows(mContext.getResources()); // Assumes device always starts with back button until launcher tells it that it does not mBackButtonAlpha = 1.0f; mNavBarButtonAlpha = 1.0f; // Listen for nav bar mode changes mNavBarMode = navModeController.addListener(this); Loading @@ -481,6 +489,9 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis PatternMatcher.PATTERN_LITERAL); filter.addAction(Intent.ACTION_PACKAGE_CHANGED); mContext.registerReceiver(mLauncherStateChangedReceiver, filter); // Listen for status bar state changes statusBarWinController.registerCallback(mStatusBarWindowCallback); } public void notifyBackAction(boolean completed, int downX, int downY, boolean isButton, Loading Loading @@ -531,7 +542,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis navBarView.updateSystemUiStateFlags(); } if (mStatusBarWinController != null) { mStatusBarWinController.updateSystemUiStateFlags(); mStatusBarWinController.notifyStateChangedCallbacks(); } notifySystemUiStateFlags(mSysUiStateFlags); } Loading @@ -546,6 +557,16 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } } private void onStatusBarStateChanged(boolean keyguardShowing, boolean keyguardOccluded, boolean bouncerShowing) { int displayId = mContext.getDisplayId(); setSystemUiStateFlag(SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING, keyguardShowing && !keyguardOccluded, displayId); setSystemUiStateFlag(SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED, keyguardShowing && keyguardOccluded, displayId); setSystemUiStateFlag(SYSUI_STATE_BOUNCER_SHOWING, bouncerShowing, displayId); } /** * Sets the navbar region which can receive touch inputs */ Loading @@ -565,7 +586,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } public float getBackButtonAlpha() { return mBackButtonAlpha; return mNavBarButtonAlpha; } public void cleanupAfterDeath() { Loading Loading @@ -637,7 +658,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis public void addCallback(OverviewProxyListener listener) { mConnectionCallbacks.add(listener); listener.onConnectionChanged(mOverviewProxy != null); listener.onBackButtonAlphaChanged(mBackButtonAlpha, false); listener.onNavBarButtonAlphaChanged(mNavBarButtonAlpha, false); listener.onSystemUiStateChanged(mSysUiStateFlags); } Loading Loading @@ -668,14 +689,14 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis if (mOverviewProxy != null) { mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0); mOverviewProxy = null; notifyBackButtonAlphaChanged(1f, false /* animate */); notifyNavBarButtonAlphaChanged(1f, false /* animate */); notifyConnectionChanged(); } } private void notifyBackButtonAlphaChanged(float alpha, boolean animate) { private void notifyNavBarButtonAlphaChanged(float alpha, boolean animate) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onBackButtonAlphaChanged(alpha, animate); mConnectionCallbacks.get(i).onNavBarButtonAlphaChanged(alpha, animate); } } Loading Loading @@ -766,7 +787,8 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis default void onQuickStepStarted() {} default void onOverviewShown(boolean fromHome) {} default void onQuickScrubStarted() {} default void onBackButtonAlphaChanged(float alpha, boolean animate) {} /** Notify changes in the nav bar button alpha */ default void onNavBarButtonAlphaChanged(float alpha, boolean animate) {} default void onSystemUiStateChanged(int sysuiStateFlags) {} default void onAssistantProgress(@FloatRange(from = 0.0, to = 1.0) float progress) {} default void onAssistantGestureCompletion(float velocity) {} Loading