Add NonNull annotation in ActivityManager.

Add NonNull annotation at isActivityStartAllowedOnDisplay.

Fix: 126698001
Test: build pass.

Change-Id: I46b10aeb6b83de284de35863197665da8949928f
This commit is contained in:
wilsonshih
2019-03-08 15:09:53 +08:00
committed by Wei Sheng Shih
parent 62727a76d1
commit 402854484f
2 changed files with 3 additions and 2 deletions

View File

@@ -3944,7 +3944,7 @@ package android.app {
method public android.app.PendingIntent getRunningServiceControlPanel(android.content.ComponentName) throws java.lang.SecurityException;
method @Deprecated public java.util.List<android.app.ActivityManager.RunningServiceInfo> getRunningServices(int) throws java.lang.SecurityException;
method @Deprecated public java.util.List<android.app.ActivityManager.RunningTaskInfo> getRunningTasks(int) throws java.lang.SecurityException;
method public boolean isActivityStartAllowedOnDisplay(android.content.Context, int, android.content.Intent);
method public boolean isActivityStartAllowedOnDisplay(@NonNull android.content.Context, int, @NonNull android.content.Intent);
method public boolean isBackgroundRestricted();
method @Deprecated public boolean isInLockTaskMode();
method public boolean isLowRamDevice();

View File

@@ -2018,7 +2018,8 @@ public class ActivityManager {
* @return {@code true} if a call to start an activity on the target display is allowed for the
* provided context and no {@link SecurityException} will be thrown, {@code false} otherwise.
*/
public boolean isActivityStartAllowedOnDisplay(Context context, int displayId, Intent intent) {
public boolean isActivityStartAllowedOnDisplay(@NonNull Context context, int displayId,
@NonNull Intent intent) {
try {
return getTaskService().isActivityStartAllowedOnDisplay(displayId, intent,
intent.resolveTypeIfNeeded(context.getContentResolver()), context.getUserId());