Loading core/java/android/content/Intent.java +11 −2 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import android.os.Process; import android.os.ResultReceiver; import android.os.ShellCommand; import android.os.StrictMode; import android.os.SystemClock; import android.os.UserHandle; import android.os.storage.StorageManager; import android.provider.ContactsContract.QuickContact; Loading Loading @@ -2796,6 +2797,8 @@ public class Intent implements Parcelable, Cloneable { * started and is no longer considered stopped. * <ul> * <li> {@link #EXTRA_UID} containing the integer uid assigned to the package. * <li> {@link #EXTRA_TIME} containing the {@link SystemClock#elapsedRealtime() * elapsed realtime} of when the package was unstopped. * </ul> * * <p class="note">This is a protected intent that can only be sent by the system. Loading Loading @@ -2869,9 +2872,15 @@ public class Intent implements Parcelable, Cloneable { * * <p class="note">This is a protected intent that can only be sent * by the system. * <p> * Starting in {@link Build.VERSION_CODES#VANILLA_ICE_CREAM Android V}, an extra timestamp * {@link #EXTRA_TIME} is included with this broadcast to indicate the exact time the package * was restarted, in {@link SystemClock#elapsedRealtime() elapsed realtime}. * </p> */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_PACKAGE_RESTARTED = "android.intent.action.PACKAGE_RESTARTED"; /** * Broadcast Action: The user has cleared the data of a package. This should * be preceded by {@link #ACTION_PACKAGE_RESTARTED}, after which all of Loading Loading @@ -6578,8 +6587,8 @@ public class Intent implements Parcelable, Cloneable { = "android.intent.extra.SHUTDOWN_USERSPACE_ONLY"; /** * Optional extra specifying a time in milliseconds since the Epoch. The value must be * non-negative. * Optional extra specifying a time in milliseconds. The timebase depends on the Intent * including this extra. The value must be non-negative. * <p> * Type: long * </p> Loading services/core/java/com/android/server/pm/PackageManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -4566,6 +4566,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService final Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, pmi.getPackageUid(packageName, 0, userId)); extras.putInt(Intent.EXTRA_USER_HANDLE, userId); extras.putLong(Intent.EXTRA_TIME, SystemClock.elapsedRealtime()); mHandler.post(() -> { mBroadcastHelper.sendPackageBroadcast(Intent.ACTION_PACKAGE_UNSTOPPED, packageName, extras, Loading Loading @@ -6969,6 +6970,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService final Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, uid); extras.putInt(Intent.EXTRA_USER_HANDLE, userId); extras.putLong(Intent.EXTRA_TIME, SystemClock.elapsedRealtime()); mHandler.post(() -> { mBroadcastHelper.sendPackageBroadcast(Intent.ACTION_PACKAGE_RESTARTED, packageName, extras, Loading Loading
core/java/android/content/Intent.java +11 −2 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import android.os.Process; import android.os.ResultReceiver; import android.os.ShellCommand; import android.os.StrictMode; import android.os.SystemClock; import android.os.UserHandle; import android.os.storage.StorageManager; import android.provider.ContactsContract.QuickContact; Loading Loading @@ -2796,6 +2797,8 @@ public class Intent implements Parcelable, Cloneable { * started and is no longer considered stopped. * <ul> * <li> {@link #EXTRA_UID} containing the integer uid assigned to the package. * <li> {@link #EXTRA_TIME} containing the {@link SystemClock#elapsedRealtime() * elapsed realtime} of when the package was unstopped. * </ul> * * <p class="note">This is a protected intent that can only be sent by the system. Loading Loading @@ -2869,9 +2872,15 @@ public class Intent implements Parcelable, Cloneable { * * <p class="note">This is a protected intent that can only be sent * by the system. * <p> * Starting in {@link Build.VERSION_CODES#VANILLA_ICE_CREAM Android V}, an extra timestamp * {@link #EXTRA_TIME} is included with this broadcast to indicate the exact time the package * was restarted, in {@link SystemClock#elapsedRealtime() elapsed realtime}. * </p> */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_PACKAGE_RESTARTED = "android.intent.action.PACKAGE_RESTARTED"; /** * Broadcast Action: The user has cleared the data of a package. This should * be preceded by {@link #ACTION_PACKAGE_RESTARTED}, after which all of Loading Loading @@ -6578,8 +6587,8 @@ public class Intent implements Parcelable, Cloneable { = "android.intent.extra.SHUTDOWN_USERSPACE_ONLY"; /** * Optional extra specifying a time in milliseconds since the Epoch. The value must be * non-negative. * Optional extra specifying a time in milliseconds. The timebase depends on the Intent * including this extra. The value must be non-negative. * <p> * Type: long * </p> Loading
services/core/java/com/android/server/pm/PackageManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -4566,6 +4566,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService final Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, pmi.getPackageUid(packageName, 0, userId)); extras.putInt(Intent.EXTRA_USER_HANDLE, userId); extras.putLong(Intent.EXTRA_TIME, SystemClock.elapsedRealtime()); mHandler.post(() -> { mBroadcastHelper.sendPackageBroadcast(Intent.ACTION_PACKAGE_UNSTOPPED, packageName, extras, Loading Loading @@ -6969,6 +6970,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService final Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, uid); extras.putInt(Intent.EXTRA_USER_HANDLE, userId); extras.putLong(Intent.EXTRA_TIME, SystemClock.elapsedRealtime()); mHandler.post(() -> { mBroadcastHelper.sendPackageBroadcast(Intent.ACTION_PACKAGE_RESTARTED, packageName, extras, Loading