Merge "Add debug logs for why taskbar might not be destroyed" into tm-qpr-dev am: c8d8c58f5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22391708 Change-Id: I1bea5537e4bfbe6bac55010f58979c2f9fcf6fe4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
3979706e06
3 files changed
+96
-3
No files matched your search
@@ -23,6 +23,7 @@ import static com.android.launcher3.Utilities.dpiFromPx;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_TRANSIENT_TASKBAR;
|
||||
import static com.android.launcher3.config.FeatureFlags.FORCE_PERSISTENT_TASKBAR;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.appendFlag;
|
||||
import static com.android.launcher3.util.window.WindowManagerProxy.MIN_TABLET_WIDTH;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
@@ -55,6 +56,7 @@ import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* Utility class to cache properties of default display to avoid a system RPC on every call.
|
||||
@@ -66,6 +68,9 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
private static final boolean DEBUG = false;
|
||||
private static boolean sTransientTaskbarStatusForTests;
|
||||
|
||||
// TODO(b/254119092) remove all logs with this tag
|
||||
public static final String TASKBAR_NOT_DESTROYED_TAG = "b/254119092";
|
||||
|
||||
public static final MainThreadInitializedObject<DisplayController> INSTANCE =
|
||||
new MainThreadInitializedObject<>(DisplayController::new);
|
||||
|
||||
@@ -206,6 +211,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
@Override
|
||||
@TargetApi(Build.VERSION_CODES.S)
|
||||
public final void onConfigurationChanged(Configuration config) {
|
||||
Log.d(TASKBAR_NOT_DESTROYED_TAG, "DisplayController#onConfigurationChanged: " + config);
|
||||
Display display = mWindowContext.getDisplay();
|
||||
if (config.densityDpi != mInfo.densityDpi
|
||||
|| config.fontScale != mInfo.fontScale
|
||||
@@ -272,7 +278,7 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
change |= CHANGE_SUPPORTED_BOUNDS;
|
||||
}
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "handleInfoChange - change: 0b" + Integer.toBinaryString(change));
|
||||
Log.d(TAG, "handleInfoChange - change: " + getChangeFlagsString(change));
|
||||
}
|
||||
|
||||
if (change != 0) {
|
||||
@@ -391,6 +397,20 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the given binary flags as a human-readable string.
|
||||
* @see #CHANGE_ALL
|
||||
*/
|
||||
public String getChangeFlagsString(int change) {
|
||||
StringJoiner result = new StringJoiner("|");
|
||||
appendFlag(result, change, CHANGE_ACTIVE_SCREEN, "CHANGE_ACTIVE_SCREEN");
|
||||
appendFlag(result, change, CHANGE_ROTATION, "CHANGE_ROTATION");
|
||||
appendFlag(result, change, CHANGE_DENSITY, "CHANGE_DENSITY");
|
||||
appendFlag(result, change, CHANGE_SUPPORTED_BOUNDS, "CHANGE_SUPPORTED_BOUNDS");
|
||||
appendFlag(result, change, CHANGE_NAVIGATION_MODE, "CHANGE_NAVIGATION_MODE");
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps the current state information
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user