Changing eventFlags to eventFilter
This is to address the API council feedback Bug: 379313664 Flag: EXEMPT minor change Test: EXEMPT minor change Change-Id: I9f9126b2e9eae3311f9d03d13d201d7518a27a09
This commit is contained in:
@@ -17,10 +17,10 @@ package com.android.settings.connecteddevice.display;
|
|||||||
|
|
||||||
import static android.content.Context.DISPLAY_SERVICE;
|
import static android.content.Context.DISPLAY_SERVICE;
|
||||||
import static android.hardware.display.DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED;
|
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_TYPE_DISPLAY_ADDED;
|
||||||
import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_CHANGED;
|
import static android.hardware.display.DisplayManager.EVENT_TYPE_DISPLAY_CHANGED;
|
||||||
import static android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_REMOVED;
|
import static android.hardware.display.DisplayManager.EVENT_TYPE_DISPLAY_REMOVED;
|
||||||
import static android.hardware.display.DisplayManager.PRIVATE_EVENT_FLAG_DISPLAY_CONNECTION_CHANGED;
|
import static android.hardware.display.DisplayManager.PRIVATE_EVENT_TYPE_DISPLAY_CONNECTION_CHANGED;
|
||||||
import static android.view.Display.INVALID_DISPLAY;
|
import static android.view.Display.INVALID_DISPLAY;
|
||||||
|
|
||||||
import static com.android.server.display.feature.flags.Flags.enableModeLimitForExternalDisplay;
|
import static com.android.server.display.feature.flags.Flags.enableModeLimitForExternalDisplay;
|
||||||
@@ -158,9 +158,9 @@ public class ExternalDisplaySettingsConfiguration {
|
|||||||
if (dm == null) {
|
if (dm == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dm.registerDisplayListener(listener, mHandler, EVENT_FLAG_DISPLAY_ADDED
|
dm.registerDisplayListener(listener, mHandler, EVENT_TYPE_DISPLAY_ADDED
|
||||||
| EVENT_FLAG_DISPLAY_CHANGED | EVENT_FLAG_DISPLAY_REMOVED,
|
| EVENT_TYPE_DISPLAY_CHANGED | EVENT_TYPE_DISPLAY_REMOVED,
|
||||||
PRIVATE_EVENT_FLAG_DISPLAY_CONNECTION_CHANGED);
|
PRIVATE_EVENT_TYPE_DISPLAY_CONNECTION_CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -128,7 +128,7 @@ class BrightnessLevelPreference :
|
|||||||
this,
|
this,
|
||||||
HandlerExecutor.main,
|
HandlerExecutor.main,
|
||||||
/* eventFlags= */ 0,
|
/* eventFlags= */ 0,
|
||||||
DisplayManager.PRIVATE_EVENT_FLAG_DISPLAY_BRIGHTNESS,
|
DisplayManager.PRIVATE_EVENT_TYPE_DISPLAY_BRIGHTNESS,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -134,7 +134,7 @@ public class BrightnessLevelPreferenceController extends BasePreferenceControlle
|
|||||||
public void onStart() {
|
public void onStart() {
|
||||||
mContentResolver.registerContentObserver(BRIGHTNESS_ADJ_URI, false, mBrightnessObserver);
|
mContentResolver.registerContentObserver(BRIGHTNESS_ADJ_URI, false, mBrightnessObserver);
|
||||||
mDisplayManager.registerDisplayListener(mDisplayListener, mHandler, /* eventFlags= */ 0,
|
mDisplayManager.registerDisplayListener(mDisplayListener, mHandler, /* eventFlags= */ 0,
|
||||||
DisplayManager.PRIVATE_EVENT_FLAG_DISPLAY_BRIGHTNESS);
|
DisplayManager.PRIVATE_EVENT_TYPE_DISPLAY_BRIGHTNESS);
|
||||||
updatedSummary(mPreference);
|
updatedSummary(mPreference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user