diff options
| author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-25 03:06:30 +0000 |
|---|---|---|
| committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-25 03:06:30 +0000 |
| commit | e128e8a7984cc17dba4384380e91ff5aa8f92e72 (patch) | |
| tree | 43f845baffe1a42ced785930b85838799330a8db /core/java/android | |
| parent | 57b2b936b822b0f474dfa83b6286203289ed8066 (diff) | |
| parent | a546852117afa1adc82e7c102de97cc17bc6fbcf (diff) | |
Snap for 7766788 from a546852117afa1adc82e7c102de97cc17bc6fbcf to sc-qpr1-release
Change-Id: I560362ce78dc41b5df5d65f183a966db756dffe2
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/Intent.java | 16 | ||||
| -rw-r--r-- | core/java/android/os/BinderProxy.java | 2 | ||||
| -rw-r--r-- | core/java/android/os/storage/StorageManagerInternal.java | 16 | ||||
| -rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 10 |
4 files changed, 41 insertions, 3 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 9e35a32638a8..35794d79b49d 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2738,6 +2738,22 @@ public class Intent implements Parcelable, Cloneable { */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_PACKAGES_UNSUSPENDED = "android.intent.action.PACKAGES_UNSUSPENDED"; + /** + * Broadcast Action: One of the suspend conditions have been modified for the packages. + * <p>Includes the following extras: + * <ul> + * <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages which have been modified + * <li> {@link #EXTRA_CHANGED_UID_LIST} is the set of uids which have been modified + * </ul> + * + * <p class="note">This is a protected intent that can only be sent + * by the system. It is only sent to registered receivers. + * + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_PACKAGES_SUSPENSION_CHANGED = + "android.intent.action.PACKAGES_SUSPENSION_CHANGED"; /** * Broadcast Action: Distracting packages have been changed. diff --git a/core/java/android/os/BinderProxy.java b/core/java/android/os/BinderProxy.java index 3d466a0bf007..c6466235e5d1 100644 --- a/core/java/android/os/BinderProxy.java +++ b/core/java/android/os/BinderProxy.java @@ -74,7 +74,7 @@ public final class BinderProxy implements IBinder { private static final int MAIN_INDEX_SIZE = 1 << LOG_MAIN_INDEX_SIZE; private static final int MAIN_INDEX_MASK = MAIN_INDEX_SIZE - 1; // Debuggable builds will throw an AssertionError if the number of map entries exceeds: - private static final int CRASH_AT_SIZE = 20_000; + private static final int CRASH_AT_SIZE = 25_000; /** * We next warn when we exceed this bucket size. diff --git a/core/java/android/os/storage/StorageManagerInternal.java b/core/java/android/os/storage/StorageManagerInternal.java index 54905ec6eaeb..8928a423c6cb 100644 --- a/core/java/android/os/storage/StorageManagerInternal.java +++ b/core/java/android/os/storage/StorageManagerInternal.java @@ -18,6 +18,7 @@ package android.os.storage; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.UserIdInt; import android.os.IVold; import java.util.List; @@ -135,4 +136,19 @@ public abstract class StorageManagerInternal { * {@link VolumeInfo#isPrimary()} */ public abstract List<String> getPrimaryVolumeIds(); + + /** + * Tells StorageManager that CE storage for this user has been prepared. + * + * @param userId userId for which CE storage has been prepared + */ + public abstract void markCeStoragePrepared(@UserIdInt int userId); + + /** + * Returns true when CE storage for this user has been prepared. + * + * When the user key is unlocked and CE storage has been prepared, + * it's ok to access and modify CE directories on volumes for this user. + */ + public abstract boolean isCeStoragePrepared(@UserIdInt int userId); } diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index c198a492d4c9..c9a0121936dc 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -548,12 +548,16 @@ public abstract class WallpaperService extends Service { */ public void reportEngineShown(boolean waitForEngineShown) { if (mIWallpaperEngine.mShownReported) return; - Message message = mCaller.obtainMessage(MSG_REPORT_SHOWN); if (!waitForEngineShown) { + Message message = mCaller.obtainMessage(MSG_REPORT_SHOWN); mCaller.removeMessages(MSG_REPORT_SHOWN); mCaller.sendMessage(message); } else { - mCaller.sendMessageDelayed(message, TimeUnit.SECONDS.toMillis(1)); + // if we are already waiting, no need to reset the timeout. + if (!mCaller.hasMessages(MSG_REPORT_SHOWN)) { + Message message = mCaller.obtainMessage(MSG_REPORT_SHOWN); + mCaller.sendMessageDelayed(message, TimeUnit.SECONDS.toMillis(5)); + } } } @@ -2078,6 +2082,8 @@ public abstract class WallpaperService extends Service { mShownReported = true; try { mConnection.engineShown(this); + Log.d(TAG, "Wallpaper has updated the surface:" + + mWallpaperManager.getWallpaperInfo()); } catch (RemoteException e) { Log.w(TAG, "Wallpaper host disappeared", e); return; |
