Merge "Add displayId to DPC logs" into sc-dev

This commit is contained in:
Fiona Campbell
2021-07-21 17:51:27 +00:00
committed by Android (Google) Code Review

View File

@@ -96,7 +96,6 @@ import java.io.PrintWriter;
*/ */
final class DisplayPowerController implements AutomaticBrightnessController.Callbacks, final class DisplayPowerController implements AutomaticBrightnessController.Callbacks,
DisplayWhiteBalanceController.Callbacks { DisplayWhiteBalanceController.Callbacks {
private static final String TAG = "DisplayPowerController";
private static final String SCREEN_ON_BLOCKED_TRACE_NAME = "Screen on blocked"; private static final String SCREEN_ON_BLOCKED_TRACE_NAME = "Screen on blocked";
private static final String SCREEN_OFF_BLOCKED_TRACE_NAME = "Screen off blocked"; private static final String SCREEN_OFF_BLOCKED_TRACE_NAME = "Screen off blocked";
@@ -149,6 +148,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
private static final int REPORTED_TO_POLICY_SCREEN_ON = 2; private static final int REPORTED_TO_POLICY_SCREEN_ON = 2;
private static final int REPORTED_TO_POLICY_SCREEN_TURNING_OFF = 3; private static final int REPORTED_TO_POLICY_SCREEN_TURNING_OFF = 3;
private final String TAG;
private final Object mLock = new Object(); private final Object mLock = new Object();
private final Context mContext; private final Context mContext;
@@ -450,6 +451,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
Runnable onBrightnessChangeRunnable) { Runnable onBrightnessChangeRunnable) {
mLogicalDisplay = logicalDisplay; mLogicalDisplay = logicalDisplay;
mDisplayId = mLogicalDisplay.getDisplayIdLocked(); mDisplayId = mLogicalDisplay.getDisplayIdLocked();
TAG = "DisplayPowerController[" + mDisplayId + "]";
mDisplayDevice = mLogicalDisplay.getPrimaryDisplayDeviceLocked(); mDisplayDevice = mLogicalDisplay.getPrimaryDisplayDeviceLocked();
mUniqueDisplayId = logicalDisplay.getPrimaryDisplayDeviceLocked().getUniqueId(); mUniqueDisplayId = logicalDisplay.getPrimaryDisplayDeviceLocked().getUniqueId();
mHandler = new DisplayControllerHandler(handler.getLooper()); mHandler = new DisplayControllerHandler(handler.getLooper());