Merge "API feedback with better documentation." into sc-dev am: 2a3eef7ab6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14162035

Change-Id: I5e882bf133600306be95c1f894d9bed6ea7ade9a
This commit is contained in:
Alex Buynytskyy
2021-04-13 16:04:24 +00:00
committed by Automerger Merge Worker
5 changed files with 72 additions and 25 deletions

View File

@@ -17,20 +17,24 @@
package android.content.pm;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.content.ComponentName;
/**
* This class represents the parameters used to configure a Data Loader.
* This class represents the parameters used to configure a DataLoader.
*
* {@see android.service.dataloader.DataLoaderService.DataLoader}
*/
public class DataLoaderParams {
@NonNull
private final DataLoaderParamsParcel mData;
/**
* Creates and populates set of Data Loader parameters for Streaming installation.
* Creates and populates set of DataLoader parameters for Streaming installation.
*
* @param componentName Data Loader component supporting Streaming installation.
* @param arguments free form installation arguments
* @param componentName the component implementing a DataLoaderService that is responsible
* for providing data blocks while streaming.
* @param arguments free form installation arguments.
*/
public static final @NonNull DataLoaderParams forStreaming(@NonNull ComponentName componentName,
@NonNull String arguments) {
@@ -40,9 +44,12 @@ public class DataLoaderParams {
/**
* Creates and populates set of Data Loader parameters for Incremental installation.
*
* @param componentName Data Loader component supporting Incremental installation.
* @param componentName DataLoaderService component supporting Incremental installation.
* @param arguments free form installation arguments
*
* @hide
*/
@SystemApi
public static final @NonNull DataLoaderParams forIncremental(
@NonNull ComponentName componentName, @NonNull String arguments) {
return new DataLoaderParams(DataLoaderType.INCREMENTAL, componentName, arguments);

View File

@@ -229,8 +229,7 @@ public class PackageInstaller {
/**
* Type of DataLoader for this session. Will be one of
* {@link #DATA_LOADER_TYPE_NONE}, {@link #DATA_LOADER_TYPE_STREAMING},
* {@link #DATA_LOADER_TYPE_INCREMENTAL}.
* {@link #DATA_LOADER_TYPE_NONE}, {@link #DATA_LOADER_TYPE_STREAMING}.
* <p>
* See the individual types documentation for details.
*
@@ -359,7 +358,9 @@ public class PackageInstaller {
* Streaming installation using Incremental FileSystem.
*
* @see #EXTRA_DATA_LOADER_TYPE
* @hide
*/
@SystemApi
public static final int DATA_LOADER_TYPE_INCREMENTAL = DataLoaderType.INCREMENTAL;
/**
@@ -1165,7 +1166,7 @@ public class PackageInstaller {
}
/**
* Adds a file to session. On commit this file will be pulled from dataLoader {@code
* 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:
@@ -1180,7 +1181,7 @@ public class PackageInstaller {
* @param lengthBytes total size of the file being written.
* The system may clear various caches as needed to allocate
* this space.
* @param metadata additional info use by dataLoader to pull data for the file.
* @param metadata additional info use by DataLoader to pull data for the file.
* @param signature additional file signature, e.g.
* <a href="https://source.android.com/security/apksigning/v4.html">APK Signature Scheme v4</a>
* @throws SecurityException if called after the session has been
@@ -2021,7 +2022,7 @@ public class PackageInstaller {
/**
* Set the data loader params for the session.
* This also switches installation into data provider mode and disallow direct writes into
* This also switches installation into data loading mode and disallow direct writes into
* staging folder.
*
* @see android.service.dataloader.DataLoaderService.DataLoader