Merge "Fail package if explicit health check does not pass"
diff --git a/api/current.txt b/api/current.txt
index 54814c7..7b04dde 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -768,6 +768,7 @@
field public static final int indicatorRight = 16843022; // 0x101010e
field public static final int indicatorStart = 16843729; // 0x10103d1
field public static final int inflatedId = 16842995; // 0x10100f3
+ field public static final int inheritShowWhenLocked = 16844194; // 0x10105a2
field public static final int initOrder = 16842778; // 0x101001a
field public static final int initialKeyguardLayout = 16843714; // 0x10103c2
field public static final int initialLayout = 16843345; // 0x1010251
@@ -3850,6 +3851,7 @@
method public final void setFeatureDrawableUri(int, android.net.Uri);
method public void setFinishOnTouchOutside(boolean);
method public void setImmersive(boolean);
+ method public void setInheritShowWhenLocked(boolean);
method public void setIntent(android.content.Intent);
method public final void setMediaController(android.media.session.MediaController);
method public void setPictureInPictureParams(@NonNull android.app.PictureInPictureParams);
@@ -6490,7 +6492,7 @@
}
public interface ZygotePreload {
- method public void doPreload(android.content.pm.ApplicationInfo);
+ method public void doPreload(@NonNull android.content.pm.ApplicationInfo);
}
}
diff --git a/api/system-current.txt b/api/system-current.txt
index b831785..823e934 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -211,7 +211,6 @@
public static final class R.attr {
field public static final int allowClearUserDataOnFailedRestore = 16844198; // 0x10105a6
- field public static final int inheritShowWhenLocked = 16844194; // 0x10105a2
field public static final int isVrOnly = 16844152; // 0x1010578
field public static final int requiredSystemPropertyName = 16844133; // 0x1010565
field public static final int requiredSystemPropertyValue = 16844134; // 0x1010566
@@ -281,7 +280,6 @@
method public boolean convertToTranslucent(android.app.Activity.TranslucentConversionListener, android.app.ActivityOptions);
method @Deprecated public boolean isBackgroundVisibleBehind();
method @Deprecated public void onBackgroundVisibleBehindChanged(boolean);
- method public void setInheritShowWhenLocked(boolean);
}
public static interface Activity.TranslucentConversionListener {
@@ -6191,8 +6189,8 @@
}
public class DeviceIdAttestationException extends java.lang.Exception {
- ctor public DeviceIdAttestationException(String);
- ctor public DeviceIdAttestationException(String, Throwable);
+ ctor public DeviceIdAttestationException(@Nullable String);
+ ctor public DeviceIdAttestationException(@Nullable String, @Nullable Throwable);
}
}
diff --git a/api/test-current.txt b/api/test-current.txt
index b220325..8b1e8c2 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -41,7 +41,6 @@
public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback {
method public void onMovedToDisplay(int, android.content.res.Configuration);
- method public void setInheritShowWhenLocked(boolean);
}
public class ActivityManager {
@@ -2101,8 +2100,8 @@
}
public class DeviceIdAttestationException extends java.lang.Exception {
- ctor public DeviceIdAttestationException(String);
- ctor public DeviceIdAttestationException(String, Throwable);
+ ctor public DeviceIdAttestationException(@Nullable String);
+ ctor public DeviceIdAttestationException(@Nullable String, @Nullable Throwable);
}
public static final class KeyGenParameterSpec.Builder {
diff --git a/config/hiddenapi-greylist.txt b/config/hiddenapi-greylist.txt
index 9b0e657..8ed07b1 100644
--- a/config/hiddenapi-greylist.txt
+++ b/config/hiddenapi-greylist.txt
@@ -5,21 +5,10 @@
Landroid/accounts/IAccountAuthenticator$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Landroid/accounts/IAccountAuthenticator$Stub;-><init>()V
Landroid/accounts/IAccountAuthenticator$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountAuthenticator;
-Landroid/accounts/IAccountAuthenticator;->addAccount(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)V
-Landroid/accounts/IAccountAuthenticator;->confirmCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)V
-Landroid/accounts/IAccountAuthenticator;->editProperties(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
-Landroid/accounts/IAccountAuthenticator;->getAccountRemovalAllowed(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;)V
-Landroid/accounts/IAccountAuthenticator;->getAuthToken(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
-Landroid/accounts/IAccountAuthenticator;->getAuthTokenLabel(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
-Landroid/accounts/IAccountAuthenticator;->hasFeatures(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;[Ljava/lang/String;)V
-Landroid/accounts/IAccountAuthenticator;->updateCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
Landroid/accounts/IAccountAuthenticatorResponse$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/accounts/IAccountAuthenticatorResponse$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Landroid/accounts/IAccountAuthenticatorResponse$Stub;-><init>()V
Landroid/accounts/IAccountAuthenticatorResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountAuthenticatorResponse;
-Landroid/accounts/IAccountAuthenticatorResponse;->onError(ILjava/lang/String;)V
-Landroid/accounts/IAccountAuthenticatorResponse;->onRequestContinued()V
-Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
Landroid/accounts/IAccountManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/accounts/IAccountManager$Stub;-><init>()V
Landroid/accounts/IAccountManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManager;
@@ -27,8 +16,6 @@
Landroid/accounts/IAccountManagerResponse$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Landroid/accounts/IAccountManagerResponse$Stub;-><init>()V
Landroid/accounts/IAccountManagerResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManagerResponse;
-Landroid/accounts/IAccountManagerResponse;->onError(ILjava/lang/String;)V
-Landroid/accounts/IAccountManagerResponse;->onResult(Landroid/os/Bundle;)V
Landroid/app/ActivityManagerNative;-><init>()V
Landroid/app/ActivityThread$AppBindData;-><init>()V
Landroid/app/ActivityThread$CreateServiceData;-><init>()V
@@ -39,7 +26,6 @@
Landroid/app/backup/IBackupManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/backup/IBackupManager;
Landroid/app/backup/IFullBackupRestoreObserver$Stub;-><init>()V
Landroid/app/backup/IRestoreObserver$Stub;-><init>()V
-Landroid/app/DownloadManager;->restartDownload([J)V
Landroid/app/IActivityController$Stub;-><init>()V
Landroid/app/IActivityManager$Stub$Proxy;->getConfiguration()Landroid/content/res/Configuration;
Landroid/app/IActivityManager$Stub$Proxy;->getLaunchedFromUid(Landroid/os/IBinder;)I
@@ -49,156 +35,33 @@
Landroid/app/IActivityManager$Stub$Proxy;->setActivityController(Landroid/app/IActivityController;Z)V
Landroid/app/IActivityManager$Stub$Proxy;->updatePersistentConfiguration(Landroid/content/res/Configuration;)V
Landroid/app/IActivityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IActivityManager;
-Landroid/app/IActivityManager;->bindService(Landroid/app/IApplicationThread;Landroid/os/IBinder;Landroid/content/Intent;Ljava/lang/String;Landroid/app/IServiceConnection;ILjava/lang/String;I)I
-Landroid/app/IActivityManager;->broadcastIntent(Landroid/app/IApplicationThread;Landroid/content/Intent;Ljava/lang/String;Landroid/content/IIntentReceiver;ILjava/lang/String;Landroid/os/Bundle;[Ljava/lang/String;ILandroid/os/Bundle;ZZI)I
-Landroid/app/IActivityManager;->cancelRecentsAnimation(Z)V
-Landroid/app/IActivityManager;->cancelTaskWindowTransition(I)V
-Landroid/app/IActivityManager;->checkPermission(Ljava/lang/String;II)I
-Landroid/app/IActivityManager;->closeSystemDialogs(Ljava/lang/String;)V
-Landroid/app/IActivityManager;->finishActivity(Landroid/os/IBinder;ILandroid/content/Intent;I)Z
-Landroid/app/IActivityManager;->finishHeavyWeightApp()V
Landroid/app/IActivityManager;->finishReceiver(Landroid/os/IBinder;ILjava/lang/String;Landroid/os/Bundle;ZI)V
-Landroid/app/IActivityManager;->forceStopPackage(Ljava/lang/String;I)V
-Landroid/app/IActivityManager;->getAllStackInfos()Ljava/util/List;
-Landroid/app/IActivityManager;->getConfiguration()Landroid/content/res/Configuration;
-Landroid/app/IActivityManager;->getCurrentUser()Landroid/content/pm/UserInfo;
-Landroid/app/IActivityManager;->getFilteredTasks(III)Ljava/util/List;
-Landroid/app/IActivityManager;->getIntentForIntentSender(Landroid/content/IIntentSender;)Landroid/content/Intent;
-Landroid/app/IActivityManager;->getIntentSender(ILjava/lang/String;Landroid/os/IBinder;Ljava/lang/String;I[Landroid/content/Intent;[Ljava/lang/String;ILandroid/os/Bundle;I)Landroid/content/IIntentSender;
-Landroid/app/IActivityManager;->getLaunchedFromPackage(Landroid/os/IBinder;)Ljava/lang/String;
-Landroid/app/IActivityManager;->getLaunchedFromUid(Landroid/os/IBinder;)I
-Landroid/app/IActivityManager;->getLockTaskModeState()I
-Landroid/app/IActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
-Landroid/app/IActivityManager;->getPackageProcessState(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/app/IActivityManager;->getProcessLimit()I
-Landroid/app/IActivityManager;->getProcessMemoryInfo([I)[Landroid/os/Debug$MemoryInfo;
-Landroid/app/IActivityManager;->getProcessPss([I)[J
-Landroid/app/IActivityManager;->getProviderMimeType(Landroid/net/Uri;I)Ljava/lang/String;
-Landroid/app/IActivityManager;->getRecentTasks(III)Landroid/content/pm/ParceledListSlice;
-Landroid/app/IActivityManager;->getRunningAppProcesses()Ljava/util/List;
-Landroid/app/IActivityManager;->getServices(II)Ljava/util/List;
-Landroid/app/IActivityManager;->getTaskBounds(I)Landroid/graphics/Rect;
-Landroid/app/IActivityManager;->getTaskForActivity(Landroid/os/IBinder;Z)I
-Landroid/app/IActivityManager;->getTaskSnapshot(IZ)Landroid/app/ActivityManager$TaskSnapshot;
-Landroid/app/IActivityManager;->handleApplicationStrictModeViolation(Landroid/os/IBinder;ILandroid/os/StrictMode$ViolationInfo;)V
-Landroid/app/IActivityManager;->hang(Landroid/os/IBinder;Z)V
-Landroid/app/IActivityManager;->isInLockTaskMode()Z
-Landroid/app/IActivityManager;->isIntentSenderAnActivity(Landroid/content/IIntentSender;)Z
-Landroid/app/IActivityManager;->isTopOfTask(Landroid/os/IBinder;)Z
-Landroid/app/IActivityManager;->isUserRunning(II)Z
-Landroid/app/IActivityManager;->killAllBackgroundProcesses()V
-Landroid/app/IActivityManager;->killBackgroundProcesses(Ljava/lang/String;I)V
-Landroid/app/IActivityManager;->moveActivityTaskToBack(Landroid/os/IBinder;Z)Z
-Landroid/app/IActivityManager;->moveTaskToFront(IILandroid/os/Bundle;)V
-Landroid/app/IActivityManager;->moveTaskToStack(IIZ)V
-Landroid/app/IActivityManager;->moveTopActivityToPinnedStack(ILandroid/graphics/Rect;)Z
-Landroid/app/IActivityManager;->positionTaskInStack(III)V
-Landroid/app/IActivityManager;->profileControl(Ljava/lang/String;IZLandroid/app/ProfilerInfo;I)Z
-Landroid/app/IActivityManager;->publishContentProviders(Landroid/app/IApplicationThread;Ljava/util/List;)V
-Landroid/app/IActivityManager;->registerProcessObserver(Landroid/app/IProcessObserver;)V
-Landroid/app/IActivityManager;->registerReceiver(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/IIntentReceiver;Landroid/content/IntentFilter;Ljava/lang/String;II)Landroid/content/Intent;
-Landroid/app/IActivityManager;->registerTaskStackListener(Landroid/app/ITaskStackListener;)V
-Landroid/app/IActivityManager;->registerUserSwitchObserver(Landroid/app/IUserSwitchObserver;Ljava/lang/String;)V
-Landroid/app/IActivityManager;->removeContentProviderExternal(Ljava/lang/String;Landroid/os/IBinder;)V
-Landroid/app/IActivityManager;->removeStack(I)V
-Landroid/app/IActivityManager;->removeTask(I)Z
-Landroid/app/IActivityManager;->requestBugReport(I)V
-Landroid/app/IActivityManager;->resizeDockedStack(Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
-Landroid/app/IActivityManager;->resizeStack(ILandroid/graphics/Rect;ZZZI)V
-Landroid/app/IActivityManager;->resizeTask(ILandroid/graphics/Rect;I)V
-Landroid/app/IActivityManager;->restart()V
-Landroid/app/IActivityManager;->resumeAppSwitches()V
-Landroid/app/IActivityManager;->sendIdleJobTrigger()V
Landroid/app/IActivityManager;->serviceDoneExecuting(Landroid/os/IBinder;III)V
-Landroid/app/IActivityManager;->setActivityController(Landroid/app/IActivityController;Z)V
-Landroid/app/IActivityManager;->setAlwaysFinish(Z)V
-Landroid/app/IActivityManager;->setDebugApp(Ljava/lang/String;ZZ)V
-Landroid/app/IActivityManager;->setDumpHeapDebugLimit(Ljava/lang/String;IJLjava/lang/String;)V
-Landroid/app/IActivityManager;->setPackageScreenCompatMode(Ljava/lang/String;I)V
-Landroid/app/IActivityManager;->setProcessImportant(Landroid/os/IBinder;IZLjava/lang/String;)V
-Landroid/app/IActivityManager;->setProcessLimit(I)V
-Landroid/app/IActivityManager;->setProcessMemoryTrimLevel(Ljava/lang/String;II)Z
-Landroid/app/IActivityManager;->setRequestedOrientation(Landroid/os/IBinder;I)V
-Landroid/app/IActivityManager;->setTaskResizeable(II)V
-Landroid/app/IActivityManager;->shutdown(I)Z
-Landroid/app/IActivityManager;->startActivity(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/Intent;Ljava/lang/String;Landroid/os/IBinder;Ljava/lang/String;IILandroid/app/ProfilerInfo;Landroid/os/Bundle;)I
-Landroid/app/IActivityManager;->startActivityAsUser(Landroid/app/IApplicationThread;Ljava/lang/String;Landroid/content/Intent;Ljava/lang/String;Landroid/os/IBinder;Ljava/lang/String;IILandroid/app/ProfilerInfo;Landroid/os/Bundle;I)I
-Landroid/app/IActivityManager;->startActivityFromRecents(ILandroid/os/Bundle;)I
-Landroid/app/IActivityManager;->startBinderTracking()Z
-Landroid/app/IActivityManager;->startInstrumentation(Landroid/content/ComponentName;Ljava/lang/String;ILandroid/os/Bundle;Landroid/app/IInstrumentationWatcher;Landroid/app/IUiAutomationConnection;ILjava/lang/String;)Z
-Landroid/app/IActivityManager;->startRecentsActivity(Landroid/content/Intent;Landroid/app/IAssistDataReceiver;Landroid/view/IRecentsAnimationRunner;)V
-Landroid/app/IActivityManager;->startSystemLockTaskMode(I)V
-Landroid/app/IActivityManager;->startUserInBackground(I)Z
-Landroid/app/IActivityManager;->stopAppSwitches()V
-Landroid/app/IActivityManager;->stopBinderTrackingAndDump(Landroid/os/ParcelFileDescriptor;)Z
-Landroid/app/IActivityManager;->stopService(Landroid/app/IApplicationThread;Landroid/content/Intent;Ljava/lang/String;I)I
-Landroid/app/IActivityManager;->stopUser(IZLandroid/app/IStopUserCallback;)I
-Landroid/app/IActivityManager;->suppressResizeConfigChanges(Z)V
-Landroid/app/IActivityManager;->switchUser(I)Z
-Landroid/app/IActivityManager;->unbindService(Landroid/app/IServiceConnection;)Z
-Landroid/app/IActivityManager;->unhandledBack()V
-Landroid/app/IActivityManager;->unlockUser(I[B[BLandroid/os/IProgressListener;)Z
-Landroid/app/IActivityManager;->unregisterProcessObserver(Landroid/app/IProcessObserver;)V
-Landroid/app/IActivityManager;->unregisterReceiver(Landroid/content/IIntentReceiver;)V
-Landroid/app/IActivityManager;->unstableProviderDied(Landroid/os/IBinder;)V
-Landroid/app/IActivityManager;->updateConfiguration(Landroid/content/res/Configuration;)Z
-Landroid/app/IActivityManager;->updatePersistentConfiguration(Landroid/content/res/Configuration;)V
Landroid/app/IAlarmManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/app/IAlarmManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IAlarmManager;
Landroid/app/IAlarmManager$Stub;->TRANSACTION_remove:I
Landroid/app/IAlarmManager$Stub;->TRANSACTION_set:I
-Landroid/app/IAlarmManager;->getNextAlarmClock(I)Landroid/app/AlarmManager$AlarmClockInfo;
-Landroid/app/IAlarmManager;->set(Ljava/lang/String;IJJJILandroid/app/PendingIntent;Landroid/app/IAlarmListener;Ljava/lang/String;Landroid/os/WorkSource;Landroid/app/AlarmManager$AlarmClockInfo;)V
-Landroid/app/IAlarmManager;->setTime(J)Z
-Landroid/app/IApplicationThread;->scheduleBindService(Landroid/os/IBinder;Landroid/content/Intent;ZI)V
-Landroid/app/IApplicationThread;->scheduleCreateService(Landroid/os/IBinder;Landroid/content/pm/ServiceInfo;Landroid/content/res/CompatibilityInfo;I)V
-Landroid/app/IApplicationThread;->scheduleStopService(Landroid/os/IBinder;)V
-Landroid/app/IApplicationThread;->scheduleTrimMemory(I)V
-Landroid/app/IApplicationThread;->scheduleUnbindService(Landroid/os/IBinder;Landroid/content/Intent;)V
-Landroid/app/IAppTask;->getTaskInfo()Landroid/app/ActivityManager$RecentTaskInfo;
Landroid/app/IAssistDataReceiver$Stub;-><init>()V
-Landroid/app/IAssistDataReceiver;->onHandleAssistData(Landroid/os/Bundle;)V
-Landroid/app/IAssistDataReceiver;->onHandleAssistScreenshot(Landroid/graphics/Bitmap;)V
Landroid/app/IInstrumentationWatcher$Stub;-><init>()V
-Landroid/app/IInstrumentationWatcher;->instrumentationStatus(Landroid/content/ComponentName;ILandroid/os/Bundle;)V
Landroid/app/INotificationManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/app/INotificationManager$Stub$Proxy;->areNotificationsEnabledForPackage(Ljava/lang/String;I)Z
Landroid/app/INotificationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/INotificationManager;
Landroid/app/INotificationManager$Stub;->TRANSACTION_enqueueNotificationWithTag:I
-Landroid/app/INotificationManager;->areNotificationsEnabledForPackage(Ljava/lang/String;I)Z
-Landroid/app/INotificationManager;->cancelAllNotifications(Ljava/lang/String;I)V
-Landroid/app/INotificationManager;->cancelNotificationWithTag(Ljava/lang/String;Ljava/lang/String;II)V
-Landroid/app/INotificationManager;->cancelToast(Ljava/lang/String;Landroid/app/ITransientNotification;)V
-Landroid/app/INotificationManager;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;II)V
-Landroid/app/INotificationManager;->getActiveNotifications(Ljava/lang/String;)[Landroid/service/notification/StatusBarNotification;
-Landroid/app/INotificationManager;->getHistoricalNotifications(Ljava/lang/String;I)[Landroid/service/notification/StatusBarNotification;
-Landroid/app/INotificationManager;->getZenMode()I
-Landroid/app/INotificationManager;->getZenModeConfig()Landroid/service/notification/ZenModeConfig;
Landroid/app/IProcessObserver$Stub;-><init>()V
Landroid/app/ISearchManager$Stub$Proxy;->getGlobalSearchActivity()Landroid/content/ComponentName;
Landroid/app/ISearchManager$Stub$Proxy;->getWebSearchActivity()Landroid/content/ComponentName;
Landroid/app/ISearchManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/ISearchManager;
-Landroid/app/ISearchManager;->getGlobalSearchActivity()Landroid/content/ComponentName;
Landroid/app/IServiceConnection$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/app/IServiceConnection$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Landroid/app/IServiceConnection$Stub;-><init>()V
Landroid/app/IServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IServiceConnection;
-Landroid/app/IServiceConnection;->connected(Landroid/content/ComponentName;Landroid/os/IBinder;Z)V
Landroid/app/IStopUserCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/app/IStopUserCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Landroid/app/IStopUserCallback$Stub;-><init>()V
-Landroid/app/IStopUserCallback;->userStopped(I)V
Landroid/app/ITransientNotification$Stub;-><init>()V
-Landroid/app/ITransientNotification;->show(Landroid/os/IBinder;)V
Landroid/app/IUiModeManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/app/IUserSwitchObserver$Stub;-><init>()V
Landroid/app/IWallpaperManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IWallpaperManager;
-Landroid/app/IWallpaperManager;->getHeightHint(I)I
-Landroid/app/IWallpaperManager;->getWallpaper(Ljava/lang/String;Landroid/app/IWallpaperManagerCallback;ILandroid/os/Bundle;I)Landroid/os/ParcelFileDescriptor;
-Landroid/app/IWallpaperManager;->getWallpaperInfo(I)Landroid/app/WallpaperInfo;
-Landroid/app/IWallpaperManager;->getWidthHint(I)I
-Landroid/app/IWallpaperManager;->hasNamedWallpaper(Ljava/lang/String;)Z
-Landroid/app/IWallpaperManager;->setWallpaperComponent(Landroid/content/ComponentName;)V
Landroid/app/IWallpaperManagerCallback$Stub;-><init>()V
Landroid/app/job/IJobCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/app/job/IJobCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
@@ -212,7 +75,6 @@
Landroid/app/job/IJobService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobService;
Landroid/app/PackageDeleteObserver;-><init>()V
Landroid/app/PackageInstallObserver;-><init>()V
-Landroid/app/ReceiverRestrictedContext;-><init>(Landroid/content/Context;)V
Landroid/app/ResourcesManager$ActivityResources;-><init>()V
Landroid/app/ResourcesManager;-><init>()V
Landroid/app/TaskStackListener;-><init>()V
diff --git a/core/java/android/accounts/IAccountAuthenticator.aidl b/core/java/android/accounts/IAccountAuthenticator.aidl
index 8b98ca2..701cecf 100644
--- a/core/java/android/accounts/IAccountAuthenticator.aidl
+++ b/core/java/android/accounts/IAccountAuthenticator.aidl
@@ -28,47 +28,55 @@
/**
* prompts the user for account information and adds the result to the IAccountManager
*/
+ @UnsupportedAppUsage
void addAccount(in IAccountAuthenticatorResponse response, String accountType,
String authTokenType, in String[] requiredFeatures, in Bundle options);
/**
* prompts the user for the credentials of the account
*/
+ @UnsupportedAppUsage
void confirmCredentials(in IAccountAuthenticatorResponse response, in Account account,
in Bundle options);
/**
* gets the password by either prompting the user or querying the IAccountManager
*/
+ @UnsupportedAppUsage
void getAuthToken(in IAccountAuthenticatorResponse response, in Account account,
String authTokenType, in Bundle options);
/**
* Gets the user-visible label of the given authtoken type.
*/
+ @UnsupportedAppUsage
void getAuthTokenLabel(in IAccountAuthenticatorResponse response, String authTokenType);
/**
* prompts the user for a new password and writes it to the IAccountManager
*/
+ @UnsupportedAppUsage
void updateCredentials(in IAccountAuthenticatorResponse response, in Account account,
String authTokenType, in Bundle options);
/**
* launches an activity that lets the user edit and set the properties for an authenticator
*/
+ @UnsupportedAppUsage
void editProperties(in IAccountAuthenticatorResponse response, String accountType);
/**
* returns a Bundle where the boolean value BOOLEAN_RESULT_KEY is set if the account has the
* specified features
*/
+ @UnsupportedAppUsage
void hasFeatures(in IAccountAuthenticatorResponse response, in Account account,
in String[] features);
/**
* Gets whether or not the account is allowed to be removed.
*/
+ @UnsupportedAppUsage
void getAccountRemovalAllowed(in IAccountAuthenticatorResponse response, in Account account);
/**
diff --git a/core/java/android/accounts/IAccountAuthenticatorResponse.aidl b/core/java/android/accounts/IAccountAuthenticatorResponse.aidl
index 0c75e50..fbc8e5d 100644
--- a/core/java/android/accounts/IAccountAuthenticatorResponse.aidl
+++ b/core/java/android/accounts/IAccountAuthenticatorResponse.aidl
@@ -22,7 +22,10 @@
* @hide
*/
oneway interface IAccountAuthenticatorResponse {
+ @UnsupportedAppUsage
void onResult(in Bundle value);
+ @UnsupportedAppUsage
void onRequestContinued();
+ @UnsupportedAppUsage
void onError(int errorCode, String errorMessage);
}
diff --git a/core/java/android/accounts/IAccountManagerResponse.aidl b/core/java/android/accounts/IAccountManagerResponse.aidl
index ca1203d..11d0c02 100644
--- a/core/java/android/accounts/IAccountManagerResponse.aidl
+++ b/core/java/android/accounts/IAccountManagerResponse.aidl
@@ -22,6 +22,8 @@
* @hide
*/
oneway interface IAccountManagerResponse {
+ @UnsupportedAppUsage
void onResult(in Bundle value);
+ @UnsupportedAppUsage
void onError(int errorCode, String errorMessage);
}
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 68b2de4..d1d4bd5 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -8366,11 +8366,8 @@
* screen when this activity has another activity behind it with
* the showWhenLock attribute set; {@code false} otherwise.
* @see #setShowWhenLocked(boolean)
- * See android.R.attr#inheritShowWhenLocked
- * @hide
+ * @see android.R.attr#inheritShowWhenLocked
*/
- @SystemApi
- @TestApi
public void setInheritShowWhenLocked(boolean inheritShowWhenLocked) {
try {
ActivityTaskManager.getService().setInheritShowWhenLocked(
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index b607f9a..daf2366 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -102,6 +102,7 @@
import java.util.concurrent.Executor;
class ReceiverRestrictedContext extends ContextWrapper {
+ @UnsupportedAppUsage
ReceiverRestrictedContext(Context base) {
super(base);
}
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index e20c490..7ae88fd 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -1158,6 +1158,7 @@
* @param ids the IDs of the downloads
* @hide
*/
+ @UnsupportedAppUsage
public void restartDownload(long... ids) {
Cursor cursor = query(new Query().setFilterById(ids));
try {
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 5cbb599..16fe7db 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -102,15 +102,21 @@
// Special low-level communication with activity manager.
void handleApplicationCrash(in IBinder app,
in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
+ @UnsupportedAppUsage
int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
int flags, in ProfilerInfo profilerInfo, in Bundle options);
+ @UnsupportedAppUsage
void unhandledBack();
+ @UnsupportedAppUsage
boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
+ @UnsupportedAppUsage
Intent registerReceiver(in IApplicationThread caller, in String callerPackage,
in IIntentReceiver receiver, in IntentFilter filter,
in String requiredPermission, int userId, int flags);
+ @UnsupportedAppUsage
void unregisterReceiver(in IIntentReceiver receiver);
+ @UnsupportedAppUsage
int broadcastIntent(in IApplicationThread caller, in Intent intent,
in String resolvedType, in IIntentReceiver resultTo, int resultCode,
in String resultData, in Bundle map, in String[] requiredPermissions,
@@ -120,21 +126,27 @@
boolean abortBroadcast, int flags);
void attachApplication(in IApplicationThread app, long startSeq);
List<ActivityManager.RunningTaskInfo> getTasks(int maxNum);
+ @UnsupportedAppUsage
List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType,
int ignoreWindowingMode);
+ @UnsupportedAppUsage
void moveTaskToFront(int task, int flags, in Bundle options);
+ @UnsupportedAppUsage
int getTaskForActivity(in IBinder token, in boolean onlyRoot);
ContentProviderHolder getContentProvider(in IApplicationThread caller, in String callingPackage,
in String name, int userId, boolean stable);
+ @UnsupportedAppUsage
void publishContentProviders(in IApplicationThread caller,
in List<ContentProviderHolder> providers);
boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta);
PendingIntent getRunningServiceControlPanel(in ComponentName service);
ComponentName startService(in IApplicationThread caller, in Intent service,
in String resolvedType, boolean requireForeground, in String callingPackage, int userId);
+ @UnsupportedAppUsage
int stopService(in IApplicationThread caller, in Intent service,
in String resolvedType, int userId);
// Currently keeping old bindService because it is on the greylist
+ @UnsupportedAppUsage
int bindService(in IApplicationThread caller, in IBinder token, in Intent service,
in String resolvedType, in IServiceConnection connection, int flags,
in String callingPackage, int userId);
@@ -142,11 +154,15 @@
in String resolvedType, in IServiceConnection connection, int flags,
in String instanceName, in String callingPackage, int userId);
void updateServiceGroup(in IServiceConnection connection, int group, int importance);
+ @UnsupportedAppUsage
boolean unbindService(in IServiceConnection connection);
void publishService(in IBinder token, in Intent intent, in IBinder service);
+ @UnsupportedAppUsage
void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent);
void setAgentApp(in String packageName, @nullable String agent);
+ @UnsupportedAppUsage
void setAlwaysFinish(boolean enabled);
+ @UnsupportedAppUsage
boolean startInstrumentation(in ComponentName className, in String profileFile,
int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
in IUiAutomationConnection connection, int userId,
@@ -159,6 +175,7 @@
* system. Corresponds to the configuration of the default display.
* @throws RemoteException
*/
+ @UnsupportedAppUsage
Configuration getConfiguration();
/**
* Updates global configuration and applies changes to the entire system.
@@ -167,10 +184,14 @@
* @throws RemoteException
* @return Returns true if the configuration was updated.
*/
+ @UnsupportedAppUsage
boolean updateConfiguration(in Configuration values);
boolean stopServiceToken(in ComponentName className, in IBinder token, int startId);
+ @UnsupportedAppUsage
void setProcessLimit(int max);
+ @UnsupportedAppUsage
int getProcessLimit();
+ @UnsupportedAppUsage
int checkPermission(in String permission, int pid, int uid);
int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId,
in IBinder callerToken);
@@ -178,6 +199,7 @@
int mode, int userId);
void revokeUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
int mode, int userId);
+ @UnsupportedAppUsage
void setActivityController(in IActivityController watcher, boolean imAMonkey);
void showWaitingForDebugger(in IApplicationThread who, boolean waiting);
/*
@@ -186,8 +208,10 @@
*/
void signalPersistentProcesses(int signal);
+ @UnsupportedAppUsage
ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res);
+ @UnsupportedAppUsage
IIntentSender getIntentSender(int type, in String packageName, in IBinder token,
in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes,
int flags, in Bundle options, int userId);
@@ -199,28 +223,39 @@
void noteWakeupAlarm(in IIntentSender sender, in WorkSource workSource, int sourceUid,
in String sourcePkg, in String tag);
void removeContentProvider(in IBinder connection, boolean stable);
+ @UnsupportedAppUsage
void setRequestedOrientation(in IBinder token, int requestedOrientation);
void unbindFinished(in IBinder token, in Intent service, boolean doRebind);
+ @UnsupportedAppUsage
void setProcessImportant(in IBinder token, int pid, boolean isForeground, String reason);
void setServiceForeground(in ComponentName className, in IBinder token,
int id, in Notification notification, int flags, int foregroundServiceType);
int getForegroundServiceType(in ComponentName className, in IBinder token);
+ @UnsupportedAppUsage
boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
+ @UnsupportedAppUsage
void getMemoryInfo(out ActivityManager.MemoryInfo outInfo);
List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
boolean clearApplicationUserData(in String packageName, boolean keepState,
in IPackageDataObserver observer, int userId);
+ @UnsupportedAppUsage
void forceStopPackage(in String packageName, int userId);
boolean killPids(in int[] pids, in String reason, boolean secure);
+ @UnsupportedAppUsage
List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags);
// Retrieve running application processes in the system
+ @UnsupportedAppUsage
List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
IBinder peekService(in Intent service, in String resolvedType, in String callingPackage);
// Turn on/off profiling in a particular process.
+ @UnsupportedAppUsage
boolean profileControl(in String process, int userId, boolean start,
in ProfilerInfo profilerInfo, int profileType);
+ @UnsupportedAppUsage
boolean shutdown(int timeout);
+ @UnsupportedAppUsage
void stopAppSwitches();
+ @UnsupportedAppUsage
void resumeAppSwitches();
boolean bindBackupAgent(in String packageName, int backupRestoreMode, int targetUserId);
void backupAgentCreated(in String packageName, in IBinder agent, int userId);
@@ -230,60 +265,83 @@
boolean requireFull, in String name, in String callerPackage);
void addPackageDependency(in String packageName);
void killApplication(in String pkg, int appId, int userId, in String reason);
+ @UnsupportedAppUsage
void closeSystemDialogs(in String reason);
+ @UnsupportedAppUsage
Debug.MemoryInfo[] getProcessMemoryInfo(in int[] pids);
void killApplicationProcess(in String processName, int uid);
// Special low-level communication with activity manager.
boolean handleApplicationWtf(in IBinder app, in String tag, boolean system,
in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
+ @UnsupportedAppUsage
void killBackgroundProcesses(in String packageName, int userId);
boolean isUserAMonkey();
// Retrieve info of applications installed on external media that are currently
// running.
List<ApplicationInfo> getRunningExternalApplications();
+ @UnsupportedAppUsage
void finishHeavyWeightApp();
// A StrictMode violation to be handled.
+ @UnsupportedAppUsage
void handleApplicationStrictModeViolation(in IBinder app, int penaltyMask,
in StrictMode.ViolationInfo crashInfo);
boolean isTopActivityImmersive();
void crashApplication(int uid, int initialPid, in String packageName, int userId, in String message);
+ @UnsupportedAppUsage
String getProviderMimeType(in Uri uri, int userId);
// Cause the specified process to dump the specified heap.
boolean dumpHeap(in String process, int userId, boolean managed, boolean mallocInfo,
boolean runGc, in String path, in ParcelFileDescriptor fd,
in RemoteCallback finishCallback);
+ @UnsupportedAppUsage
boolean isUserRunning(int userid, int flags);
+ @UnsupportedAppUsage
void setPackageScreenCompatMode(in String packageName, int mode);
+ @UnsupportedAppUsage
boolean switchUser(int userid);
+ @UnsupportedAppUsage
boolean removeTask(int taskId);
+ @UnsupportedAppUsage
void registerProcessObserver(in IProcessObserver observer);
+ @UnsupportedAppUsage
void unregisterProcessObserver(in IProcessObserver observer);
boolean isIntentSenderTargetedToPackage(in IIntentSender sender);
+ @UnsupportedAppUsage
void updatePersistentConfiguration(in Configuration values);
+ @UnsupportedAppUsage
long[] getProcessPss(in int[] pids);
void showBootMessage(in CharSequence msg, boolean always);
+ @UnsupportedAppUsage
void killAllBackgroundProcesses();
ContentProviderHolder getContentProviderExternal(in String name, int userId,
in IBinder token, String tag);
/** @deprecated - Use {@link #removeContentProviderExternalAsUser} which takes a user ID. */
+ @UnsupportedAppUsage
void removeContentProviderExternal(in String name, in IBinder token);
void removeContentProviderExternalAsUser(in String name, in IBinder token, int userId);
// Get memory information about the calling process.
void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo);
boolean killProcessesBelowForeground(in String reason);
+ @UnsupportedAppUsage
UserInfo getCurrentUser();
// This is not public because you need to be very careful in how you
// manage your activity to make sure it is always the uid you expect.
+ @UnsupportedAppUsage
int getLaunchedFromUid(in IBinder activityToken);
+ @UnsupportedAppUsage
void unstableProviderDied(in IBinder connection);
+ @UnsupportedAppUsage
boolean isIntentSenderAnActivity(in IIntentSender sender);
boolean isIntentSenderAForegroundService(in IIntentSender sender);
boolean isIntentSenderABroadcast(in IIntentSender sender);
+ @UnsupportedAppUsage
int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
int requestCode, int flags, in ProfilerInfo profilerInfo,
in Bundle options, int userId);
+ @UnsupportedAppUsage
int stopUser(int userid, boolean force, in IStopUserCallback callback);
+ @UnsupportedAppUsage
void registerUserSwitchObserver(in IUserSwitchObserver observer, in String name);
void unregisterUserSwitchObserver(in IUserSwitchObserver observer);
int[] getRunningUserIds();
@@ -291,6 +349,7 @@
// Deprecated - This method is only used by a few internal components and it will soon be
// replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
// No new code should be calling it.
+ @UnsupportedAppUsage
void requestBugReport(int bugreportType);
/**
@@ -319,15 +378,20 @@
*/
void requestWifiBugReport(in String shareTitle, in String shareDescription);
+ @UnsupportedAppUsage
Intent getIntentForIntentSender(in IIntentSender sender);
// This is not public because you need to be very careful in how you
// manage your activity to make sure it is always the uid you expect.
+ @UnsupportedAppUsage
String getLaunchedFromPackage(in IBinder activityToken);
void killUid(int appId, int userId, in String reason);
void setUserIsMonkey(boolean monkey);
+ @UnsupportedAppUsage
void hang(in IBinder who, boolean allowRestart);
+ @UnsupportedAppUsage
List<ActivityManager.StackInfo> getAllStackInfos();
+ @UnsupportedAppUsage
void moveTaskToStack(int taskId, int stackId, boolean toTop);
/**
* Resizes the input stack id to the given bounds.
@@ -343,60 +407,83 @@
* default animation duration should be used.
* @throws RemoteException
*/
+ @UnsupportedAppUsage
void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
boolean preserveWindows, boolean animate, int animationDuration);
void setFocusedStack(int stackId);
ActivityManager.StackInfo getFocusedStackInfo();
+ @UnsupportedAppUsage
void restart();
void performIdleMaintenance();
void appNotRespondingViaProvider(in IBinder connection);
+ @UnsupportedAppUsage
Rect getTaskBounds(int taskId);
+ @UnsupportedAppUsage
boolean setProcessMemoryTrimLevel(in String process, int uid, int level);
// Start of L transactions
String getTagForIntentSender(in IIntentSender sender, in String prefix);
+ @UnsupportedAppUsage
boolean startUserInBackground(int userid);
+ @UnsupportedAppUsage
boolean isInLockTaskMode();
+ @UnsupportedAppUsage
void startRecentsActivity(in Intent intent, in IAssistDataReceiver assistDataReceiver,
in IRecentsAnimationRunner recentsAnimationRunner);
+ @UnsupportedAppUsage
void cancelRecentsAnimation(boolean restoreHomeStackPosition);
+ @UnsupportedAppUsage
int startActivityFromRecents(int taskId, in Bundle options);
+ @UnsupportedAppUsage
void startSystemLockTaskMode(int taskId);
+ @UnsupportedAppUsage
boolean isTopOfTask(in IBinder token);
void bootAnimationComplete();
int checkPermissionWithToken(in String permission, int pid, int uid,
in IBinder callerToken);
+ @UnsupportedAppUsage
void registerTaskStackListener(in ITaskStackListener listener);
void unregisterTaskStackListener(in ITaskStackListener listener);
void notifyCleartextNetwork(int uid, in byte[] firstPacket);
+ @UnsupportedAppUsage
void setTaskResizeable(int taskId, int resizeableMode);
+ @UnsupportedAppUsage
void resizeTask(int taskId, in Rect bounds, int resizeMode);
+ @UnsupportedAppUsage
int getLockTaskModeState();
+ @UnsupportedAppUsage
void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize,
in String reportPackage);
void dumpHeapFinished(in String path);
void updateLockTaskPackages(int userId, in String[] packages);
void noteAlarmStart(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
void noteAlarmFinish(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
+ @UnsupportedAppUsage
int getPackageProcessState(in String packageName, in String callingPackage);
void updateDeviceOwner(in String packageName);
// Start of N transactions
// Start Binder transaction tracking for all applications.
+ @UnsupportedAppUsage
boolean startBinderTracking();
// Stop Binder transaction tracking for all applications and dump trace data to the given file
// descriptor.
+ @UnsupportedAppUsage
boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
/**
* Try to place task to provided position. The final position might be different depending on
* current user and stacks state. The task will be moved to target stack if it's currently in
* different stack.
*/
+ @UnsupportedAppUsage
void positionTaskInStack(int taskId, int stackId, int position);
+ @UnsupportedAppUsage
void suppressResizeConfigChanges(boolean suppress);
+ @UnsupportedAppUsage
boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
boolean isAppStartModeDisabled(int uid, in String packageName);
+ @UnsupportedAppUsage
boolean unlockUser(int userid, in byte[] token, in byte[] secret,
in IProgressListener listener);
void killPackageDependents(in String packageName, int userId);
@@ -419,15 +506,18 @@
* stacks.
* @throws RemoteException
*/
+ @UnsupportedAppUsage
void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
in Rect tempDockedTaskInsetBounds,
in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
+ @UnsupportedAppUsage
void removeStack(int stackId);
void makePackageIdle(String packageName, int userId);
int getMemoryTrimLevel();
boolean isVrModePackageEnabled(in ComponentName packageName);
void notifyLockedProfile(int userId);
void startConfirmDeviceCredentialIntent(in Intent intent, in Bundle options);
+ @UnsupportedAppUsage
void sendIdleJobTrigger();
int sendIntentSender(in IIntentSender target, in IBinder whitelistToken, int code,
in Intent intent, in String resolvedType, in IIntentReceiver finishedReceiver,
@@ -449,6 +539,7 @@
// Start of O transactions
int restartUserInBackground(int userId);
/** Cancels the window transitions for the given task. */
+ @UnsupportedAppUsage
void cancelTaskWindowTransition(int taskId);
/**
* @param taskId the id of the task to retrieve the sAutoapshots for
@@ -456,6 +547,7 @@
* a reduced resolution of it, which is much faster
* @return a graphic buffer representing a screenshot of a task
*/
+ @UnsupportedAppUsage
ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
void scheduleApplicationInfoChanged(in List<String> packageNames, int userId);
void setPersistentVrThread(int tid);
diff --git a/core/java/android/app/IAlarmManager.aidl b/core/java/android/app/IAlarmManager.aidl
index ded4c49..6f624ee 100644
--- a/core/java/android/app/IAlarmManager.aidl
+++ b/core/java/android/app/IAlarmManager.aidl
@@ -29,13 +29,16 @@
*/
interface IAlarmManager {
/** windowLength == 0 means exact; windowLength < 0 means the let the OS decide */
+ @UnsupportedAppUsage
void set(String callingPackage, int type, long triggerAtTime, long windowLength,
long interval, int flags, in PendingIntent operation, in IAlarmListener listener,
String listenerTag, in WorkSource workSource, in AlarmManager.AlarmClockInfo alarmClock);
+ @UnsupportedAppUsage
boolean setTime(long millis);
void setTimeZone(String zone);
void remove(in PendingIntent operation, in IAlarmListener listener);
long getNextWakeFromIdleTime();
+ @UnsupportedAppUsage
AlarmManager.AlarmClockInfo getNextAlarmClock(int userId);
long currentNetworkTimeMillis();
}
diff --git a/core/java/android/app/IAppTask.aidl b/core/java/android/app/IAppTask.aidl
index 37fead9..61f6264 100644
--- a/core/java/android/app/IAppTask.aidl
+++ b/core/java/android/app/IAppTask.aidl
@@ -23,6 +23,7 @@
/** @hide */
interface IAppTask {
void finishAndRemoveTask();
+ @UnsupportedAppUsage
ActivityManager.RecentTaskInfo getTaskInfo();
void moveToFront();
int startActivity(IBinder whoThread, String callingPackage,
diff --git a/core/java/android/app/IApplicationThread.aidl b/core/java/android/app/IApplicationThread.aidl
index b8af898..3a09c4c 100644
--- a/core/java/android/app/IApplicationThread.aidl
+++ b/core/java/android/app/IApplicationThread.aidl
@@ -60,8 +60,10 @@
in CompatibilityInfo compatInfo,
int resultCode, in String data, in Bundle extras, boolean sync,
int sendingUser, int processState);
+ @UnsupportedAppUsage
void scheduleCreateService(IBinder token, in ServiceInfo info,
in CompatibilityInfo compatInfo, int processState);
+ @UnsupportedAppUsage
void scheduleStopService(IBinder token);
void bindApplication(in String packageName, in ApplicationInfo info,
in List<ProviderInfo> providers, in ComponentName testName,
@@ -77,8 +79,10 @@
void scheduleServiceArgs(IBinder token, in ParceledListSlice args);
void updateTimeZone();
void processInBackground();
+ @UnsupportedAppUsage
void scheduleBindService(IBinder token,
in Intent intent, boolean rebind, int processState);
+ @UnsupportedAppUsage
void scheduleUnbindService(IBinder token,
in Intent intent);
void dumpService(in ParcelFileDescriptor fd, IBinder servicetoken,
@@ -106,6 +110,7 @@
void updateHttpProxy();
void setCoreSettings(in Bundle coreSettings);
void updatePackageCompatibilityInfo(in String pkg, in CompatibilityInfo info);
+ @UnsupportedAppUsage
void scheduleTrimMemory(int level);
void dumpMemInfo(in ParcelFileDescriptor fd, in Debug.MemoryInfo mem, boolean checkin,
boolean dumpInfo, boolean dumpDalvik, boolean dumpSummaryOnly, boolean dumpUnreachable,
diff --git a/core/java/android/app/IAssistDataReceiver.aidl b/core/java/android/app/IAssistDataReceiver.aidl
index 2d5daf9..0d69838 100644
--- a/core/java/android/app/IAssistDataReceiver.aidl
+++ b/core/java/android/app/IAssistDataReceiver.aidl
@@ -21,6 +21,8 @@
/** @hide */
oneway interface IAssistDataReceiver {
+ @UnsupportedAppUsage
void onHandleAssistData(in Bundle resultData);
+ @UnsupportedAppUsage
void onHandleAssistScreenshot(in Bitmap screenshot);
}
diff --git a/core/java/android/app/IInstrumentationWatcher.aidl b/core/java/android/app/IInstrumentationWatcher.aidl
index 6c8c4d6..df42dec 100644
--- a/core/java/android/app/IInstrumentationWatcher.aidl
+++ b/core/java/android/app/IInstrumentationWatcher.aidl
@@ -23,6 +23,7 @@
/** @hide */
interface IInstrumentationWatcher
{
+ @UnsupportedAppUsage
void instrumentationStatus(in ComponentName name, int resultCode,
in Bundle results);
void instrumentationFinished(in ComponentName name, int resultCode,
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index df04a6b..e1da08b 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -40,15 +40,19 @@
/** {@hide} */
interface INotificationManager
{
+ @UnsupportedAppUsage
void cancelAllNotifications(String pkg, int userId);
void clearData(String pkg, int uid, boolean fromApp);
+ @UnsupportedAppUsage
void enqueueToast(String pkg, ITransientNotification callback, int duration, int displayId);
+ @UnsupportedAppUsage
void cancelToast(String pkg, ITransientNotification callback);
void finishToken(String pkg, ITransientNotification callback);
void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id,
in Notification notification, int userId);
+ @UnsupportedAppUsage
void cancelNotificationWithTag(String pkg, String tag, int id, int userId);
void setShowBadge(String pkg, int uid, boolean showBadge);
@@ -61,6 +65,7 @@
*/
void setNotificationsEnabledWithImportanceLockForPackage(String pkg, int uid, boolean enabled);
+ @UnsupportedAppUsage
boolean areNotificationsEnabledForPackage(String pkg, int uid);
boolean areNotificationsEnabled(String pkg);
int getPackageImportance(String pkg);
@@ -102,7 +107,9 @@
// TODO: Remove this when callers have been migrated to the equivalent
// INotificationListener method.
+ @UnsupportedAppUsage
StatusBarNotification[] getActiveNotifications(String callingPkg);
+ @UnsupportedAppUsage
StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count);
void registerListener(in INotificationListener listener, in ComponentName component, int userid);
@@ -157,7 +164,9 @@
ComponentName getAllowedNotificationAssistantForUser(int userId);
ComponentName getAllowedNotificationAssistant();
+ @UnsupportedAppUsage
int getZenMode();
+ @UnsupportedAppUsage
ZenModeConfig getZenModeConfig();
NotificationManager.Policy getConsolidatedNotificationPolicy();
oneway void setZenMode(int mode, in Uri conditionId, String reason);
diff --git a/core/java/android/app/ISearchManager.aidl b/core/java/android/app/ISearchManager.aidl
index 0d09e4a..53f1a46 100644
--- a/core/java/android/app/ISearchManager.aidl
+++ b/core/java/android/app/ISearchManager.aidl
@@ -28,6 +28,7 @@
SearchableInfo getSearchableInfo(in ComponentName launchActivity);
List<SearchableInfo> getSearchablesInGlobalSearch();
List<ResolveInfo> getGlobalSearchActivities();
+ @UnsupportedAppUsage
ComponentName getGlobalSearchActivity();
ComponentName getWebSearchActivity();
void launchAssist(in Bundle args);
diff --git a/core/java/android/app/IServiceConnection.aidl b/core/java/android/app/IServiceConnection.aidl
index 97042aa..0115bcf 100644
--- a/core/java/android/app/IServiceConnection.aidl
+++ b/core/java/android/app/IServiceConnection.aidl
@@ -21,6 +21,7 @@
/** @hide */
oneway interface IServiceConnection {
+ @UnsupportedAppUsage
void connected(in ComponentName name, IBinder service, boolean dead);
}
diff --git a/core/java/android/app/IStopUserCallback.aidl b/core/java/android/app/IStopUserCallback.aidl
index 19ac1d5..d3c2ff7 100644
--- a/core/java/android/app/IStopUserCallback.aidl
+++ b/core/java/android/app/IStopUserCallback.aidl
@@ -22,6 +22,7 @@
*/
interface IStopUserCallback
{
+ @UnsupportedAppUsage
void userStopped(int userId);
void userStopAborted(int userId);
}
diff --git a/core/java/android/app/ITransientNotification.aidl b/core/java/android/app/ITransientNotification.aidl
index d5b3ed0..09a3ba0 100644
--- a/core/java/android/app/ITransientNotification.aidl
+++ b/core/java/android/app/ITransientNotification.aidl
@@ -19,6 +19,7 @@
/** @hide */
oneway interface ITransientNotification {
+ @UnsupportedAppUsage
void show(IBinder windowToken);
void hide();
}
diff --git a/core/java/android/app/IWallpaperManager.aidl b/core/java/android/app/IWallpaperManager.aidl
index 666f721..7f5350d 100644
--- a/core/java/android/app/IWallpaperManager.aidl
+++ b/core/java/android/app/IWallpaperManager.aidl
@@ -55,11 +55,13 @@
/**
* Set the live wallpaper. This only affects the system wallpaper.
*/
+ @UnsupportedAppUsage
void setWallpaperComponent(in ComponentName name);
/**
* Get the wallpaper for a given user.
*/
+ @UnsupportedAppUsage
ParcelFileDescriptor getWallpaper(String callingPkg, IWallpaperManagerCallback cb, int which,
out Bundle outParams, int userId);
@@ -73,6 +75,7 @@
* information about that wallpaper. Otherwise, if it is a static image,
* simply return null.
*/
+ @UnsupportedAppUsage
WallpaperInfo getWallpaperInfo(int userId);
/**
@@ -83,6 +86,7 @@
/**
* Return whether the current system wallpaper has the given name.
*/
+ @UnsupportedAppUsage
boolean hasNamedWallpaper(String name);
/**
@@ -94,11 +98,13 @@
/**
* Returns the desired minimum width for the wallpaper in a particular display.
*/
+ @UnsupportedAppUsage
int getWidthHint(int displayId);
/**
* Returns the desired minimum height for the wallpaper in a particular display.
*/
+ @UnsupportedAppUsage
int getHeightHint(int displayId);
/**
diff --git a/core/java/android/app/ZygotePreload.java b/core/java/android/app/ZygotePreload.java
index a295af3..eaaeb54 100644
--- a/core/java/android/app/ZygotePreload.java
+++ b/core/java/android/app/ZygotePreload.java
@@ -15,6 +15,7 @@
*/
package android.app;
+import android.annotation.NonNull;
import android.content.pm.ApplicationInfo;
/**
@@ -27,8 +28,7 @@
* {@link android.R.styleable#AndroidManifestService_useAppZygote android:useAppZygote} attribute
* of the <service> tag set to <code>true</code>.
*
- * Note that this implementations of this class must provide a default constructor with no
- * arguments.
+ * Note that implementations of this class must provide a default constructor with no arguments.
*/
public interface ZygotePreload {
/**
@@ -38,5 +38,5 @@
*
* @param appInfo The ApplicationInfo object belonging to the application
*/
- void doPreload(ApplicationInfo appInfo);
+ void doPreload(@NonNull ApplicationInfo appInfo);
}
diff --git a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
index f3bf913..fd74c04 100644
--- a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
+++ b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
@@ -81,6 +81,12 @@
*/
public static final String SSIN_MAX_NUM_ACTIONS = "ssin_max_num_actions";
+ /**
+ * The default component of
+ * {@link android.service.notification.NotificationAssistantService}.
+ */
+ public static final String NAS_DEFAULT_SERVICE = "nas_default_service";
+
// Flags related to media notifications
/**
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 6b8e000..fc7b4cf 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -965,7 +965,7 @@
<p>The default value of this attribute is <code>false</code>. -->
<attr name="allowEmbedded" format="boolean" />
- <!-- @hide @SystemApi Specifies whether this {@link android.app.Activity} should be shown on
+ <!-- Specifies whether this {@link android.app.Activity} should be shown on
top of the lock screen whenever the lockscreen is up and this activity has another
activity behind it with the {@link android.R.attr#showWhenLocked} attribute set. That
is, this activity is only visible on the lock screen if there is another activity with
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index fac116f..818caa8 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3698,8 +3698,8 @@
<string translatable="false" name="config_batterySaverDeviceSpecificConfig"></string>
- <!-- Package name that should be granted Notification Assistant access -->
- <string name="config_defaultAssistantAccessPackage" translatable="false">android.ext.services</string>
+ <!-- Component name that should be granted Notification Assistant access -->
+ <string name="config_defaultAssistantAccessComponent" translatable="false">android.ext.services/android.ext.services.notification.Assistant</string>
<bool name="config_supportBluetoothPersistedState">true</bool>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 61d53002..b48c6b0 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2934,7 +2934,6 @@
<public name="foregroundServiceType" />
<public name="hasFragileUserData" />
<public name="minAspectRatio" />
- <!-- @hide @SystemApi -->
<public name="inheritShowWhenLocked" />
<public name="zygotePreloadName" />
<public name="useEmbeddedDex" />
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index ba8b054..3ea9070 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3532,7 +3532,7 @@
<java-symbol type="string" name="harmful_app_warning_title" />
<java-symbol type="layout" name="harmful_app_warning_dialog" />
- <java-symbol type="string" name="config_defaultAssistantAccessPackage" />
+ <java-symbol type="string" name="config_defaultAssistantAccessComponent" />
<java-symbol type="bool" name="config_supportBluetoothPersistedState" />
diff --git a/core/xsd/Android.bp b/core/xsd/Android.bp
new file mode 100644
index 0000000..81669eb
--- /dev/null
+++ b/core/xsd/Android.bp
@@ -0,0 +1,6 @@
+xsd_config {
+ name: "permission",
+ srcs: ["permission.xsd"],
+ api_dir: "schema",
+ package_name: "com.android.xml.permission",
+}
diff --git a/core/xsd/permission.xsd b/core/xsd/permission.xsd
new file mode 100644
index 0000000..d90863b
--- /dev/null
+++ b/core/xsd/permission.xsd
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2019 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- TODO: define a targetNamespace. Note that it will break retrocompatibility -->
+<xs:schema version="2.0"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="permissions">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="group" type="group" maxOccurs="unbounded"/>
+ <xs:element name="permission" type="permission" maxOccurs="unbounded"/>
+ <xs:element name="assign-permission" type="assign-permission" maxOccurs="unbounded"/>
+ <xs:element name="split-permission" type="split-permission" maxOccurs="unbounded"/>
+ <xs:element name="library" type="library" maxOccurs="unbounded"/>
+ <xs:element name="feature" type="feature" maxOccurs="unbounded"/>
+ <xs:element name="unavailable-feature" type="unavailable-feature" maxOccurs="unbounded"/>
+ <xs:element name="allow-in-power-save-except-idle" type="allow-in-power-save-except-idle" maxOccurs="unbounded"/>
+ <xs:element name="allow-in-power-save" type="allow-in-power-save" maxOccurs="unbounded"/>
+ <xs:element name="allow-in-data-usage-save" type="allow-in-data-usage-save" maxOccurs="unbounded"/>
+ <xs:element name="allow-unthrottled-location" type="allow-unthrottled-location" maxOccurs="unbounded"/>
+ <xs:element name="allow-ignore-location-settings" type="allow-ignore-location-settings" maxOccurs="unbounded"/>
+ <xs:element name="allow-implicit-broadcast" type="allow-implicit-broadcast" maxOccurs="unbounded"/>
+ <xs:element name="app-link" type="app-link" maxOccurs="unbounded"/>
+ <xs:element name="system-user-whitelisted-app" type="system-user-whitelisted-app" maxOccurs="unbounded"/>
+ <xs:element name="system-user-blacklisted-app" type="system-user-blacklisted-app" maxOccurs="unbounded"/>
+ <xs:element name="default-enabled-vr-app" type="default-enabled-vr-app" maxOccurs="unbounded"/>
+ <xs:element name="backup-transport-whitelisted-service" type="backup-transport-whitelisted-service" maxOccurs="unbounded"/>
+ <xs:element name="disabled-until-used-preinstalled-carrier-associated-app" type="disabled-until-used-preinstalled-carrier-associated-app" maxOccurs="unbounded"/>
+ <xs:element name="disabled-until-used-preinstalled-carrier-app" type="disabled-until-used-preinstalled-carrier-app" maxOccurs="unbounded"/>
+ <xs:element name="privapp-permissions" type="privapp-permissions" maxOccurs="unbounded"/>
+ <xs:element name="oem-permissions" type="oem-permissions" maxOccurs="unbounded"/>
+ <xs:element name="hidden-api-whitelisted-app" type="hidden-api-whitelisted-app" maxOccurs="unbounded"/>
+ <xs:element name="allow-association" type="allow-association" maxOccurs="unbounded"/>
+ <xs:element name="bugreport-whitelisted" type="bugreport-whitelisted" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="group">
+ <xs:attribute name="gid" type="xs:int"/>
+ </xs:complexType>
+ <xs:complexType name="permission">
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="assign-permission">
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="uid" type="xs:int"/>
+ </xs:complexType>
+ <xs:complexType name="split-permission">
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="targetSdk" type="xs:int"/>
+ <xs:sequence>
+ <xs:element name="library" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="library">
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="file" type="xs:string"/>
+ <xs:attribute name="dependency" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="feature">
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="notLowRam" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="unavailable-feature">
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="allow-in-power-save-except-idle">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="allow-in-power-save">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="allow-in-data-usage-save">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="allow-unthrottled-location">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="allow-ignore-location-settings">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="allow-implicit-broadcast">
+ <xs:attribute name="action" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="app-link">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="system-user-whitelisted-app">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="system-user-blacklisted-app">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="default-enabled-vr-app">
+ <xs:attribute name="package" type="xs:string"/>
+ <xs:attribute name="class" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="backup-transport-whitelisted-service">
+ <xs:attribute name="service" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="disabled-until-used-preinstalled-carrier-associated-app">
+ <xs:attribute name="package" type="xs:string"/>
+ <xs:attribute name="carrierAppPackage" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="disabled-until-used-preinstalled-carrier-app">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="privapp-permissions">
+ <xs:attribute name="package" type="xs:string"/>
+ <xs:sequence>
+ <xs:element name="permission" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="deny-permission" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="oem-permissions">
+ <xs:attribute name="package" type="xs:string"/>
+ <xs:sequence>
+ <xs:element name="permission" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="deny-permission" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="hidden-api-whitelisted-app">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="allow-association">
+ <xs:attribute name="target" type="xs:string"/>
+ <xs:attribute name="allowed" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="bugreport-whitelisted">
+ <xs:attribute name="package" type="xs:string"/>
+ </xs:complexType>
+</xs:schema>
diff --git a/core/xsd/schema/README.md b/core/xsd/schema/README.md
new file mode 100644
index 0000000..f52d93d
--- /dev/null
+++ b/core/xsd/schema/README.md
@@ -0,0 +1 @@
+Please see the [README](https://android.googlesource.com/platform/system/tools/xsdc/+/refs/heads/master/README.md) for details regarding the Configfile as API.
diff --git a/core/xsd/schema/current.txt b/core/xsd/schema/current.txt
new file mode 100644
index 0000000..82bb0fea
--- /dev/null
+++ b/core/xsd/schema/current.txt
@@ -0,0 +1,242 @@
+// Signature format: 2.0
+package com.android.xml.permission {
+
+ public class AllowAssociation {
+ ctor public AllowAssociation();
+ method public String getAllowed();
+ method public String getTarget();
+ method public void setAllowed(String);
+ method public void setTarget(String);
+ }
+
+ public class AllowIgnoreLocationSettings {
+ ctor public AllowIgnoreLocationSettings();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class AllowImplicitBroadcast {
+ ctor public AllowImplicitBroadcast();
+ method public String getAction();
+ method public void setAction(String);
+ }
+
+ public class AllowInDataUsageSave {
+ ctor public AllowInDataUsageSave();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class AllowInPowerSave {
+ ctor public AllowInPowerSave();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class AllowInPowerSaveExceptIdle {
+ ctor public AllowInPowerSaveExceptIdle();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class AllowUnthrottledLocation {
+ ctor public AllowUnthrottledLocation();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class AppLink {
+ ctor public AppLink();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class AssignPermission {
+ ctor public AssignPermission();
+ method public String getName();
+ method public int getUid();
+ method public void setName(String);
+ method public void setUid(int);
+ }
+
+ public class BackupTransportWhitelistedService {
+ ctor public BackupTransportWhitelistedService();
+ method public String getService();
+ method public void setService(String);
+ }
+
+ public class BugreportWhitelisted {
+ ctor public BugreportWhitelisted();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class DefaultEnabledVrApp {
+ ctor public DefaultEnabledVrApp();
+ method public String get_class();
+ method public String get_package();
+ method public void set_class(String);
+ method public void set_package(String);
+ }
+
+ public class DisabledUntilUsedPreinstalledCarrierApp {
+ ctor public DisabledUntilUsedPreinstalledCarrierApp();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class DisabledUntilUsedPreinstalledCarrierAssociatedApp {
+ ctor public DisabledUntilUsedPreinstalledCarrierAssociatedApp();
+ method public String getCarrierAppPackage();
+ method public String get_package();
+ method public void setCarrierAppPackage(String);
+ method public void set_package(String);
+ }
+
+ public class Feature {
+ ctor public Feature();
+ method public String getName();
+ method public String getNotLowRam();
+ method public void setName(String);
+ method public void setNotLowRam(String);
+ }
+
+ public class Group {
+ ctor public Group();
+ method public int getGid();
+ method public void setGid(int);
+ }
+
+ public class HiddenApiWhitelistedApp {
+ ctor public HiddenApiWhitelistedApp();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class Library {
+ ctor public Library();
+ method public String getDependency();
+ method public String getFile();
+ method public String getName();
+ method public void setDependency(String);
+ method public void setFile(String);
+ method public void setName(String);
+ }
+
+ public class OemPermissions {
+ ctor public OemPermissions();
+ method public java.util.List<com.android.xml.permission.OemPermissions.DenyPermission> getDenyPermission();
+ method public java.util.List<com.android.xml.permission.OemPermissions.Permission> getPermission();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public static class OemPermissions.DenyPermission {
+ ctor public OemPermissions.DenyPermission();
+ method public String getName();
+ method public void setName(String);
+ }
+
+ public static class OemPermissions.Permission {
+ ctor public OemPermissions.Permission();
+ method public String getName();
+ method public void setName(String);
+ }
+
+ public class Permission {
+ ctor public Permission();
+ method public String getName();
+ method public void setName(String);
+ }
+
+ public class Permissions {
+ ctor public Permissions();
+ method public java.util.List<com.android.xml.permission.AllowAssociation> getAllowAssociation();
+ method public java.util.List<com.android.xml.permission.AllowIgnoreLocationSettings> getAllowIgnoreLocationSettings();
+ method public java.util.List<com.android.xml.permission.AllowImplicitBroadcast> getAllowImplicitBroadcast();
+ method public java.util.List<com.android.xml.permission.AllowInDataUsageSave> getAllowInDataUsageSave();
+ method public java.util.List<com.android.xml.permission.AllowInPowerSave> getAllowInPowerSave();
+ method public java.util.List<com.android.xml.permission.AllowInPowerSaveExceptIdle> getAllowInPowerSaveExceptIdle();
+ method public java.util.List<com.android.xml.permission.AllowUnthrottledLocation> getAllowUnthrottledLocation();
+ method public java.util.List<com.android.xml.permission.AppLink> getAppLink();
+ method public java.util.List<com.android.xml.permission.AssignPermission> getAssignPermission();
+ method public java.util.List<com.android.xml.permission.BackupTransportWhitelistedService> getBackupTransportWhitelistedService();
+ method public java.util.List<com.android.xml.permission.BugreportWhitelisted> getBugreportWhitelisted();
+ method public java.util.List<com.android.xml.permission.DefaultEnabledVrApp> getDefaultEnabledVrApp();
+ method public java.util.List<com.android.xml.permission.DisabledUntilUsedPreinstalledCarrierApp> getDisabledUntilUsedPreinstalledCarrierApp();
+ method public java.util.List<com.android.xml.permission.DisabledUntilUsedPreinstalledCarrierAssociatedApp> getDisabledUntilUsedPreinstalledCarrierAssociatedApp();
+ method public java.util.List<com.android.xml.permission.Feature> getFeature();
+ method public java.util.List<com.android.xml.permission.Group> getGroup();
+ method public java.util.List<com.android.xml.permission.HiddenApiWhitelistedApp> getHiddenApiWhitelistedApp();
+ method public java.util.List<com.android.xml.permission.Library> getLibrary();
+ method public java.util.List<com.android.xml.permission.OemPermissions> getOemPermissions();
+ method public java.util.List<com.android.xml.permission.Permission> getPermission();
+ method public java.util.List<com.android.xml.permission.PrivappPermissions> getPrivappPermissions();
+ method public java.util.List<com.android.xml.permission.SplitPermission> getSplitPermission();
+ method public java.util.List<com.android.xml.permission.SystemUserBlacklistedApp> getSystemUserBlacklistedApp();
+ method public java.util.List<com.android.xml.permission.SystemUserWhitelistedApp> getSystemUserWhitelistedApp();
+ method public java.util.List<com.android.xml.permission.UnavailableFeature> getUnavailableFeature();
+ }
+
+ public class PrivappPermissions {
+ ctor public PrivappPermissions();
+ method public java.util.List<com.android.xml.permission.PrivappPermissions.DenyPermission> getDenyPermission();
+ method public java.util.List<com.android.xml.permission.PrivappPermissions.Permission> getPermission();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public static class PrivappPermissions.DenyPermission {
+ ctor public PrivappPermissions.DenyPermission();
+ method public String getName();
+ method public void setName(String);
+ }
+
+ public static class PrivappPermissions.Permission {
+ ctor public PrivappPermissions.Permission();
+ method public String getName();
+ method public void setName(String);
+ }
+
+ public class SplitPermission {
+ ctor public SplitPermission();
+ method public java.util.List<com.android.xml.permission.SplitPermission.Library> getLibrary();
+ method public String getName();
+ method public int getTargetSdk();
+ method public void setName(String);
+ method public void setTargetSdk(int);
+ }
+
+ public static class SplitPermission.Library {
+ ctor public SplitPermission.Library();
+ method public String getName();
+ method public void setName(String);
+ }
+
+ public class SystemUserBlacklistedApp {
+ ctor public SystemUserBlacklistedApp();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class SystemUserWhitelistedApp {
+ ctor public SystemUserWhitelistedApp();
+ method public String get_package();
+ method public void set_package(String);
+ }
+
+ public class UnavailableFeature {
+ ctor public UnavailableFeature();
+ method public String getName();
+ method public void setName(String);
+ }
+
+ public class XmlParser {
+ ctor public XmlParser();
+ method public static com.android.xml.permission.Permissions read(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static String readText(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ method public static void skip(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+ }
+
+}
+
diff --git a/core/xsd/schema/last_current.txt b/core/xsd/schema/last_current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/xsd/schema/last_current.txt
diff --git a/core/xsd/schema/last_removed.txt b/core/xsd/schema/last_removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/xsd/schema/last_removed.txt
diff --git a/core/xsd/schema/removed.txt b/core/xsd/schema/removed.txt
new file mode 100644
index 0000000..d802177
--- /dev/null
+++ b/core/xsd/schema/removed.txt
@@ -0,0 +1 @@
+// Signature format: 2.0
diff --git a/keystore/java/android/security/keystore/DeviceIdAttestationException.java b/keystore/java/android/security/keystore/DeviceIdAttestationException.java
index 13f50b1..8ba0317 100644
--- a/keystore/java/android/security/keystore/DeviceIdAttestationException.java
+++ b/keystore/java/android/security/keystore/DeviceIdAttestationException.java
@@ -16,6 +16,7 @@
package android.security.keystore;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
@@ -33,7 +34,7 @@
*
* @param detailMessage the detail message for this exception.
*/
- public DeviceIdAttestationException(String detailMessage) {
+ public DeviceIdAttestationException(@Nullable String detailMessage) {
super(detailMessage);
}
@@ -44,7 +45,7 @@
* @param message the detail message for this exception.
* @param cause the cause of this exception, may be {@code null}.
*/
- public DeviceIdAttestationException(String message, Throwable cause) {
+ public DeviceIdAttestationException(@Nullable String message, @Nullable Throwable cause) {
super(message, cause);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
index 625eacd..1c0974a 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
@@ -61,7 +61,8 @@
@VisibleForTesting
internal var privacyList = emptyList<PrivacyItem>()
- get() = field.toList() // Provides a shallow copy of the list
+ @Synchronized get() = field.toList() // Returns a shallow copy of the list
+ @Synchronized set
private val userManager = context.getSystemService(UserManager::class.java)
private var currentUserIds = emptyList<Int>()
@@ -71,7 +72,8 @@
private val callbacks = mutableListOf<WeakReference<Callback>>()
private val notifyChanges = Runnable {
- callbacks.forEach { it.get()?.privacyChanged(privacyList) }
+ val list = privacyList
+ callbacks.forEach { it.get()?.privacyChanged(list) }
}
private val updateListAndNotifyChanges = Runnable {
@@ -157,8 +159,10 @@
}
private fun updatePrivacyList() {
- privacyList = currentUserIds.flatMap { appOpsController.getActiveAppOpsForUser(it) }
+
+ val list = currentUserIds.flatMap { appOpsController.getActiveAppOpsForUser(it) }
.mapNotNull { toPrivacyItem(it) }.distinct()
+ privacyList = list
}
private fun toPrivacyItem(appOpItem: AppOpItem): PrivacyItem? {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
index 1783d9d..6033ed2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
@@ -264,7 +264,8 @@
val list = listOf(PrivacyItem(PrivacyType.TYPE_CAMERA,
PrivacyApplication("", TEST_UID, mContext)))
privacyItemController.privacyList = list
- assertEquals(list, privacyItemController.privacyList)
- assertTrue(list !== privacyItemController.privacyList)
+ val privacyList = privacyItemController.privacyList
+ assertEquals(list, privacyList)
+ assertTrue(list !== privacyList)
}
}
\ No newline at end of file
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index cf09b8f..8480830 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -333,6 +333,7 @@
out.attribute(null, ATT_APPROVED_LIST, allowedItems);
out.attribute(null, ATT_USER_ID, Integer.toString(approvedUserId));
out.attribute(null, ATT_IS_PRIMARY, Boolean.toString(isPrimary));
+ writeExtraAttributes(out, approvedUserId);
out.endTag(null, TAG_MANAGED_SERVICES);
if (!forBackup && isPrimary) {
@@ -345,10 +346,14 @@
}
}
}
-
out.endTag(null, getConfig().xmlTag);
}
+ /**
+ * Writes extra xml attributes to {@link #TAG_MANAGED_SERVICES} tag.
+ */
+ protected void writeExtraAttributes(XmlSerializer out, int userId) throws IOException {}
+
protected void migrateToXml() {
loadAllowedComponentsFromSettings();
}
@@ -377,7 +382,7 @@
? userId : XmlUtils.readIntAttribute(parser, ATT_USER_ID, 0);
final boolean isPrimary =
XmlUtils.readBooleanAttribute(parser, ATT_IS_PRIMARY, true);
-
+ readExtraAttributes(tag, parser, resolvedUserId);
if (allowedManagedServicePackages == null ||
allowedManagedServicePackages.test(getPackageName(approved))) {
if (mUm.getUserInfo(resolvedUserId) != null) {
@@ -391,6 +396,12 @@
rebindServices(false, USER_ALL);
}
+ /**
+ * Read extra attributes in the {@link #TAG_MANAGED_SERVICES} tag.
+ */
+ protected void readExtraAttributes(String tag, XmlPullParser parser, int userId)
+ throws IOException {}
+
private void loadAllowedComponentsFromSettings() {
for (UserInfo user : mUm.getUsers()) {
final ContentResolver cr = mContext.getContentResolver();
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index e8c402c..22f0b9db 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -153,6 +153,7 @@
import android.os.UserHandle;
import android.os.VibrationEffect;
import android.os.Vibrator;
+import android.provider.DeviceConfig;
import android.provider.Settings;
import android.service.notification.Adjustment;
import android.service.notification.Condition;
@@ -190,6 +191,7 @@
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -515,26 +517,32 @@
}
}
- readDefaultAssistant(userId);
+ setDefaultAssistantForUser(userId);
}
- protected void readDefaultAssistant(int userId) {
- String defaultAssistantAccess = getContext().getResources().getString(
- com.android.internal.R.string.config_defaultAssistantAccessPackage);
- if (defaultAssistantAccess != null) {
- // Gather all notification assistant components for candidate pkg. There should
- // only be one
- Set<ComponentName> approvedAssistants =
- mAssistants.queryPackageForServices(defaultAssistantAccess,
- MATCH_DIRECT_BOOT_AWARE
- | MATCH_DIRECT_BOOT_UNAWARE, userId);
- for (ComponentName cn : approvedAssistants) {
- try {
- getBinderService().setNotificationAssistantAccessGrantedForUser(
- cn, userId, true);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
+ protected void setDefaultAssistantForUser(int userId) {
+ List<ComponentName> validAssistants = new ArrayList<>(
+ mAssistants.queryPackageForServices(
+ null, MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE, userId));
+
+ List<String> candidateStrs = new ArrayList<>();
+ candidateStrs.add(DeviceConfig.getProperty(
+ DeviceConfig.NAMESPACE_SYSTEMUI,
+ SystemUiDeviceConfigFlags.NAS_DEFAULT_SERVICE));
+ candidateStrs.add(getContext().getResources().getString(
+ com.android.internal.R.string.config_defaultAssistantAccessComponent));
+
+ for (String candidateStr : candidateStrs) {
+ if (TextUtils.isEmpty(candidateStr)) {
+ continue;
+ }
+ ComponentName candidate = ComponentName.unflattenFromString(candidateStr);
+ if (candidate != null && validAssistants.contains(candidate)) {
+ setNotificationAssistantAccessGrantedForUserInternal(candidate, userId, true);
+ Slog.d(TAG, String.format("Set default NAS to be %s in %d", candidateStr, userId));
+ return;
+ } else {
+ Slog.w(TAG, "Invalid default NAS config is found: " + candidateStr);
}
}
}
@@ -594,6 +602,8 @@
mConditionProviders.migrateToXml();
handleSavePolicyFile();
}
+
+ mAssistants.resetDefaultAssistantsIfNecessary();
}
private void loadPolicyFile() {
@@ -1740,6 +1750,21 @@
publishLocalService(NotificationManagerInternal.class, mInternalService);
}
+ private void registerDeviceConfigChange() {
+ DeviceConfig.addOnPropertyChangedListener(
+ DeviceConfig.NAMESPACE_SYSTEMUI,
+ getContext().getMainExecutor(),
+ (namespace, name, value) -> {
+ if (!DeviceConfig.NAMESPACE_SYSTEMUI.equals(namespace)) {
+ return;
+ }
+ if (SystemUiDeviceConfigFlags.NAS_DEFAULT_SERVICE.equals(name)) {
+ mAssistants.resetDefaultAssistantsIfNecessary();
+ }
+ });
+ }
+
+
private GroupHelper getGroupHelper() {
mAutoGroupAtCount =
getContext().getResources().getInteger(R.integer.config_autoGroupAtCount);
@@ -1803,6 +1828,7 @@
mListeners.onBootPhaseAppsCanStart();
mAssistants.onBootPhaseAppsCanStart();
mConditionProviders.onBootPhaseAppsCanStart();
+ registerDeviceConfigChange();
}
}
@@ -3733,14 +3759,14 @@
@Override
public void setNotificationAssistantAccessGranted(ComponentName assistant,
- boolean granted) throws RemoteException {
+ boolean granted) {
setNotificationAssistantAccessGrantedForUser(
assistant, getCallingUserHandle().getIdentifier(), granted);
}
@Override
public void setNotificationListenerAccessGrantedForUser(ComponentName listener, int userId,
- boolean granted) throws RemoteException {
+ boolean granted) {
Preconditions.checkNotNull(listener);
checkCallerIsSystemOrShell();
final long identity = Binder.clearCallingIdentity();
@@ -3766,32 +3792,12 @@
@Override
public void setNotificationAssistantAccessGrantedForUser(ComponentName assistant,
- int userId, boolean granted) throws RemoteException {
+ int userId, boolean granted) {
checkCallerIsSystemOrShell();
- if (assistant == null) {
- ComponentName allowedAssistant = CollectionUtils.firstOrNull(
- mAssistants.getAllowedComponents(userId));
- if (allowedAssistant != null) {
- setNotificationAssistantAccessGrantedForUser(allowedAssistant, userId, false);
- }
- return;
- }
+ mAssistants.setUserSet(userId, true);
final long identity = Binder.clearCallingIdentity();
try {
- if (mAllowedManagedServicePackages.test(assistant.getPackageName())) {
- mConditionProviders.setPackageOrComponentEnabled(assistant.flattenToString(),
- userId, false, granted);
- mAssistants.setPackageOrComponentEnabled(assistant.flattenToString(),
- userId, true, granted);
-
- getContext().sendBroadcastAsUser(new Intent(
- NotificationManager.ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED)
- .setPackage(assistant.getPackageName())
- .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY),
- UserHandle.of(userId), null);
-
- handleSavePolicyFile();
- }
+ setNotificationAssistantAccessGrantedForUserInternal(assistant, userId, granted);
} finally {
Binder.restoreCallingIdentity(identity);
}
@@ -4004,6 +4010,34 @@
}
};
+ @VisibleForTesting
+ protected void setNotificationAssistantAccessGrantedForUserInternal(
+ ComponentName assistant, int userId, boolean granted) {
+ if (assistant == null) {
+ ComponentName allowedAssistant = CollectionUtils.firstOrNull(
+ mAssistants.getAllowedComponents(userId));
+ if (allowedAssistant != null) {
+ setNotificationAssistantAccessGrantedForUserInternal(
+ allowedAssistant, userId, false);
+ }
+ return;
+ }
+ if (mAllowedManagedServicePackages.test(assistant.getPackageName())) {
+ mConditionProviders.setPackageOrComponentEnabled(assistant.flattenToString(),
+ userId, false, granted);
+ mAssistants.setPackageOrComponentEnabled(assistant.flattenToString(),
+ userId, true, granted);
+
+ getContext().sendBroadcastAsUser(new Intent(
+ NotificationManager.ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED)
+ .setPackage(assistant.getPackageName())
+ .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY),
+ UserHandle.of(userId), null);
+
+ handleSavePolicyFile();
+ }
+ }
+
private void applyAdjustment(NotificationRecord r, Adjustment adjustment) {
if (r == null) {
return;
@@ -7091,6 +7125,13 @@
public class NotificationAssistants extends ManagedServices {
static final String TAG_ENABLED_NOTIFICATION_ASSISTANTS = "enabled_assistants";
+ private static final String ATT_USER_SET = "user_set";
+
+ private final Object mLock = new Object();
+
+ @GuardedBy("mLock")
+ private ArrayMap<Integer, Boolean> mUserSetMap = new ArrayMap<>();
+
public NotificationAssistants(Context context, Object lock, UserProfiles up,
IPackageManager pm) {
super(context, lock, up, pm);
@@ -7157,6 +7198,30 @@
}
}
+ boolean hasUserSet(int userId) {
+ synchronized (mLock) {
+ return mUserSetMap.getOrDefault(userId, false);
+ }
+ }
+
+ void setUserSet(int userId, boolean set) {
+ synchronized (mLock) {
+ mUserSetMap.put(userId, set);
+ }
+ }
+
+ @Override
+ protected void writeExtraAttributes(XmlSerializer out, int userId) throws IOException {
+ out.attribute(null, ATT_USER_SET, Boolean.toString(hasUserSet(userId)));
+ }
+
+ @Override
+ protected void readExtraAttributes(String tag, XmlPullParser parser, int userId)
+ throws IOException {
+ boolean userSet = XmlUtils.readBooleanAttribute(parser, ATT_USER_SET, false);
+ setUserSet(userId, userSet);
+ }
+
private void notifySeen(final ManagedServiceInfo info,
final ArrayList<String> keys) {
final INotificationListener assistant = (INotificationListener) info.service;
@@ -7314,13 +7379,13 @@
return !getServices().isEmpty();
}
- protected void ensureAssistant() {
+ protected void resetDefaultAssistantsIfNecessary() {
final List<UserInfo> activeUsers = mUm.getUsers(true);
for (UserInfo userInfo : activeUsers) {
int userId = userInfo.getUserHandle().getIdentifier();
- if (getAllowedPackages(userId).isEmpty()) {
+ if (!hasUserSet(userId)) {
Slog.d(TAG, "Approving default notification assistant for user " + userId);
- readDefaultAssistant(userId);
+ setDefaultAssistantForUser(userId);
}
}
}
@@ -7334,16 +7399,24 @@
if (!allowedComponents.isEmpty()) {
ComponentName currentComponent = CollectionUtils.firstOrNull(allowedComponents);
if (currentComponent.flattenToString().equals(pkgOrComponent)) return;
- try {
- getBinderService().setNotificationAssistantAccessGrantedForUser(
- currentComponent, userId, false);
- } catch (RemoteException e) {
- e.rethrowFromSystemServer();
- }
+ setNotificationAssistantAccessGrantedForUserInternal(
+ currentComponent, userId, false);
}
}
super.setPackageOrComponentEnabled(pkgOrComponent, userId, isPrimary, enabled);
}
+
+ @Override
+ public void dump(PrintWriter pw, DumpFilter filter) {
+ super.dump(pw, filter);
+ pw.println(" Has user set:");
+ synchronized (mLock) {
+ Set<Integer> userIds = mUserSetMap.keySet();
+ for (int userId : userIds) {
+ pw.println(" userId=" + userId + " value=" + mUserSetMap.get(userId));
+ }
+ }
+ }
}
public class NotificationListeners extends ManagedServices {
@@ -7896,6 +7969,19 @@
}
@VisibleForTesting
+ void resetAssistantUserSet(int userId) {
+ mAssistants.setUserSet(userId, false);
+ handleSavePolicyFile();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ ComponentName getApprovedAssistant(int userId) {
+ List<ComponentName> allowedComponents = mAssistants.getAllowedComponents(userId);
+ return CollectionUtils.firstOrNull(allowedComponents);
+ }
+
+ @VisibleForTesting
protected void simulatePackageSuspendBroadcast(boolean suspend, String pkg) {
// only use for testing: mimic receive broadcast that package is (un)suspended
// but does not actually (un)suspend the package
diff --git a/services/core/java/com/android/server/notification/NotificationShellCmd.java b/services/core/java/com/android/server/notification/NotificationShellCmd.java
index 26cc0c1..dd0f420 100644
--- a/services/core/java/com/android/server/notification/NotificationShellCmd.java
+++ b/services/core/java/com/android/server/notification/NotificationShellCmd.java
@@ -58,6 +58,8 @@
+ " disallow_dnd PACKAGE [user_id (current user if not specified)]\n"
+ " suspend_package PACKAGE\n"
+ " unsuspend_package PACKAGE\n"
+ + " reset_assistant_user_set [user_id (current user if not specified)]\n"
+ + " get_approved_assistant [user_id (current user if not specified)]\n"
+ " post [--help | flags] TAG TEXT";
private static final String NOTIFY_USAGE =
@@ -199,8 +201,29 @@
mDirectService.simulatePackageDistractionBroadcast(
Integer.parseInt(getNextArgRequired()),
getNextArgRequired().split(","));
+ break;
}
- break;
+ case "reset_assistant_user_set": {
+ int userId = ActivityManager.getCurrentUser();
+ if (peekNextArg() != null) {
+ userId = Integer.parseInt(getNextArgRequired());
+ }
+ mDirectService.resetAssistantUserSet(userId);
+ break;
+ }
+ case "get_approved_assistant": {
+ int userId = ActivityManager.getCurrentUser();
+ if (peekNextArg() != null) {
+ userId = Integer.parseInt(getNextArgRequired());
+ }
+ ComponentName approvedAssistant = mDirectService.getApprovedAssistant(userId);
+ if (approvedAssistant == null) {
+ pw.println("null");
+ } else {
+ pw.println(approvedAssistant.flattenToString());
+ }
+ break;
+ }
case "post":
case "notify":
doNotify(pw);
diff --git a/services/core/java/com/android/server/signedconfig/TEST_MAPPING b/services/core/java/com/android/server/signedconfig/TEST_MAPPING
new file mode 100644
index 0000000..88e068f
--- /dev/null
+++ b/services/core/java/com/android/server/signedconfig/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsSignedConfigHostTestCases"
+ }
+ ]
+}
diff --git a/services/tests/uiservicestests/Android.bp b/services/tests/uiservicestests/Android.bp
index e4ab257..92198fa 100644
--- a/services/tests/uiservicestests/Android.bp
+++ b/services/tests/uiservicestests/Android.bp
@@ -22,6 +22,7 @@
"platform-test-annotations",
"hamcrest-library",
"testables",
+ "truth-prebuilt",
],
libs: [
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAssistantsTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAssistantsTest.java
index 19b567f..88186cd 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAssistantsTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAssistantsTest.java
@@ -114,10 +114,10 @@
@Test
public void testXmlUpgrade() {
- mAssistants.ensureAssistant();
+ mAssistants.resetDefaultAssistantsIfNecessary();
//once per user
- verify(mNm, times(mUm.getUsers().size())).readDefaultAssistant(anyInt());
+ verify(mNm, times(mUm.getUsers().size())).setDefaultAssistantForUser(anyInt());
}
@Test
@@ -132,7 +132,7 @@
parser.nextTag();
mAssistants.readXml(parser, null, false, UserHandle.USER_ALL);
- verify(mNm, never()).readDefaultAssistant(anyInt());
+ verify(mNm, never()).setDefaultAssistantForUser(anyInt());
verify(mAssistants, times(1)).addApprovedList(
new ComponentName("b", "b").flattenToString(),10, true);
}
@@ -143,13 +143,13 @@
ComponentName component2 = ComponentName.unflattenFromString("package/Component2");
mAssistants.setPackageOrComponentEnabled(component1.flattenToString(), mZero.id, true,
true);
- verify(mINm, never()).setNotificationAssistantAccessGrantedForUser(any(ComponentName.class),
- eq(mZero.id), anyBoolean());
+ verify(mNm, never()).setNotificationAssistantAccessGrantedForUserInternal(
+ any(ComponentName.class), eq(mZero.id), anyBoolean());
mAssistants.setPackageOrComponentEnabled(component2.flattenToString(), mZero.id, true,
true);
- verify(mINm, times(1)).setNotificationAssistantAccessGrantedForUser(component1, mZero.id,
- false);
+ verify(mNm, times(1)).setNotificationAssistantAccessGrantedForUserInternal(
+ component1, mZero.id, false);
}
@Test
@@ -159,7 +159,7 @@
true);
mAssistants.setPackageOrComponentEnabled(component1.flattenToString(), mZero.id, true,
true);
- verify(mINm, never()).setNotificationAssistantAccessGrantedForUser(any(ComponentName.class),
- eq(mZero.id), anyBoolean());
+ verify(mNm, never()).setNotificationAssistantAccessGrantedForUserInternal(
+ any(ComponentName.class), eq(mZero.id), anyBoolean());
}
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
index 31788ae..5df1941 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -98,7 +98,9 @@
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.provider.DeviceConfig;
import android.provider.MediaStore;
+import android.provider.Settings;
import android.service.notification.Adjustment;
import android.service.notification.NotificationListenerService;
import android.service.notification.NotificationStats;
@@ -111,9 +113,13 @@
import android.testing.TestableLooper.RunWithLooper;
import android.text.Html;
import android.util.ArrayMap;
+import android.util.ArraySet;
import android.util.AtomicFile;
+import androidx.annotation.Nullable;
+
import com.android.internal.R;
+import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
import com.android.internal.statusbar.NotificationVisibility;
import com.android.server.LocalServices;
import com.android.server.SystemService;
@@ -142,6 +148,7 @@
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -153,6 +160,13 @@
@RunWithLooper
public class NotificationManagerServiceTest extends UiServiceTestCase {
private static final String TEST_CHANNEL_ID = "NotificationManagerServiceTestChannelId";
+ private static final String CLEAR_DEVICE_CONFIG_KEY_CMD =
+ "device_config delete " + DeviceConfig.NAMESPACE_SYSTEMUI + " "
+ + SystemUiDeviceConfigFlags.NAS_DEFAULT_SERVICE;
+ private static final String SET_DEFAULT_ASSISTANT_DEVICE_CONFIG_CMD =
+ "device_config put " + DeviceConfig.NAMESPACE_SYSTEMUI + " "
+ + SystemUiDeviceConfigFlags.NAS_DEFAULT_SERVICE;
+
private final int mUid = Binder.getCallingUid();
private TestableNotificationManagerService mService;
private INotificationManager mBinderService;
@@ -208,6 +222,9 @@
AppOpsManager mAppOpsManager;
@Mock
private UserManagerService mUserMangerService;
+ @Mock
+ private TestableNotificationManagerService.NotificationAssistantAccessGrantedCallback
+ mNotificationAssistantAccessGrantedCallback;
// Use a Testable subclass so we can simulate calls from the system without failing.
private static class TestableNotificationManagerService extends NotificationManagerService {
@@ -215,6 +232,8 @@
boolean isSystemUid = true;
int countLogSmartSuggestionsVisible = 0;
UserManagerService mUserManagerService;
+ @Nullable
+ NotificationAssistantAccessGrantedCallback mNotificationAssistantAccessGrantedCallback;
TestableNotificationManagerService(Context context, UserManagerService userManagerService) {
super(context);
@@ -258,6 +277,26 @@
UserManagerService getUserManagerService() {
return mUserManagerService;
}
+
+ @Override
+ protected void setNotificationAssistantAccessGrantedForUserInternal(
+ ComponentName assistant, int userId, boolean granted) {
+ if (mNotificationAssistantAccessGrantedCallback != null) {
+ mNotificationAssistantAccessGrantedCallback.onGranted(assistant, userId, granted);
+ return;
+ }
+ super.setNotificationAssistantAccessGrantedForUserInternal(assistant, userId, granted);
+ }
+
+ private void setNotificationAssistantAccessGrantedCallback(
+ @Nullable NotificationAssistantAccessGrantedCallback callback) {
+ this.mNotificationAssistantAccessGrantedCallback = callback;
+ }
+
+ interface NotificationAssistantAccessGrantedCallback {
+ void onGranted(ComponentName assistant, int userId, boolean granted);
+ }
+
}
private class TestableToastCallback extends ITransientNotification.Stub {
@@ -352,6 +391,7 @@
@After
public void tearDown() throws Exception {
mFile.delete();
+ clearDeviceConfig();
}
public void waitForIdle() {
@@ -2029,6 +2069,7 @@
verify(mContext, times(1)).sendBroadcastAsUser(any(), eq(user), any());
verify(mAssistants, times(1)).setPackageOrComponentEnabled(
c.flattenToString(), user.getIdentifier(), true, true);
+ verify(mAssistants).setUserSet(10, true);
verify(mConditionProviders, times(1)).setPackageOrComponentEnabled(
c.flattenToString(), user.getIdentifier(), false, true);
verify(mListeners, never()).setPackageOrComponentEnabled(
@@ -2518,7 +2559,7 @@
verify(mListeners, times(1)).migrateToXml();
verify(mConditionProviders, times(1)).migrateToXml();
verify(mAssistants, times(1)).migrateToXml();
- verify(mAssistants, never()).ensureAssistant();
+ verify(mAssistants, times(2)).resetDefaultAssistantsIfNecessary();
}
@Test
@@ -2538,7 +2579,7 @@
verify(mListeners, times(2)).migrateToXml();
verify(mConditionProviders, times(2)).migrateToXml();
verify(mAssistants, times(2)).migrateToXml();
- verify(mAssistants, never()).ensureAssistant();
+ verify(mAssistants, times(2)).resetDefaultAssistantsIfNecessary();
}
@Test
@@ -4101,4 +4142,78 @@
verify(mListeners).notifyRemovedLocked(any(), anyInt(), captor.capture());
assertNotNull(captor.getValue());
}
+
+ @Test
+ public void setDefaultAssistantForUser_fromConfigXml() {
+ clearDeviceConfig();
+ ComponentName xmlConfig = new ComponentName("config", "xml");
+ when(mResources
+ .getString(
+ com.android.internal.R.string.config_defaultAssistantAccessComponent))
+ .thenReturn(xmlConfig.flattenToString());
+ when(mContext.getResources()).thenReturn(mResources);
+ when(mAssistants.queryPackageForServices(eq(null), anyInt(), eq(0)))
+ .thenReturn(Collections.singleton(xmlConfig));
+ mService.setNotificationAssistantAccessGrantedCallback(
+ mNotificationAssistantAccessGrantedCallback);
+
+ mService.setDefaultAssistantForUser(0);
+
+ verify(mNotificationAssistantAccessGrantedCallback)
+ .onGranted(eq(xmlConfig), eq(0), eq(true));
+ }
+
+ @Test
+ public void setDefaultAssistantForUser_fromDeviceConfig() {
+ ComponentName xmlConfig = new ComponentName("xml", "config");
+ ComponentName deviceConfig = new ComponentName("device", "config");
+ setDefaultAssistantInDeviceConfig(deviceConfig.flattenToString());
+ when(mResources
+ .getString(com.android.internal.R.string.config_defaultAssistantAccessComponent))
+ .thenReturn(xmlConfig.flattenToString());
+ when(mContext.getResources()).thenReturn(mResources);
+ when(mAssistants.queryPackageForServices(eq(null), anyInt(), eq(0)))
+ .thenReturn(new ArraySet<>(Arrays.asList(xmlConfig, deviceConfig)));
+ mService.setNotificationAssistantAccessGrantedCallback(
+ mNotificationAssistantAccessGrantedCallback);
+
+ mService.setDefaultAssistantForUser(0);
+
+ verify(mNotificationAssistantAccessGrantedCallback)
+ .onGranted(eq(deviceConfig), eq(0), eq(true));
+ }
+
+ @Test
+ public void setDefaultAssistantForUser_deviceConfigInvalid() {
+ ComponentName xmlConfig = new ComponentName("xml", "config");
+ ComponentName deviceConfig = new ComponentName("device", "config");
+ setDefaultAssistantInDeviceConfig(deviceConfig.flattenToString());
+ when(mResources
+ .getString(com.android.internal.R.string.config_defaultAssistantAccessComponent))
+ .thenReturn(xmlConfig.flattenToString());
+ when(mContext.getResources()).thenReturn(mResources);
+ // Only xmlConfig is valid, deviceConfig is not.
+ when(mAssistants.queryPackageForServices(eq(null), anyInt(), eq(0)))
+ .thenReturn(Collections.singleton(xmlConfig));
+ mService.setNotificationAssistantAccessGrantedCallback(
+ mNotificationAssistantAccessGrantedCallback);
+
+ mService.setDefaultAssistantForUser(0);
+
+ verify(mNotificationAssistantAccessGrantedCallback)
+ .onGranted(eq(xmlConfig), eq(0), eq(true));
+ }
+
+ private void clearDeviceConfig() {
+ DeviceConfig.resetToDefaults(
+ Settings.RESET_MODE_PACKAGE_DEFAULTS, DeviceConfig.NAMESPACE_SYSTEMUI);
+ }
+
+ private void setDefaultAssistantInDeviceConfig(String componentName) {
+ DeviceConfig.setProperty(
+ DeviceConfig.NAMESPACE_SYSTEMUI,
+ SystemUiDeviceConfigFlags.NAS_DEFAULT_SERVICE,
+ componentName,
+ false);
+ }
}
diff --git a/tools/apilint/apilint.py b/tools/apilint/apilint.py
index a91fbe7..f967c2f 100644
--- a/tools/apilint/apilint.py
+++ b/tools/apilint/apilint.py
@@ -170,6 +170,7 @@
self.ctors = []
self.fields = []
self.methods = []
+ self.annotations = []
if sig_format == 2:
V2LineParser(raw).parse_into_class(self)
@@ -353,8 +354,8 @@
def parse_into_class(self, clazz):
clazz.split = []
- annotations = self.parse_annotations()
- if "@Deprecated" in annotations:
+ clazz.annotations = self.parse_annotations()
+ if "@Deprecated" in clazz.annotations:
clazz.split.append("deprecated")
clazz.split.extend(self.parse_modifiers())
kind = self.parse_one_of("class", "interface", "@interface", "enum")
@@ -2000,6 +2001,16 @@
@verifier
+def verify_intdef(clazz):
+ """intdefs must be @hide, because the constant names cannot be stored in
+ the stubs (only the values are, which is not useful)"""
+ if "@interface" not in clazz.split:
+ return
+ if "@IntDef" in clazz.annotations or "@LongDef" in clazz.annotations:
+ error(clazz, None, None, "@IntDef and @LongDef annotations must be @hide")
+
+
+@verifier
def verify_singleton(clazz):
"""Catch singleton objects with constructors."""