Merge "Correct comments"
diff --git a/OWNERS b/OWNERS
index 03cfac9..ab5bd18 100644
--- a/OWNERS
+++ b/OWNERS
@@ -23,6 +23,9 @@
# via https://android.git.corp.google.com/All-Projects/+/refs/meta/config/rules.pl.
per-file */api/*current.txt = *
+# Test mapping changes can be made by anyone
+per-file */TEST_MAPPING = *
+
# Support bulk translation updates
per-file */res*/values*/*.xml = [email protected], [email protected]
diff --git a/TestProtoLibraries.bp b/TestProtoLibraries.bp
index 513d45f..afc11bb 100644
--- a/TestProtoLibraries.bp
+++ b/TestProtoLibraries.bp
@@ -30,6 +30,6 @@
type: "full",
},
errorprone: {
- javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
+ enabled: false,
},
}
diff --git a/apex/media/OWNERS b/apex/media/OWNERS
index ced2fb5..73f02d3 100644
--- a/apex/media/OWNERS
+++ b/apex/media/OWNERS
@@ -1,10 +1,10 @@
[email protected]
[email protected]
[email protected]
+# Bug component: 1344
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
+
+# go/android-fwk-media-solutions for info on areas of ownership.
+include platform/frameworks/av:/media/janitors/media_solutions_OWNERS
diff --git a/cmds/idmap2/tests/Idmap2BinaryTests.cpp b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
index e7e9e4c..a1206f9 100644
--- a/cmds/idmap2/tests/Idmap2BinaryTests.cpp
+++ b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
@@ -93,7 +93,7 @@
"--idmap-path", GetIdmapPath()});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
struct stat st;
ASSERT_EQ(stat(GetIdmapPath().c_str(), &st), 0);
@@ -119,7 +119,7 @@
"--idmap-path", GetIdmapPath()});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
// clang-format off
result = ExecuteBinary({"idmap2",
@@ -127,14 +127,14 @@
"--idmap-path", GetIdmapPath()});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
- ASSERT_NE(result->stdout.find(R::target::integer::literal::int1 + " -> 0x7f010000"),
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
+ ASSERT_NE(result->stdout_str.find(R::target::integer::literal::int1 + " -> 0x7f010000"),
std::string::npos);
- ASSERT_NE(result->stdout.find(R::target::string::literal::str1 + " -> 0x7f020000"),
+ ASSERT_NE(result->stdout_str.find(R::target::string::literal::str1 + " -> 0x7f020000"),
std::string::npos);
- ASSERT_NE(result->stdout.find(R::target::string::literal::str3 + " -> 0x7f020001"),
+ ASSERT_NE(result->stdout_str.find(R::target::string::literal::str3 + " -> 0x7f020001"),
std::string::npos);
- ASSERT_NE(result->stdout.find(R::target::string::literal::str4 + " -> 0x7f020002"),
+ ASSERT_NE(result->stdout_str.find(R::target::string::literal::str4 + " -> 0x7f020002"),
std::string::npos);
// clang-format off
@@ -144,8 +144,8 @@
"--idmap-path", GetIdmapPath()});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
- ASSERT_NE(result->stdout.find("00000000: 504d4449 magic"), std::string::npos);
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
+ ASSERT_NE(result->stdout_str.find("00000000: 504d4449 magic"), std::string::npos);
// clang-format off
result = ExecuteBinary({"idmap2",
@@ -170,7 +170,7 @@
"--idmap-path", GetIdmapPath()});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
// clang-format off
result = ExecuteBinary({"idmap2",
@@ -180,9 +180,9 @@
"--resid", R::target::string::literal::str1});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
- ASSERT_NE(result->stdout.find("overlay-1"), std::string::npos);
- ASSERT_EQ(result->stdout.find("overlay-1-sv"), std::string::npos);
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
+ ASSERT_NE(result->stdout_str.find("overlay-1"), std::string::npos);
+ ASSERT_EQ(result->stdout_str.find("overlay-1-sv"), std::string::npos);
// clang-format off
result = ExecuteBinary({"idmap2",
@@ -192,9 +192,9 @@
"--resid", "test.target:string/str1"});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
- ASSERT_NE(result->stdout.find("overlay-1"), std::string::npos);
- ASSERT_EQ(result->stdout.find("overlay-1-sv"), std::string::npos);
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
+ ASSERT_NE(result->stdout_str.find("overlay-1"), std::string::npos);
+ ASSERT_EQ(result->stdout_str.find("overlay-1-sv"), std::string::npos);
// clang-format off
result = ExecuteBinary({"idmap2",
@@ -204,8 +204,8 @@
"--resid", "test.target:string/str1"});
// clang-format on
ASSERT_THAT(result, NotNull());
- ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
- ASSERT_NE(result->stdout.find("overlay-1-sv"), std::string::npos);
+ ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr_str;
+ ASSERT_NE(result->stdout_str.find("overlay-1-sv"), std::string::npos);
unlink(GetIdmapPath().c_str());
}
diff --git a/core/api/current.txt b/core/api/current.txt
index 64976fa..19c59a3 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -8756,6 +8756,7 @@
field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f
field public static final int GATT_FAILURE = 257; // 0x101
field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5
+ field public static final int GATT_INSUFFICIENT_AUTHORIZATION = 8; // 0x8
field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf
field public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 13; // 0xd
field public static final int GATT_INVALID_OFFSET = 7; // 0x7
@@ -30328,6 +30329,7 @@
method public void close();
method @NonNull public static android.os.SharedMemory create(@Nullable String, int) throws android.system.ErrnoException;
method public int describeContents();
+ method @NonNull public static android.os.SharedMemory fromFileDescriptor(@NonNull android.os.ParcelFileDescriptor);
method public int getSize();
method @NonNull public java.nio.ByteBuffer map(int, int, int) throws android.system.ErrnoException;
method @NonNull public java.nio.ByteBuffer mapReadOnly() throws android.system.ErrnoException;
@@ -38093,6 +38095,7 @@
method public final void cancelCall();
method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent);
method public abstract void onPlaceCall(@NonNull android.net.Uri, @NonNull android.telecom.PhoneAccountHandle, boolean);
+ method public void onRedirectionTimeout();
method public final boolean onUnbind(@NonNull android.content.Intent);
method public final void placeCallUnmodified();
method public final void redirectCall(@NonNull android.net.Uri, @NonNull android.telecom.PhoneAccountHandle, boolean);
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt
index bfa5a7b..77079cd 100644
--- a/core/api/module-lib-current.txt
+++ b/core/api/module-lib-current.txt
@@ -132,6 +132,11 @@
field public static final int VPN_UID = 1016; // 0x3f8
}
+ public final class ServiceManager {
+ method public static boolean isDeclared(@NonNull String);
+ method @Nullable public static android.os.IBinder waitForDeclaredService(@NonNull String);
+ }
+
public class StatsServiceManager {
method @NonNull public android.os.StatsServiceManager.ServiceRegisterer getStatsCompanionServiceRegisterer();
method @NonNull public android.os.StatsServiceManager.ServiceRegisterer getStatsManagerServiceRegisterer();
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index efde6f1..a0e6146 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -1510,6 +1510,7 @@
public final class BluetoothDevice implements android.os.Parcelable {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean cancelBondProcess();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean createBondOutOfBand(int, @Nullable android.bluetooth.OobData, @Nullable android.bluetooth.OobData);
+ method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean fetchUuidsWithSdp(int);
method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public byte[] getMetadata(int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public int getSimAccessPermission();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public boolean isConnected();
@@ -1644,6 +1645,7 @@
field @NonNull public static final android.os.ParcelUuid BASE_UUID;
field @NonNull public static final android.os.ParcelUuid BNEP;
field @NonNull public static final android.os.ParcelUuid DIP;
+ field @NonNull public static final android.os.ParcelUuid GENERIC_MEDIA_CONTROL;
field @NonNull public static final android.os.ParcelUuid HEARING_AID;
field @NonNull public static final android.os.ParcelUuid HFP;
field @NonNull public static final android.os.ParcelUuid HFP_AG;
@@ -1654,6 +1656,7 @@
field @NonNull public static final android.os.ParcelUuid LE_AUDIO;
field @NonNull public static final android.os.ParcelUuid MAP;
field @NonNull public static final android.os.ParcelUuid MAS;
+ field @NonNull public static final android.os.ParcelUuid MEDIA_CONTROL;
field @NonNull public static final android.os.ParcelUuid MNS;
field @NonNull public static final android.os.ParcelUuid NAP;
field @NonNull public static final android.os.ParcelUuid OBEX_OBJECT_PUSH;
@@ -7766,6 +7769,7 @@
field public static final String NAMESPACE_GAME_DRIVER = "game_driver";
field public static final String NAMESPACE_INPUT_NATIVE_BOOT = "input_native_boot";
field public static final String NAMESPACE_INTELLIGENCE_ATTENTION = "intelligence_attention";
+ field public static final String NAMESPACE_LMKD_NATIVE = "lmkd_native";
field public static final String NAMESPACE_MEDIA_NATIVE = "media_native";
field public static final String NAMESPACE_NETD_NATIVE = "netd_native";
field public static final String NAMESPACE_OTA = "ota";
diff --git a/core/java/Android.bp b/core/java/Android.bp
index 7ad5e05..eee696b 100644
--- a/core/java/Android.bp
+++ b/core/java/Android.bp
@@ -285,6 +285,23 @@
},
}
+aidl_interface {
+ name: "android.debug_aidl",
+ unstable: true,
+ srcs: [
+ "android/debug/AdbTransportType.aidl",
+ "android/debug/FingerprintAndPairDevice.aidl",
+ "android/debug/IAdbCallback.aidl",
+ "android/debug/IAdbManager.aidl",
+ "android/debug/PairDevice.aidl",
+ ],
+ backend: {
+ cpp: {
+ enabled: true,
+ },
+ },
+}
+
// Avoid including Parcelable classes as we don't want to have two copies of
// Parcelable cross the libraries. This is used by telephony-common (frameworks/opt/telephony)
// and TeleService app (packages/services/Telephony).
diff --git a/core/java/android/accounts/IAccountManager.aidl b/core/java/android/accounts/IAccountManager.aidl
index ce68e08..fb9ef53 100644
--- a/core/java/android/accounts/IAccountManager.aidl
+++ b/core/java/android/accounts/IAccountManager.aidl
@@ -105,12 +105,15 @@
String statusToken);
/* Returns Map<String, Integer> from package name to visibility with all values stored for given account */
+ @SuppressWarnings(value = {"untyped-collection"})
Map getPackagesAndVisibilityForAccount(in Account account);
+ @SuppressWarnings(value = {"untyped-collection"})
boolean addAccountExplicitlyWithVisibility(in Account account, String password, in Bundle extras,
in Map visibility);
boolean setAccountVisibility(in Account a, in String packageName, int newVisibility);
int getAccountVisibility(in Account a, in String packageName);
/* Type may be null returns Map <Account, Integer>*/
+ @SuppressWarnings(value = {"untyped-collection"})
Map getAccountsAndVisibilityForPackage(in String packageName, in String accountType);
void registerAccountListener(in String[] accountTypes, String opPackageName);
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 41170a4..56ec8ea 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1041,17 +1041,16 @@
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 6e9157e..45a8388 100644
--- a/core/java/android/app/IApplicationThread.aidl
+++ b/core/java/android/app/IApplicationThread.aidl
@@ -72,7 +72,7 @@
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/app/usage/UsageStats.java b/core/java/android/app/usage/UsageStats.java
index 4d73a61..6d777cf 100644
--- a/core/java/android/app/usage/UsageStats.java
+++ b/core/java/android/app/usage/UsageStats.java
@@ -171,9 +171,9 @@
mLaunchCount = stats.mLaunchCount;
mAppLaunchCount = stats.mAppLaunchCount;
mLastEvent = stats.mLastEvent;
- mActivities = stats.mActivities;
- mForegroundServices = stats.mForegroundServices;
- mChooserCounts = stats.mChooserCounts;
+ mActivities = stats.mActivities.clone();
+ mForegroundServices = new ArrayMap<>(stats.mForegroundServices);
+ mChooserCounts = new ArrayMap<>(stats.mChooserCounts);
}
/**
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index 16413e1..4dcb3dc 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -946,6 +946,10 @@
public boolean setBufferLengthMillis(@BluetoothCodecConfig.SourceCodecType int codec,
int value) {
if (VDBG) log("setBufferLengthMillis(" + codec + ", " + value + ")");
+ if (value < 0) {
+ Log.e(TAG, "Trying to set audio buffer length to a negative value: " + value);
+ return false;
+ }
try {
final IBluetoothA2dp service = getService();
if (service != null && isEnabled()) {
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 0969ec2..38fb90d 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -1622,13 +1622,38 @@
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
public boolean fetchUuidsWithSdp() {
+ return fetchUuidsWithSdp(TRANSPORT_AUTO);
+ }
+
+ /**
+ * Perform a service discovery on the remote device to get the UUIDs supported with the
+ * specific transport.
+ *
+ * <p>This API is asynchronous and {@link #ACTION_UUID} intent is sent,
+ * with the UUIDs supported by the remote end. If there is an error
+ * in getting the SDP or GATT records or if the process takes a long time, or the device
+ * is bonding and we have its UUIDs cached, {@link #ACTION_UUID} intent is sent with the
+ * UUIDs that is currently present in the cache. Clients should use the {@link #getUuids}
+ * to get UUIDs if service discovery is not to be performed. If there is an ongoing bonding
+ * process, service discovery or device inquiry, the request will be queued.
+ *
+ * @param transport - provide type of transport (e.g. LE or Classic).
+ * @return False if the check fails, True if the process of initiating an ACL connection
+ * to the remote device was started or cached UUIDs will be broadcast with the specific
+ * transport.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
+ public boolean fetchUuidsWithSdp(@Transport int transport) {
final IBluetooth service = sService;
if (service == null || !isBluetoothEnabled()) {
Log.e(TAG, "BT not enabled. Cannot fetchUuidsWithSdp");
return false;
}
try {
- return service.fetchRemoteUuids(this);
+ return service.fetchRemoteUuids(this, transport);
} catch (RemoteException e) {
Log.e(TAG, "", e);
}
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index b3a7c88..b3ccdd0 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -101,6 +101,9 @@
/** A read or write operation was requested with an invalid offset */
public static final int GATT_INVALID_OFFSET = 0x7;
+ /** Insufficient authorization for a given operation */
+ public static final int GATT_INSUFFICIENT_AUTHORIZATION = 0x8;
+
/** A write operation exceeds the maximum length of the attribute */
public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 0xd;
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index b76d6b8..bea32ab 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -222,12 +222,19 @@
int VOLUME_CONTROL = 23;
/**
+ * @hide
+ * Media Control Profile server
+ *
+ */
+ int MCP_SERVER = 24;
+
+ /**
* Max profile ID. This value should be updated whenever a new profile is added to match
* the largest value assigned to a profile.
*
* @hide
*/
- int MAX_PROFILE_ID = 23;
+ int MAX_PROFILE_ID = 24;
/**
* Default priority for devices that we try to auto-connect to and
diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java
index d82cf19..d072593 100644
--- a/core/java/android/bluetooth/BluetoothUuid.java
+++ b/core/java/android/bluetooth/BluetoothUuid.java
@@ -172,6 +172,16 @@
/** @hide */
@NonNull
@SystemApi
+ public static final ParcelUuid GENERIC_MEDIA_CONTROL =
+ ParcelUuid.fromString("00001849-0000-1000-8000-00805F9B34FB");
+ /** @hide */
+ @NonNull
+ @SystemApi
+ public static final ParcelUuid MEDIA_CONTROL =
+ ParcelUuid.fromString("00001848-0000-1000-8000-00805F9B34FB");
+ /** @hide */
+ @NonNull
+ @SystemApi
public static final ParcelUuid BASE_UUID =
ParcelUuid.fromString("00000000-0000-1000-8000-00805F9B34FB");
diff --git a/core/java/android/content/OWNERS b/core/java/android/content/OWNERS
index 8ad1349..c7f92c9 100644
--- a/core/java/android/content/OWNERS
+++ b/core/java/android/content/OWNERS
@@ -1,12 +1,14 @@
# Remain no owner because multiple modules may touch this file.
per-file Context.java = *
per-file ContextWrapper.java = *
-per-file Content* = [email protected], [email protected], [email protected]
+per-file Content* = file:/services/core/java/com/android/server/am/OWNERS
per-file IntentFilter.java = [email protected]
per-file IntentFilter.java = [email protected]
+per-file IntentFilter.java = file:/services/core/java/com/android/server/am/OWNERS
per-file Intent.java = [email protected]
per-file Intent.java = [email protected]
per-file Intent.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file Intent.java = file:/services/core/java/com/android/server/am/OWNERS
per-file AutofillOptions* = file:/core/java/android/service/autofill/OWNERS
per-file ContentCaptureOptions* = file:/core/java/android/service/contentcapture/OWNERS
per-file LocusId* = file:/core/java/android/service/contentcapture/OWNERS
diff --git a/core/java/android/content/om/IOverlayManager.aidl b/core/java/android/content/om/IOverlayManager.aidl
index 0b950b4..11ea16f 100644
--- a/core/java/android/content/om/IOverlayManager.aidl
+++ b/core/java/android/content/om/IOverlayManager.aidl
@@ -39,7 +39,7 @@
* requested user, an empty map is returned.
*/
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
- Map getAllOverlays(in int userId);
+ Map<String, List<OverlayInfo>> getAllOverlays(in int userId);
/**
* Returns information about all overlays for the given target package for
@@ -51,7 +51,7 @@
* @return A list of OverlayInfo objects; if no overlays exist for the
* requested package, an empty list is returned.
*/
- List getOverlayInfosForTarget(in String targetPackageName, in int userId);
+ List<OverlayInfo> getOverlayInfosForTarget(in String targetPackageName, in int userId);
/**
* Returns information about the overlay with the given package name for the
diff --git a/core/java/android/debug/FingerprintAndPairDevice.aidl b/core/java/android/debug/FingerprintAndPairDevice.aidl
new file mode 100644
index 0000000..b439e14
--- /dev/null
+++ b/core/java/android/debug/FingerprintAndPairDevice.aidl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.debug;
+
+import android.debug.PairDevice;
+
+/**
+ * @see {@link android.debug.IAdbManager#getPairedDevices()}
+ * @hide
+ */
+parcelable FingerprintAndPairDevice {
+ String keyFingerprint;
+ PairDevice device;
+}
\ No newline at end of file
diff --git a/core/java/android/debug/IAdbCallback.aidl b/core/java/android/debug/IAdbCallback.aidl
new file mode 100644
index 0000000..9c8f1cf
--- /dev/null
+++ b/core/java/android/debug/IAdbCallback.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.debug;
+
+import android.debug.AdbTransportType;
+
+/**
+ * Callback interface of {@link android.debug.IAdbCallbackManager}.
+ *
+ * @hide
+ */
+oneway interface IAdbCallback {
+ /**
+ * On debugging enabled, service providing IAdbManager calls this function.
+ */
+ void onDebuggingChanged(boolean enabled, AdbTransportType type);
+}
diff --git a/core/java/android/debug/IAdbManager.aidl b/core/java/android/debug/IAdbManager.aidl
index aea7633..314c405 100644
--- a/core/java/android/debug/IAdbManager.aidl
+++ b/core/java/android/debug/IAdbManager.aidl
@@ -16,6 +16,9 @@
package android.debug;
+import android.debug.FingerprintAndPairDevice;
+import android.debug.IAdbCallback;
+
/**
* Interface to communicate remotely with the {@code AdbService} in the system server.
*
@@ -58,9 +61,10 @@
void denyWirelessDebugging();
/**
- * Returns a Map<String, PairDevice> with the key fingerprint mapped to the device information.
+ * Returns an array of NamedPairDevice with the key fingerprint mapped to the device
+ * information.
*/
- Map getPairedDevices();
+ FingerprintAndPairDevice[] getPairedDevices();
/**
* Unpair the device identified by the key fingerprint it uses.
@@ -108,4 +112,14 @@
* QR code.
*/
boolean isAdbWifiQrSupported();
+
+ /**
+ * Register callback for ADB debugging changed notification.
+ */
+ void registerCallback(IAdbCallback callback);
+
+ /**
+ * Unregister callback for ADB debugging changed notification.
+ */
+ void unregisterCallback(IAdbCallback callback);
}
diff --git a/core/java/android/debug/PairDevice.aidl b/core/java/android/debug/PairDevice.aidl
new file mode 100644
index 0000000..c72a5ed
--- /dev/null
+++ b/core/java/android/debug/PairDevice.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.debug;
+
+/**
+ * Contains information about the client in an ADB connection.
+ * @see {@link android.debug.IAdbManager#getPairedDevices()}
+ * @hide
+ */
+parcelable PairDevice {
+ /**
+ * The human-readable name of the device.
+ */
+ String name;
+
+ /**
+ * The device's guid.
+ */
+ String guid;
+
+ /**
+ * Indicates whether the device is currently connected to adbd.
+ */
+ boolean connected;
+}
\ No newline at end of file
diff --git a/core/java/android/debug/PairDevice.java b/core/java/android/debug/PairDevice.java
deleted file mode 100644
index 2d5b446..0000000
--- a/core/java/android/debug/PairDevice.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.debug;
-
-import android.annotation.NonNull;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import com.android.internal.annotations.Immutable;
-import com.android.internal.util.Preconditions;
-
-/**
- * Contains information about the client in an ADB connection.
- * @hide
- */
-@Immutable
-public class PairDevice implements Parcelable {
- /**
- * The human-readable name of the device.
- */
- @NonNull private final String mName;
-
- /**
- * The device's guid.
- */
- @NonNull private final String mGuid;
-
- /**
- * Indicates whether the device is currently connected to adbd.
- */
- private final boolean mConnected;
-
- public PairDevice(@NonNull String name, @NonNull String guid, boolean connected) {
- Preconditions.checkStringNotEmpty(name);
- Preconditions.checkStringNotEmpty(guid);
- mName = name;
- mGuid = guid;
- mConnected = connected;
- }
-
- /**
- * @return the device name.
- */
- @NonNull
- public String getDeviceName() {
- return mName;
- }
-
- /**
- * @return the device GUID.
- */
- @NonNull
- public String getGuid() {
- return mGuid;
- }
-
- /**
- * @return the adb connection state of the device.
- */
- public boolean isConnected() {
- return mConnected;
- }
-
- @Override
- public void writeToParcel(@NonNull Parcel dest, int flags) {
- dest.writeString(mName);
- dest.writeString(mGuid);
- dest.writeBoolean(mConnected);
- }
-
- /**
- * @return Human-readable info about the object.
- */
- @Override
- public String toString() {
- return "\n" + mName + "\n" + mGuid + "\n" + mConnected;
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @NonNull
- public static final Parcelable.Creator<PairDevice> CREATOR =
- new Creator<PairDevice>() {
- @Override
- public PairDevice createFromParcel(Parcel source) {
- return new PairDevice(source.readString(), source.readString(),
- source.readBoolean());
- }
-
- @Override
- public PairDevice[] newArray(int size) {
- return new PairDevice[size];
- }
- };
-}
diff --git a/core/java/android/hardware/biometrics/OWNERS b/core/java/android/hardware/biometrics/OWNERS
index 2065ffa..0b4d9d9 100644
--- a/core/java/android/hardware/biometrics/OWNERS
+++ b/core/java/android/hardware/biometrics/OWNERS
@@ -1,8 +1,3 @@
# Bug component: 879035
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
-
+include /services/core/java/com/android/server/biometrics/OWNERS
diff --git a/core/java/android/hardware/radio/ITuner.aidl b/core/java/android/hardware/radio/ITuner.aidl
index 429f1f3..7bf234b 100644
--- a/core/java/android/hardware/radio/ITuner.aidl
+++ b/core/java/android/hardware/radio/ITuner.aidl
@@ -80,14 +80,14 @@
void setConfigFlag(int flag, boolean value);
/**
- * @param parameters Vendor-specific key-value pairs, must be Map<String, String>
- * @return Vendor-specific key-value pairs, must be Map<String, String>
+ * @param parameters Vendor-specific key-value pairs
+ * @return Vendor-specific key-value pairs
*/
- Map setParameters(in Map parameters);
+ Map<String, String> setParameters(in Map<String, String> parameters);
/**
* @param keys Parameter keys to fetch
- * @return Vendor-specific key-value pairs, must be Map<String, String>
+ * @return Vendor-specific key-value pairs
*/
- Map getParameters(in List<String> keys);
+ Map<String, String> getParameters(in List<String> keys);
}
diff --git a/core/java/android/hardware/radio/ITunerCallback.aidl b/core/java/android/hardware/radio/ITunerCallback.aidl
index b32daa5..f98947b 100644
--- a/core/java/android/hardware/radio/ITunerCallback.aidl
+++ b/core/java/android/hardware/radio/ITunerCallback.aidl
@@ -36,7 +36,7 @@
void onProgramListUpdated(in ProgramList.Chunk chunk);
/**
- * @param parameters Vendor-specific key-value pairs, must be Map<String, String>
+ * @param parameters Vendor-specific key-value pairs
*/
- void onParametersUpdated(in Map parameters);
+ void onParametersUpdated(in Map<String, String> parameters);
}
diff --git a/core/java/android/hardware/radio/TunerCallbackAdapter.java b/core/java/android/hardware/radio/TunerCallbackAdapter.java
index beff0f7..e3f7001 100644
--- a/core/java/android/hardware/radio/TunerCallbackAdapter.java
+++ b/core/java/android/hardware/radio/TunerCallbackAdapter.java
@@ -220,7 +220,7 @@
}
@Override
- public void onParametersUpdated(Map parameters) {
+ public void onParametersUpdated(Map<String, String> parameters) {
mHandler.post(() -> mCallback.onParametersUpdated(parameters));
}
}
diff --git a/core/java/android/net/VpnManager.java b/core/java/android/net/VpnManager.java
index 662ebb3..5c28553 100644
--- a/core/java/android/net/VpnManager.java
+++ b/core/java/android/net/VpnManager.java
@@ -389,6 +389,10 @@
/**
* Starts a legacy VPN.
+ *
+ * Legacy VPN is deprecated starting from Android S. So this API shouldn't be called if the
+ * initial SDK version of device is Android S+. Otherwise, UnsupportedOperationException will be
+ * thrown.
* @hide
*/
public void startLegacyVpn(VpnProfile profile) {
diff --git a/core/java/android/os/DropBoxManager.java b/core/java/android/os/DropBoxManager.java
index fd576c9..d701676 100644
--- a/core/java/android/os/DropBoxManager.java
+++ b/core/java/android/os/DropBoxManager.java
@@ -30,6 +30,7 @@
import com.android.internal.os.IDropBoxManagerService;
+import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.Closeable;
import java.io.File;
@@ -234,7 +235,8 @@
} else {
return null;
}
- return (mFlags & IS_GZIPPED) != 0 ? new GZIPInputStream(is) : is;
+ return (mFlags & IS_GZIPPED) != 0
+ ? new GZIPInputStream(new BufferedInputStream(is)) : is;
}
public static final @android.annotation.NonNull Parcelable.Creator<Entry> CREATOR = new Parcelable.Creator() {
diff --git a/core/java/android/os/ServiceManager.java b/core/java/android/os/ServiceManager.java
index f853e67..06a2c87 100644
--- a/core/java/android/os/ServiceManager.java
+++ b/core/java/android/os/ServiceManager.java
@@ -17,6 +17,8 @@
package android.os;
import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.util.ArrayMap;
import android.util.Log;
@@ -28,6 +30,7 @@
import java.util.Map;
/** @hide */
+@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public final class ServiceManager {
private static final String TAG = "ServiceManager";
private static final Object sLock = new Object();
@@ -98,10 +101,12 @@
int COUNT = GET_SERVICE + 1;
}
+ /** @hide */
public static final StatLogger sStatLogger = new StatLogger(new String[] {
"getService()",
});
+ /** @hide */
@UnsupportedAppUsage
public ServiceManager() {
}
@@ -123,6 +128,7 @@
*
* @param name the name of the service to get
* @return a reference to the service, or <code>null</code> if the service doesn't exist
+ * @hide
*/
@UnsupportedAppUsage
public static IBinder getService(String name) {
@@ -160,6 +166,7 @@
*
* @param name the name of the new service
* @param service the service object
+ * @hide
*/
@UnsupportedAppUsage
public static void addService(String name, IBinder service) {
@@ -174,6 +181,7 @@
* @param service the service object
* @param allowIsolated set to true to allow isolated sandboxed processes
* to access this service
+ * @hide
*/
@UnsupportedAppUsage
public static void addService(String name, IBinder service, boolean allowIsolated) {
@@ -189,6 +197,7 @@
* @param allowIsolated set to true to allow isolated sandboxed processes
* @param dumpPriority supported dump priority levels as a bitmask
* to access this service
+ * @hide
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static void addService(String name, IBinder service, boolean allowIsolated,
@@ -203,6 +212,7 @@
/**
* Retrieve an existing service called @a name from the
* service manager. Non-blocking.
+ * @hide
*/
@UnsupportedAppUsage
public static IBinder checkService(String name) {
@@ -239,6 +249,7 @@
*
* @return true if the service is declared somewhere (eg. VINTF manifest) and
* waitForService should always be able to return the service.
+ * @hide
*/
public static String[] getDeclaredInstances(@NonNull String iface) {
try {
@@ -256,8 +267,13 @@
* will wait for it to be ready.
*
* @return {@code null} only if there are permission problems or fatal errors.
+ * @hide
*/
- public static native IBinder waitForService(@NonNull String name);
+ public static IBinder waitForService(@NonNull String name) {
+ return Binder.allowBlocking(waitForServiceNative(name));
+ }
+
+ private static native IBinder waitForServiceNative(@NonNull String name);
/**
* Returns the specified service from the service manager, if declared.
@@ -267,8 +283,10 @@
*
* @return {@code null} if the service is not declared in the manifest, or if there are
* permission problems, or if there are fatal errors.
+ * @hide
*/
- public static IBinder waitForDeclaredService(@NonNull String name) {
+ @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ @Nullable public static IBinder waitForDeclaredService(@NonNull String name) {
return isDeclared(name) ? waitForService(name) : null;
}
@@ -276,6 +294,7 @@
* Return a list of all currently running services.
* @return an array of all currently running services, or <code>null</code> in
* case of an exception
+ * @hide
*/
@UnsupportedAppUsage
public static String[] listServices() {
diff --git a/core/java/android/os/SharedMemory.java b/core/java/android/os/SharedMemory.java
index 136e3de..46eb2ec 100644
--- a/core/java/android/os/SharedMemory.java
+++ b/core/java/android/os/SharedMemory.java
@@ -93,6 +93,26 @@
}
}
+ /**
+ * Creates an instance from existing shared memory passed as {@link ParcelFileDescriptor}.
+ *
+ * <p> The {@code fd} should be a shared memory created from
+ {@code SharedMemory or ASharedMemory}. This can be useful when shared memory is passed as
+ file descriptor through JNI or binder service implemented in cpp.
+ * <p> Note that newly created {@code SharedMemory} takes ownership of passed {@code fd} and
+ * the original {@code fd} becomes detached (Check {@link ParcelFileDescriptor#detachFd()}).
+ * If the caller wants to use the file descriptor after the call, the caller should duplicate
+ * the file descriptor (Check {@link ParcelFileDescriptor#dup()}) and pass the duped version
+ * instead.
+ *
+ * @param fd File descriptor of shared memory passed as {@link ParcelFileDescriptor}.
+ */
+ public static @NonNull SharedMemory fromFileDescriptor(@NonNull ParcelFileDescriptor fd) {
+ FileDescriptor f = new FileDescriptor();
+ f.setInt$(fd.detachFd());
+ return new SharedMemory(f);
+ }
+
private static final int PROT_MASK = OsConstants.PROT_READ | OsConstants.PROT_WRITE
| OsConstants.PROT_EXEC | OsConstants.PROT_NONE;
diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java
index bd84c84..c89f4f5 100644
--- a/core/java/android/provider/DeviceConfig.java
+++ b/core/java/android/provider/DeviceConfig.java
@@ -201,6 +201,14 @@
"intelligence_content_suggestions";
/**
+ * Namespace for all lmkd related features.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String NAMESPACE_LMKD_NATIVE = "lmkd_native";
+
+ /**
* Namespace for all media native related features.
*
* @hide
diff --git a/core/java/com/android/internal/net/VpnProfile.java b/core/java/com/android/internal/net/VpnProfile.java
index 6e1d3ce..5f84b5a 100644
--- a/core/java/com/android/internal/net/VpnProfile.java
+++ b/core/java/com/android/internal/net/VpnProfile.java
@@ -377,12 +377,15 @@
/** Checks if this profile specifies a LegacyVpn type. */
public static boolean isLegacyType(int type) {
switch (type) {
- case VpnProfile.TYPE_IKEV2_IPSEC_USER_PASS: // fall through
- case VpnProfile.TYPE_IKEV2_IPSEC_RSA: // fall through
- case VpnProfile.TYPE_IKEV2_IPSEC_PSK:
- return false;
- default:
+ case VpnProfile.TYPE_PPTP:
+ case VpnProfile.TYPE_L2TP_IPSEC_PSK:
+ case VpnProfile.TYPE_L2TP_IPSEC_RSA:
+ case VpnProfile.TYPE_IPSEC_XAUTH_PSK:
+ case VpnProfile.TYPE_IPSEC_XAUTH_RSA:
+ case VpnProfile.TYPE_IPSEC_HYBRID_RSA:
return true;
+ default:
+ return false;
}
}
diff --git a/core/java/com/android/internal/util/OWNERS b/core/java/com/android/internal/util/OWNERS
index 5b68159..100a605d 100644
--- a/core/java/com/android/internal/util/OWNERS
+++ b/core/java/com/android/internal/util/OWNERS
@@ -1,6 +1,7 @@
per-file AsyncChannel* = [email protected], [email protected], [email protected]
per-file MessageUtils*, Protocol*, RingBuffer*, TokenBucket* = [email protected], [email protected], [email protected]
per-file *Notification* = file:/services/core/java/com/android/server/notification/OWNERS
+per-file *ContrastColor* = file:/services/core/java/com/android/server/notification/OWNERS
per-file Protocol* = [email protected], [email protected]
per-file State* = [email protected], [email protected], [email protected]
per-file DataClass* = [email protected]
\ No newline at end of file
diff --git a/core/jni/android_os_ServiceManager.cpp b/core/jni/android_os_ServiceManager.cpp
index c747949..d642d0e 100644
--- a/core/jni/android_os_ServiceManager.cpp
+++ b/core/jni/android_os_ServiceManager.cpp
@@ -29,11 +29,8 @@
// Native because we have a client-side wait in waitForService() and we do not
// want an unnecessary second copy of it.
-static jobject android_os_ServiceManager_waitForService(
- JNIEnv *env,
- jclass /* clazzObj */,
- jstring serviceNameObj) {
-
+static jobject android_os_ServiceManager_waitForServiceNative(JNIEnv* env, jclass /* clazzObj */,
+ jstring serviceNameObj) {
const jchar* serviceName = env->GetStringCritical(serviceNameObj, nullptr);
if (!serviceName) {
jniThrowNullPointerException(env, nullptr);
@@ -55,12 +52,9 @@
// ----------------------------------------------------------------------------
static const JNINativeMethod method_table[] = {
- /* name, signature, funcPtr */
- {
- "waitForService",
- "(Ljava/lang/String;)Landroid/os/IBinder;",
- (void*)android_os_ServiceManager_waitForService
- },
+ /* name, signature, funcPtr */
+ {"waitForServiceNative", "(Ljava/lang/String;)Landroid/os/IBinder;",
+ (void*)android_os_ServiceManager_waitForServiceNative},
};
int register_android_os_ServiceManager(JNIEnv* env) {
diff --git a/core/jni/com_android_internal_content_om_OverlayConfig.cpp b/core/jni/com_android_internal_content_om_OverlayConfig.cpp
index 6aa7c10..b37269c 100644
--- a/core/jni/com_android_internal_content_om_OverlayConfig.cpp
+++ b/core/jni/com_android_internal_content_om_OverlayConfig.cpp
@@ -73,13 +73,13 @@
}
if (result->status != 0) {
- LOG(ERROR) << "idmap2: " << result->stderr;
- return nullptr;
+ LOG(ERROR) << "idmap2: " << result->stderr_str;
+ return nullptr;
}
// Return the paths of the idmaps created or updated during the idmap invocation.
std::vector<std::string> idmap_paths;
- std::istringstream input(result->stdout);
+ std::istringstream input(result->stdout_str);
std::string path;
while (std::getline(input, path)) {
idmap_paths.push_back(path);
diff --git a/core/res/res/xml/sms_short_codes.xml b/core/res/res/xml/sms_short_codes.xml
index 2be5c47..37d059a 100644
--- a/core/res/res/xml/sms_short_codes.xml
+++ b/core/res/res/xml/sms_short_codes.xml
@@ -88,9 +88,12 @@
<!-- Cyprus: 4-6 digits (not confirmed), known premium codes listed, plus EU -->
<shortcode country="cy" pattern="\\d{4,6}" premium="7510" free="116\\d{3}" />
- <!-- Czechia: 7-8 digits, starting with 9, plus EU:
- http://www.o2.cz/osobni/en/services-by-alphabet/91670-premium_sms.html -->
- <shortcode country="cz" premium="9\\d{6,7}" free="116\\d{3}" />
+ <!-- Czechia: Premium numbers start with 90, and are either 5 or 7 digits (5 digits is a
+ subscription request, you will be charged for the messages received, but it's necessary
+ to warn on the _request_ as that's the last chance to stop), plus EU:
+ https://www.t-mobile.cz/platebni-a-premium-sms
+ https://www.vodafone.cz/pece/vyuctovani-platby-kredit/platby-mobilem/cena-premium-sms/ -->
+ <shortcode country="cz" premium="90\\d{5}|90\\d{3}" free="116\\d{3}" />
<!-- Germany: 4-5 digits plus 1232xxx (premium codes from http://www.vodafone.de/infofaxe/537.pdf and http://premiumdienste.eplus.de/pdf/kodex.pdf), plus EU. To keep the premium regex from being too large, it only includes payment processors that have been used by SMS malware, with the regular pattern matching the other premium short codes. -->
<shortcode country="de" pattern="\\d{4,5}|1232\\d{3}" premium="11(?:111|833)|1232(?:013|021|060|075|286|358)|118(?:44|80|86)|20[25]00|220(?:21|22|88|99)|221(?:14|21)|223(?:44|53|77)|224[13]0|225(?:20|59|90)|226(?:06|10|20|26|30|40|56|70)|227(?:07|33|39|66|76|78|79|88|99)|228(?:08|11|66|77)|23300|30030|3[12347]000|330(?:33|55|66)|33(?:233|331|366|533)|34(?:34|567)|37000|40(?:040|123|444|[3568]00)|41(?:010|414)|44(?:000|044|344|44[24]|544)|50005|50100|50123|50555|51000|52(?:255|783)|54(?:100|2542)|55(?:077|[24]00|222|333|55|[12369]55)|56(?:789|886)|60800|6[13]000|66(?:[12348]66|566|766|777|88|999)|68888|70(?:07|123|777)|76766|77(?:007|070|222|444|[567]77)|80(?:008|123|888)|82(?:002|[378]00|323|444|472|474|488|727)|83(?:005|[169]00|333|830)|84(?:141|300|32[34]|343|488|499|777|888)|85888|86(?:188|566|640|644|650|677|868|888)|870[24]9|871(?:23|[49]9)|872(?:1[0-8]|49|99)|87499|875(?:49|55|99)|876(?:0[1367]|1[1245678]|54|99)|877(?:00|99)|878(?:15|25|3[567]|8[12])|87999|880(?:08|44|55|77|99)|88688|888(?:03|10|8|89)|8899|90(?:009|999)|99999" free="116\\d{3}|81214|81215|47529|70296|83782|3011|73240|72438" />
diff --git a/core/tests/coretests/src/com/android/internal/util/OWNERS b/core/tests/coretests/src/com/android/internal/util/OWNERS
new file mode 100644
index 0000000..d832745
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/util/OWNERS
@@ -0,0 +1,2 @@
+per-file *Notification* = file:/services/core/java/com/android/server/notification/OWNERS
+per-file *ContrastColor* = file:/services/core/java/com/android/server/notification/OWNERS
\ No newline at end of file
diff --git a/keystore/java/android/security/GenerateRkpKey.java b/keystore/java/android/security/GenerateRkpKey.java
index 053bec74..2e54e63 100644
--- a/keystore/java/android/security/GenerateRkpKey.java
+++ b/keystore/java/android/security/GenerateRkpKey.java
@@ -25,6 +25,8 @@
import android.util.Log;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
/**
@@ -88,7 +90,8 @@
}
intent.setComponent(comp);
mCountDownLatch = new CountDownLatch(1);
- if (!mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE)) {
+ Executor executor = Executors.newCachedThreadPool();
+ if (!mContext.bindService(intent, Context.BIND_AUTO_CREATE, executor, mConnection)) {
throw new RemoteException("Failed to bind to GenerateRkpKeyService");
}
try {
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java b/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java
index 5619585..b24a22d 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreKey.java
@@ -102,11 +102,9 @@
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 @@
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 db3e567..4842984 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.KeyMetadata;
import java.security.PublicKey;
+import java.util.Objects;
/**
* {@link PublicKey} backed by Android Keystore.
@@ -75,9 +76,14 @@
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/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
index f3cfcf1..67358c4 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
@@ -579,7 +579,7 @@
//
// Note: mNamespace == KeyProperties.NAMESPACE_APPLICATION implies that the target domain
// is Domain.APP and Domain.SELINUX is the target domain otherwise.
- if (alias != descriptor.alias
+ if (!alias.equals(descriptor.alias)
|| descriptor.domain != targetDomain
|| (descriptor.domain == Domain.SELINUX && descriptor.nspace != targetNamespace)) {
throw new KeyStoreException("Can only replace keys with same alias: " + alias
diff --git a/libs/androidfw/PosixUtils.cpp b/libs/androidfw/PosixUtils.cpp
index 4ec525a..0269128 100644
--- a/libs/androidfw/PosixUtils.cpp
+++ b/libs/androidfw/PosixUtils.cpp
@@ -114,10 +114,10 @@
std::unique_ptr<ProcResult> result(new ProcResult());
result->status = status;
const auto out = ReadFile(stdout[0]);
- result->stdout = out ? *out : "";
+ result->stdout_str = out ? *out : "";
close(stdout[0]);
const auto err = ReadFile(stderr[0]);
- result->stderr = err ? *err : "";
+ result->stderr_str = err ? *err : "";
close(stderr[0]);
return result;
}
diff --git a/libs/androidfw/include/androidfw/PosixUtils.h b/libs/androidfw/include/androidfw/PosixUtils.h
index 8fc3ee2..bb20847 100644
--- a/libs/androidfw/include/androidfw/PosixUtils.h
+++ b/libs/androidfw/include/androidfw/PosixUtils.h
@@ -23,8 +23,8 @@
struct ProcResult {
int status;
- std::string stdout;
- std::string stderr;
+ std::string stdout_str;
+ std::string stderr_str;
};
// Fork, exec and wait for an external process. Return nullptr if the process could not be launched,
diff --git a/libs/androidfw/tests/PosixUtils_test.cpp b/libs/androidfw/tests/PosixUtils_test.cpp
index cf97f87..c7b3eba 100644
--- a/libs/androidfw/tests/PosixUtils_test.cpp
+++ b/libs/androidfw/tests/PosixUtils_test.cpp
@@ -30,14 +30,14 @@
const auto result = ExecuteBinary({"/bin/date", "--help"});
ASSERT_THAT(result, NotNull());
ASSERT_EQ(result->status, 0);
- ASSERT_EQ(result->stdout.find("usage: date "), 0);
+ ASSERT_EQ(result->stdout_str.find("usage: date "), 0);
}
TEST(PosixUtilsTest, RelativePathToBinary) {
const auto result = ExecuteBinary({"date", "--help"});
ASSERT_THAT(result, NotNull());
ASSERT_EQ(result->status, 0);
- ASSERT_EQ(result->stdout.find("usage: date "), 0);
+ ASSERT_EQ(result->stdout_str.find("usage: date "), 0);
}
TEST(PosixUtilsTest, BadParameters) {
diff --git a/media/OWNERS b/media/OWNERS
index abfc8bf..0aff43e 100644
--- a/media/OWNERS
+++ b/media/OWNERS
@@ -1,8 +1,7 @@
[email protected]
+# Bug component: 1344
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
@@ -13,16 +12,13 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
-# LON
[email protected]
[email protected]
[email protected]
+# go/android-fwk-media-solutions for info on areas of ownership.
+include platform/frameworks/av:/media/janitors/media_solutions_OWNERS
# SEO
[email protected]
diff --git a/media/java/android/media/OWNERS b/media/java/android/media/OWNERS
index cf06fad..813dee3 100644
--- a/media/java/android/media/OWNERS
+++ b/media/java/android/media/OWNERS
@@ -1,9 +1,9 @@
# Bug component: 1344
-
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
+
+# go/android-fwk-media-solutions for info on areas of ownership.
+include platform/frameworks/av:/media/janitors/media_solutions_OWNERS
diff --git a/media/jni/OWNERS b/media/jni/OWNERS
index f1b0237..445672b 100644
--- a/media/jni/OWNERS
+++ b/media/jni/OWNERS
@@ -2,4 +2,4 @@
per-file android_mtp_*[email protected],[email protected],[email protected],[email protected]
# extra for TV related files
-per-file android_media_tv_*[email protected],[email protected]
+per-file android_media_tv_*[email protected],[email protected]
diff --git a/mms/OWNERS b/mms/OWNERS
index befc320..7f05a2a 100644
--- a/mms/OWNERS
+++ b/mms/OWNERS
@@ -2,7 +2,6 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
@@ -10,7 +9,10 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
\ No newline at end of file
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
diff --git a/packages/CarrierDefaultApp/OWNERS b/packages/CarrierDefaultApp/OWNERS
index 5668840..0d23f05 100644
--- a/packages/CarrierDefaultApp/OWNERS
+++ b/packages/CarrierDefaultApp/OWNERS
@@ -1,7 +1,6 @@
set noparent
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
@@ -9,9 +8,11 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
diff --git a/packages/DynamicSystemInstallationService/AndroidManifest.xml b/packages/DynamicSystemInstallationService/AndroidManifest.xml
index b4d520d..1bc4983 100644
--- a/packages/DynamicSystemInstallationService/AndroidManifest.xml
+++ b/packages/DynamicSystemInstallationService/AndroidManifest.xml
@@ -33,6 +33,10 @@
<intent-filter>
<action android:name="android.os.image.action.START_INSTALL" />
<category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="content" />
+ <data android:scheme="file" />
+ <data android:scheme="http" />
+ <data android:scheme="https" />
</intent-filter>
</activity>
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 11d1b0a..087275e 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -322,6 +322,11 @@
return true;
}
+ if (TextUtils.equals(Environment.DIRECTORY_ANDROID.toLowerCase(),
+ path.toLowerCase())) {
+ return true;
+ }
+
return false;
} catch (IOException e) {
throw new IllegalArgumentException(
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 12a94e1..bf28603 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -2430,7 +2430,8 @@
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="
@@ -2456,6 +2457,16 @@
mContext.sendBroadcastAsUser(intent, UserHandle.ALL, BLUETOOTH_PERM);
}
+ private boolean isBleState(int state) {
+ switch (state) {
+ case BluetoothAdapter.STATE_BLE_ON:
+ case BluetoothAdapter.STATE_BLE_TURNING_ON:
+ case BluetoothAdapter.STATE_BLE_TURNING_OFF:
+ return true;
+ }
+ return false;
+ }
+
private void bluetoothStateChangeHandler(int prevState, int newState) {
boolean isStandardBroadcast = true;
if (prevState == newState) { // No change. Nothing to do.
@@ -2474,8 +2485,15 @@
sendBluetoothServiceDownCallback();
unbindAndFinish();
sendBleStateChanged(prevState, newState);
- // Don't broadcast as it has already been broadcast before
- isStandardBroadcast = false;
+
+ /* Currently, the OFF intent is broadcasted externally only when we transition
+ * from TURNING_OFF to BLE_ON state. So if the previous state is a BLE state,
+ * we are guaranteed that the OFF intent has been broadcasted earlier and we
+ * can safely skip it.
+ * Conversely, if the previous state is not a BLE state, it indicates that some
+ * sort of crash has occurred, moving us directly to STATE_OFF without ever
+ * passing through BLE_ON. We should broadcast the OFF intent in this case. */
+ isStandardBroadcast = !isBleState(prevState);
} else if (!intermediate_off) {
// connect to GattService
@@ -2528,6 +2546,11 @@
// Show prevState of BLE_ON as OFF to standard users
prevState = BluetoothAdapter.STATE_OFF;
}
+ if (DBG) {
+ Slog.d(TAG,
+ "Sending State Change: " + BluetoothAdapter.nameForState(prevState) + " > "
+ + BluetoothAdapter.nameForState(newState));
+ }
Intent intent = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
intent.putExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, prevState);
intent.putExtra(BluetoothAdapter.EXTRA_STATE, newState);
diff --git a/services/core/java/com/android/server/VpnManagerService.java b/services/core/java/com/android/server/VpnManagerService.java
index 26ecee8..d483f18 100644
--- a/services/core/java/com/android/server/VpnManagerService.java
+++ b/services/core/java/com/android/server/VpnManagerService.java
@@ -38,6 +38,7 @@
import android.net.VpnService;
import android.net.util.NetdService;
import android.os.Binder;
+import android.os.Build;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.INetworkManagementService;
@@ -348,9 +349,18 @@
/**
* Start legacy VPN, controlling native daemons as needed. Creates a
* secondary thread to perform connection work, returning quickly.
+ *
+ * Legacy VPN is deprecated starting from Android S. So this API shouldn't be called if the
+ * initial SDK version of device is Android S+. Otherwise, UnsupportedOperationException will be
+ * thrown.
*/
+ @SuppressWarnings("AndroidFrameworkCompatChange") // This is not an app-visible API.
@Override
public void startLegacyVpn(VpnProfile profile) {
+ if (Build.VERSION.DEVICE_INITIAL_SDK_INT >= Build.VERSION_CODES.S
+ && VpnProfile.isLegacyType(profile.type)) {
+ throw new UnsupportedOperationException("Legacy VPN is deprecated");
+ }
int user = UserHandle.getUserId(mDeps.getCallingUid());
// Note that if the caller is not system (uid >= Process.FIRST_APPLICATION_UID),
// the code might not work well since getActiveNetwork might return null if the uid is
diff --git a/services/core/java/com/android/server/adb/AdbDebuggingManager.java b/services/core/java/com/android/server/adb/AdbDebuggingManager.java
index ed83a64..bfc4fe7 100644
--- a/services/core/java/com/android/server/adb/AdbDebuggingManager.java
+++ b/services/core/java/com/android/server/adb/AdbDebuggingManager.java
@@ -1362,7 +1362,10 @@
if (args.length > 1) {
hostname = args[1];
}
- PairDevice device = new PairDevice(fingerprints, hostname, false);
+ PairDevice device = new PairDevice();
+ device.name = fingerprints;
+ device.guid = hostname;
+ device.connected = false;
intent.putExtra(AdbManager.WIRELESS_PAIR_DEVICE_EXTRA, device);
mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
// Add the key into the keystore
@@ -1844,8 +1847,11 @@
if (args.length > 1) {
hostname = args[1];
}
- pairedDevices.put(keyEntry.getKey(), new PairDevice(
- hostname, fingerprints, mWifiConnectedKeys.contains(keyEntry.getKey())));
+ PairDevice pairDevice = new PairDevice();
+ pairDevice.name = hostname;
+ pairDevice.guid = fingerprints;
+ pairDevice.connected = mWifiConnectedKeys.contains(keyEntry.getKey());
+ pairedDevices.put(keyEntry.getKey(), pairDevice);
}
return pairedDevices;
}
diff --git a/services/core/java/com/android/server/adb/AdbService.java b/services/core/java/com/android/server/adb/AdbService.java
index 29bb542..7a4d2ce 100644
--- a/services/core/java/com/android/server/adb/AdbService.java
+++ b/services/core/java/com/android/server/adb/AdbService.java
@@ -27,6 +27,8 @@
import android.debug.AdbManager;
import android.debug.AdbManagerInternal;
import android.debug.AdbTransportType;
+import android.debug.FingerprintAndPairDevice;
+import android.debug.IAdbCallback;
import android.debug.IAdbManager;
import android.debug.IAdbTransport;
import android.debug.PairDevice;
@@ -35,6 +37,7 @@
import android.os.Binder;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
+import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UserHandle;
@@ -87,6 +90,7 @@
private final AdbConnectionPortListener mPortListener = new AdbConnectionPortListener();
private AdbDebuggingManager.AdbConnectionPortPoller mConnectionPortPoller;
+ private final RemoteCallbackList<IAdbCallback> mCallbacks = new RemoteCallbackList<>();
/**
* Manages the service lifecycle for {@code AdbService} in {@code SystemServer}.
*/
@@ -348,12 +352,21 @@
}
@Override
- public Map<String, PairDevice> getPairedDevices() {
+ public FingerprintAndPairDevice[] getPairedDevices() {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null);
- if (mDebuggingManager != null) {
- return mDebuggingManager.getPairedDevices();
+ if (mDebuggingManager == null) {
+ return null;
}
- return null;
+ Map<String, PairDevice> map = mDebuggingManager.getPairedDevices();
+ FingerprintAndPairDevice[] ret = new FingerprintAndPairDevice[map.size()];
+ int i = 0;
+ for (Map.Entry<String, PairDevice> entry : map.entrySet()) {
+ ret[i] = new FingerprintAndPairDevice();
+ ret[i].keyFingerprint = entry.getKey();
+ ret[i].device = entry.getValue();
+ i++;
+ }
+ return ret;
}
@Override
@@ -401,6 +414,21 @@
return mConnectionPort.get();
}
+ @Override
+ public void registerCallback(IAdbCallback callback) throws RemoteException {
+ if (DEBUG) {
+ Slog.d(TAG, "Registering callback " + callback);
+ }
+ mCallbacks.register(callback);
+ }
+
+ @Override
+ public void unregisterCallback(IAdbCallback callback) throws RemoteException {
+ if (DEBUG) {
+ Slog.d(TAG, "Unregistering callback " + callback);
+ }
+ mCallbacks.unregister(callback);
+ }
/**
* This listener is only used when ro.adb.secure=0. Otherwise, AdbDebuggingManager will
* do this.
@@ -507,6 +535,23 @@
if (mDebuggingManager != null) {
mDebuggingManager.setAdbEnabled(enable, transportType);
}
+
+ if (DEBUG) {
+ Slog.d(TAG, "Broadcasting enable = " + enable + ", type = " + transportType);
+ }
+ mCallbacks.broadcast((callback) -> {
+ if (DEBUG) {
+ Slog.d(TAG, "Sending enable = " + enable + ", type = " + transportType
+ + " to " + callback);
+ }
+ try {
+ callback.onDebuggingChanged(enable, transportType);
+ } catch (RemoteException ex) {
+ if (DEBUG) {
+ Slog.d(TAG, "Unable to send onDebuggingChanged:", ex);
+ }
+ }
+ });
}
@Override
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index b886dc1..b1ffaeb 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -935,7 +935,18 @@
void killMisbehavingService(ServiceRecord r,
int appUid, int appPid, String localPackageName) {
synchronized (mAm) {
- stopServiceLocked(r);
+ if (!r.destroying) {
+ // This service is still alive, stop it.
+ stopServiceLocked(r);
+ } else {
+ // Check if there is another instance of it being started in parallel,
+ // if so, stop that too to avoid spamming the system.
+ final ServiceMap smap = getServiceMapLocked(r.userId);
+ final ServiceRecord found = smap.mServicesByInstanceName.remove(r.instanceName);
+ if (found != null) {
+ stopServiceLocked(found);
+ }
+ }
mAm.crashApplication(appUid, appPid, localPackageName, -1,
"Bad notification for startForeground", true /*force*/);
}
diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
index c20a01d..00dfd38 100644
--- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
+++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
@@ -84,6 +84,7 @@
DeviceConfig.NAMESPACE_CONNECTIVITY,
DeviceConfig.NAMESPACE_INPUT_NATIVE_BOOT,
DeviceConfig.NAMESPACE_INTELLIGENCE_CONTENT_SUGGESTIONS,
+ DeviceConfig.NAMESPACE_LMKD_NATIVE,
DeviceConfig.NAMESPACE_MEDIA_NATIVE,
DeviceConfig.NAMESPACE_NETD_NATIVE,
DeviceConfig.NAMESPACE_PROFCOLLECT_NATIVE_BOOT,
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
index 26f5c4c..cd3d27d 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
@@ -1648,10 +1648,9 @@
return;
}
Log.w(TAG, "Speaker client died");
- if (removeCommunicationRouteClient(client.getBinder(), false)
- != null) {
- onUpdateCommunicationRoute("onCommunicationRouteClientDied");
- }
+ setCommunicationRouteForClient(
+ client.getBinder(), client.getPid(), null,
+ BtHelper.SCO_MODE_UNDEFINED, "onCommunicationRouteClientDied");
}
/**
diff --git a/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java b/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java
index f2e44ee..e7118ad 100644
--- a/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java
+++ b/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java
@@ -28,10 +28,8 @@
import android.os.RemoteException;
import android.util.Slog;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.Objects;
class Tuner extends ITuner.Stub {
private static final String TAG = "BroadcastRadioService.Tuner";
@@ -292,12 +290,12 @@
}
@Override
- public Map setParameters(Map parameters) {
+ public Map<String, String> setParameters(Map<String, String> parameters) {
throw new UnsupportedOperationException("Not supported by HAL 1.x");
}
@Override
- public Map getParameters(List<String> keys) {
+ public Map<String, String> getParameters(List<String> keys) {
throw new UnsupportedOperationException("Not supported by HAL 1.x");
}
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java b/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java
index 7a6d964..867d5b4 100644
--- a/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java
+++ b/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java
@@ -18,12 +18,10 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.hardware.radio.ITuner;
import android.hardware.radio.ITunerCallback;
import android.hardware.radio.ProgramList;
import android.hardware.radio.ProgramSelector;
import android.hardware.radio.RadioManager;
-import android.hardware.radio.RadioMetadata;
import android.hardware.radio.RadioTuner;
import android.os.IBinder;
import android.os.RemoteException;
@@ -31,7 +29,6 @@
import java.util.List;
import java.util.Map;
-import java.util.Objects;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@@ -176,7 +173,7 @@
}
@Override
- public void onParametersUpdated(Map parameters) {
+ public void onParametersUpdated(Map<String, String> parameters) {
Slog.e(TAG, "Not applicable for HAL 1.x");
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java b/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
index 7ab3bdd..7d8c6a4 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
@@ -299,7 +299,7 @@
}
@Override
- public Map setParameters(Map parameters) {
+ public Map<String, String> setParameters(Map<String, String> parameters) {
synchronized (mLock) {
checkNotClosedLocked();
return Convert.vendorInfoFromHal(Utils.maybeRethrow(
@@ -308,7 +308,7 @@
}
@Override
- public Map getParameters(List<String> keys) {
+ public Map<String, String> getParameters(List<String> keys) {
synchronized (mLock) {
checkNotClosedLocked();
return Convert.vendorInfoFromHal(Utils.maybeRethrow(
diff --git a/services/core/java/com/android/server/policy/DisplayFoldDurationLogger.java b/services/core/java/com/android/server/policy/DisplayFoldDurationLogger.java
index bdcd2cd..3524d7f 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 @@
@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 061fabf..e927667 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 @@
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/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
index 5decf5e..0390015 100644
--- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
+++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
@@ -3362,7 +3362,11 @@
int pullFaceSettingsLocked(int atomTag, List<StatsEvent> pulledData) {
final long callingToken = Binder.clearCallingIdentity();
try {
- List<UserInfo> users = mContext.getSystemService(UserManager.class).getUsers();
+ UserManager manager = mContext.getSystemService(UserManager.class);
+ if (manager == null) {
+ return StatsManager.PULL_SKIP;
+ }
+ List<UserInfo> users = manager.getUsers();
int numUsers = users.size();
FaceManager faceManager = mContext.getSystemService(FaceManager.class);
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java
index 113797c..419a7fa 100644
--- a/services/core/java/com/android/server/wm/ActivityStarter.java
+++ b/services/core/java/com/android/server/wm/ActivityStarter.java
@@ -1468,7 +1468,7 @@
final Task targetTask = r.getTask() != null
? r.getTask()
: mTargetTask;
- if (startedActivityStack == null || targetTask == null) {
+ if (startedActivityStack == null || targetTask == null || !targetTask.isAttached()) {
return;
}
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index ddad1db..eaf7693 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -3372,7 +3372,7 @@
}
/**
- * Find all task stacks containing {@param userId} and intercept them with an activity
+ * Find all visible task stacks containing {@param userId} and intercept them with an activity
* to block out the contents and possibly start a credential-confirming intent.
*
* @param userId user handle for the locked managed profile.
@@ -3380,18 +3380,42 @@
void lockAllProfileTasks(@UserIdInt int userId) {
mService.deferWindowLayout();
try {
- forAllLeafTasks(task -> {
- if (task.getActivity(activity -> !activity.finishing && activity.mUserId == userId)
- != null) {
- mService.getTaskChangeNotificationController().notifyTaskProfileLocked(
- task.mTaskId, userId);
- }
- }, true /* traverseTopToBottom */);
+ final PooledConsumer c = PooledLambda.obtainConsumer(
+ RootWindowContainer::taskTopActivityIsUser, this, PooledLambda.__(Task.class),
+ userId);
+ forAllLeafTasks(c, true /* traverseTopToBottom */);
+ c.recycle();
} finally {
mService.continueWindowLayout();
}
}
+ /**
+ * Detects whether we should show a lock screen in front of this task for a locked user.
+ * <p>
+ * We'll do this if either of the following holds:
+ * <ul>
+ * <li>The top activity explicitly belongs to {@param userId}.</li>
+ * <li>The top activity returns a result to an activity belonging to {@param userId}.</li>
+ * </ul>
+ *
+ * @return {@code true} if the top activity looks like it belongs to {@param userId}.
+ */
+ private void taskTopActivityIsUser(Task task, @UserIdInt int userId) {
+ // To handle the case that work app is in the task but just is not the top one.
+ final ActivityRecord activityRecord = task.getTopNonFinishingActivity();
+ final ActivityRecord resultTo = (activityRecord != null ? activityRecord.resultTo : null);
+
+ // Check the task for a top activity belonging to userId, or returning a
+ // result to an activity belonging to userId. Example case: a document
+ // picker for personal files, opened by a work app, should still get locked.
+ if ((activityRecord != null && activityRecord.mUserId == userId)
+ || (resultTo != null && resultTo.mUserId == userId)) {
+ mService.getTaskChangeNotificationController().notifyTaskProfileLocked(
+ task.mTaskId, userId);
+ }
+ }
+
void cancelInitializingActivities() {
for (int displayNdx = getChildCount() - 1; displayNdx >= 0; --displayNdx) {
final DisplayContent display = getChildAt(displayNdx);
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java
index e6a35f1..1f8a437 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 @@
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);
}
}
diff --git a/services/net/Android.bp b/services/net/Android.bp
index 5a5f504..ad445f1 100644
--- a/services/net/Android.bp
+++ b/services/net/Android.bp
@@ -52,7 +52,6 @@
// classes generated by netd_aidl_interfaces-platform-java above.
"netd_aidl_interface-V3-java",
"networkstack-client",
- "modules-utils-build_system",
],
apex_available: [
"com.android.wifi",
diff --git a/services/tests/servicestests/src/com/android/server/pm/OWNERS b/services/tests/servicestests/src/com/android/server/pm/OWNERS
index e15b5f5..2f51994 100644
--- a/services/tests/servicestests/src/com/android/server/pm/OWNERS
+++ b/services/tests/servicestests/src/com/android/server/pm/OWNERS
@@ -1,3 +1,7 @@
include /services/core/java/com/android/server/pm/OWNERS
per-file *Shortcut* = file:/core/java/android/content/pm/SHORTCUT_OWNERS
+
+# apex support
+per-file ApexManagerTest.java = [email protected], [email protected], [email protected]
+
diff --git a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
index 1aff8a7..35d1b17 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
@@ -25,7 +25,6 @@
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
import static com.android.server.wm.ActivityStack.ActivityState.FINISHING;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSED;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSING;
@@ -37,13 +36,10 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.verify;
import android.app.WindowConfiguration;
import android.content.ComponentName;
import android.content.pm.ActivityInfo;
-import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import androidx.test.filters.SmallTest;
@@ -173,34 +169,5 @@
activity.setState(FINISHING, "test FINISHING");
assertThat(mWm.mRoot.allPausedActivitiesComplete()).isTrue();
}
-
- @Test
- public void testLockAllProfileTasks() {
- // Make an activity visible with the user id set to 0
- DisplayContent displayContent = mWm.mRoot.getDisplayContent(DEFAULT_DISPLAY);
- TaskDisplayArea taskDisplayArea = displayContent.getTaskDisplayAreaAt(0);
- final ActivityStack stack = createTaskStackOnDisplay(WINDOWING_MODE_FULLSCREEN,
- ACTIVITY_TYPE_STANDARD, displayContent);
- final ActivityRecord activity = new ActivityTestsBase.ActivityBuilder(stack.mAtmService)
- .setStack(stack)
- .setUid(0)
- .setCreateTask(true)
- .build();
-
- // Create another activity on top and the user id is 1
- Task task = activity.getTask();
- final ActivityRecord topActivity = new ActivityTestsBase.ActivityBuilder(mWm.mAtmService)
- .setStack(stack)
- .setUid(UserHandle.PER_USER_RANGE + 1)
- .setTask(task)
- .build();
-
- // Make sure the listeners will be notified for putting the task to locked state
- TaskChangeNotificationController controller =
- mWm.mAtmService.getTaskChangeNotificationController();
- spyOn(controller);
- mWm.mRoot.lockAllProfileTasks(0);
- verify(controller).notifyTaskProfileLocked(eq(task.mTaskId), eq(0));
- }
}
diff --git a/telecomm/java/android/telecom/CallRedirectionService.java b/telecomm/java/android/telecom/CallRedirectionService.java
index c832f53..8dcae39 100644
--- a/telecomm/java/android/telecom/CallRedirectionService.java
+++ b/telecomm/java/android/telecom/CallRedirectionService.java
@@ -89,6 +89,13 @@
boolean allowInteractiveResponse);
/**
+ * Telecom calls this method when times out waiting for the {@link CallRedirectionService} to
+ * call {@link #placeCallUnmodified()}, {@link #redirectCall(Uri, PhoneAccountHandle, boolean)},
+ * or {@link #cancelCall()}
+ */
+ public void onRedirectionTimeout() {}
+
+ /**
* The implemented {@link CallRedirectionService} calls this method to response a request
* received via {@link #onPlaceCall(Uri, PhoneAccountHandle, boolean)} to inform Telecom that
* no changes are required to the outgoing call, and that the call should be placed as-is.
@@ -158,6 +165,12 @@
private static final int MSG_PLACE_CALL = 1;
/**
+ * A handler message to process the attempt to notify the operation of redirection service timed
+ * out from Telecom
+ */
+ private static final int MSG_TIMEOUT = 2;
+
+ /**
* A handler to process the attempt to place call with redirection service from Telecom
*/
private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -174,6 +187,9 @@
args.recycle();
}
break;
+ case MSG_TIMEOUT:
+ onRedirectionTimeout();
+ break;
}
}
};
@@ -200,6 +216,15 @@
args.arg4 = allowInteractiveResponse;
mHandler.obtainMessage(MSG_PLACE_CALL, args).sendToTarget();
}
+
+ /**
+ * Telecom calls this method to inform the CallRedirectionService of the timeout waiting for
+ * it to complete its operation.
+ */
+ @Override
+ public void notifyTimeout() {
+ mHandler.obtainMessage(MSG_TIMEOUT).sendToTarget();
+ }
}
@Override
diff --git a/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl b/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl
index c1bc440..ce1938b 100644
--- a/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl
@@ -31,4 +31,6 @@
oneway interface ICallRedirectionService {
void placeCall(in ICallRedirectionAdapter adapter, in Uri handle,
in PhoneAccountHandle initialPhoneAccount, boolean allowInteractiveResponse);
+
+ void notifyTimeout();
}
diff --git a/telephony/OWNERS b/telephony/OWNERS
index 628c480..4df8a4b 100644
--- a/telephony/OWNERS
+++ b/telephony/OWNERS
@@ -4,13 +4,14 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
diff --git a/telephony/java/android/telephony/AccessNetworkUtils.java b/telephony/java/android/telephony/AccessNetworkUtils.java
index 6b82045..b5d97ab 100644
--- a/telephony/java/android/telephony/AccessNetworkUtils.java
+++ b/telephony/java/android/telephony/AccessNetworkUtils.java
@@ -567,6 +567,10 @@
*/
public static int getFrequencyFromNrArfcn(int nrArfcn) {
+ if (nrArfcn == PhysicalChannelConfig.CHANNEL_NUMBER_UNKNOWN) {
+ return PhysicalChannelConfig.FREQUENCY_UNKNOWN;
+ }
+
int globalKhz = 0;
int rangeOffset = 0;
int arfcnOffset = 0;
@@ -632,6 +636,10 @@
*/
public static int getFrequencyFromUarfcn(int band, int uarfcn, boolean isUplink) {
+ if (uarfcn == PhysicalChannelConfig.CHANNEL_NUMBER_UNKNOWN) {
+ return PhysicalChannelConfig.FREQUENCY_UNKNOWN;
+ }
+
int offsetKhz = 0;
for (UtranBandArfcnFrequency uarfcnFrequency : AccessNetworkConstants.
UtranBandArfcnFrequency.values()) {
@@ -702,6 +710,10 @@
*/
public static int getFrequencyFromArfcn(int band, int arfcn, boolean isUplink) {
+ if (arfcn == PhysicalChannelConfig.CHANNEL_NUMBER_UNKNOWN) {
+ return PhysicalChannelConfig.FREQUENCY_UNKNOWN;
+ }
+
int uplinkFrequencyFirst = 0;
int arfcnOffset = 0;
int downlinkOffset = 0;
diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.java b/telephony/java/android/telephony/PhysicalChannelConfig.java
index 8a4bb46..59eac6a 100644
--- a/telephony/java/android/telephony/PhysicalChannelConfig.java
+++ b/telephony/java/android/telephony/PhysicalChannelConfig.java
@@ -337,7 +337,8 @@
private void setUplinkFrequency() {
switch (mNetworkType){
case TelephonyManager.NETWORK_TYPE_NR:
- mUplinkFrequency = mDownlinkFrequency;
+ mUplinkFrequency = AccessNetworkUtils.getFrequencyFromNrArfcn(
+ mUplinkChannelNumber);
break;
case TelephonyManager.NETWORK_TYPE_LTE:
mUplinkFrequency = AccessNetworkUtils.getFrequencyFromEarfcn(
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java
index 2bbfdba..c86bedb 100644
--- a/telephony/java/android/telephony/SubscriptionInfo.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -575,6 +575,13 @@
/**
* @hide
*/
+ public void clearGroupUuid() {
+ this.mGroupUUID = null;
+ }
+
+ /**
+ * @hide
+ */
public List<String> getEhplmns() {
return mEhplmns == null ? Collections.emptyList() : Arrays.asList(mEhplmns);
}
diff --git a/telephony/java/android/telephony/mbms/IMbmsGroupCallSessionCallback.aidl b/telephony/java/android/telephony/mbms/IMbmsGroupCallSessionCallback.aidl
index 1a1c7f8..43273a4 100755
--- a/telephony/java/android/telephony/mbms/IMbmsGroupCallSessionCallback.aidl
+++ b/telephony/java/android/telephony/mbms/IMbmsGroupCallSessionCallback.aidl
@@ -25,6 +25,7 @@
{
void onError(int errorCode, String message);
+ @SuppressWarnings(value={"untyped-collection"})
void onAvailableSaisUpdated(in List currentSai, in List availableSais);
void onServiceInterfaceAvailable(String interfaceName, int index);
diff --git a/telephony/java/android/telephony/mbms/vendor/IMbmsGroupCallService.aidl b/telephony/java/android/telephony/mbms/vendor/IMbmsGroupCallService.aidl
index 44cc24a..6e139ac 100755
--- a/telephony/java/android/telephony/mbms/vendor/IMbmsGroupCallService.aidl
+++ b/telephony/java/android/telephony/mbms/vendor/IMbmsGroupCallService.aidl
@@ -29,9 +29,11 @@
void stopGroupCall(int subId, long tmgi);
+ @SuppressWarnings(value={"untyped-collection"})
void updateGroupCall(int subscriptionId, long tmgi, in List saiList,
in List frequencyList);
+ @SuppressWarnings(value={"untyped-collection"})
int startGroupCall(int subscriptionId, long tmgi, in List saiList,
in List frequencyList, IGroupCallCallback callback);
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 9b2f119..ae5f997 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1961,6 +1961,7 @@
/**
* Return the emergency number list from all the active subscriptions.
*/
+ @SuppressWarnings(value={"untyped-collection"})
Map getEmergencyNumberList(String callingPackage, String callingFeatureId);
/**
diff --git a/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java b/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
index 4ecca2d..cf56586 100644
--- a/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
+++ b/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
@@ -31,6 +31,8 @@
private static final String SYSTEM_SERVER_PROFILE =
"/data/misc/profiles/cur/0/android/primary.prof";
private static final boolean USE_PHENOTYPE = false;
+ private static final String DALVIK_VM_EXTRA_OPTS =
+ "-Xusejit:false -Xint -Xjitsaveprofilinginfo";
@Override
public void setDevice(ITestDevice testDevice) {
@@ -54,10 +56,10 @@
private String setProperty(String property, String value) throws Exception {
if (USE_PHENOTYPE) {
return mTestDevice.executeShellCommand(
- "device_config put runtime_native_boot " + property + " " + value);
+ String.format("device_config put runtime_native_boot %s '%s'", property, value));
} else {
return mTestDevice.executeShellCommand(
- "setprop dalvik.vm." + property + " " + value);
+ String.format("setprop dalvik.vm.%s '%s'", property, value));
}
}
@@ -69,6 +71,8 @@
assertTrue("profile boot class path not enabled: " + res, "true".equals(res));
res = getProperty("profilesystemserver");
assertTrue("profile system server not enabled: " + res, "true".equals(res));
+ res = getProperty("extra-opts");
+ assertTrue("extra options not set: " + res, DALVIK_VM_EXTRA_OPTS.equals(res));
}
private boolean forceSaveProfile(String pkg) throws Exception {
@@ -91,16 +95,20 @@
boolean profileBootClassPath = "true".equals(pbcp);
String pss = getProperty("profilesystemserver");
boolean profileSystemServer = "true".equals(pss);
- if (profileBootClassPath && profileSystemServer) {
+ String extraOpts = getProperty("extra-opts");
+ boolean extraOptsOk = DALVIK_VM_EXTRA_OPTS.equals(extraOpts);
+ if (profileBootClassPath && profileSystemServer && extraOptsOk) {
break;
}
if (i == numIterations) {
assertTrue("profile system server not enabled: " + pss, profileSystemServer);
assertTrue("profile boot class path not enabled: " + pbcp, profileBootClassPath);
+ assertTrue("extra options not set: " + extraOpts, extraOptsOk);
}
setProperty("profilebootclasspath", "true");
setProperty("profilesystemserver", "true");
+ setProperty("extra-opts", DALVIK_VM_EXTRA_OPTS);
Thread.sleep(1000);
}
@@ -114,12 +122,15 @@
boolean profileBootClassPath = "true".equals(pbcp);
String pss = getProperty("profilesystemserver");
boolean profileSystemServer = "true".equals(pss);
+ String extraOpts = getProperty("extra-opts");
+ boolean extraOptsOk = DALVIK_VM_EXTRA_OPTS.equals(extraOpts);
if (profileBootClassPath && profileSystemServer) {
break;
}
if (i == numIterations) {
assertTrue("profile system server not enabled: " + pss, profileSystemServer);
assertTrue("profile boot class path not enabled: " + pbcp, profileBootClassPath);
+ assertTrue("extra options not set: " + extraOpts, extraOptsOk);
}
Thread.sleep(1000);
}
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 672731c..899d268 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -319,12 +319,10 @@
// The second subtag can either be a script or a region code.
// If its size is 4, it's a script code, else it's a region code.
- bool hasRegion = false;
if (subtags[1].size() == 4) {
setScript(subtags[1]);
} else if (subtags[1].size() == 2 || subtags[1].size() == 3) {
setRegion(subtags[1]);
- hasRegion = true;
} else {
fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name %s\n", part.string());
return -1;
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 257e96b..b9de11b 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -2475,11 +2475,10 @@
{
if (accessorCookie != NULL && fmt != NULL) {
AccessorCookie* ac = (AccessorCookie*)accessorCookie;
- int retval=0;
char buf[1024];
va_list ap;
va_start(ap, fmt);
- retval = vsnprintf(buf, sizeof(buf), fmt, ap);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
ac->sourcePos.error("Error: %s (at '%s' with value '%s').\n",
buf, ac->attr.string(), ac->value.string());
diff --git a/tools/aapt2/SdkConstants.cpp b/tools/aapt2/SdkConstants.cpp
index 7546e41..ca1c1c2 100644
--- a/tools/aapt2/SdkConstants.cpp
+++ b/tools/aapt2/SdkConstants.cpp
@@ -26,9 +26,8 @@
namespace aapt {
static ApiVersion sDevelopmentSdkLevel = 10000;
-static const auto sDevelopmentSdkCodeNames = std::unordered_set<StringPiece>({
- "Q", "R", "S", "T"
-});
+static const auto sDevelopmentSdkCodeNames =
+ std::unordered_set<StringPiece>({"Q", "R", "S", "Tiramisu"});
static const std::vector<std::pair<uint16_t, ApiVersion>> sAttrIdMap = {
{0x021c, 1},