Loading core/api/current.txt +0 −45 Original line number Diff line number Diff line Loading @@ -12086,13 +12086,6 @@ package android.content.pm { field public static final String ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED = "android.content.pm.action.CAN_INTERACT_ACROSS_PROFILES_CHANGED"; } public class DataLoaderParams { method @NonNull public static final android.content.pm.DataLoaderParams forStreaming(@NonNull android.content.ComponentName, @NonNull String); method @NonNull public final String getArguments(); method @NonNull public final android.content.ComponentName getComponentName(); method @NonNull public final int getType(); } public final class FeatureGroupInfo implements android.os.Parcelable { ctor public FeatureGroupInfo(); ctor public FeatureGroupInfo(android.content.pm.FeatureGroupInfo); Loading Loading @@ -12127,14 +12120,6 @@ package android.content.pm { field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.InstallSourceInfo> CREATOR; } public final class InstallationFile { method public long getLengthBytes(); method public int getLocation(); method @Nullable public byte[] getMetadata(); method @NonNull public String getName(); method @Nullable public byte[] getSignature(); } public class InstrumentationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable { ctor public InstrumentationInfo(); ctor public InstrumentationInfo(android.content.pm.InstrumentationInfo); Loading Loading @@ -12331,9 +12316,6 @@ package android.content.pm { field public static final String ACTION_SESSION_COMMITTED = "android.content.pm.action.SESSION_COMMITTED"; field public static final String ACTION_SESSION_DETAILS = "android.content.pm.action.SESSION_DETAILS"; field public static final String ACTION_SESSION_UPDATED = "android.content.pm.action.SESSION_UPDATED"; field public static final int DATA_LOADER_TYPE_NONE = 0; // 0x0 field public static final int DATA_LOADER_TYPE_STREAMING = 1; // 0x1 field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; field public static final String EXTRA_OTHER_PACKAGE_NAME = "android.content.pm.extra.OTHER_PACKAGE_NAME"; field public static final String EXTRA_PACKAGE_NAME = "android.content.pm.extra.PACKAGE_NAME"; field public static final String EXTRA_SESSION = "android.content.pm.extra.SESSION"; Loading @@ -12341,9 +12323,6 @@ package android.content.pm { field public static final String EXTRA_STATUS = "android.content.pm.extra.STATUS"; field public static final String EXTRA_STATUS_MESSAGE = "android.content.pm.extra.STATUS_MESSAGE"; field public static final String EXTRA_STORAGE_PATH = "android.content.pm.extra.STORAGE_PATH"; field public static final int LOCATION_DATA_APP = 0; // 0x0 field public static final int LOCATION_MEDIA_DATA = 2; // 0x2 field public static final int LOCATION_MEDIA_OBB = 1; // 0x1 field public static final int STATUS_FAILURE = 1; // 0x1 field public static final int STATUS_FAILURE_ABORTED = 3; // 0x3 field public static final int STATUS_FAILURE_BLOCKED = 2; // 0x2 Loading @@ -12351,7 +12330,6 @@ package android.content.pm { field public static final int STATUS_FAILURE_INCOMPATIBLE = 7; // 0x7 field public static final int STATUS_FAILURE_INVALID = 4; // 0x4 field public static final int STATUS_FAILURE_STORAGE = 6; // 0x6 field public static final int STATUS_PENDING_STREAMING = -2; // 0xfffffffe field public static final int STATUS_PENDING_USER_ACTION = -1; // 0xffffffff field public static final int STATUS_SUCCESS = 0; // 0x0 } Loading @@ -12359,12 +12337,10 @@ package android.content.pm { public static class PackageInstaller.Session implements java.io.Closeable { method public void abandon(); method public void addChildSessionId(int); method public void addFile(int, @NonNull String, long, @NonNull byte[], @Nullable byte[]); method public void close(); method public void commit(@NonNull android.content.IntentSender); method public void fsync(@NonNull java.io.OutputStream) throws java.io.IOException; method @NonNull public int[] getChildSessionIds(); method @Nullable public android.content.pm.DataLoaderParams getDataLoaderParams(); method @NonNull public String[] getNames() throws java.io.IOException; method public int getParentSessionId(); method public boolean isMultiPackage(); Loading @@ -12372,7 +12348,6 @@ package android.content.pm { method @NonNull public java.io.InputStream openRead(@NonNull String) throws java.io.IOException; method @NonNull public java.io.OutputStream openWrite(@NonNull String, long, long) throws java.io.IOException; method public void removeChildSessionId(int); method public void removeFile(int, @NonNull String); method public void removeSplit(@NonNull String) throws java.io.IOException; method @Deprecated public void setChecksums(@NonNull String, @NonNull java.util.List<android.content.pm.Checksum>, @Nullable byte[]) throws java.io.IOException; method public void setStagingProgress(float); Loading Loading @@ -12443,7 +12418,6 @@ package android.content.pm { method public void setAppLabel(@Nullable CharSequence); method public void setAppPackageName(@Nullable String); method @Deprecated public void setAutoRevokePermissionsMode(boolean); method public void setDataLoaderParams(@NonNull android.content.pm.DataLoaderParams); method public void setInstallLocation(int); method public void setInstallReason(int); method public void setInstallScenario(int); Loading Loading @@ -38369,25 +38343,6 @@ package android.service.controls.templates { } package android.service.dataloader { public abstract class DataLoaderService extends android.app.Service { ctor public DataLoaderService(); method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent); method @Nullable public android.service.dataloader.DataLoaderService.DataLoader onCreateDataLoader(@NonNull android.content.pm.DataLoaderParams); } public static interface DataLoaderService.DataLoader { method public boolean onCreate(@NonNull android.content.pm.DataLoaderParams, @NonNull android.service.dataloader.DataLoaderService.FileSystemConnector); method public boolean onPrepareImage(@NonNull java.util.Collection<android.content.pm.InstallationFile>, @NonNull java.util.Collection<java.lang.String>); } public static final class DataLoaderService.FileSystemConnector { method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void writeData(@NonNull String, long, long, @NonNull android.os.ParcelFileDescriptor) throws java.io.IOException; } } package android.service.dreams { public class DreamService extends android.app.Service implements android.view.Window.Callback { core/api/system-current.txt +40 −0 Original line number Diff line number Diff line Loading @@ -2527,6 +2527,18 @@ package android.content.pm { public class DataLoaderParams { method @NonNull public static final android.content.pm.DataLoaderParams forIncremental(@NonNull android.content.ComponentName, @NonNull String); method @NonNull public static final android.content.pm.DataLoaderParams forStreaming(@NonNull android.content.ComponentName, @NonNull String); method @NonNull public final String getArguments(); method @NonNull public final android.content.ComponentName getComponentName(); method @NonNull public final int getType(); } public final class InstallationFile { method public long getLengthBytes(); method public int getLocation(); method @Nullable public byte[] getMetadata(); method @NonNull public String getName(); method @Nullable public byte[] getSignature(); } public final class InstantAppInfo implements android.os.Parcelable { Loading Loading @@ -2620,10 +2632,19 @@ package android.content.pm { public class PackageInstaller { method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setPermissionsResult(int, boolean); field public static final int DATA_LOADER_TYPE_INCREMENTAL = 2; // 0x2 field public static final int DATA_LOADER_TYPE_NONE = 0; // 0x0 field public static final int DATA_LOADER_TYPE_STREAMING = 1; // 0x1 field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; field public static final int LOCATION_DATA_APP = 0; // 0x0 field public static final int LOCATION_MEDIA_DATA = 2; // 0x2 field public static final int LOCATION_MEDIA_OBB = 1; // 0x1 } public static class PackageInstaller.Session implements java.io.Closeable { method @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public void addFile(int, @NonNull String, long, @NonNull byte[], @Nullable byte[]); method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void commitTransferred(@NonNull android.content.IntentSender); method @Nullable @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public android.content.pm.DataLoaderParams getDataLoaderParams(); method @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public void removeFile(int, @NonNull String); } public static class PackageInstaller.SessionInfo implements android.os.Parcelable { Loading @@ -2644,6 +2665,7 @@ package android.content.pm { public static class PackageInstaller.SessionParams implements android.os.Parcelable { method @RequiresPermission(android.Manifest.permission.ALLOCATE_AGGRESSIVE) public void setAllocateAggressive(boolean); method @Deprecated public void setAllowDowngrade(boolean); method @RequiresPermission(allOf={android.Manifest.permission.INSTALL_PACKAGES, "com.android.permission.USE_INSTALLER_V2"}) public void setDataLoaderParams(@NonNull android.content.pm.DataLoaderParams); method public void setDontKillApp(boolean); method public void setEnableRollback(boolean); method public void setEnableRollback(boolean, int); Loading Loading @@ -9815,6 +9837,24 @@ package android.service.contentsuggestions { } package android.service.dataloader { public abstract class DataLoaderService extends android.app.Service { ctor public DataLoaderService(); method @Nullable public android.service.dataloader.DataLoaderService.DataLoader onCreateDataLoader(@NonNull android.content.pm.DataLoaderParams); } public static interface DataLoaderService.DataLoader { method public boolean onCreate(@NonNull android.content.pm.DataLoaderParams, @NonNull android.service.dataloader.DataLoaderService.FileSystemConnector); method public boolean onPrepareImage(@NonNull java.util.Collection<android.content.pm.InstallationFile>, @NonNull java.util.Collection<java.lang.String>); } public static final class DataLoaderService.FileSystemConnector { method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void writeData(@NonNull String, long, long, @NonNull android.os.ParcelFileDescriptor) throws java.io.IOException; } } package android.service.displayhash { public final class DisplayHashParams implements android.os.Parcelable { core/java/android/content/pm/DataLoaderParams.java +2 −0 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.content.ComponentName; * This class represents the parameters used to configure a DataLoader. * * {@see android.service.dataloader.DataLoaderService.DataLoader} * @hide */ @SystemApi public class DataLoaderParams { @NonNull private final DataLoaderParamsParcel mData; Loading core/java/android/content/pm/InstallationFile.java +4 −2 Original line number Diff line number Diff line Loading @@ -18,16 +18,18 @@ 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 android.content.pm.PackageInstaller.Session#addFile}, when the file was first added * into the session. * {@code 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; Loading core/java/android/content/pm/PackageInstaller.java +34 −3 Original line number Diff line number Diff line Loading @@ -229,12 +229,15 @@ 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_NONE}, {@link #DATA_LOADER_TYPE_STREAMING}, * {@link #DATA_LOADER_TYPE_INCREMENTAL}. * <p> * See the individual types documentation for details. * * @see Intent#getIntExtra(String, int) * {@hide} */ @SystemApi public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; /** Loading @@ -242,6 +245,7 @@ public class PackageInstaller { * Caller should make sure DataLoader is able to prepare image and reinitiate the operation. * * @see #EXTRA_SESSION_ID * {@hide} */ public static final int STATUS_PENDING_STREAMING = -2; Loading Loading @@ -344,21 +348,25 @@ public class PackageInstaller { * Default value, non-streaming installation session. * * @see #EXTRA_DATA_LOADER_TYPE * {@hide} */ @SystemApi public static final int DATA_LOADER_TYPE_NONE = DataLoaderType.NONE; /** * Streaming installation using data loader. * * @see #EXTRA_DATA_LOADER_TYPE * {@hide} */ @SystemApi public static final int DATA_LOADER_TYPE_STREAMING = DataLoaderType.STREAMING; /** * Streaming installation using Incremental FileSystem. * * @see #EXTRA_DATA_LOADER_TYPE * @hide * {@hide} */ @SystemApi public static final int DATA_LOADER_TYPE_INCREMENTAL = DataLoaderType.INCREMENTAL; Loading @@ -366,13 +374,18 @@ public class PackageInstaller { /** * Target location for the file in installation session is /data/app/<packageName>-<id>. * This is the intended location for APKs. * Requires permission to install packages. * {@hide} */ @SystemApi public static final int LOCATION_DATA_APP = InstallationFileLocation.DATA_APP; /** * Target location for the file in installation session is * /data/media/<userid>/Android/obb/<packageName>. This is the intended location for OBBs. * {@hide} */ @SystemApi public static final int LOCATION_MEDIA_OBB = InstallationFileLocation.MEDIA_OBB; /** Loading @@ -380,7 +393,9 @@ public class PackageInstaller { * /data/media/<userid>/Android/data/<packageName>. * This is the intended location for application data. * Can only be used by an app itself running under specific user. * {@hide} */ @SystemApi public static final int LOCATION_MEDIA_DATA = InstallationFileLocation.MEDIA_DATA; /** @hide */ Loading Loading @@ -1152,7 +1167,10 @@ public class PackageInstaller { /** * @return data loader params or null if the session is not using one. * {@hide} */ @SystemApi @RequiresPermission(android.Manifest.permission.USE_INSTALLER_V2) public @Nullable DataLoaderParams getDataLoaderParams() { try { DataLoaderParamsParcel data = mSession.getDataLoaderParams(); Loading Loading @@ -1189,7 +1207,11 @@ public class PackageInstaller { * @throws IllegalStateException if called for non-streaming session * * @see android.content.pm.InstallationFile * * {@hide} */ @SystemApi @RequiresPermission(android.Manifest.permission.USE_INSTALLER_V2) public void addFile(@FileLocation int location, @NonNull String name, long lengthBytes, @NonNull byte[] metadata, @Nullable byte[] signature) { try { Loading @@ -1209,8 +1231,11 @@ 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-streaming session * @throws IllegalStateException if called for non-DataLoader session * {@hide} */ @SystemApi @RequiresPermission(android.Manifest.permission.USE_INSTALLER_V2) public void removeFile(@FileLocation int location, @NonNull String name) { try { mSession.removeFile(location, name); Loading Loading @@ -2026,7 +2051,13 @@ public class PackageInstaller { * staging folder. * * @see android.service.dataloader.DataLoaderService.DataLoader * * {@hide} */ @SystemApi @RequiresPermission(allOf = { Manifest.permission.INSTALL_PACKAGES, Manifest.permission.USE_INSTALLER_V2}) public void setDataLoaderParams(@NonNull DataLoaderParams dataLoaderParams) { this.dataLoaderParams = dataLoaderParams; } Loading Loading
core/api/current.txt +0 −45 Original line number Diff line number Diff line Loading @@ -12086,13 +12086,6 @@ package android.content.pm { field public static final String ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED = "android.content.pm.action.CAN_INTERACT_ACROSS_PROFILES_CHANGED"; } public class DataLoaderParams { method @NonNull public static final android.content.pm.DataLoaderParams forStreaming(@NonNull android.content.ComponentName, @NonNull String); method @NonNull public final String getArguments(); method @NonNull public final android.content.ComponentName getComponentName(); method @NonNull public final int getType(); } public final class FeatureGroupInfo implements android.os.Parcelable { ctor public FeatureGroupInfo(); ctor public FeatureGroupInfo(android.content.pm.FeatureGroupInfo); Loading Loading @@ -12127,14 +12120,6 @@ package android.content.pm { field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.InstallSourceInfo> CREATOR; } public final class InstallationFile { method public long getLengthBytes(); method public int getLocation(); method @Nullable public byte[] getMetadata(); method @NonNull public String getName(); method @Nullable public byte[] getSignature(); } public class InstrumentationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable { ctor public InstrumentationInfo(); ctor public InstrumentationInfo(android.content.pm.InstrumentationInfo); Loading Loading @@ -12331,9 +12316,6 @@ package android.content.pm { field public static final String ACTION_SESSION_COMMITTED = "android.content.pm.action.SESSION_COMMITTED"; field public static final String ACTION_SESSION_DETAILS = "android.content.pm.action.SESSION_DETAILS"; field public static final String ACTION_SESSION_UPDATED = "android.content.pm.action.SESSION_UPDATED"; field public static final int DATA_LOADER_TYPE_NONE = 0; // 0x0 field public static final int DATA_LOADER_TYPE_STREAMING = 1; // 0x1 field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; field public static final String EXTRA_OTHER_PACKAGE_NAME = "android.content.pm.extra.OTHER_PACKAGE_NAME"; field public static final String EXTRA_PACKAGE_NAME = "android.content.pm.extra.PACKAGE_NAME"; field public static final String EXTRA_SESSION = "android.content.pm.extra.SESSION"; Loading @@ -12341,9 +12323,6 @@ package android.content.pm { field public static final String EXTRA_STATUS = "android.content.pm.extra.STATUS"; field public static final String EXTRA_STATUS_MESSAGE = "android.content.pm.extra.STATUS_MESSAGE"; field public static final String EXTRA_STORAGE_PATH = "android.content.pm.extra.STORAGE_PATH"; field public static final int LOCATION_DATA_APP = 0; // 0x0 field public static final int LOCATION_MEDIA_DATA = 2; // 0x2 field public static final int LOCATION_MEDIA_OBB = 1; // 0x1 field public static final int STATUS_FAILURE = 1; // 0x1 field public static final int STATUS_FAILURE_ABORTED = 3; // 0x3 field public static final int STATUS_FAILURE_BLOCKED = 2; // 0x2 Loading @@ -12351,7 +12330,6 @@ package android.content.pm { field public static final int STATUS_FAILURE_INCOMPATIBLE = 7; // 0x7 field public static final int STATUS_FAILURE_INVALID = 4; // 0x4 field public static final int STATUS_FAILURE_STORAGE = 6; // 0x6 field public static final int STATUS_PENDING_STREAMING = -2; // 0xfffffffe field public static final int STATUS_PENDING_USER_ACTION = -1; // 0xffffffff field public static final int STATUS_SUCCESS = 0; // 0x0 } Loading @@ -12359,12 +12337,10 @@ package android.content.pm { public static class PackageInstaller.Session implements java.io.Closeable { method public void abandon(); method public void addChildSessionId(int); method public void addFile(int, @NonNull String, long, @NonNull byte[], @Nullable byte[]); method public void close(); method public void commit(@NonNull android.content.IntentSender); method public void fsync(@NonNull java.io.OutputStream) throws java.io.IOException; method @NonNull public int[] getChildSessionIds(); method @Nullable public android.content.pm.DataLoaderParams getDataLoaderParams(); method @NonNull public String[] getNames() throws java.io.IOException; method public int getParentSessionId(); method public boolean isMultiPackage(); Loading @@ -12372,7 +12348,6 @@ package android.content.pm { method @NonNull public java.io.InputStream openRead(@NonNull String) throws java.io.IOException; method @NonNull public java.io.OutputStream openWrite(@NonNull String, long, long) throws java.io.IOException; method public void removeChildSessionId(int); method public void removeFile(int, @NonNull String); method public void removeSplit(@NonNull String) throws java.io.IOException; method @Deprecated public void setChecksums(@NonNull String, @NonNull java.util.List<android.content.pm.Checksum>, @Nullable byte[]) throws java.io.IOException; method public void setStagingProgress(float); Loading Loading @@ -12443,7 +12418,6 @@ package android.content.pm { method public void setAppLabel(@Nullable CharSequence); method public void setAppPackageName(@Nullable String); method @Deprecated public void setAutoRevokePermissionsMode(boolean); method public void setDataLoaderParams(@NonNull android.content.pm.DataLoaderParams); method public void setInstallLocation(int); method public void setInstallReason(int); method public void setInstallScenario(int); Loading Loading @@ -38369,25 +38343,6 @@ package android.service.controls.templates { } package android.service.dataloader { public abstract class DataLoaderService extends android.app.Service { ctor public DataLoaderService(); method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent); method @Nullable public android.service.dataloader.DataLoaderService.DataLoader onCreateDataLoader(@NonNull android.content.pm.DataLoaderParams); } public static interface DataLoaderService.DataLoader { method public boolean onCreate(@NonNull android.content.pm.DataLoaderParams, @NonNull android.service.dataloader.DataLoaderService.FileSystemConnector); method public boolean onPrepareImage(@NonNull java.util.Collection<android.content.pm.InstallationFile>, @NonNull java.util.Collection<java.lang.String>); } public static final class DataLoaderService.FileSystemConnector { method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void writeData(@NonNull String, long, long, @NonNull android.os.ParcelFileDescriptor) throws java.io.IOException; } } package android.service.dreams { public class DreamService extends android.app.Service implements android.view.Window.Callback {
core/api/system-current.txt +40 −0 Original line number Diff line number Diff line Loading @@ -2527,6 +2527,18 @@ package android.content.pm { public class DataLoaderParams { method @NonNull public static final android.content.pm.DataLoaderParams forIncremental(@NonNull android.content.ComponentName, @NonNull String); method @NonNull public static final android.content.pm.DataLoaderParams forStreaming(@NonNull android.content.ComponentName, @NonNull String); method @NonNull public final String getArguments(); method @NonNull public final android.content.ComponentName getComponentName(); method @NonNull public final int getType(); } public final class InstallationFile { method public long getLengthBytes(); method public int getLocation(); method @Nullable public byte[] getMetadata(); method @NonNull public String getName(); method @Nullable public byte[] getSignature(); } public final class InstantAppInfo implements android.os.Parcelable { Loading Loading @@ -2620,10 +2632,19 @@ package android.content.pm { public class PackageInstaller { method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setPermissionsResult(int, boolean); field public static final int DATA_LOADER_TYPE_INCREMENTAL = 2; // 0x2 field public static final int DATA_LOADER_TYPE_NONE = 0; // 0x0 field public static final int DATA_LOADER_TYPE_STREAMING = 1; // 0x1 field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; field public static final int LOCATION_DATA_APP = 0; // 0x0 field public static final int LOCATION_MEDIA_DATA = 2; // 0x2 field public static final int LOCATION_MEDIA_OBB = 1; // 0x1 } public static class PackageInstaller.Session implements java.io.Closeable { method @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public void addFile(int, @NonNull String, long, @NonNull byte[], @Nullable byte[]); method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void commitTransferred(@NonNull android.content.IntentSender); method @Nullable @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public android.content.pm.DataLoaderParams getDataLoaderParams(); method @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public void removeFile(int, @NonNull String); } public static class PackageInstaller.SessionInfo implements android.os.Parcelable { Loading @@ -2644,6 +2665,7 @@ package android.content.pm { public static class PackageInstaller.SessionParams implements android.os.Parcelable { method @RequiresPermission(android.Manifest.permission.ALLOCATE_AGGRESSIVE) public void setAllocateAggressive(boolean); method @Deprecated public void setAllowDowngrade(boolean); method @RequiresPermission(allOf={android.Manifest.permission.INSTALL_PACKAGES, "com.android.permission.USE_INSTALLER_V2"}) public void setDataLoaderParams(@NonNull android.content.pm.DataLoaderParams); method public void setDontKillApp(boolean); method public void setEnableRollback(boolean); method public void setEnableRollback(boolean, int); Loading Loading @@ -9815,6 +9837,24 @@ package android.service.contentsuggestions { } package android.service.dataloader { public abstract class DataLoaderService extends android.app.Service { ctor public DataLoaderService(); method @Nullable public android.service.dataloader.DataLoaderService.DataLoader onCreateDataLoader(@NonNull android.content.pm.DataLoaderParams); } public static interface DataLoaderService.DataLoader { method public boolean onCreate(@NonNull android.content.pm.DataLoaderParams, @NonNull android.service.dataloader.DataLoaderService.FileSystemConnector); method public boolean onPrepareImage(@NonNull java.util.Collection<android.content.pm.InstallationFile>, @NonNull java.util.Collection<java.lang.String>); } public static final class DataLoaderService.FileSystemConnector { method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void writeData(@NonNull String, long, long, @NonNull android.os.ParcelFileDescriptor) throws java.io.IOException; } } package android.service.displayhash { public final class DisplayHashParams implements android.os.Parcelable {
core/java/android/content/pm/DataLoaderParams.java +2 −0 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.content.ComponentName; * This class represents the parameters used to configure a DataLoader. * * {@see android.service.dataloader.DataLoaderService.DataLoader} * @hide */ @SystemApi public class DataLoaderParams { @NonNull private final DataLoaderParamsParcel mData; Loading
core/java/android/content/pm/InstallationFile.java +4 −2 Original line number Diff line number Diff line Loading @@ -18,16 +18,18 @@ 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 android.content.pm.PackageInstaller.Session#addFile}, when the file was first added * into the session. * {@code 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; Loading
core/java/android/content/pm/PackageInstaller.java +34 −3 Original line number Diff line number Diff line Loading @@ -229,12 +229,15 @@ 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_NONE}, {@link #DATA_LOADER_TYPE_STREAMING}, * {@link #DATA_LOADER_TYPE_INCREMENTAL}. * <p> * See the individual types documentation for details. * * @see Intent#getIntExtra(String, int) * {@hide} */ @SystemApi public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; /** Loading @@ -242,6 +245,7 @@ public class PackageInstaller { * Caller should make sure DataLoader is able to prepare image and reinitiate the operation. * * @see #EXTRA_SESSION_ID * {@hide} */ public static final int STATUS_PENDING_STREAMING = -2; Loading Loading @@ -344,21 +348,25 @@ public class PackageInstaller { * Default value, non-streaming installation session. * * @see #EXTRA_DATA_LOADER_TYPE * {@hide} */ @SystemApi public static final int DATA_LOADER_TYPE_NONE = DataLoaderType.NONE; /** * Streaming installation using data loader. * * @see #EXTRA_DATA_LOADER_TYPE * {@hide} */ @SystemApi public static final int DATA_LOADER_TYPE_STREAMING = DataLoaderType.STREAMING; /** * Streaming installation using Incremental FileSystem. * * @see #EXTRA_DATA_LOADER_TYPE * @hide * {@hide} */ @SystemApi public static final int DATA_LOADER_TYPE_INCREMENTAL = DataLoaderType.INCREMENTAL; Loading @@ -366,13 +374,18 @@ public class PackageInstaller { /** * Target location for the file in installation session is /data/app/<packageName>-<id>. * This is the intended location for APKs. * Requires permission to install packages. * {@hide} */ @SystemApi public static final int LOCATION_DATA_APP = InstallationFileLocation.DATA_APP; /** * Target location for the file in installation session is * /data/media/<userid>/Android/obb/<packageName>. This is the intended location for OBBs. * {@hide} */ @SystemApi public static final int LOCATION_MEDIA_OBB = InstallationFileLocation.MEDIA_OBB; /** Loading @@ -380,7 +393,9 @@ public class PackageInstaller { * /data/media/<userid>/Android/data/<packageName>. * This is the intended location for application data. * Can only be used by an app itself running under specific user. * {@hide} */ @SystemApi public static final int LOCATION_MEDIA_DATA = InstallationFileLocation.MEDIA_DATA; /** @hide */ Loading Loading @@ -1152,7 +1167,10 @@ public class PackageInstaller { /** * @return data loader params or null if the session is not using one. * {@hide} */ @SystemApi @RequiresPermission(android.Manifest.permission.USE_INSTALLER_V2) public @Nullable DataLoaderParams getDataLoaderParams() { try { DataLoaderParamsParcel data = mSession.getDataLoaderParams(); Loading Loading @@ -1189,7 +1207,11 @@ public class PackageInstaller { * @throws IllegalStateException if called for non-streaming session * * @see android.content.pm.InstallationFile * * {@hide} */ @SystemApi @RequiresPermission(android.Manifest.permission.USE_INSTALLER_V2) public void addFile(@FileLocation int location, @NonNull String name, long lengthBytes, @NonNull byte[] metadata, @Nullable byte[] signature) { try { Loading @@ -1209,8 +1231,11 @@ 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-streaming session * @throws IllegalStateException if called for non-DataLoader session * {@hide} */ @SystemApi @RequiresPermission(android.Manifest.permission.USE_INSTALLER_V2) public void removeFile(@FileLocation int location, @NonNull String name) { try { mSession.removeFile(location, name); Loading Loading @@ -2026,7 +2051,13 @@ public class PackageInstaller { * staging folder. * * @see android.service.dataloader.DataLoaderService.DataLoader * * {@hide} */ @SystemApi @RequiresPermission(allOf = { Manifest.permission.INSTALL_PACKAGES, Manifest.permission.USE_INSTALLER_V2}) public void setDataLoaderParams(@NonNull DataLoaderParams dataLoaderParams) { this.dataLoaderParams = dataLoaderParams; } Loading