Skip to content

Commit 50be4f5

Browse files
author
android-build-team Robot
committed
Merge cherrypicks of [14988379, 14988380, 14984749, 14988513, 14988333, 14988334, 14988398, 14985920, 14988097, 14988381, 14985921, 14988891, 14987186, 14988382, 14989110, 14988514, 14988515, 14988652, 14988653, 14988654, 14988399, 14988400, 14988401, 14984579, 14987188, 14988532, 14988533, 14988402, 14983067, 14983068, 14974447, 14974448, 14988656, 14988535, 14988536, 14988537, 14988538, 14988539, 14988540, 14988541] into rvc-qpr3-release
Change-Id: Idd585049e2143a8f672920e1099c5f081649d0c0
2 parents 5d3dfba + f968bde commit 50be4f5

5 files changed

Lines changed: 33 additions & 3 deletions

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(

services/core/java/com/android/server/am/ActiveServices.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,18 @@ void stopInBackgroundLocked(int uid) {
935935
void killMisbehavingService(ServiceRecord r,
936936
int appUid, int appPid, String localPackageName) {
937937
synchronized (mAm) {
938-
stopServiceLocked(r);
938+
if (!r.destroying) {
939+
// This service is still alive, stop it.
940+
stopServiceLocked(r);
941+
} else {
942+
// Check if there is another instance of it being started in parallel,
943+
// if so, stop that too to avoid spamming the system.
944+
final ServiceMap smap = getServiceMapLocked(r.userId);
945+
final ServiceRecord found = smap.mServicesByInstanceName.remove(r.instanceName);
946+
if (found != null) {
947+
stopServiceLocked(found);
948+
}
949+
}
939950
mAm.crashApplication(appUid, appPid, localPackageName, -1,
940951
"Bad notification for startForeground", true /*force*/);
941952
}

services/core/java/com/android/server/stats/pull/StatsPullAtomService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3362,7 +3362,11 @@ private void registerFaceSettings() {
33623362
int pullFaceSettingsLocked(int atomTag, List<StatsEvent> pulledData) {
33633363
final long callingToken = Binder.clearCallingIdentity();
33643364
try {
3365-
List<UserInfo> users = mContext.getSystemService(UserManager.class).getUsers();
3365+
UserManager manager = mContext.getSystemService(UserManager.class);
3366+
if (manager == null) {
3367+
return StatsManager.PULL_SKIP;
3368+
}
3369+
List<UserInfo> users = manager.getUsers();
33663370
int numUsers = users.size();
33673371
FaceManager faceManager = mContext.getSystemService(FaceManager.class);
33683372

telephony/java/android/telephony/SubscriptionInfo.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,13 @@ public boolean isOpportunistic() {
566566
return mGroupUUID;
567567
}
568568

569+
/**
570+
* @hide
571+
*/
572+
public void clearGroupUuid() {
573+
this.mGroupUUID = null;
574+
}
575+
569576
/**
570577
* @hide
571578
*/

0 commit comments

Comments
 (0)