Merge "Revert "Revert "make isUiModeLocked, isNightModeLocked test api""" into nyc-dev

This commit is contained in:
Keun-young Park
2016-03-02 17:12:40 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 4 deletions

View File

@@ -5610,8 +5610,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;

View File

@@ -5742,8 +5742,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;

View File

@@ -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 {