Merge "Remove TODO. We won't cache LockPatternUtils"
diff --git a/Android.bp b/Android.bp
index aa47d7b..e4b22d2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1516,6 +1516,10 @@
api_file: "api/test-current.txt",
removed_api_file: "api/test-removed.txt",
},
+ api_lint: {
+ enabled: true,
+ baseline_file: "api/test-lint-baseline.txt",
+ },
},
}
@@ -1600,7 +1604,6 @@
filegroup {
name: "framework-ims-common-shared-srcs",
srcs: [
- "core/java/android/os/AsyncResult.java",
"core/java/android/os/RegistrantList.java",
"core/java/android/os/Registrant.java",
"core/java/com/android/internal/os/SomeArgs.java",
diff --git a/apex/jobscheduler/framework/java/android/app/DeviceIdleFrameworkInitializer.java b/apex/jobscheduler/framework/java/android/app/DeviceIdleFrameworkInitializer.java
index 5b14056..cb1e6d9 100644
--- a/apex/jobscheduler/framework/java/android/app/DeviceIdleFrameworkInitializer.java
+++ b/apex/jobscheduler/framework/java/android/app/DeviceIdleFrameworkInitializer.java
@@ -32,7 +32,7 @@
public class DeviceIdleFrameworkInitializer {
private static IDeviceIdleController sIDeviceIdleController;
- static {
+ public static void initialize() {
SystemServiceRegistry.registerCachedService(
Context.DEVICE_IDLE_CONTROLLER, DeviceIdleManager.class,
(context, b) -> new DeviceIdleManager(
diff --git a/apex/jobscheduler/framework/java/android/app/job/JobSchedulerFrameworkInitializer.java b/apex/jobscheduler/framework/java/android/app/job/JobSchedulerFrameworkInitializer.java
index c90b872..cc6ca3d 100644
--- a/apex/jobscheduler/framework/java/android/app/job/JobSchedulerFrameworkInitializer.java
+++ b/apex/jobscheduler/framework/java/android/app/job/JobSchedulerFrameworkInitializer.java
@@ -28,7 +28,7 @@
* @hide
*/
public class JobSchedulerFrameworkInitializer {
- static {
+ public static void initialize() {
SystemServiceRegistry.registerStaticService(
Context.JOB_SCHEDULER_SERVICE, JobScheduler.class,
(b) -> new JobSchedulerImpl(IJobScheduler.Stub.asInterface(b)));
diff --git a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
index a1734d8..eb22d09 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
@@ -899,7 +899,8 @@
}
final private IUidObserver mUidObserver = new IUidObserver.Stub() {
- @Override public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ @Override public void onUidStateChanged(int uid, int procState, long procStateSeq,
+ int capability) {
mHandler.obtainMessage(MSG_UID_STATE_CHANGED, uid, procState).sendToTarget();
}
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java
index cda5244..3aef5d1 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java
@@ -466,7 +466,7 @@
private final IUidObserver mUidObserver = new IUidObserver.Stub() {
@Override
- public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
mHandler.obtainMessage(MSG_UID_PROCESS_STATE_CHANGED, uid, procState).sendToTarget();
}
diff --git a/api/current.txt b/api/current.txt
index 2cf1f44..e78bc31 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -2827,7 +2827,7 @@
method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
method @NonNull public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController();
method @NonNull public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController(int);
- method @RequiresPermission(android.Manifest.permission.USE_FINGERPRINT) @NonNull public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
+ method @NonNull @RequiresPermission(android.Manifest.permission.USE_FINGERPRINT) public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
method @NonNull public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
method public final android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
@@ -3541,11 +3541,11 @@
package android.annotation {
- @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface SuppressLint {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface SuppressLint {
method public abstract String[] value();
}
- @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface TargetApi {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD}) public @interface TargetApi {
method public abstract int value();
}
@@ -3758,7 +3758,7 @@
method public void onContentChanged();
method public boolean onContextItemSelected(@NonNull android.view.MenuItem);
method public void onContextMenuClosed(@NonNull android.view.Menu);
- method @MainThread @CallSuper protected void onCreate(@Nullable android.os.Bundle);
+ method @CallSuper @MainThread protected void onCreate(@Nullable android.os.Bundle);
method public void onCreate(@Nullable android.os.Bundle, @Nullable android.os.PersistableBundle);
method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
method @Nullable public CharSequence onCreateDescription();
@@ -3901,8 +3901,8 @@
method @Deprecated public void startActivityFromChild(@NonNull android.app.Activity, @RequiresPermission android.content.Intent, int, @Nullable android.os.Bundle);
method @Deprecated public void startActivityFromFragment(@NonNull android.app.Fragment, @RequiresPermission android.content.Intent, int);
method @Deprecated public void startActivityFromFragment(@NonNull android.app.Fragment, @RequiresPermission android.content.Intent, int, @Nullable android.os.Bundle);
- method public boolean startActivityIfNeeded(@RequiresPermission @NonNull android.content.Intent, int);
- method public boolean startActivityIfNeeded(@RequiresPermission @NonNull android.content.Intent, int, @Nullable android.os.Bundle);
+ method public boolean startActivityIfNeeded(@NonNull @RequiresPermission android.content.Intent, int);
+ method public boolean startActivityIfNeeded(@NonNull @RequiresPermission android.content.Intent, int, @Nullable android.os.Bundle);
method public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
method public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method @Deprecated public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
@@ -3910,8 +3910,8 @@
method public void startLocalVoiceInteraction(android.os.Bundle);
method public void startLockTask();
method @Deprecated public void startManagingCursor(android.database.Cursor);
- method public boolean startNextMatchingActivity(@RequiresPermission @NonNull android.content.Intent);
- method public boolean startNextMatchingActivity(@RequiresPermission @NonNull android.content.Intent, @Nullable android.os.Bundle);
+ method public boolean startNextMatchingActivity(@NonNull @RequiresPermission android.content.Intent);
+ method public boolean startNextMatchingActivity(@NonNull @RequiresPermission android.content.Intent, @Nullable android.os.Bundle);
method public void startPostponedEnterTransition();
method public void startSearch(@Nullable String, boolean, @Nullable android.os.Bundle, boolean);
method public void stopLocalVoiceInteraction();
@@ -6714,7 +6714,7 @@
method @NonNull public java.util.Set<java.lang.String> getAffiliationIds(@NonNull android.content.ComponentName);
method @Nullable public java.util.Set<java.lang.String> getAlwaysOnVpnLockdownWhitelist(@NonNull android.content.ComponentName);
method @Nullable public String getAlwaysOnVpnPackage(@NonNull android.content.ComponentName);
- method @WorkerThread @NonNull public android.os.Bundle getApplicationRestrictions(@Nullable android.content.ComponentName, String);
+ method @NonNull @WorkerThread public android.os.Bundle getApplicationRestrictions(@Nullable android.content.ComponentName, String);
method @Deprecated @Nullable public String getApplicationRestrictionsManagingPackage(@NonNull android.content.ComponentName);
method public boolean getAutoTimeRequired();
method @NonNull public java.util.List<android.os.UserHandle> getBindDeviceAdminTargetUsers(@NonNull android.content.ComponentName);
@@ -7640,7 +7640,7 @@
method public int checkSlicePermission(@NonNull android.net.Uri, int, int);
method @NonNull public java.util.List<android.net.Uri> getPinnedSlices();
method @NonNull public java.util.Set<android.app.slice.SliceSpec> getPinnedSpecs(android.net.Uri);
- method @WorkerThread @NonNull public java.util.Collection<android.net.Uri> getSliceDescendants(@NonNull android.net.Uri);
+ method @NonNull @WorkerThread public java.util.Collection<android.net.Uri> getSliceDescendants(@NonNull android.net.Uri);
method public void grantSlicePermission(@NonNull String, @NonNull android.net.Uri);
method @Nullable public android.net.Uri mapIntentToUri(@NonNull android.content.Intent);
method public void pinSlice(@NonNull android.net.Uri, @NonNull java.util.Set<android.app.slice.SliceSpec>);
@@ -7796,10 +7796,10 @@
public class StorageStatsManager {
method @WorkerThread public long getFreeBytes(@NonNull java.util.UUID) throws java.io.IOException;
method @WorkerThread public long getTotalBytes(@NonNull java.util.UUID) throws java.io.IOException;
- method @WorkerThread @NonNull public android.app.usage.ExternalStorageStats queryExternalStatsForUser(@NonNull java.util.UUID, @NonNull android.os.UserHandle) throws java.io.IOException;
- method @WorkerThread @NonNull public android.app.usage.StorageStats queryStatsForPackage(@NonNull java.util.UUID, @NonNull String, @NonNull android.os.UserHandle) throws java.io.IOException, android.content.pm.PackageManager.NameNotFoundException;
- method @WorkerThread @NonNull public android.app.usage.StorageStats queryStatsForUid(@NonNull java.util.UUID, int) throws java.io.IOException;
- method @WorkerThread @NonNull public android.app.usage.StorageStats queryStatsForUser(@NonNull java.util.UUID, @NonNull android.os.UserHandle) throws java.io.IOException;
+ method @NonNull @WorkerThread public android.app.usage.ExternalStorageStats queryExternalStatsForUser(@NonNull java.util.UUID, @NonNull android.os.UserHandle) throws java.io.IOException;
+ method @NonNull @WorkerThread public android.app.usage.StorageStats queryStatsForPackage(@NonNull java.util.UUID, @NonNull String, @NonNull android.os.UserHandle) throws java.io.IOException, android.content.pm.PackageManager.NameNotFoundException;
+ method @NonNull @WorkerThread public android.app.usage.StorageStats queryStatsForUid(@NonNull java.util.UUID, int) throws java.io.IOException;
+ method @NonNull @WorkerThread public android.app.usage.StorageStats queryStatsForUser(@NonNull java.util.UUID, @NonNull android.os.UserHandle) throws java.io.IOException;
}
public final class UsageEvents implements android.os.Parcelable {
@@ -8059,9 +8059,9 @@
method public boolean isMultipleAdvertisementSupported();
method public boolean isOffloadedFilteringSupported();
method public boolean isOffloadedScanBatchingSupported();
- method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothServerSocket listenUsingInsecureL2capChannel() throws java.io.IOException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingInsecureL2capChannel() throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingInsecureRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
- method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothServerSocket listenUsingL2capChannel() throws java.io.IOException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingL2capChannel() throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setName(String);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean startDiscovery();
@@ -8429,9 +8429,9 @@
method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int);
method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int, android.os.Handler);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean createBond();
- method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothSocket createInsecureL2capChannel(int) throws java.io.IOException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createInsecureL2capChannel(int) throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
- method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothSocket createL2capChannel(int) throws java.io.IOException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createL2capChannel(int) throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
method public int describeContents();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public boolean fetchUuidsWithSdp();
@@ -9616,14 +9616,14 @@
method public static void addPeriodicSync(android.accounts.Account, String, android.os.Bundle, long);
method public static Object addStatusChangeListener(int, android.content.SyncStatusObserver);
method @NonNull public android.content.ContentProviderResult[] applyBatch(@NonNull String, @NonNull java.util.ArrayList<android.content.ContentProviderOperation>) throws android.content.OperationApplicationException, android.os.RemoteException;
- method public final int bulkInsert(@RequiresPermission.Write @NonNull android.net.Uri, @NonNull android.content.ContentValues[]);
+ method public final int bulkInsert(@NonNull @RequiresPermission.Write android.net.Uri, @NonNull android.content.ContentValues[]);
method @Nullable public final android.os.Bundle call(@NonNull android.net.Uri, @NonNull String, @Nullable String, @Nullable android.os.Bundle);
method @Nullable public final android.os.Bundle call(@NonNull String, @NonNull String, @Nullable String, @Nullable android.os.Bundle);
method @Deprecated public void cancelSync(android.net.Uri);
method public static void cancelSync(android.accounts.Account, String);
method public static void cancelSync(android.content.SyncRequest);
method @Nullable public final android.net.Uri canonicalize(@NonNull android.net.Uri);
- method public final int delete(@RequiresPermission.Write @NonNull android.net.Uri, @Nullable String, @Nullable String[]);
+ method public final int delete(@NonNull @RequiresPermission.Write android.net.Uri, @Nullable String, @Nullable String[]);
method @Deprecated public static android.content.SyncInfo getCurrentSync();
method public static java.util.List<android.content.SyncInfo> getCurrentSyncs();
method public static int getIsSyncable(android.accounts.Account, String);
@@ -9636,7 +9636,7 @@
method public static boolean getSyncAutomatically(android.accounts.Account, String);
method @Nullable public final String getType(@NonNull android.net.Uri);
method @NonNull public final android.content.ContentResolver.MimeTypeInfo getTypeInfo(@NonNull String);
- method @Nullable public final android.net.Uri insert(@RequiresPermission.Write @NonNull android.net.Uri, @Nullable android.content.ContentValues);
+ method @Nullable public final android.net.Uri insert(@NonNull @RequiresPermission.Write android.net.Uri, @Nullable android.content.ContentValues);
method public static boolean isSyncActive(android.accounts.Account, String);
method public static boolean isSyncPending(android.accounts.Account, String);
method @NonNull public android.graphics.Bitmap loadThumbnail(@NonNull android.net.Uri, @NonNull android.util.Size, @Nullable android.os.CancellationSignal) throws java.io.IOException;
@@ -9655,9 +9655,9 @@
method @Nullable public final android.content.res.AssetFileDescriptor openTypedAssetFile(@NonNull android.net.Uri, @NonNull String, @Nullable android.os.Bundle, @Nullable android.os.CancellationSignal) throws java.io.FileNotFoundException;
method @Nullable public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(@NonNull android.net.Uri, @NonNull String, @Nullable android.os.Bundle) throws java.io.FileNotFoundException;
method @Nullable public final android.content.res.AssetFileDescriptor openTypedAssetFileDescriptor(@NonNull android.net.Uri, @NonNull String, @Nullable android.os.Bundle, @Nullable android.os.CancellationSignal) throws java.io.FileNotFoundException;
- method @Nullable public final android.database.Cursor query(@RequiresPermission.Read @NonNull android.net.Uri, @Nullable String[], @Nullable String, @Nullable String[], @Nullable String);
- method @Nullable public final android.database.Cursor query(@RequiresPermission.Read @NonNull android.net.Uri, @Nullable String[], @Nullable String, @Nullable String[], @Nullable String, @Nullable android.os.CancellationSignal);
- method @Nullable public final android.database.Cursor query(@RequiresPermission.Read @NonNull android.net.Uri, @Nullable String[], @Nullable android.os.Bundle, @Nullable android.os.CancellationSignal);
+ method @Nullable public final android.database.Cursor query(@NonNull @RequiresPermission.Read android.net.Uri, @Nullable String[], @Nullable String, @Nullable String[], @Nullable String);
+ method @Nullable public final android.database.Cursor query(@NonNull @RequiresPermission.Read android.net.Uri, @Nullable String[], @Nullable String, @Nullable String[], @Nullable String, @Nullable android.os.CancellationSignal);
+ method @Nullable public final android.database.Cursor query(@NonNull @RequiresPermission.Read android.net.Uri, @Nullable String[], @Nullable android.os.Bundle, @Nullable android.os.CancellationSignal);
method public final boolean refresh(@NonNull android.net.Uri, @Nullable android.os.Bundle, @Nullable android.os.CancellationSignal);
method public final void registerContentObserver(@NonNull android.net.Uri, boolean, @NonNull android.database.ContentObserver);
method public void releasePersistableUriPermission(@NonNull android.net.Uri, int);
@@ -9672,7 +9672,7 @@
method public void takePersistableUriPermission(@NonNull android.net.Uri, int);
method @Nullable public final android.net.Uri uncanonicalize(@NonNull android.net.Uri);
method public final void unregisterContentObserver(@NonNull android.database.ContentObserver);
- method public final int update(@RequiresPermission.Write @NonNull android.net.Uri, @Nullable android.content.ContentValues, @Nullable String, @Nullable String[]);
+ method public final int update(@NonNull @RequiresPermission.Write android.net.Uri, @Nullable android.content.ContentValues, @Nullable String, @Nullable String[]);
method public static void validateSyncExtrasBundle(android.os.Bundle);
method @NonNull public static android.content.ContentResolver wrap(@NonNull android.content.ContentProvider);
method @NonNull public static android.content.ContentResolver wrap(@NonNull android.content.ContentProviderClient);
@@ -9770,9 +9770,9 @@
public abstract class Context {
ctor public Context();
- method public boolean bindIsolatedService(@RequiresPermission @NonNull android.content.Intent, int, @NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.content.ServiceConnection);
+ method public boolean bindIsolatedService(@NonNull @RequiresPermission android.content.Intent, int, @NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.content.ServiceConnection);
method public abstract boolean bindService(@RequiresPermission android.content.Intent, @NonNull android.content.ServiceConnection, int);
- method public boolean bindService(@RequiresPermission @NonNull android.content.Intent, int, @NonNull java.util.concurrent.Executor, @NonNull android.content.ServiceConnection);
+ method public boolean bindService(@NonNull @RequiresPermission android.content.Intent, int, @NonNull java.util.concurrent.Executor, @NonNull android.content.ServiceConnection);
method @CheckResult(suggest="#enforceCallingOrSelfPermission(String,String)") public abstract int checkCallingOrSelfPermission(@NonNull String);
method @CheckResult(suggest="#enforceCallingOrSelfUriPermission(Uri,int,String)") public abstract int checkCallingOrSelfUriPermission(android.net.Uri, int);
method @CheckResult(suggest="#enforceCallingPermission(String,String)") public abstract int checkCallingPermission(@NonNull String);
@@ -9871,7 +9871,7 @@
method @RequiresPermission("android.permission.INTERACT_ACROSS_USERS") public abstract void sendBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle);
method @RequiresPermission("android.permission.INTERACT_ACROSS_USERS") public abstract void sendBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle, @Nullable String);
method public abstract void sendOrderedBroadcast(@RequiresPermission android.content.Intent, @Nullable String);
- method public abstract void sendOrderedBroadcast(@RequiresPermission @NonNull android.content.Intent, @Nullable String, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle);
+ method public abstract void sendOrderedBroadcast(@NonNull @RequiresPermission android.content.Intent, @Nullable String, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle);
method @RequiresPermission("android.permission.INTERACT_ACROSS_USERS") public abstract void sendOrderedBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle, @Nullable String, android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle);
method @Deprecated @RequiresPermission(android.Manifest.permission.BROADCAST_STICKY) public abstract void sendStickyBroadcast(@RequiresPermission android.content.Intent);
method @Deprecated @RequiresPermission(allOf={"android.permission.INTERACT_ACROSS_USERS", android.Manifest.permission.BROADCAST_STICKY}) public abstract void sendStickyBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle);
@@ -11725,7 +11725,7 @@
method @NonNull public abstract android.graphics.drawable.Drawable getUserBadgedDrawableForDensity(@NonNull android.graphics.drawable.Drawable, @NonNull android.os.UserHandle, @Nullable android.graphics.Rect, int);
method @NonNull public abstract android.graphics.drawable.Drawable getUserBadgedIcon(@NonNull android.graphics.drawable.Drawable, @NonNull android.os.UserHandle);
method @NonNull public abstract CharSequence getUserBadgedLabel(@NonNull CharSequence, @NonNull android.os.UserHandle);
- method @RequiresPermission(value="android.permission.WHITELIST_RESTRICTED_PERMISSIONS", conditional=true) @NonNull public java.util.Set<java.lang.String> getWhitelistedRestrictedPermissions(@NonNull String, int);
+ method @NonNull @RequiresPermission(value="android.permission.WHITELIST_RESTRICTED_PERMISSIONS", conditional=true) public java.util.Set<java.lang.String> getWhitelistedRestrictedPermissions(@NonNull String, int);
method @Nullable public abstract android.content.res.XmlResourceParser getXml(@NonNull String, @XmlRes int, @Nullable android.content.pm.ApplicationInfo);
method public boolean hasSigningCertificate(@NonNull String, @NonNull byte[], int);
method public boolean hasSigningCertificate(int, @NonNull byte[], int);
@@ -12419,7 +12419,7 @@
method public int addLoader(@NonNull android.content.res.loader.ResourceLoader, @NonNull android.content.res.loader.ResourcesProvider);
method public final void finishPreloading();
method public final void flushLayoutCache();
- method @NonNull public android.content.res.XmlResourceParser getAnimation(@AnimatorRes @AnimRes int) throws android.content.res.Resources.NotFoundException;
+ method @NonNull public android.content.res.XmlResourceParser getAnimation(@AnimRes @AnimatorRes int) throws android.content.res.Resources.NotFoundException;
method public final android.content.res.AssetManager getAssets();
method @AnyRes public static int getAttributeSetSourceResId(@Nullable android.util.AttributeSet);
method public boolean getBoolean(@BoolRes int) throws android.content.res.Resources.NotFoundException;
@@ -13725,10 +13725,10 @@
method public static android.graphics.Bitmap createBitmap(int, int, @NonNull android.graphics.Bitmap.Config, boolean, @NonNull android.graphics.ColorSpace);
method public static android.graphics.Bitmap createBitmap(@Nullable android.util.DisplayMetrics, int, int, @NonNull android.graphics.Bitmap.Config, boolean);
method public static android.graphics.Bitmap createBitmap(@Nullable android.util.DisplayMetrics, int, int, @NonNull android.graphics.Bitmap.Config, boolean, @NonNull android.graphics.ColorSpace);
- method public static android.graphics.Bitmap createBitmap(@NonNull @ColorInt int[], int, int, int, int, @NonNull android.graphics.Bitmap.Config);
- method public static android.graphics.Bitmap createBitmap(@NonNull android.util.DisplayMetrics, @NonNull @ColorInt int[], int, int, int, int, @NonNull android.graphics.Bitmap.Config);
- method public static android.graphics.Bitmap createBitmap(@NonNull @ColorInt int[], int, int, android.graphics.Bitmap.Config);
- method public static android.graphics.Bitmap createBitmap(@Nullable android.util.DisplayMetrics, @NonNull @ColorInt int[], int, int, @NonNull android.graphics.Bitmap.Config);
+ method public static android.graphics.Bitmap createBitmap(@ColorInt @NonNull int[], int, int, int, int, @NonNull android.graphics.Bitmap.Config);
+ method public static android.graphics.Bitmap createBitmap(@NonNull android.util.DisplayMetrics, @ColorInt @NonNull int[], int, int, int, int, @NonNull android.graphics.Bitmap.Config);
+ method public static android.graphics.Bitmap createBitmap(@ColorInt @NonNull int[], int, int, android.graphics.Bitmap.Config);
+ method public static android.graphics.Bitmap createBitmap(@Nullable android.util.DisplayMetrics, @ColorInt @NonNull int[], int, int, @NonNull android.graphics.Bitmap.Config);
method @NonNull public static android.graphics.Bitmap createBitmap(@NonNull android.graphics.Picture);
method @NonNull public static android.graphics.Bitmap createBitmap(@NonNull android.graphics.Picture, int, int, @NonNull android.graphics.Bitmap.Config);
method public static android.graphics.Bitmap createScaledBitmap(@NonNull android.graphics.Bitmap, int, int, boolean);
@@ -13961,8 +13961,8 @@
method public void drawDoubleRoundRect(@NonNull android.graphics.RectF, float, float, @NonNull android.graphics.RectF, float, float, @NonNull android.graphics.Paint);
method public void drawDoubleRoundRect(@NonNull android.graphics.RectF, @NonNull float[], @NonNull android.graphics.RectF, @NonNull float[], @NonNull android.graphics.Paint);
method public void drawLine(float, float, float, float, @NonNull android.graphics.Paint);
- method public void drawLines(@Size(multiple=4) @NonNull float[], int, int, @NonNull android.graphics.Paint);
- method public void drawLines(@Size(multiple=4) @NonNull float[], @NonNull android.graphics.Paint);
+ method public void drawLines(@NonNull @Size(multiple=4) float[], int, int, @NonNull android.graphics.Paint);
+ method public void drawLines(@NonNull @Size(multiple=4) float[], @NonNull android.graphics.Paint);
method public void drawOval(@NonNull android.graphics.RectF, @NonNull android.graphics.Paint);
method public void drawOval(float, float, float, float, @NonNull android.graphics.Paint);
method public void drawPaint(@NonNull android.graphics.Paint);
@@ -13972,7 +13972,7 @@
method public void drawPicture(@NonNull android.graphics.Picture, @NonNull android.graphics.Rect);
method public void drawPoint(float, float, @NonNull android.graphics.Paint);
method public void drawPoints(@Size(multiple=2) float[], int, int, @NonNull android.graphics.Paint);
- method public void drawPoints(@Size(multiple=2) @NonNull float[], @NonNull android.graphics.Paint);
+ method public void drawPoints(@NonNull @Size(multiple=2) float[], @NonNull android.graphics.Paint);
method @Deprecated public void drawPosText(@NonNull char[], int, int, @NonNull @Size(multiple=2) float[], @NonNull android.graphics.Paint);
method @Deprecated public void drawPosText(@NonNull String, @NonNull @Size(multiple=2) float[], @NonNull android.graphics.Paint);
method public void drawRGB(int, int, int);
@@ -14333,10 +14333,10 @@
method @AnyThread @NonNull public static android.graphics.ImageDecoder.Source createSource(@NonNull java.nio.ByteBuffer);
method @AnyThread @NonNull public static android.graphics.ImageDecoder.Source createSource(@NonNull java.io.File);
method @AnyThread @NonNull public static android.graphics.ImageDecoder.Source createSource(@NonNull java.util.concurrent.Callable<android.content.res.AssetFileDescriptor>);
- method @WorkerThread @NonNull public static android.graphics.Bitmap decodeBitmap(@NonNull android.graphics.ImageDecoder.Source, @NonNull android.graphics.ImageDecoder.OnHeaderDecodedListener) throws java.io.IOException;
- method @WorkerThread @NonNull public static android.graphics.Bitmap decodeBitmap(@NonNull android.graphics.ImageDecoder.Source) throws java.io.IOException;
- method @WorkerThread @NonNull public static android.graphics.drawable.Drawable decodeDrawable(@NonNull android.graphics.ImageDecoder.Source, @NonNull android.graphics.ImageDecoder.OnHeaderDecodedListener) throws java.io.IOException;
- method @WorkerThread @NonNull public static android.graphics.drawable.Drawable decodeDrawable(@NonNull android.graphics.ImageDecoder.Source) throws java.io.IOException;
+ method @NonNull @WorkerThread public static android.graphics.Bitmap decodeBitmap(@NonNull android.graphics.ImageDecoder.Source, @NonNull android.graphics.ImageDecoder.OnHeaderDecodedListener) throws java.io.IOException;
+ method @NonNull @WorkerThread public static android.graphics.Bitmap decodeBitmap(@NonNull android.graphics.ImageDecoder.Source) throws java.io.IOException;
+ method @NonNull @WorkerThread public static android.graphics.drawable.Drawable decodeDrawable(@NonNull android.graphics.ImageDecoder.Source, @NonNull android.graphics.ImageDecoder.OnHeaderDecodedListener) throws java.io.IOException;
+ method @NonNull @WorkerThread public static android.graphics.drawable.Drawable decodeDrawable(@NonNull android.graphics.ImageDecoder.Source) throws java.io.IOException;
method public int getAllocator();
method @Nullable public android.graphics.Rect getCrop();
method public int getMemorySizePolicy();
@@ -14355,7 +14355,7 @@
method public void setPostProcessor(@Nullable android.graphics.PostProcessor);
method public void setTargetColorSpace(android.graphics.ColorSpace);
method public void setTargetSampleSize(@IntRange(from=1) int);
- method public void setTargetSize(@Px @IntRange(from=1) int, @Px @IntRange(from=1) int);
+ method public void setTargetSize(@IntRange(from=1) @Px int, @IntRange(from=1) @Px int);
method public void setUnpremultipliedRequired(boolean);
field public static final int ALLOCATOR_DEFAULT = 0; // 0x0
field public static final int ALLOCATOR_HARDWARE = 3; // 0x3
@@ -14462,8 +14462,8 @@
}
public class LinearGradient extends android.graphics.Shader {
- ctor public LinearGradient(float, float, float, float, @NonNull @ColorInt int[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
- ctor public LinearGradient(float, float, float, float, @NonNull @ColorLong long[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
+ ctor public LinearGradient(float, float, float, float, @ColorInt @NonNull int[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
+ ctor public LinearGradient(float, float, float, float, @ColorLong @NonNull long[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
ctor public LinearGradient(float, float, float, float, @ColorInt int, @ColorInt int, @NonNull android.graphics.Shader.TileMode);
ctor public LinearGradient(float, float, float, float, @ColorLong long, @ColorLong long, @NonNull android.graphics.Shader.TileMode);
}
@@ -15006,8 +15006,8 @@
}
public class RadialGradient extends android.graphics.Shader {
- ctor public RadialGradient(float, float, float, @NonNull @ColorInt int[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
- ctor public RadialGradient(float, float, float, @NonNull @ColorLong long[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
+ ctor public RadialGradient(float, float, float, @ColorInt @NonNull int[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
+ ctor public RadialGradient(float, float, float, @ColorLong @NonNull long[], @Nullable float[], @NonNull android.graphics.Shader.TileMode);
ctor public RadialGradient(float, float, float, @ColorInt int, @ColorInt int, @NonNull android.graphics.Shader.TileMode);
ctor public RadialGradient(float, float, float, @ColorLong long, @ColorLong long, @NonNull android.graphics.Shader.TileMode);
}
@@ -15265,8 +15265,8 @@
}
public class SweepGradient extends android.graphics.Shader {
- ctor public SweepGradient(float, float, @NonNull @ColorInt int[], @Nullable float[]);
- ctor public SweepGradient(float, float, @NonNull @ColorLong long[], @Nullable float[]);
+ ctor public SweepGradient(float, float, @ColorInt @NonNull int[], @Nullable float[]);
+ ctor public SweepGradient(float, float, @ColorLong @NonNull long[], @Nullable float[]);
ctor public SweepGradient(float, float, @ColorInt int, @ColorInt int);
ctor public SweepGradient(float, float, @ColorLong long, @ColorLong long);
}
@@ -15659,8 +15659,8 @@
method public void setColor(@ColorInt int);
method public void setColor(@Nullable android.content.res.ColorStateList);
method public void setColorFilter(@Nullable android.graphics.ColorFilter);
- method public void setColors(@Nullable @ColorInt int[]);
- method public void setColors(@Nullable @ColorInt int[], @Nullable float[]);
+ method public void setColors(@ColorInt @Nullable int[]);
+ method public void setColors(@ColorInt @Nullable int[], @Nullable float[]);
method public void setCornerRadii(@Nullable float[]);
method public void setCornerRadius(float);
method public void setDither(boolean);
@@ -16108,14 +16108,14 @@
public static class LineBreaker.ParagraphConstraints {
ctor public LineBreaker.ParagraphConstraints();
- method @Px @FloatRange(from=0) public float getDefaultTabStop();
- method @Px @FloatRange(from=0.0f) public float getFirstWidth();
- method @Px @IntRange(from=0) public int getFirstWidthLineCount();
+ method @FloatRange(from=0) @Px public float getDefaultTabStop();
+ method @FloatRange(from=0.0f) @Px public float getFirstWidth();
+ method @IntRange(from=0) @Px public int getFirstWidthLineCount();
method @Nullable public float[] getTabStops();
- method @Px @FloatRange(from=0.0f) public float getWidth();
- method public void setIndent(@Px @FloatRange(from=0.0f) float, @Px @IntRange(from=0) int);
- method public void setTabStops(@Nullable float[], @Px @FloatRange(from=0) float);
- method public void setWidth(@Px @FloatRange(from=0.0f) float);
+ method @FloatRange(from=0.0f) @Px public float getWidth();
+ method public void setIndent(@FloatRange(from=0.0f) @Px float, @IntRange(from=0) @Px int);
+ method public void setTabStops(@Nullable float[], @FloatRange(from=0) @Px float);
+ method public void setWidth(@FloatRange(from=0.0f) @Px float);
}
public static class LineBreaker.Result {
@@ -16138,7 +16138,7 @@
public static final class MeasuredText.Builder {
ctor public MeasuredText.Builder(@NonNull char[]);
ctor public MeasuredText.Builder(@NonNull android.graphics.text.MeasuredText);
- method @NonNull public android.graphics.text.MeasuredText.Builder appendReplacementRun(@NonNull android.graphics.Paint, @IntRange(from=0) int, @Px @FloatRange(from=0) float);
+ method @NonNull public android.graphics.text.MeasuredText.Builder appendReplacementRun(@NonNull android.graphics.Paint, @IntRange(from=0) int, @FloatRange(from=0) @Px float);
method @NonNull public android.graphics.text.MeasuredText.Builder appendStyleRun(@NonNull android.graphics.Paint, @IntRange(from=0) int, boolean);
method @NonNull public android.graphics.text.MeasuredText build();
method @NonNull public android.graphics.text.MeasuredText.Builder setComputeHyphenation(boolean);
@@ -16859,6 +16859,7 @@
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Rational> CONTROL_AE_COMPENSATION_STEP;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Boolean> CONTROL_AE_LOCK_AVAILABLE;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AF_AVAILABLE_MODES;
+ field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.CapabilityAndMaxSize[]> CONTROL_AVAILABLE_BOKEH_CAPABILITIES;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_EFFECTS;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_MODES;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_SCENE_MODES;
@@ -17074,6 +17075,9 @@
field public static final int CONTROL_AWB_STATE_INACTIVE = 0; // 0x0
field public static final int CONTROL_AWB_STATE_LOCKED = 3; // 0x3
field public static final int CONTROL_AWB_STATE_SEARCHING = 1; // 0x1
+ field public static final int CONTROL_BOKEH_MODE_CONTINUOUS = 2; // 0x2
+ field public static final int CONTROL_BOKEH_MODE_OFF = 0; // 0x0
+ field public static final int CONTROL_BOKEH_MODE_STILL_CAPTURE = 1; // 0x1
field public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; // 0x0
field public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6; // 0x6
field public static final int CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7; // 0x7
@@ -17269,6 +17273,7 @@
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> CONTROL_AWB_LOCK;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AWB_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS;
+ field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_BOKEH_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_CAPTURE_INTENT;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_EFFECT_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> CONTROL_ENABLE_ZSL;
@@ -17354,6 +17359,7 @@
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AWB_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AWB_STATE;
+ field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_BOKEH_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_CAPTURE_INTENT;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_EFFECT_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Boolean> CONTROL_ENABLE_ZSL;
@@ -17450,6 +17456,11 @@
field public static final int COUNT = 4; // 0x4
}
+ public final class CapabilityAndMaxSize {
+ method @NonNull public android.util.Size getMaxStreamingSize();
+ method public int getMode();
+ }
+
public final class ColorSpaceTransform {
ctor public ColorSpaceTransform(android.util.Rational[]);
ctor public ColorSpaceTransform(int[]);
@@ -23157,7 +23168,7 @@
method @Nullable public String getGnssHardwareModelName();
method public int getGnssYearOfHardware();
method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public android.location.GpsStatus getGpsStatus(@Nullable android.location.GpsStatus);
- method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) @Nullable public android.location.Location getLastKnownLocation(@NonNull String);
+ method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public android.location.Location getLastKnownLocation(@NonNull String);
method @Nullable public android.location.LocationProvider getProvider(@NonNull String);
method @NonNull public java.util.List<java.lang.String> getProviders(boolean);
method @NonNull public java.util.List<java.lang.String> getProviders(@NonNull android.location.Criteria, boolean);
@@ -28628,17 +28639,17 @@
method public void addDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
method public boolean bindProcessToNetwork(@Nullable android.net.Network);
method @NonNull public android.net.SocketKeepalive createSocketKeepalive(@NonNull android.net.Network, @NonNull android.net.IpSecManager.UdpEncapsulationSocket, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback);
- method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @Nullable public android.net.Network getActiveNetwork();
+ method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.Network getActiveNetwork();
method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo getActiveNetworkInfo();
method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo[] getAllNetworkInfo();
- method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @NonNull public android.net.Network[] getAllNetworks();
+ method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.Network[] getAllNetworks();
method @Deprecated public boolean getBackgroundDataSetting();
method @Nullable public android.net.Network getBoundNetworkForProcess();
method public int getConnectionOwnerUid(int, @NonNull java.net.InetSocketAddress, @NonNull java.net.InetSocketAddress);
method @Nullable public android.net.ProxyInfo getDefaultProxy();
- method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @Nullable public android.net.LinkProperties getLinkProperties(@Nullable android.net.Network);
+ method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.LinkProperties getLinkProperties(@Nullable android.net.Network);
method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public int getMultipathPreference(@Nullable android.net.Network);
- method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @Nullable public android.net.NetworkCapabilities getNetworkCapabilities(@Nullable android.net.Network);
+ method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkCapabilities getNetworkCapabilities(@Nullable android.net.Network);
method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo getNetworkInfo(int);
method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.NetworkInfo getNetworkInfo(@Nullable android.net.Network);
method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public int getNetworkPreference();
@@ -30010,7 +30021,7 @@
method public android.net.wifi.WifiInfo getConnectionInfo();
method public android.net.DhcpInfo getDhcpInfo();
method public int getMaxNumberOfNetworkSuggestionsPerApp();
- method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) @NonNull public java.util.List<android.net.wifi.WifiNetworkSuggestion> getNetworkSuggestions();
+ method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public java.util.List<android.net.wifi.WifiNetworkSuggestion> getNetworkSuggestions();
method @Deprecated @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", "android.permission.NETWORK_SETUP_WIZARD"}) public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
method public java.util.List<android.net.wifi.ScanResult> getScanResults();
method public int getWifiState();
@@ -30961,10 +30972,10 @@
method public boolean isDefaultServiceForCategory(android.content.ComponentName, String);
method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>);
method public boolean removeAidsForService(android.content.ComponentName, String);
- method @RequiresPermission(android.Manifest.permission.NFC) @NonNull public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String);
+ method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String);
method public boolean setPreferredService(android.app.Activity, android.content.ComponentName);
method public boolean supportsAidPrefixRegistration();
- method @RequiresPermission(android.Manifest.permission.NFC) @NonNull public boolean unsetOffHostForService(@NonNull android.content.ComponentName);
+ method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean unsetOffHostForService(@NonNull android.content.ComponentName);
method public boolean unsetPreferredService(android.app.Activity);
field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT";
field public static final String CATEGORY_OTHER = "other";
@@ -34620,7 +34631,7 @@
method public void addData(String, byte[], int);
method public void addFile(String, java.io.File, int) throws java.io.IOException;
method public void addText(String, String);
- method @RequiresPermission(allOf={android.Manifest.permission.READ_LOGS, android.Manifest.permission.PACKAGE_USAGE_STATS}) @Nullable public android.os.DropBoxManager.Entry getNextEntry(String, long);
+ method @Nullable @RequiresPermission(allOf={android.Manifest.permission.READ_LOGS, android.Manifest.permission.PACKAGE_USAGE_STATS}) public android.os.DropBoxManager.Entry getNextEntry(String, long);
method public boolean isTagEnabled(String);
field public static final String ACTION_DROPBOX_ENTRY_ADDED = "android.intent.action.DROPBOX_ENTRY_ADDED";
field public static final String EXTRA_DROPPED_COUNT = "android.os.extra.DROPPED_COUNT";
@@ -44037,7 +44048,7 @@
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.List<android.telecom.PhoneAccountHandle> getSelfManagedPhoneAccounts();
method public android.telecom.PhoneAccountHandle getSimCallManager();
method @Nullable public String getSystemDialerPackage();
- method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @Nullable public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
+ method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailNumber(android.telecom.PhoneAccountHandle);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handleMmi(String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handleMmi(String, android.telecom.PhoneAccountHandle);
@@ -44966,6 +44977,7 @@
method public static int getDefaultSmsSubscriptionId();
method public static android.telephony.SmsManager getSmsManagerForSubscriptionId(int);
method @RequiresPermission(android.Manifest.permission.SMS_FINANCIAL_TRANSACTIONS) public void getSmsMessagesForFinancialApp(android.os.Bundle, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.SmsManager.FinancialSmsCallback);
+ method @Nullable @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getSmscAddress();
method public int getSubscriptionId();
method public void injectSmsPdu(byte[], String, android.app.PendingIntent);
method public void sendDataMessage(String, String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
@@ -44973,6 +44985,7 @@
method public void sendMultipartTextMessage(String, String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
method public void sendTextMessage(String, String, String, android.app.PendingIntent, android.app.PendingIntent);
method @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.SEND_SMS}) public void sendTextMessageWithoutPersisting(String, String, String, android.app.PendingIntent, android.app.PendingIntent);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setSmscAddress(@NonNull String);
field public static final String EXTRA_MMS_DATA = "android.telephony.extra.MMS_DATA";
field public static final String EXTRA_MMS_HTTP_STATUS = "android.telephony.extra.MMS_HTTP_STATUS";
field public static final String MMS_CONFIG_ALIAS_ENABLED = "aliasEnabled";
@@ -45273,9 +45286,9 @@
method public int getDataState();
method @Deprecated @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getDeviceId();
method @Deprecated @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getDeviceId(int);
- method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @Nullable public String getDeviceSoftwareVersion();
- method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @NonNull public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList();
- method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) @NonNull public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList(int);
+ method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getDeviceSoftwareVersion();
+ method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList();
+ method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.Map<java.lang.Integer,java.util.List<android.telephony.emergency.EmergencyNumber>> getEmergencyNumberList(int);
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String[] getForbiddenPlmns();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getGroupIdLevel1();
method public String getIccAuthentication(int, int, String);
@@ -45309,11 +45322,12 @@
method @Nullable public CharSequence getSimSpecificCarrierIdName();
method public int getSimState();
method public int getSimState(int);
+ method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int getSubIdForPhoneAccountHandle(@NonNull android.telecom.PhoneAccountHandle);
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getSubscriberId();
method public int getSupportedModemCount();
method @Nullable public String getTypeAllocationCode();
method @Nullable public String getTypeAllocationCode(int);
- method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @NonNull public java.util.List<android.telephony.UiccCardInfo> getUiccCardsInfo();
+ method @NonNull @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public java.util.List<android.telephony.UiccCardInfo> getUiccCardsInfo();
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVisualVoicemailPackageName();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailAlphaTag();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailNumber();
@@ -47247,7 +47261,7 @@
}
public static class LineHeightSpan.Standard implements android.text.style.LineHeightSpan android.text.ParcelableSpan {
- ctor public LineHeightSpan.Standard(@Px @IntRange(from=1) int);
+ ctor public LineHeightSpan.Standard(@IntRange(from=1) @Px int);
ctor public LineHeightSpan.Standard(@NonNull android.os.Parcel);
method public void chooseHeight(@NonNull CharSequence, int, int, int, int, @NonNull android.graphics.Paint.FontMetricsInt);
method public int describeContents();
@@ -49178,6 +49192,7 @@
public class HapticFeedbackConstants {
field public static final int CLOCK_TICK = 4; // 0x4
+ field public static final int CONFIRM = 16; // 0x10
field public static final int CONTEXT_CLICK = 6; // 0x6
field public static final int FLAG_IGNORE_GLOBAL_SETTING = 2; // 0x2
field public static final int FLAG_IGNORE_VIEW_SETTING = 1; // 0x1
@@ -49185,6 +49200,7 @@
field public static final int KEYBOARD_RELEASE = 7; // 0x7
field public static final int KEYBOARD_TAP = 3; // 0x3
field public static final int LONG_PRESS = 0; // 0x0
+ field public static final int REJECT = 17; // 0x11
field public static final int TEXT_HANDLE_MOVE = 9; // 0x9
field public static final int VIRTUAL_KEY = 1; // 0x1
field public static final int VIRTUAL_KEY_RELEASE = 8; // 0x8
@@ -51393,11 +51409,11 @@
field @Deprecated public static final boolean TRACE_RECYCLER = false;
}
- @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) public static @interface ViewDebug.CapturedViewProperty {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public static @interface ViewDebug.CapturedViewProperty {
method public abstract boolean retrieveReturn() default false;
}
- @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) public static @interface ViewDebug.ExportedProperty {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public static @interface ViewDebug.ExportedProperty {
method public abstract String category() default "";
method public abstract boolean deepExport() default false;
method public abstract android.view.ViewDebug.FlagToString[] flagMapping() default {};
@@ -51409,7 +51425,7 @@
method public abstract boolean resolveId() default false;
}
- @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) public static @interface ViewDebug.FlagToString {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public static @interface ViewDebug.FlagToString {
method public abstract int equals();
method public abstract int mask();
method public abstract String name();
@@ -51427,7 +51443,7 @@
enum_constant @Deprecated public static final android.view.ViewDebug.HierarchyTraceType REQUEST_LAYOUT;
}
- @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) public static @interface ViewDebug.IntToString {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public static @interface ViewDebug.IntToString {
method public abstract int from();
method public abstract String to();
}
@@ -53985,18 +54001,18 @@
}
public interface TextClassifier {
- method @WorkerThread @NonNull public default android.view.textclassifier.TextClassification classifyText(@NonNull android.view.textclassifier.TextClassification.Request);
- method @WorkerThread @NonNull public default android.view.textclassifier.TextClassification classifyText(@NonNull CharSequence, @IntRange(from=0) int, @IntRange(from=0) int, @Nullable android.os.LocaleList);
+ method @NonNull @WorkerThread public default android.view.textclassifier.TextClassification classifyText(@NonNull android.view.textclassifier.TextClassification.Request);
+ method @NonNull @WorkerThread public default android.view.textclassifier.TextClassification classifyText(@NonNull CharSequence, @IntRange(from=0) int, @IntRange(from=0) int, @Nullable android.os.LocaleList);
method public default void destroy();
- method @WorkerThread @NonNull public default android.view.textclassifier.TextLanguage detectLanguage(@NonNull android.view.textclassifier.TextLanguage.Request);
- method @WorkerThread @NonNull public default android.view.textclassifier.TextLinks generateLinks(@NonNull android.view.textclassifier.TextLinks.Request);
+ method @NonNull @WorkerThread public default android.view.textclassifier.TextLanguage detectLanguage(@NonNull android.view.textclassifier.TextLanguage.Request);
+ method @NonNull @WorkerThread public default android.view.textclassifier.TextLinks generateLinks(@NonNull android.view.textclassifier.TextLinks.Request);
method @WorkerThread public default int getMaxGenerateLinksTextLength();
method public default boolean isDestroyed();
method public default void onSelectionEvent(@NonNull android.view.textclassifier.SelectionEvent);
method public default void onTextClassifierEvent(@NonNull android.view.textclassifier.TextClassifierEvent);
- method @WorkerThread @NonNull public default android.view.textclassifier.ConversationActions suggestConversationActions(@NonNull android.view.textclassifier.ConversationActions.Request);
- method @WorkerThread @NonNull public default android.view.textclassifier.TextSelection suggestSelection(@NonNull android.view.textclassifier.TextSelection.Request);
- method @WorkerThread @NonNull public default android.view.textclassifier.TextSelection suggestSelection(@NonNull CharSequence, @IntRange(from=0) int, @IntRange(from=0) int, @Nullable android.os.LocaleList);
+ method @NonNull @WorkerThread public default android.view.textclassifier.ConversationActions suggestConversationActions(@NonNull android.view.textclassifier.ConversationActions.Request);
+ method @NonNull @WorkerThread public default android.view.textclassifier.TextSelection suggestSelection(@NonNull android.view.textclassifier.TextSelection.Request);
+ method @NonNull @WorkerThread public default android.view.textclassifier.TextSelection suggestSelection(@NonNull CharSequence, @IntRange(from=0) int, @IntRange(from=0) int, @Nullable android.os.LocaleList);
field public static final String EXTRA_FROM_TEXT_CLASSIFIER = "android.view.textclassifier.extra.FROM_TEXT_CLASSIFIER";
field public static final String HINT_TEXT_IS_EDITABLE = "android.text_is_editable";
field public static final String HINT_TEXT_IS_NOT_EDITABLE = "android.text_is_not_editable";
@@ -56460,12 +56476,12 @@
ctor public Magnifier.Builder(@NonNull android.view.View);
method @NonNull public android.widget.Magnifier build();
method @NonNull public android.widget.Magnifier.Builder setClippingEnabled(boolean);
- method @NonNull public android.widget.Magnifier.Builder setCornerRadius(@Px @FloatRange(from=0) float);
+ method @NonNull public android.widget.Magnifier.Builder setCornerRadius(@FloatRange(from=0) @Px float);
method @NonNull public android.widget.Magnifier.Builder setDefaultSourceToMagnifierOffset(@Px int, @Px int);
- method @NonNull public android.widget.Magnifier.Builder setElevation(@Px @FloatRange(from=0) float);
+ method @NonNull public android.widget.Magnifier.Builder setElevation(@FloatRange(from=0) @Px float);
method @NonNull public android.widget.Magnifier.Builder setInitialZoom(@FloatRange(from=0.0f) float);
method @NonNull public android.widget.Magnifier.Builder setOverlay(@Nullable android.graphics.drawable.Drawable);
- method @NonNull public android.widget.Magnifier.Builder setSize(@Px @IntRange(from=0) int, @Px @IntRange(from=0) int);
+ method @NonNull public android.widget.Magnifier.Builder setSize(@IntRange(from=0) @Px int, @IntRange(from=0) @Px int);
method @NonNull public android.widget.Magnifier.Builder setSourceBounds(int, int, int, int);
}
@@ -56959,7 +56975,7 @@
method @NonNull public static android.widget.RemoteViews.RemoteResponse fromPendingIntent(@NonNull android.app.PendingIntent);
}
- @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) public static @interface RemoteViews.RemoteView {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public static @interface RemoteViews.RemoteView {
}
public abstract class RemoteViewsService extends android.app.Service {
@@ -57636,7 +57652,7 @@
method public void setExtractedText(android.view.inputmethod.ExtractedText);
method public void setFallbackLineSpacing(boolean);
method public void setFilters(android.text.InputFilter[]);
- method public void setFirstBaselineToTopHeight(@Px @IntRange(from=0) int);
+ method public void setFirstBaselineToTopHeight(@IntRange(from=0) @Px int);
method public void setFontFeatureSettings(@Nullable String);
method public boolean setFontVariationSettings(@Nullable String);
method protected boolean setFrame(int, int, int, int);
@@ -57658,9 +57674,9 @@
method public void setInputType(int);
method public void setJustificationMode(int);
method public void setKeyListener(android.text.method.KeyListener);
- method public void setLastBaselineToBottomHeight(@Px @IntRange(from=0) int);
+ method public void setLastBaselineToBottomHeight(@IntRange(from=0) @Px int);
method public void setLetterSpacing(float);
- method public void setLineHeight(@Px @IntRange(from=0) int);
+ method public void setLineHeight(@IntRange(from=0) @Px int);
method public void setLineSpacing(float, float);
method public void setLines(int);
method public final void setLinkTextColor(@ColorInt int);
@@ -60715,7 +60731,7 @@
ctor public OutOfMemoryError(String);
}
- @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public @interface Override {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface Override {
}
public class Package implements java.lang.reflect.AnnotatedElement {
@@ -61219,7 +61235,7 @@
ctor public StringIndexOutOfBoundsException(int);
}
- @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public @interface SuppressWarnings {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface SuppressWarnings {
method public abstract String[] value();
}
diff --git a/api/system-current.txt b/api/system-current.txt
index 1a6ac8d..6258b33 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -391,7 +391,7 @@
field public static final int UID_STATE_CACHED = 700; // 0x2bc
field public static final int UID_STATE_FOREGROUND = 500; // 0x1f4
field public static final int UID_STATE_FOREGROUND_SERVICE = 400; // 0x190
- field public static final int UID_STATE_FOREGROUND_SERVICE_LOCATION = 300; // 0x12c
+ field @Deprecated public static final int UID_STATE_FOREGROUND_SERVICE_LOCATION = 300; // 0x12c
field public static final int UID_STATE_PERSISTENT = 100; // 0x64
field public static final int UID_STATE_TOP = 200; // 0xc8
}
@@ -602,7 +602,7 @@
method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getStatsMetadata() throws android.app.StatsManager.StatsUnavailableException;
method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void removeConfig(long) throws android.app.StatsManager.StatsUnavailableException;
method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean removeConfiguration(long);
- method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) @NonNull public long[] setActiveConfigsChangedOperation(@Nullable android.app.PendingIntent) throws android.app.StatsManager.StatsUnavailableException;
+ method @NonNull @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] setActiveConfigsChangedOperation(@Nullable android.app.PendingIntent) throws android.app.StatsManager.StatsUnavailableException;
method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void setBroadcastSubscriber(android.app.PendingIntent, long, long) throws android.app.StatsManager.StatsUnavailableException;
method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setBroadcastSubscriber(long, long, android.app.PendingIntent);
method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setDataFetchOperation(long, android.app.PendingIntent);
@@ -1391,7 +1391,7 @@
method public abstract void sendBroadcast(android.content.Intent, @Nullable String, @Nullable android.os.Bundle);
method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public abstract void sendBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle, @Nullable String, @Nullable android.os.Bundle);
method public abstract void sendOrderedBroadcast(@NonNull android.content.Intent, @Nullable String, @Nullable android.os.Bundle, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle);
- method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public void startActivityAsUser(@RequiresPermission @NonNull android.content.Intent, @NonNull android.os.UserHandle);
+ method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public void startActivityAsUser(@NonNull @RequiresPermission android.content.Intent, @NonNull android.os.UserHandle);
field public static final String APP_PREDICTION_SERVICE = "app_prediction";
field public static final String BACKUP_SERVICE = "backup";
field public static final String BATTERY_STATS_SERVICE = "batterystats";
@@ -1884,8 +1884,8 @@
public final class RollbackManager {
method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) public void commitRollback(int, @NonNull java.util.List<android.content.pm.VersionedPackage>, @NonNull android.content.IntentSender);
- method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) @NonNull public java.util.List<android.content.rollback.RollbackInfo> getAvailableRollbacks();
- method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) @NonNull public java.util.List<android.content.rollback.RollbackInfo> getRecentlyCommittedRollbacks();
+ method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) public java.util.List<android.content.rollback.RollbackInfo> getAvailableRollbacks();
+ method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) public java.util.List<android.content.rollback.RollbackInfo> getRecentlyCommittedRollbacks();
field public static final String EXTRA_STATUS = "android.content.rollback.extra.STATUS";
field public static final String EXTRA_STATUS_MESSAGE = "android.content.rollback.extra.STATUS_MESSAGE";
field public static final int STATUS_FAILURE = 1; // 0x1
@@ -2396,24 +2396,24 @@
}
public final class ContextHubManager {
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.ContextHubClientCallback, @NonNull java.util.concurrent.Executor);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.ContextHubClientCallback);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.app.PendingIntent, long);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubTransaction<java.lang.Void> disableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubTransaction<java.lang.Void> enableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.ContextHubClientCallback, @NonNull java.util.concurrent.Executor);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.ContextHubClientCallback);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.app.PendingIntent, long);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubTransaction<java.lang.Void> disableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubTransaction<java.lang.Void> enableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public int[] findNanoAppOnHub(int, @NonNull android.hardware.location.NanoAppFilter);
method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public int[] getContextHubHandles();
method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubInfo getContextHubInfo(int);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public java.util.List<android.hardware.location.ContextHubInfo> getContextHubs();
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<android.hardware.location.ContextHubInfo> getContextHubs();
method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.NanoAppInstanceInfo getNanoAppInstanceInfo(int);
method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public int loadNanoApp(int, @NonNull android.hardware.location.NanoApp);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubTransaction<java.lang.Void> loadNanoApp(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.NanoAppBinary);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubTransaction<java.util.List<android.hardware.location.NanoAppState>> queryNanoApps(@NonNull android.hardware.location.ContextHubInfo);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubTransaction<java.lang.Void> loadNanoApp(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.NanoAppBinary);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubTransaction<java.util.List<android.hardware.location.NanoAppState>> queryNanoApps(@NonNull android.hardware.location.ContextHubInfo);
method @Deprecated public int registerCallback(@NonNull android.hardware.location.ContextHubManager.Callback);
method @Deprecated public int registerCallback(android.hardware.location.ContextHubManager.Callback, android.os.Handler);
method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public int sendMessage(int, int, @NonNull android.hardware.location.ContextHubMessage);
method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public int unloadNanoApp(int);
- method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) @NonNull public android.hardware.location.ContextHubTransaction<java.lang.Void> unloadNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
+ method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.hardware.location.ContextHubTransaction<java.lang.Void> unloadNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
method @Deprecated public int unregisterCallback(@NonNull android.hardware.location.ContextHubManager.Callback);
field public static final int EVENT_HUB_RESET = 6; // 0x6
field public static final int EVENT_NANOAPP_ABORTED = 4; // 0x4
@@ -3099,7 +3099,7 @@
}
public final class UsbPort {
- method @RequiresPermission(android.Manifest.permission.MANAGE_USB) @Nullable public android.hardware.usb.UsbPortStatus getStatus();
+ method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USB) public android.hardware.usb.UsbPortStatus getStatus();
method @RequiresPermission(android.Manifest.permission.MANAGE_USB) public void setRoles(int, int);
}
@@ -3497,7 +3497,7 @@
method @NonNull public android.location.LocationRequest setFastestInterval(long);
method public void setHideFromAppOps(boolean);
method @NonNull public android.location.LocationRequest setInterval(long);
- method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) @NonNull public android.location.LocationRequest setLocationSettingsIgnored(boolean);
+ method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public android.location.LocationRequest setLocationSettingsIgnored(boolean);
method @NonNull public android.location.LocationRequest setLowPowerMode(boolean);
method @NonNull public android.location.LocationRequest setNumUpdates(int);
method @NonNull public android.location.LocationRequest setProvider(@NonNull String);
@@ -3828,7 +3828,7 @@
method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public void deleteModel(java.util.UUID);
method public int getDetectionServiceOperationsTimeout();
method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public android.media.soundtrigger.SoundTriggerManager.Model getModel(java.util.UUID);
- method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) @Nullable public android.hardware.soundtrigger.SoundTrigger.ModuleProperties getModuleProperties();
+ method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public android.hardware.soundtrigger.SoundTrigger.ModuleProperties getModuleProperties();
method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public void updateModel(android.media.soundtrigger.SoundTriggerManager.Model);
}
@@ -4516,7 +4516,8 @@
method public static void closeSocket(@Nullable java.io.FileDescriptor) throws java.io.IOException;
method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int);
method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int);
- method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
+ method @Deprecated @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
+ method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int, @NonNull byte[]);
}
}
@@ -5239,7 +5240,7 @@
}
public class BatteryStatsManager {
- method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) @NonNull public android.os.connectivity.WifiBatteryStats getWifiBatteryStats();
+ method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.os.connectivity.WifiBatteryStats getWifiBatteryStats();
method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void noteFullWifiLockAcquiredFromSource(@NonNull android.os.WorkSource);
method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void noteFullWifiLockReleasedFromSource(@NonNull android.os.WorkSource);
method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void noteWifiBatchedScanStartedFromSource(@NonNull android.os.WorkSource, @IntRange(from=0) int);
@@ -5459,8 +5460,8 @@
method @RequiresPermission("android.permission.REQUEST_INCIDENT_REPORT_APPROVAL") public void cancelAuthorization(android.os.IncidentManager.AuthListener);
method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void deleteIncidentReports(android.net.Uri);
method @RequiresPermission(android.Manifest.permission.APPROVE_INCIDENT_REPORTS) public void denyReport(android.net.Uri);
- method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) @Nullable public android.os.IncidentManager.IncidentReport getIncidentReport(android.net.Uri);
- method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) @NonNull public java.util.List<android.net.Uri> getIncidentReportList(String);
+ method @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public android.os.IncidentManager.IncidentReport getIncidentReport(android.net.Uri);
+ method @NonNull @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public java.util.List<android.net.Uri> getIncidentReportList(String);
method @RequiresPermission(android.Manifest.permission.APPROVE_INCIDENT_REPORTS) public java.util.List<android.os.IncidentManager.PendingReport> getPendingReports();
method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void reportIncident(android.os.IncidentReportArgs);
method @RequiresPermission("android.permission.REQUEST_INCIDENT_REPORT_APPROVAL") public void requestAuthorization(int, String, int, android.os.IncidentManager.AuthListener);
@@ -6011,7 +6012,7 @@
field public static final String NAMESPACE_AUTOFILL = "autofill";
field public static final String NAMESPACE_CONNECTIVITY = "connectivity";
field public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture";
- field public static final String NAMESPACE_DEX_BOOT = "dex_boot";
+ field @Deprecated public static final String NAMESPACE_DEX_BOOT = "dex_boot";
field public static final String NAMESPACE_DISPLAY_MANAGER = "display_manager";
field public static final String NAMESPACE_GAME_DRIVER = "game_driver";
field public static final String NAMESPACE_INPUT_NATIVE_BOOT = "input_native_boot";
@@ -6279,7 +6280,7 @@
field public static final String MESSAGE_BODY = "body";
field public static final String MESSAGE_BROADCASTED = "message_broadcasted";
field public static final String MESSAGE_FORMAT = "format";
- field @RequiresPermission(android.Manifest.permission.READ_CELL_BROADCASTS) @NonNull public static final android.net.Uri MESSAGE_HISTORY_URI;
+ field @NonNull @RequiresPermission(android.Manifest.permission.READ_CELL_BROADCASTS) public static final android.net.Uri MESSAGE_HISTORY_URI;
field public static final String MESSAGE_PRIORITY = "priority";
field public static final String MESSAGE_READ = "read";
field public static final String PLMN = "plmn";
@@ -6310,7 +6311,7 @@
package android.security.keystore {
public abstract class AttestationUtils {
- method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @NonNull public static java.security.cert.X509Certificate[] attestDeviceIds(android.content.Context, @NonNull int[], @NonNull byte[]) throws android.security.keystore.DeviceIdAttestationException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static java.security.cert.X509Certificate[] attestDeviceIds(android.content.Context, @NonNull int[], @NonNull byte[]) throws android.security.keystore.DeviceIdAttestationException;
field public static final int ID_TYPE_IMEI = 2; // 0x2
field public static final int ID_TYPE_MEID = 3; // 0x3
field public static final int ID_TYPE_SERIAL = 1; // 0x1
@@ -6391,18 +6392,18 @@
}
public class RecoveryController {
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public android.security.keystore.recovery.RecoverySession createRecoverySession();
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public android.security.keystore.recovery.RecoverySession createRecoverySession();
method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key generateKey(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public java.security.Key generateKey(@NonNull String, @Nullable byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public java.util.List<java.lang.String> getAliases() throws android.security.keystore.recovery.InternalRecoveryServiceException;
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public static android.security.keystore.recovery.RecoveryController getInstance(@NonNull android.content.Context);
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @Nullable public java.security.Key getKey(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException, java.security.UnrecoverableKeyException;
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @Nullable public android.security.keystore.recovery.KeyChainSnapshot getKeyChainSnapshot() throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key generateKey(@NonNull String, @Nullable byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.util.List<java.lang.String> getAliases() throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public static android.security.keystore.recovery.RecoveryController getInstance(@NonNull android.content.Context);
+ method @Nullable @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key getKey(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException, java.security.UnrecoverableKeyException;
+ method @Nullable @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public android.security.keystore.recovery.KeyChainSnapshot getKeyChainSnapshot() throws android.security.keystore.recovery.InternalRecoveryServiceException;
method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public int[] getRecoverySecretTypes() throws android.security.keystore.recovery.InternalRecoveryServiceException;
method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public int getRecoveryStatus(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public java.util.Map<java.lang.String,java.security.cert.X509Certificate> getRootCertificates();
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.util.Map<java.lang.String,java.security.cert.X509Certificate> getRootCertificates();
method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key importKey(@NonNull String, @NonNull byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public java.security.Key importKey(@NonNull String, @NonNull byte[], @Nullable byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key importKey(@NonNull String, @NonNull byte[], @Nullable byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void initRecoveryService(@NonNull String, @NonNull byte[], @NonNull byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public static boolean isRecoverableKeyStoreEnabled(@NonNull android.content.Context);
method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void removeKey(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
@@ -6417,8 +6418,8 @@
public class RecoverySession implements java.lang.AutoCloseable {
method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void close();
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public java.util.Map<java.lang.String,java.security.Key> recoverKeyChainSnapshot(@NonNull byte[], @NonNull java.util.List<android.security.keystore.recovery.WrappedApplicationKey>) throws android.security.keystore.recovery.DecryptionFailedException, android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.SessionExpiredException;
- method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) @NonNull public byte[] start(@NonNull String, @NonNull java.security.cert.CertPath, @NonNull byte[], @NonNull byte[], @NonNull java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.util.Map<java.lang.String,java.security.Key> recoverKeyChainSnapshot(@NonNull byte[], @NonNull java.util.List<android.security.keystore.recovery.WrappedApplicationKey>) throws android.security.keystore.recovery.DecryptionFailedException, android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.SessionExpiredException;
+ method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public byte[] start(@NonNull String, @NonNull java.security.cert.CertPath, @NonNull byte[], @NonNull byte[], @NonNull java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
}
public class SessionExpiredException extends java.security.GeneralSecurityException {
@@ -6561,7 +6562,7 @@
public abstract class ApnService extends android.app.Service {
ctor public ApnService();
method @NonNull public android.os.IBinder onBind(@Nullable android.content.Intent);
- method @WorkerThread @NonNull public abstract java.util.List<android.content.ContentValues> onRestoreApns(int);
+ method @NonNull @WorkerThread public abstract java.util.List<android.content.ContentValues> onRestoreApns(int);
}
public abstract class CarrierMessagingServiceWrapper {
@@ -6695,13 +6696,13 @@
method public android.service.euicc.EuiccProfileInfo.Builder setUiccAccessRule(@Nullable java.util.List<android.telephony.UiccAccessRule>);
}
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(flag=true, prefix={"POLICY_RULE_"}, value={android.service.euicc.EuiccProfileInfo.POLICY_RULE_DO_NOT_DISABLE, android.service.euicc.EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE, android.service.euicc.EuiccProfileInfo.POLICY_RULE_DELETE_AFTER_DISABLING}) public static @interface EuiccProfileInfo.PolicyRule {
+ @IntDef(flag=true, prefix={"POLICY_RULE_"}, value={android.service.euicc.EuiccProfileInfo.POLICY_RULE_DO_NOT_DISABLE, android.service.euicc.EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE, android.service.euicc.EuiccProfileInfo.POLICY_RULE_DELETE_AFTER_DISABLING}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccProfileInfo.PolicyRule {
}
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(prefix={"PROFILE_CLASS_"}, value={android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_TESTING, android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_PROVISIONING, android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_OPERATIONAL, 0xffffffff}) public static @interface EuiccProfileInfo.ProfileClass {
+ @IntDef(prefix={"PROFILE_CLASS_"}, value={android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_TESTING, android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_PROVISIONING, android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_OPERATIONAL, 0xffffffff}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccProfileInfo.ProfileClass {
}
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(prefix={"PROFILE_STATE_"}, value={android.service.euicc.EuiccProfileInfo.PROFILE_STATE_DISABLED, android.service.euicc.EuiccProfileInfo.PROFILE_STATE_ENABLED, 0xffffffff}) public static @interface EuiccProfileInfo.ProfileState {
+ @IntDef(prefix={"PROFILE_STATE_"}, value={android.service.euicc.EuiccProfileInfo.PROFILE_STATE_DISABLED, android.service.euicc.EuiccProfileInfo.PROFILE_STATE_ENABLED, 0xffffffff}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccProfileInfo.ProfileState {
}
public abstract class EuiccService extends android.app.Service {
@@ -6880,7 +6881,7 @@
package android.service.oemlock {
public class OemLockManager {
- method @RequiresPermission(android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE) @Nullable public String getLockName();
+ method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE) public String getLockName();
method @RequiresPermission(android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE) public boolean isOemUnlockAllowedByCarrier();
method @RequiresPermission(android.Manifest.permission.MANAGE_USER_OEM_UNLOCK_STATE) public boolean isOemUnlockAllowedByUser();
method @RequiresPermission(android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE) public void setOemUnlockAllowedByCarrier(boolean, @Nullable byte[]);
@@ -6893,7 +6894,7 @@
public class PersistentDataBlockManager {
method @RequiresPermission("android.permission.ACCESS_PDB_STATE") public int getDataBlockSize();
- method @RequiresPermission(anyOf={android.Manifest.permission.READ_OEM_UNLOCK_STATE, "android.permission.OEM_UNLOCK_STATE"}) @android.service.persistentdata.PersistentDataBlockManager.FlashLockState public int getFlashLockState();
+ method @android.service.persistentdata.PersistentDataBlockManager.FlashLockState @RequiresPermission(anyOf={android.Manifest.permission.READ_OEM_UNLOCK_STATE, "android.permission.OEM_UNLOCK_STATE"}) public int getFlashLockState();
method public long getMaximumDataBlockSize();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_OEM_UNLOCK_STATE, "android.permission.OEM_UNLOCK_STATE"}) public boolean getOemUnlockEnabled();
method public byte[] read();
@@ -7483,10 +7484,10 @@
public abstract class CellBroadcastService extends android.app.Service {
ctor public CellBroadcastService();
- method @CallSuper public android.os.IBinder onBind(android.content.Intent);
- method public abstract void onCdmaCellBroadcastSms(int, byte[], int);
+ method @CallSuper public android.os.IBinder onBind(@Nullable android.content.Intent);
+ method public abstract void onCdmaCellBroadcastSms(int, @NonNull byte[], int);
method public abstract void onCdmaScpMessage(int, @NonNull java.util.List<android.telephony.cdma.CdmaSmsCbProgramData>, @NonNull String, @NonNull java.util.function.Consumer<android.os.Bundle>);
- method public abstract void onGsmCellBroadcastSms(int, byte[]);
+ method public abstract void onGsmCellBroadcastSms(int, @NonNull byte[]);
field public static final String CELL_BROADCAST_SERVICE_INTERFACE = "android.telephony.CellBroadcastService";
}
@@ -7917,6 +7918,14 @@
field public static final int WIFI_LOST = 59; // 0x3b
}
+ public final class ImsiEncryptionInfo implements android.os.Parcelable {
+ method public int describeContents();
+ method @Nullable public String getKeyIdentifier();
+ method @Nullable public java.security.PublicKey getPublicKey();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ImsiEncryptionInfo> CREATOR;
+ }
+
public final class LteVopsSupportInfo implements android.os.Parcelable {
ctor public LteVopsSupportInfo(int, int);
method public int describeContents();
@@ -8401,6 +8410,7 @@
method @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) public void factoryReset(int);
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getAidForAppType(int);
method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int);
+ method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int);
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent);
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int);
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.CarrierRestrictionRules getCarrierRestrictionRules();
@@ -8454,6 +8464,7 @@
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean rebootRadio();
method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.MODIFY_PHONE_STATE}) public void requestCellInfoUpdate(@NonNull android.os.WorkSource, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CellInfoCallback);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void requestNumberVerification(@NonNull android.telephony.PhoneNumberRange, long, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.NumberVerificationCallback);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void resetCarrierKeysForImsiEncryption();
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean resetRadioConfig();
method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean);
@@ -8477,6 +8488,7 @@
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void toggleRadioOnOff();
method public void updateServiceLocation();
field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_ANOMALY_REPORTED = "android.telephony.action.ANOMALY_REPORTED";
+ field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_OTA_EMERGENCY_NUMBER_DB_INSTALLED = "android.telephony.action.OTA_EMERGENCY_NUMBER_DB_INSTALLED";
field public static final String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED";
field public static final String ACTION_SIM_CARD_STATE_CHANGED = "android.telephony.action.SIM_CARD_STATE_CHANGED";
field public static final String ACTION_SIM_SLOT_STATUS_CHANGED = "android.telephony.action.SIM_SLOT_STATUS_CHANGED";
@@ -8489,6 +8501,8 @@
field public static final String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE";
field public static final String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
field public static final String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
+ field public static final int KEY_TYPE_EPDG = 1; // 0x1
+ field public static final int KEY_TYPE_WLAN = 2; // 0x2
field public static final long NETWORK_TYPE_BITMASK_1xRTT = 64L; // 0x40L
field public static final long NETWORK_TYPE_BITMASK_CDMA = 8L; // 0x8L
field public static final long NETWORK_TYPE_BITMASK_EDGE = 2L; // 0x2L
@@ -8780,10 +8794,10 @@
field public static final int RESULT_UNKNOWN_ERROR = -1; // 0xffffffff
}
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(prefix={"CANCEL_REASON_"}, value={android.telephony.euicc.EuiccCardManager.CANCEL_REASON_END_USER_REJECTED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_POSTPONED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_TIMEOUT, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_PPR_NOT_ALLOWED}) public static @interface EuiccCardManager.CancelReason {
+ @IntDef(prefix={"CANCEL_REASON_"}, value={android.telephony.euicc.EuiccCardManager.CANCEL_REASON_END_USER_REJECTED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_POSTPONED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_TIMEOUT, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_PPR_NOT_ALLOWED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccCardManager.CancelReason {
}
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(flag=true, prefix={"RESET_OPTION_"}, value={android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_OPERATIONAL_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS}) public static @interface EuiccCardManager.ResetOption {
+ @IntDef(flag=true, prefix={"RESET_OPTION_"}, value={android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_OPERATIONAL_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccCardManager.ResetOption {
}
public static interface EuiccCardManager.ResultCallback<T> {
@@ -8839,7 +8853,7 @@
field public static final int EVENT_INSTALL = 1; // 0x1
}
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(flag=true, prefix={"EVENT_"}, value={android.telephony.euicc.EuiccNotification.EVENT_INSTALL, android.telephony.euicc.EuiccNotification.EVENT_ENABLE, android.telephony.euicc.EuiccNotification.EVENT_DISABLE, android.telephony.euicc.EuiccNotification.EVENT_DELETE}) public static @interface EuiccNotification.Event {
+ @IntDef(flag=true, prefix={"EVENT_"}, value={android.telephony.euicc.EuiccNotification.EVENT_INSTALL, android.telephony.euicc.EuiccNotification.EVENT_ENABLE, android.telephony.euicc.EuiccNotification.EVENT_DISABLE, android.telephony.euicc.EuiccNotification.EVENT_DELETE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccNotification.Event {
}
public final class EuiccRulesAuthTable implements android.os.Parcelable {
@@ -8857,7 +8871,7 @@
method public android.telephony.euicc.EuiccRulesAuthTable build();
}
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(flag=true, prefix={"POLICY_RULE_FLAG_"}, value={android.telephony.euicc.EuiccRulesAuthTable.POLICY_RULE_FLAG_CONSENT_REQUIRED}) public static @interface EuiccRulesAuthTable.PolicyRuleFlag {
+ @IntDef(flag=true, prefix={"POLICY_RULE_FLAG_"}, value={android.telephony.euicc.EuiccRulesAuthTable.POLICY_RULE_FLAG_CONSENT_REQUIRED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccRulesAuthTable.PolicyRuleFlag {
}
}
@@ -9516,12 +9530,12 @@
public class ProvisioningManager {
method @NonNull public static android.telephony.ims.ProvisioningManager createForSubscriptionId(int);
- method @WorkerThread @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getProvisioningIntValue(int);
- method @WorkerThread @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public int getProvisioningIntValue(int);
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public String getProvisioningStringValue(int);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback) throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningIntValue(int, int);
- method @WorkerThread @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int, boolean);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int, boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningStringValue(int, @NonNull String);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback);
field public static final int KEY_VOICE_OVER_WIFI_MODE_OVERRIDE = 27; // 0x1b
diff --git a/api/test-current.txt b/api/test-current.txt
index 5b16743..495e57a 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -71,6 +71,9 @@
method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public void removeOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener);
method public static void resumeAppSwitches() throws android.os.RemoteException;
method @RequiresPermission(android.Manifest.permission.CHANGE_CONFIGURATION) public void scheduleApplicationInfoChanged(java.util.List<java.lang.String>, int);
+ field public static final int PROCESS_CAPABILITY_ALL = 1; // 0x1
+ field public static final int PROCESS_CAPABILITY_FOREGROUND_LOCATION = 1; // 0x1
+ field public static final int PROCESS_CAPABILITY_NONE = 0; // 0x0
}
public static interface ActivityManager.OnUidImportanceListener {
@@ -233,7 +236,7 @@
field public static final int UID_STATE_CACHED = 700; // 0x2bc
field public static final int UID_STATE_FOREGROUND = 500; // 0x1f4
field public static final int UID_STATE_FOREGROUND_SERVICE = 400; // 0x190
- field public static final int UID_STATE_FOREGROUND_SERVICE_LOCATION = 300; // 0x12c
+ field @Deprecated public static final int UID_STATE_FOREGROUND_SERVICE_LOCATION = 300; // 0x12c
field public static final int UID_STATE_PERSISTENT = 100; // 0x64
field public static final int UID_STATE_TOP = 200; // 0xc8
}
@@ -852,8 +855,8 @@
method @RequiresPermission(android.Manifest.permission.TEST_MANAGE_ROLLBACKS) public void blockRollbackManager(long);
method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, android.Manifest.permission.TEST_MANAGE_ROLLBACKS}) public void commitRollback(int, @NonNull java.util.List<android.content.pm.VersionedPackage>, @NonNull android.content.IntentSender);
method @RequiresPermission(android.Manifest.permission.TEST_MANAGE_ROLLBACKS) public void expireRollbackForPackage(@NonNull String);
- method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, android.Manifest.permission.TEST_MANAGE_ROLLBACKS}) @NonNull public java.util.List<android.content.rollback.RollbackInfo> getAvailableRollbacks();
- method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, android.Manifest.permission.TEST_MANAGE_ROLLBACKS}) @NonNull public java.util.List<android.content.rollback.RollbackInfo> getRecentlyCommittedRollbacks();
+ method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, android.Manifest.permission.TEST_MANAGE_ROLLBACKS}) public java.util.List<android.content.rollback.RollbackInfo> getAvailableRollbacks();
+ method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, android.Manifest.permission.TEST_MANAGE_ROLLBACKS}) public java.util.List<android.content.rollback.RollbackInfo> getRecentlyCommittedRollbacks();
method @RequiresPermission(android.Manifest.permission.TEST_MANAGE_ROLLBACKS) public void reloadPersistedData();
field public static final String EXTRA_STATUS = "android.content.rollback.extra.STATUS";
field public static final String EXTRA_STATUS_MESSAGE = "android.content.rollback.extra.STATUS_MESSAGE";
@@ -1148,7 +1151,7 @@
method @NonNull public android.location.LocationRequest setExpireIn(long);
method @NonNull public android.location.LocationRequest setFastestInterval(long);
method @NonNull public android.location.LocationRequest setInterval(long);
- method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) @NonNull public android.location.LocationRequest setLocationSettingsIgnored(boolean);
+ method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public android.location.LocationRequest setLocationSettingsIgnored(boolean);
method @NonNull public android.location.LocationRequest setLowPowerMode(boolean);
method @NonNull public android.location.LocationRequest setNumUpdates(int);
method @NonNull public android.location.LocationRequest setProvider(@NonNull String);
@@ -1725,7 +1728,8 @@
method public static void closeSocket(@Nullable java.io.FileDescriptor) throws java.io.IOException;
method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int);
method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int);
- method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
+ method @Deprecated @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]);
+ method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int, @NonNull byte[]);
}
}
@@ -1923,8 +1927,8 @@
method @RequiresPermission("android.permission.REQUEST_INCIDENT_REPORT_APPROVAL") public void cancelAuthorization(android.os.IncidentManager.AuthListener);
method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void deleteIncidentReports(android.net.Uri);
method @RequiresPermission(android.Manifest.permission.APPROVE_INCIDENT_REPORTS) public void denyReport(android.net.Uri);
- method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) @Nullable public android.os.IncidentManager.IncidentReport getIncidentReport(android.net.Uri);
- method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) @NonNull public java.util.List<android.net.Uri> getIncidentReportList(String);
+ method @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public android.os.IncidentManager.IncidentReport getIncidentReport(android.net.Uri);
+ method @NonNull @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public java.util.List<android.net.Uri> getIncidentReportList(String);
method @RequiresPermission(android.Manifest.permission.APPROVE_INCIDENT_REPORTS) public java.util.List<android.os.IncidentManager.PendingReport> getPendingReports();
method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void reportIncident(android.os.IncidentReportArgs);
method @RequiresPermission("android.permission.REQUEST_INCIDENT_REPORT_APPROVAL") public void requestAuthorization(int, String, int, android.os.IncidentManager.AuthListener);
@@ -2422,6 +2426,7 @@
}
public static final class Settings.Global extends android.provider.Settings.NameValueTable {
+ field public static final String APP_OPS_CONSTANTS = "app_ops_constants";
field public static final String AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES = "autofill_compat_mode_allowed_packages";
field public static final String AUTOMATIC_POWER_SAVE_MODE = "automatic_power_save_mode";
field public static final String BATTERY_SAVER_CONSTANTS = "battery_saver_constants";
@@ -2481,7 +2486,7 @@
field public static final String MESSAGE_BODY = "body";
field public static final String MESSAGE_BROADCASTED = "message_broadcasted";
field public static final String MESSAGE_FORMAT = "format";
- field @RequiresPermission(android.Manifest.permission.READ_CELL_BROADCASTS) @NonNull public static final android.net.Uri MESSAGE_HISTORY_URI;
+ field @NonNull @RequiresPermission(android.Manifest.permission.READ_CELL_BROADCASTS) public static final android.net.Uri MESSAGE_HISTORY_URI;
field public static final String MESSAGE_PRIORITY = "priority";
field public static final String MESSAGE_READ = "read";
field public static final String PLMN = "plmn";
@@ -2513,7 +2518,7 @@
package android.security.keystore {
public abstract class AttestationUtils {
- method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @NonNull public static java.security.cert.X509Certificate[] attestDeviceIds(android.content.Context, @NonNull int[], @NonNull byte[]) throws android.security.keystore.DeviceIdAttestationException;
+ method @NonNull @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public static java.security.cert.X509Certificate[] attestDeviceIds(android.content.Context, @NonNull int[], @NonNull byte[]) throws android.security.keystore.DeviceIdAttestationException;
field public static final int ID_TYPE_IMEI = 2; // 0x2
field public static final int ID_TYPE_MEID = 3; // 0x3
field public static final int ID_TYPE_SERIAL = 1; // 0x1
diff --git a/api/test-lint-baseline.txt b/api/test-lint-baseline.txt
new file mode 100644
index 0000000..a43b45d
--- /dev/null
+++ b/api/test-lint-baseline.txt
@@ -0,0 +1,2203 @@
+// Baseline format: 1.0
+AcronymName: android.app.NotificationChannel#isImportanceLockedByOEM():
+
+AcronymName: android.app.NotificationChannel#setImportanceLockedByOEM(boolean):
+
+
+
+ActionValue: android.location.Location#EXTRA_NO_GPS_LOCATION:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#ACTION_CLEANUP:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#ACTION_DOWNLOAD_RESULT_INTERNAL:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#ACTION_FILE_DESCRIPTOR_REQUEST:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_FD_COUNT:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_FINAL_URI:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_FREE_URI_LIST:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_PAUSED_LIST:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_PAUSED_URI_LIST:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_SERVICE_ID:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_TEMP_FILES_IN_USE:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_TEMP_FILE_ROOT:
+
+ActionValue: android.telephony.mbms.vendor.VendorUtils#EXTRA_TEMP_LIST:
+
+
+
+ArrayReturn: android.app.UiAutomation#executeShellCommandRw(String):
+
+ArrayReturn: android.location.GnssMeasurementsEvent#GnssMeasurementsEvent(android.location.GnssClock, android.location.GnssMeasurement[]) parameter #1:
+
+ArrayReturn: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #10:
+
+ArrayReturn: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #11:
+
+ArrayReturn: android.metrics.LogMaker#LogMaker(Object[]) parameter #0:
+
+ArrayReturn: android.metrics.LogMaker#deserialize(Object[]) parameter #0:
+
+ArrayReturn: android.metrics.LogMaker#serialize():
+
+ArrayReturn: android.net.TestNetworkManager#createTunInterface(android.net.LinkAddress[]) parameter #0:
+
+ArrayReturn: android.os.HwBlob#wrapArray(boolean[]):
+
+ArrayReturn: android.os.HwBlob#wrapArray(byte[]):
+
+ArrayReturn: android.os.HwBlob#wrapArray(double[]):
+
+ArrayReturn: android.os.HwBlob#wrapArray(float[]):
+
+ArrayReturn: android.os.HwBlob#wrapArray(int[]):
+
+ArrayReturn: android.os.HwBlob#wrapArray(long[]):
+
+ArrayReturn: android.os.HwBlob#wrapArray(short[]):
+
+ArrayReturn: android.os.NativeHandle#NativeHandle(java.io.FileDescriptor[], int[], boolean) parameter #0:
+
+ArrayReturn: android.os.NativeHandle#getFileDescriptors():
+
+ArrayReturn: android.security.keystore.AttestationUtils#attestDeviceIds(android.content.Context, int[], byte[]):
+
+ArrayReturn: android.view.FocusFinder#sort(android.view.View[], int, int, android.view.ViewGroup, boolean) parameter #0:
+
+ArrayReturn: android.view.contentcapture.ViewNode#getAutofillOptions():
+
+ArrayReturn: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillOptions(CharSequence[]) parameter #0:
+
+ArrayReturn: android.view.inspector.InspectableProperty#enumMapping():
+
+ArrayReturn: android.view.inspector.InspectableProperty#flagMapping():
+
+
+
+AutoBoxing: android.os.HwBlob#wrapArray(byte[]):
+
+AutoBoxing: android.os.HwBlob#wrapArray(double[]):
+
+AutoBoxing: android.os.HwBlob#wrapArray(float[]):
+
+AutoBoxing: android.os.HwBlob#wrapArray(int[]):
+
+AutoBoxing: android.os.HwBlob#wrapArray(long[]):
+
+AutoBoxing: android.os.HwBlob#wrapArray(short[]):
+
+AutoBoxing: android.os.VintfObject#getTargetFrameworkCompatibilityMatrixVersion():
+
+
+
+BannedThrow: android.app.ActivityTaskManager#removeStacksInWindowingModes(int[]):
+
+BannedThrow: android.app.ActivityTaskManager#removeStacksWithActivityTypes(int[]):
+
+BannedThrow: android.app.ActivityTaskManager#setTaskWindowingMode(int, int, boolean):
+
+BannedThrow: android.app.ActivityTaskManager#setTaskWindowingModeSplitScreenPrimary(int, int, boolean, boolean, android.graphics.Rect, boolean):
+
+BannedThrow: android.media.audiofx.AudioEffect#getParameter(byte[], byte[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#getParameter(int, byte[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#getParameter(int, int[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#getParameter(int, short[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#getParameter(int[], short[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#setParameter(byte[], byte[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#setParameter(int, byte[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#setParameter(int, int):
+
+BannedThrow: android.media.audiofx.AudioEffect#setParameter(int, short):
+
+BannedThrow: android.media.audiofx.AudioEffect#setParameter(int[], byte[]):
+
+BannedThrow: android.media.audiofx.AudioEffect#setParameter(int[], int[]):
+
+BannedThrow: android.media.audiopolicy.AudioMix.Builder#Builder(android.media.audiopolicy.AudioMixingRule):
+
+BannedThrow: android.media.audiopolicy.AudioMix.Builder#build():
+
+BannedThrow: android.media.audiopolicy.AudioMix.Builder#setDevice(android.media.AudioDeviceInfo):
+
+BannedThrow: android.media.audiopolicy.AudioMix.Builder#setFormat(android.media.AudioFormat):
+
+BannedThrow: android.media.audiopolicy.AudioMix.Builder#setRouteFlags(int):
+
+BannedThrow: android.media.audiopolicy.AudioMixingRule.Builder#addMixRule(int, Object):
+
+BannedThrow: android.media.audiopolicy.AudioMixingRule.Builder#addRule(android.media.AudioAttributes, int):
+
+BannedThrow: android.media.audiopolicy.AudioMixingRule.Builder#excludeMixRule(int, Object):
+
+BannedThrow: android.media.audiopolicy.AudioMixingRule.Builder#excludeRule(android.media.AudioAttributes, int):
+
+BannedThrow: android.media.audiopolicy.AudioPolicy#createAudioRecordSink(android.media.audiopolicy.AudioMix):
+
+BannedThrow: android.media.audiopolicy.AudioPolicy#createAudioTrackSource(android.media.audiopolicy.AudioMix):
+
+BannedThrow: android.media.audiopolicy.AudioPolicy#setFocusDuckingBehavior(int):
+
+BannedThrow: android.media.audiopolicy.AudioPolicy.Builder#addMix(android.media.audiopolicy.AudioMix):
+
+BannedThrow: android.media.audiopolicy.AudioPolicy.Builder#setLooper(android.os.Looper):
+
+BannedThrow: android.os.HwBinder#getService(String, String):
+
+BannedThrow: android.os.HwBinder#getService(String, String, boolean):
+
+BannedThrow: android.os.Process#getThreadScheduler(int):
+
+
+
+CallbackInterface: android.app.prediction.AppPredictor.Callback:
+
+CallbackInterface: android.permission.PermissionControllerManager.OnGetAppPermissionResultCallback:
+
+CallbackInterface: android.widget.Magnifier.Callback:
+
+
+
+CallbackMethodName: android.os.RemoteCallback:
+
+
+
+ConcreteCollection: android.content.AutofillOptions#disabledActivities:
+
+ConcreteCollection: android.content.AutofillOptions#whitelistedActivitiesForAugmentedAutofill:
+
+ConcreteCollection: android.content.ContentCaptureOptions#ContentCaptureOptions(int, int, int, int, int, android.util.ArraySet<android.content.ComponentName>) parameter #5:
+
+ConcreteCollection: android.content.ContentCaptureOptions#whitelistedComponents:
+
+ConcreteCollection: android.database.sqlite.SQLiteDebug.PagerStats#dbStats:
+
+ConcreteCollection: android.os.HwParcel#readBoolVector():
+
+ConcreteCollection: android.os.HwParcel#readDoubleVector():
+
+ConcreteCollection: android.os.HwParcel#readFloatVector():
+
+ConcreteCollection: android.os.HwParcel#readInt16Vector():
+
+ConcreteCollection: android.os.HwParcel#readInt32Vector():
+
+ConcreteCollection: android.os.HwParcel#readInt64Vector():
+
+ConcreteCollection: android.os.HwParcel#readInt8Vector():
+
+ConcreteCollection: android.os.HwParcel#readNativeHandleVector():
+
+ConcreteCollection: android.os.HwParcel#readStringVector():
+
+ConcreteCollection: android.os.HwParcel#writeBoolVector(java.util.ArrayList<java.lang.Boolean>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeDoubleVector(java.util.ArrayList<java.lang.Double>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeFloatVector(java.util.ArrayList<java.lang.Float>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeInt16Vector(java.util.ArrayList<java.lang.Short>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeInt32Vector(java.util.ArrayList<java.lang.Integer>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeInt64Vector(java.util.ArrayList<java.lang.Long>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeInt8Vector(java.util.ArrayList<java.lang.Byte>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeNativeHandleVector(java.util.ArrayList<android.os.NativeHandle>) parameter #0:
+
+ConcreteCollection: android.os.HwParcel#writeStringVector(java.util.ArrayList<java.lang.String>) parameter #0:
+
+ConcreteCollection: android.service.autofill.CompositeUserData#getFieldClassificationAlgorithms():
+
+ConcreteCollection: android.service.autofill.CompositeUserData#getFieldClassificationArgs():
+
+ConcreteCollection: android.service.autofill.InternalTransformation#batchApply(android.service.autofill.ValueFinder, android.widget.RemoteViews, java.util.ArrayList<android.util.Pair<java.lang.Integer,android.service.autofill.InternalTransformation>>) parameter #2:
+
+ConcreteCollection: android.service.autofill.UserData#getFieldClassificationAlgorithms():
+
+
+
+ContextFirst: android.os.VibrationEffect#get(android.net.Uri, android.content.Context) parameter #1:
+
+
+
+ContextNameSuffix: android.telephony.mbms.vendor.MbmsGroupCallServiceBase:
+
+
+
+EndsWithImpl: android.view.contentcapture.ViewNode.ViewStructureImpl:
+
+
+
+Enum: android.view.inspector.InspectableProperty.ValueType:
+
+
+
+EqualsAndHashCode: android.app.prediction.AppPredictionContext#equals(Object):
+
+EqualsAndHashCode: android.app.prediction.AppTarget#equals(Object):
+
+EqualsAndHashCode: android.app.prediction.AppTargetEvent#equals(Object):
+
+EqualsAndHashCode: android.net.apf.ApfCapabilities#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.ApfProgramEvent#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.ApfStats#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.DhcpClientEvent#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.IpManagerEvent#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.IpReachabilityEvent#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.NetworkEvent#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.RaEvent#equals(Object):
+
+EqualsAndHashCode: android.net.metrics.ValidationProbeEvent#equals(Object):
+
+EqualsAndHashCode: android.os.IncidentManager.PendingReport#equals(Object):
+
+EqualsAndHashCode: android.os.StrictMode.ViolationInfo#hashCode():
+
+
+
+ExecutorRegistration: android.content.pm.PackageManager#addOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener):
+
+ExecutorRegistration: android.hardware.camera2.CameraDevice#createCustomCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.hardware.camera2.params.OutputConfiguration>, int, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler):
+
+ExecutorRegistration: android.media.audiofx.AudioEffect#setParameterListener(android.media.audiofx.AudioEffect.OnParameterChangeListener):
+
+ExecutorRegistration: android.media.audiopolicy.AudioPolicy.Builder#setAudioPolicyFocusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener):
+
+ExecutorRegistration: android.media.audiopolicy.AudioPolicy.Builder#setAudioPolicyStatusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyStatusListener):
+
+ExecutorRegistration: android.media.audiopolicy.AudioPolicy.Builder#setAudioPolicyVolumeCallback(android.media.audiopolicy.AudioPolicy.AudioPolicyVolumeCallback):
+
+ExecutorRegistration: android.os.IncidentManager#cancelAuthorization(android.os.IncidentManager.AuthListener):
+
+ExecutorRegistration: android.os.IncidentManager#requestAuthorization(int, String, int, android.os.IncidentManager.AuthListener):
+
+ExecutorRegistration: android.os.RemoteCallback#RemoteCallback(android.os.RemoteCallback.OnResultListener, android.os.Handler):
+
+ExecutorRegistration: android.permission.PermissionControllerManager#getAppPermissions(String, android.permission.PermissionControllerManager.OnGetAppPermissionResultCallback, android.os.Handler):
+
+ExecutorRegistration: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener):
+
+ExecutorRegistration: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener):
+
+ExecutorRegistration: android.telephony.mbms.vendor.MbmsDownloadServiceBase#initialize(int, android.telephony.mbms.MbmsDownloadSessionCallback):
+
+ExecutorRegistration: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#initialize(android.telephony.mbms.MbmsGroupCallSessionCallback, int):
+
+ExecutorRegistration: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#startGroupCall(int, long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>, android.telephony.mbms.GroupCallCallback):
+
+ExecutorRegistration: android.telephony.mbms.vendor.MbmsStreamingServiceBase#initialize(android.telephony.mbms.MbmsStreamingSessionCallback, int):
+
+ExecutorRegistration: android.telephony.mbms.vendor.MbmsStreamingServiceBase#startStreaming(int, String, android.telephony.mbms.StreamingServiceCallback):
+
+
+
+ForbiddenSuperClass: android.app.AppDetailsActivity:
+
+
+
+GenericException: android.app.ActivityView#finalize():
+
+GenericException: android.app.prediction.AppPredictor#finalize():
+
+GenericException: android.service.autofill.CharSequenceTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
+
+GenericException: android.service.autofill.DateTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
+
+GenericException: android.service.autofill.ImageTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
+
+GenericException: android.service.autofill.augmented.FillWindow#finalize():
+
+
+
+GetterSetterNames: android.app.NotificationChannel#isBlockableSystem():
+
+GetterSetterNames: android.app.NotificationChannel#isImportanceLockedByCriticalDeviceFunction():
+
+GetterSetterNames: android.app.NotificationChannel#isImportanceLockedByOEM():
+
+GetterSetterNames: android.location.GnssClock#setBiasNanos(double):
+
+GetterSetterNames: android.location.GnssClock#setBiasUncertaintyNanos(double):
+
+GetterSetterNames: android.location.GnssClock#setDriftNanosPerSecond(double):
+
+GetterSetterNames: android.location.GnssClock#setDriftUncertaintyNanosPerSecond(double):
+
+GetterSetterNames: android.location.GnssClock#setElapsedRealtimeNanos(long):
+
+GetterSetterNames: android.location.GnssClock#setElapsedRealtimeUncertaintyNanos(double):
+
+GetterSetterNames: android.location.GnssClock#setFullBiasNanos(long):
+
+GetterSetterNames: android.location.GnssClock#setLeapSecond(int):
+
+GetterSetterNames: android.location.GnssClock#setTimeUncertaintyNanos(double):
+
+GetterSetterNames: android.location.GnssMeasurement#setCarrierFrequencyHz(float):
+
+GetterSetterNames: android.location.GnssMeasurement#setCodeType(String):
+
+GetterSetterNames: android.location.GnssMeasurement#setSnrInDb(double):
+
+GetterSetterNames: android.location.LocationRequest#isLocationSettingsIgnored():
+
+GetterSetterNames: android.location.LocationRequest#isLowPowerMode():
+
+GetterSetterNames: android.os.IncidentReportArgs#isAll():
+
+GetterSetterNames: android.service.notification.NotificationStats#setDirectReplied():
+
+GetterSetterNames: android.service.notification.NotificationStats#setExpanded():
+
+GetterSetterNames: android.service.notification.NotificationStats#setSeen():
+
+GetterSetterNames: android.service.notification.NotificationStats#setSnoozed():
+
+GetterSetterNames: android.service.notification.NotificationStats#setViewedSettings():
+
+GetterSetterNames: android.view.View#isAutofilled():
+
+GetterSetterNames: android.view.View#isDefaultFocusHighlightEnabled():
+
+
+
+IllegalStateException: android.media.audiopolicy.AudioMix.Builder#build():
+
+
+
+IntentBuilderName: android.app.backup.BackupManager#getConfigurationIntent(String):
+
+IntentBuilderName: android.app.backup.BackupManager#getDataManagementIntent(String):
+
+
+
+IntentName: android.provider.Settings.Secure#VOICE_INTERACTION_SERVICE:
+
+IntentName: android.provider.Telephony.Sms.Intents#SMS_CARRIER_PROVISION_ACTION:
+
+IntentName: android.service.notification.Adjustment#KEY_CONTEXTUAL_ACTIONS:
+
+
+
+InterfaceConstant: android.service.autofill.AutofillFieldClassificationService#SERVICE_INTERFACE:
+
+InterfaceConstant: android.service.autofill.augmented.AugmentedAutofillService#SERVICE_INTERFACE:
+
+InterfaceConstant: android.service.contentcapture.ContentCaptureService#SERVICE_INTERFACE:
+
+InterfaceConstant: android.service.notification.NotificationAssistantService#SERVICE_INTERFACE:
+
+InterfaceConstant: android.telecom.PhoneAccountSuggestionService#SERVICE_INTERFACE:
+
+
+
+KotlinOperator: android.os.WorkSource#get(int):
+
+
+
+ListenerInterface: android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener:
+
+ListenerInterface: android.media.audiopolicy.AudioPolicy.AudioPolicyStatusListener:
+
+ListenerInterface: android.os.IncidentManager.AuthListener:
+
+
+
+ListenerLast: android.hardware.camera2.CameraDevice#createCustomCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.hardware.camera2.params.OutputConfiguration>, int, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) parameter #4:
+
+ListenerLast: android.location.LocationManager#requestLocationUpdates(android.location.LocationRequest, android.location.LocationListener, android.os.Looper) parameter #2:
+
+ListenerLast: android.permission.PermissionControllerManager#getAppPermissions(String, android.permission.PermissionControllerManager.OnGetAppPermissionResultCallback, android.os.Handler) parameter #2:
+
+ListenerLast: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#initialize(android.telephony.mbms.MbmsGroupCallSessionCallback, int) parameter #1:
+
+ListenerLast: android.telephony.mbms.vendor.MbmsStreamingServiceBase#initialize(android.telephony.mbms.MbmsStreamingSessionCallback, int) parameter #1:
+
+
+
+ManagerConstructor: android.content.pm.ShortcutManager#ShortcutManager(android.content.Context):
+
+
+
+MinMaxConstant: android.os.UserHandle#MIN_SECONDARY_USER_ID:
+
+MinMaxConstant: android.view.autofill.AutofillManager#MAX_TEMP_AUGMENTED_SERVICE_DURATION_MS:
+
+
+
+MissingNullability: android.app.Activity#onMovedToDisplay(int, android.content.res.Configuration) parameter #1:
+
+MissingNullability: android.app.ActivityManager#addOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener, int) parameter #0:
+
+MissingNullability: android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning(android.content.ComponentName) parameter #0:
+
+MissingNullability: android.app.ActivityManager#forceStopPackage(String) parameter #0:
+
+MissingNullability: android.app.ActivityManager#getPackageImportance(String) parameter #0:
+
+MissingNullability: android.app.ActivityManager#removeOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener) parameter #0:
+
+MissingNullability: android.app.ActivityManager#scheduleApplicationInfoChanged(java.util.List<java.lang.String>, int) parameter #0:
+
+MissingNullability: android.app.ActivityManager.TaskDescription#getIconFilename():
+
+MissingNullability: android.app.ActivityTaskManager#clearLaunchParamsForPackages(java.util.List<java.lang.String>) parameter #0:
+
+MissingNullability: android.app.ActivityTaskManager#listAllStacks():
+
+MissingNullability: android.app.ActivityTaskManager#moveTopActivityToPinnedStack(int, android.graphics.Rect) parameter #1:
+
+MissingNullability: android.app.ActivityTaskManager#removeStacksInWindowingModes(int[]) parameter #0:
+
+MissingNullability: android.app.ActivityTaskManager#removeStacksWithActivityTypes(int[]) parameter #0:
+
+MissingNullability: android.app.ActivityTaskManager#resizeDockedStack(android.graphics.Rect, android.graphics.Rect) parameter #0:
+
+MissingNullability: android.app.ActivityTaskManager#resizeDockedStack(android.graphics.Rect, android.graphics.Rect) parameter #1:
+
+MissingNullability: android.app.ActivityTaskManager#resizePinnedStack(int, android.graphics.Rect, boolean) parameter #1:
+
+MissingNullability: android.app.ActivityTaskManager#resizeTask(int, android.graphics.Rect) parameter #1:
+
+MissingNullability: android.app.ActivityTaskManager#setTaskWindowingModeSplitScreenPrimary(int, int, boolean, boolean, android.graphics.Rect, boolean) parameter #4:
+
+MissingNullability: android.app.ActivityTaskManager#supportsMultiWindow(android.content.Context) parameter #0:
+
+MissingNullability: android.app.ActivityTaskManager#supportsSplitScreenMultiWindow(android.content.Context) parameter #0:
+
+MissingNullability: android.app.ActivityView#ActivityView(android.content.Context) parameter #0:
+
+MissingNullability: android.app.ActivityView#ActivityView(android.content.Context, android.util.AttributeSet) parameter #0:
+
+MissingNullability: android.app.ActivityView#ActivityView(android.content.Context, android.util.AttributeSet) parameter #1:
+
+MissingNullability: android.app.ActivityView#ActivityView(android.content.Context, android.util.AttributeSet, int) parameter #0:
+
+MissingNullability: android.app.ActivityView#ActivityView(android.content.Context, android.util.AttributeSet, int) parameter #1:
+
+MissingNullability: android.app.ActivityView#ActivityView(android.content.Context, android.util.AttributeSet, int, boolean) parameter #0:
+
+MissingNullability: android.app.ActivityView#ActivityView(android.content.Context, android.util.AttributeSet, int, boolean) parameter #1:
+
+MissingNullability: android.app.ActivityView#gatherTransparentRegion(android.graphics.Region) parameter #0:
+
+MissingNullability: android.app.ActivityView#onVisibilityChanged(android.view.View, int) parameter #0:
+
+MissingNullability: android.app.ActivityView#setCallback(android.app.ActivityView.StateCallback) parameter #0:
+
+MissingNullability: android.app.ActivityView#setForwardedInsets(android.graphics.Insets) parameter #0:
+
+MissingNullability: android.app.ActivityView#startActivity(android.content.Intent, android.os.UserHandle) parameter #1:
+
+MissingNullability: android.app.ActivityView.StateCallback#onActivityViewDestroyed(android.app.ActivityView) parameter #0:
+
+MissingNullability: android.app.ActivityView.StateCallback#onActivityViewReady(android.app.ActivityView) parameter #0:
+
+MissingNullability: android.app.ActivityView.StateCallback#onTaskCreated(int, android.content.ComponentName) parameter #1:
+
+MissingNullability: android.app.AppDetailsActivity#onCreate(android.os.Bundle) parameter #0:
+
+MissingNullability: android.app.AppOpsManager#getOpStrs():
+
+MissingNullability: android.app.AppOpsManager#isOperationActive(int, int, String) parameter #2:
+
+MissingNullability: android.app.AppOpsManager#opToPermission(int):
+
+MissingNullability: android.app.AppOpsManager#permissionToOpCode(String) parameter #0:
+
+MissingNullability: android.app.AppOpsManager#setMode(String, int, String, int) parameter #0:
+
+MissingNullability: android.app.AppOpsManager#setMode(String, int, String, int) parameter #2:
+
+MissingNullability: android.app.AppOpsManager#setMode(int, int, String, int) parameter #2:
+
+MissingNullability: android.app.AppOpsManager#setUidMode(String, int, int) parameter #0:
+
+MissingNullability: android.app.AppOpsManager.HistoricalOp#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.AppOpsManager.HistoricalOps#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.AppOpsManager.HistoricalUidOps#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.AppOpsManager.OpEntry#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.NotificationManager#allowAssistantAdjustment(String) parameter #0:
+
+MissingNullability: android.app.NotificationManager#disallowAssistantAdjustment(String) parameter #0:
+
+MissingNullability: android.app.NotificationManager#getEffectsSuppressor():
+
+MissingNullability: android.app.NotificationManager#matchesCallFilter(android.os.Bundle) parameter #0:
+
+MissingNullability: android.app.PictureInPictureParams#getActions():
+
+MissingNullability: android.app.PictureInPictureParams#getSourceRectHint():
+
+MissingNullability: android.app.TimePickerDialog#getTimePicker():
+
+MissingNullability: android.app.UiAutomation#executeShellCommandRw(String):
+
+MissingNullability: android.app.UiAutomation#executeShellCommandRw(String) parameter #0:
+
+MissingNullability: android.app.UiAutomation#grantRuntimePermission(String, String, android.os.UserHandle) parameter #0:
+
+MissingNullability: android.app.UiAutomation#grantRuntimePermission(String, String, android.os.UserHandle) parameter #1:
+
+MissingNullability: android.app.UiAutomation#grantRuntimePermission(String, String, android.os.UserHandle) parameter #2:
+
+MissingNullability: android.app.UiAutomation#revokeRuntimePermission(String, String, android.os.UserHandle) parameter #0:
+
+MissingNullability: android.app.UiAutomation#revokeRuntimePermission(String, String, android.os.UserHandle) parameter #1:
+
+MissingNullability: android.app.UiAutomation#revokeRuntimePermission(String, String, android.os.UserHandle) parameter #2:
+
+MissingNullability: android.app.WallpaperManager#setWallpaperComponent(android.content.ComponentName) parameter #0:
+
+MissingNullability: android.app.WindowConfiguration#compareTo(android.app.WindowConfiguration) parameter #0:
+
+MissingNullability: android.app.WindowConfiguration#getAppBounds():
+
+MissingNullability: android.app.WindowConfiguration#getBounds():
+
+MissingNullability: android.app.WindowConfiguration#setAppBounds(android.graphics.Rect) parameter #0:
+
+MissingNullability: android.app.WindowConfiguration#setBounds(android.graphics.Rect) parameter #0:
+
+MissingNullability: android.app.WindowConfiguration#setTo(android.app.WindowConfiguration) parameter #0:
+
+MissingNullability: android.app.WindowConfiguration#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.admin.DevicePolicyManager#getOwnerInstalledCaCerts(android.os.UserHandle):
+
+MissingNullability: android.app.admin.SecurityLog.SecurityEvent#SecurityEvent(long, byte[]) parameter #1:
+
+MissingNullability: android.app.backup.BackupManager#getConfigurationIntent(String):
+
+MissingNullability: android.app.backup.BackupManager#getConfigurationIntent(String) parameter #0:
+
+MissingNullability: android.app.backup.BackupManager#getDataManagementIntent(String):
+
+MissingNullability: android.app.backup.BackupManager#getDataManagementIntent(String) parameter #0:
+
+MissingNullability: android.app.backup.BackupManager#getDestinationString(String):
+
+MissingNullability: android.app.backup.BackupManager#getDestinationString(String) parameter #0:
+
+MissingNullability: android.app.prediction.AppPredictionSessionId#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.prediction.AppPredictor#getSessionId():
+
+MissingNullability: android.app.prediction.AppTarget#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.prediction.AppTargetEvent#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.app.prediction.AppTargetId#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.content.AutofillOptions#forWhitelistingItself():
+
+MissingNullability: android.content.AutofillOptions#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.content.ContentCaptureOptions#forWhitelistingItself():
+
+MissingNullability: android.content.ContentCaptureOptions#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.content.ContentResolver#getSyncAdapterPackagesForAuthorityAsUser(String, int):
+
+MissingNullability: android.content.ContentResolver#getSyncAdapterPackagesForAuthorityAsUser(String, int) parameter #0:
+
+MissingNullability: android.content.Context#getDisplay():
+
+MissingNullability: android.content.Context#getUser():
+
+MissingNullability: android.content.ContextWrapper#getDisplay():
+
+MissingNullability: android.content.ContextWrapper#setContentCaptureOptions(android.content.ContentCaptureOptions) parameter #0:
+
+MissingNullability: android.content.pm.ActivityInfo#isTranslucentOrFloating(android.content.res.TypedArray) parameter #0:
+
+MissingNullability: android.content.pm.LauncherApps#LauncherApps(android.content.Context) parameter #0:
+
+MissingNullability: android.content.pm.PackageInstaller.SessionParams#setGrantedRuntimePermissions(String[]) parameter #0:
+
+MissingNullability: android.content.pm.PackageManager#getNamesForUids(int[]) parameter #0:
+
+MissingNullability: android.content.pm.ShortcutManager#ShortcutManager(android.content.Context) parameter #0:
+
+MissingNullability: android.content.res.AssetManager#getOverlayablesToString(String) parameter #0:
+
+MissingNullability: android.content.res.Configuration#windowConfiguration:
+
+MissingNullability: android.content.rollback.PackageRollbackInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.content.rollback.RollbackInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.database.sqlite.SQLiteDebug#dump(android.util.Printer, String[]) parameter #0:
+
+MissingNullability: android.database.sqlite.SQLiteDebug#dump(android.util.Printer, String[]) parameter #1:
+
+MissingNullability: android.database.sqlite.SQLiteDebug#getDatabaseInfo():
+
+MissingNullability: android.database.sqlite.SQLiteDebug.DbStats#DbStats(String, long, long, int, int, int, int) parameter #0:
+
+MissingNullability: android.database.sqlite.SQLiteDebug.DbStats#cache:
+
+MissingNullability: android.database.sqlite.SQLiteDebug.DbStats#dbName:
+
+MissingNullability: android.database.sqlite.SQLiteDebug.PagerStats#dbStats:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #0:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #1:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #2:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #3:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#cursorRequeried(android.database.Cursor) parameter #0:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]):
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]) parameter #0:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]) parameter #1:
+
+MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#setBindArguments(String[]) parameter #0:
+
+MissingNullability: android.database.sqlite.SQLiteGlobal#getDefaultJournalMode():
+
+MissingNullability: android.database.sqlite.SQLiteGlobal#getDefaultSyncMode():
+
+MissingNullability: android.database.sqlite.SQLiteGlobal#getWALSyncMode():
+
+MissingNullability: android.graphics.ImageDecoder#createSource(android.content.res.Resources, java.io.InputStream, int) parameter #0:
+
+MissingNullability: android.graphics.ImageDecoder#createSource(android.content.res.Resources, java.io.InputStream, int) parameter #1:
+
+MissingNullability: android.graphics.drawable.AdaptiveIconDrawable#getSafeZone():
+
+MissingNullability: android.graphics.drawable.ColorDrawable#getXfermode():
+
+MissingNullability: android.hardware.camera2.CameraDevice#createCustomCaptureSession(android.hardware.camera2.params.InputConfiguration, java.util.List<android.hardware.camera2.params.OutputConfiguration>, int, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) parameter #0:
+
+MissingNullability: android.hardware.camera2.CameraManager#getCameraIdListNoLazy():
+
+MissingNullability: android.hardware.display.AmbientBrightnessDayStats#getBucketBoundaries():
+
+MissingNullability: android.hardware.display.AmbientBrightnessDayStats#getLocalDate():
+
+MissingNullability: android.hardware.display.AmbientBrightnessDayStats#getStats():
+
+MissingNullability: android.hardware.display.AmbientBrightnessDayStats#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.hardware.display.AmbientDisplayConfiguration#AmbientDisplayConfiguration(android.content.Context) parameter #0:
+
+MissingNullability: android.hardware.display.BrightnessChangeEvent#luxTimestamps:
+
+MissingNullability: android.hardware.display.BrightnessChangeEvent#luxValues:
+
+MissingNullability: android.hardware.display.BrightnessChangeEvent#packageName:
+
+MissingNullability: android.hardware.display.BrightnessChangeEvent#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.hardware.display.BrightnessConfiguration#getCurve():
+
+MissingNullability: android.hardware.display.BrightnessConfiguration#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.hardware.display.BrightnessConfiguration.Builder#Builder(float[], float[]) parameter #0:
+
+MissingNullability: android.hardware.display.BrightnessConfiguration.Builder#Builder(float[], float[]) parameter #1:
+
+MissingNullability: android.hardware.display.BrightnessCorrection#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.hardware.display.DisplayManager#getAmbientBrightnessStats():
+
+MissingNullability: android.hardware.display.DisplayManager#getBrightnessConfiguration():
+
+MissingNullability: android.hardware.display.DisplayManager#getBrightnessEvents():
+
+MissingNullability: android.hardware.display.DisplayManager#getStableDisplaySize():
+
+MissingNullability: android.hardware.display.DisplayManager#setBrightnessConfiguration(android.hardware.display.BrightnessConfiguration) parameter #0:
+
+MissingNullability: android.location.GnssClock#set(android.location.GnssClock) parameter #0:
+
+MissingNullability: android.location.GnssMeasurement#set(android.location.GnssMeasurement) parameter #0:
+
+MissingNullability: android.location.GnssMeasurementsEvent#GnssMeasurementsEvent(android.location.GnssClock, android.location.GnssMeasurement[]) parameter #0:
+
+MissingNullability: android.location.GnssMeasurementsEvent#GnssMeasurementsEvent(android.location.GnssClock, android.location.GnssMeasurement[]) parameter #1:
+
+MissingNullability: android.location.GnssNavigationMessage#set(android.location.GnssNavigationMessage) parameter #0:
+
+MissingNullability: android.location.GnssNavigationMessage#setData(byte[]) parameter #0:
+
+MissingNullability: android.location.LocationManager#getTestProviderCurrentRequests(String) parameter #0:
+
+MissingNullability: android.location.LocationRequest#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.media.AudioFocusInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String) parameter #3:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String) parameter #4:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String) parameter #6:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #10:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #11:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #3:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #4:
+
+MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #6:
+
+MissingNullability: android.media.PlaybackParams#setAudioStretchMode(int):
+
+MissingNullability: android.media.audiofx.AudioEffect#EFFECT_TYPE_NULL:
+
+MissingNullability: android.media.audiofx.AudioEffect#byteArrayToInt(byte[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#byteArrayToShort(byte[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#getParameter(byte[], byte[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#getParameter(byte[], byte[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#getParameter(int, byte[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#getParameter(int, int[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#getParameter(int, short[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#getParameter(int[], short[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#getParameter(int[], short[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#intToByteArray(int):
+
+MissingNullability: android.media.audiofx.AudioEffect#isEffectTypeAvailable(java.util.UUID) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameter(byte[], byte[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameter(byte[], byte[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameter(int, byte[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], byte[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], byte[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], int[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], int[]) parameter #1:
+
+MissingNullability: android.media.audiofx.AudioEffect#setParameterListener(android.media.audiofx.AudioEffect.OnParameterChangeListener) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect#shortToByteArray(short):
+
+MissingNullability: android.media.audiofx.AudioEffect.Descriptor#Descriptor(android.os.Parcel) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect.Descriptor#writeToParcel(android.os.Parcel) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect.OnParameterChangeListener#onParameterChange(android.media.audiofx.AudioEffect, int, byte[], byte[]) parameter #0:
+
+MissingNullability: android.media.audiofx.AudioEffect.OnParameterChangeListener#onParameterChange(android.media.audiofx.AudioEffect, int, byte[], byte[]) parameter #2:
+
+MissingNullability: android.media.audiofx.AudioEffect.OnParameterChangeListener#onParameterChange(android.media.audiofx.AudioEffect, int, byte[], byte[]) parameter #3:
+
+MissingNullability: android.media.audiopolicy.AudioMix.Builder#Builder(android.media.audiopolicy.AudioMixingRule) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioMix.Builder#build():
+
+MissingNullability: android.media.audiopolicy.AudioMix.Builder#setDevice(android.media.AudioDeviceInfo):
+
+MissingNullability: android.media.audiopolicy.AudioMix.Builder#setFormat(android.media.AudioFormat):
+
+MissingNullability: android.media.audiopolicy.AudioMix.Builder#setFormat(android.media.AudioFormat) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioMix.Builder#setRouteFlags(int):
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#addMixRule(int, Object):
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#addMixRule(int, Object) parameter #1:
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#addRule(android.media.AudioAttributes, int):
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#addRule(android.media.AudioAttributes, int) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#build():
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#excludeMixRule(int, Object):
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#excludeMixRule(int, Object) parameter #1:
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#excludeRule(android.media.AudioAttributes, int):
+
+MissingNullability: android.media.audiopolicy.AudioMixingRule.Builder#excludeRule(android.media.AudioAttributes, int) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy#createAudioRecordSink(android.media.audiopolicy.AudioMix):
+
+MissingNullability: android.media.audiopolicy.AudioPolicy#createAudioRecordSink(android.media.audiopolicy.AudioMix) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy#createAudioTrackSource(android.media.audiopolicy.AudioMix):
+
+MissingNullability: android.media.audiopolicy.AudioPolicy#createAudioTrackSource(android.media.audiopolicy.AudioMix) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy#setRegistration(String) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy#toLogFriendlyString():
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener#onAudioFocusAbandon(android.media.AudioFocusInfo) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener#onAudioFocusGrant(android.media.AudioFocusInfo, int) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener#onAudioFocusLoss(android.media.AudioFocusInfo, boolean) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener#onAudioFocusRequest(android.media.AudioFocusInfo, int) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.AudioPolicyStatusListener#onMixStateUpdate(android.media.audiopolicy.AudioMix) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.Builder#Builder(android.content.Context) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.Builder#setAudioPolicyFocusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener) parameter #0:
+
+MissingNullability: android.media.audiopolicy.AudioPolicy.Builder#setAudioPolicyStatusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyStatusListener) parameter #0:
+
+MissingNullability: android.metrics.LogMaker#LogMaker(Object[]) parameter #0:
+
+MissingNullability: android.metrics.LogMaker#addTaggedData(int, Object):
+
+MissingNullability: android.metrics.LogMaker#addTaggedData(int, Object) parameter #1:
+
+MissingNullability: android.metrics.LogMaker#clearCategory():
+
+MissingNullability: android.metrics.LogMaker#clearPackageName():
+
+MissingNullability: android.metrics.LogMaker#clearSubtype():
+
+MissingNullability: android.metrics.LogMaker#clearTaggedData(int):
+
+MissingNullability: android.metrics.LogMaker#clearType():
+
+MissingNullability: android.metrics.LogMaker#deserialize(Object[]) parameter #0:
+
+MissingNullability: android.metrics.LogMaker#getCounterName():
+
+MissingNullability: android.metrics.LogMaker#getPackageName():
+
+MissingNullability: android.metrics.LogMaker#getTaggedData(int):
+
+MissingNullability: android.metrics.LogMaker#isSubsetOf(android.metrics.LogMaker) parameter #0:
+
+MissingNullability: android.metrics.LogMaker#isValidValue(Object) parameter #0:
+
+MissingNullability: android.metrics.LogMaker#serialize():
+
+MissingNullability: android.metrics.LogMaker#setCategory(int):
+
+MissingNullability: android.metrics.LogMaker#setPackageName(String):
+
+MissingNullability: android.metrics.LogMaker#setPackageName(String) parameter #0:
+
+MissingNullability: android.metrics.LogMaker#setSubtype(int):
+
+MissingNullability: android.metrics.LogMaker#setType(int):
+
+MissingNullability: android.metrics.MetricsReader#next():
+
+MissingNullability: android.net.NetworkCapabilities#getCapabilities():
+
+MissingNullability: android.net.StaticIpConfiguration#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.net.TestNetworkInterface#CREATOR:
+
+MissingNullability: android.net.TestNetworkInterface#TestNetworkInterface(android.os.ParcelFileDescriptor, String) parameter #0:
+
+MissingNullability: android.net.TestNetworkInterface#TestNetworkInterface(android.os.ParcelFileDescriptor, String) parameter #1:
+
+MissingNullability: android.net.TestNetworkInterface#getFileDescriptor():
+
+MissingNullability: android.net.TestNetworkInterface#getInterfaceName():
+
+MissingNullability: android.net.TestNetworkInterface#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.net.TestNetworkManager#createTapInterface():
+
+MissingNullability: android.net.TestNetworkManager#createTunInterface(android.net.LinkAddress[]):
+
+MissingNullability: android.net.apf.ApfCapabilities#CREATOR:
+
+MissingNullability: android.net.apf.ApfCapabilities#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.net.metrics.DhcpClientEvent.Builder#setMsg(String) parameter #0:
+
+MissingNullability: android.os.Build#is64BitAbi(String) parameter #0:
+
+MissingNullability: android.os.Build.VERSION#ACTIVE_CODENAMES:
+
+MissingNullability: android.os.Environment#buildPath(java.io.File, java.lang.String...):
+
+MissingNullability: android.os.Environment#buildPath(java.io.File, java.lang.String...) parameter #0:
+
+MissingNullability: android.os.Environment#buildPath(java.io.File, java.lang.String...) parameter #1:
+
+MissingNullability: android.os.FileUtils#contains(java.io.File, java.io.File) parameter #0:
+
+MissingNullability: android.os.FileUtils#contains(java.io.File, java.io.File) parameter #1:
+
+MissingNullability: android.os.HwBinder#getService(String, String):
+
+MissingNullability: android.os.HwBinder#getService(String, String) parameter #0:
+
+MissingNullability: android.os.HwBinder#getService(String, String) parameter #1:
+
+MissingNullability: android.os.HwBinder#getService(String, String, boolean):
+
+MissingNullability: android.os.HwBinder#getService(String, String, boolean) parameter #0:
+
+MissingNullability: android.os.HwBinder#getService(String, String, boolean) parameter #1:
+
+MissingNullability: android.os.HwBinder#onTransact(int, android.os.HwParcel, android.os.HwParcel, int) parameter #1:
+
+MissingNullability: android.os.HwBinder#onTransact(int, android.os.HwParcel, android.os.HwParcel, int) parameter #2:
+
+MissingNullability: android.os.HwBinder#registerService(String) parameter #0:
+
+MissingNullability: android.os.HwBinder#transact(int, android.os.HwParcel, android.os.HwParcel, int) parameter #1:
+
+MissingNullability: android.os.HwBinder#transact(int, android.os.HwParcel, android.os.HwParcel, int) parameter #2:
+
+MissingNullability: android.os.HwBlob#copyToBoolArray(long, boolean[], int) parameter #1:
+
+MissingNullability: android.os.HwBlob#copyToDoubleArray(long, double[], int) parameter #1:
+
+MissingNullability: android.os.HwBlob#copyToFloatArray(long, float[], int) parameter #1:
+
+MissingNullability: android.os.HwBlob#copyToInt16Array(long, short[], int) parameter #1:
+
+MissingNullability: android.os.HwBlob#copyToInt32Array(long, int[], int) parameter #1:
+
+MissingNullability: android.os.HwBlob#copyToInt64Array(long, long[], int) parameter #1:
+
+MissingNullability: android.os.HwBlob#copyToInt8Array(long, byte[], int) parameter #1:
+
+MissingNullability: android.os.HwBlob#getString(long):
+
+MissingNullability: android.os.HwBlob#putBlob(long, android.os.HwBlob) parameter #1:
+
+MissingNullability: android.os.HwBlob#putBoolArray(long, boolean[]) parameter #1:
+
+MissingNullability: android.os.HwBlob#putDoubleArray(long, double[]) parameter #1:
+
+MissingNullability: android.os.HwBlob#putFloatArray(long, float[]) parameter #1:
+
+MissingNullability: android.os.HwBlob#putInt16Array(long, short[]) parameter #1:
+
+MissingNullability: android.os.HwBlob#putInt32Array(long, int[]) parameter #1:
+
+MissingNullability: android.os.HwBlob#putInt64Array(long, long[]) parameter #1:
+
+MissingNullability: android.os.HwBlob#putInt8Array(long, byte[]) parameter #1:
+
+MissingNullability: android.os.HwBlob#putString(long, String) parameter #1:
+
+MissingNullability: android.os.HwBlob#wrapArray(boolean[]):
+
+MissingNullability: android.os.HwBlob#wrapArray(byte[]):
+
+MissingNullability: android.os.HwBlob#wrapArray(double[]):
+
+MissingNullability: android.os.HwBlob#wrapArray(float[]):
+
+MissingNullability: android.os.HwBlob#wrapArray(int[]):
+
+MissingNullability: android.os.HwBlob#wrapArray(long[]):
+
+MissingNullability: android.os.HwBlob#wrapArray(short[]):
+
+MissingNullability: android.os.HwParcel#enforceInterface(String) parameter #0:
+
+MissingNullability: android.os.HwParcel#readBoolVector():
+
+MissingNullability: android.os.HwParcel#readBuffer(long):
+
+MissingNullability: android.os.HwParcel#readDoubleVector():
+
+MissingNullability: android.os.HwParcel#readEmbeddedBuffer(long, long, long, boolean):
+
+MissingNullability: android.os.HwParcel#readFloatVector():
+
+MissingNullability: android.os.HwParcel#readInt16Vector():
+
+MissingNullability: android.os.HwParcel#readInt32Vector():
+
+MissingNullability: android.os.HwParcel#readInt64Vector():
+
+MissingNullability: android.os.HwParcel#readInt8Vector():
+
+MissingNullability: android.os.HwParcel#readString():
+
+MissingNullability: android.os.HwParcel#readStringVector():
+
+MissingNullability: android.os.HwParcel#readStrongBinder():
+
+MissingNullability: android.os.HwParcel#writeBoolVector(java.util.ArrayList<java.lang.Boolean>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeBuffer(android.os.HwBlob) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeDoubleVector(java.util.ArrayList<java.lang.Double>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeFloatVector(java.util.ArrayList<java.lang.Float>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeInt16Vector(java.util.ArrayList<java.lang.Short>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeInt32Vector(java.util.ArrayList<java.lang.Integer>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeInt64Vector(java.util.ArrayList<java.lang.Long>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeInt8Vector(java.util.ArrayList<java.lang.Byte>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeInterfaceToken(String) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeString(String) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeStringVector(java.util.ArrayList<java.lang.String>) parameter #0:
+
+MissingNullability: android.os.HwParcel#writeStrongBinder(android.os.IHwBinder) parameter #0:
+
+MissingNullability: android.os.IHwBinder#linkToDeath(android.os.IHwBinder.DeathRecipient, long) parameter #0:
+
+MissingNullability: android.os.IHwBinder#queryLocalInterface(String):
+
+MissingNullability: android.os.IHwBinder#queryLocalInterface(String) parameter #0:
+
+MissingNullability: android.os.IHwBinder#transact(int, android.os.HwParcel, android.os.HwParcel, int) parameter #1:
+
+MissingNullability: android.os.IHwBinder#transact(int, android.os.HwParcel, android.os.HwParcel, int) parameter #2:
+
+MissingNullability: android.os.IHwBinder#unlinkToDeath(android.os.IHwBinder.DeathRecipient) parameter #0:
+
+MissingNullability: android.os.IHwInterface#asBinder():
+
+MissingNullability: android.os.IncidentManager#approveReport(android.net.Uri) parameter #0:
+
+MissingNullability: android.os.IncidentManager#cancelAuthorization(android.os.IncidentManager.AuthListener) parameter #0:
+
+MissingNullability: android.os.IncidentManager#deleteIncidentReports(android.net.Uri) parameter #0:
+
+MissingNullability: android.os.IncidentManager#denyReport(android.net.Uri) parameter #0:
+
+MissingNullability: android.os.IncidentManager#getIncidentReport(android.net.Uri) parameter #0:
+
+MissingNullability: android.os.IncidentManager#getIncidentReportList(String) parameter #0:
+
+MissingNullability: android.os.IncidentManager#getPendingReports():
+
+MissingNullability: android.os.IncidentManager#reportIncident(android.os.IncidentReportArgs) parameter #0:
+
+MissingNullability: android.os.IncidentManager#requestAuthorization(int, String, int, android.os.IncidentManager.AuthListener) parameter #1:
+
+MissingNullability: android.os.IncidentManager#requestAuthorization(int, String, int, android.os.IncidentManager.AuthListener) parameter #3:
+
+MissingNullability: android.os.IncidentManager.IncidentReport#IncidentReport(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.IncidentManager.IncidentReport#getInputStream():
+
+MissingNullability: android.os.IncidentManager.IncidentReport#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.IncidentReportArgs#IncidentReportArgs(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.IncidentReportArgs#addHeader(byte[]) parameter #0:
+
+MissingNullability: android.os.IncidentReportArgs#readFromParcel(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.IncidentReportArgs#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.ParcelFileDescriptor#getFile(java.io.FileDescriptor):
+
+MissingNullability: android.os.ParcelFileDescriptor#getFile(java.io.FileDescriptor) parameter #0:
+
+MissingNullability: android.os.RemoteCallback#RemoteCallback(android.os.RemoteCallback.OnResultListener) parameter #0:
+
+MissingNullability: android.os.RemoteCallback#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.StrictMode#setViolationLogger(android.os.StrictMode.ViolationLogger) parameter #0:
+
+MissingNullability: android.os.StrictMode.ViolationInfo#ViolationInfo(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.StrictMode.ViolationInfo#ViolationInfo(android.os.Parcel, boolean) parameter #0:
+
+MissingNullability: android.os.StrictMode.ViolationInfo#broadcastIntentAction:
+
+MissingNullability: android.os.StrictMode.ViolationInfo#dump(android.util.Printer, String) parameter #0:
+
+MissingNullability: android.os.StrictMode.ViolationInfo#dump(android.util.Printer, String) parameter #1:
+
+MissingNullability: android.os.StrictMode.ViolationInfo#getStackTrace():
+
+MissingNullability: android.os.StrictMode.ViolationInfo#getViolationClass():
+
+MissingNullability: android.os.StrictMode.ViolationInfo#getViolationDetails():
+
+MissingNullability: android.os.StrictMode.ViolationInfo#tags:
+
+MissingNullability: android.os.StrictMode.ViolationInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.StrictMode.ViolationLogger#log(android.os.StrictMode.ViolationInfo) parameter #0:
+
+MissingNullability: android.os.UserHandle#of(int):
+
+MissingNullability: android.os.VibrationEffect#RINGTONES:
+
+MissingNullability: android.os.VibrationEffect#get(android.net.Uri, android.content.Context) parameter #0:
+
+MissingNullability: android.os.VibrationEffect#get(android.net.Uri, android.content.Context) parameter #1:
+
+MissingNullability: android.os.VibrationEffect#get(int):
+
+MissingNullability: android.os.VibrationEffect#get(int, boolean):
+
+MissingNullability: android.os.VibrationEffect.OneShot#OneShot(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.VibrationEffect.OneShot#scale(float, int):
+
+MissingNullability: android.os.VibrationEffect.OneShot#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.VibrationEffect.Prebaked#Prebaked(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.VibrationEffect.Prebaked#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.VibrationEffect.Waveform#Waveform(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.VibrationEffect.Waveform#Waveform(long[], int[], int) parameter #0:
+
+MissingNullability: android.os.VibrationEffect.Waveform#Waveform(long[], int[], int) parameter #1:
+
+MissingNullability: android.os.VibrationEffect.Waveform#getAmplitudes():
+
+MissingNullability: android.os.VibrationEffect.Waveform#getTimings():
+
+MissingNullability: android.os.VibrationEffect.Waveform#scale(float, int):
+
+MissingNullability: android.os.VibrationEffect.Waveform#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.VintfObject#getHalNamesAndVersions():
+
+MissingNullability: android.os.VintfObject#getSepolicyVersion():
+
+MissingNullability: android.os.VintfObject#getTargetFrameworkCompatibilityMatrixVersion():
+
+MissingNullability: android.os.VintfObject#getVndkSnapshots():
+
+MissingNullability: android.os.VintfObject#report():
+
+MissingNullability: android.os.VintfRuntimeInfo#getCpuInfo():
+
+MissingNullability: android.os.VintfRuntimeInfo#getHardwareId():
+
+MissingNullability: android.os.VintfRuntimeInfo#getKernelVersion():
+
+MissingNullability: android.os.VintfRuntimeInfo#getNodeName():
+
+MissingNullability: android.os.VintfRuntimeInfo#getOsName():
+
+MissingNullability: android.os.VintfRuntimeInfo#getOsRelease():
+
+MissingNullability: android.os.VintfRuntimeInfo#getOsVersion():
+
+MissingNullability: android.os.WorkSource#add(int, String) parameter #1:
+
+MissingNullability: android.os.WorkSource#addReturningNewbs(android.os.WorkSource) parameter #0:
+
+MissingNullability: android.os.WorkSource#getName(int):
+
+MissingNullability: android.os.WorkSource#setReturningDiffs(android.os.WorkSource) parameter #0:
+
+MissingNullability: android.os.health.HealthKeys.Constants#Constants(Class) parameter #0:
+
+MissingNullability: android.os.health.HealthKeys.Constants#getDataType():
+
+MissingNullability: android.os.health.HealthKeys.Constants#getKeys(int):
+
+MissingNullability: android.os.health.HealthStats#HealthStats(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.health.HealthStatsParceler#HealthStatsParceler(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.health.HealthStatsParceler#HealthStatsParceler(android.os.health.HealthStatsWriter) parameter #0:
+
+MissingNullability: android.os.health.HealthStatsParceler#getHealthStats():
+
+MissingNullability: android.os.health.HealthStatsParceler#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.os.health.HealthStatsWriter#HealthStatsWriter(android.os.health.HealthKeys.Constants) parameter #0:
+
+MissingNullability: android.os.health.HealthStatsWriter#addMeasurements(int, String, long) parameter #1:
+
+MissingNullability: android.os.health.HealthStatsWriter#addStats(int, String, android.os.health.HealthStatsWriter) parameter #1:
+
+MissingNullability: android.os.health.HealthStatsWriter#addStats(int, String, android.os.health.HealthStatsWriter) parameter #2:
+
+MissingNullability: android.os.health.HealthStatsWriter#addTimers(int, String, android.os.health.TimerStat) parameter #1:
+
+MissingNullability: android.os.health.HealthStatsWriter#addTimers(int, String, android.os.health.TimerStat) parameter #2:
+
+MissingNullability: android.os.health.HealthStatsWriter#flattenToParcel(android.os.Parcel) parameter #0:
+
+MissingNullability: android.os.storage.StorageVolume#getPath():
+
+MissingNullability: android.permission.RuntimePermissionPresentationInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.provider.CalendarContract.Calendars#SYNC_WRITABLE_COLUMNS:
+
+MissingNullability: android.provider.CalendarContract.Events#SYNC_WRITABLE_COLUMNS:
+
+MissingNullability: android.provider.ContactsContract.CommonDataKinds.Phone#ENTERPRISE_CONTENT_URI:
+
+MissingNullability: android.provider.ContactsContract.RawContactsEntity#CORP_CONTENT_URI:
+
+MissingNullability: android.provider.DeviceConfig#getProperty(String, String):
+
+MissingNullability: android.provider.DeviceConfig#getString(String, String, String):
+
+MissingNullability: android.provider.MediaStore#deleteContributedMedia(android.content.Context, String, android.os.UserHandle) parameter #0:
+
+MissingNullability: android.provider.MediaStore#deleteContributedMedia(android.content.Context, String, android.os.UserHandle) parameter #1:
+
+MissingNullability: android.provider.MediaStore#deleteContributedMedia(android.content.Context, String, android.os.UserHandle) parameter #2:
+
+MissingNullability: android.provider.MediaStore#getContributedMediaSize(android.content.Context, String, android.os.UserHandle) parameter #0:
+
+MissingNullability: android.provider.MediaStore#getContributedMediaSize(android.content.Context, String, android.os.UserHandle) parameter #1:
+
+MissingNullability: android.provider.MediaStore#getContributedMediaSize(android.content.Context, String, android.os.UserHandle) parameter #2:
+
+MissingNullability: android.provider.MediaStore#scanFile(android.content.Context, java.io.File):
+
+MissingNullability: android.provider.MediaStore#scanFile(android.content.Context, java.io.File) parameter #0:
+
+MissingNullability: android.provider.MediaStore#scanFile(android.content.Context, java.io.File) parameter #1:
+
+MissingNullability: android.provider.MediaStore#scanFileFromShell(android.content.Context, java.io.File):
+
+MissingNullability: android.provider.MediaStore#scanFileFromShell(android.content.Context, java.io.File) parameter #0:
+
+MissingNullability: android.provider.MediaStore#scanFileFromShell(android.content.Context, java.io.File) parameter #1:
+
+MissingNullability: android.provider.MediaStore#scanVolume(android.content.Context, java.io.File) parameter #0:
+
+MissingNullability: android.provider.MediaStore#scanVolume(android.content.Context, java.io.File) parameter #1:
+
+MissingNullability: android.provider.MediaStore#waitForIdle(android.content.Context) parameter #0:
+
+MissingNullability: android.security.KeyStoreException#KeyStoreException(int, String) parameter #1:
+
+MissingNullability: android.security.keystore.AttestationUtils#attestDeviceIds(android.content.Context, int[], byte[]) parameter #0:
+
+MissingNullability: android.security.keystore.KeyProtection.Builder#setBoundToSpecificSecureUserId(long):
+
+MissingNullability: android.service.autofill.AutofillFieldClassificationService#onBind(android.content.Intent):
+
+MissingNullability: android.service.autofill.AutofillFieldClassificationService#onBind(android.content.Intent) parameter #0:
+
+MissingNullability: android.service.autofill.CompositeUserData#getCategoryIds():
+
+MissingNullability: android.service.autofill.CompositeUserData#getDefaultFieldClassificationArgs():
+
+MissingNullability: android.service.autofill.CompositeUserData#getFieldClassificationAlgorithms():
+
+MissingNullability: android.service.autofill.CompositeUserData#getFieldClassificationArgs():
+
+MissingNullability: android.service.autofill.CompositeUserData#getValues():
+
+MissingNullability: android.service.autofill.CompositeUserData#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.service.autofill.UserData#getFieldClassificationAlgorithms():
+
+MissingNullability: android.service.autofill.augmented.AugmentedAutofillService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
+
+MissingNullability: android.service.autofill.augmented.AugmentedAutofillService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #1:
+
+MissingNullability: android.service.autofill.augmented.AugmentedAutofillService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #2:
+
+MissingNullability: android.service.autofill.augmented.AugmentedAutofillService#onUnbind(android.content.Intent) parameter #0:
+
+MissingNullability: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
+
+MissingNullability: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #1:
+
+MissingNullability: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #2:
+
+MissingNullability: android.service.notification.Adjustment#Adjustment(String, String, android.os.Bundle, CharSequence, int) parameter #0:
+
+MissingNullability: android.service.notification.Adjustment#Adjustment(String, String, android.os.Bundle, CharSequence, int) parameter #1:
+
+MissingNullability: android.service.notification.Adjustment#Adjustment(String, String, android.os.Bundle, CharSequence, int) parameter #2:
+
+MissingNullability: android.service.notification.Adjustment#Adjustment(String, String, android.os.Bundle, CharSequence, int) parameter #3:
+
+MissingNullability: android.service.notification.Adjustment#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.service.notification.NotificationAssistantService#attachBaseContext(android.content.Context) parameter #0:
+
+MissingNullability: android.service.notification.NotificationStats#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.service.notification.SnoozeCriterion#SnoozeCriterion(String, CharSequence, CharSequence) parameter #0:
+
+MissingNullability: android.service.notification.SnoozeCriterion#SnoozeCriterion(String, CharSequence, CharSequence) parameter #1:
+
+MissingNullability: android.service.notification.SnoozeCriterion#SnoozeCriterion(String, CharSequence, CharSequence) parameter #2:
+
+MissingNullability: android.service.notification.SnoozeCriterion#SnoozeCriterion(android.os.Parcel) parameter #0:
+
+MissingNullability: android.service.notification.SnoozeCriterion#getConfirmation():
+
+MissingNullability: android.service.notification.SnoozeCriterion#getExplanation():
+
+MissingNullability: android.service.notification.SnoozeCriterion#getId():
+
+MissingNullability: android.service.notification.SnoozeCriterion#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.telecom.Call.Details#getTelecomCallId():
+
+MissingNullability: android.telecom.CallScreeningService.CallResponse.Builder#setShouldScreenCallFurther(boolean):
+
+MissingNullability: android.telecom.Conference#getPrimaryConnection():
+
+MissingNullability: android.telecom.PhoneAccountSuggestionService#onBind(android.content.Intent):
+
+MissingNullability: android.telecom.PhoneAccountSuggestionService#onBind(android.content.Intent) parameter #0:
+
+MissingNullability: android.telephony.DataSpecificRegistrationInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.telephony.LteVopsSupportInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.telephony.NetworkRegistrationInfo#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.telephony.ServiceState#addNetworkRegistrationInfo(android.telephony.NetworkRegistrationInfo) parameter #0:
+
+MissingNullability: android.telephony.ServiceState#setCellBandwidths(int[]) parameter #0:
+
+MissingNullability: android.telephony.SmsManager#checkSmsShortCodeDestination(String, String) parameter #0:
+
+MissingNullability: android.telephony.SmsManager#checkSmsShortCodeDestination(String, String) parameter #1:
+
+MissingNullability: android.telephony.TelephonyManager#checkCarrierPrivilegesForPackage(String) parameter #0:
+
+MissingNullability: android.telephony.TelephonyManager#getLine1AlphaTag():
+
+MissingNullability: android.telephony.TelephonyManager#getRadioHalVersion():
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String) parameter #0:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String) parameter #1:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String) parameter #2:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String) parameter #3:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String) parameter #4:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String) parameter #5:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String) parameter #6:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #0:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #1:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #2:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #3:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #4:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #5:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #6:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #7:
+
+MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #8:
+
+MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String):
+
+MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String) parameter #0:
+
+MissingNullability: android.telephony.mbms.FileInfo#FileInfo(android.net.Uri, String) parameter #0:
+
+MissingNullability: android.telephony.mbms.FileInfo#FileInfo(android.net.Uri, String) parameter #1:
+
+MissingNullability: android.telephony.mbms.FileServiceInfo#FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>) parameter #0:
+
+MissingNullability: android.telephony.mbms.FileServiceInfo#FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>) parameter #1:
+
+MissingNullability: android.telephony.mbms.FileServiceInfo#FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>) parameter #2:
+
+MissingNullability: android.telephony.mbms.FileServiceInfo#FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>) parameter #3:
+
+MissingNullability: android.telephony.mbms.FileServiceInfo#FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>) parameter #4:
+
+MissingNullability: android.telephony.mbms.FileServiceInfo#FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>) parameter #5:
+
+MissingNullability: android.telephony.mbms.FileServiceInfo#FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>) parameter #6:
+
+MissingNullability: android.telephony.mbms.StreamingServiceInfo#StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date) parameter #0:
+
+MissingNullability: android.telephony.mbms.StreamingServiceInfo#StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date) parameter #1:
+
+MissingNullability: android.telephony.mbms.StreamingServiceInfo#StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date) parameter #2:
+
+MissingNullability: android.telephony.mbms.StreamingServiceInfo#StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date) parameter #3:
+
+MissingNullability: android.telephony.mbms.StreamingServiceInfo#StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date) parameter #4:
+
+MissingNullability: android.telephony.mbms.StreamingServiceInfo#StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date) parameter #5:
+
+MissingNullability: android.telephony.mbms.UriPathPair#getContentUri():
+
+MissingNullability: android.telephony.mbms.UriPathPair#getFilePathUri():
+
+MissingNullability: android.telephony.mbms.UriPathPair#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#asBinder():
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#cancelDownload(android.telephony.mbms.DownloadRequest) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#download(android.telephony.mbms.DownloadRequest) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#initialize(int, android.telephony.mbms.MbmsDownloadSessionCallback) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#onTransact(int, android.os.Parcel, android.os.Parcel, int) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#onTransact(int, android.os.Parcel, android.os.Parcel, int) parameter #2:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#requestUpdateFileServices(int, java.util.List<java.lang.String>) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#resetDownloadKnowledge(android.telephony.mbms.DownloadRequest) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsDownloadServiceBase#setTempFileRootDirectory(int, String) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#onBind(android.content.Intent):
+
+MissingNullability: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#onBind(android.content.Intent) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#asBinder():
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#getPlaybackUri(int, String) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#initialize(android.telephony.mbms.MbmsStreamingSessionCallback, int) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#onTransact(int, android.os.Parcel, android.os.Parcel, int) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#onTransact(int, android.os.Parcel, android.os.Parcel, int) parameter #2:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#requestUpdateStreamingServices(int, java.util.List<java.lang.String>) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#startStreaming(int, String, android.telephony.mbms.StreamingServiceCallback) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#startStreaming(int, String, android.telephony.mbms.StreamingServiceCallback) parameter #2:
+
+MissingNullability: android.telephony.mbms.vendor.MbmsStreamingServiceBase#stopStreaming(int, String) parameter #1:
+
+MissingNullability: android.telephony.mbms.vendor.VendorUtils#getAppReceiverFromPackageName(android.content.Context, String):
+
+MissingNullability: android.telephony.mbms.vendor.VendorUtils#getAppReceiverFromPackageName(android.content.Context, String) parameter #0:
+
+MissingNullability: android.telephony.mbms.vendor.VendorUtils#getAppReceiverFromPackageName(android.content.Context, String) parameter #1:
+
+MissingNullability: android.text.Selection.MemoryTextWatcher#afterTextChanged(android.text.Editable) parameter #0:
+
+MissingNullability: android.text.Selection.MemoryTextWatcher#beforeTextChanged(CharSequence, int, int, int) parameter #0:
+
+MissingNullability: android.text.Selection.MemoryTextWatcher#onTextChanged(CharSequence, int, int, int) parameter #0:
+
+MissingNullability: android.transition.TransitionManager#getTransition(android.transition.Scene):
+
+MissingNullability: android.transition.TransitionManager#getTransition(android.transition.Scene) parameter #0:
+
+MissingNullability: android.util.FeatureFlagUtils#getAllFeatureFlags():
+
+MissingNullability: android.util.FeatureFlagUtils#isEnabled(android.content.Context, String) parameter #0:
+
+MissingNullability: android.util.FeatureFlagUtils#isEnabled(android.content.Context, String) parameter #1:
+
+MissingNullability: android.util.FeatureFlagUtils#setEnabled(android.content.Context, String, boolean) parameter #0:
+
+MissingNullability: android.util.FeatureFlagUtils#setEnabled(android.content.Context, String, boolean) parameter #1:
+
+MissingNullability: android.util.TimeUtils#formatDuration(long):
+
+MissingNullability: android.util.proto.EncodedBuffer#dumpBuffers(String) parameter #0:
+
+MissingNullability: android.util.proto.EncodedBuffer#dumpByteString(String, String, byte[]) parameter #0:
+
+MissingNullability: android.util.proto.EncodedBuffer#dumpByteString(String, String, byte[]) parameter #1:
+
+MissingNullability: android.util.proto.EncodedBuffer#dumpByteString(String, String, byte[]) parameter #2:
+
+MissingNullability: android.util.proto.EncodedBuffer#getBytes(int):
+
+MissingNullability: android.util.proto.EncodedBuffer#getDebugString():
+
+MissingNullability: android.util.proto.EncodedBuffer#writeRawBuffer(byte[]) parameter #0:
+
+MissingNullability: android.util.proto.EncodedBuffer#writeRawBuffer(byte[], int, int) parameter #0:
+
+MissingNullability: android.util.proto.ProtoOutputStream#ProtoOutputStream(java.io.FileDescriptor) parameter #0:
+
+MissingNullability: android.util.proto.ProtoOutputStream#ProtoOutputStream(java.io.OutputStream) parameter #0:
+
+MissingNullability: android.util.proto.ProtoOutputStream#dump(String) parameter #0:
+
+MissingNullability: android.util.proto.ProtoOutputStream#getBytes():
+
+MissingNullability: android.util.proto.ProtoOutputStream#write(long, String) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#write(long, byte[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writeBytes(long, byte[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writeObject(long, byte[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedBool(long, boolean[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedDouble(long, double[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedEnum(long, int[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedFixed32(long, int[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedFixed64(long, long[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedFloat(long, float[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedInt32(long, int[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedInt64(long, long[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedSFixed32(long, int[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedSFixed64(long, long[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedSInt32(long, int[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedSInt64(long, long[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedUInt32(long, int[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writePackedUInt64(long, long[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writeRepeatedBytes(long, byte[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writeRepeatedObject(long, byte[]) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writeRepeatedString(long, String) parameter #1:
+
+MissingNullability: android.util.proto.ProtoOutputStream#writeString(long, String) parameter #1:
+
+MissingNullability: android.util.proto.ProtoParseException#ProtoParseException(String) parameter #0:
+
+MissingNullability: android.util.proto.ProtoStream#FIELD_TYPE_NAMES:
+
+MissingNullability: android.util.proto.ProtoStream#getFieldCountString(long):
+
+MissingNullability: android.util.proto.ProtoStream#getFieldIdString(long):
+
+MissingNullability: android.util.proto.ProtoStream#getFieldTypeString(long):
+
+MissingNullability: android.util.proto.ProtoStream#getWireTypeString(int):
+
+MissingNullability: android.util.proto.ProtoStream#token2String(long):
+
+MissingNullability: android.util.proto.WireTypeMismatchException#WireTypeMismatchException(String) parameter #0:
+
+MissingNullability: android.view.Choreographer#postCallback(int, Runnable, Object) parameter #1:
+
+MissingNullability: android.view.Choreographer#postCallback(int, Runnable, Object) parameter #2:
+
+MissingNullability: android.view.Choreographer#postCallbackDelayed(int, Runnable, Object, long) parameter #1:
+
+MissingNullability: android.view.Choreographer#postCallbackDelayed(int, Runnable, Object, long) parameter #2:
+
+MissingNullability: android.view.Choreographer#removeCallbacks(int, Runnable, Object) parameter #1:
+
+MissingNullability: android.view.Choreographer#removeCallbacks(int, Runnable, Object) parameter #2:
+
+MissingNullability: android.view.FocusFinder#sort(android.view.View[], int, int, android.view.ViewGroup, boolean) parameter #0:
+
+MissingNullability: android.view.FocusFinder#sort(android.view.View[], int, int, android.view.ViewGroup, boolean) parameter #3:
+
+MissingNullability: android.view.KeyEvent#actionToString(int):
+
+MissingNullability: android.view.View#getTooltipView():
+
+MissingNullability: android.view.View#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #0:
+
+MissingNullability: android.view.View#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #1:
+
+MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.concurrent.Callable<java.io.OutputStream>) parameter #0:
+
+MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.concurrent.Callable<java.io.OutputStream>) parameter #1:
+
+MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.concurrent.Callable<java.io.OutputStream>) parameter #2:
+
+MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.function.Function<android.graphics.Picture,java.lang.Boolean>) parameter #0:
+
+MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.function.Function<android.graphics.Picture,java.lang.Boolean>) parameter #1:
+
+MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.function.Function<android.graphics.Picture,java.lang.Boolean>) parameter #2:
+
+MissingNullability: android.view.WindowManager.LayoutParams#accessibilityTitle:
+
+MissingNullability: android.view.WindowlessViewRoot#WindowlessViewRoot(android.content.Context, android.view.Display, android.view.SurfaceControl) parameter #0:
+
+MissingNullability: android.view.WindowlessViewRoot#WindowlessViewRoot(android.content.Context, android.view.Display, android.view.SurfaceControl) parameter #1:
+
+MissingNullability: android.view.WindowlessViewRoot#WindowlessViewRoot(android.content.Context, android.view.Display, android.view.SurfaceControl) parameter #2:
+
+MissingNullability: android.view.WindowlessViewRoot#addView(android.view.View, android.view.WindowManager.LayoutParams) parameter #0:
+
+MissingNullability: android.view.WindowlessViewRoot#addView(android.view.View, android.view.WindowManager.LayoutParams) parameter #1:
+
+MissingNullability: android.view.WindowlessViewRoot#relayout(android.view.WindowManager.LayoutParams) parameter #0:
+
+MissingNullability: android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener#onAccessibilityServicesStateChanged(android.view.accessibility.AccessibilityManager) parameter #0:
+
+MissingNullability: android.view.accessibility.AccessibilityNodeInfo#setNumInstancesInUseCounter(java.util.concurrent.atomic.AtomicInteger) parameter #0:
+
+MissingNullability: android.view.accessibility.AccessibilityNodeInfo#writeToParcelNoRecycle(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.view.accessibility.AccessibilityWindowInfo#setNumInstancesInUseCounter(java.util.concurrent.atomic.AtomicInteger) parameter #0:
+
+MissingNullability: android.view.contentcapture.ContentCaptureEvent#writeToParcel(android.os.Parcel, int) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#asyncNewChild(int):
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getAutofillId():
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getExtras():
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getHint():
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getNode():
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getTempRect():
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getText():
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#newChild(int):
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#newHtmlInfoBuilder(String):
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#newHtmlInfoBuilder(String) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillHints(String[]) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillId(android.view.autofill.AutofillId) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillId(android.view.autofill.AutofillId, int) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillOptions(CharSequence[]) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillValue(android.view.autofill.AutofillValue) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setClassName(String) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setContentDescription(CharSequence) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setHint(CharSequence) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setHintIdEntry(String) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setHtmlInfo(android.view.ViewStructure.HtmlInfo) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setId(int, String, String, String) parameter #1:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setId(int, String, String, String) parameter #2:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setId(int, String, String, String) parameter #3:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setLocaleList(android.os.LocaleList) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setText(CharSequence) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setText(CharSequence, int, int) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setTextLines(int[], int[]) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setTextLines(int[], int[]) parameter #1:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setTransformation(android.graphics.Matrix) parameter #0:
+
+MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setWebDomain(String) parameter #0:
+
+MissingNullability: android.widget.CalendarView#getBoundsForDate(long, android.graphics.Rect) parameter #1:
+
+MissingNullability: android.widget.ImageView#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #0:
+
+MissingNullability: android.widget.ImageView#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #1:
+
+MissingNullability: android.widget.Magnifier#getMagnifierDefaultSize():
+
+MissingNullability: android.widget.Magnifier#setOnOperationCompleteCallback(android.widget.Magnifier.Callback) parameter #0:
+
+MissingNullability: android.widget.NumberPicker#getDisplayedValueForCurrentSelection():
+
+MissingNullability: android.widget.PopupMenu#getMenuListView():
+
+MissingNullability: android.widget.TimePicker#getAmView():
+
+MissingNullability: android.widget.TimePicker#getHourView():
+
+MissingNullability: android.widget.TimePicker#getMinuteView():
+
+MissingNullability: android.widget.TimePicker#getPmView():
+
+
+
+NoByteOrShort: android.media.audiofx.AudioEffect#byteArrayToShort(byte[]):
+
+NoByteOrShort: android.media.audiofx.AudioEffect#setParameter(int, short) parameter #1:
+
+NoByteOrShort: android.media.audiofx.AudioEffect#shortToByteArray(short) parameter #0:
+
+NoByteOrShort: android.os.HwBlob#getInt16(long):
+
+NoByteOrShort: android.os.HwBlob#getInt8(long):
+
+NoByteOrShort: android.os.HwBlob#putInt16(long, short) parameter #1:
+
+NoByteOrShort: android.os.HwBlob#putInt8(long, byte) parameter #1:
+
+NoByteOrShort: android.os.HwParcel#readInt16():
+
+NoByteOrShort: android.os.HwParcel#readInt8():
+
+NoByteOrShort: android.os.HwParcel#writeInt16(short) parameter #0:
+
+NoByteOrShort: android.os.HwParcel#writeInt8(byte) parameter #0:
+
+NoByteOrShort: android.util.proto.EncodedBuffer#readRawByte():
+
+NoByteOrShort: android.util.proto.EncodedBuffer#writeRawByte(byte) parameter #0:
+
+
+
+NoClone: android.net.util.SocketUtils#bindSocketToInterface(java.io.FileDescriptor, String) parameter #0:
+
+NoClone: android.net.util.SocketUtils#closeSocket(java.io.FileDescriptor) parameter #0:
+
+NoClone: android.os.NativeHandle#NativeHandle(java.io.FileDescriptor, boolean) parameter #0:
+
+NoClone: android.os.NativeHandle#getFileDescriptor():
+
+NoClone: android.os.ParcelFileDescriptor#getFile(java.io.FileDescriptor) parameter #0:
+
+NoClone: android.service.autofill.augmented.AugmentedAutofillService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
+
+NoClone: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
+
+NoClone: android.util.proto.ProtoOutputStream#ProtoOutputStream(java.io.FileDescriptor) parameter #0:
+
+
+
+NotCloseable: android.app.ActivityView:
+
+NotCloseable: android.app.prediction.AppPredictor:
+
+NotCloseable: android.os.HwParcel:
+
+
+
+OnNameExpected: android.service.autofill.augmented.AugmentedAutofillService#dump(java.io.PrintWriter, String[]):
+
+OnNameExpected: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]):
+
+OnNameExpected: android.service.notification.ConditionProviderService#isBound():
+
+OnNameExpected: android.service.notification.NotificationAssistantService#attachBaseContext(android.content.Context):
+
+OnNameExpected: android.service.quicksettings.TileService#isQuickSettingsSupported():
+
+OnNameExpected: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#dispose(int):
+
+OnNameExpected: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#initialize(android.telephony.mbms.MbmsGroupCallSessionCallback, int):
+
+OnNameExpected: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#startGroupCall(int, long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>, android.telephony.mbms.GroupCallCallback):
+
+OnNameExpected: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#stopGroupCall(int, long):
+
+OnNameExpected: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#updateGroupCall(int, long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>):
+
+
+
+PackageLayering: android.util.FeatureFlagUtils:
+
+
+
+ParcelConstructor: android.os.IncidentManager.IncidentReport#IncidentReport(android.os.Parcel):
+
+ParcelConstructor: android.os.IncidentReportArgs#IncidentReportArgs(android.os.Parcel):
+
+ParcelConstructor: android.os.StrictMode.ViolationInfo#ViolationInfo(android.os.Parcel):
+
+ParcelConstructor: android.os.VibrationEffect.OneShot#OneShot(android.os.Parcel):
+
+ParcelConstructor: android.os.VibrationEffect.Prebaked#Prebaked(android.os.Parcel):
+
+ParcelConstructor: android.os.VibrationEffect.Waveform#Waveform(android.os.Parcel):
+
+ParcelConstructor: android.os.health.HealthStatsParceler#HealthStatsParceler(android.os.Parcel):
+
+ParcelConstructor: android.service.notification.SnoozeCriterion#SnoozeCriterion(android.os.Parcel):
+
+
+
+ParcelCreator: android.app.WindowConfiguration:
+
+ParcelCreator: android.net.metrics.ApfProgramEvent:
+
+ParcelCreator: android.net.metrics.ApfStats:
+
+ParcelCreator: android.net.metrics.DhcpClientEvent:
+
+ParcelCreator: android.net.metrics.DhcpErrorEvent:
+
+ParcelCreator: android.net.metrics.IpConnectivityLog.Event:
+
+ParcelCreator: android.net.metrics.IpManagerEvent:
+
+ParcelCreator: android.net.metrics.IpReachabilityEvent:
+
+ParcelCreator: android.net.metrics.NetworkEvent:
+
+ParcelCreator: android.net.metrics.RaEvent:
+
+ParcelCreator: android.net.metrics.ValidationProbeEvent:
+
+ParcelCreator: android.os.VibrationEffect.OneShot:
+
+ParcelCreator: android.os.VibrationEffect.Prebaked:
+
+ParcelCreator: android.os.VibrationEffect.Waveform:
+
+ParcelCreator: android.service.autofill.InternalOnClickAction:
+
+ParcelCreator: android.service.autofill.InternalSanitizer:
+
+ParcelCreator: android.service.autofill.InternalTransformation:
+
+ParcelCreator: android.service.autofill.InternalValidator:
+
+
+
+ParcelNotFinal: android.app.WindowConfiguration:
+
+ParcelNotFinal: android.net.metrics.IpConnectivityLog.Event:
+
+ParcelNotFinal: android.os.IncidentManager.IncidentReport:
+
+ParcelNotFinal: android.os.VibrationEffect.OneShot:
+
+ParcelNotFinal: android.os.VibrationEffect.Prebaked:
+
+ParcelNotFinal: android.os.VibrationEffect.Waveform:
+
+ParcelNotFinal: android.os.health.HealthStatsParceler:
+
+ParcelNotFinal: android.service.autofill.InternalOnClickAction:
+
+ParcelNotFinal: android.service.autofill.InternalSanitizer:
+
+ParcelNotFinal: android.service.autofill.InternalTransformation:
+
+ParcelNotFinal: android.service.autofill.InternalValidator:
+
+
+
+ProtectedMember: android.app.ActivityView#onVisibilityChanged(android.view.View, int):
+
+ProtectedMember: android.app.AppDetailsActivity#onCreate(android.os.Bundle):
+
+ProtectedMember: android.os.VibrationEffect#scale(int, float, int):
+
+ProtectedMember: android.service.autofill.augmented.AugmentedAutofillService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]):
+
+ProtectedMember: android.service.autofill.augmented.AugmentedAutofillService#dump(java.io.PrintWriter, String[]):
+
+ProtectedMember: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]):
+
+ProtectedMember: android.service.notification.NotificationAssistantService#attachBaseContext(android.content.Context):
+
+ProtectedMember: android.util.proto.ProtoStream#FIELD_TYPE_NAMES:
+
+ProtectedMember: android.view.View#resetResolvedDrawables():
+
+ProtectedMember: android.view.ViewGroup#resetResolvedDrawables():
+
+
+
+RawAidl: android.telephony.mbms.vendor.MbmsDownloadServiceBase:
+
+RawAidl: android.telephony.mbms.vendor.MbmsStreamingServiceBase:
+
+
+
+RethrowRemoteException: android.app.ActivityManager#resumeAppSwitches():
+
+RethrowRemoteException: android.os.HwBinder#getService(String, String):
+
+RethrowRemoteException: android.os.HwBinder#getService(String, String, boolean):
+
+RethrowRemoteException: android.os.HwBinder#onTransact(int, android.os.HwParcel, android.os.HwParcel, int):
+
+RethrowRemoteException: android.os.HwBinder#registerService(String):
+
+RethrowRemoteException: android.os.HwBinder#transact(int, android.os.HwParcel, android.os.HwParcel, int):
+
+RethrowRemoteException: android.os.IHwBinder#transact(int, android.os.HwParcel, android.os.HwParcel, int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#cancelDownload(android.telephony.mbms.DownloadRequest):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#dispose(int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#download(android.telephony.mbms.DownloadRequest):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#initialize(int, android.telephony.mbms.MbmsDownloadSessionCallback):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#listPendingDownloads(int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#onTransact(int, android.os.Parcel, android.os.Parcel, int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#requestUpdateFileServices(int, java.util.List<java.lang.String>):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#resetDownloadKnowledge(android.telephony.mbms.DownloadRequest):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsDownloadServiceBase#setTempFileRootDirectory(int, String):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#dispose(int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsGroupCallServiceBase#initialize(android.telephony.mbms.MbmsGroupCallSessionCallback, int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsStreamingServiceBase#dispose(int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsStreamingServiceBase#getPlaybackUri(int, String):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsStreamingServiceBase#initialize(android.telephony.mbms.MbmsStreamingSessionCallback, int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsStreamingServiceBase#onTransact(int, android.os.Parcel, android.os.Parcel, int):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsStreamingServiceBase#requestUpdateStreamingServices(int, java.util.List<java.lang.String>):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsStreamingServiceBase#startStreaming(int, String, android.telephony.mbms.StreamingServiceCallback):
+
+RethrowRemoteException: android.telephony.mbms.vendor.MbmsStreamingServiceBase#stopStreaming(int, String):
+
+
+
+SamShouldBeLast: android.app.ActivityManager#addOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener, int):
+
+SamShouldBeLast: android.app.role.RoleManager#addOnRoleHoldersChangedListenerAsUser(java.util.concurrent.Executor, android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle):
+
+SamShouldBeLast: android.app.role.RoleManager#removeOnRoleHoldersChangedListenerAsUser(android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle):
+
+SamShouldBeLast: android.database.sqlite.SQLiteDebug#dump(android.util.Printer, String[]):
+
+SamShouldBeLast: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]):
+
+SamShouldBeLast: android.location.LocationManager#requestLocationUpdates(android.location.LocationRequest, java.util.concurrent.Executor, android.location.LocationListener):
+
+SamShouldBeLast: android.os.BugreportManager#startBugreport(android.os.ParcelFileDescriptor, android.os.ParcelFileDescriptor, android.os.BugreportParams, java.util.concurrent.Executor, android.os.BugreportManager.BugreportCallback):
+
+SamShouldBeLast: android.os.IHwBinder#linkToDeath(android.os.IHwBinder.DeathRecipient, long):
+
+SamShouldBeLast: android.os.StrictMode.ViolationInfo#dump(android.util.Printer, String):
+
+SamShouldBeLast: android.permission.PermissionControllerManager#getAppPermissions(String, android.permission.PermissionControllerManager.OnGetAppPermissionResultCallback, android.os.Handler):
+
+SamShouldBeLast: android.permission.PermissionControllerManager#revokeRuntimePermissions(java.util.Map<java.lang.String,java.util.List<java.lang.String>>, boolean, int, java.util.concurrent.Executor, android.permission.PermissionControllerManager.OnRevokeRuntimePermissionsCallback):
+
+SamShouldBeLast: android.service.autofill.CharSequenceTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
+
+SamShouldBeLast: android.service.autofill.DateTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
+
+SamShouldBeLast: android.service.autofill.ImageTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
+
+SamShouldBeLast: android.service.autofill.InternalTransformation#batchApply(android.service.autofill.ValueFinder, android.widget.RemoteViews, java.util.ArrayList<android.util.Pair<java.lang.Integer,android.service.autofill.InternalTransformation>>):
+
+SamShouldBeLast: android.view.Choreographer#postCallback(int, Runnable, Object):
+
+SamShouldBeLast: android.view.Choreographer#postCallbackDelayed(int, Runnable, Object, long):
+
+SamShouldBeLast: android.view.Choreographer#removeCallbacks(int, Runnable, Object):
+
+SamShouldBeLast: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.function.Function<android.graphics.Picture,java.lang.Boolean>):
+
+SamShouldBeLast: android.view.accessibility.AccessibilityManager#addAccessibilityServicesStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener, android.os.Handler):
+
+
+
+ServiceName: android.Manifest.permission#BIND_CELL_BROADCAST_SERVICE:
+
+ServiceName: android.app.AppOpsManager#OPSTR_BIND_ACCESSIBILITY_SERVICE:
+
+ServiceName: android.provider.Settings.Secure#ACCESSIBILITY_SHORTCUT_TARGET_SERVICE:
+
+ServiceName: android.provider.Settings.Secure#AUTOFILL_SERVICE:
+
+ServiceName: android.provider.Settings.Secure#VOICE_INTERACTION_SERVICE:
+
+
+
+SetterReturnsThis: android.media.audiopolicy.AudioPolicy.Builder#setAudioPolicyFocusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener):
+
+SetterReturnsThis: android.media.audiopolicy.AudioPolicy.Builder#setAudioPolicyStatusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyStatusListener):
+
+
+
+StaticUtils: android.os.health.HealthKeys:
+
+StaticUtils: android.service.autofill.InternalTransformation:
+
+StaticUtils: android.telephony.mbms.vendor.VendorUtils:
+
+StaticUtils: android.util.FeatureFlagUtils:
+
+StaticUtils: android.util.proto.ProtoStream:
+
+
+
+StreamFiles: android.os.Environment#buildPath(java.io.File, java.lang.String...):
+
+StreamFiles: android.os.FileUtils#contains(java.io.File, java.io.File):
+
+StreamFiles: android.provider.MediaStore#scanFile(android.content.Context, java.io.File):
+
+StreamFiles: android.provider.MediaStore#scanFileFromShell(android.content.Context, java.io.File):
+
+StreamFiles: android.provider.MediaStore#scanVolume(android.content.Context, java.io.File):
+
+
+
+UserHandle: android.app.admin.DevicePolicyManager#getOwnerInstalledCaCerts(android.os.UserHandle):
+
+UserHandle: android.app.role.RoleManager#addOnRoleHoldersChangedListenerAsUser(java.util.concurrent.Executor, android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle):
+
+UserHandle: android.app.role.RoleManager#addRoleHolderAsUser(String, String, int, android.os.UserHandle, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Boolean>):
+
+UserHandle: android.app.role.RoleManager#clearRoleHoldersAsUser(String, int, android.os.UserHandle, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Boolean>):
+
+UserHandle: android.app.role.RoleManager#getRoleHoldersAsUser(String, android.os.UserHandle):
+
+UserHandle: android.app.role.RoleManager#removeOnRoleHoldersChangedListenerAsUser(android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle):
+
+UserHandle: android.app.role.RoleManager#removeRoleHolderAsUser(String, String, int, android.os.UserHandle, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Boolean>):
+
+UserHandle: android.content.pm.PackageManager#getInstallReason(String, android.os.UserHandle):
+
+UserHandle: android.content.pm.PackageManager#getPermissionFlags(String, String, android.os.UserHandle):
+
+UserHandle: android.content.pm.PackageManager#grantRuntimePermission(String, String, android.os.UserHandle):
+
+UserHandle: android.content.pm.PackageManager#revokeRuntimePermission(String, String, android.os.UserHandle):
+
+UserHandle: android.content.pm.PackageManager#updatePermissionFlags(String, String, int, int, android.os.UserHandle):
+
+UserHandle: android.location.LocationManager#setLocationEnabledForUser(boolean, android.os.UserHandle):
+
+UserHandle: android.permission.PermissionControllerManager#applyStagedRuntimePermissionBackup(String, android.os.UserHandle, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Boolean>):
+
+UserHandle: android.permission.PermissionControllerManager#getRuntimePermissionBackup(android.os.UserHandle, java.util.concurrent.Executor, java.util.function.Consumer<byte[]>):
+
+UserHandle: android.permission.PermissionControllerManager#stageAndApplyRuntimePermissionsBackup(byte[], android.os.UserHandle):
+
+
+
+UserHandleName: android.app.ActivityView#startActivity(android.content.Intent, android.os.UserHandle):
+
+UserHandleName: android.content.AutofillOptions:
+
+UserHandleName: android.content.ContentCaptureOptions:
+
+UserHandleName: android.os.IncidentReportArgs:
+
+UserHandleName: android.provider.MediaStore#deleteContributedMedia(android.content.Context, String, android.os.UserHandle):
+
+UserHandleName: android.provider.MediaStore#getContributedMediaSize(android.content.Context, String, android.os.UserHandle):
+
+
+
+VisiblySynchronized: PsiClassObjectAccessExpression:
+
+VisiblySynchronized: PsiThisExpression:
+
+VisiblySynchronized: android.app.ActivityManager#addOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener, int):
+
+VisiblySynchronized: android.app.ActivityManager#removeOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener):
+
+VisiblySynchronized: android.content.ContentProviderClient#setDetectNotResponding(long):
+
+VisiblySynchronized: android.content.res.AssetManager#getApkPaths():
+
+VisiblySynchronized: android.content.res.AssetManager#getLastResourceResolution():
+
+VisiblySynchronized: android.content.res.AssetManager#getOverlayablesToString(String):
+
+VisiblySynchronized: android.content.res.AssetManager#setResourceResolutionLoggingEnabled(boolean):
+
+VisiblySynchronized: android.os.MessageQueue#removeSyncBarrier(int):
+
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.cpp b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
index 6fd0327..0ee156b 100644
--- a/cmds/statsd/src/metrics/ValueMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
@@ -650,6 +650,7 @@
ret.setDouble(value.mValue.double_value);
break;
default:
+ return false;
break;
}
return true;
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 7f597fe..1e78fc1 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -163,7 +163,7 @@
}
@Override
- public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
mListener.onUidImportance(uid, RunningAppProcessInfo.procStateToImportanceForClient(
procState, mContext));
}
@@ -432,7 +432,6 @@
public static final int USER_OP_ERROR_RELATED_USERS_CANNOT_STOP = -4;
/**
- * @hide
* Process states, describing the kind of state a particular process is in.
* When updating these, make sure to also check all related references to the
* constant in code, and update these arrays:
@@ -443,7 +442,34 @@
* @see com.android.server.am.ProcessList#sSameAwakePssTimes
* @see com.android.server.am.ProcessList#sTestFirstPssTimes
* @see com.android.server.am.ProcessList#sTestSamePssTimes
+ * @hide
*/
+ @IntDef(flag = false, prefix = { "PROCESS_STATE_" }, value = {
+ PROCESS_STATE_UNKNOWN, // -1
+ PROCESS_STATE_PERSISTENT, // 0
+ PROCESS_STATE_PERSISTENT_UI,
+ PROCESS_STATE_TOP,
+ PROCESS_STATE_BOUND_TOP,
+ PROCESS_STATE_FOREGROUND_SERVICE,
+ PROCESS_STATE_BOUND_FOREGROUND_SERVICE,
+ PROCESS_STATE_IMPORTANT_FOREGROUND,
+ PROCESS_STATE_IMPORTANT_BACKGROUND,
+ PROCESS_STATE_TRANSIENT_BACKGROUND,
+ PROCESS_STATE_BACKUP,
+ PROCESS_STATE_SERVICE,
+ PROCESS_STATE_RECEIVER,
+ PROCESS_STATE_TOP_SLEEPING,
+ PROCESS_STATE_HEAVY_WEIGHT,
+ PROCESS_STATE_HOME,
+ PROCESS_STATE_LAST_ACTIVITY,
+ PROCESS_STATE_CACHED_ACTIVITY,
+ PROCESS_STATE_CACHED_ACTIVITY_CLIENT,
+ PROCESS_STATE_CACHED_RECENT,
+ PROCESS_STATE_CACHED_EMPTY,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ProcessState {}
+
/** @hide Not a real process state. */
public static final int PROCESS_STATE_UNKNOWN = -1;
@@ -459,78 +485,98 @@
@UnsupportedAppUsage
public static final int PROCESS_STATE_TOP = 2;
- /** @hide Process is hosting a foreground service with location type. */
- public static final int PROCESS_STATE_FOREGROUND_SERVICE_LOCATION = 3;
-
/** @hide Process is bound to a TOP app. This is ranked below SERVICE_LOCATION so that
* it doesn't get the capability of location access while-in-use. */
- public static final int PROCESS_STATE_BOUND_TOP = 4;
+ public static final int PROCESS_STATE_BOUND_TOP = 3;
/** @hide Process is hosting a foreground service. */
@UnsupportedAppUsage
- public static final int PROCESS_STATE_FOREGROUND_SERVICE = 5;
+ public static final int PROCESS_STATE_FOREGROUND_SERVICE = 4;
/** @hide Process is hosting a foreground service due to a system binding. */
@UnsupportedAppUsage
- public static final int PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 6;
+ public static final int PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 5;
/** @hide Process is important to the user, and something they are aware of. */
- public static final int PROCESS_STATE_IMPORTANT_FOREGROUND = 7;
+ public static final int PROCESS_STATE_IMPORTANT_FOREGROUND = 6;
/** @hide Process is important to the user, but not something they are aware of. */
@UnsupportedAppUsage
- public static final int PROCESS_STATE_IMPORTANT_BACKGROUND = 8;
+ public static final int PROCESS_STATE_IMPORTANT_BACKGROUND = 7;
/** @hide Process is in the background transient so we will try to keep running. */
- public static final int PROCESS_STATE_TRANSIENT_BACKGROUND = 9;
+ public static final int PROCESS_STATE_TRANSIENT_BACKGROUND = 8;
/** @hide Process is in the background running a backup/restore operation. */
- public static final int PROCESS_STATE_BACKUP = 10;
+ public static final int PROCESS_STATE_BACKUP = 9;
/** @hide Process is in the background running a service. Unlike oom_adj, this level
* is used for both the normal running in background state and the executing
* operations state. */
@UnsupportedAppUsage
- public static final int PROCESS_STATE_SERVICE = 11;
+ public static final int PROCESS_STATE_SERVICE = 10;
/** @hide Process is in the background running a receiver. Note that from the
* perspective of oom_adj, receivers run at a higher foreground level, but for our
* prioritization here that is not necessary and putting them below services means
* many fewer changes in some process states as they receive broadcasts. */
@UnsupportedAppUsage
- public static final int PROCESS_STATE_RECEIVER = 12;
+ public static final int PROCESS_STATE_RECEIVER = 11;
/** @hide Same as {@link #PROCESS_STATE_TOP} but while device is sleeping. */
- public static final int PROCESS_STATE_TOP_SLEEPING = 13;
+ public static final int PROCESS_STATE_TOP_SLEEPING = 12;
/** @hide Process is in the background, but it can't restore its state so we want
* to try to avoid killing it. */
- public static final int PROCESS_STATE_HEAVY_WEIGHT = 14;
+ public static final int PROCESS_STATE_HEAVY_WEIGHT = 13;
/** @hide Process is in the background but hosts the home activity. */
@UnsupportedAppUsage
- public static final int PROCESS_STATE_HOME = 15;
+ public static final int PROCESS_STATE_HOME = 14;
/** @hide Process is in the background but hosts the last shown activity. */
- public static final int PROCESS_STATE_LAST_ACTIVITY = 16;
+ public static final int PROCESS_STATE_LAST_ACTIVITY = 15;
/** @hide Process is being cached for later use and contains activities. */
@UnsupportedAppUsage
- public static final int PROCESS_STATE_CACHED_ACTIVITY = 17;
+ public static final int PROCESS_STATE_CACHED_ACTIVITY = 16;
/** @hide Process is being cached for later use and is a client of another cached
* process that contains activities. */
- public static final int PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 18;
+ public static final int PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 17;
/** @hide Process is being cached for later use and has an activity that corresponds
* to an existing recent task. */
- public static final int PROCESS_STATE_CACHED_RECENT = 19;
+ public static final int PROCESS_STATE_CACHED_RECENT = 18;
/** @hide Process is being cached for later use and is empty. */
- public static final int PROCESS_STATE_CACHED_EMPTY = 20;
+ public static final int PROCESS_STATE_CACHED_EMPTY = 19;
/** @hide Process does not exist. */
- public static final int PROCESS_STATE_NONEXISTENT = 21;
+ public static final int PROCESS_STATE_NONEXISTENT = 20;
+
+ /**
+ * The set of flags for process capability.
+ * @hide
+ */
+ @IntDef(flag = true, prefix = { "PROCESS_CAPABILITY_" }, value = {
+ PROCESS_CAPABILITY_NONE,
+ PROCESS_CAPABILITY_FOREGROUND_LOCATION,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ProcessCapability {}
+
+ /** @hide Process does not have any capability */
+ @TestApi
+ public static final int PROCESS_CAPABILITY_NONE = 0;
+
+ /** @hide Process can access location while in foreground */
+ @TestApi
+ public static final int PROCESS_CAPABILITY_FOREGROUND_LOCATION = 1 << 0;
+
+ /** @hide all capabilities, the ORing of all flags in {@link ProcessCapability}*/
+ @TestApi
+ public static final int PROCESS_CAPABILITY_ALL = PROCESS_CAPABILITY_FOREGROUND_LOCATION;
// NOTE: If PROCESS_STATEs are added, then new fields must be added
// to frameworks/base/core/proto/android/app/enums.proto and the following method must
@@ -557,7 +603,6 @@
return AppProtoEnums.PROCESS_STATE_TOP;
case PROCESS_STATE_BOUND_TOP:
return AppProtoEnums.PROCESS_STATE_BOUND_TOP;
- case PROCESS_STATE_FOREGROUND_SERVICE_LOCATION:
case PROCESS_STATE_FOREGROUND_SERVICE:
return AppProtoEnums.PROCESS_STATE_FOREGROUND_SERVICE;
case PROCESS_STATE_BOUND_FOREGROUND_SERVICE:
@@ -612,8 +657,7 @@
/** @hide Is this a foreground service type? */
public static boolean isForegroundService(int procState) {
- return procState == PROCESS_STATE_FOREGROUND_SERVICE_LOCATION
- || procState == PROCESS_STATE_FOREGROUND_SERVICE;
+ return procState == PROCESS_STATE_FOREGROUND_SERVICE;
}
/** @hide requestType for assist context: only basic information. */
@@ -2930,7 +2974,7 @@
return IMPORTANCE_PERCEPTIBLE;
} else if (procState >= PROCESS_STATE_IMPORTANT_FOREGROUND) {
return IMPORTANCE_VISIBLE;
- } else if (procState >= PROCESS_STATE_FOREGROUND_SERVICE_LOCATION) {
+ } else if (procState >= PROCESS_STATE_FOREGROUND_SERVICE) {
return IMPORTANCE_FOREGROUND_SERVICE;
} else {
return IMPORTANCE_FOREGROUND;
@@ -4087,7 +4131,7 @@
* Action an app can implement to handle reports from {@link #setWatchHeapLimit(long)}.
* If your package has an activity handling this action, it will be launched with the
* heap data provided to it the same way as {@link Intent#ACTION_SEND}. Note that to
- * match the activty must support this action and a MIME type of "*/*".
+ * match, the activity must support this action and a MIME type of "*/*".
*/
public static final String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT";
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 8bca87e6..765c358 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -282,10 +282,14 @@
/**
* Uid state: The UID is running a foreground service of location type.
* The lower the UID state the more important the UID is for the user.
+ * This uid state is a counterpart to PROCESS_STATE_FOREGROUND_SERVICE_LOCATION which has been
+ * deprecated.
* @hide
+ * @deprecated
*/
@TestApi
@SystemApi
+ @Deprecated
public static final int UID_STATE_FOREGROUND_SERVICE_LOCATION = 300;
/**
@@ -298,13 +302,6 @@
public static final int UID_STATE_FOREGROUND_SERVICE = 400;
/**
- * The max, which is min priority, UID state for which any app op
- * would be considered as performed in the foreground.
- * @hide
- */
- public static final int UID_STATE_MAX_LAST_NON_RESTRICTED = UID_STATE_FOREGROUND_SERVICE;
-
- /**
* Uid state: The UID is a foreground app. The lower the UID
* state the more important the UID is for the user.
* @hide
@@ -314,6 +311,13 @@
public static final int UID_STATE_FOREGROUND = 500;
/**
+ * The max, which is min priority, UID state for which any app op
+ * would be considered as performed in the foreground.
+ * @hide
+ */
+ public static final int UID_STATE_MAX_LAST_NON_RESTRICTED = UID_STATE_FOREGROUND;
+
+ /**
* Uid state: The UID is a background app. The lower the UID
* state the more important the UID is for the user.
* @hide
@@ -344,47 +348,25 @@
public static final int MIN_PRIORITY_UID_STATE = UID_STATE_CACHED;
/**
- * Resolves the first unrestricted state given an app op. Location is
- * special as we want to allow its access only if a dedicated location
- * foreground service is running. For other ops we consider any foreground
- * service as a foreground state.
- *
+ * Resolves the first unrestricted state given an app op.
* @param op The op to resolve.
* @return The last restricted UID state.
*
* @hide
*/
public static int resolveFirstUnrestrictedUidState(int op) {
- switch (op) {
- case OP_FINE_LOCATION:
- case OP_COARSE_LOCATION:
- case OP_MONITOR_LOCATION:
- case OP_MONITOR_HIGH_POWER_LOCATION: {
- return UID_STATE_FOREGROUND_SERVICE_LOCATION;
- }
- }
- return UID_STATE_FOREGROUND_SERVICE;
+ return UID_STATE_FOREGROUND;
}
/**
- * Resolves the last restricted state given an app op. Location is
- * special as we want to allow its access only if a dedicated location
- * foreground service is running. For other ops we consider any foreground
- * service as a foreground state.
- *
+ * Resolves the last restricted state given an app op.
* @param op The op to resolve.
* @return The last restricted UID state.
*
* @hide
*/
public static int resolveLastRestrictedUidState(int op) {
- switch (op) {
- case OP_FINE_LOCATION:
- case OP_COARSE_LOCATION: {
- return UID_STATE_FOREGROUND_SERVICE;
- }
- }
- return UID_STATE_FOREGROUND;
+ return UID_STATE_BACKGROUND;
}
/** @hide Note: Keep these sorted */
@@ -4603,7 +4585,6 @@
*
* @param fromUidState The UID state from which to query. Could be one of
* {@link #UID_STATE_PERSISTENT}, {@link #UID_STATE_TOP},
- * {@link #UID_STATE_FOREGROUND_SERVICE_LOCATION},
* {@link #UID_STATE_FOREGROUND_SERVICE}, {@link #UID_STATE_FOREGROUND},
* {@link #UID_STATE_BACKGROUND}, {@link #UID_STATE_CACHED}.
* @param toUidState The UID state to which to query.
@@ -4664,7 +4645,6 @@
*
* @param fromUidState The UID state from which to query. Could be one of
* {@link #UID_STATE_PERSISTENT}, {@link #UID_STATE_TOP},
- * {@link #UID_STATE_FOREGROUND_SERVICE_LOCATION},
* {@link #UID_STATE_FOREGROUND_SERVICE}, {@link #UID_STATE_FOREGROUND},
* {@link #UID_STATE_BACKGROUND}, {@link #UID_STATE_CACHED}.
* @param toUidState The UID state to which to query.
@@ -4728,7 +4708,6 @@
*
* @param fromUidState The UID state from which to query. Could be one of
* {@link #UID_STATE_PERSISTENT}, {@link #UID_STATE_TOP},
- * {@link #UID_STATE_FOREGROUND_SERVICE_LOCATION},
* {@link #UID_STATE_FOREGROUND_SERVICE}, {@link #UID_STATE_FOREGROUND},
* {@link #UID_STATE_BACKGROUND}, {@link #UID_STATE_CACHED}.
* @param toUidState The UID state from which to query.
diff --git a/core/java/android/app/IUidObserver.aidl b/core/java/android/app/IUidObserver.aidl
index e116d98..7713e25 100644
--- a/core/java/android/app/IUidObserver.aidl
+++ b/core/java/android/app/IUidObserver.aidl
@@ -50,8 +50,9 @@
* @param procState The updated process state for the uid.
* @param procStateSeq The sequence no. associated with process state change of the uid,
* see UidRecord.procStateSeq for details.
+ * @param capability the updated process capability for the uid.
*/
- void onUidStateChanged(int uid, int procState, long procStateSeq);
+ void onUidStateChanged(int uid, int procState, long procStateSeq, int capability);
// =============== End of transactions used on native side as well ============================
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 6a13499..629c2bb 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -23,6 +23,7 @@
import android.app.admin.IDevicePolicyManager;
import android.app.contentsuggestions.ContentSuggestionsManager;
import android.app.contentsuggestions.IContentSuggestionsManager;
+import android.app.job.JobSchedulerFrameworkInitializer;
import android.app.prediction.AppPredictionManager;
import android.app.role.RoleControllerManager;
import android.app.role.RoleManager;
@@ -153,7 +154,6 @@
import android.os.image.DynamicSystemManager;
import android.os.image.IDynamicSystemService;
import android.os.storage.StorageManager;
-import android.telephony.TelephonyRegistryManager;
import android.permission.PermissionControllerManager;
import android.permission.PermissionManager;
import android.print.IPrintManager;
@@ -167,6 +167,7 @@
import android.telephony.CarrierConfigManager;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
+import android.telephony.TelephonyRegistryManager;
import android.telephony.euicc.EuiccCardManager;
import android.telephony.euicc.EuiccManager;
import android.telephony.ims.RcsMessageManager;
@@ -1298,6 +1299,9 @@
IBatteryStats.Stub.asInterface(b));
}});
//CHECKSTYLE:ON IndentationCheck
+
+ JobSchedulerFrameworkInitializer.initialize();
+ DeviceIdleFrameworkInitializer.initialize();
}
/**
diff --git a/core/java/android/content/PermissionChecker.java b/core/java/android/content/PermissionChecker.java
index 85f96fc..6954b31 100644
--- a/core/java/android/content/PermissionChecker.java
+++ b/core/java/android/content/PermissionChecker.java
@@ -114,6 +114,7 @@
* @param uid The uid for which to check.
* @param packageName The package name for which to check. If null the
* the first package for the calling UID will be used.
+ * @param featureId Feature in the package
* @return The permission check result which is either {@link #PERMISSION_GRANTED}
* or {@link #PERMISSION_DENIED} or {@link #PERMISSION_DENIED_APP_OP}.
* @param message A message describing the reason the permission was checked
@@ -123,8 +124,8 @@
@PermissionResult
public static int checkPermissionForDataDelivery(@NonNull Context context,
@NonNull String permission, int pid, int uid, @Nullable String packageName,
- @Nullable String message) {
- return checkPermissionCommon(context, permission, pid, uid, packageName, message,
+ @Nullable String featureId, @Nullable String message) {
+ return checkPermissionCommon(context, permission, pid, uid, packageName, featureId, message,
true /*forDataDelivery*/);
}
@@ -161,8 +162,8 @@
@PermissionResult
public static int checkPermissionForPreflight(@NonNull Context context,
@NonNull String permission, int pid, int uid, @Nullable String packageName) {
- return checkPermissionCommon(context, permission, pid, uid, packageName, null /*message*/,
- false /*forDataDelivery*/);
+ return checkPermissionCommon(context, permission, pid, uid, packageName, null /*featureId*/,
+ null /*message*/, false /*forDataDelivery*/);
}
/**
@@ -197,7 +198,7 @@
public static int checkSelfPermissionForDataDelivery(@NonNull Context context,
@NonNull String permission, @Nullable String message) {
return checkPermissionForDataDelivery(context, permission, Process.myPid(),
- Process.myUid(), context.getPackageName(), message);
+ Process.myUid(), context.getPackageName(), context.getFeatureId(), message);
}
/**
@@ -256,6 +257,7 @@
* @param permission The permission to check.
* @param packageName The package name making the IPC. If null the
* the first package for the calling UID will be used.
+ * @param featureId The feature inside of the app
* @return The permission check result which is either {@link #PERMISSION_GRANTED}
* or {@link #PERMISSION_DENIED} or {@link #PERMISSION_DENIED_APP_OP}.
* @param message A message describing the reason the permission was checked
@@ -264,12 +266,13 @@
*/
@PermissionResult
public static int checkCallingPermissionForDataDelivery(@NonNull Context context,
- @NonNull String permission, @Nullable String packageName, @Nullable String message) {
+ @NonNull String permission, @Nullable String packageName,
+ @Nullable String featureId, @Nullable String message) {
if (Binder.getCallingPid() == Process.myPid()) {
return PERMISSION_DENIED;
}
return checkPermissionForDataDelivery(context, permission, Binder.getCallingPid(),
- Binder.getCallingUid(), packageName, message);
+ Binder.getCallingUid(), packageName, featureId, message);
}
/**
@@ -331,17 +334,20 @@
* @param permission The permission to check.
* @return The permission check result which is either {@link #PERMISSION_GRANTED}
* or {@link #PERMISSION_DENIED} or {@link #PERMISSION_DENIED_APP_OP}.
+ * @param featureId feature Id of caller (if not self)
* @param message A message describing the reason the permission was checked
*
* @see #checkCallingOrSelfPermissionForPreflight(Context, String)
*/
@PermissionResult
public static int checkCallingOrSelfPermissionForDataDelivery(@NonNull Context context,
- @NonNull String permission, @Nullable String message) {
+ @NonNull String permission, @Nullable String featureId, @Nullable String message) {
String packageName = (Binder.getCallingPid() == Process.myPid())
? context.getPackageName() : null;
+ featureId = (Binder.getCallingPid() == Process.myPid())
+ ? context.getFeatureId() : featureId;
return checkPermissionForDataDelivery(context, permission, Binder.getCallingPid(),
- Binder.getCallingUid(), packageName, message);
+ Binder.getCallingUid(), packageName, featureId, message);
}
/**
@@ -360,15 +366,15 @@
* app's fg/gb state) and this check will not leave a trace that permission protected
* data was delivered. When you are about to deliver the location data to a registered
* listener you should use {@link #checkCallingOrSelfPermissionForDataDelivery(Context,
- * String, String)} which will evaluate the permission access based on the current fg/bg state
- * of the app and leave a record that the data was accessed.
+ * String, String, String)} which will evaluate the permission access based on the current
+ * fg/bg state of the app and leave a record that the data was accessed.
*
* @param context Context for accessing resources.
* @param permission The permission to check.
* @return The permission check result which is either {@link #PERMISSION_GRANTED}
* or {@link #PERMISSION_DENIED} or {@link #PERMISSION_DENIED_APP_OP}.
*
- * @see #checkCallingOrSelfPermissionForDataDelivery(Context, String, String)
+ * @see #checkCallingOrSelfPermissionForDataDelivery(Context, String, String, String)
*/
@PermissionResult
public static int checkCallingOrSelfPermissionForPreflight(@NonNull Context context,
@@ -380,8 +386,8 @@
}
private static int checkPermissionCommon(@NonNull Context context, @NonNull String permission,
- int pid, int uid, @Nullable String packageName, @Nullable String message,
- boolean forDataDelivery) {
+ int pid, int uid, @Nullable String packageName, @Nullable String featureId,
+ @Nullable String message, boolean forDataDelivery) {
if (context.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_DENIED) {
return PERMISSION_DENIED;
}
@@ -401,8 +407,7 @@
}
if (forDataDelivery) {
- // TODO moltmann: Set correct feature id
- if (appOpsManager.noteProxyOpNoThrow(op, packageName, uid, null, message)
+ if (appOpsManager.noteProxyOpNoThrow(op, packageName, uid, featureId, message)
!= AppOpsManager.MODE_ALLOWED) {
return PERMISSION_DENIED_APP_OP;
}
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index fbcc785..1f29d1a 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -1125,6 +1125,37 @@
new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }});
/**
+ * <p>The list of bokeh modes that are supported by this camera device, and each bokeh mode's
+ * maximum streaming (non-stall) size with bokeh effect.</p>
+ * <p>For OFF mode, the camera behaves normally with no bokeh effect.</p>
+ * <p>For STILL_CAPTURE mode, the maximum streaming dimension specifies the limit under which
+ * bokeh is effective when capture intent is PREVIEW. Note that when capture intent is
+ * PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE intent
+ * in order to maintain reasonable frame rate. The maximum streaming dimension must be one
+ * of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or (0, 0)
+ * if preview bokeh is not supported. If the application configures a stream larger than
+ * the maximum streaming dimension, bokeh effect may not be applied for this stream for
+ * PREVIEW intent.</p>
+ * <p>For CONTINUOUS mode, the maximum streaming dimension specifies the limit under which
+ * bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE resolutions
+ * in availableStreamConfigurations, and if the sensor maximum resolution is larger than or
+ * equal to 1080p, the maximum streaming dimension must be at least 1080p. If the
+ * application configures a stream with larger dimension, the stream may not have bokeh
+ * effect applied.</p>
+ * <p><b>Units</b>: (mode, width, height)</p>
+ * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
+ * <p><b>Limited capability</b> -
+ * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
+ * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
+ *
+ * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
+ */
+ @PublicKey
+ @NonNull
+ public static final Key<android.hardware.camera2.params.CapabilityAndMaxSize[]> CONTROL_AVAILABLE_BOKEH_CAPABILITIES =
+ new Key<android.hardware.camera2.params.CapabilityAndMaxSize[]>("android.control.availableBokehCapabilities", android.hardware.camera2.params.CapabilityAndMaxSize[].class);
+
+ /**
* <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera
* device.</p>
* <p>Full-capability camera devices must always support OFF; camera devices that support
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 2fa6125..799c716 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -2444,6 +2444,34 @@
public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
//
+ // Enumeration values for CaptureRequest#CONTROL_BOKEH_MODE
+ //
+
+ /**
+ * <p>Bokeh mode is disabled.</p>
+ * @see CaptureRequest#CONTROL_BOKEH_MODE
+ */
+ public static final int CONTROL_BOKEH_MODE_OFF = 0;
+
+ /**
+ * <p>High quality bokeh mode is enabled for all non-raw streams (including YUV,
+ * JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
+ * extra image processing, this mode may introduce additional stall to non-raw streams.
+ * This mode should be used in high quality still capture use case.</p>
+ * @see CaptureRequest#CONTROL_BOKEH_MODE
+ */
+ public static final int CONTROL_BOKEH_MODE_STILL_CAPTURE = 1;
+
+ /**
+ * <p>Bokeh effect must not slow down capture rate relative to sensor raw output,
+ * and the effect is applied to all processed streams no larger than the maximum
+ * streaming dimension. This mode should be used if performance and power are a
+ * priority, such as video recording.</p>
+ * @see CaptureRequest#CONTROL_BOKEH_MODE
+ */
+ public static final int CONTROL_BOKEH_MODE_CONTINUOUS = 2;
+
+ //
// Enumeration values for CaptureRequest#EDGE_MODE
//
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 43c197a..5c76dff 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -994,7 +994,7 @@
* application controls how the color mapping is performed.</p>
* <p>We define the expected processing pipeline below. For consistency
* across devices, this is always the case with TRANSFORM_MATRIX.</p>
- * <p>When either FULL or HIGH_QUALITY is used, the camera device may
+ * <p>When either FAST or HIGH_QUALITY is used, the camera device may
* do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
* {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the
* camera device (in the results) and be roughly correct.</p>
@@ -2094,6 +2094,52 @@
new Key<Boolean>("android.control.enableZsl", boolean.class);
/**
+ * <p>Whether bokeh mode is enabled for a particular capture request.</p>
+ * <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
+ * focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
+ * <p>When set to STILL_CAPTURE bokeh mode with STILL_CAPTURE capture intent, due to the extra
+ * processing needed for high quality bokeh effect, the stall may be longer than when
+ * capture intent is not STILL_CAPTURE.</p>
+ * <p>When set to STILL_CAPTURE bokeh mode with PREVIEW capture intent,</p>
+ * <ul>
+ * <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
+ * BURST_CAPTURE must still be met.</li>
+ * <li>All streams not larger than the maximum streaming dimension for STILL_CAPTURE mode
+ * (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES })
+ * will have preview bokeh effect applied.</li>
+ * </ul>
+ * <p>When set to CONTINUOUS mode, configured streams dimension should not exceed this mode's
+ * maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
+ * be available for streams larger than the maximum streaming dimension.</p>
+ * <p>Switching between different bokeh modes may involve reconfiguration of the camera
+ * pipeline, resulting in long latency. The application should check this key against the
+ * available session keys queried via
+ * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</p>
+ * <p>When bokeh mode is on, the camera device may override certain control parameters, such as
+ * reduce frame rate or use face priority scene mode, to achieve best power and quality
+ * tradeoffs. When turned on, AE, AWB, and AF run in auto modes, and only the mandatory
+ * stream combinations of LIMITED hardware level are guaranteed.</p>
+ * <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
+ * with different field of view. As a result, when bokeh mode is enabled, the camera device
+ * may override android.scaler.CropRegion, and the field of view will be smaller than when
+ * bokeh mode is off.</p>
+ * <p><b>Possible values:</b>
+ * <ul>
+ * <li>{@link #CONTROL_BOKEH_MODE_OFF OFF}</li>
+ * <li>{@link #CONTROL_BOKEH_MODE_STILL_CAPTURE STILL_CAPTURE}</li>
+ * <li>{@link #CONTROL_BOKEH_MODE_CONTINUOUS CONTINUOUS}</li>
+ * </ul></p>
+ * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
+ * @see #CONTROL_BOKEH_MODE_OFF
+ * @see #CONTROL_BOKEH_MODE_STILL_CAPTURE
+ * @see #CONTROL_BOKEH_MODE_CONTINUOUS
+ */
+ @PublicKey
+ @NonNull
+ public static final Key<Integer> CONTROL_BOKEH_MODE =
+ new Key<Integer>("android.control.bokehMode", int.class);
+
+ /**
* <p>Operation mode for edge
* enhancement.</p>
* <p>Edge enhancement improves sharpness and details in the captured image. OFF means
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 1007fd9..2d0ec6d 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -398,7 +398,7 @@
* application controls how the color mapping is performed.</p>
* <p>We define the expected processing pipeline below. For consistency
* across devices, this is always the case with TRANSFORM_MATRIX.</p>
- * <p>When either FULL or HIGH_QUALITY is used, the camera device may
+ * <p>When either FAST or HIGH_QUALITY is used, the camera device may
* do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
* {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the
* camera device (in the results) and be roughly correct.</p>
@@ -2324,6 +2324,52 @@
new Key<Integer>("android.control.afSceneChange", int.class);
/**
+ * <p>Whether bokeh mode is enabled for a particular capture request.</p>
+ * <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
+ * focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
+ * <p>When set to STILL_CAPTURE bokeh mode with STILL_CAPTURE capture intent, due to the extra
+ * processing needed for high quality bokeh effect, the stall may be longer than when
+ * capture intent is not STILL_CAPTURE.</p>
+ * <p>When set to STILL_CAPTURE bokeh mode with PREVIEW capture intent,</p>
+ * <ul>
+ * <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
+ * BURST_CAPTURE must still be met.</li>
+ * <li>All streams not larger than the maximum streaming dimension for STILL_CAPTURE mode
+ * (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES })
+ * will have preview bokeh effect applied.</li>
+ * </ul>
+ * <p>When set to CONTINUOUS mode, configured streams dimension should not exceed this mode's
+ * maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
+ * be available for streams larger than the maximum streaming dimension.</p>
+ * <p>Switching between different bokeh modes may involve reconfiguration of the camera
+ * pipeline, resulting in long latency. The application should check this key against the
+ * available session keys queried via
+ * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</p>
+ * <p>When bokeh mode is on, the camera device may override certain control parameters, such as
+ * reduce frame rate or use face priority scene mode, to achieve best power and quality
+ * tradeoffs. When turned on, AE, AWB, and AF run in auto modes, and only the mandatory
+ * stream combinations of LIMITED hardware level are guaranteed.</p>
+ * <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
+ * with different field of view. As a result, when bokeh mode is enabled, the camera device
+ * may override android.scaler.CropRegion, and the field of view will be smaller than when
+ * bokeh mode is off.</p>
+ * <p><b>Possible values:</b>
+ * <ul>
+ * <li>{@link #CONTROL_BOKEH_MODE_OFF OFF}</li>
+ * <li>{@link #CONTROL_BOKEH_MODE_STILL_CAPTURE STILL_CAPTURE}</li>
+ * <li>{@link #CONTROL_BOKEH_MODE_CONTINUOUS CONTINUOUS}</li>
+ * </ul></p>
+ * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
+ * @see #CONTROL_BOKEH_MODE_OFF
+ * @see #CONTROL_BOKEH_MODE_STILL_CAPTURE
+ * @see #CONTROL_BOKEH_MODE_CONTINUOUS
+ */
+ @PublicKey
+ @NonNull
+ public static final Key<Integer> CONTROL_BOKEH_MODE =
+ new Key<Integer>("android.control.bokehMode", int.class);
+
+ /**
* <p>Operation mode for edge
* enhancement.</p>
* <p>Edge enhancement improves sharpness and details in the captured image. OFF means
diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
index e909c00..7c1ddad 100644
--- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
+++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
@@ -21,6 +21,7 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.hardware.camera2.CameraCharacteristics;
+import android.hardware.camera2.CameraMetadata;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.CaptureResult;
@@ -29,6 +30,7 @@
import android.hardware.camera2.marshal.Marshaler;
import android.hardware.camera2.marshal.impl.MarshalQueryableArray;
import android.hardware.camera2.marshal.impl.MarshalQueryableBlackLevelPattern;
+import android.hardware.camera2.marshal.impl.MarshalQueryableCapabilityAndMaxSize;
import android.hardware.camera2.marshal.impl.MarshalQueryableBoolean;
import android.hardware.camera2.marshal.impl.MarshalQueryableColorSpaceTransform;
import android.hardware.camera2.marshal.impl.MarshalQueryableEnum;
@@ -48,6 +50,7 @@
import android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfiguration;
import android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfigurationDuration;
import android.hardware.camera2.marshal.impl.MarshalQueryableString;
+import android.hardware.camera2.params.CapabilityAndMaxSize;
import android.hardware.camera2.params.Face;
import android.hardware.camera2.params.HighSpeedVideoConfiguration;
import android.hardware.camera2.params.LensShadingMap;
@@ -671,6 +674,15 @@
return (T) metadata.getOisSamples();
}
});
+ sGetCommandMap.put(
+ CameraCharacteristics.CONTROL_AVAILABLE_BOKEH_CAPABILITIES.getNativeKey(),
+ new GetCommand() {
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T> T getValue(CameraMetadataNative metadata, Key<T> key) {
+ return (T) metadata.getBokehCapabilities();
+ }
+ });
}
private int[] getAvailableFormats() {
@@ -1373,6 +1385,24 @@
return samples;
}
+ private CapabilityAndMaxSize[] getBokehCapabilities() {
+ CapabilityAndMaxSize[] bcs = getBase(
+ CameraCharacteristics.CONTROL_AVAILABLE_BOKEH_CAPABILITIES);
+
+ if (bcs != null) {
+ for (CapabilityAndMaxSize bc : bcs) {
+ if (bc.getMode() < CameraMetadata.CONTROL_BOKEH_MODE_OFF ||
+ bc.getMode() > CameraMetadata.CONTROL_BOKEH_MODE_CONTINUOUS) {
+ throw new AssertionError(String.format(
+ "bokehMode %d is out of valid range [%d, %d]", bc.getMode(),
+ CameraMetadata.CONTROL_BOKEH_MODE_OFF,
+ CameraMetadata.CONTROL_BOKEH_MODE_CONTINUOUS));
+ }
+ }
+ }
+ return bcs;
+ }
+
private <T> void setBase(CameraCharacteristics.Key<T> key, T value) {
setBase(key.getNativeKey(), value);
}
@@ -1750,6 +1780,7 @@
new MarshalQueryableBlackLevelPattern(),
new MarshalQueryableHighSpeedVideoConfiguration(),
new MarshalQueryableRecommendedStreamConfiguration(),
+ new MarshalQueryableCapabilityAndMaxSize(),
// generic parcelable marshaler (MUST BE LAST since it has lowest priority)
new MarshalQueryableParcelable(),
diff --git a/core/java/android/hardware/camera2/marshal/impl/MarshalQueryableCapabilityAndMaxSize.java b/core/java/android/hardware/camera2/marshal/impl/MarshalQueryableCapabilityAndMaxSize.java
new file mode 100644
index 0000000..5c1f301
--- /dev/null
+++ b/core/java/android/hardware/camera2/marshal/impl/MarshalQueryableCapabilityAndMaxSize.java
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+package android.hardware.camera2.marshal.impl;
+
+import android.hardware.camera2.marshal.MarshalQueryable;
+import android.hardware.camera2.marshal.Marshaler;
+import android.hardware.camera2.params.CapabilityAndMaxSize;
+import android.hardware.camera2.utils.TypeReference;
+import android.util.Size;
+
+import java.nio.ByteBuffer;
+
+import static android.hardware.camera2.impl.CameraMetadataNative.TYPE_INT32;
+import static android.hardware.camera2.marshal.MarshalHelpers.SIZEOF_INT32;
+
+/**
+ * Marshal {@link CapabilityAndMaxSize} to/from {@link #TYPE_INT32} {@code x CapabilityAndMaxSize.COUNT}
+ */
+public class MarshalQueryableCapabilityAndMaxSize implements MarshalQueryable<CapabilityAndMaxSize> {
+ private static final int SIZE = SIZEOF_INT32 * CapabilityAndMaxSize.COUNT;
+
+ private class MarshalerCapabilityAndMaxSize extends Marshaler<CapabilityAndMaxSize> {
+ protected MarshalerCapabilityAndMaxSize(TypeReference<CapabilityAndMaxSize> typeReference,
+ int nativeType) {
+ super(MarshalQueryableCapabilityAndMaxSize.this, typeReference, nativeType);
+ }
+
+ @Override
+ public void marshal(CapabilityAndMaxSize value, ByteBuffer buffer) {
+ Size maxStreamingSize = value.getMaxStreamingSize();
+
+ buffer.putInt(value.getMode());
+ buffer.putInt(maxStreamingSize.getWidth());
+ buffer.putInt(maxStreamingSize.getHeight());
+ }
+
+ @Override
+ public CapabilityAndMaxSize unmarshal(ByteBuffer buffer) {
+ int mode = buffer.getInt();
+ int maxWidth = buffer.getInt();
+ int maxHeight = buffer.getInt();
+
+ return new CapabilityAndMaxSize(mode, maxWidth, maxHeight);
+ }
+
+ @Override
+ public int getNativeSize() {
+ return SIZE;
+ }
+ }
+
+ @Override
+ public Marshaler<CapabilityAndMaxSize> createMarshaler(
+ TypeReference<CapabilityAndMaxSize> managedType, int nativeType) {
+ return new MarshalerCapabilityAndMaxSize(managedType, nativeType);
+ }
+
+ @Override
+ public boolean isTypeMappingSupported(
+ TypeReference<CapabilityAndMaxSize> managedType, int nativeType) {
+ return nativeType == TYPE_INT32 &&
+ (CapabilityAndMaxSize.class.equals(managedType.getType()));
+ }
+}
diff --git a/core/java/android/hardware/camera2/params/CapabilityAndMaxSize.java b/core/java/android/hardware/camera2/params/CapabilityAndMaxSize.java
new file mode 100644
index 0000000..be08299
--- /dev/null
+++ b/core/java/android/hardware/camera2/params/CapabilityAndMaxSize.java
@@ -0,0 +1,126 @@
+/*
+ * 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.
+ */
+
+package android.hardware.camera2.params;
+
+import static com.android.internal.util.Preconditions.checkArgumentInRange;
+import static com.android.internal.util.Preconditions.checkArgumentNonnegative;
+
+import android.annotation.NonNull;
+import android.hardware.camera2.CameraCharacteristics;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.utils.HashCodeHelpers;
+import android.util.Size;
+
+/**
+ * Immutable class to store the available camera capability and its
+ * corresponding maximum streaming dimensions.
+ *
+ * @see CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES
+ */
+
+public final class CapabilityAndMaxSize {
+ /**
+ * @hide
+ */
+ public static final int COUNT = 3;
+
+ private final int mMode;
+ private final int mMaxStreamingWidth;
+ private final int mMaxStreamingHeight;
+
+ /**
+ * Create a new CapabilityAndMaxSize object.
+ *
+ * @param mode supported mode for a camera capability.
+ * @param maxStreamingWidth width >= 0
+ * @param maxStreamingHeight height >= 0
+ *
+ * @hide
+ */
+ public CapabilityAndMaxSize(int mode, int maxStreamingWidth, int maxStreamingHeight) {
+ mMode = mode;
+ mMaxStreamingWidth = checkArgumentNonnegative(maxStreamingWidth,
+ "maxStreamingWidth must be nonnegative");
+ mMaxStreamingHeight = checkArgumentNonnegative(maxStreamingHeight,
+ "maxStreamingHeight must be nonnegative");
+ }
+
+ /**
+ * Return the supported mode for this capability.
+ *
+ * @return One of supported modes for the capability. For example, for available bokeh modes,
+ * this will be one of {@link CameraMetadata#CONTROL_BOKEH_MODE_OFF},
+ * {@link CameraMetadata#CONTROL_BOKEH_MODE_STILL_CAPTURE}, and
+ * {@link CameraMetadata#CONTROL_BOKEH_MODE_CONTINUOUS}.
+ */
+ public int getMode() {
+ return mMode;
+ }
+
+ /**
+ * Return the maximum streaming dimension of this capability.
+ *
+ * @return a new {@link Size} with non-negative width and height
+ */
+ public @NonNull Size getMaxStreamingSize() {
+ return new Size(mMaxStreamingWidth, mMaxStreamingHeight);
+ }
+
+ /**
+ * Compare two CapabilityAndMaxSize objects to see if they are equal.
+ *
+ * @param obj Another CapabilityAndMaxSize object
+ *
+ * @return {@code true} if the mode and max size are equal, {@code false} otherwise
+ */
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (this == obj) {
+ return true;
+ }
+ if (obj instanceof CapabilityAndMaxSize) {
+ final CapabilityAndMaxSize other = (CapabilityAndMaxSize) obj;
+ return (mMode == other.mMode
+ && mMaxStreamingWidth == other.mMaxStreamingWidth
+ && mMaxStreamingHeight == other.mMaxStreamingHeight);
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode() {
+ return HashCodeHelpers.hashCode(mMode, mMaxStreamingWidth, mMaxStreamingHeight);
+ }
+
+ /**
+ * Return the CapabilityAndMaxSize as a string representation
+ * {@code "(mode:%d, maxStreamingSize:%d x %d)"}.
+ *
+ * @return string representation of the capability and max streaming size.
+ */
+ @Override
+ public String toString() {
+ return String.format("(mode:%d, maxStreamingSize:%d x %d)",
+ mMode, mMaxStreamingWidth, mMaxStreamingHeight);
+ }
+}
diff --git a/core/java/android/net/util/SocketUtils.java b/core/java/android/net/util/SocketUtils.java
index 489a292..e9ea99f 100644
--- a/core/java/android/net/util/SocketUtils.java
+++ b/core/java/android/net/util/SocketUtils.java
@@ -77,7 +77,9 @@
/**
* Make a socket address that packet socket can send packets to.
+ * @deprecated Use {@link #makePacketSocketAddress(int, int, byte[])} instead.
*/
+ @Deprecated
@NonNull
public static SocketAddress makePacketSocketAddress(int ifIndex, @NonNull byte[] hwAddr) {
return new PacketSocketAddress(
@@ -87,6 +89,18 @@
}
/**
+ * Make a socket address that packet socket can send packets to.
+ */
+ @NonNull
+ public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex,
+ @NonNull byte[] hwAddr) {
+ return new PacketSocketAddress(
+ protocol /* sll_protocol */,
+ ifIndex /* sll_ifindex */,
+ hwAddr /* sll_addr */);
+ }
+
+ /**
* @see IoBridge#closeAndSignalBlockedThreads(FileDescriptor)
*/
public static void closeSocket(@Nullable FileDescriptor fd) throws IOException {
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index af0ec11..fa09cf0 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -17,7 +17,6 @@
package android.os;
import static android.app.ActivityManager.PROCESS_STATE_BOUND_TOP;
-import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION;
import android.annotation.IntDef;
import android.annotation.UnsupportedAppUsage;
@@ -923,7 +922,6 @@
*/
public static final int[] CRITICAL_PROC_STATES = {
PROCESS_STATE_TOP,
- PROCESS_STATE_FOREGROUND_SERVICE_LOCATION,
PROCESS_STATE_BOUND_TOP, PROCESS_STATE_FOREGROUND_SERVICE,
PROCESS_STATE_FOREGROUND
};
diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java
index bb8b041..0401d7f 100644
--- a/core/java/android/provider/DeviceConfig.java
+++ b/core/java/android/provider/DeviceConfig.java
@@ -130,8 +130,10 @@
/**
* Namespace for how dex runs. The feature requires a reboot to reach a clean state.
*
+ * @deprecated No longer used
* @hide
*/
+ @Deprecated
@SystemApi
public static final String NAMESPACE_DEX_BOOT = "dex_boot";
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 44ab09e..381d492 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -10654,6 +10654,7 @@
* @hide
* @see com.android.server.AppOpsService.Constants
*/
+ @TestApi
public static final String APP_OPS_CONSTANTS = "app_ops_constants";
/**
diff --git a/core/java/android/speech/IRecognitionService.aidl b/core/java/android/speech/IRecognitionService.aidl
index be6ef6d..f91e122 100644
--- a/core/java/android/speech/IRecognitionService.aidl
+++ b/core/java/android/speech/IRecognitionService.aidl
@@ -39,8 +39,11 @@
* this intent can contain extra parameters to manipulate the behavior of the recognition
* client. For more information see {@link RecognizerIntent}.
* @param listener to receive callbacks, note that this must be non-null
+ * @param packageName the package name calling this API
+ * @param featureId The feature in the package
*/
- void startListening(in Intent recognizerIntent, in IRecognitionListener listener);
+ void startListening(in Intent recognizerIntent, in IRecognitionListener listener,
+ String packageName, String featureId);
/**
* Stops listening for speech. Speech captured so far will be recognized as
@@ -48,13 +51,17 @@
* is called during the speech capturing.
*
* @param listener to receive callbacks, note that this must be non-null
+ * @param packageName the package name calling this API
+ * @param featureId The feature in the package
*/
- void stopListening(in IRecognitionListener listener);
+ void stopListening(in IRecognitionListener listener, String packageName, String featureId);
/**
* Cancels the speech recognition.
*
* @param listener to receive callbacks, note that this must be non-null
+ * @param packageName the package name calling this API
+ * @param featureId The feature in the package
*/
- void cancel(in IRecognitionListener listener);
+ void cancel(in IRecognitionListener listener, String packageName, String featureId);
}
diff --git a/core/java/android/speech/RecognitionService.java b/core/java/android/speech/RecognitionService.java
index dfc5c82..4b42209 100644
--- a/core/java/android/speech/RecognitionService.java
+++ b/core/java/android/speech/RecognitionService.java
@@ -16,6 +16,8 @@
package android.speech;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.app.Service;
@@ -29,6 +31,8 @@
import android.os.RemoteException;
import android.util.Log;
+import com.android.internal.util.Preconditions;
+
import java.lang.ref.WeakReference;
/**
@@ -171,13 +175,17 @@
*
* @param listener to send the error message to in case of error
* @param forDataDelivery If the permission check is for delivering the sensitive data.
+ * @param packageName the package name of the caller
+ * @param featureId The feature in the package
* @return {@code true} if the caller has enough permissions, {@code false} otherwise
*/
- private boolean checkPermissions(IRecognitionListener listener, boolean forDataDelivery) {
+ private boolean checkPermissions(IRecognitionListener listener, boolean forDataDelivery,
+ @NonNull String packageName, @Nullable String featureId) {
if (DBG) Log.d(TAG, "checkPermissions");
if (forDataDelivery) {
- if (PermissionChecker.checkCallingOrSelfPermissionForDataDelivery(this,
- android.Manifest.permission.RECORD_AUDIO, null /*message*/)
+ if (PermissionChecker.checkCallingPermissionForDataDelivery(this,
+ android.Manifest.permission.RECORD_AUDIO, packageName, featureId,
+ null /*message*/)
== PermissionChecker.PERMISSION_GRANTED) {
return true;
}
@@ -349,10 +357,14 @@
}
@Override
- public void startListening(Intent recognizerIntent, IRecognitionListener listener) {
+ public void startListening(Intent recognizerIntent, IRecognitionListener listener,
+ String packageName, String featureId) {
+ Preconditions.checkNotNull(packageName);
+
if (DBG) Log.d(TAG, "startListening called by:" + listener.asBinder());
final RecognitionService service = mServiceRef.get();
- if (service != null && service.checkPermissions(listener, true /*forDataDelivery*/)) {
+ if (service != null && service.checkPermissions(listener, true /*forDataDelivery*/,
+ packageName, featureId)) {
service.mHandler.sendMessage(Message.obtain(service.mHandler,
MSG_START_LISTENING, service.new StartListeningArgs(
recognizerIntent, listener, Binder.getCallingUid())));
@@ -360,20 +372,28 @@
}
@Override
- public void stopListening(IRecognitionListener listener) {
+ public void stopListening(IRecognitionListener listener, String packageName,
+ String featureId) {
+ Preconditions.checkNotNull(packageName);
+
if (DBG) Log.d(TAG, "stopListening called by:" + listener.asBinder());
final RecognitionService service = mServiceRef.get();
- if (service != null && service.checkPermissions(listener, false /*forDataDelivery*/)) {
+ if (service != null && service.checkPermissions(listener, false /*forDataDelivery*/,
+ packageName, featureId)) {
service.mHandler.sendMessage(Message.obtain(service.mHandler,
MSG_STOP_LISTENING, listener));
}
}
@Override
- public void cancel(IRecognitionListener listener) {
+ public void cancel(IRecognitionListener listener, String packageName,
+ String featureId) {
+ Preconditions.checkNotNull(packageName);
+
if (DBG) Log.d(TAG, "cancel called by:" + listener.asBinder());
final RecognitionService service = mServiceRef.get();
- if (service != null && service.checkPermissions(listener, false /*forDataDelivery*/)) {
+ if (service != null && service.checkPermissions(listener, false /*forDataDelivery*/,
+ packageName, featureId)) {
service.mHandler.sendMessage(Message.obtain(service.mHandler,
MSG_CANCEL, listener));
}
diff --git a/core/java/android/speech/SpeechRecognizer.java b/core/java/android/speech/SpeechRecognizer.java
index 88e2ede..e93ba16 100644
--- a/core/java/android/speech/SpeechRecognizer.java
+++ b/core/java/android/speech/SpeechRecognizer.java
@@ -341,7 +341,8 @@
return;
}
try {
- mService.startListening(recognizerIntent, mListener);
+ mService.startListening(recognizerIntent, mListener, mContext.getOpPackageName(),
+ mContext.getFeatureId());
if (DBG) Log.d(TAG, "service start listening command succeded");
} catch (final RemoteException e) {
Log.e(TAG, "startListening() failed", e);
@@ -355,7 +356,8 @@
return;
}
try {
- mService.stopListening(mListener);
+ mService.stopListening(mListener, mContext.getOpPackageName(),
+ mContext.getFeatureId());
if (DBG) Log.d(TAG, "service stop listening command succeded");
} catch (final RemoteException e) {
Log.e(TAG, "stopListening() failed", e);
@@ -369,7 +371,7 @@
return;
}
try {
- mService.cancel(mListener);
+ mService.cancel(mListener, mContext.getOpPackageName(), mContext.getFeatureId());
if (DBG) Log.d(TAG, "service cancel command succeded");
} catch (final RemoteException e) {
Log.e(TAG, "cancel() failed", e);
@@ -398,7 +400,7 @@
public void destroy() {
if (mService != null) {
try {
- mService.cancel(mListener);
+ mService.cancel(mListener, mContext.getOpPackageName(), mContext.getFeatureId());
} catch (final RemoteException e) {
// Not important
}
diff --git a/core/java/android/view/HapticFeedbackConstants.java b/core/java/android/view/HapticFeedbackConstants.java
index db01cea..37b9eb3 100644
--- a/core/java/android/view/HapticFeedbackConstants.java
+++ b/core/java/android/view/HapticFeedbackConstants.java
@@ -115,13 +115,11 @@
/**
* A haptic effect to signal the confirmation or successful completion of a user
* interaction.
- * @hide
*/
public static final int CONFIRM = 16;
/**
* A haptic effect to signal the rejection or failure of a user interaction.
- * @hide
*/
public static final int REJECT = 17;
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 57ce28e..27402a4 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -1189,6 +1189,9 @@
}
public boolean performLongClick(boolean handled) {
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("performLongClick", "handled=%s", handled);
+ }
// Long press in empty space moves cursor and starts the insertion action mode.
if (!handled && !isPositionOnText(mLastDownPositionX, mLastDownPositionY)
&& mInsertionControllerEnabled) {
@@ -1252,6 +1255,10 @@
}
void onFocusChanged(boolean focused, int direction) {
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("onFocusChanged", "focused=%s", focused);
+ }
+
mShowCursor = SystemClock.uptimeMillis();
ensureEndedBatchEdit();
@@ -1450,12 +1457,22 @@
} else {
mTapState = TAP_STATE_TRIPLE_CLICK;
}
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("updateTapState", "ACTION_DOWN: %s tap detected",
+ (mTapState == TAP_STATE_DOUBLE_TAP ? "double" : "triple"));
+ }
} else {
mTapState = TAP_STATE_FIRST_TAP;
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("updateTapState", "ACTION_DOWN: first tap detected");
+ }
}
}
if (action == MotionEvent.ACTION_UP) {
mLastTouchUpTime = SystemClock.uptimeMillis();
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("updateTapState", "ACTION_UP");
+ }
}
}
@@ -2354,6 +2371,9 @@
}
void onTouchUpEvent(MotionEvent event) {
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("onTouchUpEvent", null);
+ }
if (getSelectionActionModeHelper().resetSelection(
getTextView().getOffsetForPosition(event.getX(), event.getY()))) {
return;
@@ -2481,6 +2501,9 @@
loadCursorDrawable();
final int left = clampHorizontalPosition(mDrawableForCursor, horizontal);
final int width = mDrawableForCursor.getIntrinsicWidth();
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("updateCursorPosition", "left=%s, top=%s", left, (top - mTempRect.top));
+ }
mDrawableForCursor.setBounds(left, top - mTempRect.top, left + width,
bottom + mTempRect.bottom);
}
@@ -4621,6 +4644,11 @@
}
public void show() {
+ if (TextView.DEBUG_CURSOR) {
+ logCursor(getClass().getSimpleName() + ": HandleView: show()", "offset=%s",
+ getCurrentCursorOffset());
+ }
+
if (isShowing()) return;
getPositionListener().addSubscriber(this, true /* local position may change */);
@@ -4637,6 +4665,11 @@
}
public void hide() {
+ if (TextView.DEBUG_CURSOR) {
+ logCursor(getClass().getSimpleName() + ": HandleView: hide()", "offset=%s",
+ getCurrentCursorOffset());
+ }
+
dismiss();
getPositionListener().removeSubscriber(this);
@@ -5033,6 +5066,11 @@
@Override
public boolean onTouchEvent(MotionEvent ev) {
+ if (TextView.DEBUG_CURSOR) {
+ logCursor(this.getClass().getSimpleName() + ": HandleView: onTouchEvent",
+ MotionEvent.actionToString(ev.getActionMasked()));
+ }
+
updateFloatingToolbarVisibility(ev);
switch (ev.getActionMasked()) {
@@ -5951,6 +5989,10 @@
distanceSquared < doubleTapSlop * doubleTapSlop;
if (stayedInArea && (isMouse || isPositionOnText(eventX, eventY))) {
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("SelectionModifierCursorController: onTouchEvent",
+ "ACTION_DOWN: select and start drag");
+ }
if (mTapState == TAP_STATE_DOUBLE_TAP) {
selectCurrentWordAndStartDrag();
} else if (mTapState == TAP_STATE_TRIPLE_CLICK) {
@@ -6028,6 +6070,9 @@
break;
case MotionEvent.ACTION_UP:
+ if (TextView.DEBUG_CURSOR) {
+ logCursor("SelectionModifierCursorController: onTouchEvent", "ACTION_UP");
+ }
if (!isDragAcceleratorActive()) {
break;
}
@@ -7119,4 +7164,12 @@
return resolveInfo.loadLabel(mPackageManager);
}
}
+
+ private static void logCursor(String location, @Nullable String msgFormat, Object ... msgArgs) {
+ if (msgFormat == null) {
+ Log.d(TAG, location);
+ } else {
+ Log.d(TAG, location + ": " + String.format(msgFormat, msgArgs));
+ }
+ }
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 31f5055..90e8ef2 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -345,6 +345,8 @@
public class TextView extends View implements ViewTreeObserver.OnPreDrawListener {
static final String LOG_TAG = "TextView";
static final boolean DEBUG_EXTRACT = false;
+ static final boolean DEBUG_CURSOR = false;
+
private static final float[] TEMP_POSITION = new float[2];
// Enum for the "typeface" XML parameter.
@@ -10857,6 +10859,10 @@
@Override
public boolean onTouchEvent(MotionEvent event) {
+ if (DEBUG_CURSOR) {
+ logCursor("onTouchEvent", MotionEvent.actionToString(event.getActionMasked()));
+ }
+
final int action = event.getActionMasked();
if (mEditor != null) {
mEditor.onTouchEvent(event);
@@ -10868,6 +10874,9 @@
}
final boolean superResult = super.onTouchEvent(event);
+ if (DEBUG_CURSOR) {
+ logCursor("onTouchEvent", "superResult=%s", superResult);
+ }
/*
* Don't handle the release after a long press, because it will move the selection away from
@@ -10876,7 +10885,9 @@
*/
if (mEditor != null && mEditor.mDiscardNextActionUp && action == MotionEvent.ACTION_UP) {
mEditor.mDiscardNextActionUp = false;
-
+ if (DEBUG_CURSOR) {
+ logCursor("onTouchEvent", "release after long press detected");
+ }
if (mEditor.mIsInsertionActionModeStartPending) {
mEditor.startInsertionActionMode();
mEditor.mIsInsertionActionModeStartPending = false;
@@ -12254,6 +12265,10 @@
@Override
public boolean performLongClick() {
+ if (DEBUG_CURSOR) {
+ logCursor("performLongClick", null);
+ }
+
boolean handled = false;
boolean performedHapticFeedback = false;
@@ -13481,4 +13496,12 @@
TextView.this.spanChange(buf, what, s, -1, e, -1);
}
}
+
+ private static void logCursor(String location, @Nullable String msgFormat, Object ... msgArgs) {
+ if (msgFormat == null) {
+ Log.d(LOG_TAG, location);
+ } else {
+ Log.d(LOG_TAG, location + ": " + String.format(msgFormat, msgArgs));
+ }
+ }
}
diff --git a/core/java/com/android/internal/app/DumpHeapActivity.java b/core/java/com/android/internal/app/DumpHeapActivity.java
deleted file mode 100644
index e04e870..0000000
--- a/core/java/com/android/internal/app/DumpHeapActivity.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-
-package com.android.internal.app;
-
-import android.app.Activity;
-import android.app.ActivityManager;
-import android.app.AlertDialog;
-import android.content.ActivityNotFoundException;
-import android.content.ClipData;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.util.DebugUtils;
-import android.util.Slog;
-
-/**
- * This activity is displayed when the system has collected a heap dump from
- * a large process and the user has selected to share it.
- */
-public class DumpHeapActivity extends Activity {
- /** The process we are reporting */
- public static final String KEY_PROCESS = "process";
- /** The size limit the process reached */
- public static final String KEY_SIZE = "size";
- /** Whether the user initiated the dump or not. */
- public static final String KEY_IS_USER_INITIATED = "is_user_initiated";
- /** Whether the process is a system process (eg: Android System) or not. */
- public static final String KEY_IS_SYSTEM_PROCESS = "is_system_process";
- /** Optional name of package to directly launch */
- public static final String KEY_DIRECT_LAUNCH = "direct_launch";
-
- // Broadcast action to determine when to delete the current dump heap data.
- public static final String ACTION_DELETE_DUMPHEAP = "com.android.server.am.DELETE_DUMPHEAP";
-
- // Extra for above: delay delete of data, since the user is in the process of sharing it.
- public static final String EXTRA_DELAY_DELETE = "delay_delete";
-
- static final public Uri JAVA_URI = Uri.parse("content://com.android.server.heapdump/java");
-
- String mProcess;
- long mSize;
- AlertDialog mDialog;
- boolean mHandled = false;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- mProcess = getIntent().getStringExtra(KEY_PROCESS);
- mSize = getIntent().getLongExtra(KEY_SIZE, 0);
- final boolean isUserInitiated = getIntent().getBooleanExtra(KEY_IS_USER_INITIATED, false);
- final boolean isSystemProcess = getIntent().getBooleanExtra(KEY_IS_SYSTEM_PROCESS, false);
-
- String directLaunch = getIntent().getStringExtra(KEY_DIRECT_LAUNCH);
- if (directLaunch != null) {
- Intent intent = new Intent(ActivityManager.ACTION_REPORT_HEAP_LIMIT);
- intent.setPackage(directLaunch);
- ClipData clip = ClipData.newUri(getContentResolver(), "Heap Dump", JAVA_URI);
- intent.setClipData(clip);
- intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- intent.setType(clip.getDescription().getMimeType(0));
- intent.putExtra(Intent.EXTRA_STREAM, JAVA_URI);
- try {
- startActivity(intent);
- scheduleDelete();
- mHandled = true;
- finish();
- return;
- } catch (ActivityNotFoundException e) {
- Slog.i("DumpHeapActivity", "Unable to direct launch to " + directLaunch
- + ": " + e.getMessage());
- }
- }
-
- final int messageId;
- if (isUserInitiated) {
- messageId = com.android.internal.R.string.dump_heap_ready_text;
- } else if (isSystemProcess) {
- messageId = com.android.internal.R.string.dump_heap_system_text;
- } else {
- messageId = com.android.internal.R.string.dump_heap_text;
- }
- AlertDialog.Builder b = new AlertDialog.Builder(this,
- android.R.style.Theme_Material_Light_Dialog_Alert);
- b.setTitle(com.android.internal.R.string.dump_heap_title);
- b.setMessage(getString(
- messageId, mProcess, DebugUtils.sizeValueToString(mSize, null)));
- b.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- mHandled = true;
- sendBroadcast(new Intent(ACTION_DELETE_DUMPHEAP));
- finish();
- }
- });
- b.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- mHandled = true;
- scheduleDelete();
- Intent intent = new Intent(Intent.ACTION_SEND);
- ClipData clip = ClipData.newUri(getContentResolver(), "Heap Dump", JAVA_URI);
- intent.setClipData(clip);
- intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- intent.setType(clip.getDescription().getMimeType(0));
- intent.putExtra(Intent.EXTRA_STREAM, JAVA_URI);
- startActivity(Intent.createChooser(intent,
- getText(com.android.internal.R.string.dump_heap_title)));
- finish();
- }
- });
- mDialog = b.show();
- }
-
- void scheduleDelete() {
- Intent broadcast = new Intent(ACTION_DELETE_DUMPHEAP);
- broadcast.putExtra(EXTRA_DELAY_DELETE, true);
- sendBroadcast(broadcast);
- }
-
- @Override
- protected void onStop() {
- super.onStop();
- if (!isChangingConfigurations()) {
- if (!mHandled) {
- sendBroadcast(new Intent(ACTION_DELETE_DUMPHEAP));
- }
- }
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- mDialog.dismiss();
- }
-}
diff --git a/core/java/com/android/internal/app/procstats/ProcessState.java b/core/java/com/android/internal/app/procstats/ProcessState.java
index 2f9136a..392b8d3 100644
--- a/core/java/com/android/internal/app/procstats/ProcessState.java
+++ b/core/java/com/android/internal/app/procstats/ProcessState.java
@@ -77,7 +77,6 @@
STATE_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT
STATE_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
STATE_TOP, // ActivityManager.PROCESS_STATE_TOP
- STATE_IMPORTANT_FOREGROUND, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION
STATE_IMPORTANT_FOREGROUND, // ActivityManager.PROCESS_STATE_BOUND_TOP
STATE_IMPORTANT_FOREGROUND, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
STATE_IMPORTANT_FOREGROUND, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
diff --git a/core/java/com/android/internal/os/KernelCpuUidTimeReader.java b/core/java/com/android/internal/os/KernelCpuUidTimeReader.java
index e6d044f..f1eb2fb 100644
--- a/core/java/com/android/internal/os/KernelCpuUidTimeReader.java
+++ b/core/java/com/android/internal/os/KernelCpuUidTimeReader.java
@@ -403,7 +403,7 @@
}
private long[] readFreqs(String line) {
- if (line == null) {
+ if (line == null || line.trim().isEmpty()) {
return null;
}
final String[] lineArray = line.split(" ");
@@ -620,14 +620,18 @@
return true;
}
- String str = line.toString();
+ String str = line.toString().trim();
+ if (str.isEmpty()) {
+ Slog.w(mTag, "Empty uid_concurrent_active_time");
+ return false;
+ }
if (!str.startsWith("cpus:")) {
- Slog.wtf(mTag, "Malformed uid_concurrent_active_time line: " + line);
+ Slog.wtf(mTag, "Malformed uid_concurrent_active_time line: " + str);
return false;
}
int cores = Integer.parseInt(str.substring(5).trim(), 10);
if (cores <= 0) {
- Slog.wtf(mTag, "Malformed uid_concurrent_active_time line: " + line);
+ Slog.wtf(mTag, "Malformed uid_concurrent_active_time line: " + str);
return false;
}
mCores = cores;
@@ -750,17 +754,22 @@
if (mNumClusters > 0) {
return true;
}
+ String lineStr = line.toString().trim();
+ if (lineStr.isEmpty()) {
+ Slog.w(mTag, "Empty uid_concurrent_policy_time");
+ return false;
+ }
// Parse # cores in clusters.
- String[] lineArray = line.toString().split(" ");
+ String[] lineArray = lineStr.split(" ");
if (lineArray.length % 2 != 0) {
- Slog.wtf(mTag, "Malformed uid_concurrent_policy_time line: " + line);
+ Slog.wtf(mTag, "Malformed uid_concurrent_policy_time line: " + lineStr);
return false;
}
int[] clusters = new int[lineArray.length / 2];
int cores = 0;
for (int i = 0; i < clusters.length; i++) {
if (!lineArray[i * 2].startsWith("policy")) {
- Slog.wtf(mTag, "Malformed uid_concurrent_policy_time line: " + line);
+ Slog.wtf(mTag, "Malformed uid_concurrent_policy_time line: " + lineStr);
return false;
}
clusters[i] = Integer.parseInt(lineArray[i * 2 + 1], 10);
diff --git a/core/jni/android_graphics_Picture.cpp b/core/jni/android_graphics_Picture.cpp
index 03fcdef..1d085e5 100644
--- a/core/jni/android_graphics_Picture.cpp
+++ b/core/jni/android_graphics_Picture.cpp
@@ -20,9 +20,12 @@
#include "SkCanvas.h"
#include "SkStream.h"
#include "core_jni_helpers.h"
+#include "nativehelper/jni_macros.h"
#include <jni.h>
+#include <array>
+
namespace android {
static jlong android_graphics_Picture_newPicture(JNIEnv* env, jobject, jlong srcHandle) {
@@ -91,20 +94,20 @@
pict->endRecording();
}
-static const JNINativeMethod gMethods[] = {
- {"nativeGetWidth", "(J)I", (void*) android_graphics_Picture_getWidth},
- {"nativeGetHeight", "(J)I", (void*) android_graphics_Picture_getHeight},
- {"nativeConstructor", "(J)J", (void*) android_graphics_Picture_newPicture},
- {"nativeCreateFromStream", "(Ljava/io/InputStream;[B)J", (void*)android_graphics_Picture_deserialize},
- {"nativeBeginRecording", "(JII)J", (void*) android_graphics_Picture_beginRecording},
- {"nativeEndRecording", "(J)V", (void*) android_graphics_Picture_endRecording},
- {"nativeDraw", "(JJ)V", (void*) android_graphics_Picture_draw},
- {"nativeWriteToStream", "(JLjava/io/OutputStream;[B)Z", (void*)android_graphics_Picture_serialize},
- {"nativeDestructor","(J)V", (void*) android_graphics_Picture_killPicture}
+static const std::array gMethods = {
+ MAKE_JNI_NATIVE_METHOD("nativeGetWidth", "(J)I", android_graphics_Picture_getWidth),
+ MAKE_JNI_NATIVE_METHOD("nativeGetHeight", "(J)I", android_graphics_Picture_getHeight),
+ MAKE_JNI_NATIVE_METHOD("nativeConstructor", "(J)J", android_graphics_Picture_newPicture),
+ MAKE_JNI_NATIVE_METHOD("nativeCreateFromStream", "(Ljava/io/InputStream;[B)J", android_graphics_Picture_deserialize),
+ MAKE_JNI_NATIVE_METHOD("nativeBeginRecording", "(JII)J", android_graphics_Picture_beginRecording),
+ MAKE_JNI_NATIVE_METHOD("nativeEndRecording", "(J)V", android_graphics_Picture_endRecording),
+ MAKE_JNI_NATIVE_METHOD("nativeDraw", "(JJ)V", android_graphics_Picture_draw),
+ MAKE_JNI_NATIVE_METHOD("nativeWriteToStream", "(JLjava/io/OutputStream;[B)Z", android_graphics_Picture_serialize),
+ MAKE_JNI_NATIVE_METHOD("nativeDestructor","(J)V", android_graphics_Picture_killPicture)
};
int register_android_graphics_Picture(JNIEnv* env) {
- return RegisterMethodsOrDie(env, "android/graphics/Picture", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/graphics/Picture", gMethods.data(), gMethods.size());
}
}; // namespace android
diff --git a/core/proto/android/server/activitymanagerservice.proto b/core/proto/android/server/activitymanagerservice.proto
index d01a45c..2f87deb 100644
--- a/core/proto/android/server/activitymanagerservice.proto
+++ b/core/proto/android/server/activitymanagerservice.proto
@@ -771,10 +771,11 @@
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional string proc_name = 1;
- optional string file = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ reserved 2; // file, DEST_EXPLICIT
optional int32 pid = 3;
optional int32 uid = 4;
optional bool is_user_initiated = 5;
+ optional string uri = 6 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
optional Dump dump = 2;
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 5bb1801..a15e1ae 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -497,6 +497,7 @@
<protected-broadcast android:name="android.telephony.action.CARRIER_CONFIG_CHANGED" />
<protected-broadcast android:name="android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED" />
<protected-broadcast android:name="android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED" />
+ <protected-broadcast android:name="android.telephony.action.OTA_EMERGENCY_NUMBER_DB_INSTALLED" />
<protected-broadcast android:name="android.telephony.action.SECRET_CODE" />
<protected-broadcast android:name="android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION" />
<protected-broadcast android:name="android.telephony.action.SUBSCRIPTION_PLANS_CHANGED" />
@@ -4735,19 +4736,6 @@
android:excludeFromRecents="true"
android:process=":ui">
</activity>
- <activity android:name="com.android.internal.app.DumpHeapActivity"
- android:theme="@style/Theme.Translucent.NoTitleBar"
- android:label="@string/dump_heap_title"
- android:finishOnCloseSystemDialogs="true"
- android:noHistory="true"
- android:excludeFromRecents="true"
- android:process=":ui">
- </activity>
- <provider android:name="com.android.server.am.DumpHeapProvider"
- android:authorities="com.android.server.heapdump"
- android:grantUriPermissions="true"
- android:multiprocess="false"
- android:singleUser="true" />
<activity android:name="android.accounts.ChooseAccountActivity"
android:excludeFromRecents="true"
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index 018ca7e..8558d7c 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -1274,12 +1274,9 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g>ৰ ইণ্টাৰনেটৰ এক্সেছ নাই"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"অধিক বিকল্পৰ বাবে টিপক"</string>
- <!-- no translation found for mobile_no_internet (1445208572588803493) -->
- <skip />
- <!-- no translation found for other_networks_no_internet (1553338015597653827) -->
- <skip />
- <!-- no translation found for private_dns_broken_detailed (4293356177543535578) -->
- <skip />
+ <string name="mobile_no_internet" msgid="1445208572588803493">"ম’বাইল নেটৱৰ্কৰ কোনো ইণ্টাৰনেটৰ এক্সেছ নাই"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"নেটৱৰ্কৰ কোনো ইণ্টাৰনেটৰ এক্সেছ নাই"</string>
+ <string name="private_dns_broken_detailed" msgid="4293356177543535578">"ব্যক্তিগত DNS ছাৰ্ভাৰ এক্সেছ কৰিব নোৱাৰি"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"সংযোগ কৰা হ’ল"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g>ৰ সকলো সেৱাৰ এক্সেছ নাই"</string>
<string name="network_partial_connectivity_detailed" msgid="1959697814165325217">"যিকোনো প্ৰকাৰে সংযোগ কৰিবলৈ টিপক"</string>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 73db059..967ddd0 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -1274,8 +1274,8 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> ցանցը չունի մուտք ինտերնետին"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"Հպեք՝ ընտրանքները տեսնելու համար"</string>
- <string name="mobile_no_internet" msgid="1445208572588803493">"Բջջային ցանցում ինտերնետ կապ չկա"</string>
- <string name="other_networks_no_internet" msgid="1553338015597653827">"Ցանցում ինտերնետ կապ չկա"</string>
+ <string name="mobile_no_internet" msgid="1445208572588803493">"Բջջային ցանցը չի ապահովում ինտերնետ կապ"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"Ցանցը միացված չէ ինտերնետին"</string>
<string name="private_dns_broken_detailed" msgid="4293356177543535578">"Մասնավոր DNS սերվերն անհասանելի է"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"Միացված է"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> ցանցի կապը սահմանափակ է"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 462ee36..86e8b36 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1318,12 +1318,9 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"ל-<xliff:g id="NETWORK_SSID">%1$s</xliff:g> אין גישה לאינטרנט"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"הקש לקבלת אפשרויות"</string>
- <!-- no translation found for mobile_no_internet (1445208572588803493) -->
- <skip />
- <!-- no translation found for other_networks_no_internet (1553338015597653827) -->
- <skip />
- <!-- no translation found for private_dns_broken_detailed (4293356177543535578) -->
- <skip />
+ <string name="mobile_no_internet" msgid="1445208572588803493">"לרשת הסלולרית אין גישה לאינטרנט"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"לרשת אין גישה לאינטרנט"</string>
+ <string name="private_dns_broken_detailed" msgid="4293356177543535578">"לא ניתן לגשת לשרת DNS הפרטי"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"הרשת מחוברת"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"הקישוריות של <xliff:g id="NETWORK_SSID">%1$s</xliff:g> מוגבלת"</string>
<string name="network_partial_connectivity_detailed" msgid="1959697814165325217">"כדי להתחבר למרות זאת יש להקיש"</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index d1317e9..904f8b0 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -1274,12 +1274,9 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> ಯಾವುದೇ ಇಂಟರ್ನೆಟ್ ಸಂಪರ್ಕವನ್ನು ಹೊಂದಿಲ್ಲ"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"ಆಯ್ಕೆಗಳಿಗೆ ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
- <!-- no translation found for mobile_no_internet (1445208572588803493) -->
- <skip />
- <!-- no translation found for other_networks_no_internet (1553338015597653827) -->
- <skip />
- <!-- no translation found for private_dns_broken_detailed (4293356177543535578) -->
- <skip />
+ <string name="mobile_no_internet" msgid="1445208572588803493">"ಮೊಬೈಲ್ ನೆಟ್ವರ್ಕ್ ಯಾವುದೇ ಇಂಟರ್ನೆಟ್ ಪ್ರವೇಶವನ್ನು ಹೊಂದಿಲ್ಲ"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"ನೆಟ್ವರ್ಕ್ ಇಂಟರ್ನೆಟ್ ಪ್ರವೇಶವನ್ನು ಹೊಂದಿಲ್ಲ"</string>
+ <string name="private_dns_broken_detailed" msgid="4293356177543535578">"ಖಾಸಗಿ DNS ಸರ್ವರ್ ಅನ್ನು ಪ್ರವೇಶಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"ಸಂಪರ್ಕಿಸಲಾಗಿದೆ"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> ಸೀಮಿತ ಸಂಪರ್ಕ ಕಲ್ಪಿಸುವಿಕೆಯನ್ನು ಹೊಂದಿದೆ"</string>
<string name="network_partial_connectivity_detailed" msgid="1959697814165325217">"ಹೇಗಾದರೂ ಸಂಪರ್ಕಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index 9d87652..5250df5 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -278,7 +278,7 @@
<string name="android_system_label" msgid="6577375335728551336">"Android സിസ്റ്റം"</string>
<string name="user_owner_label" msgid="8836124313744349203">"വ്യക്തിഗത പ്രൊഫൈലിലേക്ക് മാറുക"</string>
<string name="managed_profile_label" msgid="8947929265267690522">"ഔദ്യോഗിക പ്രൊഫൈലിലേക്ക് മാറുക"</string>
- <string name="permgrouplab_contacts" msgid="3657758145679177612">"കോൺടാക്റ്റുകൾ"</string>
+ <string name="permgrouplab_contacts" msgid="3657758145679177612">"കോൺടാക്റ്റ്"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"നിങ്ങളുടെ കോൺടാക്റ്റുകൾ ആക്സസ്സ് ചെയ്യുക"</string>
<string name="permgrouprequest_contacts" msgid="6032805601881764300">"നിങ്ങളുടെ കോണ്ടാക്റ്റുകള് ആക്സസ് ചെയ്യാൻ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കണോ?"</string>
<string name="permgrouplab_location" msgid="7275582855722310164">"ലൊക്കേഷൻ"</string>
@@ -299,19 +299,19 @@
<string name="permgrouplab_microphone" msgid="171539900250043464">"മൈക്രോഫോണ്"</string>
<string name="permgroupdesc_microphone" msgid="4988812113943554584">"ഓഡിയോ റെക്കോർഡ് ചെയ്യുക"</string>
<string name="permgrouprequest_microphone" msgid="9167492350681916038">"ഓഡിയോ റെക്കോർഡ് ചെയ്യാൻ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കണോ?"</string>
- <string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"ശാരീരിക പ്രവർത്തനം"</string>
+ <string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"കായിക പ്രവർത്തനം"</string>
<string name="permgroupdesc_activityRecognition" msgid="6949472038320473478">"ശാരീരിക പ്രവർത്തനം ആക്സസ് ചെയ്യുക"</string>
<string name="permgrouprequest_activityRecognition" msgid="7626438016904799383">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>-നെ നിങ്ങളുടെ ശാരീരിക പ്രവർത്തനം ആക്സസ് ചെയ്യാൻ അനുവദിക്കണോ?"</string>
<string name="permgrouplab_camera" msgid="4820372495894586615">"ക്യാമറ"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"ചിത്രങ്ങളെടുത്ത് വീഡിയോ റെക്കോർഡുചെയ്യുക"</string>
<string name="permgrouprequest_camera" msgid="1299833592069671756">"ചിത്രം എടുക്കാനും വീഡിയോ റെക്കോർഡ് ചെയ്യാനും <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കണോ?"</string>
- <string name="permgrouplab_calllog" msgid="8798646184930388160">"കോൾ ലോഗുകൾ"</string>
+ <string name="permgrouplab_calllog" msgid="8798646184930388160">"കോൾ ലോഗ്"</string>
<string name="permgroupdesc_calllog" msgid="3006237336748283775">"ഫോൺ കോൾ ലോഗ് വായിക്കുകയും എഴുതുകയും ചെയ്യുക"</string>
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"നിങ്ങളുടെ ഫോൺ കോൾ ലോഗുകൾ ആക്സസ് ചെയ്യാൻ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കണോ?"</string>
<string name="permgrouplab_phone" msgid="5229115638567440675">"ഫോണ്"</string>
<string name="permgroupdesc_phone" msgid="6234224354060641055">"ഫോൺ വിളിക്കുകയും നിയന്ത്രിക്കുകയും ചെയ്യുക"</string>
<string name="permgrouprequest_phone" msgid="9166979577750581037">"ഫോൺ കോളുകൾ ചെയ്യാനും അവ മാനേജ് ചെയ്യാനും <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കണോ?"</string>
- <string name="permgrouplab_sensors" msgid="4838614103153567532">"ബോഡി സെൻസറുകൾ"</string>
+ <string name="permgrouplab_sensors" msgid="4838614103153567532">"ബോഡി സെൻസർ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"നിങ്ങളുടെ ജീവാധാര ലക്ഷണങ്ങളെ കുറിച്ചുള്ള സെൻസർ വിവരങ്ങൾ ആക്സസ് ചെയ്യുക"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"നിങ്ങളുടെ ജീവധാരണ ലക്ഷണങ്ങളെ കുറിച്ചുള്ള സെൻസർ ഡാറ്റ ആക്സസ് ചെയ്യാൻ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കണോ?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"വിൻഡോ ഉള്ളടക്കം വീണ്ടെടുക്കുക"</string>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 03b973b..39f614a 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -1274,12 +1274,9 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> ला इंटरनेट अॅक्सेस नाही"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"पर्यायांसाठी टॅप करा"</string>
- <!-- no translation found for mobile_no_internet (1445208572588803493) -->
- <skip />
- <!-- no translation found for other_networks_no_internet (1553338015597653827) -->
- <skip />
- <!-- no translation found for private_dns_broken_detailed (4293356177543535578) -->
- <skip />
+ <string name="mobile_no_internet" msgid="1445208572588803493">"मोबाइल नेटवर्कला इंटरनेट अॅक्सेस नाही"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"नेटवर्कला इंटरनेट अॅक्सेस नाही"</string>
+ <string name="private_dns_broken_detailed" msgid="4293356177543535578">"खाजगी DNS सर्व्हर अॅक्सेस करू शकत नाही"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"कनेक्ट केले"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> ला मर्यादित कनेक्टिव्हिटी आहे"</string>
<string name="network_partial_connectivity_detailed" msgid="1959697814165325217">"तरीही कनेक्ट करण्यासाठी टॅप करा"</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index b4079ef..cd36d53 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -1274,12 +1274,9 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g>ର ଇଣ୍ଟର୍ନେଟ୍ ଆକ୍ସେସ୍ ନାହିଁ"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"ବିକଳ୍ପ ପାଇଁ ଟାପ୍ କରନ୍ତୁ"</string>
- <!-- no translation found for mobile_no_internet (1445208572588803493) -->
- <skip />
- <!-- no translation found for other_networks_no_internet (1553338015597653827) -->
- <skip />
- <!-- no translation found for private_dns_broken_detailed (4293356177543535578) -->
- <skip />
+ <string name="mobile_no_internet" msgid="1445208572588803493">"ମୋବାଇଲ୍ ନେଟ୍ୱାର୍କରେ ଇଣ୍ଟର୍ନେଟ୍ ଆକ୍ସେସ୍ ନାହିଁ"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"ନେଟ୍ୱାର୍କରେ ଇଣ୍ଟର୍ନେଟ୍ ଆକ୍ସେସ୍ ନାହିଁ"</string>
+ <string name="private_dns_broken_detailed" msgid="4293356177543535578">"ବ୍ୟକ୍ତିଗତ DNS ସର୍ଭର୍ ଆକ୍ସେସ୍ କରିହେବ ନାହିଁ"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"ସଂଯୁକ୍ତ ହୋଇଛି"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g>ର ସୀମିତ ସଂଯୋଗ ଅଛି"</string>
<string name="network_partial_connectivity_detailed" msgid="1959697814165325217">"ତଥାପି ଯୋଗାଯୋଗ କରିବାକୁ ଟାପ୍ କରନ୍ତୁ"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index b238d4f..3be0900 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1318,12 +1318,9 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> nie ma dostępu do internetu"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"Kliknij, by wyświetlić opcje"</string>
- <!-- no translation found for mobile_no_internet (1445208572588803493) -->
- <skip />
- <!-- no translation found for other_networks_no_internet (1553338015597653827) -->
- <skip />
- <!-- no translation found for private_dns_broken_detailed (4293356177543535578) -->
- <skip />
+ <string name="mobile_no_internet" msgid="1445208572588803493">"Sieć komórkowa nie ma dostępu do internetu"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"Sieć nie ma dostępu do internetu"</string>
+ <string name="private_dns_broken_detailed" msgid="4293356177543535578">"Brak dostępu do prywatnego serwera DNS"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"Połączono"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> ma ograniczoną łączność"</string>
<string name="network_partial_connectivity_detailed" msgid="1959697814165325217">"Kliknij, by mimo to nawiązać połączenie"</string>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 776595f..97660b4 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -1274,12 +1274,9 @@
<skip />
<string name="wifi_no_internet" msgid="5198100389964214865">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> کو انٹرنیٹ تک رسائی حاصل نہیں ہے"</string>
<string name="wifi_no_internet_detailed" msgid="8083079241212301741">"اختیارات کیلئے تھپتھپائیں"</string>
- <!-- no translation found for mobile_no_internet (1445208572588803493) -->
- <skip />
- <!-- no translation found for other_networks_no_internet (1553338015597653827) -->
- <skip />
- <!-- no translation found for private_dns_broken_detailed (4293356177543535578) -->
- <skip />
+ <string name="mobile_no_internet" msgid="1445208572588803493">"موبائل نیٹ ورک کو انٹرنیٹ تک رسائی حاصل نہیں ہے"</string>
+ <string name="other_networks_no_internet" msgid="1553338015597653827">"نیٹ ورک کو انٹرنیٹ تک رسائی حاصل نہیں ہے"</string>
+ <string name="private_dns_broken_detailed" msgid="4293356177543535578">"نجی DNS سرور تک رسائی حاصل نہیں کی جا سکی"</string>
<string name="captive_portal_logged_in_detailed" msgid="8489345381637456021">"منسلک ہے"</string>
<string name="network_partial_connectivity" msgid="7774883385494762741">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> کی کنیکٹوٹی محدود ہے"</string>
<string name="network_partial_connectivity_detailed" msgid="1959697814165325217">"بہر حال منسلک کرنے کے لیے تھپتھپائیں"</string>
diff --git a/data/etc/services.core.protolog.json b/data/etc/services.core.protolog.json
index ecdf537..1326952 100644
--- a/data/etc/services.core.protolog.json
+++ b/data/etc/services.core.protolog.json
@@ -913,12 +913,6 @@
"group": "WM_DEBUG_APP_TRANSITIONS",
"at": "com\/android\/server\/wm\/AppTransitionController.java"
},
- "-121104356": {
- "message": "Remove %s: mSurfaceController=%s mAnimatingExit=%b mRemoveOnExit=%b mHasSurface=%b surfaceShowing=%b animating=%b app-animation=%b mWillReplaceWindow=%b inPendingTransaction=%b mDisplayFrozen=%b callers=%s",
- "level": "VERBOSE",
- "group": "WM_DEBUG_APP_TRANSITIONS",
- "at": "com\/android\/server\/wm\/WindowState.java"
- },
"-116086365": {
"message": "******************** ENABLING SCREEN!",
"level": "INFO",
@@ -1333,6 +1327,12 @@
"group": "WM_DEBUG_REMOTE_ANIMATIONS",
"at": "com\/android\/server\/wm\/RemoteAnimationController.java"
},
+ "594260654": {
+ "message": "Remove %s: mSurfaceController=%s mAnimatingExit=%b mRemoveOnExit=%b mHasSurface=%b surfaceShowing=%b animating=%b app-animation=%b mWillReplaceWindow=%b mDisplayFrozen=%b callers=%s",
+ "level": "VERBOSE",
+ "group": "WM_DEBUG_APP_TRANSITIONS",
+ "at": "com\/android\/server\/wm\/WindowState.java"
+ },
"600140673": {
"message": "checkBootAnimationComplete: Waiting for anim complete",
"level": "INFO",
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index c6586ec..45b2de5 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -784,7 +784,9 @@
mFillPaint.setDither(st.mDither);
mFillPaint.setColorFilter(colorFilter);
if (colorFilter != null && st.mSolidColors == null) {
- mFillPaint.setColor(mAlpha << 24);
+ // If we don't have a solid color and we don't have a gradient,
+ // the app is stroking the shape, set the color to transparent
+ mFillPaint.setColor(st.mGradientColors != null ? mAlpha << 24 : 0);
}
if (haveStroke) {
mStrokePaint.setAlpha(currStrokeAlpha);
diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp
index 40bff88..3681c69 100644
--- a/libs/hwui/HardwareBitmapUploader.cpp
+++ b/libs/hwui/HardwareBitmapUploader.cpp
@@ -302,6 +302,7 @@
switch (skBitmap.info().colorType()) {
case kRGBA_8888_SkColorType:
formatInfo.isSupported = true;
+ [[fallthrough]];
// ARGB_4444 is upconverted to RGBA_8888
case kARGB_4444_SkColorType:
formatInfo.pixelFormat = PIXEL_FORMAT_RGBA_8888;
diff --git a/location/java/android/location/ILocationListener.aidl b/location/java/android/location/ILocationListener.aidl
index ec11345..8479caf 100644
--- a/location/java/android/location/ILocationListener.aidl
+++ b/location/java/android/location/ILocationListener.aidl
@@ -31,8 +31,6 @@
void onProviderEnabled(String provider);
@UnsupportedAppUsage
void onProviderDisabled(String provider);
-
- // --- deprecated ---
- @UnsupportedAppUsage
- void onStatusChanged(String provider, int status, in Bundle extras);
+ // called when the listener is removed from the server side; no further callbacks are expected
+ void onRemoved();
}
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index ca9d4d3..b7dd543 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -708,6 +708,7 @@
* @deprecated Use {@link #getCurrentLocation(String, CancellationSignal, Executor, Consumer)}
* instead as it does not carry a risk of extreme battery drain.
*/
+ @Deprecated
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestSingleUpdate(
@NonNull Criteria criteria,
@@ -737,6 +738,7 @@
* @deprecated Use {@link #getCurrentLocation(String, CancellationSignal, Executor, Consumer)}
* instead as it does not carry a risk of extreme battery drain.
*/
+ @Deprecated
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestSingleUpdate(@NonNull String provider,
@NonNull PendingIntent pendingIntent) {
@@ -765,6 +767,7 @@
* @deprecated Use {@link #getCurrentLocation(String, CancellationSignal, Executor, Consumer)}
* instead as it does not carry a risk of extreme battery drain.
*/
+ @Deprecated
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestSingleUpdate(@NonNull Criteria criteria,
@NonNull PendingIntent pendingIntent) {
@@ -2481,9 +2484,6 @@
}
@Override
- public void onStatusChanged(String provider, int status, Bundle extras) {}
-
- @Override
public void onProviderEnabled(String provider) {}
@Override
@@ -2493,6 +2493,11 @@
deliverResult(null);
}
+ @Override
+ public void onRemoved() {
+ deliverResult(null);
+ }
+
private synchronized void deliverResult(@Nullable Location location) {
if (mExecutor == null) {
return;
@@ -2568,37 +2573,6 @@
}
@Override
- public void onStatusChanged(String provider, int status, Bundle extras) {
- Executor currentExecutor = mExecutor;
- if (currentExecutor == null) {
- return;
- }
-
- try {
- currentExecutor.execute(() -> {
- try {
- if (currentExecutor != mExecutor) {
- return;
- }
-
- // we may be under the binder identity if a direct executor is used
- long identity = Binder.clearCallingIdentity();
- try {
- mListener.onStatusChanged(provider, status, extras);
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
- } finally {
- locationCallbackFinished();
- }
- });
- } catch (RejectedExecutionException e) {
- locationCallbackFinished();
- throw e;
- }
- }
-
- @Override
public void onProviderEnabled(String provider) {
Executor currentExecutor = mExecutor;
if (currentExecutor == null) {
@@ -2660,6 +2634,14 @@
}
}
+ @Override
+ public void onRemoved() {
+ unregister();
+ synchronized (mListeners) {
+ mListeners.remove(mListener, this);
+ }
+ }
+
private void locationCallbackFinished() {
try {
mService.locationCallbackFinished(this);
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index f797da7..9ad7f2a 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -908,6 +908,7 @@
/** @hide */
@UnsupportedAppUsage
+ @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
public void setMasterMute(boolean mute, int flags) {
final IAudioService service = getService();
try {
diff --git a/packages/CarSystemUI/res/values/integers_car.xml b/packages/CarSystemUI/res/values/integers_car.xml
index fb67b30..d6c16cb 100644
--- a/packages/CarSystemUI/res/values/integers_car.xml
+++ b/packages/CarSystemUI/res/values/integers_car.xml
@@ -34,4 +34,7 @@
<!-- The delay before the unlock dialog pops up -->
<integer name="unlock_dialog_delay_ms">0</integer>
+ <!-- Timeout values in milliseconds for displaying volume dialog-->
+ <integer name="car_volume_dialog_display_normal_timeout">3000</integer>
+ <integer name="car_volume_dialog_display_hovering_timeout">16000</integer>
</resources>
diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
index 85472ff..34c920f 100644
--- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -359,6 +359,7 @@
notifLog,
dozeParameters,
scrimController,
+ null /* keyguardLiftController */,
lockscreenWallpaperLazy,
biometricUnlockControllerLazy,
dozeServiceHost,
diff --git a/packages/CarSystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java b/packages/CarSystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java
index d979bad..09223e8 100644
--- a/packages/CarSystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java
+++ b/packages/CarSystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java
@@ -62,7 +62,6 @@
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
/**
@@ -76,8 +75,6 @@
private static final String XML_TAG_VOLUME_ITEMS = "carVolumeItems";
private static final String XML_TAG_VOLUME_ITEM = "item";
- private static final int HOVERING_TIMEOUT = 16000;
- private static final int NORMAL_TIMEOUT = 3000;
private static final int LISTVIEW_ANIMATION_DURATION_IN_MILLIS = 250;
private static final int DISMISS_DELAY_IN_MILLIS = 50;
private static final int ARROW_FADE_IN_START_DELAY_IN_MILLIS = 100;
@@ -91,12 +88,23 @@
// Volume items in the RecyclerView.
private final List<CarVolumeItem> mCarVolumeLineItems = new ArrayList<>();
private final KeyguardManager mKeyguard;
+ private final int mNormalTimeout;
+ private final int mHoveringTimeout;
+
private Window mWindow;
private CustomDialog mDialog;
private RecyclerView mListView;
private CarVolumeItemAdapter mVolumeItemsAdapter;
private Car mCar;
private CarAudioManager mCarAudioManager;
+ private boolean mHovering;
+ private int mCurrentlyDisplayingGroupId;
+ private int mPreviouslyDisplayingGroupId;
+ private boolean mShowing;
+ private boolean mDismissing;
+ private boolean mExpanded;
+ private View mExpandIcon;
+
private final CarAudioManager.CarVolumeCallback mVolumeChangeCallback =
new CarAudioManager.CarVolumeCallback() {
@Override
@@ -126,6 +134,7 @@
volumeItem.progress = value;
}
if ((flags & AudioManager.FLAG_SHOW_UI) != 0) {
+ mPreviouslyDisplayingGroupId = mCurrentlyDisplayingGroupId;
mCurrentlyDisplayingGroupId = groupId;
mHandler.obtainMessage(H.SHOW,
Events.SHOW_REASON_VOLUME_CHANGED).sendToTarget();
@@ -137,12 +146,6 @@
// ignored
}
};
- private boolean mHovering;
- private int mCurrentlyDisplayingGroupId;
- private boolean mShowing;
- private boolean mDismissing;
- private boolean mExpanded;
- private View mExpandIcon;
private final CarServiceLifecycleListener mCarServiceLifecycleListener = (car, ready) -> {
if (!ready) {
@@ -158,7 +161,7 @@
mAvailableVolumeItems.add(volumeItem);
// The first one is the default item.
if (groupId == 0) {
- setuptListItem(0);
+ clearAllAndSetupDefaultCarVolumeLineItem(0);
}
}
@@ -169,18 +172,13 @@
mCarAudioManager.registerCarVolumeCallback(mVolumeChangeCallback);
};
- private void setuptListItem(int groupId) {
- mCarVolumeLineItems.clear();
- VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
- volumeItem.defaultItem = true;
- addCarVolumeListItem(volumeItem, /* volumeGroupId = */ groupId,
- R.drawable.car_ic_keyboard_arrow_down, new ExpandIconListener()
- );
- }
-
public CarVolumeDialogImpl(Context context) {
mContext = context;
mKeyguard = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
+ mNormalTimeout = mContext.getResources().getInteger(
+ R.integer.car_volume_dialog_display_normal_timeout);
+ mHoveringTimeout = mContext.getResources().getInteger(
+ R.integer.car_volume_dialog_display_hovering_timeout);
}
private static int getSeekbarValue(CarAudioManager carAudioManager, int volumeGroupId) {
@@ -204,7 +202,7 @@
@Override
public void destroy() {
- mHandler.removeCallbacksAndMessages(null);
+ mHandler.removeCallbacksAndMessages(/* token= */ null);
cleanupAudioManager();
// unregisterVolumeCallback is not being called when disconnect car, so we manually cleanup
@@ -280,19 +278,36 @@
mHandler.removeMessages(H.SHOW);
mHandler.removeMessages(H.DISMISS);
+
rescheduleTimeoutH();
+
// Refresh the data set before showing.
mVolumeItemsAdapter.notifyDataSetChanged();
+
if (mShowing) {
+ if (mPreviouslyDisplayingGroupId == mCurrentlyDisplayingGroupId || mExpanded) {
+ return;
+ }
+
+ clearAllAndSetupDefaultCarVolumeLineItem(mCurrentlyDisplayingGroupId);
return;
}
+
mShowing = true;
- setuptListItem(mCurrentlyDisplayingGroupId);
+ clearAllAndSetupDefaultCarVolumeLineItem(mCurrentlyDisplayingGroupId);
mDialog.show();
Events.writeEvent(mContext, Events.EVENT_SHOW_DIALOG, reason, mKeyguard.isKeyguardLocked());
}
- private void rescheduleTimeoutH() {
+ private void clearAllAndSetupDefaultCarVolumeLineItem(int groupId) {
+ mCarVolumeLineItems.clear();
+ VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
+ volumeItem.defaultItem = true;
+ addCarVolumeListItem(volumeItem, /* volumeGroupId = */ groupId,
+ R.drawable.car_ic_keyboard_arrow_down, new ExpandIconListener());
+ }
+
+ protected void rescheduleTimeoutH() {
mHandler.removeMessages(H.DISMISS);
final int timeout = computeTimeoutH();
mHandler.sendMessageDelayed(mHandler
@@ -304,7 +319,7 @@
}
private int computeTimeoutH() {
- return mHovering ? HOVERING_TIMEOUT : NORMAL_TIMEOUT;
+ return mHovering ? mHoveringTimeout : mNormalTimeout;
}
private void dismissH(int reason) {
@@ -366,12 +381,13 @@
if (XML_TAG_VOLUME_ITEM.equals(parser.getName())) {
TypedArray item = mContext.getResources().obtainAttributes(
attrs, R.styleable.carVolumeItems_item);
- int usage = item.getInt(R.styleable.carVolumeItems_item_usage, -1);
+ int usage = item.getInt(R.styleable.carVolumeItems_item_usage,
+ /* defValue= */ -1);
if (usage >= 0) {
VolumeItem volumeItem = new VolumeItem();
volumeItem.rank = rank;
- volumeItem.icon = item.getResourceId(R.styleable.carVolumeItems_item_icon,
- 0);
+ volumeItem.icon = item.getResourceId(
+ R.styleable.carVolumeItems_item_icon, /* defValue= */ 0);
mVolumeItems.put(usage, volumeItem);
rank++;
}
@@ -396,22 +412,22 @@
return result;
}
- private CarVolumeItem addCarVolumeListItem(VolumeItem volumeItem, int volumeGroupId,
- int supplementalIconId,
+ private CarVolumeItem createCarVolumeListItem(VolumeItem volumeItem, int volumeGroupId,
+ Drawable supplementalIcon, int seekbarProgressValue,
@Nullable View.OnClickListener supplementalIconOnClickListener) {
CarVolumeItem carVolumeItem = new CarVolumeItem();
carVolumeItem.setMax(getMaxSeekbarValue(mCarAudioManager, volumeGroupId));
- int color = mContext.getResources().getColor(R.color.car_volume_dialog_tint);
- int progress = getSeekbarValue(mCarAudioManager, volumeGroupId);
- carVolumeItem.setProgress(progress);
+ carVolumeItem.setProgress(seekbarProgressValue);
carVolumeItem.setOnSeekBarChangeListener(
new CarVolumeDialogImpl.VolumeSeekBarChangeListener(volumeGroupId,
mCarAudioManager));
- Drawable primaryIcon = mContext.getResources().getDrawable(volumeItem.icon);
+ carVolumeItem.setGroupId(volumeGroupId);
+
+ int color = mContext.getColor(R.color.car_volume_dialog_tint);
+ Drawable primaryIcon = mContext.getDrawable(volumeItem.icon);
primaryIcon.mutate().setTint(color);
carVolumeItem.setPrimaryIcon(primaryIcon);
- if (supplementalIconId != 0) {
- Drawable supplementalIcon = mContext.getResources().getDrawable(supplementalIconId);
+ if (supplementalIcon != null) {
supplementalIcon.mutate().setTint(color);
carVolumeItem.setSupplementalIcon(supplementalIcon,
/* showSupplementalIconDivider= */ true);
@@ -420,21 +436,23 @@
carVolumeItem.setSupplementalIcon(/* drawable= */ null,
/* showSupplementalIconDivider= */ false);
}
- carVolumeItem.setGroupId(volumeGroupId);
- mCarVolumeLineItems.add(carVolumeItem);
+
volumeItem.carVolumeItem = carVolumeItem;
- volumeItem.progress = progress;
+ volumeItem.progress = seekbarProgressValue;
+
return carVolumeItem;
}
- private VolumeItem findVolumeItem(CarVolumeItem targetItem) {
- for (int i = 0; i < mVolumeItems.size(); ++i) {
- VolumeItem volumeItem = mVolumeItems.valueAt(i);
- if (volumeItem.carVolumeItem == targetItem) {
- return volumeItem;
- }
- }
- return null;
+ private CarVolumeItem addCarVolumeListItem(VolumeItem volumeItem, int volumeGroupId,
+ int supplementalIconId,
+ @Nullable View.OnClickListener supplementalIconOnClickListener) {
+ int seekbarProgressValue = getSeekbarValue(mCarAudioManager, volumeGroupId);
+ Drawable supplementalIcon = supplementalIconId == 0 ? null : mContext.getDrawable(
+ supplementalIconId);
+ CarVolumeItem carVolumeItem = createCarVolumeListItem(volumeItem, volumeGroupId,
+ supplementalIcon, seekbarProgressValue, supplementalIconOnClickListener);
+ mCarVolumeLineItems.add(carVolumeItem);
+ return carVolumeItem;
}
private void cleanupAudioManager() {
@@ -530,21 +548,15 @@
for (int groupId = 0; groupId < mAvailableVolumeItems.size(); ++groupId) {
if (groupId != mCurrentlyDisplayingGroupId) {
VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
- addCarVolumeListItem(volumeItem, groupId, 0, null);
+ addCarVolumeListItem(volumeItem, groupId, /* supplementalIconId= */ 0,
+ /* supplementalIconOnClickListener= */ null);
}
}
inAnimator = AnimatorInflater.loadAnimator(
mContext, R.anim.car_arrow_fade_in_rotate_up);
} else {
- // Only keeping the default stream if it is not expended.
- Iterator itr = mCarVolumeLineItems.iterator();
- while (itr.hasNext()) {
- CarVolumeItem carVolumeItem = (CarVolumeItem) itr.next();
- if (carVolumeItem.getGroupId() != mCurrentlyDisplayingGroupId) {
- itr.remove();
- }
- }
+ clearAllAndSetupDefaultCarVolumeLineItem(mCurrentlyDisplayingGroupId);
inAnimator = AnimatorInflater.loadAnimator(
mContext, R.anim.car_arrow_fade_in_rotate_down);
}
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 66e8923..a1ef831 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -1186,4 +1186,7 @@
<!-- Name of the this device. [CHAR LIMIT=30] -->
<string name="media_transfer_this_device_name">This device</string>
+
+ <!-- Warning message to tell user is have problem during profile connect, it need to turn off device and back on. [CHAR_LIMIT=NONE] -->
+ <string name="profile_connect_timeout_subtext">Problem connecting. Turn device off & back on</string>
</resources>
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index 98db7c8..2507a34 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -24,6 +24,9 @@
import android.bluetooth.BluetoothUuid;
import android.content.Context;
import android.content.SharedPreferences;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
import android.os.ParcelUuid;
import android.os.SystemClock;
import android.text.TextUtils;
@@ -55,6 +58,7 @@
// Some Hearing Aids (especially the 2nd device) needs more time to do service discovery
private static final long MAX_HEARING_AIDS_DELAY_FOR_AUTO_CONNECT = 15000;
private static final long MAX_HOGP_DELAY_FOR_AUTO_CONNECT = 30000;
+ private static final long MAX_MEDIA_PROFILE_CONNECT_DELAY = 60000;
private final Context mContext;
private final BluetoothAdapter mLocalAdapter;
@@ -90,9 +94,35 @@
private boolean mIsActiveDeviceA2dp = false;
private boolean mIsActiveDeviceHeadset = false;
private boolean mIsActiveDeviceHearingAid = false;
+ // Media profile connect state
+ private boolean mIsA2dpProfileConnectedFail = false;
+ private boolean mIsHeadsetProfileConnectedFail = false;
+ private boolean mIsHearingAidProfileConnectedFail = false;
// Group second device for Hearing Aid
private CachedBluetoothDevice mSubDevice;
+ private final Handler mHandler = new Handler(Looper.getMainLooper()) {
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case BluetoothProfile.A2DP:
+ mIsA2dpProfileConnectedFail = true;
+ break;
+ case BluetoothProfile.HEADSET:
+ mIsHeadsetProfileConnectedFail = true;
+ break;
+ case BluetoothProfile.HEARING_AID:
+ mIsHearingAidProfileConnectedFail = true;
+ break;
+ default:
+ Log.w(TAG, "handleMessage(): unknown message : " + msg.what);
+ break;
+ }
+ Log.w(TAG, "Connect to profile : " + msg.what + " timeout, show error message !");
+ refresh();
+ }
+ };
+
CachedBluetoothDevice(Context context, LocalBluetoothProfileManager profileManager,
BluetoothDevice device) {
mContext = context;
@@ -133,6 +163,35 @@
}
synchronized (mProfileLock) {
+ if (profile instanceof A2dpProfile || profile instanceof HeadsetProfile
+ || profile instanceof HearingAidProfile) {
+ setProfileConnectedStatus(profile.getProfileId(), false);
+ switch (newProfileState) {
+ case BluetoothProfile.STATE_CONNECTED:
+ mHandler.removeMessages(profile.getProfileId());
+ break;
+ case BluetoothProfile.STATE_CONNECTING:
+ mHandler.sendEmptyMessageDelayed(profile.getProfileId(),
+ MAX_MEDIA_PROFILE_CONNECT_DELAY);
+ break;
+ case BluetoothProfile.STATE_DISCONNECTING:
+ if (mHandler.hasMessages(profile.getProfileId())) {
+ mHandler.removeMessages(profile.getProfileId());
+ }
+ break;
+ case BluetoothProfile.STATE_DISCONNECTED:
+ if (mHandler.hasMessages(profile.getProfileId())) {
+ mHandler.removeMessages(profile.getProfileId());
+ setProfileConnectedStatus(profile.getProfileId(), true);
+ }
+ break;
+ default:
+ Log.w(TAG, "onProfileStateChanged(): unknown profile state : "
+ + newProfileState);
+ break;
+ }
+ }
+
if (newProfileState == BluetoothProfile.STATE_CONNECTED) {
if (profile instanceof MapProfile) {
profile.setPreferred(mDevice, true);
@@ -162,6 +221,24 @@
fetchActiveDevices();
}
+ @VisibleForTesting
+ void setProfileConnectedStatus(int profileId, boolean isFailed) {
+ switch (profileId) {
+ case BluetoothProfile.A2DP:
+ mIsA2dpProfileConnectedFail = isFailed;
+ break;
+ case BluetoothProfile.HEADSET:
+ mIsHeadsetProfileConnectedFail = isFailed;
+ break;
+ case BluetoothProfile.HEARING_AID:
+ mIsHearingAidProfileConnectedFail = isFailed;
+ break;
+ default:
+ Log.w(TAG, "setProfileConnectedStatus(): unknown profile id : " + profileId);
+ break;
+ }
+ }
+
public void disconnect() {
synchronized (mProfileLock) {
for (LocalBluetoothProfile profile : mProfiles) {
@@ -844,6 +921,10 @@
int leftBattery = -1;
int rightBattery = -1;
+ if (isProfileConnectedFail() && isConnected()) {
+ return mContext.getString(R.string.profile_connect_timeout_subtext);
+ }
+
synchronized (mProfileLock) {
for (LocalBluetoothProfile profile : getProfiles()) {
int connectionStatus = getProfileConnectionState(profile);
@@ -943,6 +1024,11 @@
return leftBattery >= 0 && rightBattery >= 0;
}
+ private boolean isProfileConnectedFail() {
+ return mIsA2dpProfileConnectedFail || mIsHearingAidProfileConnectedFail
+ || mIsHeadsetProfileConnectedFail;
+ }
+
/**
* @return resource for android auto string that describes the connection state of this device.
*/
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
index 93dcbfe..5c89a01 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
@@ -21,6 +21,7 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
@@ -31,6 +32,8 @@
import android.content.Context;
import android.media.AudioManager;
+import com.android.settingslib.R;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -922,4 +925,16 @@
assertThat(subCachedDevice.mJustDiscovered).isEqualTo(JUSTDISCOVERED_1);
assertThat(subCachedDevice.mDevice).isEqualTo(mDevice);
}
+
+ @Test
+ public void getConnectionSummary_profileConnectedFail_showErrorMessage() {
+ final A2dpProfile profle = mock(A2dpProfile.class);
+ mCachedDevice.onProfileStateChanged(profle, BluetoothProfile.STATE_CONNECTED);
+ mCachedDevice.setProfileConnectedStatus(BluetoothProfile.A2DP, true);
+
+ when(profle.getConnectionStatus(mDevice)).thenReturn(BluetoothProfile.STATE_CONNECTED);
+
+ assertThat(mCachedDevice.getConnectionSummary()).isEqualTo(
+ mContext.getString(R.string.profile_connect_timeout_subtext));
+ }
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index d28c1aa..55a51da 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -56,8 +56,6 @@
ConfigSettingsProto.CONNECTIVITY_SETTINGS);
namespaceToFieldMap.put(DeviceConfig.NAMESPACE_CONTENT_CAPTURE,
ConfigSettingsProto.CONTENT_CAPTURE_SETTINGS);
- namespaceToFieldMap.put(DeviceConfig.NAMESPACE_DEX_BOOT,
- ConfigSettingsProto.DEX_BOOT_SETTINGS);
namespaceToFieldMap.put(DeviceConfig.NAMESPACE_GAME_DRIVER,
ConfigSettingsProto.GAME_DRIVER_SETTINGS);
namespaceToFieldMap.put(DeviceConfig.NAMESPACE_INPUT_NATIVE_BOOT,
diff --git a/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml b/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml
index ff89bbc..e9e8441 100644
--- a/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml
+++ b/packages/SystemUI/plugin/ExamplePlugin/AndroidManifest.xml
@@ -22,14 +22,16 @@
<application>
<activity android:name=".PluginSettings"
- android:label="@string/plugin_label">
+ android:label="@string/plugin_label"
+ android:exported="false">
<intent-filter>
<action android:name="com.android.systemui.action.PLUGIN_SETTINGS" />
</intent-filter>
</activity>
<service android:name=".SampleOverlayPlugin"
- android:label="@string/plugin_label">
+ android:label="@string/plugin_label"
+ android:exported="false">
<intent-filter>
<action android:name="com.android.systemui.action.PLUGIN_OVERLAY" />
</intent-filter>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index efcc2c4..41c3436 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -483,4 +483,7 @@
<!-- Whether or not to add a "people" notifications section -->
<bool name="config_usePeopleFiltering">false</bool>
+ <!-- Package name for controls plugin -->
+ <string name="config_controlsPluginPackageName" translatable="false">com.android.systemui.controls.panel</string>
+
</resources>
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 27410be..8373fb2 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -99,6 +99,8 @@
import com.android.internal.widget.LockPatternUtils;
import com.android.settingslib.WirelessUtils;
import com.android.systemui.DejankUtils;
+import com.android.systemui.DumpController;
+import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.MainLooper;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -126,7 +128,7 @@
* to be updated.
*/
@Singleton
-public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
+public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpable {
private static final String TAG = "KeyguardUpdateMonitor";
private static final boolean DEBUG = KeyguardConstants.DEBUG;
@@ -1499,11 +1501,13 @@
@VisibleForTesting
@Inject
- protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper) {
+ protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper,
+ DumpController dumpController) {
mContext = context;
mSubscriptionManager = SubscriptionManager.from(context);
mDeviceProvisioned = isDeviceProvisionedInSettingsDb();
mStrongAuthTracker = new StrongAuthTracker(context, this::notifyStrongAuthStateChanged);
+ dumpController.registerDumpable(this);
mHandler = new Handler(mainLooper) {
@Override
@@ -2787,6 +2791,7 @@
}
}
+ @Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println("KeyguardUpdateMonitor state:");
pw.println(" SIM States:");
diff --git a/packages/SystemUI/src/com/android/systemui/DumpController.kt b/packages/SystemUI/src/com/android/systemui/DumpController.kt
index 65f1abd..8c7075b 100644
--- a/packages/SystemUI/src/com/android/systemui/DumpController.kt
+++ b/packages/SystemUI/src/com/android/systemui/DumpController.kt
@@ -47,6 +47,16 @@
/**
* Adds a [Dumpable] dumpable to be dumped.
*
+ * @param dumpable the [Dumpable] to be added
+ */
+ fun registerDumpable(dumpable: Dumpable) {
+ Preconditions.checkNotNull(dumpable, "The dumpable to be added cannot be null")
+ registerDumpable(dumpable.javaClass.simpleName, dumpable)
+ }
+
+ /**
+ * Adds a [Dumpable] dumpable to be dumped.
+ *
* @param tag a string tag to associate with this dumpable. Tags must be globally unique; this
* method will throw if the same tag has already been registered. Tags can be used to
* filter output when debugging.
@@ -79,11 +89,11 @@
/**
* Dump all the [Dumpable] registered with the controller
*/
- override fun dump(fd: FileDescriptor?, pw: PrintWriter, args: Array<String>?) {
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<String>) {
pw.println("DumpController state:")
- val filter = if (args != null && args.size >= 3 &&
- args[0] == "dependency" && args[1] == "DumpController") {
+ val filter = if (args.size >= 3 && args[0].toLowerCase() == "dependency" &&
+ args[1] == "DumpController") {
ArraySet(args[2].split(',').map { it.toLowerCase() })
} else {
null
diff --git a/packages/SystemUI/src/com/android/systemui/Dumpable.java b/packages/SystemUI/src/com/android/systemui/Dumpable.java
index 65a6844..10a0643 100644
--- a/packages/SystemUI/src/com/android/systemui/Dumpable.java
+++ b/packages/SystemUI/src/com/android/systemui/Dumpable.java
@@ -14,9 +14,24 @@
package com.android.systemui;
+import androidx.annotation.NonNull;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
+/**
+ * Implemented by classes who want to be in:
+ * {@code adb shell dumpsys activity service com.android.systemui}
+ *
+ * @see DumpController
+ */
public interface Dumpable {
- void dump(FileDescriptor fd, PrintWriter pw, String[] args);
+
+ /**
+ * Called when it's time to dump the internal state
+ * @param fd A file descriptor.
+ * @param pw Where to write your dump to.
+ * @param args Arguments.
+ */
+ void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args);
}
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
index 98d7f8b..776189b 100644
--- a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
@@ -133,10 +133,10 @@
protected open fun createUBRForUser(userId: Int) =
UserBroadcastDispatcher(context, userId, mainHandler, bgLooper)
- override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) {
- pw?.println("Broadcast dispatcher:")
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println("Broadcast dispatcher:")
for (index in 0 until receiversByUser.size()) {
- pw?.println(" User ${receiversByUser.keyAt(index)}")
+ pw.println(" User ${receiversByUser.keyAt(index)}")
receiversByUser.valueAt(index).dump(fd, pw, args)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
index 54f9950..ddda95a 100644
--- a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
@@ -149,11 +149,11 @@
}
}
- override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) {
- pw?.println(" Registered=${registered.get()}")
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println(" Registered=${registered.get()}")
actionsToReceivers.forEach { (action, list) ->
- pw?.println(" $action:")
- list.forEach { pw?.println(" ${it.receiver}") }
+ pw.println(" $action:")
+ list.forEach { pw.println(" ${it.receiver}") }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
index c3d2a1f..bb83fdc 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
@@ -22,6 +22,8 @@
import android.os.PowerManager;
import android.util.DisplayMetrics;
+import androidx.annotation.Nullable;
+
import com.android.internal.logging.MetricsLogger;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.ForegroundServiceController;
@@ -71,6 +73,7 @@
import com.android.systemui.statusbar.phone.DozeServiceHost;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
+import com.android.systemui.statusbar.phone.KeyguardLiftController;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.LockscreenWallpaper;
import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper;
@@ -226,6 +229,7 @@
NotifLog notifLog,
DozeParameters dozeParameters,
ScrimController scrimController,
+ @Nullable KeyguardLiftController keyguardLiftController,
Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
DozeServiceHost dozeServiceHost,
@@ -290,6 +294,7 @@
notifLog,
dozeParameters,
scrimController,
+ keyguardLiftController,
lockscreenWallpaperLazy,
biometricUnlockControllerLazy,
dozeServiceHost,
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 5f1455f..9e7f6c6 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -21,6 +21,7 @@
import android.content.pm.PackageManager;
import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.systemui.DumpController;
import com.android.systemui.assist.AssistModule;
import com.android.systemui.model.SysUiState;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -54,12 +55,13 @@
static KeyguardLiftController provideKeyguardLiftController(Context context,
StatusBarStateController statusBarStateController,
AsyncSensorManager asyncSensorManager,
- KeyguardUpdateMonitor keyguardUpdateMonitor) {
+ KeyguardUpdateMonitor keyguardUpdateMonitor,
+ DumpController dumpController) {
if (!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
return null;
}
return new KeyguardLiftController(statusBarStateController, asyncSensorManager,
- keyguardUpdateMonitor);
+ keyguardUpdateMonitor, dumpController);
}
@Singleton
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java
index b9fe827..6178a16 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java
@@ -37,12 +37,15 @@
import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.plugins.GlobalActions;
import com.android.systemui.plugins.GlobalActionsPanelPlugin;
+import com.android.systemui.plugins.PluginListener;
+import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.policy.ExtensionController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
-public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks {
+public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks,
+ PluginListener<GlobalActionsPanelPlugin> {
private static final float SHUTDOWN_SCRIM_ALPHA = 0.95f;
@@ -50,23 +53,33 @@
private final KeyguardStateController mKeyguardStateController;
private final DeviceProvisionedController mDeviceProvisionedController;
private final ExtensionController.Extension<GlobalActionsPanelPlugin> mPanelExtension;
+ private GlobalActionsPanelPlugin mPlugin;
private GlobalActionsDialog mGlobalActions;
private boolean mDisabled;
+ private final PluginManager mPluginManager;
+ private final String mPluginPackageName;
public GlobalActionsImpl(Context context) {
mContext = context;
mKeyguardStateController = Dependency.get(KeyguardStateController.class);
mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
+ mPluginManager = Dependency.get(PluginManager.class);
SysUiServiceProvider.getComponent(context, CommandQueue.class).addCallback(this);
mPanelExtension = Dependency.get(ExtensionController.class)
.newExtension(GlobalActionsPanelPlugin.class)
.withPlugin(GlobalActionsPanelPlugin.class)
.build();
+ mPluginPackageName = mContext.getString(
+ com.android.systemui.R.string.config_controlsPluginPackageName);
+ mPluginManager.addPluginListener(
+ GlobalActionsPanelPlugin.ACTION, this, GlobalActionsPanelPlugin.class, true);
}
@Override
public void destroy() {
SysUiServiceProvider.getComponent(mContext, CommandQueue.class).removeCallback(this);
+ mPluginManager.removePluginListener(this);
+ if (mPlugin != null) mPlugin.onDestroy();
if (mGlobalActions != null) {
mGlobalActions.destroy();
mGlobalActions = null;
@@ -81,7 +94,7 @@
}
mGlobalActions.showDialog(mKeyguardStateController.isShowing(),
mDeviceProvisionedController.isDeviceProvisioned(),
- mPanelExtension.get());
+ mPlugin != null ? mPlugin : mPanelExtension.get());
Dependency.get(KeyguardUpdateMonitor.class).requestFaceAuth();
}
@@ -144,4 +157,16 @@
mGlobalActions.dismissDialog();
}
}
+
+ @Override
+ public void onPluginConnected(GlobalActionsPanelPlugin plugin, Context pluginContext) {
+ if (pluginContext.getPackageName().equals(mPluginPackageName)) {
+ mPlugin = plugin;
+ }
+ }
+
+ @Override
+ public void onPluginDisconnected(GlobalActionsPanelPlugin plugin) {
+ mPlugin = null;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
index 22fb4c0..ca16e84 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
@@ -22,7 +22,11 @@
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
-import android.os.*
+import android.os.Handler
+import android.os.Looper
+import android.os.Message
+import android.os.UserHandle
+import android.os.UserManager
import android.provider.DeviceConfig
import com.android.internal.annotations.VisibleForTesting
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags
@@ -248,20 +252,20 @@
}
}
- override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) {
- pw?.println("PrivacyItemController state:")
- pw?.println(" Listening: $listening")
- pw?.println(" Current user ids: $currentUserIds")
- pw?.println(" Privacy Items:")
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println("PrivacyItemController state:")
+ pw.println(" Listening: $listening")
+ pw.println(" Current user ids: $currentUserIds")
+ pw.println(" Privacy Items:")
privacyList.forEach {
- pw?.print(" ")
- pw?.println(it.toString())
+ pw.print(" ")
+ pw.println(it.toString())
}
- pw?.println(" Callbacks:")
+ pw.println(" Callbacks:")
callbacks.forEach {
it.get()?.let {
- pw?.print(" ")
- pw?.println(it.toString())
+ pw.print(" ")
+ pw.println(it.toString())
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 1e8e28f..865d7e7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -35,6 +35,8 @@
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.Dependency;
+import com.android.systemui.DumpController;
+import com.android.systemui.Dumpable;
import com.android.systemui.dagger.qualifiers.MainResources;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.keyguard.ScreenLifecycle;
@@ -42,6 +44,7 @@
import com.android.systemui.statusbar.NotificationMediaManager;
import com.android.systemui.statusbar.policy.KeyguardStateController;
+import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -53,7 +56,7 @@
* Controller which coordinates all the biometric unlocking actions with the UI.
*/
@Singleton
-public class BiometricUnlockController extends KeyguardUpdateMonitorCallback {
+public class BiometricUnlockController extends KeyguardUpdateMonitorCallback implements Dumpable {
private static final String TAG = "BiometricUnlockCtrl";
private static final boolean DEBUG_BIO_WAKELOCK = KeyguardConstants.DEBUG_BIOMETRIC_WAKELOCK;
@@ -160,7 +163,7 @@
KeyguardUpdateMonitor keyguardUpdateMonitor,
@MainResources Resources resources,
KeyguardBypassController keyguardBypassController, DozeParameters dozeParameters,
- MetricsLogger metricsLogger) {
+ MetricsLogger metricsLogger, DumpController dumpController) {
mContext = context;
mPowerManager = context.getSystemService(PowerManager.class);
mUpdateMonitor = keyguardUpdateMonitor;
@@ -180,6 +183,7 @@
mKeyguardBypassController = keyguardBypassController;
mKeyguardBypassController.setUnlockController(this);
mMetricsLogger = metricsLogger;
+ dumpController.registerDumpable(this);
}
public void setStatusBarKeyguardViewManager(
@@ -543,7 +547,8 @@
return mHasScreenTurnedOnSinceAuthenticating;
}
- public void dump(PrintWriter pw) {
+ @Override
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println(" BiometricUnlockController:");
pw.print(" mMode="); pw.println(mMode);
pw.print(" mWakeLock="); pw.println(mWakeLock);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
index aca7f44..f7d52b5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
@@ -20,17 +20,20 @@
import android.content.pm.PackageManager
import android.hardware.biometrics.BiometricSourceType
import android.provider.Settings
+import com.android.systemui.DumpController
+import com.android.systemui.Dumpable
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.policy.KeyguardStateController
import com.android.systemui.tuner.TunerService
+import java.io.FileDescriptor
import java.io.PrintWriter
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
-class KeyguardBypassController {
+class KeyguardBypassController : Dumpable {
private val mKeyguardStateController: KeyguardStateController
private val statusBarStateController: StatusBarStateController
@@ -68,7 +71,8 @@
tunerService: TunerService,
statusBarStateController: StatusBarStateController,
lockscreenUserManager: NotificationLockscreenUserManager,
- keyguardStateController: KeyguardStateController
+ keyguardStateController: KeyguardStateController,
+ dumpController: DumpController
) {
this.mKeyguardStateController = keyguardStateController
this.statusBarStateController = statusBarStateController
@@ -78,6 +82,7 @@
return
}
+ dumpController.registerDumpable("KeyguardBypassController", this)
statusBarStateController.addCallback(object : StatusBarStateController.StateListener {
override fun onStateChanged(newState: Int) {
if (newState != StatusBarState.KEYGUARD) {
@@ -155,16 +160,16 @@
pendingUnlockType = null
}
- fun dump(pw: PrintWriter) {
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
pw.println("KeyguardBypassController:")
- pw.print(" pendingUnlockType: "); pw.println(pendingUnlockType)
- pw.print(" bypassEnabled: "); pw.println(bypassEnabled)
- pw.print(" canBypass: "); pw.println(canBypass())
- pw.print(" bouncerShowing: "); pw.println(bouncerShowing)
- pw.print(" isPulseExpanding: "); pw.println(isPulseExpanding)
- pw.print(" launchingAffordance: "); pw.println(launchingAffordance)
- pw.print(" qSExpanded: "); pw.println(qSExpanded)
- pw.print(" hasFaceFeature: "); pw.println(hasFaceFeature)
+ pw.println(" pendingUnlockType: $pendingUnlockType")
+ pw.println(" bypassEnabled: $bypassEnabled")
+ pw.println(" canBypass: ${canBypass()}")
+ pw.println(" bouncerShowing: $bouncerShowing")
+ pw.println(" isPulseExpanding: $isPulseExpanding")
+ pw.println(" launchingAffordance: $launchingAffordance")
+ pw.println(" qSExpanded: $qSExpanded")
+ pw.println(" hasFaceFeature: $hasFaceFeature")
}
companion object {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
index bf88704..2258c77 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
@@ -21,21 +21,27 @@
import android.hardware.TriggerEventListener
import com.android.keyguard.KeyguardUpdateMonitor
import com.android.keyguard.KeyguardUpdateMonitorCallback
+import com.android.systemui.DumpController
+import com.android.systemui.Dumpable
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.util.Assert
import com.android.systemui.util.sensors.AsyncSensorManager
+import java.io.FileDescriptor
+import java.io.PrintWriter
class KeyguardLiftController constructor(
private val statusBarStateController: StatusBarStateController,
private val asyncSensorManager: AsyncSensorManager,
- private val keyguardUpdateMonitor: KeyguardUpdateMonitor
-) : StatusBarStateController.StateListener, KeyguardUpdateMonitorCallback() {
+ private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
+ dumpController: DumpController
+) : StatusBarStateController.StateListener, Dumpable, KeyguardUpdateMonitorCallback() {
private val pickupSensor = asyncSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE)
private var isListening = false
private var bouncerVisible = false
init {
+ dumpController.registerDumpable(this)
statusBarStateController.addCallback(this)
keyguardUpdateMonitor.registerCallback(this)
updateListeningState()
@@ -64,6 +70,13 @@
updateListeningState()
}
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println("KeyguardLiftController:")
+ pw.println(" pickupSensor: $pickupSensor")
+ pw.println(" isListening: $isListening")
+ pw.println(" bouncerVisible: $bouncerVisible")
+ }
+
private fun updateListeningState() {
if (pickupSensor == null) {
return
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 35039a0..f21a9a2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -750,6 +750,11 @@
}
private void onFinished(Callback callback) {
+ if (mPendingFrameCallback != null) {
+ // No animations can finish while we're waiting on the blanking to finish
+ return;
+
+ }
if (isAnimating(mScrimBehind)
|| isAnimating(mScrimInFront)
|| isAnimating(mScrimForBubble)) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 001599f..fb2ae53 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -356,6 +356,8 @@
private final Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
protected LockscreenWallpaper mLockscreenWallpaper;
private final AutoHideController mAutoHideController;
+ @Nullable
+ private final KeyguardLiftController mKeyguardLiftController;
private int mNaturalBarHeight = -1;
@@ -689,6 +691,7 @@
NotifLog notifLog,
DozeParameters dozeParameters,
ScrimController scrimController,
+ @Nullable KeyguardLiftController keyguardLiftController,
Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
DozeServiceHost dozeServiceHost,
@@ -754,6 +757,7 @@
mPowerManager = powerManager;
mDozeParameters = dozeParameters;
mScrimController = scrimController;
+ mKeyguardLiftController = keyguardLiftController;
mLockscreenWallpaperLazy = lockscreenWallpaperLazy;
mDozeScrimController = dozeScrimController;
mBiometricUnlockControllerLazy = biometricUnlockControllerLazy;
@@ -2518,10 +2522,6 @@
mDozeLog.dump(pw);
- if (mBiometricUnlockController != null) {
- mBiometricUnlockController.dump(pw);
- }
-
if (mKeyguardIndicationController != null) {
mKeyguardIndicationController.dump(fd, pw, args);
}
@@ -2575,14 +2575,6 @@
mLightBarController.dump(fd, pw, args);
}
- if (mKeyguardBypassController != null) {
- mKeyguardBypassController.dump(pw);
- }
-
- if (mKeyguardUpdateMonitor != null) {
- mKeyguardUpdateMonitor.dump(fd, pw, args);
- }
-
mFalsingManager.dump(pw);
FalsingLog.dump(pw);
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 57b0987..7d28392 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -56,6 +56,7 @@
import com.android.internal.telephony.IccCardConstants;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
+import com.android.systemui.DumpController;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
@@ -87,6 +88,8 @@
DATA_ROAMING_DISABLE, null, null, null, null, false, null, "", true, TEST_GROUP_UUID,
TEST_CARRIER_ID, 0);
@Mock
+ private DumpController mDumpController;
+ @Mock
private KeyguardUpdateMonitor.StrongAuthTracker mStrongAuthTracker;
@Mock
private TrustManager mTrustManager;
@@ -515,7 +518,8 @@
AtomicBoolean mSimStateChanged = new AtomicBoolean(false);
protected TestableKeyguardUpdateMonitor(Context context) {
- super(context, TestableLooper.get(KeyguardUpdateMonitorTest.this).getLooper());
+ super(context, TestableLooper.get(KeyguardUpdateMonitorTest.this)
+ .getLooper(), mDumpController);
context.unregisterReceiver(mBroadcastReceiver);
context.unregisterReceiver(mBroadcastAllReceiver);
mStrongAuthTracker = KeyguardUpdateMonitorTest.this.mStrongAuthTracker;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java b/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
index 939df10..c020514 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
@@ -30,6 +30,7 @@
import org.junit.Assert;
import org.junit.Test;
+import java.io.FileDescriptor;
import java.io.PrintWriter;
@SmallTest
@@ -56,10 +57,12 @@
@Test
public void testDump() {
Dumpable d = mock(Dumpable.class);
+ String[] args = new String[0];
+ FileDescriptor fd = mock(FileDescriptor.class);
mDependency.injectTestDependency(DUMPABLE, d);
Dependency.get(DUMPABLE);
- mDependency.dump(null, mock(PrintWriter.class), null);
- verify(d).dump(eq(null), any(), eq(null));
+ mDependency.dump(fd, mock(PrintWriter.class), args);
+ verify(d).dump(eq(fd), any(), eq(args));
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
index 4a0b371..4451fa4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
@@ -38,6 +38,7 @@
import com.android.internal.logging.MetricsLogger;
import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.systemui.DumpController;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.statusbar.NotificationMediaManager;
@@ -55,6 +56,8 @@
public class BiometricsUnlockControllerTest extends SysuiTestCase {
@Mock
+ private DumpController mDumpController;
+ @Mock
private NotificationMediaManager mMediaManager;
@Mock
private PowerManager mPowerManager;
@@ -101,7 +104,7 @@
mBiometricUnlockController = new BiometricUnlockController(mContext, mDozeScrimController,
mKeyguardViewMediator, mScrimController, mStatusBar, mKeyguardStateController,
mHandler, mUpdateMonitor, res.getResources(), mKeyguardBypassController,
- mDozeParameters, mMetricsLogger);
+ mDozeParameters, mMetricsLogger, mDumpController);
mBiometricUnlockController.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index 66c01ca..46327a7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -229,6 +229,7 @@
@Mock private DozeServiceHost mDozeServiceHost;
@Mock private LinearLayout mLockIconContainer;
@Mock private ViewMediatorCallback mKeyguardVieMediatorCallback;
+ @Mock private KeyguardLiftController mKeyguardLiftController;
@Before
public void setup() throws Exception {
@@ -360,6 +361,7 @@
mNotifLog,
mDozeParameters,
mScrimController,
+ mKeyguardLiftController,
mLockscreenWallpaperLazy,
mBiometricUnlockControllerLazy,
mDozeServiceHost,
diff --git a/services/core/Android.bp b/services/core/Android.bp
index c865384..770de09 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -115,7 +115,6 @@
"android.hardware.contexthub-V1.0-java",
"android.hidl.manager-V1.2-java",
"dnsresolver_aidl_interface-V2-java",
- "netd_aidl_interface-java",
"netd_event_listener_interface-java",
],
}
diff --git a/core/java/android/os/BatteryStatsInternal.java b/services/core/java/android/os/BatteryStatsInternal.java
similarity index 100%
rename from core/java/android/os/BatteryStatsInternal.java
rename to services/core/java/android/os/BatteryStatsInternal.java
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index 1ce1137..e757b4e 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -4368,7 +4368,8 @@
}
final class UidObserver extends IUidObserver.Stub {
- @Override public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ @Override public void onUidStateChanged(int uid, int procState, long procStateSeq,
+ int capability) {
}
@Override public void onUidGone(int uid, boolean disabled) {
diff --git a/services/core/java/com/android/server/AppStateTracker.java b/services/core/java/com/android/server/AppStateTracker.java
index 5eff2c5..486cd5f 100644
--- a/services/core/java/com/android/server/AppStateTracker.java
+++ b/services/core/java/com/android/server/AppStateTracker.java
@@ -632,7 +632,7 @@
private final class UidObserver extends IUidObserver.Stub {
@Override
- public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
mHandler.onUidStateChanged(uid, procState);
}
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index e9cca66..39f039a 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -1478,6 +1478,16 @@
return true;
}
+ public void callRemovedLocked() {
+ if (mListener != null) {
+ try {
+ mListener.onRemoved();
+ } catch (RemoteException e) {
+ // doesn't matter
+ }
+ }
+ }
+
@Override
public void binderDied() {
if (D) Log.d(TAG, "Remote " + mListenerName + " died.");
@@ -3091,6 +3101,8 @@
// track expired records
if (r.mRealRequest.getNumUpdates() <= 0 || r.mRealRequest.getExpireAt() < now) {
+ // notify the client it can remove this listener
+ r.mReceiver.callRemovedLocked();
if (deadUpdateRecords == null) {
deadUpdateRecords = new ArrayList<>();
}
diff --git a/services/core/java/com/android/server/PinnerService.java b/services/core/java/com/android/server/PinnerService.java
index 49ef164..d5f7956 100644
--- a/services/core/java/com/android/server/PinnerService.java
+++ b/services/core/java/com/android/server/PinnerService.java
@@ -333,8 +333,8 @@
}
@Override
- public void onUidStateChanged(int uid, int procState, long procStateSeq)
- throws RemoteException {
+ public void onUidStateChanged(int uid, int procState, long procStateSeq,
+ int capability) throws RemoteException {
}
@Override
diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java
index d622fb4..b8acd7a 100644
--- a/services/core/java/com/android/server/VibratorService.java
+++ b/services/core/java/com/android/server/VibratorService.java
@@ -174,7 +174,8 @@
static native long vibratorGetCapabilities();
private final IUidObserver mUidObserver = new IUidObserver.Stub() {
- @Override public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ @Override public void onUidStateChanged(int uid, int procState, long procStateSeq,
+ int capability) {
mProcStatesCache.put(uid, procState);
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 5df4543..d6ecdea 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -139,6 +139,7 @@
import android.Manifest;
import android.Manifest.permission;
+import android.annotation.BroadcastBehavior;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
@@ -299,10 +300,8 @@
import android.view.WindowManager;
import android.view.autofill.AutofillManagerInternal;
-import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.app.DumpHeapActivity;
import com.android.internal.app.IAppOpsCallback;
import com.android.internal.app.IAppOpsService;
import com.android.internal.app.ProcessMap;
@@ -503,6 +502,41 @@
static final int PERSISTENT_MASK =
ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PERSISTENT;
+ // Intent sent when remote bugreport collection has been completed
+ private static final String INTENT_REMOTE_BUGREPORT_FINISHED =
+ "com.android.internal.intent.action.REMOTE_BUGREPORT_FINISHED";
+
+ /**
+ * Broadcast sent when heap dump collection has been completed.
+ */
+ @BroadcastBehavior(includeBackground = true, protectedBroadcast = true)
+ private static final String ACTION_HEAP_DUMP_FINISHED =
+ "com.android.internal.intent.action.HEAP_DUMP_FINISHED";
+
+ /**
+ * The process we are reporting
+ */
+ private static final String EXTRA_HEAP_DUMP_PROCESS_NAME =
+ "com.android.internal.extra.heap_dump.PROCESS_NAME";
+
+ /**
+ * The size limit the process reached.
+ */
+ private static final String EXTRA_HEAP_DUMP_SIZE_BYTES =
+ "com.android.internal.extra.heap_dump.SIZE_BYTES";
+
+ /**
+ * Whether the user initiated the dump or not.
+ */
+ private static final String EXTRA_HEAP_DUMP_IS_USER_INITIATED =
+ "com.android.internal.extra.heap_dump.IS_USER_INITIATED";
+
+ /**
+ * Optional name of package to directly launch.
+ */
+ private static final String EXTRA_HEAP_DUMP_REPORT_PACKAGE =
+ "com.android.internal.extra.heap_dump.REPORT_PACKAGE";
+
// If set, we will push process association information in to procstats.
static final boolean TRACK_PROCSTATS_ASSOCIATIONS = true;
@@ -1332,7 +1366,7 @@
int mProfileType = 0;
final ProcessMap<Pair<Long, String>> mMemWatchProcesses = new ProcessMap<>();
String mMemWatchDumpProcName;
- String mMemWatchDumpFile;
+ Uri mMemWatchDumpUri;
int mMemWatchDumpPid;
int mMemWatchDumpUid;
private boolean mMemWatchIsUserInitiated;
@@ -1344,10 +1378,12 @@
static final class ProcessChangeItem {
static final int CHANGE_ACTIVITIES = 1<<0;
static final int CHANGE_FOREGROUND_SERVICES = 1<<1;
+ static final int CHANGE_CAPABILITY = 1<<2;
int changes;
int uid;
int pid;
int processState;
+ int capability;
boolean foregroundActivities;
int foregroundServiceTypes;
}
@@ -1519,7 +1555,7 @@
static final int UPDATE_TIME_PREFERENCE_MSG = 41;
static final int NOTIFY_CLEARTEXT_NETWORK_MSG = 49;
static final int POST_DUMP_HEAP_NOTIFICATION_MSG = 50;
- static final int DELETE_DUMPHEAP_MSG = 51;
+ static final int ABORT_DUMPHEAP_MSG = 51;
static final int DISPATCH_UIDS_CHANGED_UI_MSG = 53;
static final int SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG = 56;
static final int CONTENT_PROVIDER_PUBLISH_TIMEOUT_MSG = 57;
@@ -1788,11 +1824,7 @@
final boolean isUserInitiated;
synchronized (ActivityManagerService.this) {
uid = mMemWatchDumpUid;
- if (uid == SYSTEM_UID) {
- procName = mContext.getString(R.string.android_system_label);
- } else {
- procName = mMemWatchDumpProcName;
- }
+ procName = mMemWatchDumpProcName;
Pair<Long, String> val = mMemWatchProcesses.get(procName, uid);
if (val == null) {
val = mMemWatchProcesses.get(procName, 0);
@@ -1805,6 +1837,11 @@
reportPackage = null;
}
isUserInitiated = mMemWatchIsUserInitiated;
+
+ mMemWatchDumpUri = null;
+ mMemWatchDumpProcName = null;
+ mMemWatchDumpPid = -1;
+ mMemWatchDumpUid = -1;
}
if (procName == null) {
return;
@@ -1813,65 +1850,29 @@
if (DEBUG_PSS) Slog.d(TAG_PSS,
"Showing dump heap notification from " + procName + "/" + uid);
- INotificationManager inm = NotificationManager.getService();
- if (inm == null) {
- return;
- }
+ Intent dumpFinishedIntent = new Intent(ACTION_HEAP_DUMP_FINISHED);
+ // Send this only to the Shell package.
+ dumpFinishedIntent.setPackage("com.android.shell");
+ dumpFinishedIntent.putExtra(Intent.EXTRA_UID, uid);
+ dumpFinishedIntent.putExtra(EXTRA_HEAP_DUMP_IS_USER_INITIATED, isUserInitiated);
+ dumpFinishedIntent.putExtra(EXTRA_HEAP_DUMP_SIZE_BYTES, memLimit);
+ dumpFinishedIntent.putExtra(EXTRA_HEAP_DUMP_REPORT_PACKAGE, reportPackage);
+ dumpFinishedIntent.putExtra(EXTRA_HEAP_DUMP_PROCESS_NAME, procName);
- final int titleId = isUserInitiated
- ? R.string.dump_heap_ready_notification : R.string.dump_heap_notification;
- String text = mContext.getString(titleId, procName);
-
- Intent deleteIntent = new Intent();
- deleteIntent.setAction(DumpHeapActivity.ACTION_DELETE_DUMPHEAP);
- Intent intent = new Intent();
- intent.setClassName("android", DumpHeapActivity.class.getName());
- intent.putExtra(DumpHeapActivity.KEY_PROCESS, procName);
- intent.putExtra(DumpHeapActivity.KEY_SIZE, memLimit);
- intent.putExtra(DumpHeapActivity.KEY_IS_USER_INITIATED, isUserInitiated);
- intent.putExtra(DumpHeapActivity.KEY_IS_SYSTEM_PROCESS, uid == SYSTEM_UID);
- if (reportPackage != null) {
- intent.putExtra(DumpHeapActivity.KEY_DIRECT_LAUNCH, reportPackage);
- }
- int userId = UserHandle.getUserId(uid);
- Notification notification =
- new Notification.Builder(mContext, SystemNotificationChannels.DEVELOPER)
- .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
- .setAutoCancel(true)
- .setTicker(text)
- .setColor(mContext.getColor(
- com.android.internal.R.color.system_notification_accent_color))
- .setContentTitle(text)
- .setContentText(
- mContext.getText(R.string.dump_heap_notification_detail))
- .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
- intent, PendingIntent.FLAG_CANCEL_CURRENT, null,
- new UserHandle(userId)))
- .setDeleteIntent(PendingIntent.getBroadcastAsUser(mContext, 0,
- deleteIntent, 0, UserHandle.SYSTEM))
- .build();
-
- try {
- inm.enqueueNotificationWithTag("android", "android", null,
- SystemMessage.NOTE_DUMP_HEAP_NOTIFICATION,
- notification, userId);
- } catch (RuntimeException e) {
- Slog.w(ActivityManagerService.TAG,
- "Error showing notification for dump heap", e);
- } catch (RemoteException e) {
- }
+ mContext.sendBroadcastAsUser(dumpFinishedIntent,
+ UserHandle.getUserHandleForUid(uid));
} break;
- case DELETE_DUMPHEAP_MSG: {
- revokeUriPermission(ActivityThread.currentActivityThread().getApplicationThread(),
- null, DumpHeapActivity.JAVA_URI,
- Intent.FLAG_GRANT_READ_URI_PERMISSION
- | Intent.FLAG_GRANT_WRITE_URI_PERMISSION,
- UserHandle.myUserId());
- synchronized (ActivityManagerService.this) {
- mMemWatchDumpFile = null;
- mMemWatchDumpProcName = null;
- mMemWatchDumpPid = -1;
- mMemWatchDumpUid = -1;
+ case ABORT_DUMPHEAP_MSG: {
+ String procName = (String) msg.obj;
+ if (procName != null) {
+ synchronized (ActivityManagerService.this) {
+ if (procName.equals(mMemWatchDumpProcName)) {
+ mMemWatchDumpProcName = null;
+ mMemWatchDumpUri = null;
+ mMemWatchDumpPid = -1;
+ mMemWatchDumpUid = -1;
+ }
+ }
}
} break;
case SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG: {
@@ -3337,6 +3338,7 @@
validateUid.idle = false;
}
validateUid.setCurProcState(validateUid.setProcState = item.processState);
+ validateUid.curCapability = validateUid.setCapability = item.capability;
validateUid.lastDispatchedProcStateSeq = item.procStateSeq;
}
}
@@ -3402,7 +3404,7 @@
if ((reg.which & ActivityManager.UID_OBSERVER_PROCSTATE) != 0) {
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
"UID CHANGED uid=" + item.uid
- + ": " + item.processState);
+ + ": " + item.processState + ": " + item.capability);
boolean doReport = true;
if (reg.cutpoint >= ActivityManager.MIN_PROCESS_STATE) {
final int lastState = reg.lastProcStates.get(item.uid,
@@ -3420,7 +3422,7 @@
reg.lastProcStates.put(item.uid, item.processState);
}
observer.onUidStateChanged(item.uid, item.processState,
- item.procStateSeq);
+ item.procStateSeq, item.capability);
}
}
}
@@ -5245,17 +5247,6 @@
}
}, pkgFilter);
- IntentFilter dumpheapFilter = new IntentFilter();
- dumpheapFilter.addAction(DumpHeapActivity.ACTION_DELETE_DUMPHEAP);
- mContext.registerReceiver(new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- final long delay = intent.getBooleanExtra(
- DumpHeapActivity.EXTRA_DELAY_DELETE, false) ? 5 * 60 * 1000 : 0;
- mHandler.sendEmptyMessageDelayed(DELETE_DUMPHEAP_MSG, delay);
- }
- }, dumpheapFilter);
-
// Inform checkpointing systems of success
try {
// This line is needed to CTS test for the correct exception handling
@@ -10953,7 +10944,7 @@
}
}
pw.print(" mMemWatchDumpProcName="); pw.println(mMemWatchDumpProcName);
- pw.print(" mMemWatchDumpFile="); pw.println(mMemWatchDumpFile);
+ pw.print(" mMemWatchDumpUri="); pw.println(mMemWatchDumpUri);
pw.print(" mMemWatchDumpPid="); pw.println(mMemWatchDumpPid);
pw.print(" mMemWatchDumpUid="); pw.println(mMemWatchDumpUid);
pw.print(" mMemWatchIsUserInitiated="); pw.println(mMemWatchIsUserInitiated);
@@ -11250,10 +11241,14 @@
}
final long dtoken = proto.start(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.DUMP);
- proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.PROC_NAME, mMemWatchDumpProcName);
- proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.FILE, mMemWatchDumpFile);
- proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.PID, mMemWatchDumpPid);
- proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.UID, mMemWatchDumpUid);
+ proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.PROC_NAME,
+ mMemWatchDumpProcName);
+ proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.URI,
+ mMemWatchDumpUri.toString());
+ proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.PID,
+ mMemWatchDumpPid);
+ proto.write(ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.UID,
+ mMemWatchDumpUid);
proto.write(
ActivityManagerServiceDumpProcessesProto.MemWatchProcess.Dump.IS_USER_INITIATED,
mMemWatchIsUserInitiated);
@@ -16366,9 +16361,10 @@
}
}
- void noteUidProcessState(final int uid, final int state) {
+ void noteUidProcessState(final int uid, final int state,
+ final @ActivityManager.ProcessCapability int capability) {
mBatteryStatsService.noteUidProcessState(uid, state);
- mAppOpsService.updateUidProcState(uid, state);
+ mAppOpsService.updateUidProcState(uid, state, capability);
if (mTrackingAssociations) {
for (int i1=0, N1=mAssociations.size(); i1<N1; i1++) {
ArrayMap<ComponentName, SparseArray<ArrayMap<String, Association>>> targetComponents
@@ -16395,56 +16391,44 @@
}
}
- private static final class RecordPssRunnable implements Runnable {
- private final ActivityManagerService mService;
- private final ProcessRecord mProc;
- private final File mHeapdumpFile;
+ /** @hide */
+ public static Uri makeHeapDumpUri(String procName) {
+ return Uri.parse("content://com.android.shell.heapdump/" + procName + "_javaheap.bin");
+ }
- RecordPssRunnable(ActivityManagerService service, ProcessRecord proc, File heapdumpFile) {
- this.mService = service;
- this.mProc = proc;
- this.mHeapdumpFile = heapdumpFile;
+ private final class RecordPssRunnable implements Runnable {
+ private final ProcessRecord mProc;
+ private final Uri mDumpUri;
+ private final ContentResolver mContentResolver;
+
+ RecordPssRunnable(ProcessRecord proc, Uri dumpUri, ContentResolver contentResolver) {
+ mProc = proc;
+ mDumpUri = dumpUri;
+ mContentResolver = contentResolver;
}
@Override
public void run() {
- mService.revokeUriPermission(ActivityThread.currentActivityThread()
- .getApplicationThread(),
- null, DumpHeapActivity.JAVA_URI,
- Intent.FLAG_GRANT_READ_URI_PERMISSION
- | Intent.FLAG_GRANT_WRITE_URI_PERMISSION,
- UserHandle.myUserId());
- ParcelFileDescriptor fd = null;
- try {
- mHeapdumpFile.delete();
- fd = ParcelFileDescriptor.open(mHeapdumpFile,
- ParcelFileDescriptor.MODE_CREATE
- | ParcelFileDescriptor.MODE_TRUNCATE
- | ParcelFileDescriptor.MODE_WRITE_ONLY
- | ParcelFileDescriptor.MODE_APPEND);
+ try (ParcelFileDescriptor fd = mContentResolver.openFileDescriptor(mDumpUri, "rw")) {
IApplicationThread thread = mProc.thread;
if (thread != null) {
try {
if (DEBUG_PSS) {
Slog.d(TAG_PSS, "Requesting dump heap from "
- + mProc + " to " + mHeapdumpFile);
+ + mProc + " to " + mDumpUri.getPath());
}
thread.dumpHeap(/* managed= */ true,
/* mallocInfo= */ false, /* runGc= */ false,
- mHeapdumpFile.toString(), fd,
+ mDumpUri.getPath(), fd,
/* finishCallback= */ null);
} catch (RemoteException e) {
}
}
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } finally {
- if (fd != null) {
- try {
- fd.close();
- } catch (IOException e) {
- }
- }
+ } catch (IOException e) {
+ Slog.e(TAG, "Failed to dump heap", e);
+ // Need to clear the heap dump variables, otherwise no further heap dumps will be
+ // attempted.
+ abortHeapDump(mProc.processName);
}
}
}
@@ -16513,13 +16497,20 @@
}
private void startHeapDumpLocked(ProcessRecord proc, boolean isUserInitiated) {
- final File heapdumpFile = DumpHeapProvider.getJavaFile();
mMemWatchDumpProcName = proc.processName;
- mMemWatchDumpFile = heapdumpFile.toString();
+ mMemWatchDumpUri = makeHeapDumpUri(proc.processName);
mMemWatchDumpPid = proc.pid;
mMemWatchDumpUid = proc.uid;
mMemWatchIsUserInitiated = isUserInitiated;
- BackgroundThread.getHandler().post(new RecordPssRunnable(this, proc, heapdumpFile));
+ Context ctx;
+ try {
+ ctx = mContext.createPackageContextAsUser("android", 0,
+ UserHandle.getUserHandleForUid(mMemWatchDumpUid));
+ } catch (NameNotFoundException e) {
+ throw new RuntimeException("android package not found.");
+ }
+ BackgroundThread.getHandler().post(
+ new RecordPssRunnable(proc, mMemWatchDumpUri, ctx.getContentResolver()));
}
/**
@@ -16891,6 +16882,7 @@
}
pendingChange.change = change;
pendingChange.processState = uidRec != null ? uidRec.setProcState : PROCESS_STATE_NONEXISTENT;
+ pendingChange.capability = uidRec != null ? uidRec.setCapability : 0;
pendingChange.ephemeral = uidRec != null ? uidRec.ephemeral : isEphemeralLocked(uid);
pendingChange.procStateSeq = uidRec != null ? uidRec.curProcStateSeq : 0;
if (uidRec != null) {
@@ -17715,9 +17707,9 @@
+ " does not match last pid " + mMemWatchDumpPid);
return;
}
- if (mMemWatchDumpFile == null || !mMemWatchDumpFile.equals(path)) {
+ if (mMemWatchDumpUri == null || !mMemWatchDumpUri.getPath().equals(path)) {
Slog.w(TAG, "dumpHeapFinished: Calling path " + path
- + " does not match last path " + mMemWatchDumpFile);
+ + " does not match last path " + mMemWatchDumpUri);
return;
}
if (DEBUG_PSS) Slog.d(TAG_PSS, "Dump heap finished for " + path);
@@ -17728,6 +17720,13 @@
}
}
+ /** Clear the currently executing heap dump variables so a new heap dump can be started. */
+ private void abortHeapDump(String procName) {
+ Message msg = mHandler.obtainMessage(ABORT_DUMPHEAP_MSG);
+ msg.obj = procName;
+ mHandler.sendMessage(msg);
+ }
+
/** In this method we try to acquire our lock to make sure that we have not deadlocked */
public void monitor() {
synchronized (this) { }
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index 8be2438..59acdcf 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -1470,7 +1470,8 @@
}
@Override
- public void onUidStateChanged(int uid, int procState, long procStateSeq) throws RemoteException {
+ public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability)
+ throws RemoteException {
synchronized (this) {
final StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites();
try {
@@ -1478,7 +1479,9 @@
mPw.print(" procstate ");
mPw.print(ProcessList.makeProcStateString(procState));
mPw.print(" seq ");
- mPw.println(procStateSeq);
+ mPw.print(procStateSeq);
+ mPw.print(" capability ");
+ mPw.println(capability);
mPw.flush();
} finally {
StrictMode.setThreadPolicy(oldPolicy);
diff --git a/services/core/java/com/android/server/am/DumpHeapProvider.java b/services/core/java/com/android/server/am/DumpHeapProvider.java
deleted file mode 100644
index a8b639e..0000000
--- a/services/core/java/com/android/server/am/DumpHeapProvider.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-
-package com.android.server.am;
-
-import android.content.ContentProvider;
-import android.content.ContentValues;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Environment;
-import android.os.ParcelFileDescriptor;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-
-public class DumpHeapProvider extends ContentProvider {
- static final Object sLock = new Object();
- static File sHeapDumpJavaFile;
-
- static public File getJavaFile() {
- synchronized (sLock) {
- return sHeapDumpJavaFile;
- }
- }
-
- @Override
- public boolean onCreate() {
- synchronized (sLock) {
- File dataDir = Environment.getDataDirectory();
- File systemDir = new File(dataDir, "system");
- File heapdumpDir = new File(systemDir, "heapdump");
- heapdumpDir.mkdir();
- sHeapDumpJavaFile = new File(heapdumpDir, "javaheap.bin");
- }
- return true;
- }
-
- @Override
- public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
- return null;
- }
-
- @Override
- public String getType(Uri uri) {
- return "application/octet-stream";
- }
-
- @Override
- public Uri insert(Uri uri, ContentValues values) {
- return null;
- }
-
- @Override
- public int delete(Uri uri, String selection, String[] selectionArgs) {
- return 0;
- }
-
- @Override
- public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
- return 0;
- }
-
- @Override
- public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
- synchronized (sLock) {
- String path = uri.getEncodedPath();
- final String tag = Uri.decode(path);
- if (tag.equals("/java")) {
- return ParcelFileDescriptor.open(sHeapDumpJavaFile,
- ParcelFileDescriptor.MODE_READ_ONLY);
- } else {
- throw new FileNotFoundException("Invalid path for " + uri);
- }
- }
- }
-}
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index 78a9efc..f610d7d 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -16,6 +16,9 @@
package com.android.server.am;
+import static android.app.ActivityManager.PROCESS_CAPABILITY_ALL;
+import static android.app.ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION;
+import static android.app.ActivityManager.PROCESS_CAPABILITY_NONE;
import static android.app.ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
import static android.app.ActivityManager.PROCESS_STATE_BOUND_TOP;
import static android.app.ActivityManager.PROCESS_STATE_CACHED_ACTIVITY;
@@ -23,7 +26,6 @@
import static android.app.ActivityManager.PROCESS_STATE_CACHED_EMPTY;
import static android.app.ActivityManager.PROCESS_STATE_CACHED_RECENT;
import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
-import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION;
import static android.app.ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND;
import static android.app.ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
import static android.app.ActivityManager.PROCESS_STATE_LAST_ACTIVITY;
@@ -65,6 +67,7 @@
import android.app.usage.UsageEvents;
import android.content.Context;
import android.content.pm.ServiceInfo;
+import android.os.Build;
import android.os.Debug;
import android.os.Handler;
import android.os.IBinder;
@@ -471,6 +474,7 @@
app.containsCycle = false;
app.setCurRawProcState(PROCESS_STATE_CACHED_EMPTY);
app.setCurRawAdj(ProcessList.UNKNOWN_ADJ);
+ app.setCapability = PROCESS_CAPABILITY_NONE;
app.resetCachedInfo();
}
for (int i = numProc - 1; i >= 0; i--) {
@@ -788,6 +792,7 @@
if (app.hasForegroundServices()) {
uidRec.foregroundServices = true;
}
+ uidRec.curCapability |= app.curCapability;
}
}
@@ -804,10 +809,13 @@
int uidChange = UidRecord.CHANGE_PROCSTATE;
if (uidRec.getCurProcState() != PROCESS_STATE_NONEXISTENT
&& (uidRec.setProcState != uidRec.getCurProcState()
+ || uidRec.setCapability != uidRec.curCapability
|| uidRec.setWhitelist != uidRec.curWhitelist)) {
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS, "Changes in " + uidRec
+ ": proc state from " + uidRec.setProcState + " to "
- + uidRec.getCurProcState() + ", whitelist from " + uidRec.setWhitelist
+ + uidRec.getCurProcState() + ", capability from "
+ + uidRec.setCapability + " to " + uidRec.curCapability
+ + ", whitelist from " + uidRec.setWhitelist
+ " to " + uidRec.curWhitelist);
if (ActivityManager.isProcStateBackground(uidRec.getCurProcState())
&& !uidRec.curWhitelist) {
@@ -845,11 +853,13 @@
uidChange |= isCached ? UidRecord.CHANGE_CACHED : UidRecord.CHANGE_UNCACHED;
}
uidRec.setProcState = uidRec.getCurProcState();
+ uidRec.setCapability = uidRec.curCapability;
uidRec.setWhitelist = uidRec.curWhitelist;
uidRec.setIdle = uidRec.idle;
mService.mAtmInternal.onUidProcStateChanged(uidRec.uid, uidRec.setProcState);
mService.enqueueUidChangeLocked(uidRec, -1, uidChange);
- mService.noteUidProcessState(uidRec.uid, uidRec.getCurProcState());
+ mService.noteUidProcessState(uidRec.uid, uidRec.getCurProcState(),
+ uidRec.curCapability);
if (uidRec.foregroundServices) {
mService.mServices.foregroundServiceProcStateChangedLocked(uidRec);
}
@@ -1016,6 +1026,7 @@
app.curAdj = ProcessList.CACHED_APP_MAX_ADJ;
app.setCurRawAdj(ProcessList.CACHED_APP_MAX_ADJ);
app.completedAdjSeq = app.adjSeq;
+ app.curCapability = PROCESS_CAPABILITY_NONE;
return false;
}
@@ -1030,6 +1041,7 @@
int prevAppAdj = app.curAdj;
int prevProcState = app.getCurProcState();
+ int prevCapability = app.curCapability;
if (app.maxAdj <= ProcessList.FOREGROUND_APP_ADJ) {
// The max adjustment doesn't allow this app to be anything
@@ -1087,6 +1099,7 @@
int schedGroup;
int procState;
int cachedAdjSeq;
+ int capability = 0;
boolean foregroundActivities = false;
if (PROCESS_STATE_CUR_TOP == PROCESS_STATE_TOP && app == topApp) {
@@ -1185,19 +1198,17 @@
}
}
+ if (app.hasLocationForegroundServices()) {
+ capability |= PROCESS_CAPABILITY_FOREGROUND_LOCATION;
+ }
+
if (adj > ProcessList.PERCEPTIBLE_APP_ADJ
- || procState > PROCESS_STATE_FOREGROUND_SERVICE_LOCATION) {
+ || procState > PROCESS_STATE_FOREGROUND_SERVICE) {
if (app.hasForegroundServices()) {
// The user is aware of this app, so make it visible.
adj = ProcessList.PERCEPTIBLE_APP_ADJ;
- if (app.hasLocationForegroundServices()) {
- procState = PROCESS_STATE_FOREGROUND_SERVICE_LOCATION;
- app.adjType = "fg-service-location";
-
- } else {
- procState = PROCESS_STATE_FOREGROUND_SERVICE;
- app.adjType = "fg-service";
- }
+ procState = PROCESS_STATE_FOREGROUND_SERVICE;
+ app.adjType = "fg-service";
app.cached = false;
schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
@@ -1437,6 +1448,10 @@
continue;
}
+ if (cr.hasFlag(Context.BIND_INCLUDE_CAPABILITIES)) {
+ capability |= client.curCapability;
+ }
+
int clientAdj = client.getCurRawAdj();
int clientProcState = client.getCurRawProcState();
@@ -1549,25 +1564,31 @@
// processes). These should not bring the current process
// into the top state, since they are not on top. Instead
// give them the best bound state after that.
- final int bestState = cr.hasFlag(Context.BIND_INCLUDE_CAPABILITIES)
- ? PROCESS_STATE_FOREGROUND_SERVICE_LOCATION
- : PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
- if ((cr.flags & Context.BIND_FOREGROUND_SERVICE) != 0) {
- clientProcState = bestState;
+ if (cr.hasFlag(Context.BIND_FOREGROUND_SERVICE)) {
+ clientProcState = PROCESS_STATE_BOUND_FOREGROUND_SERVICE; ;
} else if (mService.mWakefulness
== PowerManagerInternal.WAKEFULNESS_AWAKE
&& (cr.flags & Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE)
!= 0) {
- clientProcState = bestState;
+ clientProcState = PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
} else {
clientProcState =
PROCESS_STATE_IMPORTANT_FOREGROUND;
}
} else if (clientProcState == PROCESS_STATE_TOP) {
- if (cr.notHasFlag(Context.BIND_INCLUDE_CAPABILITIES)) {
- // Go at most to BOUND_TOP, unless requested to elevate
- // to client's state.
- clientProcState = PROCESS_STATE_BOUND_TOP;
+ // Go at most to BOUND_TOP, unless requested to elevate
+ // to client's state.
+ clientProcState = PROCESS_STATE_BOUND_TOP;
+ if (client.info.targetSdkVersion >= Build.VERSION_CODES.R) {
+ if (cr.hasFlag(Context.BIND_INCLUDE_CAPABILITIES)) {
+ // TOP process passes all capabilities to the service.
+ capability = PROCESS_CAPABILITY_ALL;
+ } else {
+ // TOP process passes no capability to the service.
+ }
+ } else {
+ // TOP process passes all capabilities to the service.
+ capability = PROCESS_CAPABILITY_ALL;
}
} else if (clientProcState
<= PROCESS_STATE_FOREGROUND_SERVICE) {
@@ -1852,12 +1873,18 @@
}
}
+ // TOP process has all capabilities.
+ if (procState <= PROCESS_STATE_TOP) {
+ capability = PROCESS_CAPABILITY_ALL;
+ }
+
// Do final modification to adj. Everything we do between here and applying
// the final setAdj must be done in this function, because we will also use
// it when computing the final cached adj later. Note that we don't need to
// worry about this for max adj above, since max adj will always be used to
// keep it out of the cached vaues.
app.curAdj = app.modifyRawOomAdj(adj);
+ app.curCapability = capability;
app.setCurrentSchedulingGroup(schedGroup);
app.setCurProcState(procState);
app.setCurRawProcState(procState);
@@ -1865,7 +1892,8 @@
app.completedAdjSeq = mAdjSeq;
// if curAdj or curProcState improved, then this process was promoted
- return app.curAdj < prevAppAdj || app.getCurProcState() < prevProcState;
+ return app.curAdj < prevAppAdj || app.getCurProcState() < prevProcState
+ || app.curCapability != prevCapability ;
}
/**
@@ -2175,6 +2203,11 @@
maybeUpdateUsageStatsLocked(app, nowElapsed);
}
+ if (app.curCapability != app.setCapability) {
+ changes |= ActivityManagerService.ProcessChangeItem.CHANGE_CAPABILITY;
+ app.setCapability = app.curCapability;
+ }
+
if (changes != 0) {
if (DEBUG_PROCESS_OBSERVERS) Slog.i(TAG_PROCESS_OBSERVERS,
"Changes in " + app + ": " + changes);
@@ -2182,12 +2215,13 @@
mService.enqueueProcessChangeItemLocked(app.pid, app.info.uid);
item.changes = changes;
item.foregroundActivities = app.repForegroundActivities;
+ item.capability = app.setCapability;
if (DEBUG_PROCESS_OBSERVERS) Slog.i(TAG_PROCESS_OBSERVERS,
"Item " + Integer.toHexString(System.identityHashCode(item))
+ " " + app.toShortString() + ": changes=" + item.changes
+ " foreground=" + item.foregroundActivities
+ " type=" + app.adjType + " source=" + app.adjSource
- + " target=" + app.adjTarget);
+ + " target=" + app.adjTarget + " capability=" + item.capability);
}
return success;
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index 8163a6d..f2f1e02 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -810,9 +810,6 @@
case ActivityManager.PROCESS_STATE_TOP:
procState = "TOP ";
break;
- case ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION:
- procState = "FGSL";
- break;
case ActivityManager.PROCESS_STATE_BOUND_TOP:
procState = "BTOP";
break;
@@ -882,8 +879,6 @@
return AppProtoEnums.PROCESS_STATE_PERSISTENT_UI;
case ActivityManager.PROCESS_STATE_TOP:
return AppProtoEnums.PROCESS_STATE_TOP;
- case ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION:
- return AppProtoEnums.PROCESS_STATE_FOREGROUND_SERVICE;
case ActivityManager.PROCESS_STATE_BOUND_TOP:
return AppProtoEnums.PROCESS_STATE_BOUND_TOP;
case ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE:
@@ -1014,7 +1009,6 @@
PROC_MEM_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT
PROC_MEM_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
PROC_MEM_TOP, // ActivityManager.PROCESS_STATE_TOP
- PROC_MEM_IMPORTANT, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION
PROC_MEM_IMPORTANT, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
PROC_MEM_TOP, // ActivityManager.PROCESS_STATE_BOUND_TOP
PROC_MEM_IMPORTANT, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
@@ -2303,7 +2297,8 @@
uidRec.updateHasInternetPermission();
mActiveUids.put(proc.uid, uidRec);
EventLogTags.writeAmUidRunning(uidRec.uid);
- mService.noteUidProcessState(uidRec.uid, uidRec.getCurProcState());
+ mService.noteUidProcessState(uidRec.uid, uidRec.getCurProcState(),
+ uidRec.curCapability);
}
proc.uidRecord = uidRec;
@@ -2405,7 +2400,8 @@
mService.enqueueUidChangeLocked(old.uidRecord, -1, UidRecord.CHANGE_GONE);
EventLogTags.writeAmUidStopped(uid);
mActiveUids.remove(uid);
- mService.noteUidProcessState(uid, ActivityManager.PROCESS_STATE_NONEXISTENT);
+ mService.noteUidProcessState(uid, ActivityManager.PROCESS_STATE_NONEXISTENT,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
}
old.uidRecord = null;
}
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index bf43f3b..1e0693f 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -151,6 +151,9 @@
int curAdj; // Current OOM adjustment for this process
int setAdj; // Last set OOM adjustment for this process
int verifiedAdj; // The last adjustment that was verified as actually being set
+ int curCapability; // Current capability flags of this process. For example,
+ // PROCESS_CAPABILITY_FOREGROUND_LOCATION is one capability.
+ int setCapability; // Last set capability flags.
long lastCompactTime; // The last time that this process was compacted
int reqCompactAction; // The most recent compaction action requested for this app.
int lastCompactAction; // The most recent compaction action performed for this app.
@@ -425,6 +428,8 @@
pw.print(" mRepProcState="); pw.print(mRepProcState);
pw.print(" pssProcState="); pw.print(pssProcState);
pw.print(" setProcState="); pw.print(setProcState);
+ pw.print(" curCapability="); pw.print(curCapability);
+ pw.print(" setCapability="); pw.print(setCapability);
pw.print(" lastStateTime=");
TimeUtils.formatDuration(lastStateTime, nowUptime, pw);
pw.println();
@@ -1097,6 +1102,10 @@
&& (mFgServiceTypes & ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION) != 0;
}
+ boolean hasLocationCapability() {
+ return (setCapability & ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION) != 0;
+ }
+
int getForegroundServiceTypes() {
return mHasForegroundServices ? mFgServiceTypes : 0;
}
diff --git a/services/core/java/com/android/server/am/UidRecord.java b/services/core/java/com/android/server/am/UidRecord.java
index 22a7de7..e6cf287 100644
--- a/services/core/java/com/android/server/am/UidRecord.java
+++ b/services/core/java/com/android/server/am/UidRecord.java
@@ -34,6 +34,8 @@
final int uid;
private int mCurProcState;
int setProcState = ActivityManager.PROCESS_STATE_NONEXISTENT;
+ int curCapability;
+ int setCapability;
long lastBackgroundTime;
boolean ephemeral;
boolean foregroundServices;
@@ -108,6 +110,7 @@
int uid;
int change;
int processState;
+ int capability;
boolean ephemeral;
long procStateSeq;
}
@@ -132,6 +135,8 @@
public void reset() {
setCurProcState(ActivityManager.PROCESS_STATE_CACHED_EMPTY);
foregroundServices = false;
+ curCapability = 0;
+
}
public void updateHasInternetPermission() {
diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java
index eecfdbd..2e36a43 100644
--- a/services/core/java/com/android/server/appop/AppOpsService.java
+++ b/services/core/java/com/android/server/appop/AppOpsService.java
@@ -16,6 +16,7 @@
package com.android.server.appop;
+import static android.app.ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION;
import static android.app.AppOpsManager.MAX_PRIORITY_UID_STATE;
import static android.app.AppOpsManager.MIN_PRIORITY_UID_STATE;
import static android.app.AppOpsManager.OP_CAMERA;
@@ -27,7 +28,6 @@
import static android.app.AppOpsManager.UID_STATE_CACHED;
import static android.app.AppOpsManager.UID_STATE_FOREGROUND;
import static android.app.AppOpsManager.UID_STATE_FOREGROUND_SERVICE;
-import static android.app.AppOpsManager.UID_STATE_FOREGROUND_SERVICE_LOCATION;
import static android.app.AppOpsManager.UID_STATE_MAX_LAST_NON_RESTRICTED;
import static android.app.AppOpsManager.UID_STATE_PERSISTENT;
import static android.app.AppOpsManager.UID_STATE_TOP;
@@ -119,12 +119,6 @@
import com.android.server.LocalServices;
import com.android.server.LockGuard;
-import libcore.util.EmptyArray;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlSerializer;
-
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
@@ -144,6 +138,12 @@
import java.util.Map;
import java.util.Objects;
+import libcore.util.EmptyArray;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
+
public class AppOpsService extends IAppOpsService.Stub {
static final String TAG = "AppOps";
static final boolean DEBUG = false;
@@ -164,12 +164,10 @@
UID_STATE_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT
UID_STATE_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
UID_STATE_TOP, // ActivityManager.PROCESS_STATE_TOP
- UID_STATE_FOREGROUND_SERVICE_LOCATION,
- // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION
UID_STATE_FOREGROUND, // ActivityManager.PROCESS_STATE_BOUND_TOP
UID_STATE_FOREGROUND_SERVICE, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
UID_STATE_FOREGROUND, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- UID_STATE_FOREGROUND, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
+ UID_STATE_BACKGROUND, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
UID_STATE_BACKGROUND, // ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
UID_STATE_BACKGROUND, // ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND
UID_STATE_BACKGROUND, // ActivityManager.PROCESS_STATE_BACKUP
@@ -364,7 +362,8 @@
public int state = UID_STATE_CACHED;
public int pendingState = UID_STATE_CACHED;
public long pendingStateCommitTime;
-
+ public int capability;
+ public int pendingCapability;
// For all features combined
public int startNesting;
@@ -393,8 +392,25 @@
int evalMode(int op, int mode) {
if (mode == AppOpsManager.MODE_FOREGROUND) {
- return state <= AppOpsManager.resolveFirstUnrestrictedUidState(op)
- ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_IGNORED;
+ if (state <= UID_STATE_TOP) {
+ // process is in foreground.
+ return AppOpsManager.MODE_ALLOWED;
+ } else if (state <= AppOpsManager.resolveFirstUnrestrictedUidState(op)) {
+ // process is in foreground, check its capability.
+ switch (op) {
+ case AppOpsManager.OP_FINE_LOCATION:
+ case AppOpsManager.OP_COARSE_LOCATION:
+ case AppOpsManager.OP_MONITOR_LOCATION:
+ case AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION:
+ return ((capability & PROCESS_CAPABILITY_FOREGROUND_LOCATION) != 0)
+ ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_IGNORED;
+ default:
+ return AppOpsManager.MODE_ALLOWED;
+ }
+ } else {
+ // process is not in foreground.
+ return AppOpsManager.MODE_IGNORED;
+ }
}
return mode;
}
@@ -1062,13 +1078,16 @@
}
}
- public void updateUidProcState(int uid, int procState) {
+ public void updateUidProcState(int uid, int procState,
+ @ActivityManager.ProcessCapability int capability) {
synchronized (this) {
final UidState uidState = getUidStateLocked(uid, true);
- int newState = PROCESS_STATE_TO_UID_STATE[procState];
- if (uidState != null && uidState.pendingState != newState) {
+ final int newState = PROCESS_STATE_TO_UID_STATE[procState];
+ if (uidState != null && (uidState.pendingState != newState
+ || uidState.pendingCapability != capability)) {
final int oldPendingState = uidState.pendingState;
uidState.pendingState = newState;
+ uidState.pendingCapability = capability;
if (newState < uidState.state
|| (newState <= UID_STATE_MAX_LAST_NON_RESTRICTED
&& uidState.state > UID_STATE_MAX_LAST_NON_RESTRICTED)) {
@@ -1076,6 +1095,9 @@
// foreground and the old state is in the background, then always do it
// immediately.
commitUidPendingStateLocked(uidState);
+ } else if (newState == uidState.state && capability != uidState.capability) {
+ // No change on process state, but process capability has changed.
+ commitUidPendingStateLocked(uidState);
} else if (uidState.pendingStateCommitTime == 0) {
// We are moving to a less important state for the first time,
// delay the application for a bit.
@@ -2857,6 +2879,7 @@
}
}
uidState.state = uidState.pendingState;
+ uidState.capability = uidState.pendingCapability;
uidState.pendingStateCommitTime = 0;
}
@@ -4494,6 +4517,12 @@
pw.print(" pendingState=");
pw.println(AppOpsManager.getUidStateName(uidState.pendingState));
}
+ pw.print(" capability=");
+ pw.println(uidState.capability);
+ if (uidState.capability != uidState.pendingCapability) {
+ pw.print(" pendingCapability=");
+ pw.println(uidState.pendingCapability);
+ }
if (uidState.pendingStateCommitTime != 0) {
pw.print(" pendingStateCommitTime=");
TimeUtils.formatDuration(uidState.pendingStateCommitTime, nowElapsed, pw);
diff --git a/services/core/java/com/android/server/appop/TEST_MAPPING b/services/core/java/com/android/server/appop/TEST_MAPPING
index e9d2b31..9c03a36 100644
--- a/services/core/java/com/android/server/appop/TEST_MAPPING
+++ b/services/core/java/com/android/server/appop/TEST_MAPPING
@@ -35,6 +35,9 @@
"include-filter": "android.permission.cts.SharedUidPermissionsTest"
}
]
+ },
+ {
+ "name": "CtsAppTestCases:ActivityManagerApi29Test"
}
]
}
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 0d493b8..e285bfd 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -580,7 +580,8 @@
}
final private IUidObserver mUidObserver = new IUidObserver.Stub() {
- @Override public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ @Override public void onUidStateChanged(int uid, int procState, long procStateSeq,
+ int capability) {
}
@Override public void onUidGone(int uid, boolean disabled) {
@@ -2784,6 +2785,7 @@
}
public void setMasterMute(boolean mute, int flags, String callingPackage, int userId) {
+ enforceModifyAudioRoutingPermission();
setMasterMuteInternal(mute, flags, callingPackage, Binder.getCallingUid(),
userId);
}
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index 362955d..2c23c51 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -1810,8 +1810,9 @@
}
// Native callback.
- private long notifyANR(IBinder token, String reason) {
- return mWindowManagerCallbacks.notifyANR(
+ private long notifyANR(InputApplicationHandle inputApplicationHandle, IBinder token,
+ String reason) {
+ return mWindowManagerCallbacks.notifyANR(inputApplicationHandle,
token, reason);
}
@@ -2055,7 +2056,12 @@
public void notifyInputChannelBroken(IBinder token);
- public long notifyANR(IBinder token, String reason);
+ /**
+ * Notifies the window manager about an application that is not responding.
+ * Returns a new timeout to continue waiting in nanoseconds, or 0 to abort dispatch.
+ */
+ long notifyANR(InputApplicationHandle inputApplicationHandle, IBinder token,
+ String reason);
public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags);
diff --git a/services/core/java/com/android/server/integrity/parser/RuleBinaryParser.java b/services/core/java/com/android/server/integrity/parser/RuleBinaryParser.java
new file mode 100644
index 0000000..c1567bc
--- /dev/null
+++ b/services/core/java/com/android/server/integrity/parser/RuleBinaryParser.java
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+package com.android.server.integrity.parser;
+
+import com.android.server.integrity.model.Rule;
+
+import java.io.InputStream;
+
+/** A helper class to parse rules into the {@link Rule} model from Binary representation. */
+public class RuleBinaryParser implements RuleParser {
+
+ @Override
+ public Rule parse(String ruleText) {
+ // TODO: Implement binary text parser.
+ return null;
+ }
+
+ @Override
+ public Rule parse(InputStream inputStream) {
+ // TODO: Implement stream parser.
+ return null;
+ }
+}
diff --git a/services/core/java/com/android/server/integrity/parser/RuleParser.java b/services/core/java/com/android/server/integrity/parser/RuleParser.java
new file mode 100644
index 0000000..96ed5993
--- /dev/null
+++ b/services/core/java/com/android/server/integrity/parser/RuleParser.java
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+package com.android.server.integrity.parser;
+
+import com.android.server.integrity.model.Rule;
+
+import java.io.InputStream;
+
+/** A helper class to parse rules into the {@link Rule} model. */
+public interface RuleParser {
+
+ /** Parse rules from a string. */
+ Rule parse(String ruleText);
+
+ /** Parse rules from an input stream. */
+ Rule parse(InputStream inputStream);
+}
diff --git a/services/core/java/com/android/server/integrity/parser/RuleXmlParser.java b/services/core/java/com/android/server/integrity/parser/RuleXmlParser.java
new file mode 100644
index 0000000..8b1bec9
--- /dev/null
+++ b/services/core/java/com/android/server/integrity/parser/RuleXmlParser.java
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+package com.android.server.integrity.parser;
+
+import com.android.server.integrity.model.Rule;
+
+import java.io.InputStream;
+
+/** A helper class to parse rules into the {@link Rule} model from Xml representation. */
+public final class RuleXmlParser implements RuleParser {
+
+ @Override
+ public Rule parse(String ruleText) {
+ // TODO: Implement text parser.
+ return null;
+ }
+
+ @Override
+ public Rule parse(InputStream inputStream) {
+ // TODO: Implement stream parser.
+ return null;
+ }
+}
diff --git a/services/core/java/com/android/server/integrity/serializer/RuleBinarySerializer.java b/services/core/java/com/android/server/integrity/serializer/RuleBinarySerializer.java
new file mode 100644
index 0000000..ecb00a4
--- /dev/null
+++ b/services/core/java/com/android/server/integrity/serializer/RuleBinarySerializer.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+package com.android.server.integrity.serializer;
+
+import com.android.server.integrity.model.Rule;
+
+import java.io.OutputStream;
+
+/** A helper class to serialize rules from the {@link Rule} model to Xml representation. */
+public class RuleBinarySerializer implements RuleSerializer {
+
+ @Override
+ public void serialize(Rule rule, OutputStream outputStream) {
+ // TODO: Implement stream serializer.
+ }
+
+ @Override
+ public String serialize(Rule rule) {
+ // TODO: Implement text serializer.
+ return null;
+ }
+}
diff --git a/services/core/java/com/android/server/integrity/serializer/RuleSerializer.java b/services/core/java/com/android/server/integrity/serializer/RuleSerializer.java
new file mode 100644
index 0000000..07a912f
--- /dev/null
+++ b/services/core/java/com/android/server/integrity/serializer/RuleSerializer.java
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+package com.android.server.integrity.serializer;
+
+import com.android.server.integrity.model.Rule;
+
+import java.io.OutputStream;
+
+/** A helper class to serialize rules from the {@link Rule} model. */
+public interface RuleSerializer {
+
+ /** Serialize a rule to an output stream */
+ void serialize(Rule rule, OutputStream outputStream);
+
+ /** Serialize a rule to a string. */
+ String serialize(Rule rule);
+}
diff --git a/services/core/java/com/android/server/integrity/serializer/RuleXmlSerializer.java b/services/core/java/com/android/server/integrity/serializer/RuleXmlSerializer.java
new file mode 100644
index 0000000..62973e2
--- /dev/null
+++ b/services/core/java/com/android/server/integrity/serializer/RuleXmlSerializer.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+package com.android.server.integrity.serializer;
+
+import com.android.server.integrity.model.Rule;
+
+import java.io.OutputStream;
+
+/** A helper class to serialize rules from the {@link Rule} model to Xml representation. */
+public class RuleXmlSerializer implements RuleSerializer {
+
+ @Override
+ public void serialize(Rule rule, OutputStream outputStream) {
+ // TODO: Implement stream serializer.
+ }
+
+ @Override
+ public String serialize(Rule rule) {
+ // TODO: Implement text serializer.
+ return null;
+ }
+}
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 388214b..32d4b72 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -912,7 +912,8 @@
}
final private IUidObserver mUidObserver = new IUidObserver.Stub() {
- @Override public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ @Override public void onUidStateChanged(int uid, int procState, long procStateSeq,
+ int capability) {
mUidEventHandler.obtainMessage(UID_MSG_STATE_CHANGED,
uid, procState, procStateSeq).sendToTarget();
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index b36958a..a3e6dd9 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -8663,6 +8663,16 @@
pkgSetting = originalPkgSetting == null ? installedPkgSetting : originalPkgSetting;
pkgAlreadyExists = pkgSetting != null;
final String disabledPkgName = pkgAlreadyExists ? pkgSetting.name : pkg.packageName;
+ if (scanSystemPartition && !pkgAlreadyExists
+ && mSettings.getDisabledSystemPkgLPr(disabledPkgName) != null) {
+ // The updated-package data for /system apk remains inconsistently
+ // after the package data for /data apk is lost accidentally.
+ // To recover it, enable /system apk and install it as non-updated system app.
+ Slog.w(TAG, "Inconsistent package setting of updated system app for "
+ + disabledPkgName + ". To recover it, enable the system app"
+ + "and install it as non-updated system app.");
+ mSettings.removeDisabledSystemPackageLPw(disabledPkgName);
+ }
disabledPkgSetting = mSettings.getDisabledSystemPkgLPr(disabledPkgName);
isSystemPkgUpdated = disabledPkgSetting != null;
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
index 8253b392..f0a1c70 100644
--- a/services/core/java/com/android/server/pm/ShortcutService.java
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
@@ -495,7 +495,7 @@
final private IUidObserver mUidObserver = new IUidObserver.Stub() {
@Override
- public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
injectPostToHandler(() -> handleOnUidStateChanged(uid, procState));
}
diff --git a/services/core/java/com/android/server/pm/dex/DexManager.java b/services/core/java/com/android/server/pm/dex/DexManager.java
index f56231f..41dcaa5 100644
--- a/services/core/java/com/android/server/pm/dex/DexManager.java
+++ b/services/core/java/com/android/server/pm/dex/DexManager.java
@@ -16,8 +16,6 @@
package com.android.server.pm.dex;
-import static android.provider.DeviceConfig.NAMESPACE_DEX_BOOT;
-
import static com.android.server.pm.InstructionSets.getAppDexInstructionSets;
import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
import static com.android.server.pm.dex.PackageDexUsage.PackageUseInfo;
@@ -31,7 +29,6 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.storage.StorageManager;
-import android.provider.DeviceConfig;
import android.util.Log;
import android.util.Slog;
import android.util.jar.StrictJarFile;
@@ -72,10 +69,6 @@
private static final String PROPERTY_NAME_PM_DEXOPT_PRIV_APPS_OOB_LIST =
"pm.dexopt.priv-apps-oob-list";
- // flags for Device Config API
- private static final String PRIV_APPS_OOB_ENABLED = "priv_apps_oob_enabled";
- private static final String PRIV_APPS_OOB_WHITELIST = "priv_apps_oob_whitelist";
-
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private final Context mContext;
@@ -717,24 +710,16 @@
return isPackageSelectedToRunOobInternal(
SystemProperties.getBoolean(PROPERTY_NAME_PM_DEXOPT_PRIV_APPS_OOB, false),
SystemProperties.get(PROPERTY_NAME_PM_DEXOPT_PRIV_APPS_OOB_LIST, "ALL"),
- DeviceConfig.getProperty(NAMESPACE_DEX_BOOT, PRIV_APPS_OOB_ENABLED),
- DeviceConfig.getProperty(NAMESPACE_DEX_BOOT, PRIV_APPS_OOB_WHITELIST),
packageNamesInSameProcess);
}
@VisibleForTesting
- /* package */ static boolean isPackageSelectedToRunOobInternal(
- boolean isDefaultEnabled, String defaultWhitelist, String overrideEnabled,
- String overrideWhitelist, Collection<String> packageNamesInSameProcess) {
- // Allow experiment (if exists) to override device configuration.
- boolean enabled = overrideEnabled != null ? overrideEnabled.equals("true")
- : isDefaultEnabled;
- if (!enabled) {
+ /* package */ static boolean isPackageSelectedToRunOobInternal(boolean isEnabled,
+ String whitelist, Collection<String> packageNamesInSameProcess) {
+ if (!isEnabled) {
return false;
}
- // Similarly, experiment flag can override the whitelist.
- String whitelist = overrideWhitelist != null ? overrideWhitelist : defaultWhitelist;
if ("ALL".equals(whitelist)) {
return true;
}
diff --git a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
index ef4c12e..1fd15d9 100644
--- a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
+++ b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
@@ -469,44 +469,39 @@
List<Rollback> restoreInProgress = new ArrayList<>();
Set<String> apexPackageNames = new HashSet<>();
synchronized (mLock) {
- for (Rollback rollback : mRollbacks) {
- if (rollback.isStaged()) {
+ Iterator<Rollback> iter = mRollbacks.iterator();
+ while (iter.hasNext()) {
+ Rollback rollback = iter.next();
+ if (!rollback.isStaged()) {
+ // We only care about staged rollbacks here
+ continue;
+ }
+
+ PackageInstaller.SessionInfo session = mContext.getPackageManager()
+ .getPackageInstaller().getSessionInfo(rollback.getStagedSessionId());
+ if (session == null || session.isStagedSessionFailed()) {
+ iter.remove();
+ rollback.delete(mAppDataRollbackHelper);
+ continue;
+ }
+
+ if (session.isStagedSessionApplied()) {
if (rollback.isEnabling()) {
enabling.add(rollback);
} else if (rollback.isRestoreUserDataInProgress()) {
restoreInProgress.add(rollback);
}
-
- apexPackageNames.addAll(rollback.getApexPackageNames());
}
+ apexPackageNames.addAll(rollback.getApexPackageNames());
}
}
for (Rollback rollback : enabling) {
- PackageInstaller installer = mContext.getPackageManager().getPackageInstaller();
- PackageInstaller.SessionInfo session =
- installer.getSessionInfo(rollback.getStagedSessionId());
- if (session == null || session.isStagedSessionFailed()) {
- // TODO: Do we need to remove this from
- // mRollbacks, or is it okay to leave as
- // unavailable until the next reboot when it will go
- // away on its own?
- rollback.delete(mAppDataRollbackHelper);
- } else if (session.isStagedSessionApplied()) {
- makeRollbackAvailable(rollback);
- }
+ makeRollbackAvailable(rollback);
}
for (Rollback rollback : restoreInProgress) {
- PackageInstaller installer = mContext.getPackageManager().getPackageInstaller();
- PackageInstaller.SessionInfo session =
- installer.getSessionInfo(rollback.getStagedSessionId());
- // TODO: What if session is null?
- if (session != null) {
- if (session.isStagedSessionApplied() || session.isStagedSessionFailed()) {
- rollback.setRestoreUserDataInProgress(false);
- }
- }
+ rollback.setRestoreUserDataInProgress(false);
}
for (String apexPackageName : apexPackageNames) {
diff --git a/services/core/java/com/android/server/updates/EmergencyNumberDbInstallReceiver.java b/services/core/java/com/android/server/updates/EmergencyNumberDbInstallReceiver.java
index 852f707..cb0b45c 100644
--- a/services/core/java/com/android/server/updates/EmergencyNumberDbInstallReceiver.java
+++ b/services/core/java/com/android/server/updates/EmergencyNumberDbInstallReceiver.java
@@ -18,6 +18,7 @@
import android.content.Context;
import android.content.Intent;
+import android.telephony.TelephonyManager;
import android.util.Slog;
/**
@@ -34,6 +35,11 @@
@Override
protected void postInstall(Context context, Intent intent) {
Slog.i(TAG, "Emergency number database is updated in file partition");
- // TODO Send a notification to EmergencyNumberTracker for updating of emergency number db.
+
+ // Notify EmergencyNumberTracker for emergency number installation complete.
+ Intent notifyInstallComplete = new Intent(
+ TelephonyManager.ACTION_OTA_EMERGENCY_NUMBER_DB_INSTALLED);
+ context.sendBroadcast(
+ notifyInstallComplete, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE);
}
}
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index 5e4f75c..c57ac11 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -132,17 +132,20 @@
return false;
}
- if (mWindowsForAccessibilityObserver.get(displayId) != null) {
- final Display display = dc.getDisplay();
- if (display.getType() == Display.TYPE_VIRTUAL && dc.getParentWindow() != null) {
- // The window observer of this embedded display had been set from
- // window manager after setting its parent window.
- return false;
- } else {
- throw new IllegalStateException(
- "Windows for accessibility callback of display "
- + displayId + " already set!");
+ final Display display = dc.getDisplay();
+ if (display.getType() == Display.TYPE_VIRTUAL && dc.getParentWindow() != null) {
+ // If this display is an embedded one, its window observer should have been set from
+ // window manager after setting its parent window. But if its window observer is
+ // empty, that means this mapping didn't be set, and needs to do this again.
+ // This happened when accessibility window observer is disabled and enabled again.
+ if (mWindowsForAccessibilityObserver.get(displayId) == null) {
+ handleWindowObserverOfEmbeddedDisplayLocked(displayId, dc.getParentWindow());
}
+ return false;
+ } else if (mWindowsForAccessibilityObserver.get(displayId) != null) {
+ throw new IllegalStateException(
+ "Windows for accessibility callback of display "
+ + displayId + " already set!");
}
mWindowsForAccessibilityObserver.put(displayId,
new WindowsForAccessibilityObserver(mService, displayId, callback));
diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
index f9b6bba..ff2c671 100644
--- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
@@ -823,7 +823,14 @@
return StatsLog.APP_START_OCCURRED__TYPE__HOT;
}
return StatsLog.APP_START_OCCURRED__TYPE__UNKNOWN;
- }
+ }
+
+ /** @return the last known window drawn delay of the given windowing mode. */
+ int getLastDrawnDelayMs(@WindowingMode int windowingMode) {
+ final WindowingModeTransitionInfo info = mLastWindowingModeTransitionInfo.get(
+ windowingMode);
+ return info != null ? info.windowsDrawnDelayMs : INVALID_DELAY;
+ }
WindowingModeTransitionInfoSnapshot logAppTransitionReportedDrawn(ActivityRecord r,
boolean restoredFromBundle) {
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index eaf19be..d4dd033 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -376,6 +376,7 @@
* Value to increment the z-layer when boosting a layer during animations. BOOST in l33tsp34k.
*/
@VisibleForTesting static final int Z_BOOST_BASE = 800570000;
+ static final int INVALID_PID = -1;
final ActivityTaskManagerService mAtmService;
final ActivityInfo info; // activity info provided by developer in AndroidManifest
@@ -586,7 +587,6 @@
private long mLastTransactionSequence = Long.MIN_VALUE;
private int mNumInterestingWindows;
private int mNumDrawnWindows;
- boolean inPendingTransaction;
boolean allDrawn;
private boolean mLastAllDrawn;
@@ -875,15 +875,10 @@
pw.print(prefix); pw.print("mNumInterestingWindows=");
pw.print(mNumInterestingWindows);
pw.print(" mNumDrawnWindows="); pw.print(mNumDrawnWindows);
- pw.print(" inPendingTransaction="); pw.print(inPendingTransaction);
pw.print(" allDrawn="); pw.print(allDrawn);
pw.print(" lastAllDrawn="); pw.print(mLastAllDrawn);
pw.println(")");
}
- if (inPendingTransaction) {
- pw.print(prefix); pw.print("inPendingTransaction=");
- pw.println(inPendingTransaction);
- }
if (mStartingData != null || removed || firstWindowDrawn || mIsExiting) {
pw.print(prefix); pw.print("startingData="); pw.print(mStartingData);
pw.print(" removed="); pw.print(removed);
@@ -4035,7 +4030,6 @@
// If we are preparing an app transition, then delay changing
// the visibility of this token until we execute that transition.
if (okToAnimate() && appTransition.isTransitionSet()) {
- inPendingTransaction = true;
if (visible) {
displayContent.mOpeningApps.add(this);
mEnteringAnimation = true;
@@ -4069,7 +4063,6 @@
boolean visible, int transit, boolean performLayout, boolean isVoiceInteraction) {
boolean delayed = false;
- inPendingTransaction = false;
// Reset the state of mHiddenSetFromTransferredStartingWindow since visibility is actually
// been set by the app now.
mHiddenSetFromTransferredStartingWindow = false;
@@ -5085,7 +5078,7 @@
final @LaunchState int launchState = info != null ? info.getLaunchState() : -1;
mStackSupervisor.reportActivityLaunchedLocked(false /* timeout */, this,
windowsDrawnDelayMs, launchState);
- mStackSupervisor.stopWaitingForActivityVisible(this);
+ mStackSupervisor.stopWaitingForActivityVisible(this, windowsDrawnDelayMs);
finishLaunchTickingLocked();
if (task != null) {
task.hasBeenVisible = true;
@@ -5313,7 +5306,7 @@
anrActivity = getWaitingHistoryRecordLocked();
anrApp = app;
windowFromSameProcessAsActivity =
- !hasProcess() || app.getPid() == windowPid || windowPid == -1;
+ !hasProcess() || app.getPid() == windowPid || windowPid == INVALID_PID;
}
if (windowFromSameProcessAsActivity) {
diff --git a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
index 87b41b4..dc3d263 100644
--- a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
@@ -562,8 +562,8 @@
return candidateTaskId;
}
- void waitActivityVisible(ComponentName name, WaitResult result, long startTimeMs) {
- final WaitInfo waitInfo = new WaitInfo(name, result, startTimeMs);
+ void waitActivityVisible(ComponentName name, WaitResult result) {
+ final WaitInfo waitInfo = new WaitInfo(name, result);
mWaitingForActivityVisible.add(waitInfo);
}
@@ -573,10 +573,15 @@
// down to the max limit while they are still waiting to finish.
mFinishingActivities.remove(r);
- stopWaitingForActivityVisible(r);
+ stopWaitingForActivityVisible(r, WaitResult.INVALID_DELAY);
}
void stopWaitingForActivityVisible(ActivityRecord r) {
+ stopWaitingForActivityVisible(r,
+ getActivityMetricsLogger().getLastDrawnDelayMs(r.getWindowingMode()));
+ }
+
+ void stopWaitingForActivityVisible(ActivityRecord r, long totalTime) {
boolean changed = false;
for (int i = mWaitingForActivityVisible.size() - 1; i >= 0; --i) {
final WaitInfo w = mWaitingForActivityVisible.get(i);
@@ -585,7 +590,7 @@
changed = true;
result.timeout = false;
result.who = w.getComponent();
- result.totalTime = SystemClock.uptimeMillis() - w.getStartTime();
+ result.totalTime = totalTime;
mWaitingForActivityVisible.remove(w);
}
}
@@ -2824,13 +2829,10 @@
static class WaitInfo {
private final ComponentName mTargetComponent;
private final WaitResult mResult;
- /** Time stamp when we started to wait for {@link WaitResult}. */
- private final long mStartTimeMs;
- WaitInfo(ComponentName targetComponent, WaitResult result, long startTimeMs) {
+ WaitInfo(ComponentName targetComponent, WaitResult result) {
this.mTargetComponent = targetComponent;
this.mResult = result;
- this.mStartTimeMs = startTimeMs;
}
public boolean matches(ComponentName targetComponent) {
@@ -2841,10 +2843,6 @@
return mResult;
}
- public long getStartTime() {
- return mStartTimeMs;
- }
-
public ComponentName getComponent() {
return mTargetComponent;
}
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java
index f87175d..d1bb255 100644
--- a/services/core/java/com/android/server/wm/ActivityStarter.java
+++ b/services/core/java/com/android/server/wm/ActivityStarter.java
@@ -107,7 +107,6 @@
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteException;
-import android.os.SystemClock;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
@@ -764,9 +763,7 @@
mRequest.waitResult.who = r.mActivityComponent;
mRequest.waitResult.totalTime = 0;
} else {
- final long startTimeMs = SystemClock.uptimeMillis();
- mSupervisor.waitActivityVisible(r.mActivityComponent, mRequest.waitResult,
- startTimeMs);
+ mSupervisor.waitActivityVisible(r.mActivityComponent, mRequest.waitResult);
// Note: the timeout variable is not currently not ever set.
do {
try {
diff --git a/services/core/java/com/android/server/wm/InputManagerCallback.java b/services/core/java/com/android/server/wm/InputManagerCallback.java
index 7f9e76b..1ebbb02 100644
--- a/services/core/java/com/android/server/wm/InputManagerCallback.java
+++ b/services/core/java/com/android/server/wm/InputManagerCallback.java
@@ -4,6 +4,7 @@
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+import static com.android.server.wm.ActivityRecord.INVALID_PID;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_INPUT;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
@@ -14,6 +15,7 @@
import android.os.RemoteException;
import android.util.Slog;
import android.view.IWindow;
+import android.view.InputApplicationHandle;
import android.view.KeyEvent;
import android.view.WindowManager;
@@ -80,7 +82,8 @@
* Called by the InputManager.
*/
@Override
- public long notifyANR(IBinder token, String reason) {
+ public long notifyANR(InputApplicationHandle inputApplicationHandle,
+ IBinder token, String reason) {
ActivityRecord activity = null;
WindowState windowState = null;
boolean aboveSystem = false;
@@ -93,6 +96,10 @@
}
}
+ if (activity == null && inputApplicationHandle != null) {
+ activity = ActivityRecord.forTokenLocked(inputApplicationHandle.token);
+ }
+
if (windowState != null) {
Slog.i(TAG_WM, "Input event dispatching timed out "
+ "sending to " + windowState.mAttrs.getTitle()
@@ -122,7 +129,7 @@
// Notify the activity manager about the timeout and let it decide whether
// to abort dispatching or keep waiting.
final boolean abort = activity.keyDispatchingTimedOut(reason,
- windowState.mSession.mPid);
+ (windowState != null) ? windowState.mSession.mPid : INVALID_PID);
if (!abort) {
// The activity manager declined to abort dispatching.
// Wait a bit longer and timeout again later.
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 92ff2dc..634990b 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -471,6 +471,17 @@
}
}
+ @Override
+ void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
+ Rect outSurfaceInsets) {
+ final WindowState windowState = getTopVisibleAppMainWindow();
+ if (windowState != null) {
+ windowState.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
+ } else {
+ super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
+ }
+ }
+
/**
* Calculate the maximum visible area of this task. If the task has only one app,
* the result will be visible frame of that app. If the task has more than one apps,
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index 8f8c7e7..56211e2 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -1871,6 +1871,17 @@
}
@Override
+ void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
+ Rect outSurfaceInsets) {
+ final Task task = getTopChild();
+ if (task != null) {
+ task.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
+ } else {
+ super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
+ }
+ }
+
+ @Override
RemoteAnimationTarget createRemoteAnimationTarget(
RemoteAnimationController.RemoteAnimationRecord record) {
final Task task = getTopChild();
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index f7402e1..17e67eb 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -2016,14 +2016,12 @@
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS,
"Remove %s: mSurfaceController=%s mAnimatingExit=%b mRemoveOnExit=%b "
+ "mHasSurface=%b surfaceShowing=%b animating=%b app-animation=%b "
- + "mWillReplaceWindow=%b inPendingTransaction=%b mDisplayFrozen=%b "
- + "callers=%s",
+ + "mWillReplaceWindow=%b mDisplayFrozen=%b callers=%s",
this, mWinAnimator.mSurfaceController, mAnimatingExit, mRemoveOnExit,
mHasSurface, mWinAnimator.getShown(),
isAnimating(TRANSITION | PARENTS),
mActivityRecord != null && mActivityRecord.isAnimating(TRANSITION),
mWillReplaceWindow,
- mActivityRecord != null && mActivityRecord.inPendingTransaction,
mWmService.mDisplayFrozen, Debug.getCallers(6));
// Visibility of the removed window. Will be used later to update orientation later on.
diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp
index dd2629d..35e2436 100644
--- a/services/core/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/core/jni/com_android_server_input_InputManagerService.cpp
@@ -709,6 +709,18 @@
checkAndClearExceptionFromCallback(env, "notifyConfigurationChanged");
}
+static jobject getInputApplicationHandleObjLocalRef(JNIEnv* env,
+ const sp<InputApplicationHandle>& inputApplicationHandle) {
+ if (inputApplicationHandle == nullptr) {
+ return nullptr;
+ }
+ NativeInputApplicationHandle* handle =
+ static_cast<NativeInputApplicationHandle*>(inputApplicationHandle.get());
+
+ return handle->getInputApplicationHandleObjLocalRef(env);
+}
+
+
nsecs_t NativeInputManager::notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle,
const sp<IBinder>& token, const std::string& reason) {
#if DEBUG_INPUT_DISPATCHER_POLICY
@@ -719,12 +731,15 @@
JNIEnv* env = jniEnv();
ScopedLocalFrame localFrame(env);
+ jobject inputApplicationHandleObj =
+ getInputApplicationHandleObjLocalRef(env, inputApplicationHandle);
+
jobject tokenObj = javaObjectForIBinder(env, token);
jstring reasonObj = env->NewStringUTF(reason.c_str());
jlong newTimeout = env->CallLongMethod(mServiceObj,
- gServiceClassInfo.notifyANR, tokenObj,
- reasonObj);
+ gServiceClassInfo.notifyANR, inputApplicationHandleObj, tokenObj,
+ reasonObj);
if (checkAndClearExceptionFromCallback(env, "notifyANR")) {
newTimeout = 0; // abort dispatch
} else {
@@ -1865,7 +1880,7 @@
GET_METHOD_ID(gServiceClassInfo.notifyANR, clazz,
"notifyANR",
- "(Landroid/os/IBinder;Ljava/lang/String;)J");
+ "(Landroid/view/InputApplicationHandle;Landroid/os/IBinder;Ljava/lang/String;)J");
GET_METHOD_ID(gServiceClassInfo.filterInputEvent, clazz,
"filterInputEvent", "(Landroid/view/InputEvent;I)Z");
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 5e49c7a..a39cc20 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -8105,15 +8105,7 @@
mSecurityLogMonitor.stop();
setNetworkLoggingActiveInternal(false);
deleteTransferOwnershipBundleLocked(userId);
-
- try {
- if (mInjector.getIBackupManager() != null) {
- // Reactivate backup service.
- mInjector.getIBackupManager().setBackupServiceActive(UserHandle.USER_SYSTEM, true);
- }
- } catch (RemoteException e) {
- throw new IllegalStateException("Failed reactivating backup service.", e);
- }
+ toggleBackupServiceActive(UserHandle.USER_SYSTEM, true);
}
@Override
@@ -8173,7 +8165,6 @@
}
}
-
private void toggleBackupServiceActive(int userId, boolean makeActive) {
long ident = mInjector.binderClearCallingIdentity();
try {
@@ -8182,7 +8173,8 @@
.setBackupServiceActive(userId, makeActive);
}
} catch (RemoteException e) {
- throw new IllegalStateException("Failed deactivating backup service.", e);
+ throw new IllegalStateException(String.format("Failed %s backup service.",
+ makeActive ? "activating" : "deactivating"), e);
} finally {
mInjector.binderRestoreCallingIdentity(ident);
}
@@ -8233,6 +8225,7 @@
mOwners.removeProfileOwner(userId);
mOwners.writeProfileOwner(userId);
deleteTransferOwnershipBundleLocked(userId);
+ toggleBackupServiceActive(userId, true);
}
@Override
diff --git a/services/tests/mockingservicestests/src/com/android/server/AppStateTrackerTest.java b/services/tests/mockingservicestests/src/com/android/server/AppStateTrackerTest.java
index 1f4656a..1e27007 100644
--- a/services/tests/mockingservicestests/src/com/android/server/AppStateTrackerTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/AppStateTrackerTest.java
@@ -513,7 +513,8 @@
mIUidObserver.onUidStateChanged(UID_2,
- ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE, 0);
+ ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
waitUntilMainHandlerDrain();
assertTrue(instance.isUidActive(UID_1));
@@ -530,7 +531,8 @@
mIUidObserver.onUidStateChanged(UID_1,
- ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0);
+ ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
waitUntilMainHandlerDrain();
assertTrue(instance.isUidActive(UID_1));
@@ -564,7 +566,8 @@
assertTrue(instance.isUidInForeground(Process.SYSTEM_UID));
mIUidObserver.onUidStateChanged(UID_1,
- ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND, 0);
+ ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
waitUntilMainHandlerDrain();
assertFalse(instance.isUidActive(UID_1));
@@ -576,7 +579,8 @@
assertTrue(instance.isUidInForeground(Process.SYSTEM_UID));
mIUidObserver.onUidStateChanged(UID_1,
- ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND, 0);
+ ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
waitUntilMainHandlerDrain();
assertFalse(instance.isUidActive(UID_1));
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
index 6dd1bd8..57f55e3 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
@@ -23,7 +23,6 @@
import static android.app.ActivityManager.PROCESS_STATE_CACHED_EMPTY;
import static android.app.ActivityManager.PROCESS_STATE_CACHED_RECENT;
import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
-import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION;
import static android.app.ActivityManager.PROCESS_STATE_HEAVY_WEIGHT;
import static android.app.ActivityManager.PROCESS_STATE_HOME;
import static android.app.ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND;
@@ -368,7 +367,7 @@
sService.mWakefulness = PowerManagerInternal.WAKEFULNESS_AWAKE;
sService.mOomAdjuster.updateOomAdjLocked(app, false, OomAdjuster.OOM_ADJ_REASON_NONE);
- assertProcStates(app, PROCESS_STATE_FOREGROUND_SERVICE_LOCATION, PERCEPTIBLE_APP_ADJ,
+ assertProcStates(app, PROCESS_STATE_FOREGROUND_SERVICE, PERCEPTIBLE_APP_ADJ,
SCHED_GROUP_DEFAULT);
}
diff --git a/services/tests/mockingservicestests/src/com/android/server/appop/AppOpsServiceTest.java b/services/tests/mockingservicestests/src/com/android/server/appop/AppOpsServiceTest.java
index b6a7b09..fa209a7a 100644
--- a/services/tests/mockingservicestests/src/com/android/server/appop/AppOpsServiceTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/appop/AppOpsServiceTest.java
@@ -16,7 +16,6 @@
package com.android.server.appop;
import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
-import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION;
import static android.app.AppOpsManager.MODE_ALLOWED;
import static android.app.AppOpsManager.MODE_ERRORED;
import static android.app.AppOpsManager.MODE_FOREGROUND;
@@ -338,18 +337,22 @@
public void testUidProcStateChange_cachedToTopToCached() throws Exception {
setupProcStateTests();
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_TOP);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_TOP,
+ ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
// Second time to make sure that settle time is overcome
Thread.sleep(50);
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
}
@@ -357,12 +360,13 @@
@Test
public void testUidProcStateChange_cachedToFgs() {
setupProcStateTests();
-
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
}
@@ -371,12 +375,13 @@
public void testUidProcStateChange_cachedToFgsLocation() {
setupProcStateTests();
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid,
- PROCESS_STATE_FOREGROUND_SERVICE_LOCATION);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isEqualTo(MODE_ALLOWED);
}
@@ -385,18 +390,22 @@
public void testUidProcStateChange_topToFgs() throws Exception {
setupProcStateTests();
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_TOP);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_TOP,
+ ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
// Second time to make sure that settle time is overcome
Thread.sleep(50);
- mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
}
@@ -405,25 +414,31 @@
public void testUidProcStateChange_topToFgsLocationToFgs() throws Exception {
setupProcStateTests();
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_CACHED_EMPTY,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_TOP);
+ mAppOpsService.updateUidProcState(mMyUid, ActivityManager.PROCESS_STATE_TOP,
+ ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE_LOCATION);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION);
// Second time to make sure that settle time is overcome
Thread.sleep(50);
- mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE_LOCATION);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isEqualTo(MODE_ALLOWED);
- mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
// Second time to make sure that settle time is overcome
Thread.sleep(50);
- mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE);
+ mAppOpsService.updateUidProcState(mMyUid, PROCESS_STATE_FOREGROUND_SERVICE,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
assertThat(mAppOpsService.noteOperation(OP_COARSE_LOCATION, mMyUid, sMyPackageName, null))
.isNotEqualTo(MODE_ALLOWED);
}
diff --git a/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java
index 8863d5a..5bd08c0 100644
--- a/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java
@@ -233,7 +233,8 @@
doReturn(procState).when(mActivityMangerInternal).getUidProcessState(uid);
SparseBooleanArray foregroundUids = mQuotaController.getForegroundUids();
spyOn(foregroundUids);
- mUidObserver.onUidStateChanged(uid, procState, 0);
+ mUidObserver.onUidStateChanged(uid, procState, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
if (procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE) {
verify(foregroundUids, timeout(2 * SECOND_IN_MILLIS).times(1))
.put(eq(uid), eq(true));
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
index 1edc953..49412bc0c 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
@@ -571,7 +571,8 @@
verifyObserverReceivedChanges(observerToTest, changesToVerify, changeItems,
(observer, changeItem) -> {
verify(observer).onUidStateChanged(changeItem.uid,
- changeItem.processState, changeItem.procStateSeq);
+ changeItem.processState, changeItem.procStateSeq,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
});
}
// Verify there are no other callbacks for this observer.
@@ -619,7 +620,8 @@
// First process state message is always delivered regardless of whether the process state
// change is above or below the cutpoint (PROCESS_STATE_SERVICE).
verify(observer).onUidStateChanged(TEST_UID,
- changeItem.processState, changeItem.procStateSeq);
+ changeItem.processState, changeItem.procStateSeq,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
verifyNoMoreInteractions(observer);
changeItem.processState = ActivityManager.PROCESS_STATE_RECEIVER;
@@ -636,7 +638,8 @@
// the current process state change is above cutpoint, so callback will be invoked with the
// current process state change.
verify(observer).onUidStateChanged(TEST_UID,
- changeItem.processState, changeItem.procStateSeq);
+ changeItem.processState, changeItem.procStateSeq,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
verifyNoMoreInteractions(observer);
changeItem.processState = ActivityManager.PROCESS_STATE_TOP;
@@ -653,7 +656,8 @@
// the current process state change is below cutpoint, so callback will be invoked with the
// current process state change.
verify(observer).onUidStateChanged(TEST_UID,
- changeItem.processState, changeItem.procStateSeq);
+ changeItem.processState, changeItem.procStateSeq,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
verifyNoMoreInteractions(observer);
}
diff --git a/services/tests/servicestests/src/com/android/server/am/OomAdjusterTests.java b/services/tests/servicestests/src/com/android/server/am/OomAdjusterTests.java
index d3bcff5..d12d804 100644
--- a/services/tests/servicestests/src/com/android/server/am/OomAdjusterTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/OomAdjusterTests.java
@@ -181,7 +181,7 @@
@Test
public void testMaybeUpdateUsageStats_ProcStateFGSLocation() {
final long elapsedTime = ZERO;
- mProcessRecord.setCurProcState(ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE_LOCATION);
+ mProcessRecord.setCurProcState(ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE);
sService.mOomAdjuster.maybeUpdateUsageStats(mProcessRecord, elapsedTime);
assertProcessRecordState(elapsedTime, false, ZERO);
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
index aeccfc5..f571411 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
@@ -943,10 +943,6 @@
verify(getServices().iactivityManager, times(1)).updateDeviceOwner(
eq(admin1.getPackageName()));
- // TODO We should check if the caller has called clearCallerIdentity().
- verify(getServices().ibackupManager, times(1)).setBackupServiceActive(
- eq(UserHandle.USER_SYSTEM), eq(false));
-
verify(mContext.spiedContext, times(1)).sendBroadcastAsUser(
MockUtils.checkIntentAction(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED),
MockUtils.checkUserHandle(UserHandle.USER_SYSTEM));
@@ -1175,6 +1171,37 @@
// TODO Check other calls.
}
+ public void testDeviceOwnerBackupActivateDeactivate() throws Exception {
+ mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS);
+ mContext.callerPermissions.add(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS);
+
+ // Set admin1 as a DA to the secondary user.
+ mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
+ setUpPackageManagerForAdmin(admin1, DpmMockContext.CALLER_SYSTEM_USER_UID);
+ dpm.setActiveAdmin(admin1, /* replace =*/ false);
+ assertTrue(dpm.setDeviceOwner(admin1, "owner-name"));
+
+ verify(getServices().ibackupManager, times(1)).setBackupServiceActive(
+ eq(UserHandle.USER_SYSTEM), eq(false));
+
+ dpm.clearDeviceOwnerApp(admin1.getPackageName());
+
+ verify(getServices().ibackupManager, times(1)).setBackupServiceActive(
+ eq(UserHandle.USER_SYSTEM), eq(true));
+ }
+
+ public void testProfileOwnerBackupActivateDeactivate() throws Exception {
+ setAsProfileOwner(admin1);
+
+ verify(getServices().ibackupManager, times(1)).setBackupServiceActive(
+ eq(DpmMockContext.CALLER_USER_HANDLE), eq(false));
+
+ dpm.clearProfileOwner(admin1);
+
+ verify(getServices().ibackupManager, times(1)).setBackupServiceActive(
+ eq(DpmMockContext.CALLER_USER_HANDLE), eq(true));
+ }
+
public void testClearDeviceOwner_fromDifferentUser() throws Exception {
mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS);
mContext.callerPermissions.add(permission.MANAGE_USERS);
diff --git a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
index 64bd2c7..51bae16 100644
--- a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
@@ -1362,7 +1362,8 @@
private void callOnUidStateChanged(int uid, int procState, long procStateSeq)
throws Exception {
- mUidObserver.onUidStateChanged(uid, procState, procStateSeq);
+ mUidObserver.onUidStateChanged(uid, procState, procStateSeq,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
final CountDownLatch latch = new CountDownLatch(1);
mService.mUidEventHandler.post(() -> {
latch.countDown();
diff --git a/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
index b806180..f9fc3a1 100644
--- a/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
@@ -2222,7 +2222,8 @@
protected void makeUidForeground(int uid) {
try {
mService.mUidObserver.onUidStateChanged(
- uid, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0);
+ uid, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
} catch (RemoteException e) {
e.rethrowAsRuntimeException();
}
@@ -2235,7 +2236,8 @@
protected void makeUidBackground(int uid) {
try {
mService.mUidObserver.onUidStateChanged(
- uid, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0);
+ uid, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
} catch (RemoteException e) {
e.rethrowAsRuntimeException();
}
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
index fd3678d..7b101c7 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
@@ -1647,7 +1647,8 @@
// State changed, but not foreground, so no resetting.
mService.mUidObserver.onUidStateChanged(
- CALLING_UID_1, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0);
+ CALLING_UID_1, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
});
@@ -1671,7 +1672,8 @@
// State changed, package1 foreground, reset.
mService.mUidObserver.onUidStateChanged(
- CALLING_UID_1, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0);
+ CALLING_UID_1, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
assertEquals(3, mManager.getRemainingCallCount());
});
@@ -1691,16 +1693,19 @@
MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
});
mService.mUidObserver.onUidStateChanged(
- CALLING_UID_1, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0);
+ CALLING_UID_1, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
mInjectedCurrentTimeMillis++;
// Different app comes to foreground briefly, and goes back to background.
// Now, make sure package 2's counter is reset, even in this case.
mService.mUidObserver.onUidStateChanged(
- CALLING_UID_2, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0);
+ CALLING_UID_2, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
mService.mUidObserver.onUidStateChanged(
- CALLING_UID_2, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0);
+ CALLING_UID_2, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
assertEquals(3, mManager.getRemainingCallCount());
@@ -1731,9 +1736,11 @@
});
mService.mUidObserver.onUidStateChanged(
- CALLING_UID_2, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0);
+ CALLING_UID_2, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
mService.mUidObserver.onUidStateChanged(
- CALLING_UID_2, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0);
+ CALLING_UID_2, ActivityManager.PROCESS_STATE_TOP_SLEEPING, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
assertEquals(3, mManager.getRemainingCallCount());
@@ -1760,7 +1767,8 @@
// Now, also try calling some APIs and make sure foreground apps don't get throttled.
mService.mUidObserver.onUidStateChanged(
UserHandle.getUid(USER_10, CALLING_UID_1),
- ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0);
+ ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
assertEquals(3, mManager.getRemainingCallCount());
assertFalse(mManager.isRateLimitingActive());
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
index 0196279..f08044c 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
@@ -691,35 +691,16 @@
}
}
- private boolean shouldPackageRunOob(
- boolean isDefaultEnabled, String defaultWhitelist, String overrideEnabled,
- String overrideWhitelist, Collection<String> packageNamesInSameProcess) {
+ private boolean shouldPackageRunOob(boolean isDefaultEnabled, String whitelist,
+ Collection<String> packageNamesInSameProcess) {
return DexManager.isPackageSelectedToRunOobInternal(
- isDefaultEnabled, defaultWhitelist, overrideEnabled, overrideWhitelist,
- packageNamesInSameProcess);
+ isDefaultEnabled, whitelist, packageNamesInSameProcess);
}
@Test
- public void testOobPackageSelectionSwitch() {
+ public void testOobPackageSelectionDefault() {
// Feature is off by default, not overriden
- assertFalse(shouldPackageRunOob(false, "ALL", null, null, null));
-
- // Feature is off by default, overriden
- assertTrue(shouldPackageRunOob(false, "ALL", "true", "ALL", null));
- assertFalse(shouldPackageRunOob(false, "ALL", "false", null, null));
- assertFalse(shouldPackageRunOob(false, "ALL", "false", "ALL", null));
- assertFalse(shouldPackageRunOob(false, "ALL", "false", null, null));
-
- // Feature is on by default, not overriden
- assertTrue(shouldPackageRunOob(true, "ALL", null, null, null));
- assertTrue(shouldPackageRunOob(true, "ALL", null, null, null));
- assertTrue(shouldPackageRunOob(true, "ALL", null, "ALL", null));
-
- // Feature is on by default, overriden
- assertTrue(shouldPackageRunOob(true, "ALL", "true", null, null));
- assertTrue(shouldPackageRunOob(true, "ALL", "true", "ALL", null));
- assertFalse(shouldPackageRunOob(true, "ALL", "false", null, null));
- assertFalse(shouldPackageRunOob(true, "ALL", "false", "ALL", null));
+ assertFalse(shouldPackageRunOob(false, "ALL", null));
}
@Test
@@ -734,24 +715,19 @@
final Collection<String> runningPackages = Arrays.asList("com.priv.app1", "com.priv.app2");
// Feature is off, whitelist does not matter
- assertFalse(shouldPackageRunOob(false, kWhitelistApp0, null, null, runningPackages));
- assertFalse(shouldPackageRunOob(false, kWhitelistApp1, null, null, runningPackages));
- assertFalse(shouldPackageRunOob(false, "", null, kWhitelistApp1, runningPackages));
- assertFalse(shouldPackageRunOob(false, "", null, "ALL", runningPackages));
- assertFalse(shouldPackageRunOob(false, "ALL", null, "ALL", runningPackages));
- assertFalse(shouldPackageRunOob(false, "ALL", null, "", runningPackages));
+ assertFalse(shouldPackageRunOob(false, kWhitelistApp0, runningPackages));
+ assertFalse(shouldPackageRunOob(false, kWhitelistApp1, runningPackages));
+ assertFalse(shouldPackageRunOob(false, "", runningPackages));
+ assertFalse(shouldPackageRunOob(false, "ALL", runningPackages));
- // Feature is on, app not in default or overridden whitelist
- assertFalse(shouldPackageRunOob(true, kWhitelistApp0, null, null, runningPackages));
- assertFalse(shouldPackageRunOob(true, "", null, kWhitelistApp0, runningPackages));
- assertFalse(shouldPackageRunOob(true, "ALL", null, kWhitelistApp0, runningPackages));
+ // Feature is on, app not in whitelist
+ assertFalse(shouldPackageRunOob(true, kWhitelistApp0, runningPackages));
+ assertFalse(shouldPackageRunOob(true, "", runningPackages));
- // Feature is on, app in default or overridden whitelist
- assertTrue(shouldPackageRunOob(true, kWhitelistApp1, null, null, runningPackages));
- assertTrue(shouldPackageRunOob(true, kWhitelistApp2, null, null, runningPackages));
- assertTrue(shouldPackageRunOob(true, kWhitelistApp1AndApp2, null, null, runningPackages));
- assertTrue(shouldPackageRunOob(true, kWhitelistApp1, null, "ALL", runningPackages));
- assertTrue(shouldPackageRunOob(true, "", null, kWhitelistApp1, runningPackages));
- assertTrue(shouldPackageRunOob(true, "ALL", null, kWhitelistApp1, runningPackages));
+ // Feature is on, app in whitelist
+ assertTrue(shouldPackageRunOob(true, kWhitelistApp1, runningPackages));
+ assertTrue(shouldPackageRunOob(true, kWhitelistApp2, runningPackages));
+ assertTrue(shouldPackageRunOob(true, kWhitelistApp1AndApp2, runningPackages));
+ assertTrue(shouldPackageRunOob(true, "ALL", runningPackages));
}
}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 6a80568..f9b3659 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -400,7 +400,7 @@
private final IUidObserver mUidObserver = new IUidObserver.Stub() {
@Override
- public void onUidStateChanged(int uid, int procState, long procStateSeq) {
+ public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) {
mHandler.obtainMessage(MSG_UID_STATE_CHANGED, uid, procState).sendToTarget();
}
@@ -411,7 +411,8 @@
@Override
public void onUidGone(int uid, boolean disabled) {
- onUidStateChanged(uid, ActivityManager.PROCESS_STATE_NONEXISTENT, 0);
+ onUidStateChanged(uid, ActivityManager.PROCESS_STATE_NONEXISTENT, 0,
+ ActivityManager.PROCESS_CAPABILITY_NONE);
}
@Override
diff --git a/telephony/java/android/telephony/CellBroadcastService.java b/telephony/java/android/telephony/CellBroadcastService.java
index 60281ad..09e22aa 100644
--- a/telephony/java/android/telephony/CellBroadcastService.java
+++ b/telephony/java/android/telephony/CellBroadcastService.java
@@ -18,6 +18,7 @@
import android.annotation.CallSuper;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -73,7 +74,7 @@
* @param slotIndex the index of the slot which received the message
* @param message the SMS PDU
*/
- public abstract void onGsmCellBroadcastSms(int slotIndex, byte[] message);
+ public abstract void onGsmCellBroadcastSms(int slotIndex, @NonNull byte[] message);
/**
* Handle a CDMA cell broadcast SMS message forwarded from the system.
@@ -82,7 +83,7 @@
* @param bearerData the CDMA SMS bearer data
* @param serviceCategory the CDMA SCPT service category
*/
- public abstract void onCdmaCellBroadcastSms(int slotIndex, byte[] bearerData,
+ public abstract void onCdmaCellBroadcastSms(int slotIndex, @NonNull byte[] bearerData,
@CdmaSmsCbProgramData.Category int serviceCategory);
/**
@@ -106,7 +107,7 @@
*/
@Override
@CallSuper
- public IBinder onBind(Intent intent) {
+ public IBinder onBind(@Nullable Intent intent) {
return mStubWrapper;
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java
index 1912c60..f9b7f6d 100644
--- a/telephony/java/android/telephony/CellSignalStrengthNr.java
+++ b/telephony/java/android/telephony/CellSignalStrengthNr.java
@@ -194,13 +194,13 @@
/** @hide */
@Override
public void updateLevel(PersistableBundle cc, ServiceState ss) {
- if (mCsiRsrp == CellInfo.UNAVAILABLE) {
+ if (mSsRsrp == CellInfo.UNAVAILABLE) {
mLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
- } else if (mCsiRsrp >= SIGNAL_GREAT_THRESHOLD) {
+ } else if (mSsRsrp >= SIGNAL_GREAT_THRESHOLD) {
mLevel = SIGNAL_STRENGTH_GREAT;
- } else if (mCsiRsrp >= SIGNAL_GOOD_THRESHOLD) {
+ } else if (mSsRsrp >= SIGNAL_GOOD_THRESHOLD) {
mLevel = SIGNAL_STRENGTH_GOOD;
- } else if (mCsiRsrp >= SIGNAL_MODERATE_THRESHOLD) {
+ } else if (mSsRsrp >= SIGNAL_MODERATE_THRESHOLD) {
mLevel = SIGNAL_STRENGTH_MODERATE;
} else {
mLevel = SIGNAL_STRENGTH_POOR;
@@ -212,7 +212,7 @@
*
* Asu is calculated based on 3GPP RSRP. Refer to 3GPP 27.007 (Ver 10.3.0) Sec 8.69
*
- * @return RSCP in ASU 0..97, 255, or UNAVAILABLE
+ * @return RSRP in ASU 0..97, 255, or UNAVAILABLE
*/
@Override
public int getAsuLevel() {
@@ -231,11 +231,11 @@
}
/**
- * Get the CSI-RSRP as dBm value -140..-44dBm or {@link CellInfo#UNAVAILABLE UNAVAILABLE}.
+ * Get the SS-RSRP as dBm value -140..-44dBm or {@link CellInfo#UNAVAILABLE UNAVAILABLE}.
*/
@Override
public int getDbm() {
- return mCsiRsrp;
+ return mSsRsrp;
}
/** @hide */
diff --git a/telephony/java/android/telephony/ImsiEncryptionInfo.java b/telephony/java/android/telephony/ImsiEncryptionInfo.java
index ef2f121..75a79d6 100644
--- a/telephony/java/android/telephony/ImsiEncryptionInfo.java
+++ b/telephony/java/android/telephony/ImsiEncryptionInfo.java
@@ -15,9 +15,11 @@
*/
package android.telephony;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-import java.util.Date;
import android.util.Log;
import java.security.KeyFactory;
@@ -25,18 +27,18 @@
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec;
+import java.util.Date;
/**
* Class to represent information sent by the carrier, which will be used to encrypt
* the IMSI + IMPI. The ecryption is being done by WLAN, and the modem.
- *
* @hide
*/
+@SystemApi
public final class ImsiEncryptionInfo implements Parcelable {
private static final String LOG_TAG = "ImsiEncryptionInfo";
-
private final String mcc;
private final String mnc;
private final PublicKey publicKey;
@@ -45,11 +47,13 @@
//Date-Time in UTC when the key will expire.
private final Date expirationTime;
+ /** @hide */
public ImsiEncryptionInfo(String mcc, String mnc, int keyType, String keyIdentifier,
byte[] key, Date expirationTime) {
this(mcc, mnc, keyType, keyIdentifier, makeKeyObject(key), expirationTime);
}
+ /** @hide */
public ImsiEncryptionInfo(String mcc, String mnc, int keyType, String keyIdentifier,
PublicKey publicKey, Date expirationTime) {
// todo need to validate that ImsiEncryptionInfo is being created with the correct params.
@@ -63,6 +67,7 @@
this.expirationTime = expirationTime;
}
+ /** @hide */
public ImsiEncryptionInfo(Parcel in) {
int length = in.readInt();
byte b[] = new byte[length];
@@ -75,26 +80,40 @@
expirationTime = new Date(in.readLong());
}
+ /** @hide */
public String getMnc() {
return this.mnc;
}
+ /** @hide */
public String getMcc() {
return this.mcc;
}
+ /**
+ * Returns key identifier, a string that helps the authentication server to locate the
+ * private key to decrypt the permanent identity, or {@code null} when uavailable.
+ */
+ @Nullable
public String getKeyIdentifier() {
return this.keyIdentifier;
}
+ /** @hide */
public int getKeyType() {
return this.keyType;
}
+ /**
+ * Returns the carrier public key that is used for the IMSI encryption,
+ * or {@code null} when uavailable.
+ */
+ @Nullable
public PublicKey getPublicKey() {
return this.publicKey;
}
+ /** @hide */
public Date getExpirationTime() {
return this.expirationTime;
}
@@ -115,7 +134,7 @@
return 0;
}
- public static final @android.annotation.NonNull Parcelable.Creator<ImsiEncryptionInfo> CREATOR =
+ public static final @NonNull Parcelable.Creator<ImsiEncryptionInfo> CREATOR =
new Parcelable.Creator<ImsiEncryptionInfo>() {
@Override
public ImsiEncryptionInfo createFromParcel(Parcel in) {
@@ -129,7 +148,7 @@
};
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
byte[] b = publicKey.getEncoded();
dest.writeInt(b.length);
dest.writeByteArray(b);
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index ee291fa..2c16110 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -2669,4 +2669,74 @@
}
return SmsManager.SMS_CATEGORY_NOT_SHORT_CODE;
}
+
+ /**
+ * Gets the SMSC address from (U)SIM.
+ *
+ * <p class="note"><strong>Note:</strong> Using this method requires that your app is the
+ * default SMS application, or READ_PRIVILEGED_PHONE_STATE permission, or has the carrier
+ * privileges.</p>
+ *
+ * <p class="note"><strong>Note:</strong> This method will never trigger an SMS disambiguation
+ * dialog. If this method is called on a device that has multiple active subscriptions, this
+ * {@link SmsManager} instance has been created with {@link #getDefault()}, and no user-defined
+ * default subscription is defined, the subscription ID associated with this method will be
+ * INVALID, which will result in the operation being completed on the subscription associated
+ * with logical slot 0. Use {@link #getSmsManagerForSubscriptionId(int)} to ensure the operation
+ * is performed on the correct subscription.
+ * </p>
+ *
+ * @return the SMSC address string, null if failed.
+ */
+ @SuppressAutoDoc // for carrier privileges and default SMS application.
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @Nullable
+ public String getSmscAddress() {
+ String smsc = null;
+
+ try {
+ ISms iSms = getISmsService();
+ if (iSms != null) {
+ smsc = iSms.getSmscAddressFromIccEfForSubscriber(
+ getSubscriptionId(), ActivityThread.currentPackageName());
+ }
+ } catch (RemoteException ex) {
+ // ignore it
+ }
+ return smsc;
+ }
+
+ /**
+ * Sets the SMSC address on (U)SIM.
+ *
+ * <p class="note"><strong>Note:</strong> Using this method requires that your app is the
+ * default SMS application, or has {@link android.Manifest.permission#MODIFY_PHONE_STATE}
+ * permission, or has the carrier privileges.</p>
+ *
+ * <p class="note"><strong>Note:</strong> This method will never trigger an SMS disambiguation
+ * dialog. If this method is called on a device that has multiple active subscriptions, this
+ * {@link SmsManager} instance has been created with {@link #getDefault()}, and no user-defined
+ * default subscription is defined, the subscription ID associated with this method will be
+ * INVALID, which will result in the operation being completed on the subscription associated
+ * with logical slot 0. Use {@link #getSmsManagerForSubscriptionId(int)} to ensure the operation
+ * is performed on the correct subscription.
+ * </p>
+ *
+ * @param smsc the SMSC address string.
+ * @return true for success, false otherwise.
+ */
+ @SuppressAutoDoc // for carrier privileges and default SMS application.
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public boolean setSmscAddress(@NonNull String smsc) {
+ try {
+ ISms iSms = getISmsService();
+ if (iSms != null) {
+ return iSms.setSmscAddressOnIccEfForSubscriber(
+ smsc, getSubscriptionId(), ActivityThread.currentPackageName());
+ }
+ } catch (RemoteException ex) {
+ // ignore it
+ }
+ return false;
+ }
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 8455e3d..3c22a07 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -197,12 +197,29 @@
/** @hide */
static public final int OTASP_SIM_UNPROVISIONED = 5;
- /** @hide */
+ /**
+ * Used in carrier Wi-Fi for IMSI + IMPI encryption, this indicates a public key that's
+ * available for use in ePDG links.
+ *
+ * @hide
+ */
+ @SystemApi
static public final int KEY_TYPE_EPDG = 1;
- /** @hide */
+ /**
+ * Used in carrier Wi-Fi for IMSI + IMPI encryption, this indicates a public key that's
+ * available for use in WLAN links.
+ *
+ * @hide
+ */
+ @SystemApi
static public final int KEY_TYPE_WLAN = 2;
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"KEY_TYPE_"}, value = {KEY_TYPE_EPDG, KEY_TYPE_WLAN})
+ public @interface KeyType {}
+
/**
* No Single Radio Voice Call Continuity (SRVCC) handover is active.
* See TS 23.216 for more information.
@@ -3874,25 +3891,27 @@
}
/**
- * Returns Carrier specific information that will be used to encrypt the IMSI and IMPI.
- * This includes the public key and the key identifier. For multi-sim devices, if no subId
- * has been specified, we will return the value for the dafault data sim.
- * Return null if it is unavailable.
+ * Returns carrier specific information that will be used to encrypt the IMSI and IMPI,
+ * including the public key and the key identifier; or {@code null} if not available.
* <p>
- * Requires Permission:
- * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
- * @param keyType whether the key is being used for wlan or epdg. Valid key types are
- * {@link TelephonyManager#KEY_TYPE_EPDG} or
- * {@link TelephonyManager#KEY_TYPE_WLAN}.
+ * For a multi-sim device, the dafault data sim is used if not specified.
+ * <p>
+ * Requires Permission: READ_PRIVILEGED_PHONE_STATE.
+ *
+ * @param keyType whether the key is being used for EPDG or WLAN. Valid values are
+ * {@link #KEY_TYPE_EPDG} or {@link #KEY_TYPE_WLAN}.
* @return ImsiEncryptionInfo Carrier specific information that will be used to encrypt the
* IMSI and IMPI. This includes the public key and the key identifier. This information
- * will be stored in the device keystore. The system will return a null when no key was
- * found, and the carrier does not require a key. The system will throw
- * IllegalArgumentException when an invalid key is sent or when key is required but
+ * will be stored in the device keystore. {@code null} will be returned when no key is
+ * found, and the carrier does not require a key.
+ * @throws IllegalArgumentException when an invalid key is found or when key is required but
* not found.
* @hide
*/
- public ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int keyType) {
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @SystemApi
+ @Nullable
+ public ImsiEncryptionInfo getCarrierInfoForImsiEncryption(@KeyType int keyType) {
try {
IPhoneSubInfo info = getSubscriberInfo();
if (info == null) {
@@ -3920,14 +3939,21 @@
}
/**
- * Resets the Carrier Keys in the database. This involves 2 steps:
+ * Resets the carrier keys used to encrypt the IMSI and IMPI.
+ * <p>
+ * This involves 2 steps:
* 1. Delete the keys from the database.
* 2. Send an intent to download new Certificates.
* <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * For a multi-sim device, the dafault data sim is used if not specified.
+ * <p>
+ * Requires Permission: MODIFY_PHONE_STATE.
+ *
+ * @see #getCarrierInfoForImsiEncryption
* @hide
*/
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ @SystemApi
public void resetCarrierKeysForImsiEncryption() {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -3954,7 +3980,7 @@
* @return true if the digit at position keyType is 1, else false.
* @hide
*/
- private static boolean isKeyEnabled(int keyAvailability, int keyType) {
+ private static boolean isKeyEnabled(int keyAvailability, @KeyType int keyType) {
int returnValue = (keyAvailability >> (keyType - 1)) & 1;
return (returnValue == 1) ? true : false;
}
@@ -3963,7 +3989,7 @@
* If Carrier requires Imsi to be encrypted.
* @hide
*/
- private boolean isImsiEncryptionRequired(int subId, int keyType) {
+ private boolean isImsiEncryptionRequired(int subId, @KeyType int keyType) {
CarrierConfigManager configManager =
(CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
if (configManager == null) {
@@ -9498,16 +9524,28 @@
return returnValue;
}
- private int getSubIdForPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) {
+ /**
+ * Returns the subscription ID for the given phone account handle.
+ *
+ * @param phoneAccountHandle the phone account handle for outgoing calls
+ * @return subscription ID for the given phone account handle; or
+ * {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID}
+ * if not available; or throw a SecurityException if the caller doesn't have the
+ * permission.
+ */
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ public int getSubIdForPhoneAccountHandle(@NonNull PhoneAccountHandle phoneAccountHandle) {
int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
try {
- ITelecomService service = getTelecomService();
+ ITelephony service = getITelephony();
if (service != null) {
- retval = getSubIdForPhoneAccount(service.getPhoneAccount(phoneAccountHandle));
+ retval = service.getSubIdForPhoneAccountHandle(
+ phoneAccountHandle, mContext.getOpPackageName());
}
- } catch (RemoteException e) {
+ } catch (RemoteException ex) {
+ Log.e(TAG, "getSubIdForPhoneAccountHandle RemoteException", ex);
+ ex.rethrowAsRuntimeException();
}
-
return retval;
}
@@ -10876,6 +10914,16 @@
}
/**
+ * Broadcast intent action for Ota emergency number database installation complete.
+ *
+ * @hide
+ */
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @SystemApi
+ public static final String ACTION_OTA_EMERGENCY_NUMBER_DB_INSTALLED =
+ "android.telephony.action.OTA_EMERGENCY_NUMBER_DB_INSTALLED";
+
+ /**
* Returns whether {@link TelephonyManager#ACTION_EMERGENCY_ASSISTANCE emergency assistance} is
* available on the device.
* <p>
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index f3a335d..91aa3ce 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -574,4 +574,23 @@
* @param destAddress the destination address to test for possible short code
*/
int checkSmsShortCodeDestination(int subId, String callingApk, String destAddress, String countryIso);
+
+ /**
+ * Gets the SMSC address from (U)SIM.
+ *
+ * @param subId the subscription Id.
+ * @param callingPackage the package name of the calling app.
+ * @return the SMSC address string, null if failed.
+ */
+ String getSmscAddressFromIccEfForSubscriber(int subId, String callingPackage);
+
+ /**
+ * Sets the SMSC address on (U)SIM.
+ *
+ * @param smsc the SMSC address string.
+ * @param subId the subscription Id.
+ * @param callingPackage the package name of the calling app.
+ * @return true for success, false otherwise.
+ */
+ boolean setSmscAddressOnIccEfForSubscriber(String smsc, int subId, String callingPackage);
}
diff --git a/telephony/java/com/android/internal/telephony/ISmsImplBase.java b/telephony/java/com/android/internal/telephony/ISmsImplBase.java
index 2096325..d9d4b60 100644
--- a/telephony/java/com/android/internal/telephony/ISmsImplBase.java
+++ b/telephony/java/com/android/internal/telephony/ISmsImplBase.java
@@ -201,4 +201,15 @@
int subid, String callingApk, String destAddress, String countryIso) {
throw new UnsupportedOperationException();
}
+
+ @Override
+ public String getSmscAddressFromIccEfForSubscriber(int subId, String callingPackage) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean setSmscAddressOnIccEfForSubscriber(
+ String smsc, int subId, String callingPackage) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index ba3ffd4..3163102 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1313,6 +1313,12 @@
int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
/**
+ * Returns the subscription ID associated with the specified PhoneAccountHandle.
+ */
+ int getSubIdForPhoneAccountHandle(in PhoneAccountHandle phoneAccountHandle,
+ String callingPackage);
+
+ /**
* Returns the PhoneAccountHandle associated with a subscription ID.
*/
PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId);
diff --git a/tests/Codegen/runTest.sh b/tests/Codegen/runTest.sh
index 929f122..31ab6d2 100755
--- a/tests/Codegen/runTest.sh
+++ b/tests/Codegen/runTest.sh
@@ -17,6 +17,7 @@
header_and_eval codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java && \
header_and_eval codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java && \
header_and_eval codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java && \
+ header_and_eval codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java && \
(
cd $ANDROID_BUILD_TOP &&
header_and_eval mmma -j16 frameworks/base/tests/Codegen && \
diff --git a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java
index 325c1c0..56ad217 100644
--- a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java
+++ b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java
@@ -32,7 +32,7 @@
- // Code below generated by codegen v1.0.9.
+ // Code below generated by codegen v1.0.11.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -98,11 +98,15 @@
};
@DataClass.Generated(
- time = 1571258914826L,
- codegenVersion = "1.0.9",
+ time = 1572630437620L,
+ codegenVersion = "1.0.11",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java",
inputSignatures = "private int mBaseData\nclass HierrarchicalDataClassBase extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genSetters=true)")
@Deprecated
private void __metadata() {}
+
+ //@formatter:on
+ // End of generated code
+
}
diff --git a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java
index 6c92009..59e07c4 100644
--- a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java
+++ b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java
@@ -46,7 +46,7 @@
- // Code below generated by codegen v1.0.9.
+ // Code below generated by codegen v1.0.11.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -120,11 +120,15 @@
};
@DataClass.Generated(
- time = 1571258915848L,
- codegenVersion = "1.0.9",
+ time = 1572630438646L,
+ codegenVersion = "1.0.11",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java",
inputSignatures = "private @android.annotation.NonNull java.lang.String mChildData\nclass HierrarchicalDataClassChild extends com.android.codegentest.HierrarchicalDataClassBase implements []\n@com.android.internal.util.DataClass(genParcelable=true, genConstructor=false, genSetters=true)")
@Deprecated
private void __metadata() {}
+
+ //@formatter:on
+ // End of generated code
+
}
diff --git a/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java b/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java
index 36def8a..3c00a3a 100644
--- a/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java
+++ b/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java
@@ -52,7 +52,7 @@
- // Code below generated by codegen v1.0.9.
+ // Code below generated by codegen v1.0.11.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -361,7 +361,7 @@
}
/** Builds the instance. This builder should not be touched after calling this! */
- public ParcelAllTheThingsDataClass build() {
+ public @NonNull ParcelAllTheThingsDataClass build() {
checkNotUsed();
mBuilderFieldsSet |= 0x100; // Mark builder used
@@ -410,11 +410,15 @@
}
@DataClass.Generated(
- time = 1571258913802L,
- codegenVersion = "1.0.9",
+ time = 1572630436563L,
+ codegenVersion = "1.0.11",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java",
inputSignatures = " @android.annotation.NonNull java.lang.String[] mStringArray\n @android.annotation.NonNull int[] mIntArray\n @android.annotation.NonNull java.util.List<java.lang.String> mStringList\n @android.annotation.NonNull java.util.Map<java.lang.String,com.android.codegentest.SampleWithCustomBuilder> mMap\n @android.annotation.NonNull java.util.Map<java.lang.String,java.lang.String> mStringMap\n @android.annotation.NonNull android.util.SparseArray<com.android.codegentest.SampleWithCustomBuilder> mSparseArray\n @android.annotation.NonNull android.util.SparseIntArray mSparseIntArray\n @java.lang.SuppressWarnings({\"WeakerAccess\"}) @android.annotation.Nullable java.lang.Boolean mNullableBoolean\nclass ParcelAllTheThingsDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)")
@Deprecated
private void __metadata() {}
+
+ //@formatter:on
+ // End of generated code
+
}
diff --git a/tests/Codegen/src/com/android/codegentest/SampleDataClass.java b/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
index c444d61..9765bdc 100644
--- a/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
+++ b/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
@@ -342,7 +342,7 @@
- // Code below generated by codegen v1.0.9.
+ // Code below generated by codegen v1.0.11.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -1430,7 +1430,7 @@
*/
@SuppressWarnings("WeakerAccess")
@DataClass.Generated.Member
- public static class Builder {
+ public static final class Builder {
private int mNum;
private int mNum2;
@@ -1793,7 +1793,7 @@
}
/** Builds the instance. This builder should not be touched after calling this! */
- public SampleDataClass build() {
+ public @NonNull SampleDataClass build() {
checkNotUsed();
mBuilderFieldsSet |= 0x100000; // Mark builder used
@@ -1872,11 +1872,15 @@
}
@DataClass.Generated(
- time = 1571258911688L,
- codegenVersion = "1.0.9",
+ time = 1572630434434L,
+ codegenVersion = "1.0.11",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleDataClass.java",
inputSignatures = "public static final java.lang.String STATE_NAME_UNDEFINED\npublic static final java.lang.String STATE_NAME_ON\npublic static final java.lang.String STATE_NAME_OFF\npublic static final int STATE_UNDEFINED\npublic static final int STATE_ON\npublic static final int STATE_OFF\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_AUGMENTED_REQUEST\nprivate int mNum\nprivate int mNum2\nprivate int mNum4\nprivate @android.annotation.Nullable java.lang.String mName\nprivate @android.annotation.NonNull java.lang.String mName2\nprivate @android.annotation.NonNull java.lang.String mName4\nprivate @android.annotation.Nullable android.view.accessibility.AccessibilityNodeInfo mOtherParcelable\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.codegentest.MyDateParcelling.class) @android.annotation.NonNull java.util.Date mDate\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForPattern.class) @android.annotation.NonNull java.util.regex.Pattern mPattern\nprivate @android.annotation.NonNull java.util.List<android.net.LinkAddress> mLinkAddresses2\nprivate @com.android.internal.util.DataClass.PluralOf(\"linkAddress\") @android.annotation.NonNull java.util.ArrayList<android.net.LinkAddress> mLinkAddresses\nprivate @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses4\nprivate @com.android.codegentest.SampleDataClass.StateName @android.annotation.NonNull java.lang.String mStateName\nprivate @com.android.codegentest.SampleDataClass.RequestFlags int mFlags\nprivate @com.android.codegentest.SampleDataClass.State int mState\npublic @android.annotation.NonNull java.lang.CharSequence charSeq\nprivate final @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses5\nprivate transient android.net.LinkAddress[] mLinkAddresses6\ntransient int[] mTmpStorage\nprivate @android.annotation.StringRes int mStringRes\nprivate @android.annotation.IntRange(from=0L, to=6L) int mDayOfWeek\nprivate @android.annotation.Size(2L) @android.annotation.NonNull @com.android.internal.util.DataClass.Each @android.annotation.FloatRange(from=0.0) float[] mCoords\nprivate static java.lang.String defaultName4()\nprivate int[] lazyInitTmpStorage()\npublic android.net.LinkAddress[] getLinkAddresses4()\nprivate boolean patternEquals(java.util.regex.Pattern)\nprivate int patternHashCode()\nprivate void onConstructed()\npublic void dump(java.io.PrintWriter)\nclass SampleDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genConstructor=true, genEqualsHashCode=true, genToString=true, genForEachField=true, genSetters=true)")
@Deprecated
private void __metadata() {}
+
+ //@formatter:on
+ // End of generated code
+
}
diff --git a/tests/Codegen/src/com/android/codegentest/SampleDataClassTest.java b/tests/Codegen/src/com/android/codegentest/SampleDataClassTest.java
index c7a7735..d132577 100644
--- a/tests/Codegen/src/com/android/codegentest/SampleDataClassTest.java
+++ b/tests/Codegen/src/com/android/codegentest/SampleDataClassTest.java
@@ -243,6 +243,26 @@
assertEquals(instance.toString(), unparceledInstance.toString());
}
+ @Test
+ public void testNestedDataClasses_notMangledWhenParceled() {
+ assertEqualsAfterParcelling(
+ new SampleWithNestedDataClasses.NestedDataClass("1"),
+ SampleWithNestedDataClasses.NestedDataClass.CREATOR);
+
+ assertEqualsAfterParcelling(
+ new SampleWithNestedDataClasses.NestedDataClass2("2"),
+ SampleWithNestedDataClasses.NestedDataClass2.CREATOR);
+
+ assertEqualsAfterParcelling(
+ new SampleWithNestedDataClasses.NestedDataClass2.NestedDataClass3(3),
+ SampleWithNestedDataClasses.NestedDataClass2.NestedDataClass3.CREATOR);
+ }
+
+ private static <T extends Parcelable> void assertEqualsAfterParcelling(
+ T p, Parcelable.Creator<T> creator) {
+ assertEquals(p, parcelAndUnparcel(p, creator));
+ }
+
private static <T extends Parcelable> T parcelAndUnparcel(
T original, Parcelable.Creator<T> creator) {
Parcel p = Parcel.obtain();
diff --git a/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java b/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java
index 55feae7..c62f2b8 100644
--- a/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java
+++ b/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java
@@ -85,7 +85,7 @@
- // Code below generated by codegen v1.0.9.
+ // Code below generated by codegen v1.0.11.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -224,7 +224,7 @@
}
/** Builds the instance. This builder should not be touched after calling this! */
- public SampleWithCustomBuilder build() {
+ public @NonNull SampleWithCustomBuilder build() {
checkNotUsed();
mBuilderFieldsSet |= 0x8; // Mark builder used
@@ -253,11 +253,15 @@
}
@DataClass.Generated(
- time = 1571258912752L,
- codegenVersion = "1.0.9",
+ time = 1572630435484L,
+ codegenVersion = "1.0.11",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java",
inputSignatures = " long delayAmount\n @android.annotation.NonNull java.util.concurrent.TimeUnit delayUnit\n long creationTimestamp\nprivate static java.util.concurrent.TimeUnit unparcelDelayUnit(android.os.Parcel)\nprivate void parcelDelayUnit(android.os.Parcel,int)\nclass SampleWithCustomBuilder extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)\nabstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayAmount(long)\npublic abstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayUnit(java.util.concurrent.TimeUnit)\npublic com.android.codegentest.SampleWithCustomBuilder.Builder setDelay(long,java.util.concurrent.TimeUnit)\nclass BaseBuilder extends java.lang.Object implements []")
@Deprecated
private void __metadata() {}
+
+ //@formatter:on
+ // End of generated code
+
}
diff --git a/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java b/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
new file mode 100644
index 0000000..5b93b38
--- /dev/null
+++ b/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
@@ -0,0 +1,390 @@
+/*
+ * 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.
+ */
+
+package com.android.codegentest;
+
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import com.android.internal.util.DataClass;
+
+/**
+ * An example of deeply nested data classes
+ */
+public class SampleWithNestedDataClasses {
+
+ int mFoo = 0;
+
+ @DataClass(genEqualsHashCode = true)
+ public static class NestedDataClass implements Parcelable {
+
+ @NonNull String mBar;
+
+
+
+ // Code below generated by codegen v1.0.11.
+ //
+ // DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
+ //
+ // To regenerate run:
+ // $ codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
+ //
+ // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
+ // Settings > Editor > Code Style > Formatter Control
+ //@formatter:off
+
+
+ @DataClass.Generated.Member
+ public NestedDataClass(
+ @NonNull String bar) {
+ this.mBar = bar;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mBar);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public @NonNull String getBar() {
+ return mBar;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public boolean equals(@android.annotation.Nullable Object o) {
+ // You can override field equality logic by defining either of the methods like:
+ // boolean fieldNameEquals(NestedDataClass other) { ... }
+ // boolean fieldNameEquals(FieldType otherValue) { ... }
+
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ @SuppressWarnings("unchecked")
+ NestedDataClass that = (NestedDataClass) o;
+ //noinspection PointlessBooleanExpression
+ return true
+ && java.util.Objects.equals(mBar, that.mBar);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int hashCode() {
+ // You can override field hashCode logic by defining methods like:
+ // int fieldNameHashCode() { ... }
+
+ int _hash = 1;
+ _hash = 31 * _hash + java.util.Objects.hashCode(mBar);
+ return _hash;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ // You can override field parcelling by defining methods like:
+ // void parcelFieldName(Parcel dest, int flags) { ... }
+
+ dest.writeString(mBar);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int describeContents() { return 0; }
+
+ /** @hide */
+ @SuppressWarnings({"unchecked", "RedundantCast"})
+ @DataClass.Generated.Member
+ protected NestedDataClass(@NonNull Parcel in) {
+ // You can override field unparcelling by defining methods like:
+ // static FieldType unparcelFieldName(Parcel in) { ... }
+
+ String bar = in.readString();
+
+ this.mBar = bar;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mBar);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public static final @NonNull Parcelable.Creator<NestedDataClass> CREATOR
+ = new Parcelable.Creator<NestedDataClass>() {
+ @Override
+ public NestedDataClass[] newArray(int size) {
+ return new NestedDataClass[size];
+ }
+
+ @Override
+ public NestedDataClass createFromParcel(@NonNull Parcel in) {
+ return new NestedDataClass(in);
+ }
+ };
+
+ @DataClass.Generated(
+ time = 1572630440713L,
+ codegenVersion = "1.0.11",
+ sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java",
+ inputSignatures = " @android.annotation.NonNull java.lang.String mBar\nclass NestedDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true)")
+ @Deprecated
+ private void __metadata() {}
+
+
+ //@formatter:on
+ // End of generated code
+
+ }
+
+ @DataClass(genEqualsHashCode = true)
+ public static class NestedDataClass2 implements Parcelable {
+
+ @NonNull String mBaz;
+
+ @DataClass(genEqualsHashCode = true)
+ public static class NestedDataClass3 implements Parcelable {
+
+ @NonNull long mBaz2;
+
+
+
+ // Code below generated by codegen v1.0.11.
+ //
+ // DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
+ //
+ // To regenerate run:
+ // $ codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
+ //
+ // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
+ // Settings > Editor > Code Style > Formatter Control
+ //@formatter:off
+
+
+ @DataClass.Generated.Member
+ public NestedDataClass3(
+ @NonNull long baz2) {
+ this.mBaz2 = baz2;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mBaz2);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public @NonNull long getBaz2() {
+ return mBaz2;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public boolean equals(@android.annotation.Nullable Object o) {
+ // You can override field equality logic by defining either of the methods like:
+ // boolean fieldNameEquals(NestedDataClass3 other) { ... }
+ // boolean fieldNameEquals(FieldType otherValue) { ... }
+
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ @SuppressWarnings("unchecked")
+ NestedDataClass3 that = (NestedDataClass3) o;
+ //noinspection PointlessBooleanExpression
+ return true
+ && mBaz2 == that.mBaz2;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int hashCode() {
+ // You can override field hashCode logic by defining methods like:
+ // int fieldNameHashCode() { ... }
+
+ int _hash = 1;
+ _hash = 31 * _hash + Long.hashCode(mBaz2);
+ return _hash;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ // You can override field parcelling by defining methods like:
+ // void parcelFieldName(Parcel dest, int flags) { ... }
+
+ dest.writeLong(mBaz2);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int describeContents() { return 0; }
+
+ /** @hide */
+ @SuppressWarnings({"unchecked", "RedundantCast"})
+ @DataClass.Generated.Member
+ protected NestedDataClass3(@NonNull Parcel in) {
+ // You can override field unparcelling by defining methods like:
+ // static FieldType unparcelFieldName(Parcel in) { ... }
+
+ long baz2 = in.readLong();
+
+ this.mBaz2 = baz2;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mBaz2);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public static final @NonNull Parcelable.Creator<NestedDataClass3> CREATOR
+ = new Parcelable.Creator<NestedDataClass3>() {
+ @Override
+ public NestedDataClass3[] newArray(int size) {
+ return new NestedDataClass3[size];
+ }
+
+ @Override
+ public NestedDataClass3 createFromParcel(@NonNull Parcel in) {
+ return new NestedDataClass3(in);
+ }
+ };
+
+ @DataClass.Generated(
+ time = 1572630440724L,
+ codegenVersion = "1.0.11",
+ sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java",
+ inputSignatures = " @android.annotation.NonNull long mBaz2\nclass NestedDataClass3 extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true)")
+ @Deprecated
+ private void __metadata() {}
+
+
+ //@formatter:on
+ // End of generated code
+
+ }
+
+
+
+ // Code below generated by codegen v1.0.11.
+ //
+ // DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
+ //
+ // To regenerate run:
+ // $ codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
+ //
+ // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
+ // Settings > Editor > Code Style > Formatter Control
+ //@formatter:off
+
+
+ @DataClass.Generated.Member
+ public NestedDataClass2(
+ @NonNull String baz) {
+ this.mBaz = baz;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mBaz);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public @NonNull String getBaz() {
+ return mBaz;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public boolean equals(@android.annotation.Nullable Object o) {
+ // You can override field equality logic by defining either of the methods like:
+ // boolean fieldNameEquals(NestedDataClass2 other) { ... }
+ // boolean fieldNameEquals(FieldType otherValue) { ... }
+
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ @SuppressWarnings("unchecked")
+ NestedDataClass2 that = (NestedDataClass2) o;
+ //noinspection PointlessBooleanExpression
+ return true
+ && java.util.Objects.equals(mBaz, that.mBaz);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int hashCode() {
+ // You can override field hashCode logic by defining methods like:
+ // int fieldNameHashCode() { ... }
+
+ int _hash = 1;
+ _hash = 31 * _hash + java.util.Objects.hashCode(mBaz);
+ return _hash;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ // You can override field parcelling by defining methods like:
+ // void parcelFieldName(Parcel dest, int flags) { ... }
+
+ dest.writeString(mBaz);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int describeContents() { return 0; }
+
+ /** @hide */
+ @SuppressWarnings({"unchecked", "RedundantCast"})
+ @DataClass.Generated.Member
+ protected NestedDataClass2(@NonNull Parcel in) {
+ // You can override field unparcelling by defining methods like:
+ // static FieldType unparcelFieldName(Parcel in) { ... }
+
+ String baz = in.readString();
+
+ this.mBaz = baz;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mBaz);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public static final @NonNull Parcelable.Creator<NestedDataClass2> CREATOR
+ = new Parcelable.Creator<NestedDataClass2>() {
+ @Override
+ public NestedDataClass2[] newArray(int size) {
+ return new NestedDataClass2[size];
+ }
+
+ @Override
+ public NestedDataClass2 createFromParcel(@NonNull Parcel in) {
+ return new NestedDataClass2(in);
+ }
+ };
+
+ @DataClass.Generated(
+ time = 1572630440729L,
+ codegenVersion = "1.0.11",
+ sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java",
+ inputSignatures = " @android.annotation.NonNull java.lang.String mBaz\nclass NestedDataClass2 extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true)")
+ @Deprecated
+ private void __metadata() {}
+
+
+ //@formatter:on
+ // End of generated code
+
+ }
+
+ void someCode() {}
+}
diff --git a/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java b/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java
index b967f19..2964451 100644
--- a/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java
+++ b/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java
@@ -51,7 +51,7 @@
- // Code below generated by codegen v1.0.9.
+ // Code below generated by codegen v1.0.11.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -65,11 +65,15 @@
@DataClass.Generated(
- time = 1571258916868L,
- codegenVersion = "1.0.9",
+ time = 1572630439617L,
+ codegenVersion = "1.0.11",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java",
inputSignatures = "public @android.annotation.NonNull java.lang.String someMethod(int)\nclass StaleDataclassDetectorFalsePositivesTest extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=false)")
@Deprecated
private void __metadata() {}
+
+ //@formatter:on
+ // End of generated code
+
}
diff --git a/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java b/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java
index c10169b..e3d9c35 100644
--- a/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java
+++ b/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java
@@ -24,8 +24,7 @@
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -50,20 +49,6 @@
phase));
}
- @Before
- public void setUp() throws Exception {
- // Disconnect internet so we can test network health triggered rollbacks
- getDevice().executeShellCommand("svc wifi disable");
- getDevice().executeShellCommand("svc data disable");
- }
-
- @After
- public void tearDown() throws Exception {
- // Reconnect internet after testing network health triggered rollbacks
- getDevice().executeShellCommand("svc wifi enable");
- getDevice().executeShellCommand("svc data enable");
- }
-
/**
* Tests watchdog triggered staged rollbacks involving only apks.
*/
@@ -121,6 +106,10 @@
*/
@Test
public void testNetworkFailedRollback() throws Exception {
+ // Disconnect internet so we can test network health triggered rollbacks
+ getDevice().executeShellCommand("svc wifi disable");
+ getDevice().executeShellCommand("svc data disable");
+
// Remove available rollbacks and uninstall NetworkStack on /data/
runPhase("testNetworkFailedRollback_Phase1");
// Reduce health check deadline
@@ -148,6 +137,7 @@
* Tests passed network health check does not trigger watchdog staged rollbacks.
*/
@Test
+ @Ignore("b/143514090")
public void testNetworkPassedDoesNotRollback() throws Exception {
// Remove available rollbacks and uninstall NetworkStack on /data/
runPhase("testNetworkPassedDoesNotRollback_Phase1");
diff --git a/tools/codegen/src/com/android/codegen/ClassInfo.kt b/tools/codegen/src/com/android/codegen/ClassInfo.kt
index 92da9da..bf95a2e 100644
--- a/tools/codegen/src/com/android/codegen/ClassInfo.kt
+++ b/tools/codegen/src/com/android/codegen/ClassInfo.kt
@@ -1,47 +1,15 @@
package com.android.codegen
-import com.github.javaparser.ParseProblemException
-import com.github.javaparser.ParseResult
-import com.github.javaparser.ast.CompilationUnit
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration
-open class ClassInfo(val sourceLines: List<String>) {
+open class ClassInfo(val classAst: ClassOrInterfaceDeclaration, val fileInfo: FileInfo) {
- private val userSourceCode = (sourceLines + "}").joinToString("\n")
- val fileAst: CompilationUnit = try {
- JAVA_PARSER.parse(userSourceCode).throwIfFailed()
- } catch (e: ParseProblemException) {
- throw parseFailed(cause = e)
- }
+ val fileAst = fileInfo.fileAst
- fun <T> ParseResult<T>.throwIfFailed(): T {
- if (problems.isNotEmpty()) {
- throw parseFailed(
- desc = this@throwIfFailed.problems.joinToString("\n"),
- cause = this@throwIfFailed.problems.mapNotNull { it.cause.orElse(null) }.firstOrNull())
- }
- return result.get()
- }
-
- private fun parseFailed(cause: Throwable? = null, desc: String = ""): RuntimeException {
- return RuntimeException("Failed to parse code:\n" +
- userSourceCode
- .lines()
- .mapIndexed { lnNum, ln -> "/*$lnNum*/$ln" }
- .joinToString("\n") + "\n$desc",
- cause)
- }
-
- val classAst = fileAst.types[0] as ClassOrInterfaceDeclaration
val nestedClasses = classAst.members.filterIsInstance<ClassOrInterfaceDeclaration>()
- val superInterfaces = (fileAst.types[0] as ClassOrInterfaceDeclaration)
- .implementedTypes.map { it.asString() }
-
- val superClass = run {
- val superClasses = (fileAst.types[0] as ClassOrInterfaceDeclaration).extendedTypes
- if (superClasses.isNonEmpty) superClasses[0] else null
- }
+ val superInterfaces = classAst.implementedTypes.map { it.asString() }
+ val superClass = classAst.extendedTypes.getOrNull(0)
val ClassName = classAst.nameAsString
private val genericArgsAst = classAst.typeParameters
diff --git a/tools/codegen/src/com/android/codegen/ClassPrinter.kt b/tools/codegen/src/com/android/codegen/ClassPrinter.kt
index bd72d9e..a4fd374 100644
--- a/tools/codegen/src/com/android/codegen/ClassPrinter.kt
+++ b/tools/codegen/src/com/android/codegen/ClassPrinter.kt
@@ -11,36 +11,12 @@
* [ClassInfo] + utilities for printing out new class code with proper indentation and imports
*/
class ClassPrinter(
- source: List<String>,
- private val stringBuilder: StringBuilder,
- var cliArgs: Array<String>
-) : ClassInfo(source) {
+ classAst: ClassOrInterfaceDeclaration,
+ fileInfo: FileInfo
+) : ClassInfo(classAst, fileInfo), Printer<ClassPrinter>, ImportsProvider {
val GENERATED_MEMBER_HEADER by lazy { "@$GeneratedMember" }
- // Imports
- val NonNull by lazy { classRef("android.annotation.NonNull") }
- val NonEmpty by lazy { classRef("android.annotation.NonEmpty") }
- val Nullable by lazy { classRef("android.annotation.Nullable") }
- val TextUtils by lazy { classRef("android.text.TextUtils") }
- val LinkedHashMap by lazy { classRef("java.util.LinkedHashMap") }
- val Collections by lazy { classRef("java.util.Collections") }
- val Preconditions by lazy { classRef("com.android.internal.util.Preconditions") }
- val ArrayList by lazy { classRef("java.util.ArrayList") }
- val DataClass by lazy { classRef("com.android.internal.util.DataClass") }
- val DataClassEnum by lazy { classRef("com.android.internal.util.DataClass.Enum") }
- val ParcelWith by lazy { classRef("com.android.internal.util.DataClass.ParcelWith") }
- val PluralOf by lazy { classRef("com.android.internal.util.DataClass.PluralOf") }
- val Each by lazy { classRef("com.android.internal.util.DataClass.Each") }
- val DataClassGenerated by lazy { classRef("com.android.internal.util.DataClass.Generated") }
- val DataClassSuppressConstDefs by lazy { classRef("com.android.internal.util.DataClass.SuppressConstDefsGeneration") }
- val DataClassSuppress by lazy { classRef("com.android.internal.util.DataClass.Suppress") }
- val GeneratedMember by lazy { classRef("com.android.internal.util.DataClass.Generated.Member") }
- val Parcelling by lazy { classRef("com.android.internal.util.Parcelling") }
- val Parcelable by lazy { classRef("android.os.Parcelable") }
- val Parcel by lazy { classRef("android.os.Parcel") }
- val UnsupportedAppUsage by lazy { classRef("android.annotation.UnsupportedAppUsage") }
-
init {
val fieldsWithMissingNullablity = fields.filter { field ->
!field.isPrimitive
@@ -60,49 +36,60 @@
}
}
- /**
- * Optionally shortens a class reference if there's a corresponding import present
- */
- fun classRef(fullName: String): String {
- if (cliArgs.contains(FLAG_NO_FULL_QUALIFIERS)) {
- return fullName.split(".").dropWhile { it[0].isLowerCase() }.joinToString(".")
- }
+ val cliArgs get() = fileInfo.cliArgs
- val pkg = fullName.substringBeforeLast(".")
- val simpleName = fullName.substringAfterLast(".")
- if (fileAst.imports.any { imprt ->
- imprt.nameAsString == fullName
- || (imprt.isAsterisk && imprt.nameAsString == pkg)
- }) {
- return simpleName
- } else {
- val outerClass = pkg.substringAfterLast(".", "")
- if (outerClass.firstOrNull()?.isUpperCase() == true) {
- return classRef(pkg) + "." + simpleName
- }
+ fun print() {
+ currentIndent = fileInfo.sourceLines
+ .find { "class $ClassName" in it }!!
+ .takeWhile { it.isWhitespace() }
+ .plus(INDENT_SINGLE)
+
+ +fileInfo.generatedWarning
+
+ if (FeatureFlag.CONST_DEFS()) generateConstDefs()
+
+
+ if (FeatureFlag.CONSTRUCTOR()) {
+ generateConstructor("public")
+ } else if (FeatureFlag.BUILDER()
+ || FeatureFlag.COPY_CONSTRUCTOR()
+ || FeatureFlag.WITHERS()) {
+ generateConstructor("/* package-private */")
}
- return fullName
+ if (FeatureFlag.COPY_CONSTRUCTOR()) generateCopyConstructor()
+
+ if (FeatureFlag.GETTERS()) generateGetters()
+ if (FeatureFlag.SETTERS()) generateSetters()
+ if (FeatureFlag.TO_STRING()) generateToString()
+ if (FeatureFlag.EQUALS_HASH_CODE()) generateEqualsHashcode()
+
+ if (FeatureFlag.FOR_EACH_FIELD()) generateForEachField()
+
+ if (FeatureFlag.WITHERS()) generateWithers()
+
+ if (FeatureFlag.PARCELABLE()) generateParcelable()
+
+ if (FeatureFlag.BUILDER() && FeatureFlag.BUILD_UPON()) generateBuildUpon()
+ if (FeatureFlag.BUILDER()) generateBuilder()
+
+ if (FeatureFlag.AIDL()) fileInfo.generateAidl() //TODO guard against nested classes requesting aidl
+
+ generateMetadata(fileInfo.file)
+
+ +"""
+ //@formatter:on
+ $GENERATED_END
+
+ """
+
+ rmEmptyLine()
}
- /** @see classRef */
- inline fun <reified T : Any> classRef(): String {
- return classRef(T::class.java.name)
- }
+ override var currentIndent: String
+ get() = fileInfo.currentIndent
+ set(value) { fileInfo.currentIndent = value }
+ override val stringBuilder get() = fileInfo.stringBuilder
- /** @see classRef */
- fun memberRef(fullName: String): String {
- val className = fullName.substringBeforeLast(".")
- val methodName = fullName.substringAfterLast(".")
- return if (fileAst.imports.any {
- it.isStatic
- && (it.nameAsString == fullName
- || (it.isAsterisk && it.nameAsString == className))
- }) {
- className.substringAfterLast(".") + "." + methodName
- } else {
- classRef(className) + "." + methodName
- }
- }
val dataClassAnnotationFeatures = classAst.annotations
.find { it.nameAsString == DataClass }
@@ -143,7 +130,7 @@
|| onByDefault
FeatureFlag.CONSTRUCTOR -> !FeatureFlag.BUILDER()
FeatureFlag.PARCELABLE -> "Parcelable" in superInterfaces
- FeatureFlag.AIDL -> FeatureFlag.PARCELABLE()
+ FeatureFlag.AIDL -> fileInfo.mainClass.nameAsString == ClassName && FeatureFlag.PARCELABLE()
FeatureFlag.IMPLICIT_NONNULL -> fields.any { it.isNullable }
&& fields.none { "@$NonNull" in it.annotations }
else -> onByDefault
@@ -163,162 +150,7 @@
}
}
- var currentIndent = INDENT_SINGLE
- private set
- fun pushIndent() {
- currentIndent += INDENT_SINGLE
- }
-
- fun popIndent() {
- currentIndent = currentIndent.substring(0, currentIndent.length - INDENT_SINGLE.length)
- }
-
- fun backspace() = stringBuilder.setLength(stringBuilder.length - 1)
- val lastChar get() = stringBuilder[stringBuilder.length - 1]
-
- private fun appendRaw(s: String) {
- stringBuilder.append(s)
- }
-
- fun append(s: String) {
- if (s.isBlank() && s != "\n") {
- appendRaw(s)
- } else {
- appendRaw(s.lines().map { line ->
- if (line.startsWith(" *")) line else line.trimStart()
- }.joinToString("\n$currentIndent"))
- }
- }
-
- fun appendSameLine(s: String) {
- while (lastChar.isWhitespace() || lastChar.isNewline()) {
- backspace()
- }
- appendRaw(s)
- }
-
- fun rmEmptyLine() {
- while (lastChar.isWhitespaceNonNewline()) backspace()
- if (lastChar.isNewline()) backspace()
- }
-
- /**
- * Syntactic sugar for:
- * ```
- * +"code()";
- * ```
- * to append the given string plus a newline
- */
- operator fun String.unaryPlus() = append("$this\n")
-
- /**
- * Syntactic sugar for:
- * ```
- * !"code()";
- * ```
- * to append the given string without a newline
- */
- operator fun String.not() = append(this)
-
- /**
- * Syntactic sugar for:
- * ```
- * ... {
- * ...
- * }+";"
- * ```
- * to append a ';' on same line after a block, and a newline afterwards
- */
- operator fun Unit.plus(s: String) {
- appendSameLine(s)
- +""
- }
-
- /**
- * A multi-purpose syntactic sugar for appending the given string plus anything generated in
- * the given [block], the latter with the appropriate deeper indent,
- * and resetting the indent back to original at the end
- *
- * Usage examples:
- *
- * ```
- * "if (...)" {
- * ...
- * }
- * ```
- * to append a corresponding if block appropriate indentation
- *
- * ```
- * "void foo(...)" {
- * ...
- * }
- * ```
- * similar to the previous one, plus an extra empty line after the function body
- *
- * ```
- * "void foo(" {
- * <args code>
- * }
- * ```
- * to use proper indentation for args code and close the bracket on same line at end
- *
- * ```
- * "..." {
- * ...
- * }
- * to use the correct indentation for inner code, resetting it at the end
- */
- inline operator fun String.invoke(block: ClassPrinter.() -> Unit) {
- if (this == " {") {
- appendSameLine(this)
- } else {
- append(this)
- }
- when {
- endsWith("(") -> {
- indentedBy(2, block)
- appendSameLine(")")
- }
- endsWith("{") || endsWith(")") -> {
- if (!endsWith("{")) appendSameLine(" {")
- indentedBy(1, block)
- +"}"
- if ((endsWith(") {") || endsWith(")") || this == " {")
- && !startsWith("synchronized")
- && !startsWith("switch")
- && !startsWith("if ")
- && !contains(" else ")
- && !contains("new ")
- && !contains("return ")) {
- +"" // extra line after function definitions
- }
- }
- else -> indentedBy(2, block)
- }
- }
-
- inline fun indentedBy(level: Int, block: ClassPrinter.() -> Unit) {
- append("\n")
- level times {
- append(INDENT_SINGLE)
- pushIndent()
- }
- block()
- level times { popIndent() }
- rmEmptyLine()
- +""
- }
-
- inline fun Iterable<FieldInfo>.forEachTrimmingTrailingComma(b: FieldInfo.() -> Unit) {
- forEachApply {
- b()
- if (isLast) {
- while (lastChar == ' ' || lastChar == '\n') backspace()
- if (lastChar == ',') backspace()
- }
- }
- }
inline operator fun <R> invoke(f: ClassPrinter.() -> R): R = run(f)
@@ -381,10 +213,10 @@
BuilderClass = (builderFactoryOverride.type as ClassOrInterfaceType).nameAsString
BuilderType = builderFactoryOverride.type.asString()
} else {
- val builderExtension = (fileAst.types
- + classAst.childNodes.filterIsInstance(TypeDeclaration::class.java)).find {
- it.nameAsString == CANONICAL_BUILDER_CLASS
- }
+ val builderExtension = classAst
+ .childNodes
+ .filterIsInstance(TypeDeclaration::class.java)
+ .find { it.nameAsString == CANONICAL_BUILDER_CLASS }
if (builderExtension != null) {
BuilderClass = BASE_BUILDER_CLASS
val tp = (builderExtension as ClassOrInterfaceDeclaration).typeParameters
diff --git a/tools/codegen/src/com/android/codegen/FieldInfo.kt b/tools/codegen/src/com/android/codegen/FieldInfo.kt
index 1a7fd6e..ed35a1d 100644
--- a/tools/codegen/src/com/android/codegen/FieldInfo.kt
+++ b/tools/codegen/src/com/android/codegen/FieldInfo.kt
@@ -1,5 +1,6 @@
package com.android.codegen
+import com.github.javaparser.JavaParser
import com.github.javaparser.ast.body.FieldDeclaration
import com.github.javaparser.ast.expr.ClassExpr
import com.github.javaparser.ast.expr.Name
@@ -111,11 +112,12 @@
val annotations by lazy {
if (FieldClass in BUILTIN_SPECIAL_PARCELLINGS) {
classPrinter {
- fieldAst.addAnnotation(SingleMemberAnnotationExpr(
- Name(ParcelWith),
- ClassExpr(JAVA_PARSER
- .parseClassOrInterfaceType("$Parcelling.BuiltIn.For$FieldClass")
- .throwIfFailed())))
+ fileInfo.apply {
+ fieldAst.addAnnotation(SingleMemberAnnotationExpr(
+ Name(ParcelWith),
+ ClassExpr(parseJava(JavaParser::parseClassOrInterfaceType,
+ "$Parcelling.BuiltIn.For$FieldClass"))))
+ }
}
}
fieldAst.annotations.map { it.removeComment().toString() }
diff --git a/tools/codegen/src/com/android/codegen/FileInfo.kt b/tools/codegen/src/com/android/codegen/FileInfo.kt
new file mode 100644
index 0000000..9c15fbf
--- /dev/null
+++ b/tools/codegen/src/com/android/codegen/FileInfo.kt
@@ -0,0 +1,289 @@
+/*
+ * 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.
+ */
+
+
+package com.android.codegen
+
+import com.github.javaparser.JavaParser
+import com.github.javaparser.ast.CompilationUnit
+import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration
+import com.github.javaparser.ast.body.TypeDeclaration
+import java.io.File
+
+/**
+ * File-level parsing & printing logic
+ *
+ * @see [main] entrypoint
+ */
+class FileInfo(
+ val sourceLines: List<String>,
+ val cliArgs: Array<String>,
+ val file: File)
+ : Printer<FileInfo>, ImportsProvider {
+
+ override val fileAst: CompilationUnit
+ = parseJava(JavaParser::parse, sourceLines.joinToString("\n"))
+
+ override val stringBuilder = StringBuilder()
+ override var currentIndent = INDENT_SINGLE
+
+
+ val generatedWarning = run {
+ val fileEscaped = file.absolutePath.replace(
+ System.getenv("ANDROID_BUILD_TOP"), "\$ANDROID_BUILD_TOP")
+
+ """
+
+
+ // $GENERATED_WARNING_PREFIX v$CODEGEN_VERSION.
+ //
+ // DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
+ //
+ // To regenerate run:
+ // $ $THIS_SCRIPT_LOCATION$CODEGEN_NAME ${cliArgs.dropLast(1).joinToString("") { "$it " }}$fileEscaped
+ //
+ // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
+ // Settings > Editor > Code Style > Formatter Control
+ //@formatter:off
+
+ """
+ }
+ private val generatedWarningNumPrecedingEmptyLines
+ = generatedWarning.lines().takeWhile { it.isBlank() }.size
+
+ val classes = fileAst.types
+ .filterIsInstance<ClassOrInterfaceDeclaration>()
+ .flatMap { it.plusNested() }
+ .filterNot { it.isInterface }
+
+ val mainClass = classes.find { it.nameAsString == file.nameWithoutExtension }!!
+
+ // Parse stage 1
+ val classBounds: List<ClassBounds> = classes.map { ast ->
+ ClassBounds(ast, fileInfo = this)
+ }.apply {
+ forEachApply {
+ if (ast.isNestedType) {
+ val parent = find {
+ it.name == (ast.parentNode.get()!! as TypeDeclaration<*>).nameAsString
+ }!!
+ parent.nested.add(this)
+ nestedIn = parent
+ }
+ }
+ }
+
+ // Parse Stage 2
+ var codeChunks = buildList<CodeChunk> {
+ val mainClassBounds = classBounds.find { it.nestedIn == null }!!
+ add(CodeChunk.FileHeader(
+ mainClassBounds.fileInfo.sourceLines.subList(0, mainClassBounds.range.start)))
+ add(CodeChunk.DataClass.parse(mainClassBounds))
+ }
+
+ // Output stage
+ fun main() {
+ codeChunks.forEach { print(it) }
+ }
+
+ fun print(chunk: CodeChunk) {
+ when(chunk) {
+ is CodeChunk.GeneratedCode -> {
+ // Re-parse class code, discarding generated code and nested dataclasses
+ val ast = chunk.owner.chunks
+ .filter {
+ it.javaClass == CodeChunk.Code::class.java
+ || it.javaClass == CodeChunk.ClosingBrace::class.java
+ }
+ .flatMap { (it as CodeChunk.Code).lines }
+ .joinToString("\n")
+ .let {
+ parseJava(JavaParser::parseTypeDeclaration, it)
+ as ClassOrInterfaceDeclaration
+ }
+
+ // Write new generated code
+ ClassPrinter(ast, fileInfo = this).print()
+ }
+ is CodeChunk.ClosingBrace -> {
+ // Special case - print closing brace with -1 indent
+ rmEmptyLine()
+ popIndent()
+ +"\n}"
+ }
+ // Print general code as-is
+ is CodeChunk.Code -> chunk.lines.forEach { stringBuilder.appendln(it) }
+ // Recursively render data classes
+ is CodeChunk.DataClass -> chunk.chunks.forEach { print(it) }
+ }
+ }
+
+ /**
+ * Output of stage 1 of parsing a file:
+ * Recursively nested ranges of code line numbers containing nested classes
+ */
+ data class ClassBounds(
+ val ast: ClassOrInterfaceDeclaration,
+ val fileInfo: FileInfo,
+ val name: String = ast.nameAsString,
+ val range: ClosedRange<Int> = ast.range.get()!!.let { rng -> rng.begin.line-1..rng.end.line-1 },
+ val nested: MutableList<ClassBounds> = mutableListOf(),
+ var nestedIn: ClassBounds? = null) {
+
+ val nestedDataClasses: List<ClassBounds> by lazy {
+ nested.filter { it.isDataclass }.sortedBy { it.range.start }
+ }
+ val isDataclass = ast.annotations.any { it.nameAsString.endsWith("DataClass") }
+
+ val baseIndentLength = fileInfo.sourceLines.find { "class $name" in it }!!.takeWhile { it == ' ' }.length
+ val baseIndent = buildString { repeat(baseIndentLength) { append(' ') } }
+
+ val sourceNoPrefix = fileInfo.sourceLines.drop(range.start)
+ val generatedCodeRange = sourceNoPrefix
+ .indexOfFirst { it.startsWith("$baseIndent$INDENT_SINGLE// $GENERATED_WARNING_PREFIX") }
+ .let { start ->
+ if (start < 0) {
+ null
+ } else {
+ var endInclusive = sourceNoPrefix.indexOfFirst {
+ it.startsWith("$baseIndent$INDENT_SINGLE$GENERATED_END")
+ }
+ if (endInclusive == -1) {
+ // Legacy generated code doesn't have end markers
+ endInclusive = fileInfo.sourceLines.size - 2
+ }
+ IntRange(
+ range.start + start - fileInfo.generatedWarningNumPrecedingEmptyLines,
+ range.start + endInclusive)
+ }
+ }
+
+ /** Debug info */
+ override fun toString(): String {
+ return buildString {
+ appendln("class $name $range")
+ nested.forEach {
+ appendln(it)
+ }
+ appendln("end $name")
+ }
+ }
+ }
+
+ /**
+ * Output of stage 2 of parsing a file
+ */
+ sealed class CodeChunk {
+ /** General code */
+ open class Code(val lines: List<String>): CodeChunk() {}
+
+ /** Copyright + package + imports + main javadoc */
+ class FileHeader(lines: List<String>): Code(lines)
+
+ /** Code to be discarded and refreshed */
+ open class GeneratedCode(lines: List<String>): Code(lines) {
+ lateinit var owner: DataClass
+
+ class Placeholder: GeneratedCode(emptyList())
+ }
+
+ object ClosingBrace: Code(listOf("}"))
+
+ data class DataClass(
+ val ast: ClassOrInterfaceDeclaration,
+ val chunks: List<CodeChunk>,
+ val generatedCode: GeneratedCode?): CodeChunk() {
+
+ companion object {
+ fun parse(classBounds: ClassBounds): DataClass {
+ val initial = Code(lines = classBounds.fileInfo.sourceLines.subList(
+ fromIndex = classBounds.range.start,
+ toIndex = findLowerBound(
+ thisClass = classBounds,
+ nextNestedClass = classBounds.nestedDataClasses.getOrNull(0))))
+
+ val chunks = mutableListOf<CodeChunk>(initial)
+
+ classBounds.nestedDataClasses.forEachSequentialPair {
+ nestedDataClass, nextNestedDataClass ->
+ chunks += DataClass.parse(nestedDataClass)
+ chunks += Code(lines = classBounds.fileInfo.sourceLines.subList(
+ fromIndex = nestedDataClass.range.endInclusive + 1,
+ toIndex = findLowerBound(
+ thisClass = classBounds,
+ nextNestedClass = nextNestedDataClass)))
+ }
+
+ var generatedCode = classBounds.generatedCodeRange?.let { rng ->
+ GeneratedCode(classBounds.fileInfo.sourceLines.subList(
+ rng.start, rng.endInclusive+1))
+ }
+ if (generatedCode != null) {
+ chunks += generatedCode
+ chunks += ClosingBrace
+ } else if (classBounds.isDataclass) {
+
+ // Insert placeholder for generated code to be inserted for the 1st time
+ chunks.last = (chunks.last as Code)
+ .lines
+ .dropLastWhile { it.isBlank() }
+ .run {
+ if (last().dropWhile { it.isWhitespace() }.startsWith("}")) {
+ dropLast(1)
+ } else {
+ this
+ }
+ }.let { Code(it) }
+ generatedCode = GeneratedCode.Placeholder()
+ chunks += generatedCode
+ chunks += ClosingBrace
+ } else {
+ // Outer class may be not a @DataClass but contain ones
+ // so just skip generated code for them
+ }
+
+ return DataClass(classBounds.ast, chunks, generatedCode).also {
+ generatedCode?.owner = it
+ }
+ }
+
+ private fun findLowerBound(thisClass: ClassBounds, nextNestedClass: ClassBounds?): Int {
+ return nextNestedClass?.range?.start
+ ?: thisClass.generatedCodeRange?.start
+ ?: thisClass.range.endInclusive + 1
+ }
+ }
+ }
+
+ /** Debug info */
+ fun summary(): String = when(this) {
+ is Code -> "${javaClass.simpleName}(${lines.size} lines): ${lines.getOrNull(0)?.take(70) ?: ""}..."
+ is DataClass -> "DataClass ${ast.nameAsString}:\n" +
+ chunks.joinToString("\n") { it.summary() } +
+ "\n//end ${ast.nameAsString}"
+ }
+ }
+
+ private fun ClassOrInterfaceDeclaration.plusNested(): List<ClassOrInterfaceDeclaration> {
+ return mutableListOf<ClassOrInterfaceDeclaration>().apply {
+ add(this@plusNested)
+ childNodes.filterIsInstance<ClassOrInterfaceDeclaration>()
+ .flatMap { it.plusNested() }
+ .let { addAll(it) }
+ }
+ }
+}
\ No newline at end of file
diff --git a/tools/codegen/src/com/android/codegen/Generators.kt b/tools/codegen/src/com/android/codegen/Generators.kt
index bd32f9c..c25d0c7 100644
--- a/tools/codegen/src/com/android/codegen/Generators.kt
+++ b/tools/codegen/src/com/android/codegen/Generators.kt
@@ -119,14 +119,14 @@
}
}
-fun ClassPrinter.generateAidl(javaFile: File) {
- val aidl = File(javaFile.path.substringBeforeLast(".java") + ".aidl")
+fun FileInfo.generateAidl() {
+ val aidl = File(file.path.substringBeforeLast(".java") + ".aidl")
if (aidl.exists()) return
aidl.writeText(buildString {
sourceLines.dropLastWhile { !it.startsWith("package ") }.forEach {
appendln(it)
}
- append("\nparcelable $ClassName;\n")
+ append("\nparcelable ${mainClass.nameAsString};\n")
})
}
diff --git a/tools/codegen/src/com/android/codegen/ImportsProvider.kt b/tools/codegen/src/com/android/codegen/ImportsProvider.kt
new file mode 100644
index 0000000..ba0a031
--- /dev/null
+++ b/tools/codegen/src/com/android/codegen/ImportsProvider.kt
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ */
+
+
+package com.android.codegen
+
+import com.github.javaparser.ast.CompilationUnit
+
+/**
+ * Mixin for optionally shortening references based on existing imports
+ */
+interface ImportsProvider {
+
+ abstract val fileAst: CompilationUnit
+
+ val NonNull: String get() { return classRef("android.annotation.NonNull") }
+ val NonEmpty: String get() { return classRef("android.annotation.NonEmpty") }
+ val Nullable: String get() { return classRef("android.annotation.Nullable") }
+ val TextUtils: String get() { return classRef("android.text.TextUtils") }
+ val LinkedHashMap: String get() { return classRef("java.util.LinkedHashMap") }
+ val Collections: String get() { return classRef("java.util.Collections") }
+ val Preconditions: String get() { return classRef("com.android.internal.util.Preconditions") }
+ val ArrayList: String get() { return classRef("java.util.ArrayList") }
+ val DataClass: String get() { return classRef("com.android.internal.util.DataClass") }
+ val DataClassEnum: String get() { return classRef("com.android.internal.util.DataClass.Enum") }
+ val ParcelWith: String get() { return classRef("com.android.internal.util.DataClass.ParcelWith") }
+ val PluralOf: String get() { return classRef("com.android.internal.util.DataClass.PluralOf") }
+ val Each: String get() { return classRef("com.android.internal.util.DataClass.Each") }
+ val DataClassGenerated: String get() { return classRef("com.android.internal.util.DataClass.Generated") }
+ val DataClassSuppressConstDefs: String get() { return classRef("com.android.internal.util.DataClass.SuppressConstDefsGeneration") }
+ val DataClassSuppress: String get() { return classRef("com.android.internal.util.DataClass.Suppress") }
+ val GeneratedMember: String get() { return classRef("com.android.internal.util.DataClass.Generated.Member") }
+ val Parcelling: String get() { return classRef("com.android.internal.util.Parcelling") }
+ val Parcelable: String get() { return classRef("android.os.Parcelable") }
+ val Parcel: String get() { return classRef("android.os.Parcel") }
+ val UnsupportedAppUsage: String get() { return classRef("android.annotation.UnsupportedAppUsage") }
+
+ /**
+ * Optionally shortens a class reference if there's a corresponding import present
+ */
+ fun classRef(fullName: String): String {
+
+ val pkg = fullName.substringBeforeLast(".")
+ val simpleName = fullName.substringAfterLast(".")
+ if (fileAst.imports.any { imprt ->
+ imprt.nameAsString == fullName
+ || (imprt.isAsterisk && imprt.nameAsString == pkg)
+ }) {
+ return simpleName
+ } else {
+ val outerClass = pkg.substringAfterLast(".", "")
+ if (outerClass.firstOrNull()?.isUpperCase() == true) {
+ return classRef(pkg) + "." + simpleName
+ }
+ }
+ return fullName
+ }
+
+ /** @see classRef */
+ fun memberRef(fullName: String): String {
+ val className = fullName.substringBeforeLast(".")
+ val methodName = fullName.substringAfterLast(".")
+ return if (fileAst.imports.any {
+ it.isStatic
+ && (it.nameAsString == fullName
+ || (it.isAsterisk && it.nameAsString == className))
+ }) {
+ className.substringAfterLast(".") + "." + methodName
+ } else {
+ classRef(className) + "." + methodName
+ }
+ }
+}
+
+/** @see classRef */
+inline fun <reified T : Any> ImportsProvider.classRef(): String {
+ return classRef(T::class.java.name)
+}
\ No newline at end of file
diff --git a/tools/codegen/src/com/android/codegen/Main.kt b/tools/codegen/src/com/android/codegen/Main.kt
index ce83d3d..4b508d0 100755
--- a/tools/codegen/src/com/android/codegen/Main.kt
+++ b/tools/codegen/src/com/android/codegen/Main.kt
@@ -6,6 +6,7 @@
const val THIS_SCRIPT_LOCATION = ""
const val GENERATED_WARNING_PREFIX = "Code below generated by $CODEGEN_NAME"
+const val GENERATED_END = "// End of generated code"
const val INDENT_SINGLE = " "
val PRIMITIVE_TYPES = listOf("byte", "short", "int", "long", "char", "float", "double", "boolean")
@@ -115,81 +116,15 @@
System.exit(0)
}
val file = File(args.last()).absoluteFile
- val sourceLinesNoClosingBrace = file.readLines().dropLastWhile {
+ val sourceLisnesOriginal = file.readLines()
+ val sourceLinesNoClosingBrace = sourceLisnesOriginal.dropLastWhile {
it.startsWith("}") || it.all(Char::isWhitespace)
}
val cliArgs = handleUpdateFlag(args, sourceLinesNoClosingBrace)
- val sourceLinesAsIs = discardGeneratedCode(sourceLinesNoClosingBrace)
- val sourceLines = sourceLinesAsIs
- .filterNot { it.trim().startsWith("//") }
- .map { it.trimEnd().dropWhile { it == '\n' } }
- val stringBuilder = StringBuilder(sourceLinesAsIs.joinToString("\n"))
- ClassPrinter(sourceLines, stringBuilder, cliArgs).run {
-
- val cliExecutable = "$THIS_SCRIPT_LOCATION$CODEGEN_NAME"
- val fileEscaped = file.absolutePath.replace(
- System.getenv("ANDROID_BUILD_TOP"), "\$ANDROID_BUILD_TOP")
-
-
- +"""
-
-
-
- // $GENERATED_WARNING_PREFIX v$CODEGEN_VERSION.
- //
- // DO NOT MODIFY!
- // CHECKSTYLE:OFF Generated code
- //
- // To regenerate run:
- // $ $cliExecutable ${cliArgs.dropLast(1).joinToString("") { "$it " }}$fileEscaped
- //
- // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
- // Settings > Editor > Code Style > Formatter Control
- //@formatter:off
-
- """
-
- if (FeatureFlag.CONST_DEFS()) generateConstDefs()
-
-
- if (FeatureFlag.CONSTRUCTOR()) {
- generateConstructor("public")
- } else if (FeatureFlag.BUILDER()
- || FeatureFlag.COPY_CONSTRUCTOR()
- || FeatureFlag.WITHERS()) {
- generateConstructor("/* package-private */")
- }
- if (FeatureFlag.COPY_CONSTRUCTOR()) generateCopyConstructor()
-
- if (FeatureFlag.GETTERS()) generateGetters()
- if (FeatureFlag.SETTERS()) generateSetters()
- if (FeatureFlag.TO_STRING()) generateToString()
- if (FeatureFlag.EQUALS_HASH_CODE()) generateEqualsHashcode()
-
- if (FeatureFlag.FOR_EACH_FIELD()) generateForEachField()
-
- if (FeatureFlag.WITHERS()) generateWithers()
-
- if (FeatureFlag.PARCELABLE()) generateParcelable()
-
- if (FeatureFlag.BUILDER() && FeatureFlag.BUILD_UPON()) generateBuildUpon()
- if (FeatureFlag.BUILDER()) generateBuilder()
-
- if (FeatureFlag.AIDL()) generateAidl(file)
-
- generateMetadata(file)
-
- rmEmptyLine()
- }
- stringBuilder.append("\n}\n")
- file.writeText(stringBuilder.toString().mapLines { trimEnd() })
-}
-
-internal fun discardGeneratedCode(sourceLinesNoClosingBrace: List<String>): List<String> {
- return sourceLinesNoClosingBrace
- .takeWhile { GENERATED_WARNING_PREFIX !in it }
- .dropLastWhile(String::isBlank)
+ val fileInfo = FileInfo(sourceLisnesOriginal, cliArgs, file)
+ fileInfo.main()
+ file.writeText(fileInfo.stringBuilder.toString().mapLines { trimEnd() })
}
private fun handleUpdateFlag(cliArgs: Array<String>, sourceLines: List<String>): Array<String> {
diff --git a/tools/codegen/src/com/android/codegen/Printer.kt b/tools/codegen/src/com/android/codegen/Printer.kt
new file mode 100644
index 0000000..b30e3f6
--- /dev/null
+++ b/tools/codegen/src/com/android/codegen/Printer.kt
@@ -0,0 +1,186 @@
+/*
+ * 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.
+ */
+
+
+package com.android.codegen
+
+/**
+ * Mixin for syntactic sugar around indent-aware printing into [stringBuilder]
+ */
+interface Printer<SELF: Printer<SELF>> {
+
+ val stringBuilder: StringBuilder
+
+ var currentIndent: String
+
+ fun pushIndent() {
+ currentIndent += INDENT_SINGLE
+ }
+
+ fun popIndent() {
+ currentIndent = if (currentIndent.length >= INDENT_SINGLE.length) {
+ currentIndent.substring(0, currentIndent.length - INDENT_SINGLE.length)
+ } else {
+ ""
+ }
+ }
+
+ fun backspace() = stringBuilder.setLength(stringBuilder.length - 1)
+ val lastChar get() = stringBuilder[stringBuilder.length - 1]
+
+ private fun appendRaw(s: String) {
+ stringBuilder.append(s)
+ }
+
+ fun append(s: String) {
+ if (s.isBlank() && s != "\n") {
+ appendRaw(s)
+ } else {
+ appendRaw(s.lines().map { line ->
+ if (line.startsWith(" *")) line else line.trimStart()
+ }.joinToString("\n$currentIndent"))
+ }
+ }
+
+ fun appendSameLine(s: String) {
+ while (lastChar.isWhitespace() || lastChar.isNewline()) {
+ backspace()
+ }
+ appendRaw(s)
+ }
+
+ fun rmEmptyLine() {
+ while (lastChar.isWhitespaceNonNewline()) backspace()
+ if (lastChar.isNewline()) backspace()
+ }
+
+ /**
+ * Syntactic sugar for:
+ * ```
+ * +"code()";
+ * ```
+ * to append the given string plus a newline
+ */
+ operator fun String.unaryPlus() = append("$this\n")
+
+ /**
+ * Syntactic sugar for:
+ * ```
+ * !"code()";
+ * ```
+ * to append the given string without a newline
+ */
+ operator fun String.not() = append(this)
+
+ /**
+ * Syntactic sugar for:
+ * ```
+ * ... {
+ * ...
+ * }+";"
+ * ```
+ * to append a ';' on same line after a block, and a newline afterwards
+ */
+ operator fun Unit.plus(s: String) {
+ appendSameLine(s)
+ +""
+ }
+
+ /**
+ * A multi-purpose syntactic sugar for appending the given string plus anything generated in
+ * the given [block], the latter with the appropriate deeper indent,
+ * and resetting the indent back to original at the end
+ *
+ * Usage examples:
+ *
+ * ```
+ * "if (...)" {
+ * ...
+ * }
+ * ```
+ * to append a corresponding if block appropriate indentation
+ *
+ * ```
+ * "void foo(...)" {
+ * ...
+ * }
+ * ```
+ * similar to the previous one, plus an extra empty line after the function body
+ *
+ * ```
+ * "void foo(" {
+ * <args code>
+ * }
+ * ```
+ * to use proper indentation for args code and close the bracket on same line at end
+ *
+ * ```
+ * "..." {
+ * ...
+ * }
+ * to use the correct indentation for inner code, resetting it at the end
+ */
+ operator fun String.invoke(block: SELF.() -> Unit) {
+ if (this == " {") {
+ appendSameLine(this)
+ } else {
+ append(this)
+ }
+ when {
+ endsWith("(") -> {
+ indentedBy(2, block)
+ appendSameLine(")")
+ }
+ endsWith("{") || endsWith(")") -> {
+ if (!endsWith("{")) appendSameLine(" {")
+ indentedBy(1, block)
+ +"}"
+ if ((endsWith(") {") || endsWith(")") || this == " {")
+ && !startsWith("synchronized")
+ && !startsWith("switch")
+ && !startsWith("if ")
+ && !contains(" else ")
+ && !contains("new ")
+ && !contains("return ")) {
+ +"" // extra line after function definitions
+ }
+ }
+ else -> indentedBy(2, block)
+ }
+ }
+
+ fun indentedBy(level: Int, block: SELF.() -> Unit) {
+ append("\n")
+ level times {
+ append(INDENT_SINGLE)
+ pushIndent()
+ }
+ (this as SELF).block()
+ level times { popIndent() }
+ rmEmptyLine()
+ +""
+ }
+
+ fun Iterable<FieldInfo>.forEachTrimmingTrailingComma(b: FieldInfo.() -> Unit) {
+ forEachApply {
+ b()
+ if (isLast) {
+ while (lastChar == ' ' || lastChar == '\n') backspace()
+ if (lastChar == ',') backspace()
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/tools/codegen/src/com/android/codegen/Utils.kt b/tools/codegen/src/com/android/codegen/Utils.kt
index e703397..c19ae3b 100644
--- a/tools/codegen/src/com/android/codegen/Utils.kt
+++ b/tools/codegen/src/com/android/codegen/Utils.kt
@@ -1,5 +1,11 @@
package com.android.codegen
+import com.github.javaparser.JavaParser
+import com.github.javaparser.ParseProblemException
+import com.github.javaparser.ParseResult
+import com.github.javaparser.ast.Node
+import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration
+import com.github.javaparser.ast.body.TypeDeclaration
import com.github.javaparser.ast.expr.*
import com.github.javaparser.ast.nodeTypes.NodeWithModifiers
import java.time.Instant
@@ -92,3 +98,49 @@
is NormalAnnotationExpr -> pairs.map { it.name.asString() to it.value }.toMap()
else -> throw IllegalArgumentException("Unknown annotation expression: $this")
}
+
+val TypeDeclaration<*>.nestedTypes get() = childNodes.filterIsInstance<TypeDeclaration<*>>()
+val TypeDeclaration<*>.nestedDataClasses get()
+ = nestedTypes.filterIsInstance<ClassOrInterfaceDeclaration>()
+ .filter { it.annotations.any { it.nameAsString.endsWith("DataClass") } }
+val TypeDeclaration<*>.startLine get() = range.get()!!.begin.line
+
+inline fun <T> List<T>.forEachSequentialPair(action: (T, T?) -> Unit) {
+ forEachIndexed { index, t ->
+ action(t, getOrNull(index + 1))
+ }
+}
+
+fun <T: Node> parseJava(fn: JavaParser.(String) -> ParseResult<T>, source: String): T = try {
+ val parse = JAVA_PARSER.fn(source)
+ if (parse.problems.isNotEmpty()) {
+ throw parseFailed(
+ source,
+ desc = parse.problems.joinToString("\n"),
+ cause = parse.problems.mapNotNull { it.cause.orElse(null) }.firstOrNull())
+ }
+ parse.result.get()
+} catch (e: ParseProblemException) {
+ throw parseFailed(source, cause = e)
+}
+
+private fun parseFailed(source: String, cause: Throwable? = null, desc: String = ""): RuntimeException {
+ return RuntimeException("Failed to parse code:\n" +
+ source
+ .lines()
+ .mapIndexed { lnNum, ln -> "/*$lnNum*/$ln" }
+ .joinToString("\n") + "\n$desc",
+ cause)
+}
+
+var <T> MutableList<T>.last
+ get() = last()
+ set(value) {
+ if (isEmpty()) {
+ add(value)
+ } else {
+ this[size - 1] = value
+ }
+ }
+
+inline fun <T> buildList(init: MutableList<T>.() -> Unit) = mutableListOf<T>().apply(init)
\ No newline at end of file
diff --git a/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt b/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt
index 7fe21c7..51faa49 100644
--- a/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt
+++ b/tools/processors/staledataclass/src/android/processor/staledataclass/StaleDataclassProcessor.kt
@@ -208,7 +208,16 @@
val refreshCmd = if (file != null) {
"$CODEGEN_NAME $file"
} else {
- "find \$ANDROID_BUILD_TOP -path */${clazz.replace('.', '/')}.java -exec $CODEGEN_NAME {} \\;"
+ var gotTopLevelCalssName = false
+ val filePath = clazz.split(".")
+ .takeWhile { word ->
+ if (!gotTopLevelCalssName && word[0].isUpperCase()) {
+ gotTopLevelCalssName = true
+ return@takeWhile true
+ }
+ !gotTopLevelCalssName
+ }.joinToString("/")
+ "find \$ANDROID_BUILD_TOP -path */$filePath.java -exec $CODEGEN_NAME {} \\;"
}
}
diff --git a/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt b/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
index 629f720..99a26dc 100644
--- a/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
+++ b/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
@@ -24,6 +24,7 @@
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
+import java.io.OutputStream
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.jar.JarOutputStream
@@ -42,9 +43,10 @@
}
private fun processClasses(command: CommandOptions) {
- val groups = ProtoLogGroupReader()
- .loadFromJar(command.protoLogGroupsJarArg, command.protoLogGroupsClassNameArg)
- val out = FileOutputStream(command.outputSourceJarArg)
+ val groups = injector.readLogGroups(
+ command.protoLogGroupsJarArg,
+ command.protoLogGroupsClassNameArg)
+ val out = injector.fileOutputStream(command.outputSourceJarArg)
val outJar = JarOutputStream(out)
val processor = ProtoLogCallProcessor(command.protoLogClassNameArg,
command.protoLogGroupsClassNameArg, groups)
@@ -56,18 +58,18 @@
val transformer = SourceTransformer(command.protoLogImplClassNameArg,
command.protoLogCacheClassNameArg, processor)
val file = File(path)
- val text = file.readText()
+ val text = injector.readText(file)
val outSrc = try {
val code = tryParse(text, path)
if (containsProtoLogText(text, command.protoLogClassNameArg)) {
- transformer.processClass(text, path, code)
+ transformer.processClass(text, path, packagePath(file, code), code)
} else {
text
}
} catch (ex: ParsingException) {
// If we cannot parse this file, skip it (and log why). Compilation will fail
// in a subsequent build step.
- println("\n${ex.message}\n")
+ injector.reportParseError(ex)
text
}
path to outSrc
@@ -142,8 +144,9 @@
}
private fun viewerConf(command: CommandOptions) {
- val groups = ProtoLogGroupReader()
- .loadFromJar(command.protoLogGroupsJarArg, command.protoLogGroupsClassNameArg)
+ val groups = injector.readLogGroups(
+ command.protoLogGroupsJarArg,
+ command.protoLogGroupsClassNameArg)
val processor = ProtoLogCallProcessor(command.protoLogClassNameArg,
command.protoLogGroupsClassNameArg, groups)
val builder = ViewerConfigBuilder(processor)
@@ -153,18 +156,15 @@
command.javaSourceArgs.map { path ->
executor.submitCallable {
val file = File(path)
- val text = file.readText()
+ val text = injector.readText(file)
if (containsProtoLogText(text, command.protoLogClassNameArg)) {
try {
val code = tryParse(text, path)
- val pack = if (code.packageDeclaration.isPresent) code.packageDeclaration
- .get().nameAsString else ""
- val newPath = pack.replace('.', '/') + '/' + file.name
- builder.findLogCalls(code, newPath)
+ builder.findLogCalls(code, path, packagePath(file, code))
} catch (ex: ParsingException) {
// If we cannot parse this file, skip it (and log why). Compilation will fail
// in a subsequent build step.
- println("\n${ex.message}\n")
+ injector.reportParseError(ex)
null
}
} else {
@@ -177,11 +177,18 @@
executor.shutdown()
- val out = FileOutputStream(command.viewerConfigJsonArg)
+ val out = injector.fileOutputStream(command.viewerConfigJsonArg)
out.write(builder.build().toByteArray())
out.close()
}
+ private fun packagePath(file: File, code: CompilationUnit): String {
+ val pack = if (code.packageDeclaration.isPresent) code.packageDeclaration
+ .get().nameAsString else ""
+ val packagePath = pack.replace('.', '/') + '/' + file.name
+ return packagePath
+ }
+
private fun read(command: CommandOptions) {
LogParser(ViewerConfigParser())
.parse(FileInputStream(command.logProtofileArg),
@@ -190,18 +197,9 @@
@JvmStatic
fun main(args: Array<String>) {
- StaticJavaParser.setConfiguration(ParserConfiguration().apply {
- setLanguageLevel(ParserConfiguration.LanguageLevel.RAW)
- setAttributeComments(false)
- })
-
try {
val command = CommandOptions(args)
- when (command.command) {
- CommandOptions.TRANSFORM_CALLS_CMD -> processClasses(command)
- CommandOptions.GENERATE_CONFIG_CMD -> viewerConf(command)
- CommandOptions.READ_LOG_CMD -> read(command)
- }
+ invoke(command)
} catch (ex: InvalidCommandException) {
println("\n${ex.message}\n")
showHelpAndExit()
@@ -210,6 +208,36 @@
exitProcess(1)
}
}
+
+ fun invoke(command: CommandOptions) {
+ StaticJavaParser.setConfiguration(ParserConfiguration().apply {
+ setLanguageLevel(ParserConfiguration.LanguageLevel.RAW)
+ setAttributeComments(false)
+ })
+
+ when (command.command) {
+ CommandOptions.TRANSFORM_CALLS_CMD -> processClasses(command)
+ CommandOptions.GENERATE_CONFIG_CMD -> viewerConf(command)
+ CommandOptions.READ_LOG_CMD -> read(command)
+ }
+ }
+
+ var injector = object : Injector {
+ override fun fileOutputStream(file: String) = FileOutputStream(file)
+ override fun readText(file: File) = file.readText()
+ override fun readLogGroups(jarPath: String, className: String) =
+ ProtoLogGroupReader().loadFromJar(jarPath, className)
+ override fun reportParseError(ex: ParsingException) {
+ println("\n${ex.message}\n")
+ }
+ }
+
+ interface Injector {
+ fun fileOutputStream(file: String): OutputStream
+ fun readText(file: File): String
+ fun readLogGroups(jarPath: String, className: String): Map<String, LogGroup>
+ fun reportParseError(ex: ParsingException)
+ }
}
private fun <T> ExecutorService.submitCallable(f: () -> T) = submit(f)
diff --git a/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt b/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt
index 0ad8091..36ea411 100644
--- a/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt
+++ b/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt
@@ -72,7 +72,7 @@
}
val ifStmt: IfStmt
if (group.enabled) {
- val hash = CodeUtils.hash(fileName, messageString, level, group)
+ val hash = CodeUtils.hash(packagePath, messageString, level, group)
val newCall = call.clone()
if (!group.textEnabled) {
// Remove message string if text logging is not enabled by default.
@@ -97,7 +97,7 @@
if (argTypes.size != call.arguments.size - 2) {
throw InvalidProtoLogCallException(
"Number of arguments (${argTypes.size} does not mach format" +
- " string in: $call", ParsingContext(fileName, call))
+ " string in: $call", ParsingContext(path, call))
}
val blockStmt = BlockStmt()
if (argTypes.isNotEmpty()) {
@@ -214,18 +214,23 @@
StaticJavaParser.parseExpression<FieldAccessExpr>(protoLogCacheClassName)
private var processedCode: MutableList<String> = mutableListOf()
private var offsets: IntArray = IntArray(0)
- private var fileName: String = ""
+ /** The path of the file being processed, relative to $ANDROID_BUILD_TOP */
+ private var path: String = ""
+ /** The path of the file being processed, relative to the root package */
+ private var packagePath: String = ""
fun processClass(
code: String,
path: String,
+ packagePath: String,
compilationUnit: CompilationUnit =
StaticJavaParser.parse(code)
): String {
- fileName = path
+ this.path = path
+ this.packagePath = packagePath
processedCode = code.split('\n').toMutableList()
offsets = IntArray(processedCode.size)
- protoLogCallProcessor.process(compilationUnit, this, fileName)
+ protoLogCallProcessor.process(compilationUnit, this, path)
return processedCode.joinToString("\n")
}
}
diff --git a/tools/protologtool/src/com/android/protolog/tool/ViewerConfigBuilder.kt b/tools/protologtool/src/com/android/protolog/tool/ViewerConfigBuilder.kt
index c100826..175c71f 100644
--- a/tools/protologtool/src/com/android/protolog/tool/ViewerConfigBuilder.kt
+++ b/tools/protologtool/src/com/android/protolog/tool/ViewerConfigBuilder.kt
@@ -46,7 +46,11 @@
private val statements: MutableMap<Int, LogCall> = mutableMapOf()
private val groups: MutableSet<LogGroup> = mutableSetOf()
- fun findLogCalls(unit: CompilationUnit, fileName: String): List<Pair<LogCall, ParsingContext>> {
+ fun findLogCalls(
+ unit: CompilationUnit,
+ path: String,
+ packagePath: String
+ ): List<Pair<LogCall, ParsingContext>> {
val calls = mutableListOf<Pair<LogCall, ParsingContext>>()
val visitor = object : ProtoLogCallVisitor {
override fun processCall(
@@ -55,12 +59,12 @@
level: LogLevel,
group: LogGroup
) {
- val logCall = LogCall(messageString, level, group, fileName)
- val context = ParsingContext(fileName, call)
+ val logCall = LogCall(messageString, level, group, packagePath)
+ val context = ParsingContext(path, call)
calls.add(logCall to context)
}
}
- processor.process(unit, visitor, fileName)
+ processor.process(unit, visitor, path)
return calls
}
diff --git a/tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt b/tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt
new file mode 100644
index 0000000..dd8a0b1
--- /dev/null
+++ b/tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt
@@ -0,0 +1,144 @@
+/*
+ * 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.
+ */
+
+package com.android.protolog.tool
+
+import org.junit.Assert
+import org.junit.Assert.assertTrue
+import org.junit.Test
+import java.io.ByteArrayInputStream
+import java.io.ByteArrayOutputStream
+import java.io.File
+import java.io.FileNotFoundException
+import java.io.OutputStream
+import java.util.jar.JarInputStream
+
+class EndToEndTest {
+
+ @Test
+ fun e2e_transform() {
+ val output = run(
+ src = "frameworks/base/org/example/Example.java" to """
+ package org.example;
+ import com.android.server.protolog.common.ProtoLog;
+ import static com.android.server.wm.ProtoLogGroup.GROUP;
+
+ class Example {
+ void method() {
+ String argString = "hello";
+ int argInt = 123;
+ ProtoLog.d(GROUP, "Example: %s %d", argString, argInt);
+ }
+ }
+ """.trimIndent(),
+ logGroup = LogGroup("GROUP", true, false, "TAG_GROUP"),
+ commandOptions = CommandOptions(arrayOf("transform-protolog-calls",
+ "--protolog-class", "com.android.server.protolog.common.ProtoLog",
+ "--protolog-impl-class", "com.android.server.protolog.ProtoLogImpl",
+ "--protolog-cache-class",
+ "com.android.server.protolog.ProtoLog${"\$\$"}Cache",
+ "--loggroups-class", "com.android.server.wm.ProtoLogGroup",
+ "--loggroups-jar", "not_required.jar",
+ "--output-srcjar", "out.srcjar",
+ "frameworks/base/org/example/Example.java"))
+ )
+ val outSrcJar = assertLoadSrcJar(output, "out.srcjar")
+ assertTrue(" 2066303299," in outSrcJar["frameworks/base/org/example/Example.java"]!!)
+ }
+
+ @Test
+ fun e2e_viewerConfig() {
+ val output = run(
+ src = "frameworks/base/org/example/Example.java" to """
+ package org.example;
+ import com.android.server.protolog.common.ProtoLog;
+ import static com.android.server.wm.ProtoLogGroup.GROUP;
+
+ class Example {
+ void method() {
+ String argString = "hello";
+ int argInt = 123;
+ ProtoLog.d(GROUP, "Example: %s %d", argString, argInt);
+ }
+ }
+ """.trimIndent(),
+ logGroup = LogGroup("GROUP", true, false, "TAG_GROUP"),
+ commandOptions = CommandOptions(arrayOf("generate-viewer-config",
+ "--protolog-class", "com.android.server.protolog.common.ProtoLog",
+ "--loggroups-class", "com.android.server.wm.ProtoLogGroup",
+ "--loggroups-jar", "not_required.jar",
+ "--viewer-conf", "out.json",
+ "frameworks/base/org/example/Example.java"))
+ )
+ val viewerConfigJson = assertLoadText(output, "out.json")
+ assertTrue("\"2066303299\"" in viewerConfigJson)
+ }
+
+ private fun assertLoadSrcJar(
+ outputs: Map<String, ByteArray>,
+ path: String
+ ): Map<String, String> {
+ val out = outputs[path] ?: fail("$path not in outputs (${outputs.keys})")
+
+ val sources = mutableMapOf<String, String>()
+ JarInputStream(ByteArrayInputStream(out)).use { jarStream ->
+ var entry = jarStream.nextJarEntry
+ while (entry != null) {
+ if (entry.name.endsWith(".java")) {
+ sources[entry.name] = jarStream.reader().readText()
+ }
+ entry = jarStream.nextJarEntry
+ }
+ }
+ return sources
+ }
+
+ private fun assertLoadText(outputs: Map<String, ByteArray>, path: String): String {
+ val out = outputs[path] ?: fail("$path not in outputs (${outputs.keys})")
+ return out.toString(Charsets.UTF_8)
+ }
+
+ fun run(
+ src: Pair<String, String>,
+ logGroup: LogGroup,
+ commandOptions: CommandOptions
+ ): Map<String, ByteArray> {
+ val outputs = mutableMapOf<String, ByteArrayOutputStream>()
+
+ ProtoLogTool.injector = object : ProtoLogTool.Injector {
+ override fun fileOutputStream(file: String): OutputStream =
+ ByteArrayOutputStream().also { outputs[file] = it }
+
+ override fun readText(file: File): String {
+ if (file.path == src.first) {
+ return src.second
+ }
+ throw FileNotFoundException("expected: ${src.first}, but was $file")
+ }
+
+ override fun readLogGroups(jarPath: String, className: String) = mapOf(
+ logGroup.name to logGroup)
+
+ override fun reportParseError(ex: ParsingException) = throw AssertionError(ex)
+ }
+
+ ProtoLogTool.invoke(commandOptions)
+
+ return outputs.mapValues { it.value.toByteArray() }
+ }
+
+ fun fail(message: String): Nothing = Assert.fail(message) as Nothing
+}
diff --git a/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt b/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt
index 6f5955c..4f2be328 100644
--- a/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt
+++ b/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt
@@ -186,7 +186,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
@@ -228,7 +228,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE_MULTICALLS, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE_MULTICALLS, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
@@ -266,7 +266,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE_MULTILINE, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE_MULTILINE, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
@@ -303,7 +303,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE_NO_PARAMS, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE_NO_PARAMS, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
@@ -337,7 +337,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
@@ -375,7 +375,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE_MULTILINE, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE_MULTILINE, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
@@ -413,7 +413,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
@@ -439,7 +439,7 @@
invocation.arguments[0] as CompilationUnit
}
- val out = sourceJarWriter.processClass(TEST_CODE_MULTILINE, PATH, code)
+ val out = sourceJarWriter.processClass(TEST_CODE_MULTILINE, PATH, PATH, code)
code = StaticJavaParser.parse(out)
val ifStmts = code.findAll(IfStmt::class.java)
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index c0c0361..ac86778 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -465,9 +465,16 @@
public static final int EID_VHT_OPERATION = 192;
@UnsupportedAppUsage
public static final int EID_VSA = 221;
+ public static final int EID_EXTENSION_PRESENT = 255;
+
+ /**
+ * Extension IDs
+ */
+ public static final int EID_EXT_HE_OPERATION = 36;
@UnsupportedAppUsage
public int id;
+ public int idExt;
@UnsupportedAppUsage
public byte[] bytes;
@@ -476,6 +483,7 @@
public InformationElement(InformationElement rhs) {
this.id = rhs.id;
+ this.idExt = rhs.idExt;
this.bytes = rhs.bytes.clone();
}
}
@@ -717,6 +725,7 @@
dest.writeInt(informationElements.length);
for (int i = 0; i < informationElements.length; i++) {
dest.writeInt(informationElements[i].id);
+ dest.writeInt(informationElements[i].idExt);
dest.writeInt(informationElements[i].bytes.length);
dest.writeByteArray(informationElements[i].bytes);
}
@@ -799,6 +808,7 @@
for (int i = 0; i < n; i++) {
sr.informationElements[i] = new InformationElement();
sr.informationElements[i].id = in.readInt();
+ sr.informationElements[i].idExt = in.readInt();
int len = in.readInt();
sr.informationElements[i].bytes = new byte[len];
in.readByteArray(sr.informationElements[i].bytes);
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 380ebf1..07831c7 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -5240,16 +5240,18 @@
/**
* Add a listener for Scan Results. See {@link ScanResultsListener}.
* Caller will receive the event when scan results are available.
- * Caller should use {@link WifiManager#getScanResults()} to get the scan results.
+ * Caller should use {@link WifiManager#getScanResults()} requires
+ * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} to get the scan results.
* Caller can remove a previously registered listener using
* {@link WifiManager#removeScanResultsListener(ScanResultsListener)}
+ * Same caller can add multiple listeners.
* <p>
* Applications should have the
* {@link android.Manifest.permission#ACCESS_WIFI_STATE} permission. Callers
* without the permission will trigger a {@link java.lang.SecurityException}.
* <p>
*
- * @param executor The executor to execute the listener of the {@code listener} object.
+ * @param executor The executor to execute the listener of the {@code listener} object.
* @param listener listener for Scan Results events
*/
@@ -5267,7 +5269,7 @@
iWifiManager.registerScanResultsListener(
new Binder(),
new ScanResultsListenerProxy(executor, listener),
- mContext.getOpPackageName().hashCode());
+ listener.hashCode());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -5289,7 +5291,7 @@
if (iWifiManager == null) {
throw new RemoteException("Wifi service is not running");
}
- iWifiManager.unregisterScanResultsListener(mContext.getOpPackageName().hashCode());
+ iWifiManager.unregisterScanResultsListener(listener.hashCode());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/wifi/tests/src/android/net/wifi/ScanResultTest.java b/wifi/tests/src/android/net/wifi/ScanResultTest.java
index 54ec325..4973c4c 100644
--- a/wifi/tests/src/android/net/wifi/ScanResultTest.java
+++ b/wifi/tests/src/android/net/wifi/ScanResultTest.java
@@ -21,6 +21,7 @@
import static org.junit.Assert.assertNull;
import static org.mockito.Mockito.validateMockitoUsage;
+import android.net.wifi.ScanResult.InformationElement;
import android.os.Parcel;
import androidx.test.filters.SmallTest;
@@ -124,6 +125,25 @@
}
/**
+ * Verify parcel read/write for ScanResult with Information Element
+ */
+ @Test
+ public void verifyScanResultParcelWithInformationElement() throws Exception {
+ ScanResult writeScanResult = createScanResult();
+ writeScanResult.informationElements = new ScanResult.InformationElement[2];
+ writeScanResult.informationElements[0] = new ScanResult.InformationElement();
+ writeScanResult.informationElements[0].id = InformationElement.EID_HT_OPERATION;
+ writeScanResult.informationElements[0].idExt = 0;
+ writeScanResult.informationElements[0].bytes = new byte[]{0x11, 0x22, 0x33};
+ writeScanResult.informationElements[1] = new ScanResult.InformationElement();
+ writeScanResult.informationElements[1].id = InformationElement.EID_EXTENSION_PRESENT;
+ writeScanResult.informationElements[1].idExt = InformationElement.EID_EXT_HE_OPERATION;
+ writeScanResult.informationElements[1].bytes = new byte[]{0x44, 0x55, 0x66};
+ ScanResult readScanResult = new ScanResult(writeScanResult);
+ assertScanResultEquals(writeScanResult, readScanResult);
+ }
+
+ /**
* Verify toString for ScanResult.
*/
@Test
@@ -188,5 +208,6 @@
assertEquals(expected.frequency, actual.frequency);
assertEquals(expected.timestamp, actual.timestamp);
assertArrayEquals(expected.radioChainInfos, actual.radioChainInfos);
+ assertArrayEquals(expected.informationElements, actual.informationElements);
}
}