summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/ActivityThread.java7
-rw-r--r--core/java/android/app/IApplicationThread.aidl2
-rw-r--r--core/java/android/hardware/biometrics/OWNERS7
-rw-r--r--keystore/java/android/security/keystore2/AndroidKeyStoreKey.java10
-rw-r--r--keystore/java/android/security/keystore2/AndroidKeyStorePublicKey.java14
-rw-r--r--services/core/java/com/android/server/BluetoothManagerService.java3
-rw-r--r--services/core/java/com/android/server/policy/DisplayFoldDurationLogger.java4
-rw-r--r--services/core/java/com/android/server/power/PowerManagerService.java5
-rw-r--r--services/core/java/com/android/server/wm/WindowProcessController.java2
9 files changed, 26 insertions, 28 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 41170a4c2749..56ec8eae23b6 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1041,17 +1041,16 @@ public final class ActivityThread extends ClientTransactionHandler {
IUiAutomationConnection instrumentationUiConnection, int debugMode,
boolean enableBinderTracking, boolean trackAllocation,
boolean isRestrictedBackupMode, boolean persistent, Configuration config,
- CompatibilityInfo compatInfo, Map services, Bundle coreSettings,
+ CompatibilityInfo compatInfo, Map<String, IBinder> services, Bundle coreSettings,
String buildSerial, AutofillOptions autofillOptions,
ContentCaptureOptions contentCaptureOptions, long[] disabledCompatChanges) {
if (services != null) {
if (false) {
// Test code to make sure the app could see the passed-in services.
- for (Object oname : services.keySet()) {
- if (services.get(oname) == null) {
+ for (String name : services.keySet()) {
+ if (services.get(name) == null) {
continue; // AM just passed in a null service.
}
- String name = (String) oname;
// See b/79378449 about the following exemption.
switch (name) {
diff --git a/core/java/android/app/IApplicationThread.aidl b/core/java/android/app/IApplicationThread.aidl
index 6e9157e2a8c3..45a83884c6b1 100644
--- a/core/java/android/app/IApplicationThread.aidl
+++ b/core/java/android/app/IApplicationThread.aidl
@@ -72,7 +72,7 @@ oneway interface IApplicationThread {
IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection,
int debugMode, boolean enableBinderTracking, boolean trackAllocation,
boolean restrictedBackupMode, boolean persistent, in Configuration config,
- in CompatibilityInfo compatInfo, in Map services,
+ in CompatibilityInfo compatInfo, in Map<String, IBinder> services,
in Bundle coreSettings, in String buildSerial, in AutofillOptions autofillOptions,
in ContentCaptureOptions contentCaptureOptions, in long[] disabledCompatChanges);
void runIsolatedEntryPoint(in String entryPoint, in String[] entryPointArgs);
diff --git a/core/java/android/hardware/biometrics/OWNERS b/core/java/android/hardware/biometrics/OWNERS
index 2065ffacca7c..0b4d9d9d6f54 100644
--- a/core/java/android/hardware/biometrics/OWNERS
+++ b/core/java/android/hardware/biometrics/OWNERS
@@ -1,8 +1,3 @@
# Bug component: 879035
-curtislb@google.com
-ilyamaty@google.com
-jaggies@google.com
-joshmccloskey@google.com
-kchyn@google.com
-
+include /services/core/java/com/android/server/biometrics/OWNERS
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java b/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java
index 5619585d9c3c..b24a22dbc0ec 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java
@@ -102,11 +102,9 @@ public class AndroidKeyStoreKey implements Key {
final int prime = 31;
int result = 1;
- result = prime * result + ((mDescriptor == null) ? 0 : mDescriptor.hashCode());
+ result = prime * result + getClass().hashCode();
result = prime * result + (int) (mKeyId >>> 32);
result = prime * result + (int) (mKeyId & 0xffffffff);
- result = prime * result + ((mAuthorizations == null) ? 0 : mAuthorizations.hashCode());
- result = prime * result + ((mAlgorithm == null) ? 0 : mAlgorithm.hashCode());
return result;
}
@@ -122,10 +120,6 @@ public class AndroidKeyStoreKey implements Key {
return false;
}
AndroidKeyStoreKey other = (AndroidKeyStoreKey) obj;
- if (mKeyId != other.mKeyId) {
- return false;
- }
-
- return true;
+ return mKeyId == other.mKeyId;
}
}
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStorePublicKey.java b/keystore/java/android/security/keystore2/AndroidKeyStorePublicKey.java
index db3e567cb6b4..4842984e8c6a 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStorePublicKey.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStorePublicKey.java
@@ -23,6 +23,7 @@ import android.system.keystore2.KeyDescriptor;
import android.system.keystore2.KeyMetadata;
import java.security.PublicKey;
+import java.util.Objects;
/**
* {@link PublicKey} backed by Android Keystore.
@@ -75,9 +76,14 @@ public abstract class AndroidKeyStorePublicKey extends AndroidKeyStoreKey implem
if (!super.equals(obj)) {
return false;
}
- if (getClass() != obj.getClass()) {
- return false;
- }
- return true;
+
+ /*
+ * getClass().equals(ojb.getClass()) is implied by the call to super.equals() above. This
+ * means we can cast obj to AndroidKeyStorePublicKey here.
+ */
+ final AndroidKeyStorePublicKey other = (AndroidKeyStorePublicKey) obj;
+
+ return Objects.equals(mCertificate, other.mCertificate) && Objects.equals(mCertificateChain,
+ other.mCertificateChain);
}
}
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 707ac322d5e0..bf28603b067b 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -2430,7 +2430,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
try {
foregroundUser = ActivityManager.getCurrentUser();
valid = (callingUser == foregroundUser) || parentUser == foregroundUser
- || callingAppId == Process.NFC_UID || callingAppId == mSystemUiUid;
+ || callingAppId == Process.NFC_UID || callingAppId == mSystemUiUid
+ || callingAppId == Process.SHELL_UID;
if (DBG && !valid) {
Slog.d(TAG, "checkIfCallerIsForegroundUser: valid=" + valid + " callingUser="
+ callingUser + " parentUser=" + parentUser + " foregroundUser="
diff --git a/services/core/java/com/android/server/policy/DisplayFoldDurationLogger.java b/services/core/java/com/android/server/policy/DisplayFoldDurationLogger.java
index bdcd2cde2e4e..3524d7f51090 100644
--- a/services/core/java/com/android/server/policy/DisplayFoldDurationLogger.java
+++ b/services/core/java/com/android/server/policy/DisplayFoldDurationLogger.java
@@ -44,8 +44,8 @@ class DisplayFoldDurationLogger {
@Retention(RetentionPolicy.SOURCE)
public @interface ScreenState {}
- private @ScreenState int mScreenState = SCREEN_STATE_UNKNOWN;
- private Long mLastChanged = null;
+ private volatile @ScreenState int mScreenState = SCREEN_STATE_UNKNOWN;
+ private volatile Long mLastChanged = null;
private static final int LOG_SUBTYPE_UNFOLDED = 0;
private static final int LOG_SUBTYPE_FOLDED = 1;
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 061fabf3ab2a..e927667c2eaa 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -3756,7 +3756,10 @@ public final class PowerManagerService extends SystemService
if (sQuiescent) {
// Pass the optional "quiescent" argument to the bootloader to let it know
// that it should not turn the screen/lights on.
- reason = reason + ",quiescent";
+ if (reason != ""){
+ reason += ",";
+ }
+ reason = reason + "quiescent";
}
SystemProperties.set("sys.powerctl", "reboot," + reason);
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java
index e6a35f1267b5..1f8a437abe08 100644
--- a/services/core/java/com/android/server/wm/WindowProcessController.java
+++ b/services/core/java/com/android/server/wm/WindowProcessController.java
@@ -908,7 +908,7 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
final int displayId = r.getDisplayId();
final Context c = root.getDisplayUiContext(displayId);
- if (r.mVisibleRequested && !displayContexts.contains(c)) {
+ if (c != null && r.mVisibleRequested && !displayContexts.contains(c)) {
displayContexts.add(c);
}
}