make isUiModeLocked, isNightModeLocked test api
bug: 27365818 Change-Id: I2813493bb10f02741bd7c47a144fdc43eced0030
This commit is contained in:
@@ -5609,8 +5609,6 @@ package android.app {
|
||||
method public void enableCarMode(int);
|
||||
method public int getCurrentModeType();
|
||||
method public int getNightMode();
|
||||
method public boolean isNightModeLocked();
|
||||
method public boolean isUiModeLocked();
|
||||
method public void setNightMode(int);
|
||||
field public static java.lang.String ACTION_ENTER_CAR_MODE;
|
||||
field public static java.lang.String ACTION_ENTER_DESK_MODE;
|
||||
|
||||
@@ -5741,8 +5741,6 @@ package android.app {
|
||||
method public void enableCarMode(int);
|
||||
method public int getCurrentModeType();
|
||||
method public int getNightMode();
|
||||
method public boolean isNightModeLocked();
|
||||
method public boolean isUiModeLocked();
|
||||
method public void setNightMode(int);
|
||||
field public static java.lang.String ACTION_ENTER_CAR_MODE;
|
||||
field public static java.lang.String ACTION_ENTER_DESK_MODE;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.app;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.RemoteException;
|
||||
@@ -266,7 +267,9 @@ public class UiModeManager {
|
||||
/**
|
||||
* @return If UI mode is locked or not. When UI mode is locked, calls to change UI mode
|
||||
* like {@link #enableCarMode(int)} will silently fail.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public boolean isUiModeLocked() {
|
||||
if (mService != null) {
|
||||
try {
|
||||
@@ -286,7 +289,9 @@ public class UiModeManager {
|
||||
* mode will fail silently.
|
||||
*
|
||||
* @return {@code true} if night mode is locked or {@code false} otherwise
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public boolean isNightModeLocked() {
|
||||
if (mService != null) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user