Merge "Changed to use the new hidden API." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
5c6c9018a1
@@ -19,8 +19,8 @@ import static android.content.Context.DISPLAY_SERVICE;
|
||||
import static android.hardware.display.DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED;
|
||||
import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_ADDED;
|
||||
import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_CHANGED;
|
||||
import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_CONNECTION_CHANGED;
|
||||
import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_REMOVED;
|
||||
import static android.hardware.display.DisplayManager.PRIVATE_EVENT_FLAG_DISPLAY_CONNECTION_CHANGED;
|
||||
import static android.view.Display.INVALID_DISPLAY;
|
||||
|
||||
import static com.android.server.display.feature.flags.Flags.enableModeLimitForExternalDisplay;
|
||||
@@ -159,8 +159,8 @@ public class ExternalDisplaySettingsConfiguration {
|
||||
return;
|
||||
}
|
||||
dm.registerDisplayListener(listener, mHandler, EVENT_FLAG_DISPLAY_ADDED
|
||||
| EVENT_FLAG_DISPLAY_CHANGED | EVENT_FLAG_DISPLAY_REMOVED
|
||||
| EVENT_FLAG_DISPLAY_CONNECTION_CHANGED);
|
||||
| EVENT_FLAG_DISPLAY_CHANGED | EVENT_FLAG_DISPLAY_REMOVED,
|
||||
PRIVATE_EVENT_FLAG_DISPLAY_CONNECTION_CHANGED);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -133,8 +133,8 @@ public class BrightnessLevelPreferenceController extends BasePreferenceControlle
|
||||
@Override
|
||||
public void onStart() {
|
||||
mContentResolver.registerContentObserver(BRIGHTNESS_ADJ_URI, false, mBrightnessObserver);
|
||||
mDisplayManager.registerDisplayListener(mDisplayListener, mHandler,
|
||||
DisplayManager.EVENT_FLAG_DISPLAY_BRIGHTNESS);
|
||||
mDisplayManager.registerDisplayListener(mDisplayListener, mHandler, /* eventFlags= */ 0,
|
||||
DisplayManager.PRIVATE_EVENT_FLAG_DISPLAY_BRIGHTNESS);
|
||||
updatedSummary(mPreference);
|
||||
}
|
||||
|
||||
|
@@ -107,7 +107,8 @@ class BrightnessLevelRestrictedPreference :
|
||||
context.displayManager.registerDisplayListener(
|
||||
listener,
|
||||
HandlerExecutor.main,
|
||||
DisplayManager.EVENT_FLAG_DISPLAY_BRIGHTNESS,
|
||||
/* eventFlags= */ 0,
|
||||
DisplayManager.PRIVATE_EVENT_FLAG_DISPLAY_BRIGHTNESS,
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user