diff options
45 files changed, 164 insertions, 98 deletions
diff --git a/ADPF_OWNERS b/ADPF_OWNERS new file mode 100644 index 000000000000..e6ca8f4bd48a --- /dev/null +++ b/ADPF_OWNERS @@ -0,0 +1,3 @@ +lpy@google.com +mattbuckley@google.com +xwxw@google.com @@ -31,9 +31,6 @@ per-file */TEST_MAPPING = * per-file */res*/values*/*.xml = byi@google.com, delphij@google.com per-file **.bp,**.mk = hansson@google.com -per-file *.bp = file:platform/build/soong:/OWNERS #{LAST_RESORT_SUGGESTION} -per-file Android.mk = file:platform/build/soong:/OWNERS #{LAST_RESORT_SUGGESTION} -per-file framework-jarjar-rules.txt = file:platform/build/soong:/OWNERS #{LAST_RESORT_SUGGESTION} per-file TestProtoLibraries.bp = file:platform/platform_testing:/libraries/health/OWNERS per-file TestProtoLibraries.bp = file:platform/tools/tradefederation:/OWNERS diff --git a/core/api/current.txt b/core/api/current.txt index abf3a2f0ddf8..379db7ca5963 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -31970,7 +31970,7 @@ package android.os { method public boolean isInteractive(); method public boolean isLowPowerStandbyEnabled(); method public boolean isPowerSaveMode(); - method public boolean isRebootingUserspaceSupported(); + method @Deprecated public boolean isRebootingUserspaceSupported(); method @Deprecated public boolean isScreenOn(); method public boolean isSustainedPerformanceModeSupported(); method public boolean isWakeLockLevelSupported(int); @@ -41314,6 +41314,8 @@ package android.telephony { field public static final String KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY = "5g_nr_ssrsrq_thresholds_int_array"; field public static final String KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY = "5g_nr_sssinr_thresholds_int_array"; field public static final String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool"; + field public static final String KEY_ADDITIONAL_SETTINGS_CALLER_ID_VISIBILITY_BOOL = "additional_settings_caller_id_visibility_bool"; + field public static final String KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL = "additional_settings_call_waiting_visibility_bool"; field public static final String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool"; field public static final String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL = "allow_add_call_during_video_call"; field public static final String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool"; @@ -42930,9 +42932,9 @@ package android.telephony { field public static final int BAND_UNKNOWN = 0; // 0x0 field public static final int CELL_BANDWIDTH_UNKNOWN = 0; // 0x0 field public static final int CHANNEL_NUMBER_UNKNOWN = 2147483647; // 0x7fffffff - field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1 - field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2 - field public static final int CONNECTION_UNKNOWN = -1; // 0xffffffff + field @Deprecated public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1 + field @Deprecated public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2 + field @Deprecated public static final int CONNECTION_UNKNOWN = -1; // 0xffffffff field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhysicalChannelConfig> CREATOR; field public static final int FREQUENCY_UNKNOWN = -1; // 0xffffffff field public static final int PHYSICAL_CELL_ID_MAXIMUM_VALUE = 1007; // 0x3ef diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index 6a4c67b71250..5d599698ea55 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -13,6 +13,7 @@ package android.app { @UiContext public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback { method public final boolean addDumpable(@NonNull android.util.Dumpable); + method public final boolean isResumed(); } public class ActivityManager { diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 821944f406cd..c893b5432269 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -9627,7 +9627,7 @@ package android.os { method @RequiresPermission(anyOf={android.Manifest.permission.DEVICE_POWER, android.Manifest.permission.USER_ACTIVITY}) public void userActivity(long, int, int); field public static final int POWER_SAVE_MODE_TRIGGER_DYNAMIC = 1; // 0x1 field public static final int POWER_SAVE_MODE_TRIGGER_PERCENTAGE = 0; // 0x0 - field public static final String REBOOT_USERSPACE = "userspace"; + field @Deprecated public static final String REBOOT_USERSPACE = "userspace"; field public static final int SOUND_TRIGGER_MODE_ALL_DISABLED = 2; // 0x2 field public static final int SOUND_TRIGGER_MODE_ALL_ENABLED = 0; // 0x0 field public static final int SOUND_TRIGGER_MODE_CRITICAL_ONLY = 1; // 0x1 diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index f5fa139aeb0a..a24007e09d9c 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -1996,7 +1996,7 @@ public class Activity extends ContextThemeWrapper * indicator that the activity became active and ready to receive input. This sometimes could * also be a transit state toward another resting state. For instance, an activity may be * relaunched to {@link #onPause} due to configuration changes and the activity was visible, - * but wasn’t the top-most activity of an activity task. {@link #onResume} is guaranteed to be + * but wasn't the top-most activity of an activity task. {@link #onResume} is guaranteed to be * called before {@link #onPause} in this case which honors the activity lifecycle policy and * the activity eventually rests in {@link #onPause}. * @@ -8637,6 +8637,7 @@ public class Activity extends ContextThemeWrapper * @hide */ @UnsupportedAppUsage + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public final boolean isResumed() { return mResumed; } diff --git a/core/java/android/app/admin/EnterprisePlatformSecurity_OWNERS b/core/java/android/app/admin/EnterprisePlatformSecurity_OWNERS index 38fee895d5c3..9aab167fa0d3 100644 --- a/core/java/android/app/admin/EnterprisePlatformSecurity_OWNERS +++ b/core/java/android/app/admin/EnterprisePlatformSecurity_OWNERS @@ -1,5 +1,3 @@ +file:EnterprisePlatform_OWNERS rubinxu@google.com -pgrafov@google.com -ayushsha@google.com -acjohnston@google.com #{LAST_RESORT_SUGGESTION} -alexkershaw@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file +pgrafov@google.com
\ No newline at end of file diff --git a/core/java/android/app/admin/EnterprisePlatformTest_OWNERS b/core/java/android/app/admin/EnterprisePlatformTest_OWNERS new file mode 100644 index 000000000000..eb23a035c2d9 --- /dev/null +++ b/core/java/android/app/admin/EnterprisePlatformTest_OWNERS @@ -0,0 +1,5 @@ +# Bug template url: https://b.corp.google.com/issues/new?component=1337891&template=1814288 +# Assign bugs to aep-automated-tests@google.com + +file:EnterprisePlatform_OWNERS +scottjonathan@google.com
\ No newline at end of file diff --git a/core/java/android/app/admin/EnterprisePlatform_OWNERS b/core/java/android/app/admin/EnterprisePlatform_OWNERS index 6ce25cc42876..4d1ed59039d0 100644 --- a/core/java/android/app/admin/EnterprisePlatform_OWNERS +++ b/core/java/android/app/admin/EnterprisePlatform_OWNERS @@ -1,5 +1,2 @@ -# Assign bugs to android-enterprise-triage@google.com -file:WorkDeviceExperience_OWNERS -file:Provisioning_OWNERS -file:WorkProfile_OWNERS -file:EnterprisePlatformSecurity_OWNERS
\ No newline at end of file +sandness@google.com #{LAST_RESORT_SUGGESTION} +scottjonathan@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file diff --git a/core/java/android/app/admin/OWNERS b/core/java/android/app/admin/OWNERS index 10a5f14dca9e..308f1d622c25 100644 --- a/core/java/android/app/admin/OWNERS +++ b/core/java/android/app/admin/OWNERS @@ -1,5 +1,7 @@ # Bug component: 142675 +# Assign bugs to device-policy-manager-triage@google.com -file:EnterprisePlatform_OWNERS +file:WorkDeviceExperience_OWNERS +file:EnterprisePlatformSecurity_OWNERS yamasani@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file diff --git a/core/java/android/app/admin/Provisioning_OWNERS b/core/java/android/app/admin/Provisioning_OWNERS index 2e5c2df74280..fa0a1f09bfc8 100644 --- a/core/java/android/app/admin/Provisioning_OWNERS +++ b/core/java/android/app/admin/Provisioning_OWNERS @@ -1,5 +1,4 @@ # Assign bugs to android-enterprise-triage@google.com mdb.ae-provisioning-reviews@google.com -petuska@google.com #{LAST_RESORT_SUGGESTION} -nupursn@google.com #{LAST_RESORT_SUGGESTION} -shreyacsingh@google.com #{LAST_RESORT_SUGGESTION} +file:EnterprisePlatform_OWNERS +petuska@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file diff --git a/core/java/android/app/admin/WorkDeviceExperience_OWNERS b/core/java/android/app/admin/WorkDeviceExperience_OWNERS index b881de0242ea..5e0201641a5a 100644 --- a/core/java/android/app/admin/WorkDeviceExperience_OWNERS +++ b/core/java/android/app/admin/WorkDeviceExperience_OWNERS @@ -1,7 +1,5 @@ # Assign bugs to android-enterprise-triage@google.com work-device-experience+reviews@google.com -scottjonathan@google.com #{LAST_RESORT_SUGGESTION} -eliselliott@google.com #{LAST_RESORT_SUGGESTION} +file:EnterprisePlatform_OWNERS kholoudm@google.com #{LAST_RESORT_SUGGESTION} -acjohnston@google.com #{LAST_RESORT_SUGGESTION} -alexkershaw@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file +acjohnston@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file diff --git a/core/java/android/app/admin/WorkProfile_OWNERS b/core/java/android/app/admin/WorkProfile_OWNERS index 260b672788d1..e9bcce21af60 100644 --- a/core/java/android/app/admin/WorkProfile_OWNERS +++ b/core/java/android/app/admin/WorkProfile_OWNERS @@ -1,5 +1,3 @@ # Assign bugs to android-enterprise-triage@google.com -liahav@google.com -olit@google.com -scottjonathan@google.com #{LAST_RESORT_SUGGESTION} -alexkershaw@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file +file:EnterprisePlatform_OWNERS +liahav@google.com
\ No newline at end of file diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java index b749d695bdc8..7d0cf9c7e458 100644 --- a/core/java/android/nfc/NfcAdapter.java +++ b/core/java/android/nfc/NfcAdapter.java @@ -642,6 +642,7 @@ public final class NfcAdapter { try { sTagService = sService.getNfcTagInterface(); } catch (RemoteException e) { + sTagService = null; Log.e(TAG, "could not retrieve NFC Tag service"); throw new UnsupportedOperationException(); } @@ -650,12 +651,14 @@ public final class NfcAdapter { try { sNfcFCardEmulationService = sService.getNfcFCardEmulationInterface(); } catch (RemoteException e) { + sNfcFCardEmulationService = null; Log.e(TAG, "could not retrieve NFC-F card emulation service"); throw new UnsupportedOperationException(); } try { sCardEmulationService = sService.getNfcCardEmulationInterface(); } catch (RemoteException e) { + sCardEmulationService = null; Log.e(TAG, "could not retrieve card emulation service"); throw new UnsupportedOperationException(); } @@ -838,30 +841,54 @@ public final class NfcAdapter { // assigning to sService is not thread-safe, but this is best-effort code // and on a well-behaved system should never happen sService = service; - try { - sTagService = service.getNfcTagInterface(); - } catch (RemoteException ee) { - Log.e(TAG, "could not retrieve NFC tag service during service recovery"); - // nothing more can be done now, sService is still stale, we'll hit - // this recovery path again later - return; + if (sHasNfcFeature) { + try { + sTagService = service.getNfcTagInterface(); + } catch (RemoteException ee) { + sTagService = null; + Log.e(TAG, "could not retrieve NFC tag service during service recovery"); + // nothing more can be done now, sService is still stale, we'll hit + // this recovery path again later + return; + } } - try { - sCardEmulationService = service.getNfcCardEmulationInterface(); - } catch (RemoteException ee) { - Log.e(TAG, "could not retrieve NFC card emulation service during service recovery"); - } + if (sHasCeFeature) { + try { + sCardEmulationService = service.getNfcCardEmulationInterface(); + } catch (RemoteException ee) { + sCardEmulationService = null; + Log.e(TAG, + "could not retrieve NFC card emulation service during service recovery"); + } - try { - sNfcFCardEmulationService = service.getNfcFCardEmulationInterface(); - } catch (RemoteException ee) { - Log.e(TAG, "could not retrieve NFC-F card emulation service during service recovery"); + try { + sNfcFCardEmulationService = service.getNfcFCardEmulationInterface(); + } catch (RemoteException ee) { + sNfcFCardEmulationService = null; + Log.e(TAG, + "could not retrieve NFC-F card emulation service during service recovery"); + } } return; } + private boolean isCardEmulationEnabled() { + if (sHasCeFeature) { + return (sCardEmulationService != null || sNfcFCardEmulationService != null); + } + return false; + } + + private boolean isTagReadingEnabled() { + if (sHasNfcFeature) { + return sTagService != null; + } + return false; + } + + /** * Return true if this NFC Adapter has any features enabled. * @@ -875,8 +902,9 @@ public final class NfcAdapter { * @return true if this NFC Adapter has any features enabled */ public boolean isEnabled() { + boolean serviceState = false; try { - return sService.getState() == STATE_ON; + serviceState = sService.getState() == STATE_ON; } catch (RemoteException e) { attemptDeadServiceRecovery(e); // Try one more time @@ -885,12 +913,12 @@ public final class NfcAdapter { return false; } try { - return sService.getState() == STATE_ON; + serviceState = sService.getState() == STATE_ON; } catch (RemoteException ee) { Log.e(TAG, "Failed to recover NFC Service."); } - return false; } + return serviceState && (isTagReadingEnabled() || isCardEmulationEnabled()); } /** diff --git a/core/java/android/os/OWNERS b/core/java/android/os/OWNERS index 4899a4d6a85b..abaa7892b28b 100644 --- a/core/java/android/os/OWNERS +++ b/core/java/android/os/OWNERS @@ -76,3 +76,7 @@ per-file PatternMatcher* = file:/PACKAGE_MANAGER_OWNERS # PermissionEnforcer per-file PermissionEnforcer.java = tweek@google.com, brufino@google.com + +# PerformanceHintManager +per-file PerformanceHintManager.java = file:/ADPF_OWNERS + diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java index aa733b5c6d49..bd040b2e9633 100644 --- a/core/java/android/os/PowerManager.java +++ b/core/java/android/os/PowerManager.java @@ -33,7 +33,6 @@ import android.app.PropertyInvalidatedCache; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.service.dreams.Sandman; -import android.sysprop.InitProperties; import android.util.ArrayMap; import android.util.Log; import android.util.proto.ProtoOutputStream; @@ -873,6 +872,8 @@ public final class PowerManager { /** * The 'reason' value used for rebooting userspace. + * + * @deprecated userspace reboot is not supported * @hide */ @SystemApi @@ -1805,16 +1806,18 @@ public final class PowerManager { * <p>This method exists solely for the sake of re-using same logic between {@code PowerManager} * and {@code PowerManagerService}. * + * @deprecated TODO(b/292469129): remove this method. * @hide */ public static boolean isRebootingUserspaceSupportedImpl() { - return InitProperties.is_userspace_reboot_supported().orElse(false); + return false; } /** * Returns {@code true} if this device supports rebooting userspace. + * + * @deprecated userspace reboot is deprecated, this method always returns {@code false}. */ - // TODO(b/138605180): add link to documentation once it's ready. public boolean isRebootingUserspaceSupported() { return isRebootingUserspaceSupportedImpl(); } diff --git a/core/jni/OWNERS b/core/jni/OWNERS index a17048c27763..921a45f4e8fc 100644 --- a/core/jni/OWNERS +++ b/core/jni/OWNERS @@ -105,3 +105,6 @@ per-file com_android_internal_content_* = file:/PACKAGE_MANAGER_OWNERS # SQLite per-file android_database_SQLite* = file:/SQLITE_OWNERS + +# PerformanceHintManager +per-file android_os_PerformanceHintManager.cpp = file:/ADPF_OWNERS diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp index a50c01178083..9210498f7d92 100644 --- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp +++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp @@ -174,6 +174,7 @@ sumFiles(JNIEnv*, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntry, const char static install_status_t copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntry, const char* fileName) { + static const size_t kPageSize = getpagesize(); void** args = reinterpret_cast<void**>(arg); jstring* javaNativeLibPath = (jstring*) args[0]; jboolean extractNativeLibs = *(jboolean*) args[1]; @@ -200,9 +201,9 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr return INSTALL_FAILED_INVALID_APK; } - if (offset % PAGE_SIZE != 0) { - ALOGE("Library '%s' is not page-aligned - will not be able to open it directly from" - " apk.\n", fileName); + if (offset % kPageSize != 0) { + ALOGE("Library '%s' is not PAGE(%zu)-aligned - will not be able to open it directly " + "from apk.\n", fileName, kPageSize); return INSTALL_FAILED_INVALID_APK; } diff --git a/core/tests/coretests/src/android/os/OWNERS b/core/tests/coretests/src/android/os/OWNERS index f2d6ff87f7f2..8b333f3c3eaa 100644 --- a/core/tests/coretests/src/android/os/OWNERS +++ b/core/tests/coretests/src/android/os/OWNERS @@ -5,4 +5,7 @@ per-file BrightnessLimit.java = michaelwr@google.com, santoscordon@google.com per-file *Vibrat*.java = file:/services/core/java/com/android/server/vibrator/OWNERS # Power -per-file PowerManager*.java = michaelwr@google.com, santoscordon@google.com
\ No newline at end of file +per-file PowerManager*.java = michaelwr@google.com, santoscordon@google.com + +# PerformanceHintManager +per-file PerformanceHintManagerTest.java = file:/ADPF_OWNERS diff --git a/core/tests/coretests/src/com/android/internal/content/OWNERS b/core/tests/coretests/src/com/android/internal/content/OWNERS index dd9ede53239c..4bb83438b193 100644 --- a/core/tests/coretests/src/com/android/internal/content/OWNERS +++ b/core/tests/coretests/src/com/android/internal/content/OWNERS @@ -1,4 +1,2 @@ -per-file PackageMonitorTest.java = file:/core/java/android/content/pm/OWNERS - per-file Overlay* = file:/core/java/android/content/res/OWNERS diff --git a/core/tests/packagemonitortests/OWNERS b/core/tests/packagemonitortests/OWNERS new file mode 100644 index 000000000000..d825dfd7cf00 --- /dev/null +++ b/core/tests/packagemonitortests/OWNERS @@ -0,0 +1 @@ +include /services/core/java/com/android/server/pm/OWNERS diff --git a/media/java/android/media/tv/tuner/Tuner.java b/media/java/android/media/tv/tuner/Tuner.java index 13f7ee6e8c8b..e6bcc95fd1b5 100644 --- a/media/java/android/media/tv/tuner/Tuner.java +++ b/media/java/android/media/tv/tuner/Tuner.java @@ -443,6 +443,12 @@ public class Tuner implements AutoCloseable { acquireTRMSLock("shareFrontendFromTuner()"); mFrontendLock.lock(); try { + if (mFeOwnerTuner != null) { + // unregister self from the Frontend callback + mFeOwnerTuner.unregisterFrontendCallbackListener(this); + mFeOwnerTuner = null; + nativeUnshareFrontend(); + } mTunerResourceManager.shareFrontend(mClientId, tuner.mClientId); mFeOwnerTuner = tuner; mFeOwnerTuner.registerFrontendCallbackListener(this); diff --git a/native/android/OWNERS b/native/android/OWNERS index cfe973400c98..884f849feb6b 100644 --- a/native/android/OWNERS +++ b/native/android/OWNERS @@ -23,3 +23,6 @@ per-file hardware_buffer_jni.cpp = file:/graphics/java/android/graphics/OWNERS per-file native_window_jni.cpp = file:/graphics/java/android/graphics/OWNERS per-file surface_control.cpp = file:/graphics/java/android/graphics/OWNERS per-file surface_texture.cpp = file:/graphics/java/android/graphics/OWNERS + +# PerformanceHint +per-file performance_hint.cpp = file:/ADPF_OWNERS diff --git a/native/android/tests/performance_hint/OWNERS b/native/android/tests/performance_hint/OWNERS new file mode 100644 index 000000000000..e3bbee92057d --- /dev/null +++ b/native/android/tests/performance_hint/OWNERS @@ -0,0 +1 @@ +include /ADPF_OWNERS diff --git a/packages/EasterEgg/src/com/android/egg/quares/Quare.kt b/packages/EasterEgg/src/com/android/egg/quares/Quare.kt index eb77362a0be2..f0cc2a1eac93 100644 --- a/packages/EasterEgg/src/com/android/egg/quares/Quare.kt +++ b/packages/EasterEgg/src/com/android/egg/quares/Quare.kt @@ -137,14 +137,12 @@ class Quare(val width: Int, val height: Int, val depth: Int) : Parcelable { return 0 } - override fun writeToParcel(p: Parcel?, flags: Int) { - p?.let { - p.writeInt(width) - p.writeInt(height) - p.writeInt(depth) - p.writeIntArray(data) - p.writeIntArray(user) - } + override fun writeToParcel(p: Parcel, flags: Int) { + p.writeInt(width) + p.writeInt(height) + p.writeInt(depth) + p.writeIntArray(data) + p.writeIntArray(user) } companion object CREATOR : Parcelable.Creator<Quare> { diff --git a/packages/EasterEgg/src/com/android/egg/quares/QuaresActivity.kt b/packages/EasterEgg/src/com/android/egg/quares/QuaresActivity.kt index 578de01a0c30..5fa61373a686 100644 --- a/packages/EasterEgg/src/com/android/egg/quares/QuaresActivity.kt +++ b/packages/EasterEgg/src/com/android/egg/quares/QuaresActivity.kt @@ -60,8 +60,8 @@ class QuaresActivity : Activity() { setContentView(R.layout.activity_quares) - grid = findViewById(R.id.grid) - label = findViewById(R.id.label) + grid = requireViewById(R.id.grid) + label = requireViewById(R.id.label) if (savedInstanceState != null) { Log.v(TAG, "restoring puzzle from state") @@ -135,7 +135,7 @@ class QuaresActivity : Activity() { if (q.check()) { val dp = resources.displayMetrics.density - val label: Button = findViewById(R.id.label) + val label: Button = requireViewById(R.id.label) label.text = resName.replace(Regex("^.*/"), "") val drawable = icon?.loadDrawable(this)?.also { it.setBounds(0, 0, (32 * dp).toInt(), (32 * dp).toInt()) diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt b/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt index faea5b2c3e71..61a45f79691b 100644 --- a/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt +++ b/packages/SettingsLib/src/com/android/settingslib/graph/ThemedBatteryDrawable.kt @@ -324,7 +324,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int) return batteryLevel } - override fun onBoundsChange(bounds: Rect?) { + override fun onBoundsChange(bounds: Rect) { super.onBoundsChange(bounds) updateSize() } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifPipelineChoreographer.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifPipelineChoreographer.kt index 4ebf33739faa..ad22c618a827 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifPipelineChoreographer.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifPipelineChoreographer.kt @@ -51,7 +51,7 @@ interface NotifPipelineChoreographer { object NotifPipelineChoreographerModule @Module -private interface PrivateModule { +interface PrivateModule { @Binds fun bindChoreographer(impl: NotifPipelineChoreographerImpl): NotifPipelineChoreographer } @@ -59,7 +59,7 @@ private interface PrivateModule { private const val TIMEOUT_MS: Long = 100 @SysUISingleton -private class NotifPipelineChoreographerImpl @Inject constructor( +class NotifPipelineChoreographerImpl @Inject constructor( private val viewChoreographer: Choreographer, @Main private val executor: DelayableExecutor ) : NotifPipelineChoreographer { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt index aeeeb4fb054d..9ba1f7aa2f66 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/SensitiveContentCoordinator.kt @@ -38,7 +38,7 @@ import javax.inject.Inject interface SensitiveContentCoordinatorModule @Module -private interface PrivateSensitiveContentCoordinatorModule { +interface PrivateSensitiveContentCoordinatorModule { @Binds fun bindCoordinator(impl: SensitiveContentCoordinatorImpl): SensitiveContentCoordinator } @@ -47,7 +47,7 @@ private interface PrivateSensitiveContentCoordinatorModule { interface SensitiveContentCoordinator : Coordinator @CoordinatorScope -private class SensitiveContentCoordinatorImpl @Inject constructor( +class SensitiveContentCoordinatorImpl @Inject constructor( private val dynamicPrivacyController: DynamicPrivacyController, private val lockscreenUserManager: NotificationLockscreenUserManager, private val keyguardUpdateMonitor: KeyguardUpdateMonitor, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/dagger/CoordinatorsModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/dagger/CoordinatorsModule.kt index 357c5b219fa2..c00bb93ff66e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/dagger/CoordinatorsModule.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/dagger/CoordinatorsModule.kt @@ -50,7 +50,7 @@ interface CoordinatorsSubcomponent { @Module(includes = [ SensitiveContentCoordinatorModule::class, ]) -private abstract class InternalCoordinatorsModule { +abstract class InternalCoordinatorsModule { @Binds @Internal abstract fun bindNotifCoordinators(impl: NotifCoordinatorsImpl): NotifCoordinators diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt index 7b59266e207a..49990d9c559e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt @@ -38,7 +38,7 @@ interface SectionHeaderController { } @SectionHeaderScope -internal class SectionHeaderNodeControllerImpl @Inject constructor( +class SectionHeaderNodeControllerImpl @Inject constructor( @NodeLabel override val nodeLabel: String, private val layoutInflater: LayoutInflater, @HeaderText @StringRes private val headerTextResId: Int, @@ -103,4 +103,4 @@ internal class SectionHeaderNodeControllerImpl @Inject constructor( override fun offerToKeepInParentForAnimation(): Boolean = false override fun removeFromParentIfKeptForAnimation(): Boolean = false override fun resetKeepInParentForAnimation() {} -}
\ No newline at end of file +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationSectionHeadersModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationSectionHeadersModule.kt index 2a9cfd034dce..75801a8db65d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationSectionHeadersModule.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationSectionHeadersModule.kt @@ -145,7 +145,7 @@ interface SectionHeaderControllerSubcomponent { } @Module -private abstract class SectionHeaderBindingModule { +abstract class SectionHeaderBindingModule { @Binds abstract fun bindsNodeController(impl: SectionHeaderNodeControllerImpl): NodeController @Binds abstract fun bindsSectionHeaderController( impl: SectionHeaderNodeControllerImpl @@ -182,4 +182,4 @@ annotation class HeaderClickAction @Scope @Retention(AnnotationRetention.BINARY) -annotation class SectionHeaderScope
\ No newline at end of file +annotation class SectionHeaderScope diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt index 7b654545183a..55ca0ab0de05 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt @@ -57,7 +57,7 @@ interface KeyguardNotificationVisibilityProvider { object KeyguardNotificationVisibilityProviderModule @Module -private interface KeyguardNotificationVisibilityProviderImplModule { +interface KeyguardNotificationVisibilityProviderImplModule { @Binds fun bindImpl(impl: KeyguardNotificationVisibilityProviderImpl): KeyguardNotificationVisibilityProvider @@ -69,7 +69,7 @@ private interface KeyguardNotificationVisibilityProviderImplModule { } @SysUISingleton -private class KeyguardNotificationVisibilityProviderImpl @Inject constructor( +class KeyguardNotificationVisibilityProviderImpl @Inject constructor( @Main private val handler: Handler, private val keyguardStateController: KeyguardStateController, private val lockscreenUserManager: NotificationLockscreenUserManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/RemoteInput.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/RemoteInput.kt index d4abc40c4ff8..d31c00120866 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/RemoteInput.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/RemoteInput.kt @@ -41,7 +41,7 @@ interface RemoteInputViewSubcomponent { } @Module -private interface InternalRemoteInputViewModule { +interface InternalRemoteInputViewModule { @Binds fun bindController(impl: RemoteInputViewControllerImpl): RemoteInputViewController } diff --git a/services/core/java/com/android/server/power/hint/OWNERS b/services/core/java/com/android/server/power/hint/OWNERS new file mode 100644 index 000000000000..c28c07a234b3 --- /dev/null +++ b/services/core/java/com/android/server/power/hint/OWNERS @@ -0,0 +1,2 @@ +include /ADPF_OWNERS + diff --git a/services/core/java/com/android/server/security/rkp/RemoteProvisioningShellCommand.java b/services/core/java/com/android/server/security/rkp/RemoteProvisioningShellCommand.java index bc3908452bc1..187b93931f0b 100644 --- a/services/core/java/com/android/server/security/rkp/RemoteProvisioningShellCommand.java +++ b/services/core/java/com/android/server/security/rkp/RemoteProvisioningShellCommand.java @@ -49,7 +49,7 @@ class RemoteProvisioningShellCommand extends ShellCommand { + " Show this message.\n" + "dump\n" + " Dump service diagnostics.\n" - + "list [--min-version MIN_VERSION]\n" + + "list\n" + " List the names of the IRemotelyProvisionedComponent instances.\n" + "csr [--challenge CHALLENGE] NAME\n" + " Generate and print a base64-encoded CSR from the named\n" diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 91c0c6953a9a..bda0a0f57ed7 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -5748,7 +5748,7 @@ class Task extends TaskFragment { false /* deferResume */); ActivityRecord topActivity = getDisplayArea().topRunningActivity(); - Task topRootTask = topActivity.getRootTask(); + Task topRootTask = topActivity == null ? null : topActivity.getRootTask(); if (topRootTask != null && topRootTask != this && topActivity.isState(RESUMED)) { // Usually resuming a top activity triggers the next app transition, but nothing's got // resumed in this case, so we need to execute it explicitly. diff --git a/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp b/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp index af5718f076d6..9f1113cd4c69 100644 --- a/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp +++ b/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp @@ -224,6 +224,7 @@ public: // process_madvise on failure int madviseVmasFromBatch(unique_fd& pidfd, VmaBatch& batch, int madviseType, uint64_t* outBytesProcessed) { + static const size_t kPageSize = getpagesize(); if (batch.totalVmas == 0 || batch.totalBytes == 0) { // No VMAs in Batch, skip. *outBytesProcessed = 0; @@ -249,7 +250,7 @@ int madviseVmasFromBatch(unique_fd& pidfd, VmaBatch& batch, int madviseType, } else if (bytesProcessedInSend < batch.totalBytes) { // Partially processed the bytes requested // skip last page which is where it failed. - bytesProcessedInSend += PAGE_SIZE; + bytesProcessedInSend += kPageSize; } bytesProcessedInSend = consumeBytes(batch, bytesProcessedInSend); diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 318b01aad076..34a901c69f77 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -244,7 +244,8 @@ public class CarrierConfigManager { /** * Boolean indicating if the "Caller ID" item is visible in the Additional Settings menu. * true means visible. false means gone. - * @hide + * + * The default value is true. */ public static final String KEY_ADDITIONAL_SETTINGS_CALLER_ID_VISIBILITY_BOOL = "additional_settings_caller_id_visibility_bool"; @@ -252,7 +253,8 @@ public class CarrierConfigManager { /** * Boolean indicating if the "Call Waiting" item is visible in the Additional Settings menu. * true means visible. false means gone. - * @hide + * + * The default value is true. */ public static final String KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL = "additional_settings_call_waiting_visibility_bool"; diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.java b/telephony/java/android/telephony/PhysicalChannelConfig.java index 212aaaed46b2..2c6d457916f1 100644 --- a/telephony/java/android/telephony/PhysicalChannelConfig.java +++ b/telephony/java/android/telephony/PhysicalChannelConfig.java @@ -37,15 +37,26 @@ public final class PhysicalChannelConfig implements Parcelable { /** * UE has connection to cell for signalling and possibly data (3GPP 36.331, 25.331). + * + * @deprecated Use {@link CellInfo#CONNECTION_PRIMARY_SERVING} instead. */ + @Deprecated public static final int CONNECTION_PRIMARY_SERVING = 1; /** * UE has connection to cell for data (3GPP 36.331, 25.331). + * + * @deprecated Use {@link CellInfo#CONNECTION_SECONDARY_SERVING} instead. */ + @Deprecated public static final int CONNECTION_SECONDARY_SERVING = 2; - /** Connection status is unknown. */ + /** + * Connection status is unknown. + * + * @deprecated Use {@link CellInfo#CONNECTION_UNKNOWN} instead. + */ + @Deprecated public static final int CONNECTION_UNKNOWN = -1; /** Channel number is unknown. */ diff --git a/tests/AttestationVerificationTest/src/android/security/attestationverification/PeerDeviceSystemAttestationVerificationTest.kt b/tests/AttestationVerificationTest/src/android/security/attestationverification/PeerDeviceSystemAttestationVerificationTest.kt index 32c2230e4880..ad95fbc36867 100644 --- a/tests/AttestationVerificationTest/src/android/security/attestationverification/PeerDeviceSystemAttestationVerificationTest.kt +++ b/tests/AttestationVerificationTest/src/android/security/attestationverification/PeerDeviceSystemAttestationVerificationTest.kt @@ -39,7 +39,7 @@ class PeerDeviceSystemAttestationVerificationTest { @Before fun setup() { rule.getScenario().onActivity { - avm = it.getSystemService(AttestationVerificationManager::class.java) + avm = it.getSystemService(AttestationVerificationManager::class.java)!! activity = it } invalidAttestationByteArray = TEST_ATTESTATION_CERT_FILENAME.fromPEMFileToByteArray() diff --git a/tests/AttestationVerificationTest/src/android/security/attestationverification/SystemAttestationVerificationTest.kt b/tests/AttestationVerificationTest/src/android/security/attestationverification/SystemAttestationVerificationTest.kt index 169effaa45ca..8f06b4a2ea0a 100644 --- a/tests/AttestationVerificationTest/src/android/security/attestationverification/SystemAttestationVerificationTest.kt +++ b/tests/AttestationVerificationTest/src/android/security/attestationverification/SystemAttestationVerificationTest.kt @@ -43,7 +43,7 @@ class SystemAttestationVerificationTest { @Before fun setup() { rule.getScenario().onActivity { - avm = it.getSystemService(AttestationVerificationManager::class.java) + avm = it.getSystemService(AttestationVerificationManager::class.java)!! activity = it androidKeystore = KeyStore.getInstance(ANDROID_KEYSTORE).apply { load(null) } } diff --git a/tests/Input/src/com/android/test/input/AnrTest.kt b/tests/Input/src/com/android/test/input/AnrTest.kt index 8025406499d8..1355fd245f28 100644 --- a/tests/Input/src/com/android/test/input/AnrTest.kt +++ b/tests/Input/src/com/android/test/input/AnrTest.kt @@ -134,7 +134,7 @@ class AnrTest { private fun getExitReasons(): List<ApplicationExitInfo> { lateinit var infos: List<ApplicationExitInfo> instrumentation.runOnMainSync { - val am = instrumentation.getContext().getSystemService(ActivityManager::class.java) + val am = instrumentation.getContext().getSystemService(ActivityManager::class.java)!! infos = am.getHistoricalProcessExitReasons(PACKAGE_NAME, ALL_PIDS, NO_MAX) } return infos diff --git a/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt b/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt index d83a4570fedc..29d5c7754d85 100644 --- a/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt +++ b/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt @@ -47,6 +47,6 @@ class UnresponsiveGestureMonitorActivity : Activity() { super.onCreate(savedInstanceState) mInputMonitor = InputManager.getInstance().monitorGestureInput(MONITOR_NAME, displayId) mInputEventReceiver = UnresponsiveReceiver( - mInputMonitor.getInputChannel(), Looper.myLooper()) + mInputMonitor.getInputChannel(), Looper.myLooper()!!) } } diff --git a/tests/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt b/tests/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt index 9d17d38d4298..4d38660e6029 100644 --- a/tests/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt +++ b/tests/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt @@ -132,7 +132,7 @@ class BackgroundBlurActivity : Activity(), SeekBar.OnSeekBarChangeListener { mBlurForceDisabled = disabled Settings.Global.putInt(getContentResolver(), Settings.Global.DISABLE_WINDOW_BLURS, if (mBlurForceDisabled) 1 else 0) - (findViewById(R.id.toggle_blur_enabled) as Button) + (requireViewById(R.id.toggle_blur_enabled) as Button) .setText(if (mBlurForceDisabled) "Enable blurs" else "Disable blurs") } @@ -142,13 +142,13 @@ class BackgroundBlurActivity : Activity(), SeekBar.OnSeekBarChangeListener { fun setBackgroundBlur(radius: Int) { mBackgroundBlurRadius = radius - (findViewById(R.id.background_blur_radius) as TextView).setText(radius.toString()) + (requireViewById(R.id.background_blur_radius) as TextView).setText(radius.toString()) window.setBackgroundBlurRadius(mBackgroundBlurRadius) } fun setBlurBehind(radius: Int) { mBlurBehindRadius = radius - (findViewById(R.id.blur_behind_radius) as TextView).setText(radius.toString()) + (requireViewById(R.id.blur_behind_radius) as TextView).setText(radius.toString()) window.getAttributes().setBlurBehindRadius(mBlurBehindRadius) window.setAttributes(window.getAttributes()) } @@ -159,7 +159,7 @@ class BackgroundBlurActivity : Activity(), SeekBar.OnSeekBarChangeListener { } else { mDimAmountNoBlur = amount } - (findViewById(R.id.dim_amount) as TextView).setText("%.2f".format(amount)) + (requireViewById(R.id.dim_amount) as TextView).setText("%.2f".format(amount)) window.getAttributes().dimAmount = amount window.setAttributes(window.getAttributes()) } @@ -168,7 +168,7 @@ class BackgroundBlurActivity : Activity(), SeekBar.OnSeekBarChangeListener { mBatterySavingModeOn = on Settings.Global.putInt(getContentResolver(), Settings.Global.LOW_POWER_MODE, if (on) 1 else 0) - (findViewById(R.id.toggle_battery_saving_mode) as Button).setText( + (requireViewById(R.id.toggle_battery_saving_mode) as Button).setText( if (on) "Exit low power mode" else "Enter low power mode") } @@ -182,7 +182,7 @@ class BackgroundBlurActivity : Activity(), SeekBar.OnSeekBarChangeListener { } else { mAlphaNoBlur = alpha } - (findViewById(R.id.background_alpha) as TextView).setText("%.2f".format(alpha)) + (requireViewById(R.id.background_alpha) as TextView).setText("%.2f".format(alpha)) mBackgroundDrawable.setAlpha((alpha * 255f).toInt()) getWindowManager().updateViewLayout(window.getDecorView(), window.getAttributes()) } |