Merge "Fix the concurrency issue when 'linkToDeath' in AccountManagerService that leads to JE" into main
diff --git a/apct-tests/perftests/core/src/android/os/OWNERS b/apct-tests/perftests/core/src/android/os/OWNERS
index a1719c9..76ab303 100644
--- a/apct-tests/perftests/core/src/android/os/OWNERS
+++ b/apct-tests/perftests/core/src/android/os/OWNERS
@@ -1 +1,4 @@
-per-file PackageParsingPerfTest.kt = file:/services/core/java/com/android/server/pm/OWNERS
\ No newline at end of file
+per-file PackageParsingPerfTest.kt = file:/services/core/java/com/android/server/pm/OWNERS
+
+# Bug component: 345036
+per-file VibratorPerfTest.java = file:/services/core/java/com/android/server/vibrator/OWNERS
\ No newline at end of file
diff --git a/api/Android.bp b/api/Android.bp
index f40f0c9..6aef5ff 100644
--- a/api/Android.bp
+++ b/api/Android.bp
@@ -60,14 +60,14 @@
metalava_cmd = "$(location metalava)"
// Silence reflection warnings. See b/168689341
metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED "
-metalava_cmd += " --quiet --no-banner --format=v2 "
+metalava_cmd += " --quiet "
genrule {
name: "current-api-xml",
tools: ["metalava"],
srcs: [":frameworks-base-api-current.txt"],
out: ["current.api"],
- cmd: metalava_cmd + "-convert2xmlnostrip $(in) $(out)",
+ cmd: metalava_cmd + "signature-to-jdiff $(in) $(out)",
visibility: ["//visibility:public"],
}
diff --git a/core/java/android/content/om/IOverlayManager.aidl b/core/java/android/content/om/IOverlayManager.aidl
index a0f3d7a..122ab48 100644
--- a/core/java/android/content/om/IOverlayManager.aidl
+++ b/core/java/android/content/om/IOverlayManager.aidl
@@ -190,4 +190,15 @@
* @throws SecurityException if the transaction failed
*/
void commit(in OverlayManagerTransaction transaction);
+
+ /**
+ * Returns a String of a list of partitions from low priority to high.
+ */
+ String getPartitionOrder();
+
+ /**
+ * Returns a boolean which represent whether the partition list is sorted by default.
+ * If not then it should be sorted by /product/overlay/partition_order.xml.
+ */
+ boolean isDefaultPartitionOrder();
}
diff --git a/core/java/android/os/Handler.java b/core/java/android/os/Handler.java
index 834867c..55b7a7d 100644
--- a/core/java/android/os/Handler.java
+++ b/core/java/android/os/Handler.java
@@ -119,7 +119,7 @@
* crashes (if a handler is sometimes created on a thread without a Looper active), or race
* conditions, where the thread a handler is associated with is not what the author
* anticipated. Instead, use an {@link java.util.concurrent.Executor} or specify the Looper
- * explicitly, using {@link Looper#getMainLooper}, {link android.view.View#getHandler}, or
+ * explicitly, using {@link Looper#getMainLooper}, {@link android.view.View#getHandler}, or
* similar. If the implicit thread local behavior is required for compatibility, use
* {@code new Handler(Looper.myLooper())} to make it clear to readers.
*
@@ -144,7 +144,7 @@
* crashes (if a handler is sometimes created on a thread without a Looper active), or race
* conditions, where the thread a handler is associated with is not what the author
* anticipated. Instead, use an {@link java.util.concurrent.Executor} or specify the Looper
- * explicitly, using {@link Looper#getMainLooper}, {link android.view.View#getHandler}, or
+ * explicitly, using {@link Looper#getMainLooper}, {@link android.view.View#getHandler}, or
* similar. If the implicit thread local behavior is required for compatibility, use
* {@code new Handler(Looper.myLooper(), callback)} to make it clear to readers.
*/
diff --git a/core/java/android/print/OWNERS b/core/java/android/print/OWNERS
index 28a24203..0809de2 100644
--- a/core/java/android/print/OWNERS
+++ b/core/java/android/print/OWNERS
@@ -1,4 +1,4 @@
# Bug component: 47273
-svetoslavganov@android.com
-svetoslavganov@google.com
+anothermark@google.com
+kumarashishg@google.com
diff --git a/core/java/android/print/pdf/OWNERS b/core/java/android/print/pdf/OWNERS
deleted file mode 100644
index 28a24203..0000000
--- a/core/java/android/print/pdf/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-# Bug component: 47273
-
-svetoslavganov@android.com
-svetoslavganov@google.com
diff --git a/core/java/android/printservice/OWNERS b/core/java/android/printservice/OWNERS
index 28a24203..0809de2 100644
--- a/core/java/android/printservice/OWNERS
+++ b/core/java/android/printservice/OWNERS
@@ -1,4 +1,4 @@
# Bug component: 47273
-svetoslavganov@android.com
-svetoslavganov@google.com
+anothermark@google.com
+kumarashishg@google.com
diff --git a/core/java/android/printservice/recommendation/OWNERS b/core/java/android/printservice/recommendation/OWNERS
deleted file mode 100644
index 28a24203..0000000
--- a/core/java/android/printservice/recommendation/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-# Bug component: 47273
-
-svetoslavganov@android.com
-svetoslavganov@google.com
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 483c39d..f50dc8d 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -21206,6 +21206,8 @@
mCurrentAnimation = null;
if ((mViewFlags & TOOLTIP) == TOOLTIP) {
+ removeCallbacks(mTooltipInfo.mShowTooltipRunnable);
+ removeCallbacks(mTooltipInfo.mHideTooltipRunnable);
hideTooltip();
}
diff --git a/core/java/com/android/internal/content/om/OverlayConfig.java b/core/java/com/android/internal/content/om/OverlayConfig.java
index fc0943b..e8bdd1d 100644
--- a/core/java/com/android/internal/content/om/OverlayConfig.java
+++ b/core/java/com/android/internal/content/om/OverlayConfig.java
@@ -34,8 +34,15 @@
import com.android.internal.util.Preconditions;
import com.android.internal.util.function.TriConsumer;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -46,6 +53,10 @@
import java.util.Map;
import java.util.function.Supplier;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
/**
* Responsible for reading overlay configuration files and handling queries of overlay mutability,
* default-enabled state, and priority.
@@ -61,6 +72,8 @@
@VisibleForTesting
public static final int DEFAULT_PRIORITY = Integer.MAX_VALUE;
+ public static final String PARTITION_ORDER_FILE_PATH = "/product/overlay/partition_order.xml";
+
@VisibleForTesting
public static final class Configuration {
@Nullable
@@ -119,6 +132,10 @@
// Singleton instance only assigned in system server
private static OverlayConfig sInstance;
+ private final String mPartitionOrder;
+
+ private final boolean mIsDefaultPartitionOrder;
+
@VisibleForTesting
public OverlayConfig(@Nullable File rootDirectory,
@Nullable Supplier<OverlayScanner> scannerFactory,
@@ -137,6 +154,8 @@
new File(rootDirectory, p.getNonConicalFolder().getPath()),
p)));
}
+ mIsDefaultPartitionOrder = !sortPartitions(PARTITION_ORDER_FILE_PATH, partitions);
+ mPartitionOrder = generatePartitionOrderString(partitions);
ArrayMap<Integer, List<String>> activeApexesPerPartition = getActiveApexes(partitions);
@@ -198,6 +217,96 @@
}
}
+ private static String generatePartitionOrderString(List<OverlayPartition> partitions) {
+ if (partitions == null || partitions.size() == 0) {
+ return "";
+ }
+ StringBuilder partitionOrder = new StringBuilder();
+ partitionOrder.append(partitions.get(0).getName());
+ for (int i = 1; i < partitions.size(); i++) {
+ partitionOrder.append(", ").append(partitions.get(i).getName());
+ }
+ return partitionOrder.toString();
+ }
+
+ private static boolean parseAndValidatePartitionsOrderXml(String partitionOrderFilePath,
+ Map<String, Integer> orderMap, List<OverlayPartition> partitions) {
+ try {
+ File file = new File(partitionOrderFilePath);
+ if (!file.exists()) {
+ Log.w(TAG, "partition_order.xml does not exist.");
+ return false;
+ }
+ var dbFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
+ Document doc = dBuilder.parse(file);
+ doc.getDocumentElement().normalize();
+
+ Element root = doc.getDocumentElement();
+ if (!root.getNodeName().equals("partition-order")) {
+ Log.w(TAG, "Invalid partition_order.xml, "
+ + "xml root element is not partition-order");
+ return false;
+ }
+
+ NodeList partitionList = doc.getElementsByTagName("partition");
+ for (int order = 0; order < partitionList.getLength(); order++) {
+ Node partitionNode = partitionList.item(order);
+ if (partitionNode.getNodeType() == Node.ELEMENT_NODE) {
+ Element partitionElement = (Element) partitionNode;
+ String partitionName = partitionElement.getAttribute("name");
+ if (orderMap.containsKey(partitionName)) {
+ Log.w(TAG, "Invalid partition_order.xml, "
+ + "it has duplicate partition: " + partitionName);
+ return false;
+ }
+ orderMap.put(partitionName, order);
+ }
+ }
+
+ if (orderMap.keySet().size() != partitions.size()) {
+ Log.w(TAG, "Invalid partition_order.xml, partition_order.xml has "
+ + orderMap.keySet().size() + " partitions, "
+ + "which is different from SYSTEM_PARTITIONS");
+ return false;
+ }
+ for (int i = 0; i < partitions.size(); i++) {
+ if (!orderMap.keySet().contains(partitions.get(i).getName())) {
+ Log.w(TAG, "Invalid Parsing partition_order.xml, "
+ + "partition_order.xml does not have partition: "
+ + partitions.get(i).getName());
+ return false;
+ }
+ }
+ } catch (ParserConfigurationException | SAXException | IOException e) {
+ Log.w(TAG, "Parsing or validating partition_order.xml failed, "
+ + "exception thrown: " + e.getMessage());
+ return false;
+ }
+ Log.i(TAG, "Sorting partitions in the specified order from partitions_order.xml");
+ return true;
+ }
+
+ /**
+ * Sort partitions by order in partition_order.xml if the file exists.
+ *
+ * @hide
+ */
+ @VisibleForTesting
+ public static boolean sortPartitions(String partitionOrderFilePath,
+ List<OverlayPartition> partitions) {
+ Map<String, Integer> orderMap = new HashMap<>();
+ if (!parseAndValidatePartitionsOrderXml(partitionOrderFilePath, orderMap, partitions)) {
+ return false;
+ }
+
+ Comparator<OverlayPartition> partitionComparator = Comparator.comparingInt(
+ o -> orderMap.get(o.getName()));
+ Collections.sort(partitions, partitionComparator);
+
+ return true;
+ }
+
/**
* Creates an instance of OverlayConfig for use in the zygote process.
* This instance will not include information of static overlays existing outside of a partition
@@ -476,4 +585,19 @@
*/
private static native String[] createIdmap(@NonNull String targetPath,
@NonNull String[] overlayPath, @NonNull String[] policies, boolean enforceOverlayable);
+
+ /**
+ * @hide
+ */
+ public boolean isDefaultPartitionOrder() {
+ return mIsDefaultPartitionOrder;
+ }
+
+ /**
+ * @hide
+ */
+ public String getPartitionOrder() {
+ return mPartitionOrder;
+ }
+
}
diff --git a/core/java/com/android/internal/content/om/OverlayConfigParser.java b/core/java/com/android/internal/content/om/OverlayConfigParser.java
index 0ab7b3d..5a86b93 100644
--- a/core/java/com/android/internal/content/om/OverlayConfigParser.java
+++ b/core/java/com/android/internal/content/om/OverlayConfigParser.java
@@ -27,6 +27,7 @@
import android.util.Log;
import android.util.Xml;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.content.om.OverlayScanner.ParsedOverlayInfo;
import com.android.internal.util.Preconditions;
import com.android.internal.util.XmlUtils;
@@ -53,8 +54,11 @@
*
* @see #parseOverlay(File, XmlPullParser, OverlayScanner, ParsingContext)
* @see #parseMerge(File, XmlPullParser, OverlayScanner, ParsingContext)
+ *
+ * @hide
**/
-final class OverlayConfigParser {
+@VisibleForTesting
+public final class OverlayConfigParser {
// Default values for overlay configurations.
static final boolean DEFAULT_ENABLED_STATE = false;
@@ -115,7 +119,11 @@
}
}
- static class OverlayPartition extends SystemPartition {
+ /**
+ * @hide
+ **/
+ @VisibleForTesting
+ public static class OverlayPartition extends SystemPartition {
// Policies passed to idmap2 during idmap creation.
// Keep partition policy constants in sync with f/b/cmds/idmap2/include/idmap2/Policies.h.
static final String POLICY_ODM = "odm";
@@ -128,7 +136,11 @@
@NonNull
public final String policy;
- OverlayPartition(@NonNull SystemPartition partition) {
+ /**
+ * @hide
+ **/
+ @VisibleForTesting
+ public OverlayPartition(@NonNull SystemPartition partition) {
super(partition);
this.policy = policyForPartition(partition);
}
diff --git a/core/proto/android/os/system_properties.proto b/core/proto/android/os/system_properties.proto
index 3cedba0..5a3539a 100644
--- a/core/proto/android/os/system_properties.proto
+++ b/core/proto/android/os/system_properties.proto
@@ -172,7 +172,7 @@
optional Status tombstoned = 29;
optional Status ueventd = 30;
optional Status update_engine = 31;
- optional Status update_verifier_nonencrypted = 32;
+ optional Status update_verifier = 32;
optional Status virtual_touchpad = 33;
optional Status vndservicemanager = 34;
optional Status vold = 35;
diff --git a/core/tests/coretests/src/com/android/internal/content/res/OverlayConfigTest.java b/core/tests/coretests/src/com/android/internal/content/res/OverlayConfigTest.java
index 0f30cfe..246a1e7 100644
--- a/core/tests/coretests/src/com/android/internal/content/res/OverlayConfigTest.java
+++ b/core/tests/coretests/src/com/android/internal/content/res/OverlayConfigTest.java
@@ -22,6 +22,7 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import android.content.pm.PackagePartitions;
import android.os.FileUtils;
import android.os.SystemProperties;
import android.platform.test.annotations.Presubmit;
@@ -32,6 +33,7 @@
import com.android.frameworks.coretests.R;
import com.android.internal.content.om.OverlayConfig;
import com.android.internal.content.om.OverlayConfig.IdmapInvocation;
+import com.android.internal.content.om.OverlayConfigParser.OverlayPartition;
import com.android.internal.content.om.OverlayScanner;
import org.junit.Rule;
@@ -46,6 +48,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.List;
@Presubmit
@RunWith(AndroidJUnit4.class)
@@ -88,6 +91,17 @@
assertEquals(configIndex, config.configIndex);
}
+ private String generatePartitionOrderString(List<OverlayPartition> partitions) {
+ StringBuilder partitionOrder = new StringBuilder();
+ for (int i = 0; i < partitions.size(); i++) {
+ partitionOrder.append(partitions.get(i).getName());
+ if (i < partitions.size() - 1) {
+ partitionOrder.append(", ");
+ }
+ }
+ return partitionOrder.toString();
+ }
+
@Test
public void testImmutableAfterNonImmutableFails() throws IOException {
mExpectedException.expect(IllegalStateException.class);
@@ -685,4 +699,122 @@
OverlayConfig.Configuration o3 = overlayConfig.getConfiguration("three");
assertNotNull(o3);
}
+
+ @Test
+ public void testSortPartitionsWithoutXml() throws IOException {
+ ArrayList<OverlayPartition> partitions = new ArrayList<>(
+ PackagePartitions.getOrderedPartitions(OverlayPartition::new));
+
+ final OverlayConfig overlayConfig = createConfigImpl();
+ String partitionOrderFilePath = String.format("%s/%s", mTestFolder.getRoot(),
+ "/product/overlay/partition_order.xml");
+ assertEquals(false, overlayConfig.sortPartitions(partitionOrderFilePath, partitions));
+ assertEquals("system, vendor, odm, oem, product, system_ext",
+ generatePartitionOrderString(partitions));
+ }
+
+ @Test
+ public void testSortPartitionsWithInvalidXmlRootElement() throws IOException {
+ ArrayList<OverlayPartition> partitions = new ArrayList<>(
+ PackagePartitions.getOrderedPartitions(OverlayPartition::new));
+ createFile("/product/overlay/partition_order.xml",
+ "<partition-list>\n"
+ + " <partition name=\"system_ext\"/>\n"
+ + " <partition name=\"vendor\"/>\n"
+ + " <partition name=\"oem\"/>\n"
+ + " <partition name=\"odm\"/>\n"
+ + " <partition name=\"product\"/>\n"
+ + " <partition name=\"system\"/>\n"
+ + "</partition-list>\n");
+ final OverlayConfig overlayConfig = createConfigImpl();
+ String partitionOrderFilePath = String.format("%s/%s", mTestFolder.getRoot(),
+ "/product/overlay/partition_order.xml");
+ assertEquals(false, overlayConfig.sortPartitions(partitionOrderFilePath, partitions));
+ assertEquals("system, vendor, odm, oem, product, system_ext",
+ generatePartitionOrderString(partitions));
+ }
+
+ @Test
+ public void testSortPartitionsWithInvalidPartition() throws IOException {
+ ArrayList<OverlayPartition> partitions = new ArrayList<>(
+ PackagePartitions.getOrderedPartitions(OverlayPartition::new));
+ createFile("/product/overlay/partition_order.xml",
+ "<partition-order>\n"
+ + " <partition name=\"INVALID\"/>\n"
+ + " <partition name=\"vendor\"/>\n"
+ + " <partition name=\"oem\"/>\n"
+ + " <partition name=\"odm\"/>\n"
+ + " <partition name=\"product\"/>\n"
+ + " <partition name=\"system\"/>\n"
+ + "</partition-order>\n");
+ final OverlayConfig overlayConfig = createConfigImpl();
+ String partitionOrderFilePath = String.format("%s/%s", mTestFolder.getRoot(),
+ "/product/overlay/partition_order.xml");
+ assertEquals(false, overlayConfig.sortPartitions(partitionOrderFilePath, partitions));
+ assertEquals("system, vendor, odm, oem, product, system_ext",
+ generatePartitionOrderString(partitions));
+ }
+
+ @Test
+ public void testSortPartitionsWithDuplicatePartition() throws IOException {
+ ArrayList<OverlayPartition> partitions = new ArrayList<>(
+ PackagePartitions.getOrderedPartitions(OverlayPartition::new));
+ createFile("/product/overlay/partition_order.xml",
+ "<partition-order>\n"
+ + " <partition name=\"system_ext\"/>\n"
+ + " <partition name=\"system\"/>\n"
+ + " <partition name=\"vendor\"/>\n"
+ + " <partition name=\"oem\"/>\n"
+ + " <partition name=\"odm\"/>\n"
+ + " <partition name=\"product\"/>\n"
+ + " <partition name=\"system\"/>\n"
+ + "</partition-order>\n");
+ final OverlayConfig overlayConfig = createConfigImpl();
+ String partitionOrderFilePath = String.format("%s/%s", mTestFolder.getRoot(),
+ "/product/overlay/partition_order.xml");
+ assertEquals(false, overlayConfig.sortPartitions(partitionOrderFilePath, partitions));
+ assertEquals("system, vendor, odm, oem, product, system_ext",
+ generatePartitionOrderString(partitions));
+ }
+
+ @Test
+ public void testSortPartitionsWithMissingPartition() throws IOException {
+ ArrayList<OverlayPartition> partitions = new ArrayList<>(
+ PackagePartitions.getOrderedPartitions(OverlayPartition::new));
+ createFile("/product/overlay/partition_order.xml",
+ "<partition-order>\n"
+ + " <partition name=\"vendor\"/>\n"
+ + " <partition name=\"oem\"/>\n"
+ + " <partition name=\"odm\"/>\n"
+ + " <partition name=\"product\"/>\n"
+ + " <partition name=\"system\"/>\n"
+ + "</partition-order>\n");
+ final OverlayConfig overlayConfig = createConfigImpl();
+ String partitionOrderFilePath = String.format("%s/%s", mTestFolder.getRoot(),
+ "/product/overlay/partition_order.xml");
+ assertEquals(false, overlayConfig.sortPartitions(partitionOrderFilePath, partitions));
+ assertEquals("system, vendor, odm, oem, product, system_ext",
+ generatePartitionOrderString(partitions));
+ }
+
+ @Test
+ public void testSortPartitionsWithCorrectPartitionOrderXml() throws IOException {
+ ArrayList<OverlayPartition> partitions = new ArrayList<>(
+ PackagePartitions.getOrderedPartitions(OverlayPartition::new));
+ createFile("/product/overlay/partition_order.xml",
+ "<partition-order>\n"
+ + " <partition name=\"system_ext\"/>\n"
+ + " <partition name=\"vendor\"/>\n"
+ + " <partition name=\"oem\"/>\n"
+ + " <partition name=\"odm\"/>\n"
+ + " <partition name=\"product\"/>\n"
+ + " <partition name=\"system\"/>\n"
+ + "</partition-order>\n");
+ final OverlayConfig overlayConfig = createConfigImpl();
+ String partitionOrderFilePath = String.format("%s/%s", mTestFolder.getRoot(),
+ "/product/overlay/partition_order.xml");
+ assertEquals(true, overlayConfig.sortPartitions(partitionOrderFilePath, partitions));
+ assertEquals("system_ext, vendor, oem, odm, product, system",
+ generatePartitionOrderString(partitions));
+ }
}
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java
index 2b1515a..3bb2564 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java
@@ -18,7 +18,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.content.pm.PackageManager;
import android.hardware.security.keymint.KeyParameter;
import android.security.keymaster.KeymasterDefs;
import android.security.keystore.KeyProperties;
@@ -300,12 +299,6 @@
return false;
}
- private static boolean hasKeyMintV2() {
- PackageManager pm = android.app.AppGlobals.getInitialApplication().getPackageManager();
- return pm.hasSystemFeature(PackageManager.FEATURE_HARDWARE_KEYSTORE, 200)
- && !pm.hasSystemFeature(PackageManager.FEATURE_HARDWARE_KEYSTORE, 300);
- }
-
@Override
protected final void addAlgorithmSpecificParametersToBegin(
@NonNull List<KeyParameter> parameters, Authorization[] keyCharacteristics) {
@@ -314,12 +307,11 @@
KeymasterDefs.KM_TAG_DIGEST, mKeymasterDigest
));
// Only add the KM_TAG_RSA_OAEP_MGF_DIGEST tag to begin() if the MGF Digest is
- // present in the key properties or KeyMint version is 200. Keys generated prior to
- // Android 14 did not have this tag (Keystore didn't add it) and hence not present in
- // imported key as well, so specifying any MGF digest tag would cause a begin()
- // operation (on an Android 14 device) to fail (with a key that was generated on
- // Android 13 or below).
- if (isMgfDigestTagPresentInKeyProperties(keyCharacteristics) || hasKeyMintV2()) {
+ // present in the key properties. Keys generated prior to Android 14 did not have
+ // this tag (Keystore didn't add it) so specifying any MGF digest tag would cause
+ // a begin() operation (on an Android 14 device) to fail (with a key that was generated
+ // on Android 13 or below).
+ if (isMgfDigestTagPresentInKeyProperties(keyCharacteristics)) {
parameters.add(KeyStore2ParameterUtils.makeEnum(
KeymasterDefs.KM_TAG_RSA_OAEP_MGF_DIGEST, mKeymasterMgf1Digest
));
diff --git a/libs/WindowManager/Shell/Android.bp b/libs/WindowManager/Shell/Android.bp
index 66b02ef..c00a749 100644
--- a/libs/WindowManager/Shell/Android.bp
+++ b/libs/WindowManager/Shell/Android.bp
@@ -161,7 +161,7 @@
// *.kt sources are inside a filegroup.
"kotlin-annotations",
],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
manifest: "AndroidManifest.xml",
plugins: ["dagger2-compiler"],
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt
index d5d072a..122dcbb 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/FloatingContentCoordinator.kt
@@ -94,7 +94,6 @@
* non-overlapping.
* @return The new bounds for this content.
*/
- @JvmDefault
fun calculateNewBoundsOnOverlap(
overlappingContentBounds: Rect,
otherContentBounds: List<Rect>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
index 47342c9..935a588 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
@@ -173,7 +173,6 @@
/**
* Called when the active tasks change in desktop mode.
*/
- @JvmDefault
fun onActiveTasksChanged() {}
}
@@ -184,7 +183,6 @@
/**
* Called when the desktop starts or stops showing freeform tasks.
*/
- @JvmDefault
fun onVisibilityChanged(hasVisibleFreeformTasks: Boolean) {}
}
}
diff --git a/libs/WindowManager/Shell/tests/unittest/Android.bp b/libs/WindowManager/Shell/tests/unittest/Android.bp
index 2ac1dc0..64bb481 100644
--- a/libs/WindowManager/Shell/tests/unittest/Android.bp
+++ b/libs/WindowManager/Shell/tests/unittest/Android.bp
@@ -61,7 +61,7 @@
"libstaticjvmtiagent",
],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
plugins: ["dagger2-compiler"],
diff --git a/media/java/android/media/OWNERS b/media/java/android/media/OWNERS
index 6d6a9f8..bbe5e06 100644
--- a/media/java/android/media/OWNERS
+++ b/media/java/android/media/OWNERS
@@ -10,5 +10,8 @@
per-file *Image* = file:/graphics/java/android/graphics/OWNERS
+per-file ExifInterface.java,ExifInterfaceUtils.java,IMediaHTTPConnection.aidl,IMediaHTTPService.aidl,JetPlayer.java,MediaDataSource.java,MediaExtractor.java,MediaHTTPConnection.java,MediaHTTPService.java,MediaPlayer.java=set noparent
+per-file ExifInterface.java,ExifInterfaceUtils.java,IMediaHTTPConnection.aidl,IMediaHTTPService.aidl,JetPlayer.java,MediaDataSource.java,MediaExtractor.java,MediaHTTPConnection.java,MediaHTTPService.java,MediaPlayer.java=file:platform/frameworks/av:/media/janitors/media_solutions_OWNERS
+
# Haptics team also works on Ringtone
per-file *Ringtone* = file:/services/core/java/com/android/server/vibrator/OWNERS
diff --git a/media/jni/OWNERS b/media/jni/OWNERS
index 96894d1..e12d828 100644
--- a/media/jni/OWNERS
+++ b/media/jni/OWNERS
@@ -3,3 +3,6 @@
# extra for TV related files
per-file android_media_tv_*=hgchen@google.com,quxiangfang@google.com
+
+per-file android_media_JetPlayer.cpp,android_media_MediaDataSource.cpp,android_media_MediaDataSource.h,android_media_MediaPlayer.java=set noparent
+per-file android_media_JetPlayer.cpp,android_media_MediaDataSource.cpp,android_media_MediaDataSource.h,android_media_MediaPlayer.java=file:platform/frameworks/av:/media/janitors/media_solutions_OWNERS
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index b878bcf5..53c0266 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -2491,7 +2491,7 @@
return;
}
auto cryptoInfo =
- cryptoInfoObj ? NativeCryptoInfo{size} : NativeCryptoInfo{env, cryptoInfoObj};
+ cryptoInfoObj ? NativeCryptoInfo{env, cryptoInfoObj} : NativeCryptoInfo{size};
if (env->ExceptionCheck()) {
// Creation of cryptoInfo failed. Let the exception bubble up.
return;
diff --git a/packages/EasterEgg/Android.bp b/packages/EasterEgg/Android.bp
index e88410c..6d4e801 100644
--- a/packages/EasterEgg/Android.bp
+++ b/packages/EasterEgg/Android.bp
@@ -26,7 +26,10 @@
android_app {
// the build system in pi-dev can't quite handle R.java in kt
// so we will have a mix of java and kotlin files
- srcs: ["src/**/*.java", "src/**/*.kt"],
+ srcs: [
+ "src/**/*.java",
+ "src/**/*.kt",
+ ],
resource_dirs: ["res"],
@@ -39,16 +42,16 @@
proguard_flags_files: ["proguard.flags"],
},
- static_libs: [
- "androidx.core_core",
- "androidx.recyclerview_recyclerview",
+ static_libs: [
+ "androidx.core_core",
+ "androidx.recyclerview_recyclerview",
"androidx.annotation_annotation",
- "kotlinx-coroutines-android",
- "kotlinx-coroutines-core",
- //"kotlinx-coroutines-reactive",
- ],
+ "kotlinx-coroutines-android",
+ "kotlinx-coroutines-core",
+ //"kotlinx-coroutines-reactive",
+ ],
manifest: "AndroidManifest.xml",
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
}
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index eb5a15f..eb30ad9 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -180,7 +180,7 @@
],
manifest: "AndroidManifest.xml",
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
plugins: ["dagger2-compiler"],
@@ -341,7 +341,7 @@
"android.test.base",
"android.test.mock",
],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
aaptflags: [
"--extra-packages",
"com.android.systemui",
@@ -457,7 +457,7 @@
certificate: "platform",
privileged: true,
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
dxflags: ["--multi-dex"],
required: [
diff --git a/packages/SystemUI/OWNERS b/packages/SystemUI/OWNERS
index 811b409..306031d 100644
--- a/packages/SystemUI/OWNERS
+++ b/packages/SystemUI/OWNERS
@@ -23,6 +23,7 @@
brycelee@google.com
brzezinski@google.com
caitlinshk@google.com
+cameronyee@google.com
chandruis@google.com
chrisgollner@google.com
cinek@google.com
@@ -44,6 +45,7 @@
jjaggi@google.com
jonmiranda@google.com
joshtrask@google.com
+juansmartinez@google.com
juliacr@google.com
juliatuttle@google.com
justinkoh@google.com
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
index 296c2ae..32085ce 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
@@ -302,10 +302,9 @@
interface Callback {
/** Whether we are currently on the keyguard or not. */
- @JvmDefault fun isOnKeyguard(): Boolean = false
+ fun isOnKeyguard(): Boolean = false
/** Hide the keyguard and animate using [runner]. */
- @JvmDefault
fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner) {
throw UnsupportedOperationException()
}
@@ -316,16 +315,16 @@
interface Listener {
/** Called when an activity launch animation started. */
- @JvmDefault fun onLaunchAnimationStart() {}
+ fun onLaunchAnimationStart() {}
/**
* Called when an activity launch animation is finished. This will be called if and only if
* [onLaunchAnimationStart] was called earlier.
*/
- @JvmDefault fun onLaunchAnimationEnd() {}
+ fun onLaunchAnimationEnd() {}
/** Called when an activity launch animation made progress. */
- @JvmDefault fun onLaunchAnimationProgress(linearProgress: Float) {}
+ fun onLaunchAnimationProgress(linearProgress: Float) {}
}
/**
diff --git a/packages/SystemUI/compose/core/tests/Android.bp b/packages/SystemUI/compose/core/tests/Android.bp
index 6119e96..06d94ac 100644
--- a/packages/SystemUI/compose/core/tests/Android.bp
+++ b/packages/SystemUI/compose/core/tests/Android.bp
@@ -44,5 +44,5 @@
"androidx.compose.ui_ui-test-manifest",
],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
}
diff --git a/packages/SystemUI/compose/features/tests/Android.bp b/packages/SystemUI/compose/features/tests/Android.bp
index ff534bd..c7c9140 100644
--- a/packages/SystemUI/compose/features/tests/Android.bp
+++ b/packages/SystemUI/compose/features/tests/Android.bp
@@ -44,5 +44,5 @@
"androidx.compose.ui_ui-test-manifest",
],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
}
diff --git a/packages/SystemUI/customization/Android.bp b/packages/SystemUI/customization/Android.bp
index dc450bb..fc37b355 100644
--- a/packages/SystemUI/customization/Android.bp
+++ b/packages/SystemUI/customization/Android.bp
@@ -48,5 +48,5 @@
],
min_sdk_version: "current",
plugins: ["dagger2-compiler"],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
}
diff --git a/packages/SystemUI/shared/Android.bp b/packages/SystemUI/shared/Android.bp
index 28e786b..ca30e15 100644
--- a/packages/SystemUI/shared/Android.bp
+++ b/packages/SystemUI/shared/Android.bp
@@ -65,7 +65,7 @@
],
min_sdk_version: "current",
plugins: ["dagger2-compiler"],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
}
java_library {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
index 90562dc..7992a34 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
@@ -167,7 +167,6 @@
* for the canned animation (if applicable) so interested parties can sync with it. If no
* canned animation is playing, these are both 0.
*/
- @JvmDefault
fun onUnlockAnimationStarted(
playingCannedAnimation: Boolean,
fromWakeAndUnlock: Boolean,
@@ -180,7 +179,6 @@
* The keyguard is no longer visible in this state and the app/launcher behind the keyguard
* is now completely visible.
*/
- @JvmDefault
fun onUnlockAnimationFinished() {}
}
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt
index d652889..d949a2a 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyConfig.kt
@@ -145,13 +145,10 @@
}
interface Callback {
- @JvmDefault
fun onFlagMicCameraChanged(flag: Boolean) {}
- @JvmDefault
fun onFlagLocationChanged(flag: Boolean) {}
- @JvmDefault
fun onFlagMediaProjectionChanged(flag: Boolean) {}
}
}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
index a676150..eb8ef9b 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
@@ -216,7 +216,6 @@
interface Callback : PrivacyConfig.Callback {
fun onPrivacyItemsChanged(privacyItems: List<PrivacyItem>)
- @JvmDefault
fun onFlagAllChanged(flag: Boolean) {}
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt b/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt
index bb7f721..468a75d 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt
+++ b/packages/SystemUI/src/com/android/systemui/settings/DisplayTracker.kt
@@ -52,12 +52,12 @@
interface Callback {
/** Notifies that a display has been added. */
- @JvmDefault fun onDisplayAdded(displayId: Int) {}
+ fun onDisplayAdded(displayId: Int) {}
/** Notifies that a display has been removed. */
- @JvmDefault fun onDisplayRemoved(displayId: Int) {}
+ fun onDisplayRemoved(displayId: Int) {}
/** Notifies a display has been changed */
- @JvmDefault fun onDisplayChanged(displayId: Int) {}
+ fun onDisplayChanged(displayId: Int) {}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt b/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt
index 33a3125..93a3e90 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt
+++ b/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt
@@ -71,7 +71,6 @@
* Same as {@link onUserChanging(Int, Context, CountDownLatch)} but the latch will be
* auto-decremented after the completion of this method.
*/
- @JvmDefault
fun onUserChanging(newUser: Int, userContext: Context) {}
/**
@@ -82,7 +81,6 @@
* user switch duration. When overriding this method, countDown() MUST be called on the
* latch once execution is complete.
*/
- @JvmDefault
fun onUserChanging(newUser: Int, userContext: Context, latch: CountDownLatch) {
onUserChanging(newUser, userContext)
latch.countDown()
@@ -93,13 +91,11 @@
* Override this method to run things after the screen is unfrozen for the user switch.
* Please see {@link #onUserChanging} if you need to hide jank.
*/
- @JvmDefault
fun onUserChanged(newUser: Int, userContext: Context) {}
/**
* Notifies that the current user's profiles have changed.
*/
- @JvmDefault
fun onProfilesChanged(profiles: List<@JvmSuppressWildcards UserInfo>) {}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt
index 56bb1a6..5804040 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt
@@ -29,12 +29,12 @@
interface ShadeStateEventsListener {
/** Invoked when the notification panel starts or stops collapsing. */
- @JvmDefault fun onPanelCollapsingChanged(isCollapsing: Boolean) {}
+ fun onPanelCollapsingChanged(isCollapsing: Boolean) {}
/**
* Invoked when the notification panel starts or stops launching an [android.app.Activity].
*/
- @JvmDefault fun onLaunchingActivityChanged(isLaunchingActivity: Boolean) {}
+ fun onLaunchingActivityChanged(isLaunchingActivity: Boolean) {}
/**
* Invoked when the "expand immediate" attribute changes.
@@ -45,6 +45,6 @@
* Another example is when full QS is showing, and we swipe up from the bottom. Instead of
* going to QQS, the panel fully collapses.
*/
- @JvmDefault fun onExpandImmediateChanged(isExpandImmediateEnabled: Boolean) {}
+ fun onExpandImmediateChanged(isExpandImmediateEnabled: Boolean) {}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
index 8dc7842..a23e3f29 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
@@ -546,7 +546,6 @@
*/
fun onWallpaperZoomOutChanged(zoomOut: Float)
- @JvmDefault
fun onBlurRadiusChanged(blurRadius: Int) {}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt
index 599beec..6be407a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt
@@ -29,7 +29,6 @@
*
* @param wifiIndicators a box type containing enough information to properly draw a Wi-Fi icon
*/
- @JvmDefault
fun setWifiIndicators(wifiIndicators: WifiIndicators) {}
/**
@@ -42,7 +41,6 @@
* NOTE: phones can have multiple subscriptions, so this [mobileDataIndicators] object should be
* indexed based on its [subId][MobileDataIndicators.subId]
*/
- @JvmDefault
fun setMobileDataIndicators(mobileDataIndicators: MobileDataIndicators) {}
/**
@@ -51,7 +49,6 @@
*
* @param subs a [SubscriptionInfo] for each subscription that we know about
*/
- @JvmDefault
fun setSubs(subs: List<@JvmSuppressWildcards SubscriptionInfo>) {}
/**
@@ -63,7 +60,6 @@
* @param show whether or not to show a "no sim" view
* @param simDetected whether any SIM is detected or not
*/
- @JvmDefault
fun setNoSims(show: Boolean, simDetected: Boolean) {}
/**
@@ -72,7 +68,6 @@
*
* @param icon an [IconState] for the current ethernet status
*/
- @JvmDefault
fun setEthernetIndicators(icon: IconState) {}
/**
@@ -80,7 +75,6 @@
*
* @param icon an [IconState] for the current airplane mode status
*/
- @JvmDefault
fun setIsAirplaneMode(icon: IconState) {}
/**
@@ -88,7 +82,6 @@
*
* @param enabled the current mobile data feature ennabled state
*/
- @JvmDefault
fun setMobileDataEnabled(enabled: Boolean) {}
/**
@@ -97,7 +90,6 @@
* @param noValidatedNetwork whether there is any validated network.
* @param noNetworksAvailable whether there is any WiFi networks available.
*/
- @JvmDefault
fun setConnectivityStatus(
noDefaultNetwork: Boolean,
noValidatedNetwork: Boolean,
@@ -109,7 +101,6 @@
* @param statusIcon the icon for the call indicator
* @param subId subscription ID for which to update the UI
*/
- @JvmDefault
fun setCallIndicator(statusIcon: IconState, subId: Int) {}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt
index 2a18f1f..ef90890 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt
@@ -49,11 +49,10 @@
fun onSystemEventAnimationFinish(hasPersistentDot: Boolean): Animator? { return null }
// Best method name, change my mind
- @JvmDefault
fun onSystemStatusAnimationTransitionToPersistentDot(contentDescription: String?): Animator? {
return null
}
- @JvmDefault fun onHidePersistentDot(): Animator? { return null }
+ fun onHidePersistentDot(): Animator? { return null }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
index 20af6ca..31a9f96 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
@@ -613,20 +613,20 @@
interface WakeUpListener {
/** Called whenever the notifications are fully hidden or shown */
- @JvmDefault fun onFullyHiddenChanged(isFullyHidden: Boolean) {}
+ fun onFullyHiddenChanged(isFullyHidden: Boolean) {}
/**
* Called whenever the pulseExpansion changes
*
* @param expandingChanged if the user has started or stopped expanding
*/
- @JvmDefault fun onPulseExpansionChanged(expandingChanged: Boolean) {}
+ fun onPulseExpansionChanged(expandingChanged: Boolean) {}
/**
* Called when the animator started by [scheduleDelayedDozeAmountAnimation] begins running
* after the start delay, or after it ends/is cancelled.
*/
- @JvmDefault fun onDelayedDozeAmountAnimationRunning(running: Boolean) {}
+ fun onDelayedDozeAmountAnimationRunning(running: Boolean) {}
}
companion object {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt
index 6deef2e..9675b43 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt
@@ -22,33 +22,27 @@
/** Current top roundness */
@get:FloatRange(from = 0.0, to = 1.0)
- @JvmDefault
val topRoundness: Float
get() = roundableState.topRoundness
/** Current bottom roundness */
@get:FloatRange(from = 0.0, to = 1.0)
- @JvmDefault
val bottomRoundness: Float
get() = roundableState.bottomRoundness
/** Max radius in pixel */
- @JvmDefault
val maxRadius: Float
get() = roundableState.maxRadius
/** Current top corner in pixel, based on [topRoundness] and [maxRadius] */
- @JvmDefault
val topCornerRadius: Float
get() = topRoundness * maxRadius
/** Current bottom corner in pixel, based on [bottomRoundness] and [maxRadius] */
- @JvmDefault
val bottomCornerRadius: Float
get() = bottomRoundness * maxRadius
/** Get and update the current radii */
- @JvmDefault
val updatedRadii: FloatArray
get() =
roundableState.radiiBuffer.also { radii ->
@@ -71,7 +65,6 @@
* @param sourceType the source from which the request for roundness comes.
* @return Whether the roundness was changed.
*/
- @JvmDefault
fun requestTopRoundness(
@FloatRange(from = 0.0, to = 1.0) value: Float,
sourceType: SourceType,
@@ -116,7 +109,6 @@
* @param sourceType the source from which the request for roundness comes.
* @return Whether the roundness was changed.
*/
- @JvmDefault
fun requestTopRoundness(
@FloatRange(from = 0.0, to = 1.0) value: Float,
sourceType: SourceType,
@@ -140,7 +132,6 @@
* @param sourceType the source from which the request for roundness comes.
* @return Whether the roundness was changed.
*/
- @JvmDefault
fun requestBottomRoundness(
@FloatRange(from = 0.0, to = 1.0) value: Float,
sourceType: SourceType,
@@ -185,7 +176,6 @@
* @param sourceType the source from which the request for roundness comes.
* @return Whether the roundness was changed.
*/
- @JvmDefault
fun requestBottomRoundness(
@FloatRange(from = 0.0, to = 1.0) value: Float,
sourceType: SourceType,
@@ -210,7 +200,6 @@
* @param animate true if it should animate to that value.
* @return Whether the roundness was changed.
*/
- @JvmDefault
fun requestRoundness(
@FloatRange(from = 0.0, to = 1.0) top: Float,
@FloatRange(from = 0.0, to = 1.0) bottom: Float,
@@ -237,7 +226,6 @@
* @param sourceType the source from which the request for roundness comes.
* @return Whether the roundness was changed.
*/
- @JvmDefault
fun requestRoundness(
@FloatRange(from = 0.0, to = 1.0) top: Float,
@FloatRange(from = 0.0, to = 1.0) bottom: Float,
@@ -261,7 +249,6 @@
* @param sourceType the source from which the request for roundness comes.
* @param animate true if it should animate to that value.
*/
- @JvmDefault
fun requestRoundnessReset(sourceType: SourceType, animate: Boolean) {
requestRoundness(top = 0f, bottom = 0f, sourceType = sourceType, animate = animate)
}
@@ -275,19 +262,16 @@
*
* @param sourceType the source from which the request for roundness comes.
*/
- @JvmDefault
fun requestRoundnessReset(sourceType: SourceType) {
requestRoundnessReset(sourceType = sourceType, animate = roundableState.targetView.isShown)
}
/** Apply the roundness changes, usually means invalidate the [RoundableState.targetView]. */
- @JvmDefault
fun applyRoundnessAndInvalidate() {
roundableState.targetView.invalidate()
}
/** @return true if top or bottom roundness is not zero. */
- @JvmDefault
fun hasRoundedCorner(): Boolean {
return topRoundness != 0f || bottomRoundness != 0f
}
@@ -298,7 +282,6 @@
*
* This method reuses the previous [radii] for performance reasons.
*/
- @JvmDefault
fun updateRadii(
topCornerRadius: Float,
bottomCornerRadius: Float,
diff --git a/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt b/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt
index 693c270..5582ced 100644
--- a/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/UserAwareController.kt
@@ -23,7 +23,6 @@
* changes.
*/
interface UserAwareController {
- @JvmDefault
fun changeUser(newUser: UserHandle) {}
val currentUserId: Int
diff --git a/packages/SystemUI/unfold/Android.bp b/packages/SystemUI/unfold/Android.bp
index 2e0a946..1f0181f 100644
--- a/packages/SystemUI/unfold/Android.bp
+++ b/packages/SystemUI/unfold/Android.bp
@@ -33,7 +33,7 @@
"dagger2",
"jsr330",
],
- kotlincflags: ["-Xjvm-default=enable"],
+ kotlincflags: ["-Xjvm-default=all"],
java_version: "1.8",
sdk_version: "current",
min_sdk_version: "current",
diff --git a/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt b/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt
index fee485d..896444d 100644
--- a/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt
+++ b/packages/SystemUI/unfold/src/com/android/systemui/unfold/UnfoldTransitionProgressProvider.kt
@@ -35,14 +35,12 @@
interface TransitionProgressListener {
/** Called when transition is started */
- @JvmDefault
fun onTransitionStarted() {}
/**
* Called whenever transition progress is updated, [progress] is a value of the animation
* where 0 is fully folded, 1 is fully unfolded
*/
- @JvmDefault
fun onTransitionProgress(@FloatRange(from = 0.0, to = 1.0) progress: Float) {}
/**
@@ -51,11 +49,9 @@
* For example, in [PhysicsBasedUnfoldTransitionProgressProvider] this could happen when the
* animation is not tied to the hinge angle anymore and it is about to run fixed animation.
*/
- @JvmDefault
fun onTransitionFinishing() {}
/** Called when transition is completely finished */
- @JvmDefault
fun onTransitionFinished() {}
}
}
diff --git a/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt b/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt
index 0af372f..bce7e88 100644
--- a/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt
+++ b/packages/SystemUI/unfold/src/com/android/systemui/unfold/updates/FoldStateProvider.kt
@@ -31,9 +31,9 @@
val isFinishedOpening: Boolean
interface FoldUpdatesListener {
- @JvmDefault fun onHingeAngleUpdate(@FloatRange(from = 0.0, to = 180.0) angle: Float) {}
- @JvmDefault fun onFoldUpdate(@FoldUpdate update: Int) {}
- @JvmDefault fun onUnfoldedScreenAvailable() {}
+ fun onHingeAngleUpdate(@FloatRange(from = 0.0, to = 180.0) angle: Float) {}
+ fun onFoldUpdate(@FoldUpdate update: Int) {}
+ fun onUnfoldedScreenAvailable() {}
}
@IntDef(
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index a3137a6..af0e61e 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -1357,6 +1357,21 @@
}
}
+ /**
+ * This method checks if the volume is public and the volume is visible and the volume it is
+ * trying to mount doesn't have the same mount user id as the current user being maintained by
+ * StorageManagerService and change the mount Id. The checks are same as
+ * {@link StorageManagerService#maybeRemountVolumes(int)}
+ * @param VolumeInfo object to consider for changing the mountId
+ */
+ private void updateVolumeMountIdIfRequired(VolumeInfo vol) {
+ synchronized (mLock) {
+ if (!vol.isPrimary() && vol.isVisible() && vol.getMountUserId() != mCurrentUserId) {
+ vol.mountUserId = mCurrentUserId;
+ }
+ }
+ }
+
private boolean supportsBlockCheckpoint() throws RemoteException {
enforcePermission(android.Manifest.permission.MOUNT_FORMAT_FILESYSTEMS);
return mVold.supportsBlockCheckpoint();
@@ -1468,13 +1483,14 @@
}
@Override
- public void onVolumeStateChanged(String volId, final int newState) {
+ public void onVolumeStateChanged(String volId, final int newState, final int userId) {
synchronized (mLock) {
final VolumeInfo vol = mVolumes.get(volId);
if (vol != null) {
final int oldState = vol.state;
vol.state = newState;
final VolumeInfo vInfo = new VolumeInfo(vol);
+ vInfo.mountUserId = userId;
final SomeArgs args = SomeArgs.obtain();
args.arg1 = vInfo;
args.argi1 = oldState;
@@ -2322,7 +2338,7 @@
if (isMountDisallowed(vol)) {
throw new SecurityException("Mounting " + volId + " restricted by policy");
}
-
+ updateVolumeMountIdIfRequired(vol);
mount(vol);
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index a5662ed..b837688 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5176,6 +5176,9 @@
// Tell anyone interested that we are done booting!
SystemProperties.set("sys.boot_completed", "1");
+ // Start PSI monitoring in LMKD if it was skipped earlier.
+ ProcessList.startPsiMonitoringAfterBoot();
+
// And trigger dev.bootcomplete if we are not showing encryption progress
if (!"trigger_restart_min_framework".equals(VoldProperties.decrypt().orElse(""))
|| "".equals(VoldProperties.encrypt_progress().orElse(""))) {
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index 2d6b875..bce3173 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -350,6 +350,7 @@
static final byte LMK_UPDATE_PROPS = 7;
static final byte LMK_KILL_OCCURRED = 8; // Msg to subscribed clients on kill occurred event
static final byte LMK_STATE_CHANGED = 9; // Msg to subscribed clients on state changed
+ static final byte LMK_START_MONITORING = 9; // Start monitoring if delayed earlier
// Low Memory Killer Daemon command codes.
// These must be kept in sync with async_event_type definitions in lmkd.h
@@ -1483,6 +1484,15 @@
return true;
}
+ /**
+ * {@hide}
+ */
+ public static void startPsiMonitoringAfterBoot() {
+ ByteBuffer buf = ByteBuffer.allocate(4);
+ buf.putInt(LMK_START_MONITORING);
+ writeLmkd(buf, null);
+ }
+
private static boolean writeLmkd(ByteBuffer buf, ByteBuffer repl) {
if (!sLmkdConnection.isConnected()) {
// try to connect immediately and then keep retrying
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 63bb026..cba5039 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -3346,7 +3346,7 @@
// Transforms do not need to be persisted; the IkeSession will keep
// them alive for us
mIpSecManager.applyTunnelModeTransform(mTunnelIface, direction, transform);
- } catch (IOException e) {
+ } catch (IOException | IllegalArgumentException e) {
Log.d(TAG, "Transform application failed for token " + token, e);
onSessionLost(token, e);
}
@@ -3440,7 +3440,7 @@
mTunnelIface, IpSecManager.DIRECTION_IN, inTransform);
mIpSecManager.applyTunnelModeTransform(
mTunnelIface, IpSecManager.DIRECTION_OUT, outTransform);
- } catch (IOException e) {
+ } catch (IOException | IllegalArgumentException e) {
Log.d(TAG, "Transform application failed for token " + token, e);
onSessionLost(token, e);
}
diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
index 362b26e..bdab341 100644
--- a/services/core/java/com/android/server/om/OverlayManagerService.java
+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
@@ -1109,6 +1109,21 @@
int callingUid = Binder.getCallingUid();
mActorEnforcer.enforceActor(overlayInfo, methodName, callingUid, realUserId);
}
+
+ /**
+ * @hide
+ */
+ public String getPartitionOrder() {
+ return mImpl.getOverlayConfig().getPartitionOrder();
+ }
+
+ /**
+ * @hide
+ */
+ public boolean isDefaultPartitionOrder() {
+ return mImpl.getOverlayConfig().isDefaultPartitionOrder();
+ }
+
};
private static final class PackageManagerHelperImpl implements PackageManagerHelper {
diff --git a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
index 38781fa..bd0f657 100644
--- a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
+++ b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
@@ -876,4 +876,8 @@
super(message, cause);
}
}
+
+ OverlayConfig getOverlayConfig() {
+ return mOverlayConfig;
+ }
}
diff --git a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java b/services/core/java/com/android/server/om/OverlayManagerShellCommand.java
index 89939a3..4beb391 100644
--- a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java
+++ b/services/core/java/com/android/server/om/OverlayManagerShellCommand.java
@@ -16,6 +16,8 @@
package com.android.server.om;
+import static com.android.internal.content.om.OverlayConfig.PARTITION_ORDER_FILE_PATH;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
@@ -79,6 +81,8 @@
return runLookup();
case "fabricate":
return runFabricate();
+ case "partition-order":
+ return runPartitionOrder();
default:
return handleDefaultCommands(cmd);
}
@@ -130,6 +134,9 @@
out.println(" Create an overlay from a single resource. Caller must be root. Example:");
out.println(" fabricate --target android --name LighterGray \\");
out.println(" android:color/lighter_gray 0x1c 0xffeeeeee");
+ out.println(" partition-order");
+ out.println(" Print the partition order from overlay config and how this order");
+ out.println(" got established, by default or by " + PARTITION_ORDER_FILE_PATH);
}
private int runList() throws RemoteException {
@@ -230,6 +237,14 @@
return 0;
}
+ private int runPartitionOrder() throws RemoteException {
+ final PrintWriter out = getOutPrintWriter();
+ out.println("Partition order (low to high priority): " + mInterface.getPartitionOrder());
+ out.println("Established by " + (mInterface.isDefaultPartitionOrder() ? "default"
+ : PARTITION_ORDER_FILE_PATH));
+ return 0;
+ }
+
private int runFabricate() throws RemoteException {
final PrintWriter err = getErrPrintWriter();
if (Binder.getCallingUid() != Process.ROOT_UID) {
diff --git a/services/core/java/com/android/server/os/NativeTombstoneManager.java b/services/core/java/com/android/server/os/NativeTombstoneManager.java
index 45192b7..88f70cf 100644
--- a/services/core/java/com/android/server/os/NativeTombstoneManager.java
+++ b/services/core/java/com/android/server/os/NativeTombstoneManager.java
@@ -363,7 +363,7 @@
return false;
}
- if (Math.abs(exitInfo.getTimestamp() - mTimestampMs) > 5000) {
+ if (Math.abs(exitInfo.getTimestamp() - mTimestampMs) > 10000) {
return false;
}
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index 02cf433..3036e0b 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -482,7 +482,7 @@
}
} catch (FileNotFoundException e) {
// Missing sessions are okay, probably first boot
- } catch (IOException | XmlPullParserException e) {
+ } catch (IOException | XmlPullParserException | ArrayIndexOutOfBoundsException e) {
Slog.wtf(TAG, "Failed reading install sessions", e);
} finally {
IoUtils.closeQuietly(fis);
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 95ab464..fe31bf0 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5857,10 +5857,10 @@
pw.println(endcallBehaviorToString(mEndcallBehavior));
pw.print(prefix);
// TODO(b/117479243): handle it in InputPolicy
- pw.print("mDisplayHomeButtonHandlers=");
+ pw.println("mDisplayHomeButtonHandlers=");
for (int i = 0; i < mDisplayHomeButtonHandlers.size(); i++) {
final int key = mDisplayHomeButtonHandlers.keyAt(i);
- pw.println(mDisplayHomeButtonHandlers.get(key));
+ pw.print(prefix); pw.print(" "); pw.println(mDisplayHomeButtonHandlers.get(key));
}
pw.print(prefix); pw.print("mKeyguardOccluded="); pw.print(isKeyguardOccluded());
pw.print(" mKeyguardOccludedChanged="); pw.print(mKeyguardOccludedChanged);
@@ -6131,6 +6131,7 @@
private class HdmiVideoExtconUEventObserver extends ExtconStateObserver<Boolean> {
private static final String HDMI_EXIST = "HDMI=1";
+ private static final String DP_EXIST = "DP=1";
private static final String NAME = "hdmi";
private boolean init(ExtconInfo hdmi) {
@@ -6161,7 +6162,8 @@
public Boolean parseState(ExtconInfo extconIfno, String state) {
// extcon event state changes from kernel4.9
// new state will be like STATE=HDMI=1
- return state.contains(HDMI_EXIST);
+ // or like STATE=DP=1 for newer kernel
+ return state.contains(HDMI_EXIST) || state.contains(DP_EXIST);
}
}
diff --git a/services/core/java/com/android/server/security/FileIntegrityService.java b/services/core/java/com/android/server/security/FileIntegrityService.java
index 466ac74..bdeb9a8 100644
--- a/services/core/java/com/android/server/security/FileIntegrityService.java
+++ b/services/core/java/com/android/server/security/FileIntegrityService.java
@@ -125,13 +125,7 @@
}
private void loadAllCertificates() {
- // A better alternative to load certificates would be to read from .fs-verity kernel
- // keyring, which fsverity_init loads to during earlier boot time from the same sources
- // below. But since the read operation from keyring is not provided in kernel, we need to
- // duplicate the same loading logic here.
-
// Load certificates trusted by the device manufacturer.
- // NB: Directories need to be synced with system/security/fsverity_init/fsverity_init.cpp.
final String relativeDir = "etc/security/fsverity";
loadCertificatesFromDirectory(Environment.getRootDirectory().toPath()
.resolve(relativeDir));
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index f5a41c9..b12d8bd 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -6302,9 +6302,9 @@
// Don't do recursive work.
return;
}
- mInEnsureActivitiesVisible = true;
mAtmService.mTaskSupervisor.beginActivityVisibilityUpdate();
try {
+ mInEnsureActivitiesVisible = true;
forAllRootTasks(rootTask -> {
rootTask.ensureActivitiesVisible(starting, configChanges, preserveWindows,
notifyClients);
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 10673a3..23ea6d7 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -1833,9 +1833,8 @@
// Don't do recursive work.
return;
}
-
+ mTaskSupervisor.beginActivityVisibilityUpdate();
try {
- mTaskSupervisor.beginActivityVisibilityUpdate();
// First the front root tasks. In case any are not fullscreen and are in front of home.
for (int displayNdx = getChildCount() - 1; displayNdx >= 0; --displayNdx) {
final DisplayContent display = getChildAt(displayNdx);
diff --git a/services/core/java/com/android/server/wm/SurfaceAnimationRunner.java b/services/core/java/com/android/server/wm/SurfaceAnimationRunner.java
index 1ae7816..b93dbce 100644
--- a/services/core/java/com/android/server/wm/SurfaceAnimationRunner.java
+++ b/services/core/java/com/android/server/wm/SurfaceAnimationRunner.java
@@ -62,6 +62,8 @@
*/
class SurfaceAnimationRunner {
+ private static final String TAG = SurfaceAnimationRunner.class.getSimpleName();
+
private final Object mLock = new Object();
/**
@@ -185,6 +187,16 @@
// We must wait for t to be committed since otherwise the leash doesn't have the
// windows we want to screenshot and extend as children.
t.addTransactionCommittedListener(mEdgeExtensionExecutor, () -> {
+ if (!animationLeash.isValid()) {
+ Log.e(TAG, "Animation leash is not valid");
+ synchronized (mEdgeExtensionLock) {
+ mEdgeExtensions.remove(animationLeash);
+ }
+ synchronized (mLock) {
+ mPreProcessingAnimations.remove(animationLeash);
+ }
+ return;
+ }
final WindowAnimationSpec animationSpec = a.asWindowAnimationSpec();
final Transaction edgeExtensionCreationTransaction = new Transaction();
@@ -449,8 +461,7 @@
// The leash we are trying to screenshot may have been removed by this point, which is
// likely the reason for ending up with a null edgeBuffer, in which case we just want to
// return and do nothing.
- Log.e("SurfaceAnimationRunner", "Failed to create edge extension - "
- + "edge buffer is null");
+ Log.e(TAG, "Failed to create edge extension - edge buffer is null");
return;
}
diff --git a/services/tests/wmtests/OWNERS b/services/tests/wmtests/OWNERS
index 7a128fc..cece37f 100644
--- a/services/tests/wmtests/OWNERS
+++ b/services/tests/wmtests/OWNERS
@@ -1,3 +1,4 @@
+# Bug template url: https://b.corp.google.com/issues/new?component=316125&template=1018199
include /services/core/java/com/android/server/wm/OWNERS
# Voice Interaction