Merge "Add some logs to make current QS tiles state clearer" into tm-qpr-dev am: 0f1270b168
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21117393 Change-Id: I1c846181362463815c48ce0a5dde06e74540a235 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -314,7 +314,6 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, P
|
|||||||
if (!TILES_SETTING.equals(key)) {
|
if (!TILES_SETTING.equals(key)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.d(TAG, "Recreating tiles");
|
|
||||||
if (newValue == null && UserManager.isDeviceInDemoMode(mContext)) {
|
if (newValue == null && UserManager.isDeviceInDemoMode(mContext)) {
|
||||||
newValue = mContext.getResources().getString(R.string.quick_settings_tiles_retail_mode);
|
newValue = mContext.getResources().getString(R.string.quick_settings_tiles_retail_mode);
|
||||||
}
|
}
|
||||||
@@ -327,6 +326,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tileSpecs.equals(mTileSpecs) && currentUser == mCurrentUser) return;
|
if (tileSpecs.equals(mTileSpecs) && currentUser == mCurrentUser) return;
|
||||||
|
Log.d(TAG, "Recreating tiles: " + tileSpecs);
|
||||||
mTiles.entrySet().stream().filter(tile -> !tileSpecs.contains(tile.getKey())).forEach(
|
mTiles.entrySet().stream().filter(tile -> !tileSpecs.contains(tile.getKey())).forEach(
|
||||||
tile -> {
|
tile -> {
|
||||||
Log.d(TAG, "Destroying tile: " + tile.getKey());
|
Log.d(TAG, "Destroying tile: " + tile.getKey());
|
||||||
@@ -372,6 +372,8 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, P
|
|||||||
Log.d(TAG, "Destroying not available tile: " + tileSpec);
|
Log.d(TAG, "Destroying not available tile: " + tileSpec);
|
||||||
mQSLogger.logTileDestroyed(tileSpec, "Tile not available");
|
mQSLogger.logTileDestroyed(tileSpec, "Tile not available");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Log.d(TAG, "No factory for a spec: " + tileSpec);
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Log.w(TAG, "Error creating tile for spec: " + tileSpec, t);
|
Log.w(TAG, "Error creating tile for spec: " + tileSpec, t);
|
||||||
|
|||||||
Reference in New Issue
Block a user