Merge "Revert "Stop logging the AppIntegrityManager related logs (namely, INTEGRITY_CHECK_RESULT_REPORTED and INTEGRITY_RULES_PUSHED) in preparation of the code clean-up of this deprecated component."" into main
diff --git a/api/api.go b/api/api.go
index e9f1fee..1bbf370 100644
--- a/api/api.go
+++ b/api/api.go
@@ -514,7 +514,7 @@
func combinedApisModuleFactory() android.Module {
module := &CombinedApis{}
module.AddProperties(&module.properties)
- android.InitAndroidModule(module)
+ android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
android.AddLoadHook(module, func(ctx android.LoadHookContext) { module.createInternalModules(ctx) })
return module
}
diff --git a/cmds/hid/Android.bp b/cmds/hid/Android.bp
index a6e2769..b93227a 100644
--- a/cmds/hid/Android.bp
+++ b/cmds/hid/Android.bp
@@ -22,5 +22,5 @@
name: "hid",
wrapper: "hid.sh",
srcs: ["**/*.java"],
- required: ["libhidcommand_jni"],
+ jni_libs: ["libhidcommand_jni"],
}
diff --git a/cmds/uinput/Android.bp b/cmds/uinput/Android.bp
index da497dc..cec8a0d8 100644
--- a/cmds/uinput/Android.bp
+++ b/cmds/uinput/Android.bp
@@ -25,7 +25,7 @@
"src/**/*.java",
":uinputcommand_aidl",
],
- required: ["libuinputcommand_jni"],
+ jni_libs: ["libuinputcommand_jni"],
}
filegroup {
diff --git a/core/api/current.txt b/core/api/current.txt
index e17d128..ce373d0 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -21310,6 +21310,7 @@
field public static final int ENCODING_AAC_XHE = 16; // 0x10
field public static final int ENCODING_AC3 = 5; // 0x5
field public static final int ENCODING_AC4 = 17; // 0x11
+ field @FlaggedApi("android.media.audio.dolby_ac4_level4_encoding_api") public static final int ENCODING_AC4_L4 = 32; // 0x20
field public static final int ENCODING_DEFAULT = 1; // 0x1
field public static final int ENCODING_DOLBY_MAT = 19; // 0x13
field public static final int ENCODING_DOLBY_TRUEHD = 14; // 0xe
diff --git a/core/java/android/hardware/OWNERS b/core/java/android/hardware/OWNERS
index 43d3f54..f11625e 100644
--- a/core/java/android/hardware/OWNERS
+++ b/core/java/android/hardware/OWNERS
@@ -19,3 +19,6 @@
# OverlayProperties
per-file OverlayProperties* = file:/graphics/java/android/graphics/OWNERS
+
+# Lut related files
+per-file *Lut* = file:/graphics/java/android/graphics/OWNERS
\ No newline at end of file
diff --git a/core/java/android/os/SystemClock.java b/core/java/android/os/SystemClock.java
index 23bd30a..d0c23be 100644
--- a/core/java/android/os/SystemClock.java
+++ b/core/java/android/os/SystemClock.java
@@ -60,7 +60,7 @@
* sleep (CPU off, display dark, device waiting for external input),
* but is not affected by clock scaling, idle, or other power saving
* mechanisms. This is the basis for most interval timing
- * such as {@link Thread#sleep(long) Thread.sleep(millls)},
+ * such as {@link Thread#sleep(long) Thread.sleep(millis)},
* {@link Object#wait(long) Object.wait(millis)}, and
* {@link System#nanoTime System.nanoTime()}. This clock is guaranteed
* to be monotonic, and is suitable for interval timing when the
diff --git a/core/java/android/view/inputmethod/InputMethodInfo.java b/core/java/android/view/inputmethod/InputMethodInfo.java
index 11ee286..0a39389 100644
--- a/core/java/android/view/inputmethod/InputMethodInfo.java
+++ b/core/java/android/view/inputmethod/InputMethodInfo.java
@@ -860,7 +860,7 @@
* <p>e.g.<pre><code>startActivity(createStylusHandwritingSettingsActivityIntent());</code>
* </pre></p>
*
- * @attr ref R.styleable#InputMethod_stylusHandwritingSettingsActivity
+ * @attr ref android.R.styleable#InputMethod_stylusHandwritingSettingsActivity
* @see #getSettingsActivity()
* @see #supportsStylusHandwriting()
*/
@@ -886,7 +886,7 @@
* the IME language settings activity.</p>
* <p>e.g.<pre><code>startActivity(createImeLanguageSettingsActivityIntent());</code></pre></p>
*
- * @attr ref R.styleable#InputMethod_languageSettingsActivity
+ * @attr ref android.R.styleable#InputMethod_languageSettingsActivity
*/
@FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP)
@Nullable
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 510a92d..3f611c7 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -3636,7 +3636,7 @@
* Returns the drawable that will be drawn between each item in the list.
*
* @return the current drawable drawn between list elements
- * @attr ref R.styleable#ListView_divider
+ * @attr ref android.R.styleable#ListView_divider
*/
@InspectableProperty
@Nullable
@@ -3651,7 +3651,7 @@
* height, you should also call {@link #setDividerHeight(int)}.
*
* @param divider the drawable to use
- * @attr ref R.styleable#ListView_divider
+ * @attr ref android.R.styleable#ListView_divider
*/
public void setDivider(@Nullable Drawable divider) {
if (divider != null) {
diff --git a/core/jni/OWNERS b/core/jni/OWNERS
index af10623..af393fd 100644
--- a/core/jni/OWNERS
+++ b/core/jni/OWNERS
@@ -119,3 +119,4 @@
# ApplicationSharedMemory
per-file *ApplicationSharedMemory* = file:/PERFORMANCE_OWNERS
+per-file *PropertyInvalidatedCache* = file:/PERFORMANCE_OWNERS
diff --git a/core/jni/android_media_AudioFormat.h b/core/jni/android_media_AudioFormat.h
index a9b1906..704aef3 100644
--- a/core/jni/android_media_AudioFormat.h
+++ b/core/jni/android_media_AudioFormat.h
@@ -50,6 +50,7 @@
#define ENCODING_DTS_HD_MA 29
#define ENCODING_DTS_UHD_P2 30
#define ENCODING_DSD 31
+#define ENCODING_AC4_L4 32
#define ENCODING_INVALID 0
#define ENCODING_DEFAULT 1
@@ -95,6 +96,8 @@
return AUDIO_FORMAT_AAC_XHE;
case ENCODING_AC4:
return AUDIO_FORMAT_AC4;
+ case ENCODING_AC4_L4:
+ return AUDIO_FORMAT_AC4_L4;
case ENCODING_E_AC3_JOC:
return AUDIO_FORMAT_E_AC3_JOC;
case ENCODING_DEFAULT:
@@ -177,6 +180,8 @@
return ENCODING_AAC_XHE;
case AUDIO_FORMAT_AC4:
return ENCODING_AC4;
+ case AUDIO_FORMAT_AC4_L4:
+ return ENCODING_AC4_L4;
case AUDIO_FORMAT_E_AC3_JOC:
return ENCODING_E_AC3_JOC;
case AUDIO_FORMAT_MAT:
diff --git a/keystore/OWNERS b/keystore/OWNERS
index 6891777..ea783e7 100644
--- a/keystore/OWNERS
+++ b/keystore/OWNERS
@@ -1,5 +1,6 @@
# Bug component: 189335
+ascull@google.com
drysdale@google.com
-eranm@google.com
jbires@google.com
+sethmo@google.com
swillden@google.com
diff --git a/location/lib/Android.bp b/location/lib/Android.bp
index b10019a..67d5774 100644
--- a/location/lib/Android.bp
+++ b/location/lib/Android.bp
@@ -29,6 +29,10 @@
libs: [
"androidx.annotation_annotation",
],
+ stub_only_libs: [
+ // Needed for javadoc references.
+ "framework-location.stubs.system",
+ ],
api_packages: [
"android.location",
"com.android.location.provider",
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index c90c441..0da8371b 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -16,6 +16,9 @@
package android.media;
+import static android.media.audio.Flags.FLAG_DOLBY_AC4_LEVEL4_ENCODING_API;
+
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
@@ -309,7 +312,7 @@
public static final int ENCODING_AAC_ELD = 15;
/** Audio data format: AAC xHE compressed */
public static final int ENCODING_AAC_XHE = 16;
- /** Audio data format: AC-4 sync frame transport format */
+ /** Audio data format: AC-4 (levels 0-3) sync frame transport format */
public static final int ENCODING_AC4 = 17;
/** Audio data format: E-AC-3-JOC compressed
* E-AC-3-JOC streams can be decoded by downstream devices supporting {@link #ENCODING_E_AC3}.
@@ -375,6 +378,9 @@
public static final int ENCODING_DTS_UHD_P2 = 30;
/** Audio data format: Direct Stream Digital */
public static final int ENCODING_DSD = 31;
+ /** Audio data format: AC-4 level 4 sync frame transport format */
+ @FlaggedApi(FLAG_DOLBY_AC4_LEVEL4_ENCODING_API)
+ public static final int ENCODING_AC4_L4 = 32;
/** @hide */
public static String toLogFriendlyEncoding(int enc) {
@@ -413,6 +419,8 @@
return "ENCODING_AAC_XHE";
case ENCODING_AC4:
return "ENCODING_AC4";
+ case ENCODING_AC4_L4:
+ return "ENCODING_AC4_L4";
case ENCODING_E_AC3_JOC:
return "ENCODING_E_AC3_JOC";
case ENCODING_DOLBY_MAT:
@@ -823,6 +831,7 @@
case ENCODING_AAC_ELD:
case ENCODING_AAC_XHE:
case ENCODING_AC4:
+ case ENCODING_AC4_L4:
case ENCODING_E_AC3_JOC:
case ENCODING_DOLBY_MAT:
case ENCODING_OPUS:
@@ -863,6 +872,7 @@
case ENCODING_AAC_ELD:
case ENCODING_AAC_XHE:
case ENCODING_AC4:
+ case ENCODING_AC4_L4:
case ENCODING_E_AC3_JOC:
case ENCODING_DOLBY_MAT:
case ENCODING_OPUS:
@@ -908,6 +918,7 @@
case ENCODING_AAC_ELD:
case ENCODING_AAC_XHE:
case ENCODING_AC4:
+ case ENCODING_AC4_L4:
case ENCODING_E_AC3_JOC:
case ENCODING_DOLBY_MAT:
case ENCODING_OPUS:
@@ -950,6 +961,7 @@
case ENCODING_AAC_ELD:
case ENCODING_AAC_XHE:
case ENCODING_AC4:
+ case ENCODING_AC4_L4:
case ENCODING_E_AC3_JOC:
case ENCODING_DOLBY_MAT:
case ENCODING_OPUS:
@@ -1238,6 +1250,7 @@
case ENCODING_AAC_ELD:
case ENCODING_AAC_XHE:
case ENCODING_AC4:
+ case ENCODING_AC4_L4:
case ENCODING_E_AC3_JOC:
case ENCODING_DOLBY_MAT:
case ENCODING_OPUS:
@@ -1468,6 +1481,7 @@
ENCODING_AAC_ELD,
ENCODING_AAC_XHE,
ENCODING_AC4,
+ ENCODING_AC4_L4,
ENCODING_E_AC3_JOC,
ENCODING_DOLBY_MAT,
ENCODING_OPUS,
@@ -1506,6 +1520,7 @@
ENCODING_AAC_ELD,
ENCODING_AAC_XHE,
ENCODING_AC4,
+ ENCODING_AC4_L4,
ENCODING_E_AC3_JOC,
ENCODING_DOLBY_MAT,
ENCODING_OPUS,
@@ -1533,6 +1548,7 @@
ENCODING_AAC_LC,
ENCODING_DOLBY_TRUEHD,
ENCODING_AC4,
+ ENCODING_AC4_L4,
ENCODING_E_AC3_JOC,
ENCODING_DOLBY_MAT,
ENCODING_MPEGH_BL_L3,
@@ -1554,6 +1570,7 @@
ENCODING_AAC_LC,
ENCODING_DOLBY_TRUEHD,
ENCODING_AC4,
+ ENCODING_AC4_L4,
ENCODING_E_AC3_JOC,
ENCODING_DOLBY_MAT,
ENCODING_MPEGH_BL_L3,
@@ -1592,7 +1609,9 @@
case ENCODING_DOLBY_TRUEHD:
return "Dolby TrueHD";
case ENCODING_AC4:
- return "Dolby AC-4";
+ return "Dolby AC-4 levels 0-3";
+ case ENCODING_AC4_L4:
+ return "Dolby AC-4 level 4";
case ENCODING_E_AC3_JOC:
return "Dolby Atmos in Dolby Digital Plus";
case ENCODING_DOLBY_MAT:
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index 2d0e7ab..7b8702f 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -542,6 +542,8 @@
return "AUDIO_FORMAT_AAC_LATM_HE_V2"; // (AAC_LATM | AAC_SUB_HE_V2)
case /* AUDIO_FORMAT_E_AC3_JOC */ 0xA000001:
return "AUDIO_FORMAT_E_AC3_JOC"; // (E_AC3 | E_AC3_SUB_JOC)
+ case /* AUDIO_FORMAT_AC4_L4 */ 0x22000001:
+ return "AUDIO_FORMAT_AC4_L4"; // (AC4 | AC4_SUB_L4)
case /* AUDIO_FORMAT_MAT_1_0 */ 0x24000001:
return "AUDIO_FORMAT_MAT_1_0"; // (MAT | MAT_SUB_1_0)
case /* AUDIO_FORMAT_MAT_2_0 */ 0x24000002:
diff --git a/nfc/Android.bp b/nfc/Android.bp
index db3dcb0..7ad8c4c 100644
--- a/nfc/Android.bp
+++ b/nfc/Android.bp
@@ -41,6 +41,10 @@
"framework-permission-s.stubs.module_lib",
"framework-permission.stubs.module_lib",
],
+ stub_only_libs: [
+ // Needed for javadoc references.
+ "framework-permission-s.stubs.module_lib",
+ ],
static_libs: [
"android.nfc.flags-aconfig-java",
"android.permission.flags-aconfig-java",
diff --git a/packages/SystemUI/res-keyguard/layout-land/keyguard_pattern_view.xml b/packages/SystemUI/res-keyguard/layout-land/keyguard_pattern_view.xml
deleted file mode 100644
index 8a77d88..0000000
--- a/packages/SystemUI/res-keyguard/layout-land/keyguard_pattern_view.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2024, 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.
-*/
--->
-
-<!-- This is the screen that shows the 9 circle unlock widget and instructs
- the user how to unlock their device, or make an emergency call. This
- is the landscape layout. -->
-<com.android.keyguard.KeyguardPatternView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/res-auto"
- android:id="@+id/keyguard_pattern_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_horizontal|bottom"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:orientation="horizontal">
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="2"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:layoutDirection="ltr"
- android:orientation="vertical">
-
- <include layout="@layout/keyguard_bouncer_message_area"/>
-
- <com.android.systemui.bouncer.ui.BouncerMessageView
- android:id="@+id/bouncer_message_view"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- androidprv:layout_constraintBottom_toTopOf="@+id/lockPatternView"
- androidprv:layout_constraintTop_toTopOf="parent"
- androidprv:layout_constraintVertical_chainStyle="packed" />
-
- <include
- android:id="@+id/keyguard_selector_fade_container"
- layout="@layout/keyguard_eca"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
- android:layout_marginTop="@dimen/keyguard_eca_top_margin"
- android:gravity="center_horizontal"
- android:orientation="vertical"
- androidprv:layout_constraintBottom_toBottomOf="parent" />
-
- </androidx.constraintlayout.widget.ConstraintLayout>
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:id="@+id/pattern_container"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="3"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:layoutDirection="ltr"
- android:orientation="vertical">
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/pattern_top_guideline"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- androidprv:layout_constraintGuide_percent="0" />
-
- <com.android.internal.widget.LockPatternView
- android:id="@+id/lockPatternView"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:orientation="horizontal"
- androidprv:layout_constraintDimensionRatio="1.0"
- androidprv:layout_constraintVertical_bias="1.0"
- androidprv:layout_constraintLeft_toLeftOf="parent"
- androidprv:layout_constraintRight_toRightOf="parent"
- androidprv:layout_constraintBottom_toBottomOf="parent"
- androidprv:layout_constraintTop_toBottomOf="@id/pattern_top_guideline"/>
-
- </androidx.constraintlayout.widget.ConstraintLayout>
-</com.android.keyguard.KeyguardPatternView>
diff --git a/packages/SystemUI/res-keyguard/layout-land/keyguard_sim_pin_view.xml b/packages/SystemUI/res-keyguard/layout-land/keyguard_sim_pin_view.xml
deleted file mode 100644
index 4b8b63f..0000000
--- a/packages/SystemUI/res-keyguard/layout-land/keyguard_sim_pin_view.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2024, 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.
-*/
--->
-<!-- This is the SIM PIN view that allows the user to enter a SIM PIN to unlock the device. -->
-<com.android.keyguard.KeyguardSimPinView xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/res-auto"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/keyguard_sim_pin_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_horizontal|bottom"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:orientation="horizontal">
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="2"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:layoutDirection="ltr"
- android:orientation="vertical">
-
- <include layout="@layout/keyguard_bouncer_message_area"/>
-
- <ImageView
- android:id="@+id/keyguard_sim"
- android:layout_width="40dp"
- android:layout_height="40dp"
- android:layout_marginBottom="3dp"
- android:src="@drawable/ic_lockscreen_sim"
- androidprv:layout_constraintBottom_toTopOf="@+id/pin_entry_area"
- androidprv:layout_constraintLeft_toLeftOf="parent"
- androidprv:layout_constraintRight_toRightOf="parent"
- app:tint="@color/background_protected"/>
-
- <include
- android:id="@+id/keyguard_esim_area"
- layout="@layout/keyguard_esim_area"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- androidprv:layout_constraintLeft_toLeftOf="parent"
- androidprv:layout_constraintRight_toRightOf="parent"
- androidprv:layout_constraintBottom_toTopOf="@+id/pin_entry_area"/>
-
- <com.android.keyguard.AlphaOptimizedRelativeLayout
- android:id="@+id/pin_entry_area"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom"
- androidprv:layout_constraintBottom_toTopOf="@+id/keyguard_selector_fade_container">
-
- <com.android.keyguard.PasswordTextView
- android:id="@+id/simPinEntry"
- style="@style/Widget.TextView.Password"
- android:layout_width="@dimen/keyguard_security_width"
- android:layout_height="@dimen/keyguard_password_height"
- android:layout_centerHorizontal="true"
- android:layout_marginRight="72dp"
- android:contentDescription="@string/keyguard_accessibility_sim_pin_area"
- androidprv:scaledTextSize="@integer/scaled_password_text_size" />
- </com.android.keyguard.AlphaOptimizedRelativeLayout>
-
- <include
- android:id="@+id/keyguard_selector_fade_container"
- layout="@layout/keyguard_eca"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
- android:layout_marginTop="@dimen/keyguard_eca_top_margin"
- android:gravity="center_horizontal"
- android:orientation="vertical"
- androidprv:layout_constraintBottom_toBottomOf="parent"/>
-
- </androidx.constraintlayout.widget.ConstraintLayout>
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:id="@+id/sim_pin_container"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="3"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:layoutDirection="ltr"
- android:orientation="vertical">
-
- <androidx.constraintlayout.helper.widget.Flow
- android:id="@+id/flow1"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:orientation="horizontal"
- androidprv:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter"
- androidprv:flow_horizontalGap="@dimen/num_pad_key_margin_end"
- androidprv:flow_horizontalStyle="packed"
- androidprv:flow_maxElementsWrap="3"
- androidprv:flow_verticalBias="0.5"
- androidprv:flow_verticalGap="@dimen/num_pad_entry_row_margin_bottom"
- androidprv:flow_verticalStyle="packed"
- androidprv:flow_wrapMode="aligned"
- androidprv:layout_constraintLeft_toLeftOf="parent"
- androidprv:layout_constraintRight_toRightOf="parent"
- androidprv:layout_constraintTop_toTopOf="parent"
- androidprv:layout_constraintBottom_toBottomOf="parent"/>
-
- <com.android.keyguard.NumPadButton
- android:id="@+id/delete_button"
- style="@style/NumPadKey.Delete"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key0"
- android:contentDescription="@string/keyboardview_keycode_delete" />
-
- <com.android.keyguard.NumPadButton
- android:id="@+id/key_enter"
- style="@style/NumPadKey.Enter"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:contentDescription="@string/keyboardview_keycode_enter" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key1"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key2"
- androidprv:digit="1"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key2"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key3"
- androidprv:digit="2"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key3"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key4"
- androidprv:digit="3"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key4"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key5"
- androidprv:digit="4"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key5"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key6"
- androidprv:digit="5"
- androidprv:textView="@+id/simPinEntry" />
-
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key6"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key7"
- androidprv:digit="6"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key7"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key8"
- androidprv:digit="7"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key8"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key9"
- androidprv:digit="8"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key9"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/delete_button"
- androidprv:digit="9"
- androidprv:textView="@+id/simPinEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key0"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key_enter"
- androidprv:digit="0"
- androidprv:textView="@+id/simPinEntry" />
- </androidx.constraintlayout.widget.ConstraintLayout>
-</com.android.keyguard.KeyguardSimPinView>
diff --git a/packages/SystemUI/res-keyguard/layout-land/keyguard_sim_puk_view.xml b/packages/SystemUI/res-keyguard/layout-land/keyguard_sim_puk_view.xml
deleted file mode 100644
index 9012856..0000000
--- a/packages/SystemUI/res-keyguard/layout-land/keyguard_sim_puk_view.xml
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2024, 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.
-*/
--->
-<!-- This is the SIM PUK view that allows the user to recover their device by entering the
- carrier-provided PUK code and entering a new SIM PIN for it. -->
-<com.android.keyguard.KeyguardSimPukView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/res-auto"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/keyguard_sim_puk_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_horizontal|bottom"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:orientation="horizontal">
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="2"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:layoutDirection="ltr"
- android:orientation="vertical">
-
- <include layout="@layout/keyguard_bouncer_message_area"/>
-
- <ImageView
- android:id="@+id/keyguard_sim"
- android:layout_width="40dp"
- android:layout_height="40dp"
- android:layout_marginBottom="3dp"
- android:src="@drawable/ic_lockscreen_sim"
- androidprv:layout_constraintBottom_toTopOf="@+id/pin_entry_area"
- androidprv:layout_constraintLeft_toLeftOf="parent"
- androidprv:layout_constraintRight_toRightOf="parent"
- app:tint="@color/background_protected"/>
-
- <include
- android:id="@+id/keyguard_esim_area"
- layout="@layout/keyguard_esim_area"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- androidprv:layout_constraintLeft_toLeftOf="parent"
- androidprv:layout_constraintRight_toRightOf="parent"
- androidprv:layout_constraintBottom_toTopOf="@+id/pin_entry_area"/>
-
- <com.android.keyguard.AlphaOptimizedRelativeLayout
- android:id="@+id/pin_entry_area"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom"
- androidprv:layout_constraintBottom_toTopOf="@+id/keyguard_selector_fade_container">
-
- <com.android.keyguard.PasswordTextView
- android:id="@+id/pukEntry"
- style="@style/Widget.TextView.Password"
- android:layout_width="@dimen/keyguard_security_width"
- android:layout_height="@dimen/keyguard_password_height"
- android:layout_centerHorizontal="true"
- android:layout_marginRight="72dp"
- android:contentDescription="@string/keyguard_accessibility_sim_pin_area"
- androidprv:scaledTextSize="@integer/scaled_password_text_size" />
- </com.android.keyguard.AlphaOptimizedRelativeLayout>
-
- <include
- android:id="@+id/keyguard_selector_fade_container"
- layout="@layout/keyguard_eca"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
- android:layout_marginTop="@dimen/keyguard_eca_top_margin"
- android:gravity="center_horizontal"
- android:orientation="vertical"
- androidprv:layout_constraintBottom_toBottomOf="parent"/>
-
- </androidx.constraintlayout.widget.ConstraintLayout>
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:id="@+id/sim_puk_container"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="3"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:layoutDirection="ltr"
- android:orientation="vertical">
-
- <androidx.constraintlayout.helper.widget.Flow
- android:id="@+id/flow1"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:orientation="horizontal"
- androidprv:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter"
- androidprv:flow_horizontalGap="@dimen/num_pad_key_margin_end"
- androidprv:flow_horizontalStyle="packed"
- androidprv:flow_maxElementsWrap="3"
- androidprv:flow_verticalBias="0.5"
- androidprv:flow_verticalGap="@dimen/num_pad_entry_row_margin_bottom"
- androidprv:flow_verticalStyle="packed"
- androidprv:flow_wrapMode="aligned"
- androidprv:layout_constraintLeft_toLeftOf="parent"
- androidprv:layout_constraintRight_toRightOf="parent"
- androidprv:layout_constraintTop_toTopOf="parent"
- androidprv:layout_constraintBottom_toBottomOf="parent"/>
-
- <com.android.keyguard.NumPadButton
- android:id="@+id/delete_button"
- style="@style/NumPadKey.Delete"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key0"
- android:contentDescription="@string/keyboardview_keycode_delete" />
-
- <com.android.keyguard.NumPadButton
- android:id="@+id/key_enter"
- style="@style/NumPadKey.Enter"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:contentDescription="@string/keyboardview_keycode_enter" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key1"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key2"
- androidprv:digit="1"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key2"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key3"
- androidprv:digit="2"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key3"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key4"
- androidprv:digit="3"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key4"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key5"
- androidprv:digit="4"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key5"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key6"
- androidprv:digit="5"
- androidprv:textView="@+id/pukEntry" />
-
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key6"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key7"
- androidprv:digit="6"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key7"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key8"
- androidprv:digit="7"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key8"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key9"
- androidprv:digit="8"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key9"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/delete_button"
- androidprv:digit="9"
- androidprv:textView="@+id/pukEntry" />
-
- <com.android.keyguard.NumPadKey
- android:id="@+id/key0"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:accessibilityTraversalBefore="@id/key_enter"
- androidprv:digit="0"
- androidprv:textView="@+id/pukEntry" />
- </androidx.constraintlayout.widget.ConstraintLayout>
-</com.android.keyguard.KeyguardSimPukView>
diff --git a/packages/SystemUI/src/com/android/systemui/util/AlphaTintDrawableWrapper.java b/packages/SystemUI/src/com/android/systemui/util/AlphaTintDrawableWrapper.java
index 947746c..4b2fe49 100644
--- a/packages/SystemUI/src/com/android/systemui/util/AlphaTintDrawableWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/util/AlphaTintDrawableWrapper.java
@@ -45,8 +45,8 @@
* This class should only be used in XML.
*
* @attr ref android.R.styleable#DrawableWrapper_drawable
- * @attr ref R.styleable#AlphaTintDrawableWrapper_tint
- * @attr ref R.styleable#AlphaTintDrawableWrapper_alpha
+ * @attr ref android.R.styleable#AlphaTintDrawableWrapper_tint
+ * @attr ref android.R.styleable#AlphaTintDrawableWrapper_alpha
*/
public class AlphaTintDrawableWrapper extends InsetDrawable {
private ColorStateList mTint;
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSimPinViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSimPinViewControllerTest.kt
index 7031b2b..7151c42 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSimPinViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSimPinViewControllerTest.kt
@@ -80,9 +80,8 @@
`when`(telephonyManager.createForSubscriptionId(anyInt())).thenReturn(telephonyManager)
`when`(telephonyManager.supplyIccLockPin(anyString())).thenReturn(mock())
simPinView =
- LayoutInflater.from(context)
- .inflate(R.layout.keyguard_sim_pin_view, null)
- .requireViewById(R.id.keyguard_sim_pin_view) as KeyguardSimPinView
+ LayoutInflater.from(context).inflate(R.layout.keyguard_sim_pin_view, null)
+ as KeyguardSimPinView
val fakeFeatureFlags = FakeFeatureFlags()
val keyguardKeyboardInteractor = KeyguardKeyboardInteractor(FakeKeyboardRepository())
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
index 805b0c1..4ae5bd1 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
@@ -21,6 +21,8 @@
import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_VERBOSE_LOGGING;
import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_VERSION_JAVA_SYSPROP;
+import static org.junit.Assert.assertThrows;
+
import android.app.ActivityManager;
import android.app.Instrumentation;
import android.app.ResourcesManager;
@@ -167,6 +169,8 @@
// This will let AndroidJUnit4 use the original runner.
System.setProperty("android.junit.runner",
"androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner");
+
+ assertMockitoVersion();
}
/**
@@ -381,6 +385,28 @@
}
}
+ private static final String MOCKITO_ERROR = "FATAL: Unsupported Mockito detected!"
+ + " Your test or its dependencies use one of the \"mockito-target-*\""
+ + " modules as static library, which is unusable on host side."
+ + " Please switch over to use \"mockito-ravenwood-prebuilt\" as shared library, or"
+ + " as a last resort, set `ravenizer: { strip_mockito: true }` in your test module.";
+
+ /**
+ * Assert the Mockito version at runtime to ensure no incorrect Mockito classes are loaded.
+ */
+ private static void assertMockitoVersion() {
+ // DexMaker should not exist
+ assertThrows(
+ MOCKITO_ERROR,
+ ClassNotFoundException.class,
+ () -> Class.forName("com.android.dx.DexMaker"));
+ // Mockito 2 should not exist
+ assertThrows(
+ MOCKITO_ERROR,
+ ClassNotFoundException.class,
+ () -> Class.forName("org.mockito.Matchers"));
+ }
+
@SuppressWarnings("unused") // Called from native code (ravenwood_sysprop.cpp)
private static void checkSystemPropertyAccess(String key, boolean write) {
boolean result = write ? sProps.isKeyWritable(key) : sProps.isKeyReadable(key);
diff --git a/ravenwood/tests/coretest/test/com/android/ravenwoodtest/coretest/RavenwoodMockitoTest.java b/ravenwood/tests/coretest/test/com/android/ravenwoodtest/coretest/RavenwoodMockitoTest.java
index dd6d259..31884b6 100644
--- a/ravenwood/tests/coretest/test/com/android/ravenwoodtest/coretest/RavenwoodMockitoTest.java
+++ b/ravenwood/tests/coretest/test/com/android/ravenwoodtest/coretest/RavenwoodMockitoTest.java
@@ -16,11 +16,19 @@
package com.android.ravenwoodtest.coretest;
import static org.junit.Assert.assertThrows;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
import org.junit.Test;
public class RavenwoodMockitoTest {
+ private static class MockClass {
+ void foo() {
+ throw new RuntimeException("Unsupported!!");
+ }
+ }
+
@Test
public void checkMockitoClasses() {
// DexMaker should not exist
@@ -32,4 +40,11 @@
ClassNotFoundException.class,
() -> Class.forName("org.mockito.Matchers"));
}
+
+ @Test
+ public void checkMockitoActuallyWorks() {
+ var mock = mock(MockClass.class);
+ doNothing().when(mock).foo();
+ mock.foo();
+ }
}
diff --git a/ravenwood/tools/ravenizer/src/com/android/platform/test/ravenwood/ravenizer/Ravenizer.kt b/ravenwood/tools/ravenizer/src/com/android/platform/test/ravenwood/ravenizer/Ravenizer.kt
index 49f0b59..e67c730 100644
--- a/ravenwood/tools/ravenizer/src/com/android/platform/test/ravenwood/ravenizer/Ravenizer.kt
+++ b/ravenwood/tools/ravenizer/src/com/android/platform/test/ravenwood/ravenizer/Ravenizer.kt
@@ -127,7 +127,7 @@
}
}
if (includeUnsupportedMockito(allClasses)) {
- log.w("Unsupported Mockito detected in $inJar}!")
+ log.w("Unsupported Mockito detected in $inJar!")
}
stats.totalProcessTime = log.vTime("$executableName processing $inJar") {
diff --git a/services/core/java/com/android/server/pm/ApexManager.java b/services/core/java/com/android/server/pm/ApexManager.java
index 5d71439e..458b46d 100644
--- a/services/core/java/com/android/server/pm/ApexManager.java
+++ b/services/core/java/com/android/server/pm/ApexManager.java
@@ -592,7 +592,7 @@
return apexSessionInfo;
} catch (RemoteException re) {
Slog.e(TAG, "Unable to contact apexservice", re);
- throw new RuntimeException(re);
+ return null;
}
}
@@ -607,7 +607,7 @@
return result;
} catch (RemoteException re) {
Slog.e(TAG, "Unable to contact apexservice", re);
- throw new RuntimeException(re);
+ return new SparseArray<>(0);
}
}
@@ -619,7 +619,9 @@
return apexInfoList;
} catch (RemoteException re) {
Slog.e(TAG, "Unable to contact apexservice", re);
- throw new RuntimeException(re);
+ throw new PackageManagerException(
+ PackageManager.INSTALL_FAILED_VERIFICATION_FAILURE,
+ "apexd verification failed : " + re.getMessage());
} catch (Exception e) {
throw new PackageManagerException(
PackageManager.INSTALL_FAILED_VERIFICATION_FAILURE,
@@ -633,7 +635,7 @@
return waitForApexService().getStagedApexInfos(params);
} catch (RemoteException re) {
Slog.w(TAG, "Unable to contact apexservice" + re.getMessage());
- throw new RuntimeException(re);
+ return new ApexInfo[0];
} catch (Exception e) {
Slog.w(TAG, "Failed to collect staged apex infos" + e.getMessage());
return new ApexInfo[0];
@@ -646,7 +648,9 @@
waitForApexService().markStagedSessionReady(sessionId);
} catch (RemoteException re) {
Slog.e(TAG, "Unable to contact apexservice", re);
- throw new RuntimeException(re);
+ throw new PackageManagerException(
+ PackageManager.INSTALL_FAILED_VERIFICATION_FAILURE,
+ "Failed to mark apexd session as ready : " + re.getMessage());
} catch (Exception e) {
throw new PackageManagerException(
PackageManager.INSTALL_FAILED_VERIFICATION_FAILURE,
diff --git a/services/tests/mockingservicestests/src/com/android/server/pm/ApexManagerTest.java b/services/tests/mockingservicestests/src/com/android/server/pm/ApexManagerTest.java
index d08cdc7..769f071 100644
--- a/services/tests/mockingservicestests/src/com/android/server/pm/ApexManagerTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/pm/ApexManagerTest.java
@@ -265,19 +265,19 @@
}
@Test
- public void testSubmitStagedSession_throwRunTimeException() throws RemoteException {
+ public void testSubmitStagedSession_throwPackageManagerExceptionOnRemoteException()
+ throws RemoteException {
doThrow(RemoteException.class).when(mApexService).submitStagedSession(any(), any());
- assertThrows(RuntimeException.class,
+ assertThrows(PackageManagerException.class,
() -> mApexManager.submitStagedSession(testParamsWithChildren()));
}
@Test
- public void testGetStagedApexInfos_throwRunTimeException() throws RemoteException {
+ public void testGetStagedApexInfos_returnsEmptyOnRemoteException() throws RemoteException {
doThrow(RemoteException.class).when(mApexService).getStagedApexInfos(any());
- assertThrows(RuntimeException.class,
- () -> mApexManager.getStagedApexInfos(testParamsWithChildren()));
+ assertThat(mApexManager.getStagedApexInfos(testParamsWithChildren())).hasLength(0);
}
@Test
@@ -298,10 +298,11 @@
}
@Test
- public void testMarkStagedSessionReady_throwRunTimeException() throws RemoteException {
+ public void testMarkStagedSessionReady_throwPackageManagerExceptionOnRemoteException()
+ throws RemoteException {
doThrow(RemoteException.class).when(mApexService).markStagedSessionReady(anyInt());
- assertThrows(RuntimeException.class,
+ assertThrows(PackageManagerException.class,
() -> mApexManager.markStagedSessionReady(TEST_SESSION_ID));
}