You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -56,6 +57,18 @@ class IsActionSupportedUseCaseImpl(
56
57
}
57
58
}
58
59
60
+
if (id ==ActionId.TOGGLE_NIGHT_SHIFT||
61
+
id ==ActionId.ENABLE_NIGHT_SHIFT||
62
+
id ==ActionId.DISABLE_NIGHT_SHIFT
63
+
) {
64
+
// See https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/java/android/hardware/display/ColorDisplayManager.java;l=498;drc=787314ed22d859e510163327dd6c58b215c2f7f9
65
+
val res =Resources.getSystem()
66
+
val resId = res.getIdentifier("config_nightDisplayAvailable", "bool", "android")
67
+
if (resId ==0||!res.getBoolean(resId)) {
68
+
returnKMError.NightDisplayNotSupported
69
+
}
70
+
}
71
+
59
72
if (ActionUtils.getRequiredPermissions(id).contains(Permission.ROOT) &&
0 commit comments