diff options
| author | Alex Buynytskyy <alexbuy@google.com> | 2021-03-25 14:52:33 -0700 |
|---|---|---|
| committer | Alex Buynytskyy <alexbuy@google.com> | 2021-03-25 14:52:33 -0700 |
| commit | 8e3eeb507afdf563b02c1f77fa9dd18018ff9763 (patch) | |
| tree | e3bdaf6341b36f29089641807fb1bb02dd3e580d /core/java/android | |
| parent | 5ac5553879faf44e9c219cccb33489a19f0451e6 (diff) | |
Making the rest of Streaming installation API public.
Something was left behind when we opened the installation API.
Bug: 152310230
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: Ia2d4c3f3e97c8432fcca094d6e0f4e97dcc048d4
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/InstallationFile.java | 9 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageInstaller.java | 13 | ||||
| -rw-r--r-- | core/java/android/service/dataloader/DataLoaderService.java | 18 |
3 files changed, 11 insertions, 29 deletions
diff --git a/core/java/android/content/pm/InstallationFile.java b/core/java/android/content/pm/InstallationFile.java index de761ad1a305..e76402077714 100644 --- a/core/java/android/content/pm/InstallationFile.java +++ b/core/java/android/content/pm/InstallationFile.java @@ -18,21 +18,16 @@ package android.content.pm; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.SystemApi; /** * Definition of a file in a streaming installation session. * You can use this class to retrieve the information of such a file, such as its name, size and * metadata. These file attributes will be consistent with those used in: - * {@code PackageInstaller.Session#addFile}, when the file was first added into the session. - * - * WARNING: This is a system API to aid internal development. - * Use at your own risk. It will change or be removed without warning. + * {@code android.content.pm.PackageInstaller.Session#addFile}, when the file was first added + * into the session. * * @see android.content.pm.PackageInstaller.Session#addFile - * @hide */ -@SystemApi public final class InstallationFile { private final @NonNull InstallationFileParcel mParcel; diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java index 5afec0644920..3013e23315e5 100644 --- a/core/java/android/content/pm/PackageInstaller.java +++ b/core/java/android/content/pm/PackageInstaller.java @@ -1165,7 +1165,8 @@ public class PackageInstaller { } /** - * Adds a file to session. On commit this file will be pulled from dataLoader. + * Adds a file to session. On commit this file will be pulled from dataLoader {@code + * android.service.dataloader.DataLoaderService.DataLoader}. * * @param location target location for the file. Possible values: * {@link #LOCATION_DATA_APP}, @@ -1184,7 +1185,9 @@ public class PackageInstaller { * <a href="https://source.android.com/security/apksigning/v4.html">APK Signature Scheme v4</a> * @throws SecurityException if called after the session has been * sealed or abandoned - * @throws IllegalStateException if called for non-callback session + * @throws IllegalStateException if called for non-streaming session + * + * @see android.content.pm.InstallationFile */ public void addFile(@FileLocation int location, @NonNull String name, long lengthBytes, @NonNull byte[] metadata, @Nullable byte[] signature) { @@ -1205,10 +1208,8 @@ public class PackageInstaller { * @param name name of a file, e.g. split. * @throws SecurityException if called after the session has been * sealed or abandoned - * @throws IllegalStateException if called for non-callback session - * {@hide} + * @throws IllegalStateException if called for non-streaming session */ - @SystemApi public void removeFile(@FileLocation int location, @NonNull String name) { try { mSession.removeFile(location, name); @@ -2015,6 +2016,8 @@ public class PackageInstaller { * Set the data loader params for the session. * This also switches installation into data provider mode and disallow direct writes into * staging folder. + * + * @see android.service.dataloader.DataLoaderService.DataLoader */ public void setDataLoaderParams(@NonNull DataLoaderParams dataLoaderParams) { this.dataLoaderParams = dataLoaderParams; diff --git a/core/java/android/service/dataloader/DataLoaderService.java b/core/java/android/service/dataloader/DataLoaderService.java index ad6316cf3d95..3ad80d3e97fa 100644 --- a/core/java/android/service/dataloader/DataLoaderService.java +++ b/core/java/android/service/dataloader/DataLoaderService.java @@ -19,7 +19,6 @@ package android.service.dataloader; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; -import android.annotation.SystemApi; import android.app.Service; import android.content.Intent; import android.content.pm.DataLoaderParams; @@ -41,25 +40,15 @@ import java.util.Collection; /** * The base class for implementing data loader service to control data loaders. Expecting - * Incremental Service to bind to a children class of this. - * - * WARNING: This is a system API to aid internal development. - * Use at your own risk. It will change or be removed without warning. - * - * TODO(b/136132412): update with latest API design - * - * @hide + * Installation Session to bind to a children class of this. */ -@SystemApi public abstract class DataLoaderService extends Service { private static final String TAG = "DataLoaderService"; private final DataLoaderBinderService mBinder = new DataLoaderBinderService(); /** * Managed DataLoader interface. Each instance corresponds to a single installation session. - * @hide */ - @SystemApi public interface DataLoader { /** * A virtual constructor. @@ -88,9 +77,7 @@ public abstract class DataLoaderService extends Service { * DataLoader factory method. * * @return An instance of a DataLoader. - * @hide */ - @SystemApi public @Nullable DataLoader onCreateDataLoader(@NonNull DataLoaderParams dataLoaderParams) { return null; } @@ -156,10 +143,7 @@ public abstract class DataLoaderService extends Service { /** * Used by the DataLoaderService implementations. - * - * @hide */ - @SystemApi public static final class FileSystemConnector { /** * Create a wrapper for a native instance. |
