Minor changes on UserHal:
- Explicitly sets DEFAULT mode on result bundle.
- TODOs cleanup
Test: atest CarServicesTest:com.android.internal.car.CarHelperServiceTest \
CarServiceUnitTest:com.android.car.user.CarUserServiceTest
Bug: 150222501
Bug: 146207078
Bug: 150399261
Change-Id: I36c70e1d3b080d5772485d24cfd69bce7c1e8e6c
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 1923d9a..f06d060 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -356,7 +356,7 @@
mCarUserService.onSwitchUser(userId);
}
- // TODO(b/146207078): this method is currently used just for metrics logging purposes, but we
+ // TODO(b/145689885): this method is currently used just for metrics logging purposes, but we
// should fold the other too (onSwitchUser() and setUserLockStatus()) onto it.
@Override
public void onUserLifecycleEvent(int eventType, long timestampMs, int fromUserId,
@@ -1264,7 +1264,7 @@
+ "), timeout=" + timeout);
UserHalService userHal = mHal.getUserHal();
- // TODO(b/146207078): use UserHalHelper to populate it with current users
+ // TODO(b/150413515): use UserHalHelper to populate it with current users
UsersInfo usersInfo = new UsersInfo();
CountDownLatch latch = new CountDownLatch(1);
diff --git a/service/src/com/android/car/hal/UserHalHelper.java b/service/src/com/android/car/hal/UserHalHelper.java
index d5311dc..d5b677d 100644
--- a/service/src/com/android/car/hal/UserHalHelper.java
+++ b/service/src/com/android/car/hal/UserHalHelper.java
@@ -57,7 +57,7 @@
* @throws IllegalArgumentException if type is not valid neither a number
*/
public static int parseInitialUserInfoRequestType(@NonNull String type) {
- // TODO(b/146207078): add unit test
+ // TODO(b/150419600): add unit test
switch(type) {
case "FIRST_BOOT":
return InitialUserInfoRequestType.FIRST_BOOT;
@@ -80,7 +80,7 @@
* Converts Android user flags to HALs.
*/
public static int convertFlags(@NonNull UserInfo user) {
- // TODO(b/146207078): add unit test
+ // TODO(b/150419600): add unit test
int flags = UserFlags.NONE;
if (user.id == UserHandle.USER_SYSTEM) {
flags |= UserFlags.SYSTEM;
diff --git a/service/src/com/android/car/hal/UserHalService.java b/service/src/com/android/car/hal/UserHalService.java
index 1d6dc6f..afe4a87 100644
--- a/service/src/com/android/car/hal/UserHalService.java
+++ b/service/src/com/android/car/hal/UserHalService.java
@@ -62,7 +62,7 @@
private static final String TAG = UserHalService.class.getSimpleName();
- // TODO(b/146207078): STOPSHIP - change to false before R is launched
+ // TODO(b/150413515): STOPSHIP - change to false before R is launched
private static final boolean DBG = true;
private static final int REQUEST_TYPE_GET_INITIAL_INFO = 1;
diff --git a/service/src/com/android/car/user/CarUserService.java b/service/src/com/android/car/user/CarUserService.java
index ed9a59c..fedae06 100644
--- a/service/src/com/android/car/user/CarUserService.java
+++ b/service/src/com/android/car/user/CarUserService.java
@@ -499,7 +499,8 @@
resultData.putString(BUNDLE_USER_NAME, resp.userNameToCreate);
break;
case InitialUserInfoResponseAction.DEFAULT:
- // do nothing
+ resultData = new Bundle();
+ resultData.putInt(BUNDLE_INITIAL_INFO_ACTION, resp.action);
break;
default:
// That's ok, it will be the same as DEFAULT...