Skip to content

Commit 661a05d

Browse files
android-build-team Robotanisassigoogle
authored andcommitted
Merge cherrypicks of [14947151, 14946920, 14946921, 14946922, 14947510, 14947511, 14947512, 14947530, 14947531, 14946923, 14947513] into security-aosp-rvc-release
Change-Id: I3595691745142f18d277278becff8444e8410229
2 parents 6ded506 + 79d7528 commit 661a05d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

cmds/statsd/src/guardrail/StatsdStats.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,12 @@ void StatsdStats::notePullExceedMaxDelay(int pullAtomId) {
459459
void StatsdStats::noteAtomLogged(int atomId, int32_t timeSec) {
460460
lock_guard<std::mutex> lock(mLock);
461461

462-
if (atomId <= kMaxPushedAtomId) {
462+
if (atomId >= 0 && atomId <= kMaxPushedAtomId) {
463463
mPushedAtomStats[atomId]++;
464464
} else {
465+
if (atomId < 0) {
466+
android_errorWriteLog(0x534e4554, "187957589");
467+
}
465468
if (mNonPlatformPushedAtomStats.size() < kMaxNonPlatformPushedAtoms) {
466469
mNonPlatformPushedAtomStats[atomId]++;
467470
}

packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@ protected boolean shouldBlockFromTree(@NonNull String docId) {
322322
return true;
323323
}
324324

325+
if (TextUtils.equals(Environment.DIRECTORY_ANDROID.toLowerCase(),
326+
path.toLowerCase())) {
327+
return true;
328+
}
329+
325330
return false;
326331
} catch (IOException e) {
327332
throw new IllegalArgumentException(

0 commit comments

Comments
 (0)