mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Merge "Put IDP.getDeviceProfile logging behind a feature flag" into tm-qpr-dev am: 0ea0b898a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20469953 Change-Id: I881889a298e38881781d7a8015790fb6b291d059 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.Utilities.dpiFromPx;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_DEVICE_PROFILE_LOGGING;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_TWO_PANEL_HOME;
|
||||
import static com.android.launcher3.testing.shared.ResourceUtils.INVALID_RESOURCE_HANDLE;
|
||||
import static com.android.launcher3.util.DisplayController.CHANGE_DENSITY;
|
||||
@@ -648,7 +649,7 @@ public class InvariantDeviceProfile {
|
||||
float screenHeight = config.screenHeightDp * res.getDisplayMetrics().density;
|
||||
int rotation = WindowManagerProxy.INSTANCE.get(context).getRotation(context);
|
||||
|
||||
if (Utilities.IS_DEBUG_DEVICE) {
|
||||
if (Utilities.IS_DEBUG_DEVICE && ENABLE_DEVICE_PROFILE_LOGGING.get()) {
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
PrintWriter printWriter = new PrintWriter(stringWriter);
|
||||
DisplayController.INSTANCE.get(context).dump(printWriter);
|
||||
|
||||
@@ -339,6 +339,9 @@ public final class FeatureFlags {
|
||||
public static final BooleanFlag ENABLE_TOAST_IMPRESSION_LOGGING = getDebugFlag(
|
||||
"ENABLE_TOAST_IMPRESSION_LOGGING", false, "Enable toast impression logging");
|
||||
|
||||
public static final BooleanFlag ENABLE_DEVICE_PROFILE_LOGGING = new DeviceFlag(
|
||||
"ENABLE_DEVICE_PROFILE_LOGGING", false, "Allows DeviceProfile logging");
|
||||
|
||||
public static void initialize(Context context) {
|
||||
synchronized (sDebugFlags) {
|
||||
for (DebugFlag flag : sDebugFlags) {
|
||||
|
||||
Reference in New Issue
Block a user