Skip to content

Commit d1f0679

Browse files
author
android-build-team Robot
committed
Snap for 6534196 from 97c4cda to rvc-release
Change-Id: I4281faf875c2fa13d41848df94d8f505447f1c82
2 parents da6d466 + 97c4cda commit d1f0679

264 files changed

Lines changed: 6207 additions & 3893 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Android.bp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,8 @@ filegroup {
930930
srcs: [
931931
"core/java/android/os/incremental/IIncrementalService.aidl",
932932
"core/java/android/os/incremental/IncrementalNewFileParams.aidl",
933+
"core/java/android/os/incremental/IStorageHealthListener.aidl",
934+
"core/java/android/os/incremental/StorageHealthCheckParams.aidl",
933935
],
934936
path: "core/java",
935937
}

ApiDocs.bp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ stubs_defaults {
6666
":opt-telephony-srcs",
6767
":opt-net-voip-srcs",
6868
":art-module-public-api-stubs-source",
69-
":conscrypt.module.public.api.stubs.source",
69+
":conscrypt.module.public.api{.public.stubs.source}",
7070
":android_icu4j_public_api_files",
7171
"test-mock/src/**/*.java",
7272
"test-runner/src/**/*.java",

StubLibraries.bp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ stubs_defaults {
6969
name: "metalava-full-api-stubs-default",
7070
defaults: ["metalava-base-api-stubs-default"],
7171
srcs: [
72-
":conscrypt.module.public.api.stubs.source",
72+
":conscrypt.module.public.api{.public.stubs.source}",
7373
":framework-updatable-sources",
7474
],
7575
sdk_version: "core_platform",

apex/blobstore/service/java/com/android/server/blob/BlobMetadata.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ long getSize() {
212212
}
213213

214214
boolean isAccessAllowedForCaller(@NonNull String callingPackage, int callingUid) {
215-
// TODO: verify blob is still valid (expiryTime is not elapsed)
215+
// Don't allow the blob to be accessed after it's expiry time has passed.
216+
if (getBlobHandle().isExpired()) {
217+
return false;
218+
}
216219
synchronized (mMetadataLock) {
217220
// Check if packageName already holds a lease on the blob.
218221
for (int i = 0, size = mLeasees.size(); i < size; ++i) {

apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,18 @@ void runIdleMaintenance() {
10591059
}
10601060
}
10611061

1062+
boolean isBlobAvailable(long blobId, int userId) {
1063+
synchronized (mBlobsLock) {
1064+
final ArrayMap<BlobHandle, BlobMetadata> userBlobs = getUserBlobsLocked(userId);
1065+
for (BlobMetadata blobMetadata : userBlobs.values()) {
1066+
if (blobMetadata.getBlobId() == blobId) {
1067+
return true;
1068+
}
1069+
}
1070+
return false;
1071+
}
1072+
}
1073+
10621074
@GuardedBy("mBlobsLock")
10631075
private void dumpSessionsLocked(IndentingPrintWriter fout, DumpArgs dumpArgs) {
10641076
for (int i = 0, userCount = mSessions.size(); i < userCount; ++i) {

apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerShellCommand.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public int onCommand(String cmd) {
4646
return runDeleteBlob(pw);
4747
case "idle-maintenance":
4848
return runIdleMaintenance(pw);
49+
case "query-blob-existence":
50+
return runQueryBlobExistence(pw);
4951
default:
5052
return handleDefaultCommands(cmd);
5153
}
@@ -91,6 +93,16 @@ private int runIdleMaintenance(PrintWriter pw) {
9193
return 0;
9294
}
9395

96+
private int runQueryBlobExistence(PrintWriter pw) {
97+
final ParsedArgs args = new ParsedArgs();
98+
if (parseOptions(pw, args) < 0) {
99+
return -1;
100+
}
101+
102+
pw.println(mService.isBlobAvailable(args.blobId, args.userId) ? 1 : 0);
103+
return 0;
104+
}
105+
94106
@Override
95107
public void onHelp() {
96108
final PrintWriter pw = getOutPrintWriter();
@@ -121,6 +133,8 @@ public void onHelp() {
121133
pw.println(" --tag: Tag of the blob to delete.");
122134
pw.println("idle-maintenance");
123135
pw.println(" Run idle maintenance which takes care of removing stale data.");
136+
pw.println("query-blob-existence [-b BLOB_ID]");
137+
pw.println(" Prints 1 if blob exists, otherwise 0.");
124138
pw.println();
125139
}
126140

@@ -147,6 +161,9 @@ private int parseOptions(PrintWriter pw, ParsedArgs args) {
147161
case "--tag":
148162
args.tag = getNextArgRequired();
149163
break;
164+
case "-b":
165+
args.blobId = Long.parseLong(getNextArgRequired());
166+
break;
150167
default:
151168
pw.println("Error: unknown option '" + opt + "'");
152169
return -1;
@@ -166,6 +183,7 @@ private static class ParsedArgs {
166183
public long expiryTimeMillis;
167184
public CharSequence label;
168185
public String tag;
186+
public long blobId;
169187

170188
public BlobHandle getBlobHandle() {
171189
return BlobHandle.create(algorithm, digest, label, expiryTimeMillis, tag);

apex/sdkextensions/Android.bp

Lines changed: 0 additions & 84 deletions
This file was deleted.

apex/sdkextensions/OWNERS

Lines changed: 0 additions & 2 deletions
This file was deleted.

apex/sdkextensions/TEST_MAPPING

Lines changed: 0 additions & 10 deletions
This file was deleted.
-1.01 KB
Binary file not shown.

0 commit comments

Comments
 (0)