Loading api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -2014,7 +2014,6 @@ package android.content.pm { } public final class InstallationFile { ctor public InstallationFile(int, @NonNull String, long, @Nullable byte[], @Nullable byte[]); method public long getLengthBytes(); method public int getLocation(); method @Nullable public byte[] getMetadata(); Loading core/java/android/content/pm/InstallationFile.java +35 −1 Original line number Diff line number Diff line Loading @@ -21,13 +21,25 @@ import android.annotation.Nullable; import android.annotation.SystemApi; /** * Defines the properties of a file in an installation session. * 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. * * @see android.content.pm.PackageInstaller.Session#addFile * @hide */ @SystemApi public final class InstallationFile { private final @NonNull InstallationFileParcel mParcel; /** * Constructor, internal use only * @hide */ public InstallationFile(@PackageInstaller.FileLocation int location, @NonNull String name, long lengthBytes, @Nullable byte[] metadata, @Nullable byte[] signature) { mParcel = new InstallationFileParcel(); Loading @@ -38,22 +50,44 @@ public final class InstallationFile { mParcel.signature = signature; } /** * Installation Location of this file. Can be one of the following three locations: * <ul> * <li>(1) {@code PackageInstaller.LOCATION_DATA_APP}</li> * <li>(2) {@code PackageInstaller.LOCATION_MEDIA_OBB}</li> * <li>(3) {@code PackageInstaller.LOCATION_MEDIA_DATA}</li> * </ul> * @see android.content.pm.PackageInstaller * @return Integer that denotes the installation location of the file. */ public @PackageInstaller.FileLocation int getLocation() { return mParcel.location; } /** * @return Name of the file. */ public @NonNull String getName() { return mParcel.name; } /** * @return File size in bytes. */ public long getLengthBytes() { return mParcel.size; } /** * @return File metadata as a byte array */ public @Nullable byte[] getMetadata() { return mParcel.metadata; } /** * @return File signature info as a byte array */ public @Nullable byte[] getSignature() { return mParcel.signature; } Loading Loading
api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -2014,7 +2014,6 @@ package android.content.pm { } public final class InstallationFile { ctor public InstallationFile(int, @NonNull String, long, @Nullable byte[], @Nullable byte[]); method public long getLengthBytes(); method public int getLocation(); method @Nullable public byte[] getMetadata(); Loading
core/java/android/content/pm/InstallationFile.java +35 −1 Original line number Diff line number Diff line Loading @@ -21,13 +21,25 @@ import android.annotation.Nullable; import android.annotation.SystemApi; /** * Defines the properties of a file in an installation session. * 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. * * @see android.content.pm.PackageInstaller.Session#addFile * @hide */ @SystemApi public final class InstallationFile { private final @NonNull InstallationFileParcel mParcel; /** * Constructor, internal use only * @hide */ public InstallationFile(@PackageInstaller.FileLocation int location, @NonNull String name, long lengthBytes, @Nullable byte[] metadata, @Nullable byte[] signature) { mParcel = new InstallationFileParcel(); Loading @@ -38,22 +50,44 @@ public final class InstallationFile { mParcel.signature = signature; } /** * Installation Location of this file. Can be one of the following three locations: * <ul> * <li>(1) {@code PackageInstaller.LOCATION_DATA_APP}</li> * <li>(2) {@code PackageInstaller.LOCATION_MEDIA_OBB}</li> * <li>(3) {@code PackageInstaller.LOCATION_MEDIA_DATA}</li> * </ul> * @see android.content.pm.PackageInstaller * @return Integer that denotes the installation location of the file. */ public @PackageInstaller.FileLocation int getLocation() { return mParcel.location; } /** * @return Name of the file. */ public @NonNull String getName() { return mParcel.name; } /** * @return File size in bytes. */ public long getLengthBytes() { return mParcel.size; } /** * @return File metadata as a byte array */ public @Nullable byte[] getMetadata() { return mParcel.metadata; } /** * @return File signature info as a byte array */ public @Nullable byte[] getSignature() { return mParcel.signature; } Loading