Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java +4 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.car; import static android.content.DialogInterface.BUTTON_NEGATIVE; import static android.content.DialogInterface.BUTTON_POSITIVE; import android.app.ActivityManager; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; Loading Loading @@ -80,7 +81,7 @@ public class UserGridRecyclerView extends RecyclerView { mCarUserManagerHelper = new CarUserManagerHelper(mContext); mUserManager = UserManager.get(mContext); addItemDecoration(new ItemSpacingDecoration(context.getResources().getDimensionPixelSize( addItemDecoration(new ItemSpacingDecoration(mContext.getResources().getDimensionPixelSize( R.dimen.car_user_switcher_vertical_spacing_between_users))); } Loading Loading @@ -140,8 +141,7 @@ public class UserGridRecyclerView extends RecyclerView { continue; } boolean isForeground = mCarUserManagerHelper.getCurrentForegroundUserId() == userInfo.id; boolean isForeground = ActivityManager.getCurrentUser() == userInfo.id; UserRecord record = new UserRecord(userInfo, false /* isStartGuestSession */, false /* isAddUser */, isForeground); userRecords.add(record); Loading @@ -159,7 +159,7 @@ public class UserGridRecyclerView extends RecyclerView { } private UserRecord createForegroundUserRecord() { return new UserRecord(mCarUserManagerHelper.getCurrentForegroundUserInfo(), return new UserRecord(mUserManager.getUserInfo(ActivityManager.getCurrentUser()), false /* isStartGuestSession */, false /* isAddUser */, true /* isForeground */); } Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/privacy/PrivacyApplication.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.systemui.statusbar.car.privacy; import android.car.userlib.CarUserManagerHelper; import android.app.ActivityManager; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; Loading @@ -38,10 +38,9 @@ public class PrivacyApplication { public PrivacyApplication(String packageName, Context context) { mPackageName = packageName; try { CarUserManagerHelper carUserManagerHelper = new CarUserManagerHelper(context); ApplicationInfo app = context.getPackageManager() .getApplicationInfoAsUser(packageName, 0, carUserManagerHelper.getCurrentForegroundUserId()); ActivityManager.getCurrentUser()); mIcon = context.getPackageManager().getApplicationIcon(app); mApplicationName = context.getPackageManager().getApplicationLabel(app).toString(); } catch (PackageManager.NameNotFoundException e) { Loading Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java +4 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.car; import static android.content.DialogInterface.BUTTON_NEGATIVE; import static android.content.DialogInterface.BUTTON_POSITIVE; import android.app.ActivityManager; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; Loading Loading @@ -80,7 +81,7 @@ public class UserGridRecyclerView extends RecyclerView { mCarUserManagerHelper = new CarUserManagerHelper(mContext); mUserManager = UserManager.get(mContext); addItemDecoration(new ItemSpacingDecoration(context.getResources().getDimensionPixelSize( addItemDecoration(new ItemSpacingDecoration(mContext.getResources().getDimensionPixelSize( R.dimen.car_user_switcher_vertical_spacing_between_users))); } Loading Loading @@ -140,8 +141,7 @@ public class UserGridRecyclerView extends RecyclerView { continue; } boolean isForeground = mCarUserManagerHelper.getCurrentForegroundUserId() == userInfo.id; boolean isForeground = ActivityManager.getCurrentUser() == userInfo.id; UserRecord record = new UserRecord(userInfo, false /* isStartGuestSession */, false /* isAddUser */, isForeground); userRecords.add(record); Loading @@ -159,7 +159,7 @@ public class UserGridRecyclerView extends RecyclerView { } private UserRecord createForegroundUserRecord() { return new UserRecord(mCarUserManagerHelper.getCurrentForegroundUserInfo(), return new UserRecord(mUserManager.getUserInfo(ActivityManager.getCurrentUser()), false /* isStartGuestSession */, false /* isAddUser */, true /* isForeground */); } Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/privacy/PrivacyApplication.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.systemui.statusbar.car.privacy; import android.car.userlib.CarUserManagerHelper; import android.app.ActivityManager; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; Loading @@ -38,10 +38,9 @@ public class PrivacyApplication { public PrivacyApplication(String packageName, Context context) { mPackageName = packageName; try { CarUserManagerHelper carUserManagerHelper = new CarUserManagerHelper(context); ApplicationInfo app = context.getPackageManager() .getApplicationInfoAsUser(packageName, 0, carUserManagerHelper.getCurrentForegroundUserId()); ActivityManager.getCurrentUser()); mIcon = context.getPackageManager().getApplicationIcon(app); mApplicationName = context.getPackageManager().getApplicationLabel(app).toString(); } catch (PackageManager.NameNotFoundException e) { Loading