Merge changes from topics "full_dialog_theme", "dialog_fix", "default_car_theme"
* changes:
Add full dialog themes to product overlay
Dialogs were incorrectly parented
Move core colors out of the overlay and then create device default
Initial commit of updated theme changes for automotive products
diff --git a/car-lib/src/android/car/user/CarUserManagerHelper.java b/car-lib/src/android/car/user/CarUserManagerHelper.java
index 94849ee..d752a3e 100644
--- a/car-lib/src/android/car/user/CarUserManagerHelper.java
+++ b/car-lib/src/android/car/user/CarUserManagerHelper.java
@@ -577,14 +577,23 @@
}
/**
+ * Returns whether a user has a restriction.
+ *
+ * @param restriction Restriction to check. Should be a UserManager.* restriction.
+ * @param userInfo the user whose restriction is to be checked
+ */
+ public boolean hasUserRestriction(String restriction, UserInfo userInfo) {
+ return mUserManager.hasUserRestriction(restriction, userInfo.getUserHandle());
+ }
+
+ /**
* Return whether the foreground user has a restriction.
*
* @param restriction Restriction to check. Should be a UserManager.* restriction.
* @return Whether that restriction exists for the foreground user.
*/
public boolean foregroundUserHasUserRestriction(String restriction) {
- return mUserManager.hasUserRestriction(
- restriction, getCurrentForegroundUserInfo().getUserHandle());
+ return hasUserRestriction(restriction, getCurrentForegroundUserInfo());
}
/**
diff --git a/service/Android.mk b/service/Android.mk
index e639d3c..00a699d 100644
--- a/service/Android.mk
+++ b/service/Android.mk
@@ -39,10 +39,10 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_JAVA_LIBRARIES += android.car \
- android.car.user
+LOCAL_JAVA_LIBRARIES += android.car
LOCAL_STATIC_JAVA_LIBRARIES += \
+ android.car.user \
android.hidl.base-V1.0-java \
android.hardware.automotive.audiocontrol-V1.0-java \
android.hardware.automotive.vehicle-V2.0-java \
@@ -69,10 +69,10 @@
LOCAL_MODULE := car-service-lib-for-test
LOCAL_JAVA_LIBRARIES += android.car \
- android.car.user \
car-frameworks-service
LOCAL_STATIC_JAVA_LIBRARIES += \
+ android.car.user \
android.hidl.base-V1.0-java \
android.hardware.automotive.audiocontrol-V1.0-java \
android.hardware.automotive.vehicle-V2.0-java \
diff --git a/service/res/values/config.xml b/service/res/values/config.xml
index 214cf02..8d436e0 100644
--- a/service/res/values/config.xml
+++ b/service/res/values/config.xml
@@ -34,7 +34,7 @@
<string name="inputService">android.car.input.service/.DefaultInputService</string>
- <string name="instrumentClusterRendererService">android.car.cluster.sample/.SampleClusterServiceImpl</string>
+ <string name="instrumentClusterRendererService">android.car.cluster.loggingrenderer/.LoggingClusterRenderingService</string>
<!-- Whether to enable Activity blocking for safety. When Activity blocking is enabled,
only whitelisted safe Activities will be allowed while car is not parked. -->
diff --git a/service/src/com/android/car/CarLocationService.java b/service/src/com/android/car/CarLocationService.java
index 6d5ab7e..e0a55c9 100644
--- a/service/src/com/android/car/CarLocationService.java
+++ b/service/src/com/android/car/CarLocationService.java
@@ -23,7 +23,7 @@
import android.car.hardware.power.CarPowerManager.CarPowerStateListener;
import android.car.hardware.property.CarPropertyEvent;
import android.car.hardware.property.ICarPropertyEventListener;
-import android.car.user.CarUserManagerHelper;
+import android.car.userlib.CarUserManagerHelper;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index c8ecf63..b63b338 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -21,7 +21,7 @@
import android.car.Car;
import android.car.ICar;
import android.car.cluster.renderer.IInstrumentClusterNavigation;
-import android.car.user.CarUserManagerHelper;
+import android.car.userlib.CarUserManagerHelper;
import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.automotive.vehicle.V2_0.IVehicle;
diff --git a/service/src/com/android/car/user/CarUserService.java b/service/src/com/android/car/user/CarUserService.java
index 1c9f839..eebb9d1 100644
--- a/service/src/com/android/car/user/CarUserService.java
+++ b/service/src/com/android/car/user/CarUserService.java
@@ -17,7 +17,7 @@
package com.android.car.user;
import android.annotation.Nullable;
-import android.car.user.CarUserManagerHelper;
+import android.car.userlib.CarUserManagerHelper;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
diff --git a/tests/carservice_unit_test/src/com/android/car/CarLocationServiceTest.java b/tests/carservice_unit_test/src/com/android/car/CarLocationServiceTest.java
index 134e5f2..bee8282 100644
--- a/tests/carservice_unit_test/src/com/android/car/CarLocationServiceTest.java
+++ b/tests/carservice_unit_test/src/com/android/car/CarLocationServiceTest.java
@@ -34,7 +34,7 @@
import android.car.hardware.power.CarPowerManager.CarPowerStateListener;
import android.car.hardware.property.CarPropertyEvent;
import android.car.hardware.property.ICarPropertyEventListener;
-import android.car.user.CarUserManagerHelper;
+import android.car.userlib.CarUserManagerHelper;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
diff --git a/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java b/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java
index fd913bc..df2b2e1 100644
--- a/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java
+++ b/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java
@@ -26,7 +26,7 @@
import static org.mockito.Mockito.verify;
import android.app.ActivityManager;
-import android.car.user.CarUserManagerHelper;
+import android.car.userlib.CarUserManagerHelper;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
diff --git a/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java b/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java
index 74f1a84..addb53c 100644
--- a/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java
+++ b/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java
@@ -22,7 +22,7 @@
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
-import android.car.user.CarUserManagerHelper;
+import android.car.userlib.CarUserManagerHelper;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
diff --git a/tests/robotests/src/com/android/car/users/CarUserManagerHelperRoboTest.java b/tests/robotests/src/com/android/car/users/CarUserManagerHelperRoboTest.java
index fcfd6dc..6a90cdf 100644
--- a/tests/robotests/src/com/android/car/users/CarUserManagerHelperRoboTest.java
+++ b/tests/robotests/src/com/android/car/users/CarUserManagerHelperRoboTest.java
@@ -21,7 +21,7 @@
import static org.mockito.Mockito.when;
import android.app.ActivityManager;
-import android.car.user.CarUserManagerHelper;
+import android.car.userlib.CarUserManagerHelper;
import android.content.Context;
import android.content.pm.UserInfo;
import android.os.UserManager;
diff --git a/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java b/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java
index 96dc0a8..a306d91 100644
--- a/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java
+++ b/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java
@@ -577,14 +577,23 @@
}
/**
+ * Returns whether a user has a restriction.
+ *
+ * @param restriction Restriction to check. Should be a UserManager.* restriction.
+ * @param userInfo the user whose restriction is to be checked
+ */
+ public boolean hasUserRestriction(String restriction, UserInfo userInfo) {
+ return mUserManager.hasUserRestriction(restriction, userInfo.getUserHandle());
+ }
+
+ /**
* Return whether the foreground user has a restriction.
*
* @param restriction Restriction to check. Should be a UserManager.* restriction.
* @return Whether that restriction exists for the foreground user.
*/
public boolean foregroundUserHasUserRestriction(String restriction) {
- return mUserManager.hasUserRestriction(
- restriction, getCurrentForegroundUserInfo().getUserHandle());
+ return hasUserRestriction(restriction, getCurrentForegroundUserInfo());
}
/**