Loading Android.bp +13 −3 Original line number Diff line number Diff line Loading @@ -546,7 +546,6 @@ java_library { // DO NOT ADD ANY MORE ENTRIES TO THIS LIST "//external/robolectric-shadows:__subpackages__", "//frameworks/layoutlib:__subpackages__", "//frameworks/opt/net/ike:__subpackages__", ], } Loading Loading @@ -694,6 +693,7 @@ filegroup { "core/java/android/annotation/CallbackExecutor.java", "core/java/android/annotation/CheckResult.java", "core/java/android/annotation/CurrentTimeMillisLong.java", "core/java/android/annotation/Hide.java", "core/java/android/annotation/IntDef.java", "core/java/android/annotation/IntRange.java", "core/java/android/annotation/LongDef.java", Loading Loading @@ -753,6 +753,18 @@ filegroup { ], } filegroup { name: "framework-services-net-module-wifi-shared-srcs", srcs: [ "core/java/android/net/DhcpResults.java", "core/java/android/net/shared/Inet4AddressUtils.java", "core/java/android/net/shared/InetAddressUtils.java", "core/java/android/net/util/IpUtils.java", "core/java/android/util/LocalLog.java", "core/java/com/android/internal/util/Preconditions.java", ], } // keep these files in sync with the package/Tethering/jarjar-rules.txt for the tethering module. filegroup { name: "framework-tethering-shared-srcs", Loading Loading @@ -974,7 +986,6 @@ filegroup { srcs: [ "core/java/android/os/incremental/IIncrementalService.aidl", "core/java/android/os/incremental/IncrementalNewFileParams.aidl", "core/java/android/os/incremental/IncrementalSignature.aidl", ], path: "core/java", } Loading Loading @@ -1241,7 +1252,6 @@ filegroup { "core/java/android/net/InterfaceConfiguration.java", "core/java/android/os/BasicShellCommandHandler.java", "core/java/android/util/BackupUtils.java", "core/java/android/util/LocalLog.java", "core/java/android/util/Rational.java", "core/java/com/android/internal/util/FastXmlSerializer.java", "core/java/com/android/internal/util/HexDump.java", Loading apct-tests/perftests/blobstore/src/com/android/perftests/blob/BlobStorePerfTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -121,8 +121,9 @@ public class BlobStorePerfTests { } private DummyBlobData prepareDataBlob(int fileSizeInMb) throws Exception { final DummyBlobData blobData = new DummyBlobData(mContext, fileSizeInMb * 1024 * 1024 /* bytes */); final DummyBlobData blobData = new DummyBlobData.Builder(mContext) .setFileSize(fileSizeInMb * 1024 * 1024 /* bytes */) .build(); blobData.prepare(); return blobData; } Loading apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -670,7 +670,7 @@ public class UserLifecycleTests { private void startApp(int userId, String packageName) throws RemoteException { final Context context = InstrumentationRegistry.getContext(); final WaitResult result = ActivityTaskManager.getService().startActivityAndWait(null, context.getPackageName(), context.getFeatureId(), context.getPackageName(), context.getAttributionTag(), context.getPackageManager().getLaunchIntentForPackage(packageName), null, null, null, 0, 0, null, null, userId); attestTrue("User " + userId + " failed to start " + packageName, Loading apex/blobstore/framework/java/android/app/blob/BlobInfo.java +8 −8 Original line number Diff line number Diff line Loading @@ -32,21 +32,21 @@ public final class BlobInfo implements Parcelable { private final long mId; private final long mExpiryTimeMs; private final CharSequence mLabel; private final List<AccessorInfo> mAccessors; private final List<LeaseInfo> mLeaseInfos; public BlobInfo(long id, long expiryTimeMs, CharSequence label, List<AccessorInfo> accessors) { List<LeaseInfo> leaseInfos) { mId = id; mExpiryTimeMs = expiryTimeMs; mLabel = label; mAccessors = accessors; mLeaseInfos = leaseInfos; } private BlobInfo(Parcel in) { mId = in.readLong(); mExpiryTimeMs = in.readLong(); mLabel = in.readCharSequence(); mAccessors = in.readArrayList(null /* classloader */); mLeaseInfos = in.readArrayList(null /* classloader */); } public long getId() { Loading @@ -61,8 +61,8 @@ public final class BlobInfo implements Parcelable { return mLabel; } public List<AccessorInfo> getAccessors() { return Collections.unmodifiableList(mAccessors); public List<LeaseInfo> getLeases() { return Collections.unmodifiableList(mLeaseInfos); } @Override Loading @@ -70,7 +70,7 @@ public final class BlobInfo implements Parcelable { dest.writeLong(mId); dest.writeLong(mExpiryTimeMs); dest.writeCharSequence(mLabel); dest.writeList(mAccessors); dest.writeList(mLeaseInfos); } @Override Loading @@ -83,7 +83,7 @@ public final class BlobInfo implements Parcelable { + "id: " + mId + "," + "expiryMs: " + mExpiryTimeMs + "," + "label: " + mLabel + "," + "accessors: " + AccessorInfo.toShortString(mAccessors) + "," + "leases: " + LeaseInfo.toShortString(mLeaseInfos) + "," + "}"; } Loading apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java +45 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.CurrentTimeMillisLong; import android.annotation.IdRes; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemService; import android.annotation.TestApi; import android.content.Context; Loading Loading @@ -521,6 +522,50 @@ public class BlobStoreManager { } } /** * Return the {@link BlobHandle BlobHandles} corresponding to the data blobs that * the calling app has acquired a lease on using {@link #acquireLease(BlobHandle, int)} or * one of it's other variants. * * @hide */ @TestApi @NonNull public List<BlobHandle> getLeasedBlobs() throws IOException { try { return mService.getLeasedBlobs(mContext.getOpPackageName()); } catch (ParcelableException e) { e.maybeRethrow(IOException.class); throw new RuntimeException(e); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Return {@link LeaseInfo} representing a lease acquired using * {@link #acquireLease(BlobHandle, int)} or one of it's other variants, * or {@code null} if there is no lease acquired. * * @throws SecurityException when the blob represented by the {@code blobHandle} does not * exist or the caller does not have access to it. * @throws IllegalArgumentException when {@code blobHandle} is invalid. * * @hide */ @TestApi @Nullable public LeaseInfo getLeaseInfo(@NonNull BlobHandle blobHandle) throws IOException { try { return mService.getLeaseInfo(blobHandle, mContext.getOpPackageName()); } catch (ParcelableException e) { e.maybeRethrow(IOException.class); throw new RuntimeException(e); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Represents an ongoing session of a blob's contribution to the blob store managed by the * system. Loading Loading
Android.bp +13 −3 Original line number Diff line number Diff line Loading @@ -546,7 +546,6 @@ java_library { // DO NOT ADD ANY MORE ENTRIES TO THIS LIST "//external/robolectric-shadows:__subpackages__", "//frameworks/layoutlib:__subpackages__", "//frameworks/opt/net/ike:__subpackages__", ], } Loading Loading @@ -694,6 +693,7 @@ filegroup { "core/java/android/annotation/CallbackExecutor.java", "core/java/android/annotation/CheckResult.java", "core/java/android/annotation/CurrentTimeMillisLong.java", "core/java/android/annotation/Hide.java", "core/java/android/annotation/IntDef.java", "core/java/android/annotation/IntRange.java", "core/java/android/annotation/LongDef.java", Loading Loading @@ -753,6 +753,18 @@ filegroup { ], } filegroup { name: "framework-services-net-module-wifi-shared-srcs", srcs: [ "core/java/android/net/DhcpResults.java", "core/java/android/net/shared/Inet4AddressUtils.java", "core/java/android/net/shared/InetAddressUtils.java", "core/java/android/net/util/IpUtils.java", "core/java/android/util/LocalLog.java", "core/java/com/android/internal/util/Preconditions.java", ], } // keep these files in sync with the package/Tethering/jarjar-rules.txt for the tethering module. filegroup { name: "framework-tethering-shared-srcs", Loading Loading @@ -974,7 +986,6 @@ filegroup { srcs: [ "core/java/android/os/incremental/IIncrementalService.aidl", "core/java/android/os/incremental/IncrementalNewFileParams.aidl", "core/java/android/os/incremental/IncrementalSignature.aidl", ], path: "core/java", } Loading Loading @@ -1241,7 +1252,6 @@ filegroup { "core/java/android/net/InterfaceConfiguration.java", "core/java/android/os/BasicShellCommandHandler.java", "core/java/android/util/BackupUtils.java", "core/java/android/util/LocalLog.java", "core/java/android/util/Rational.java", "core/java/com/android/internal/util/FastXmlSerializer.java", "core/java/com/android/internal/util/HexDump.java", Loading
apct-tests/perftests/blobstore/src/com/android/perftests/blob/BlobStorePerfTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -121,8 +121,9 @@ public class BlobStorePerfTests { } private DummyBlobData prepareDataBlob(int fileSizeInMb) throws Exception { final DummyBlobData blobData = new DummyBlobData(mContext, fileSizeInMb * 1024 * 1024 /* bytes */); final DummyBlobData blobData = new DummyBlobData.Builder(mContext) .setFileSize(fileSizeInMb * 1024 * 1024 /* bytes */) .build(); blobData.prepare(); return blobData; } Loading
apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -670,7 +670,7 @@ public class UserLifecycleTests { private void startApp(int userId, String packageName) throws RemoteException { final Context context = InstrumentationRegistry.getContext(); final WaitResult result = ActivityTaskManager.getService().startActivityAndWait(null, context.getPackageName(), context.getFeatureId(), context.getPackageName(), context.getAttributionTag(), context.getPackageManager().getLaunchIntentForPackage(packageName), null, null, null, 0, 0, null, null, userId); attestTrue("User " + userId + " failed to start " + packageName, Loading
apex/blobstore/framework/java/android/app/blob/BlobInfo.java +8 −8 Original line number Diff line number Diff line Loading @@ -32,21 +32,21 @@ public final class BlobInfo implements Parcelable { private final long mId; private final long mExpiryTimeMs; private final CharSequence mLabel; private final List<AccessorInfo> mAccessors; private final List<LeaseInfo> mLeaseInfos; public BlobInfo(long id, long expiryTimeMs, CharSequence label, List<AccessorInfo> accessors) { List<LeaseInfo> leaseInfos) { mId = id; mExpiryTimeMs = expiryTimeMs; mLabel = label; mAccessors = accessors; mLeaseInfos = leaseInfos; } private BlobInfo(Parcel in) { mId = in.readLong(); mExpiryTimeMs = in.readLong(); mLabel = in.readCharSequence(); mAccessors = in.readArrayList(null /* classloader */); mLeaseInfos = in.readArrayList(null /* classloader */); } public long getId() { Loading @@ -61,8 +61,8 @@ public final class BlobInfo implements Parcelable { return mLabel; } public List<AccessorInfo> getAccessors() { return Collections.unmodifiableList(mAccessors); public List<LeaseInfo> getLeases() { return Collections.unmodifiableList(mLeaseInfos); } @Override Loading @@ -70,7 +70,7 @@ public final class BlobInfo implements Parcelable { dest.writeLong(mId); dest.writeLong(mExpiryTimeMs); dest.writeCharSequence(mLabel); dest.writeList(mAccessors); dest.writeList(mLeaseInfos); } @Override Loading @@ -83,7 +83,7 @@ public final class BlobInfo implements Parcelable { + "id: " + mId + "," + "expiryMs: " + mExpiryTimeMs + "," + "label: " + mLabel + "," + "accessors: " + AccessorInfo.toShortString(mAccessors) + "," + "leases: " + LeaseInfo.toShortString(mLeaseInfos) + "," + "}"; } Loading
apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java +45 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.CurrentTimeMillisLong; import android.annotation.IdRes; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemService; import android.annotation.TestApi; import android.content.Context; Loading Loading @@ -521,6 +522,50 @@ public class BlobStoreManager { } } /** * Return the {@link BlobHandle BlobHandles} corresponding to the data blobs that * the calling app has acquired a lease on using {@link #acquireLease(BlobHandle, int)} or * one of it's other variants. * * @hide */ @TestApi @NonNull public List<BlobHandle> getLeasedBlobs() throws IOException { try { return mService.getLeasedBlobs(mContext.getOpPackageName()); } catch (ParcelableException e) { e.maybeRethrow(IOException.class); throw new RuntimeException(e); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Return {@link LeaseInfo} representing a lease acquired using * {@link #acquireLease(BlobHandle, int)} or one of it's other variants, * or {@code null} if there is no lease acquired. * * @throws SecurityException when the blob represented by the {@code blobHandle} does not * exist or the caller does not have access to it. * @throws IllegalArgumentException when {@code blobHandle} is invalid. * * @hide */ @TestApi @Nullable public LeaseInfo getLeaseInfo(@NonNull BlobHandle blobHandle) throws IOException { try { return mService.getLeaseInfo(blobHandle, mContext.getOpPackageName()); } catch (ParcelableException e) { e.maybeRethrow(IOException.class); throw new RuntimeException(e); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Represents an ongoing session of a blob's contribution to the blob store managed by the * system. Loading