diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-10 01:07:11 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-10 01:07:11 +0000 |
commit | 0064adf9f128374d9c8ec6cfe22845c46bedd072 (patch) | |
tree | 0fc13272143c01b53e56a65fbb2769c4fdc4d53b /packages/SystemUI/src | |
parent | 65b6baa27991d3d2c2d7b8c729ad11733673ace0 (diff) | |
parent | 23ee1b87bb87301a8f2f8044603b29141ae76a69 (diff) |
Snap for 7625910 from 23ee1b87bb87301a8f2f8044603b29141ae76a69 to sc-release
Change-Id: Ie4f54c1939e4c67742037aab0131a6bac86aea21
Diffstat (limited to 'packages/SystemUI/src')
3 files changed, 13 insertions, 57 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java index 756ad9939886..541ee2c4fe8f 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java @@ -51,7 +51,6 @@ import com.android.systemui.qs.external.TileServices; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; -import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.phone.AutoTileManager; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarIconController; @@ -512,33 +511,6 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, D } } } - // TODO(b/174753536): Move it into the config file. - // Only do the below hacking when at least one of the below tiles exist - // --InternetTile - // --WiFiTile - // --CellularTIle - if (tiles.contains("internet") || tiles.contains("wifi") || tiles.contains("cell")) { - if (FeatureFlags.isProviderModelSettingEnabled(context)) { - if (!tiles.contains("internet")) { - if (tiles.contains("wifi")) { - // Replace the WiFi with Internet, and remove the Cell - tiles.set(tiles.indexOf("wifi"), "internet"); - tiles.remove("cell"); - } else if (tiles.contains("cell")) { - // Replace the Cell with Internet - tiles.set(tiles.indexOf("cell"), "internet"); - } - } else { - tiles.remove("wifi"); - tiles.remove("cell"); - } - } else { - if (tiles.contains("internet")) { - tiles.set(tiles.indexOf("internet"), "wifi"); - tiles.add("cell"); - } - } - } return tiles; } @@ -558,14 +530,6 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, D && GarbageMonitor.ADD_MEMORY_TILE_TO_DEFAULT_ON_DEBUGGABLE_BUILDS) { tiles.add(GarbageMonitor.MemoryTile.TILE_SPEC); } - // TODO(b/174753536): Change the config file directly. - // Filter out unused tiles from the default QS config. - if (FeatureFlags.isProviderModelSettingEnabled(context)) { - tiles.remove("cell"); - tiles.remove("wifi"); - } else { - tiles.remove("internet"); - } return tiles; } diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java index 3cb715cee8e9..3c2f35b954ea 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java @@ -41,7 +41,6 @@ import com.android.systemui.qs.dagger.QSScope; import com.android.systemui.qs.external.CustomTile; import com.android.systemui.qs.tileimpl.QSTileImpl.DrawableIcon; import com.android.systemui.settings.UserTracker; -import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.util.leak.GarbageMonitor; import java.util.ArrayList; @@ -63,7 +62,6 @@ public class TileQueryHelper { private final Executor mBgExecutor; private final Context mContext; private final UserTracker mUserTracker; - private final FeatureFlags mFeatureFlags; private TileStateListener mListener; private boolean mFinished; @@ -73,14 +71,12 @@ public class TileQueryHelper { Context context, UserTracker userTracker, @Main Executor mainExecutor, - @Background Executor bgExecutor, - FeatureFlags featureFlags + @Background Executor bgExecutor ) { mContext = context; mMainExecutor = mainExecutor; mBgExecutor = bgExecutor; mUserTracker = userTracker; - mFeatureFlags = featureFlags; } public void setListener(TileStateListener listener) { @@ -121,19 +117,11 @@ public class TileQueryHelper { } final ArrayList<QSTile> tilesToAdd = new ArrayList<>(); - // TODO(b/174753536): Move it into the config file. - if (mFeatureFlags.isProviderModelSettingEnabled()) { - possibleTiles.remove("cell"); - possibleTiles.remove("wifi"); - } else { - possibleTiles.remove("internet"); - } for (String spec : possibleTiles) { // Only add current and stock tiles that can be created from QSFactoryImpl. // Do not include CustomTile. Those will be created by `addPackageTiles`. if (spec.startsWith(CustomTile.PREFIX)) continue; - // TODO(b/174753536): Move it into the config file. final QSTile tile = host.createTile(spec); if (tile == null) { continue; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt index a5b868b6f8a3..6b52dca42eda 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -149,14 +149,18 @@ class UnlockedScreenOffAnimationController @Inject constructor( lightRevealAnimationPlaying = false aodUiAnimationPlaying = false - // Make sure the status bar is in the correct keyguard state, forcing it if necessary. This - // is required if the screen off animation is cancelled, since it might be incorrectly left - // in the KEYGUARD or SHADE states depending on when it was cancelled and whether 'lock - // instantly' is enabled. We need to force it so that the state is set even if we're going - // from SHADE to SHADE or KEYGUARD to KEYGUARD, since we might have changed parts of the UI - // (such as showing AOD in the shade) without actually changing the StatusBarState. This - // ensures that the UI definitely reflects the desired state. - statusBar.updateIsKeyguard(true /* force */) + // If we can't control the screen off animation, we shouldn't mess with the StatusBar's + // keyguard state unnecessarily. + if (dozeParameters.get().canControlUnlockedScreenOff()) { + // Make sure the status bar is in the correct keyguard state, forcing it if necessary. + // This is required if the screen off animation is cancelled, since it might be + // incorrectly left in the KEYGUARD or SHADE states depending on when it was cancelled + // and whether 'lock instantly' is enabled. We need to force it so that the state is set + // even if we're going from SHADE to SHADE or KEYGUARD to KEYGUARD, since we might have + // changed parts of the UI (such as showing AOD in the shade) without actually changing + // the StatusBarState. This ensures that the UI definitely reflects the desired state. + statusBar.updateIsKeyguard(true /* force */) + } } override fun onStartedGoingToSleep() { |