Loading apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java +14 −2 Original line number Diff line number Diff line Loading @@ -227,7 +227,8 @@ public class BlobStoreManagerService extends SystemService { int n = 0; long sessionId; do { sessionId = Math.abs(mRandom.nextLong()); final long randomLong = mRandom.nextLong(); sessionId = (randomLong == Long.MIN_VALUE) ? INVALID_BLOB_ID : Math.abs(randomLong); if (mKnownBlobIds.indexOf(sessionId) < 0 && sessionId != INVALID_BLOB_ID) { return sessionId; } Loading Loading @@ -647,6 +648,17 @@ public class BlobStoreManagerService extends SystemService { session.getOwnerUid(), blob.getBlobId(), blob.getSize(), FrameworkStatsLog.BLOB_COMMITTED__RESULT__ERROR_DURING_COMMIT); session.sendCommitCallbackResult(COMMIT_RESULT_ERROR); // If the commit fails and this blob data didn't exist before, delete it. // But if it is a recommit, just leave it as is. if (session.getSessionId() == blob.getBlobId()) { deleteBlobLocked(blob); userBlobs.remove(blob.getBlobHandle()); } } // Delete redundant data from recommits. if (session.getSessionId() != blob.getBlobId()) { session.getSessionFile().delete(); mActiveBlobIds.remove(session.getSessionId()); } getUserSessionsLocked(UserHandle.getUserId(session.getOwnerUid())) .remove(session.getSessionId()); Loading Loading @@ -1543,7 +1555,7 @@ public class BlobStoreManagerService extends SystemService { public int handleShellCommand(@NonNull ParcelFileDescriptor in, @NonNull ParcelFileDescriptor out, @NonNull ParcelFileDescriptor err, @NonNull String[] args) { return (new BlobStoreManagerShellCommand(BlobStoreManagerService.this)).exec(this, return new BlobStoreManagerShellCommand(BlobStoreManagerService.this).exec(this, in.getFileDescriptor(), out.getFileDescriptor(), err.getFileDescriptor(), args); } } Loading apex/blobstore/service/java/com/android/server/blob/BlobStoreSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ class BlobStoreSession extends IBlobStoreSession.Stub { private File mSessionFile; @GuardedBy("mRevocableFds") private ArrayList<RevocableFileDescriptor> mRevocableFds = new ArrayList<>(); private final ArrayList<RevocableFileDescriptor> mRevocableFds = new ArrayList<>(); // This will be accessed from only one thread at any point of time, so no need to grab // a lock for this. Loading api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5103,6 +5103,7 @@ package android.view { method @NonNull public android.graphics.ColorSpace[] getSupportedWideColorGamut(); method public int getType(); method public boolean hasAccess(int); field public static final int FLAG_TRUSTED = 128; // 0x80 field public static final int TYPE_EXTERNAL = 2; // 0x2 field public static final int TYPE_INTERNAL = 1; // 0x1 field public static final int TYPE_OVERLAY = 4; // 0x4 Loading cmds/am/src/com/android/commands/am/Instrument.java +2 −2 Original line number Diff line number Diff line Loading @@ -17,8 +17,8 @@ package com.android.commands.am; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_HIDDEN_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_ISOLATED_STORAGE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_TEST_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_MOUNT_EXTERNAL_STORAGE_FULL; import android.app.IActivityManager; import android.app.IInstrumentationWatcher; Loading Loading @@ -512,7 +512,7 @@ public class Instrument { flags |= INSTR_FLAG_DISABLE_TEST_API_CHECKS; } if (disableIsolatedStorage) { flags |= INSTR_FLAG_MOUNT_EXTERNAL_STORAGE_FULL; flags |= INSTR_FLAG_DISABLE_ISOLATED_STORAGE; } if (!mAm.startInstrumentation(cn, profileFile, flags, args, watcher, connection, userId, abi)) { Loading core/java/android/app/ActivityManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -159,10 +159,10 @@ public class ActivityManager { */ public static final int INSTR_FLAG_DISABLE_HIDDEN_API_CHECKS = 1 << 0; /** * Mount full external storage for the newly started instrumentation. * Grant full access to the external storage for the newly started instrumentation. * @hide */ public static final int INSTR_FLAG_MOUNT_EXTERNAL_STORAGE_FULL = 1 << 1; public static final int INSTR_FLAG_DISABLE_ISOLATED_STORAGE = 1 << 1; /** * Disable test API access for the newly started instrumentation. Loading Loading
apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java +14 −2 Original line number Diff line number Diff line Loading @@ -227,7 +227,8 @@ public class BlobStoreManagerService extends SystemService { int n = 0; long sessionId; do { sessionId = Math.abs(mRandom.nextLong()); final long randomLong = mRandom.nextLong(); sessionId = (randomLong == Long.MIN_VALUE) ? INVALID_BLOB_ID : Math.abs(randomLong); if (mKnownBlobIds.indexOf(sessionId) < 0 && sessionId != INVALID_BLOB_ID) { return sessionId; } Loading Loading @@ -647,6 +648,17 @@ public class BlobStoreManagerService extends SystemService { session.getOwnerUid(), blob.getBlobId(), blob.getSize(), FrameworkStatsLog.BLOB_COMMITTED__RESULT__ERROR_DURING_COMMIT); session.sendCommitCallbackResult(COMMIT_RESULT_ERROR); // If the commit fails and this blob data didn't exist before, delete it. // But if it is a recommit, just leave it as is. if (session.getSessionId() == blob.getBlobId()) { deleteBlobLocked(blob); userBlobs.remove(blob.getBlobHandle()); } } // Delete redundant data from recommits. if (session.getSessionId() != blob.getBlobId()) { session.getSessionFile().delete(); mActiveBlobIds.remove(session.getSessionId()); } getUserSessionsLocked(UserHandle.getUserId(session.getOwnerUid())) .remove(session.getSessionId()); Loading Loading @@ -1543,7 +1555,7 @@ public class BlobStoreManagerService extends SystemService { public int handleShellCommand(@NonNull ParcelFileDescriptor in, @NonNull ParcelFileDescriptor out, @NonNull ParcelFileDescriptor err, @NonNull String[] args) { return (new BlobStoreManagerShellCommand(BlobStoreManagerService.this)).exec(this, return new BlobStoreManagerShellCommand(BlobStoreManagerService.this).exec(this, in.getFileDescriptor(), out.getFileDescriptor(), err.getFileDescriptor(), args); } } Loading
apex/blobstore/service/java/com/android/server/blob/BlobStoreSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ class BlobStoreSession extends IBlobStoreSession.Stub { private File mSessionFile; @GuardedBy("mRevocableFds") private ArrayList<RevocableFileDescriptor> mRevocableFds = new ArrayList<>(); private final ArrayList<RevocableFileDescriptor> mRevocableFds = new ArrayList<>(); // This will be accessed from only one thread at any point of time, so no need to grab // a lock for this. Loading
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5103,6 +5103,7 @@ package android.view { method @NonNull public android.graphics.ColorSpace[] getSupportedWideColorGamut(); method public int getType(); method public boolean hasAccess(int); field public static final int FLAG_TRUSTED = 128; // 0x80 field public static final int TYPE_EXTERNAL = 2; // 0x2 field public static final int TYPE_INTERNAL = 1; // 0x1 field public static final int TYPE_OVERLAY = 4; // 0x4 Loading
cmds/am/src/com/android/commands/am/Instrument.java +2 −2 Original line number Diff line number Diff line Loading @@ -17,8 +17,8 @@ package com.android.commands.am; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_HIDDEN_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_ISOLATED_STORAGE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_TEST_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_MOUNT_EXTERNAL_STORAGE_FULL; import android.app.IActivityManager; import android.app.IInstrumentationWatcher; Loading Loading @@ -512,7 +512,7 @@ public class Instrument { flags |= INSTR_FLAG_DISABLE_TEST_API_CHECKS; } if (disableIsolatedStorage) { flags |= INSTR_FLAG_MOUNT_EXTERNAL_STORAGE_FULL; flags |= INSTR_FLAG_DISABLE_ISOLATED_STORAGE; } if (!mAm.startInstrumentation(cn, profileFile, flags, args, watcher, connection, userId, abi)) { Loading
core/java/android/app/ActivityManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -159,10 +159,10 @@ public class ActivityManager { */ public static final int INSTR_FLAG_DISABLE_HIDDEN_API_CHECKS = 1 << 0; /** * Mount full external storage for the newly started instrumentation. * Grant full access to the external storage for the newly started instrumentation. * @hide */ public static final int INSTR_FLAG_MOUNT_EXTERNAL_STORAGE_FULL = 1 << 1; public static final int INSTR_FLAG_DISABLE_ISOLATED_STORAGE = 1 << 1; /** * Disable test API access for the newly started instrumentation. Loading