Merge "Update related UI if battery is not present"
This commit is contained in:
committed by
Android (Google) Code Review
commit
76c9a32dbb
@@ -46,6 +46,7 @@ public class ShadowUtils {
|
||||
private static boolean sIsSystemAlertWindowEnabled;
|
||||
private static boolean sIsVoiceCapable;
|
||||
private static ArraySet<String> sResultLinks = new ArraySet<>();
|
||||
private static boolean sIsBatteryPresent;
|
||||
|
||||
@Implementation
|
||||
protected static int enforceSameOwner(Context context, int userId) {
|
||||
@@ -67,6 +68,7 @@ public class ShadowUtils {
|
||||
sIsDemoUser = false;
|
||||
sIsVoiceCapable = false;
|
||||
sResultLinks = new ArraySet<>();
|
||||
sIsBatteryPresent = true;
|
||||
}
|
||||
|
||||
public static void setIsDemoUser(boolean isDemoUser) {
|
||||
@@ -155,4 +157,13 @@ public class ShadowUtils {
|
||||
public static void setHandledDomains(ArraySet<String> links) {
|
||||
sResultLinks = links;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected static boolean isBatteryPresent(Context context) {
|
||||
return sIsBatteryPresent;
|
||||
}
|
||||
|
||||
public static void setIsBatteryPresent(boolean isBatteryPresent) {
|
||||
sIsBatteryPresent = isBatteryPresent;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user