summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/Intent.java56
-rw-r--r--core/java/android/content/pm/IDataLoaderStatusListener.aidl23
-rw-r--r--core/java/android/content/pm/IncrementalStatesInfo.java10
-rw-r--r--core/java/android/content/pm/LauncherApps.java1
-rw-r--r--core/java/android/content/pm/PackageManager.java33
-rw-r--r--core/java/android/os/incremental/IIncrementalService.aidl10
-rw-r--r--core/java/android/os/incremental/IStorageHealthListener.aidl6
-rw-r--r--core/java/android/os/incremental/IncrementalManager.java33
-rw-r--r--core/java/android/os/incremental/IncrementalStorage.java27
-rw-r--r--core/java/com/android/internal/content/PackageMonitor.java12
10 files changed, 1 insertions, 210 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index f8d407db07a5..7fdbf155e445 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2829,55 +2829,6 @@ public class Intent implements Parcelable, Cloneable {
public static final String ACTION_MY_PACKAGE_UNSUSPENDED = "android.intent.action.MY_PACKAGE_UNSUSPENDED";
/**
- * Broadcast Action: Sent to indicate that the package becomes startable.
- * The intent will have the following extra values:
- * <ul>
- * <li> {@link #EXTRA_UID} containing the integer uid assigned to the package. </li>
- * <li> {@link #EXTRA_PACKAGE_NAME} containing the package name. </li>
- * </li>
- * </ul>
- *
- * <p class="note">This is a protected intent that can only be sent by the system.
- * @hide
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_PACKAGE_STARTABLE = "android.intent.action.PACKAGE_STARTABLE";
-
- /**
- * Broadcast Action: Sent to indicate that the package becomes unstartable.
- * The intent will have the following extra values:
- * <ul>
- * <li> {@link #EXTRA_UID} containing the integer uid assigned to the package. </li>
- * <li> {@link #EXTRA_PACKAGE_NAME} containing the package name. </li>
- * <li> {@link #EXTRA_UNSTARTABLE_REASON} containing the integer indicating the reason for
- * the state change,
- * @see PackageManager.UnstartableReason
- * </li>
- * </ul>
- *
- * <p class="note">This is a protected intent that can only be sent by the system.
- * @hide
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_PACKAGE_UNSTARTABLE =
- "android.intent.action.PACKAGE_UNSTARTABLE";
-
- /**
- * Broadcast Action: Sent to indicate that the package is fully loaded.
- * <ul>
- * <li> {@link #EXTRA_UID} containing the integer uid assigned to the package. </li>
- * <li> {@link #EXTRA_PACKAGE_NAME} containing the package name. </li>
- * </li>
- * </ul>
- *
- * <p class="note">This is a protected intent that can only be sent by the system.
- * @hide
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_PACKAGE_FULLY_LOADED =
- "android.intent.action.PACKAGE_FULLY_LOADED";
-
- /**
* Broadcast Action: A user ID has been removed from the system. The user
* ID number is stored in the extra data under {@link #EXTRA_UID}.
*
@@ -6171,13 +6122,6 @@ public class Intent implements Parcelable, Cloneable {
*/
public static final String EXTRA_LOCUS_ID = "android.intent.extra.LOCUS_ID";
- /**
- * Intent extra: the reason that the package associated with this intent has become unstartable.
- *
- * <p>Type: String
- */
- public static final String EXTRA_UNSTARTABLE_REASON = "android.intent.extra.UNSTARTABLE_REASON";
-
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Intent flags (see mFlags variable).
diff --git a/core/java/android/content/pm/IDataLoaderStatusListener.aidl b/core/java/android/content/pm/IDataLoaderStatusListener.aidl
index 79b70f2bd5ee..9d8d0a4a1661 100644
--- a/core/java/android/content/pm/IDataLoaderStatusListener.aidl
+++ b/core/java/android/content/pm/IDataLoaderStatusListener.aidl
@@ -52,30 +52,7 @@ oneway interface IDataLoaderStatusListener {
* fail and all retry limits are exceeded. */
const int DATA_LOADER_UNRECOVERABLE = 9;
- /** There are no known issues with the data stream. */
- const int STREAM_HEALTHY = 0;
-
- /** There are issues with the current transport layer (network, adb connection, etc.) that may
- * recover automatically or could eventually require user intervention. */
- const int STREAM_TRANSPORT_ERROR = 1;
-
- /** Integrity failures in the data stream, this could be due to file corruption, decompression
- * issues or similar. This indicates a likely unrecoverable error. */
- const int STREAM_INTEGRITY_ERROR = 2;
-
- /** There are issues with the source of the data, e.g., backend availability issues, account
- * issues. This indicates a potentially recoverable error, but one that may take a long time to
- * resolve. */
- const int STREAM_SOURCE_ERROR = 3;
-
- /** The device or app is low on storage and cannot complete the stream as a result.
- * A subsequent page miss resulting in app failure will transition app to unstartable state. */
- const int STREAM_STORAGE_ERROR = 4;
-
/** Data loader status callback */
void onStatusChanged(in int dataLoaderId, in int status);
-
- /** Callback to report streaming health status of a specific data loader */
- void reportStreamHealth(in int dataLoaderId, in int streamStatus);
}
diff --git a/core/java/android/content/pm/IncrementalStatesInfo.java b/core/java/android/content/pm/IncrementalStatesInfo.java
index 6e91c19affc2..0393d34ba988 100644
--- a/core/java/android/content/pm/IncrementalStatesInfo.java
+++ b/core/java/android/content/pm/IncrementalStatesInfo.java
@@ -24,26 +24,19 @@ import android.os.Parcelable;
* @hide
*/
public class IncrementalStatesInfo implements Parcelable {
- private boolean mIsStartable;
private boolean mIsLoading;
private float mProgress;
- public IncrementalStatesInfo(boolean isStartable, boolean isLoading, float progress) {
- mIsStartable = isStartable;
+ public IncrementalStatesInfo(boolean isLoading, float progress) {
mIsLoading = isLoading;
mProgress = progress;
}
private IncrementalStatesInfo(Parcel source) {
- mIsStartable = source.readBoolean();
mIsLoading = source.readBoolean();
mProgress = source.readFloat();
}
- public boolean isStartable() {
- return mIsStartable;
- }
-
public boolean isLoading() {
return mIsLoading;
}
@@ -59,7 +52,6 @@ public class IncrementalStatesInfo implements Parcelable {
@Override
public void writeToParcel(Parcel dest, int flags) {
- dest.writeBoolean(mIsStartable);
dest.writeBoolean(mIsLoading);
dest.writeFloat(mProgress);
}
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index 8b9b73683575..a8a5837385cb 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -225,7 +225,6 @@ public class LauncherApps {
* Indicates that a package was modified in the specified profile.
* This can happen, for example, when the package is updated or when
* one or more components are enabled or disabled.
- * It can also happen if package state has changed, i.e., package becomes unstartable.
*
* @param packageName The name of the package that has changed.
* @param user The UserHandle of the profile that generated the change.
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index bba2fd09e712..c4d7a0a14435 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -4370,39 +4370,6 @@ public abstract class PackageManager {
public static final int SYSTEM_APP_STATE_UNINSTALLED = 3;
/**
- * Reasons for why a package is unstartable.
- * @hide
- */
- @IntDef({UNSTARTABLE_REASON_UNKNOWN,
- UNSTARTABLE_REASON_CONNECTION_ERROR,
- UNSTARTABLE_REASON_INSUFFICIENT_STORAGE
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface UnstartableReason {}
-
- /**
- * Unstartable state with no root cause specified. E.g., data loader seeing missing pages but
- * unclear about the cause. This corresponds to a generic alert window shown to the user when
- * the user attempts to launch the app.
- * @hide
- */
- public static final int UNSTARTABLE_REASON_UNKNOWN = 0;
-
- /**
- * Unstartable state due to connection issues that interrupt package loading.
- * This corresponds to an alert window shown to the user indicating connection errors.
- * @hide
- */
- public static final int UNSTARTABLE_REASON_CONNECTION_ERROR = 1;
-
- /**
- * Unstartable state after encountering storage limitations.
- * This corresponds to an alert window indicating limited storage.
- * @hide
- */
- public static final int UNSTARTABLE_REASON_INSUFFICIENT_STORAGE = 2;
-
- /**
* A manifest property to control app's participation in {@code adb backup}. Should only
* be used by system / privileged apps.
*
diff --git a/core/java/android/os/incremental/IIncrementalService.aidl b/core/java/android/os/incremental/IIncrementalService.aidl
index ba6fc6e841b0..fe3197a98bae 100644
--- a/core/java/android/os/incremental/IIncrementalService.aidl
+++ b/core/java/android/os/incremental/IIncrementalService.aidl
@@ -163,16 +163,6 @@ interface IIncrementalService {
boolean unregisterLoadingProgressListener(int storageId);
/**
- * Register storage health status listener.
- */
- boolean registerStorageHealthListener(int storageId, in StorageHealthCheckParams params, in IStorageHealthListener listener);
-
- /**
- * Register storage health status listener.
- */
- void unregisterStorageHealthListener(int storageId);
-
- /**
* Metrics key for the duration in milliseconds between now and the oldest pending read. The value is a long.
*/
const @utf8InCpp String METRICS_MILLIS_SINCE_OLDEST_PENDING_READ = "millisSinceOldestPendingRead";
diff --git a/core/java/android/os/incremental/IStorageHealthListener.aidl b/core/java/android/os/incremental/IStorageHealthListener.aidl
index c71e73f9ec8e..dc533a0e4778 100644
--- a/core/java/android/os/incremental/IStorageHealthListener.aidl
+++ b/core/java/android/os/incremental/IStorageHealthListener.aidl
@@ -29,12 +29,6 @@ oneway interface IStorageHealthListener {
/** There are reads pending for params.unhealthyTimeoutMs,
* marking storage as unhealthy due to unknown issues. */
const int HEALTH_STATUS_UNHEALTHY = 3;
- /** There are reads pending for params.unhealthyTimeoutMs,
- * due to data transportation issues. */
- const int HEALTH_STATUS_UNHEALTHY_TRANSPORT = 4;
- /** There are reads pending for params.unhealthyTimeoutMs,
- * due to limited storage space. */
- const int HEALTH_STATUS_UNHEALTHY_STORAGE = 5;
/** Health status callback. */
void onHealthStatus(in int storageId, in int status);
diff --git a/core/java/android/os/incremental/IncrementalManager.java b/core/java/android/os/incremental/IncrementalManager.java
index 7fb9ae0d86cc..9c8ee562849c 100644
--- a/core/java/android/os/incremental/IncrementalManager.java
+++ b/core/java/android/os/incremental/IncrementalManager.java
@@ -294,7 +294,6 @@ public final class IncrementalManager {
return;
}
mLoadingProgressCallbacks.cleanUpCallbacks(storage);
- unregisterHealthListener(codePath);
storage.unBind(codePath);
} catch (IOException e) {
Slog.w(TAG, "Failed to remove code path", e);
@@ -397,38 +396,6 @@ public final class IncrementalManager {
}
/**
- * Specify the health check params and listener for listening to Incremental Storage health
- * status changes. Notice that this will overwrite the previously registered listener.
- * @param codePath Path of the installed package. This path is on an Incremental Storage.
- * @param healthCheckParams The params for health state change timeouts.
- * @param listener To report health status change.
- * @return True if listener was successfully registered.
- */
- public boolean registerHealthListener(@NonNull String codePath,
- @NonNull StorageHealthCheckParams healthCheckParams,
- @NonNull IStorageHealthListener.Stub listener) {
- final IncrementalStorage storage = openStorage(codePath);
- if (storage == null) {
- // storage does not exist, package not installed
- return false;
- }
- return storage.registerStorageHealthListener(healthCheckParams, listener);
- }
-
- /**
- * Stop listening to health status changes on an Incremental Storage.
- * @param codePath Path of the installed package. This path is on an Incremental Storage.
- */
- public void unregisterHealthListener(@NonNull String codePath) {
- final IncrementalStorage storage = openStorage(codePath);
- if (storage == null) {
- // storage does not exist, package not installed
- return;
- }
- storage.unregisterStorageHealthListener();
- }
-
- /**
* Returns the metrics of an Incremental Storage.
*/
public IncrementalMetrics getMetrics(@NonNull String codePath) {
diff --git a/core/java/android/os/incremental/IncrementalStorage.java b/core/java/android/os/incremental/IncrementalStorage.java
index c19e29f9cdd6..4d46325d838c 100644
--- a/core/java/android/os/incremental/IncrementalStorage.java
+++ b/core/java/android/os/incremental/IncrementalStorage.java
@@ -589,33 +589,6 @@ public final class IncrementalStorage {
}
/**
- * Register to listen to the status changes of the storage health.
- * @param healthCheckParams Params to specify status change timeouts.
- * @param listener To report health status change from Incremental Service to the caller.
- */
- public boolean registerStorageHealthListener(StorageHealthCheckParams healthCheckParams,
- IStorageHealthListener listener) {
- try {
- return mService.registerStorageHealthListener(mId, healthCheckParams, listener);
- } catch (RemoteException e) {
- e.rethrowFromSystemServer();
- return false;
- }
- }
-
- /**
- * Stops listening to the status changes of the storage health.
- */
- public void unregisterStorageHealthListener() {
- try {
- mService.unregisterStorageHealthListener(mId);
- } catch (RemoteException e) {
- e.rethrowFromSystemServer();
- return;
- }
- }
-
- /**
* Returns the metrics of the current storage.
* {@see IIncrementalService} for metrics keys.
*/
diff --git a/core/java/com/android/internal/content/PackageMonitor.java b/core/java/com/android/internal/content/PackageMonitor.java
index 9a44c0594b76..7c975e1292d2 100644
--- a/core/java/com/android/internal/content/PackageMonitor.java
+++ b/core/java/com/android/internal/content/PackageMonitor.java
@@ -50,9 +50,6 @@ public abstract class PackageMonitor extends android.content.BroadcastReceiver {
sPackageFilt.addAction(Intent.ACTION_QUERY_PACKAGE_RESTART);
sPackageFilt.addAction(Intent.ACTION_PACKAGE_RESTARTED);
sPackageFilt.addAction(Intent.ACTION_PACKAGE_DATA_CLEARED);
- sPackageFilt.addAction(Intent.ACTION_PACKAGE_STARTABLE);
- sPackageFilt.addAction(Intent.ACTION_PACKAGE_UNSTARTABLE);
- sPackageFilt.addAction(Intent.ACTION_PACKAGE_FULLY_LOADED);
sPackageFilt.addDataScheme("package");
sNonDataFilt.addAction(Intent.ACTION_UID_REMOVED);
sNonDataFilt.addAction(Intent.ACTION_USER_STOPPED);
@@ -464,15 +461,6 @@ public abstract class PackageMonitor extends android.content.BroadcastReceiver {
String[] pkgList = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
mSomePackagesChanged = true;
onPackagesUnsuspended(pkgList);
- } else if (Intent.ACTION_PACKAGE_STARTABLE.equals(action)
- || Intent.ACTION_PACKAGE_UNSTARTABLE.equals(action)
- || Intent.ACTION_PACKAGE_FULLY_LOADED.equals(action)) {
- String pkg = intent.getStringExtra(Intent.EXTRA_PACKAGE_NAME);
- int uid = intent.getIntExtra(Intent.EXTRA_UID, 0);
- mSomePackagesChanged = false;
- if (pkg != null) {
- onPackageStateChanged(pkg, uid);
- }
}
if (mSomePackagesChanged) {