Merge "Final token from Binder.clearCallingIdentity()"
This commit is contained in:
committed by
Android (Google) Code Review
commit
560471cebb
@@ -4369,7 +4369,7 @@ public class UserBackupManagerService {
|
||||
return OperationType.BACKUP;
|
||||
}
|
||||
|
||||
long oldCallingId = Binder.clearCallingIdentity();
|
||||
final long oldCallingId = Binder.clearCallingIdentity();
|
||||
try {
|
||||
IBackupTransport transport = transportClient.connectOrThrow(
|
||||
/* caller */ "BMS.getOperationTypeFromTransport");
|
||||
|
||||
@@ -808,7 +808,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
+ " for " + association
|
||||
+ " - profile still present in " + otherAssociationWithDeviceProfile);
|
||||
} else {
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mRoleManager.removeRoleHolderAsUser(
|
||||
association.getDeviceProfile(),
|
||||
@@ -1088,7 +1088,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
}
|
||||
|
||||
private List<UserInfo> getAllUsers() {
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return mUserManager.getUsers();
|
||||
} finally {
|
||||
@@ -1104,7 +1104,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
}
|
||||
|
||||
private Set<Association> getAllAssociations() {
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
ArraySet<Association> result = new ArraySet<>();
|
||||
for (UserInfo user : mUserManager.getAliveUsers()) {
|
||||
|
||||
@@ -336,7 +336,7 @@ public final class SensorPrivacyService extends SystemService {
|
||||
return;
|
||||
}
|
||||
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
onSensorUseStarted(uid, packageName, sensor);
|
||||
} finally {
|
||||
@@ -608,7 +608,7 @@ public final class SensorPrivacyService extends SystemService {
|
||||
mIndividualEnabled.put(userId, userIndividualEnabled);
|
||||
|
||||
if (!enable) {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
// Remove any notifications prompting the user to disable sensory privacy
|
||||
NotificationManager notificationManager =
|
||||
|
||||
@@ -3462,7 +3462,7 @@ class StorageManagerService extends IStorageManager.Stub
|
||||
// We want to call the manageSpaceActivity as a SystemService and clear identity
|
||||
// of the calling App
|
||||
int originalUid = Binder.getCallingUidOrThrow();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
|
||||
try {
|
||||
ApplicationInfo appInfo = mIPackageManager.getApplicationInfo(packageName, 0,
|
||||
|
||||
@@ -263,7 +263,7 @@ public class FingerprintService extends SystemService {
|
||||
final boolean isKeyguard = Utils.isKeyguard(getContext(), opPackageName);
|
||||
|
||||
// Clear calling identity when checking LockPatternUtils for StrongAuth flags.
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity1 = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if (isKeyguard && Utils.isUserEncryptedOrLockdown(mLockPatternUtils, userId)) {
|
||||
// If this happens, something in KeyguardUpdateMonitor is wrong.
|
||||
@@ -273,7 +273,7 @@ public class FingerprintService extends SystemService {
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
Binder.restoreCallingIdentity(identity1);
|
||||
}
|
||||
|
||||
final boolean restricted = getContext().checkCallingPermission(MANAGE_FINGERPRINT)
|
||||
@@ -297,11 +297,11 @@ public class FingerprintService extends SystemService {
|
||||
provider.second.getSensorProperties(sensorId);
|
||||
if (!isKeyguard && !Utils.isSettings(getContext(), opPackageName)
|
||||
&& sensorProps != null && sensorProps.isAnyUdfpsType()) {
|
||||
identity = Binder.clearCallingIdentity();
|
||||
final long identity2 = Binder.clearCallingIdentity();
|
||||
try {
|
||||
authenticateWithPrompt(operationId, sensorProps, userId, receiver);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
Binder.restoreCallingIdentity(identity2);
|
||||
}
|
||||
} else {
|
||||
provider.second.scheduleAuthenticate(provider.first, token, operationId, userId,
|
||||
|
||||
@@ -2359,7 +2359,7 @@ public class HdmiControlService extends SystemService {
|
||||
@Override
|
||||
public List<String> getUserCecSettings() {
|
||||
initBinderCall();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return HdmiControlService.this.getHdmiCecConfig().getUserSettings();
|
||||
} finally {
|
||||
@@ -2370,7 +2370,7 @@ public class HdmiControlService extends SystemService {
|
||||
@Override
|
||||
public List<String> getAllowedCecSettingStringValues(String name) {
|
||||
initBinderCall();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return HdmiControlService.this.getHdmiCecConfig().getAllowedStringValues(name);
|
||||
} finally {
|
||||
@@ -2381,7 +2381,7 @@ public class HdmiControlService extends SystemService {
|
||||
@Override
|
||||
public int[] getAllowedCecSettingIntValues(String name) {
|
||||
initBinderCall();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
List<Integer> allowedValues =
|
||||
HdmiControlService.this.getHdmiCecConfig().getAllowedIntValues(name);
|
||||
@@ -2394,7 +2394,7 @@ public class HdmiControlService extends SystemService {
|
||||
@Override
|
||||
public String getCecSettingStringValue(String name) {
|
||||
initBinderCall();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return HdmiControlService.this.getHdmiCecConfig().getStringValue(name);
|
||||
} finally {
|
||||
@@ -2405,7 +2405,7 @@ public class HdmiControlService extends SystemService {
|
||||
@Override
|
||||
public void setCecSettingStringValue(String name, String value) {
|
||||
initBinderCall();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
HdmiControlService.this.getHdmiCecConfig().setStringValue(name, value);
|
||||
} finally {
|
||||
@@ -2416,7 +2416,7 @@ public class HdmiControlService extends SystemService {
|
||||
@Override
|
||||
public int getCecSettingIntValue(String name) {
|
||||
initBinderCall();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return HdmiControlService.this.getHdmiCecConfig().getIntValue(name);
|
||||
} finally {
|
||||
@@ -2427,7 +2427,7 @@ public class HdmiControlService extends SystemService {
|
||||
@Override
|
||||
public void setCecSettingIntValue(String name, int value) {
|
||||
initBinderCall();
|
||||
long token = Binder.clearCallingIdentity();
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
HdmiControlService.this.getHdmiCecConfig().setIntValue(name, value);
|
||||
} finally {
|
||||
|
||||
@@ -82,7 +82,7 @@ public class GnssAntennaInfoProvider extends
|
||||
}
|
||||
|
||||
public void addListener(CallerIdentity callerIdentity, IGnssAntennaInfoListener listener) {
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
putRegistration(listener.asBinder(),
|
||||
new AntennaInfoListenerRegistration(callerIdentity, listener));
|
||||
@@ -92,7 +92,7 @@ public class GnssAntennaInfoProvider extends
|
||||
}
|
||||
|
||||
public void removeListener(IGnssAntennaInfoListener listener) {
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
removeRegistration(listener.asBinder());
|
||||
} finally {
|
||||
|
||||
@@ -331,7 +331,7 @@ public class GnssManagerService {
|
||||
@Override
|
||||
public void onCapabilitiesChanged(GnssCapabilities oldCapabilities,
|
||||
GnssCapabilities newCapabilities) {
|
||||
long ident = Binder.clearCallingIdentity();
|
||||
final long ident = Binder.clearCallingIdentity();
|
||||
try {
|
||||
Intent intent = new Intent(LocationManager.ACTION_GNSS_CAPABILITIES_CHANGED)
|
||||
.putExtra(LocationManager.EXTRA_GNSS_CAPABILITIES, newCapabilities)
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SystemDeviceStationaryHelper extends DeviceStationaryHelper {
|
||||
public void addListener(DeviceIdleInternal.StationaryListener listener) {
|
||||
Preconditions.checkState(mDeviceIdle != null);
|
||||
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mDeviceIdle.registerStationaryListener(listener);
|
||||
} finally {
|
||||
@@ -53,7 +53,7 @@ public class SystemDeviceStationaryHelper extends DeviceStationaryHelper {
|
||||
public void removeListener(DeviceIdleInternal.StationaryListener listener) {
|
||||
Preconditions.checkState(mDeviceIdle != null);
|
||||
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mDeviceIdle.unregisterStationaryListener(listener);
|
||||
} finally {
|
||||
|
||||
@@ -1620,7 +1620,7 @@ public class LockSettingsService extends ILockSettings.Stub {
|
||||
+ PERMISSION);
|
||||
}
|
||||
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
enforceFrpResolved();
|
||||
// When changing credential for profiles with unified challenge, some callers
|
||||
|
||||
Reference in New Issue
Block a user