Loading core/java/android/content/pm/InstantAppRequest.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.content.pm; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.Intent; import android.os.Bundle; Loading @@ -40,7 +41,7 @@ public final class InstantAppRequest { /** Whether or not the requesting package was an instant app */ public final boolean isRequesterInstantApp; /** ID of the user requesting the instant application */ public final int userId; public final @UserIdInt int userId; /** * Optional extra bundle provided by the source application to the installer for additional * verification. Loading @@ -60,7 +61,7 @@ public final class InstantAppRequest { public InstantAppRequest(AuxiliaryResolveInfo responseObj, Intent origIntent, String resolvedType, String callingPackage, @Nullable String callingFeatureId, boolean isRequesterInstantApp, int userId, Bundle verificationBundle, boolean isRequesterInstantApp, @UserIdInt int userId, Bundle verificationBundle, boolean resolveForStart, @Nullable int[] hostDigestPrefixSecure, @NonNull String token) { this.responseObj = responseObj; Loading packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { CompletableFuture<List<Notification.Action>> smartActionsFuture = mScreenshotSmartActions.getSmartActionsFuture( "", Uri.parse("content://authority/data"), bitmap, smartActionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); true, UserHandle.of(UserHandle.myUserId())); assertNotNull(smartActionsFuture); List<Notification.Action> smartActions = smartActionsFuture.get(5, TimeUnit.MILLISECONDS); assertEquals(Collections.emptyList(), smartActions); Loading Loading @@ -126,7 +126,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { CompletableFuture<List<Notification.Action>> smartActionsFuture = mScreenshotSmartActions.getSmartActionsFuture( "", Uri.parse("content://autority/data"), bitmap, mSmartActionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); true, UserHandle.of(UserHandle.myUserId())); verify(mSmartActionsProvider, never()).getActions(any(), any(), any(), any(), any()); assertNotNull(smartActionsFuture); List<Notification.Action> smartActions = smartActionsFuture.get(5, TimeUnit.MILLISECONDS); Loading @@ -140,7 +140,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { when(bitmap.getConfig()).thenReturn(Bitmap.Config.HARDWARE); mScreenshotSmartActions.getSmartActionsFuture( "", Uri.parse("content://autority/data"), bitmap, mSmartActionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); UserHandle.of(UserHandle.myUserId())); verify(mSmartActionsProvider, times(1)).getActions(any(), any(), any(), any(), any()); } Loading @@ -156,7 +156,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { CompletableFuture<List<Notification.Action>> smartActionsFuture = mScreenshotSmartActions.getSmartActionsFuture("", null, bitmap, actionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); true, UserHandle.of(UserHandle.myUserId())); assertNotNull(smartActionsFuture); List<Notification.Action> smartActions = smartActionsFuture.get(5, TimeUnit.MILLISECONDS); assertEquals(smartActions.size(), 0); Loading services/core/java/com/android/server/pm/InstantAppResolver.java +1 −1 Original line number Diff line number Diff line Loading @@ -380,7 +380,7 @@ public abstract class InstantAppResolver { sanitizeIntent(request.origIntent), // This must only expose the secured version of the host request.hostDigestPrefixSecure, UserHandle.getUserHandleForUid(request.userId), UserHandle.of(request.userId), request.isRequesterInstantApp, request.token ); Loading services/print/java/com/android/server/print/UserState.java +3 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static com.android.internal.util.function.pooled.PooledLambda.obtainMessa import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -132,7 +133,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks, private final Context mContext; private final int mUserId; private final @UserIdInt int mUserId; private final RemotePrintSpooler mSpooler; Loading Loading @@ -650,7 +651,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks, mPrintServiceRecommendationsService = new RemotePrintServiceRecommendationService(mContext, UserHandle.getUserHandleForUid(mUserId), this); UserHandle.of(mUserId), this); } mPrintServiceRecommendationsChangeListenerRecords.add( new ListenerRecord<IRecommendationsChangeListener>(listener) { Loading services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -2624,7 +2624,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { UserHandle.myUserId(), UserManager.RESTRICTION_SOURCE_DEVICE_OWNER)) ).when(getServices().userManager).getUserRestrictionSources( eq(UserManager.DISALLOW_ADJUST_VOLUME), eq(UserHandle.getUserHandleForUid(UserHandle.myUserId()))); eq(UserHandle.of(UserHandle.myUserId()))); intent = dpm.createAdminSupportIntent(UserManager.DISALLOW_ADJUST_VOLUME); assertNotNull(intent); assertEquals(Settings.ACTION_SHOW_ADMIN_SUPPORT_DETAILS, intent.getAction()); Loading Loading
core/java/android/content/pm/InstantAppRequest.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.content.pm; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.Intent; import android.os.Bundle; Loading @@ -40,7 +41,7 @@ public final class InstantAppRequest { /** Whether or not the requesting package was an instant app */ public final boolean isRequesterInstantApp; /** ID of the user requesting the instant application */ public final int userId; public final @UserIdInt int userId; /** * Optional extra bundle provided by the source application to the installer for additional * verification. Loading @@ -60,7 +61,7 @@ public final class InstantAppRequest { public InstantAppRequest(AuxiliaryResolveInfo responseObj, Intent origIntent, String resolvedType, String callingPackage, @Nullable String callingFeatureId, boolean isRequesterInstantApp, int userId, Bundle verificationBundle, boolean isRequesterInstantApp, @UserIdInt int userId, Bundle verificationBundle, boolean resolveForStart, @Nullable int[] hostDigestPrefixSecure, @NonNull String token) { this.responseObj = responseObj; Loading
packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotNotificationSmartActionsTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { CompletableFuture<List<Notification.Action>> smartActionsFuture = mScreenshotSmartActions.getSmartActionsFuture( "", Uri.parse("content://authority/data"), bitmap, smartActionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); true, UserHandle.of(UserHandle.myUserId())); assertNotNull(smartActionsFuture); List<Notification.Action> smartActions = smartActionsFuture.get(5, TimeUnit.MILLISECONDS); assertEquals(Collections.emptyList(), smartActions); Loading Loading @@ -126,7 +126,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { CompletableFuture<List<Notification.Action>> smartActionsFuture = mScreenshotSmartActions.getSmartActionsFuture( "", Uri.parse("content://autority/data"), bitmap, mSmartActionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); true, UserHandle.of(UserHandle.myUserId())); verify(mSmartActionsProvider, never()).getActions(any(), any(), any(), any(), any()); assertNotNull(smartActionsFuture); List<Notification.Action> smartActions = smartActionsFuture.get(5, TimeUnit.MILLISECONDS); Loading @@ -140,7 +140,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { when(bitmap.getConfig()).thenReturn(Bitmap.Config.HARDWARE); mScreenshotSmartActions.getSmartActionsFuture( "", Uri.parse("content://autority/data"), bitmap, mSmartActionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); UserHandle.of(UserHandle.myUserId())); verify(mSmartActionsProvider, times(1)).getActions(any(), any(), any(), any(), any()); } Loading @@ -156,7 +156,7 @@ public class ScreenshotNotificationSmartActionsTest extends SysuiTestCase { CompletableFuture<List<Notification.Action>> smartActionsFuture = mScreenshotSmartActions.getSmartActionsFuture("", null, bitmap, actionsProvider, true, UserHandle.getUserHandleForUid(UserHandle.myUserId())); true, UserHandle.of(UserHandle.myUserId())); assertNotNull(smartActionsFuture); List<Notification.Action> smartActions = smartActionsFuture.get(5, TimeUnit.MILLISECONDS); assertEquals(smartActions.size(), 0); Loading
services/core/java/com/android/server/pm/InstantAppResolver.java +1 −1 Original line number Diff line number Diff line Loading @@ -380,7 +380,7 @@ public abstract class InstantAppResolver { sanitizeIntent(request.origIntent), // This must only expose the secured version of the host request.hostDigestPrefixSecure, UserHandle.getUserHandleForUid(request.userId), UserHandle.of(request.userId), request.isRequesterInstantApp, request.token ); Loading
services/print/java/com/android/server/print/UserState.java +3 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import static com.android.internal.util.function.pooled.PooledLambda.obtainMessa import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -132,7 +133,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks, private final Context mContext; private final int mUserId; private final @UserIdInt int mUserId; private final RemotePrintSpooler mSpooler; Loading Loading @@ -650,7 +651,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks, mPrintServiceRecommendationsService = new RemotePrintServiceRecommendationService(mContext, UserHandle.getUserHandleForUid(mUserId), this); UserHandle.of(mUserId), this); } mPrintServiceRecommendationsChangeListenerRecords.add( new ListenerRecord<IRecommendationsChangeListener>(listener) { Loading
services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -2624,7 +2624,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { UserHandle.myUserId(), UserManager.RESTRICTION_SOURCE_DEVICE_OWNER)) ).when(getServices().userManager).getUserRestrictionSources( eq(UserManager.DISALLOW_ADJUST_VOLUME), eq(UserHandle.getUserHandleForUid(UserHandle.myUserId()))); eq(UserHandle.of(UserHandle.myUserId()))); intent = dpm.createAdminSupportIntent(UserManager.DISALLOW_ADJUST_VOLUME); assertNotNull(intent); assertEquals(Settings.ACTION_SHOW_ADMIN_SUPPORT_DETAILS, intent.getAction()); Loading