summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp1
-rwxr-xr-xapi/current.txt1
-rw-r--r--api/system-current.txt123
-rw-r--r--cmds/bootanimation/BootAnimation.cpp49
-rw-r--r--cmds/bootanimation/BootAnimation.h4
-rw-r--r--cmds/incident_helper/tests/KernelWakesParser_test.cpp12
-rw-r--r--core/java/android/accessibilityservice/AccessibilityServiceInfo.java33
-rw-r--r--core/java/android/app/Activity.java14
-rw-r--r--core/java/android/app/ActivityManagerInternal.java5
-rw-r--r--core/java/android/app/ActivityThread.java51
-rw-r--r--core/java/android/app/ResourcesManager.java53
-rw-r--r--core/java/android/app/VrManager.java2
-rw-r--r--core/java/android/app/admin/DeviceAdminReceiver.java2
-rw-r--r--core/java/android/app/admin/SystemUpdatePolicy.java3
-rw-r--r--core/java/android/app/assist/AssistStructure.java13
-rw-r--r--core/java/android/appwidget/AppWidgetManagerInternal.java12
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java20
-rw-r--r--core/java/android/bluetooth/BluetoothManager.java1
-rw-r--r--core/java/android/content/ContentProvider.java53
-rw-r--r--core/java/android/content/ContentProviderOperation.java16
-rw-r--r--core/java/android/content/Context.java9
-rw-r--r--core/java/android/content/pm/ShortcutManager.java272
-rw-r--r--core/java/android/database/sqlite/SQLiteDebug.java2
-rw-r--r--core/java/android/net/NetworkCapabilities.java2
-rw-r--r--core/java/android/net/TrafficStats.java10
-rw-r--r--core/java/android/net/http/X509TrustManagerExtensions.java2
-rwxr-xr-xcore/java/android/os/Build.java30
-rw-r--r--core/java/android/os/HwBinder.java21
-rw-r--r--core/java/android/os/IHwBinder.java9
-rw-r--r--core/java/android/os/IHwInterface.java1
-rw-r--r--core/java/android/os/INetworkManagementService.aidl6
-rw-r--r--core/java/android/os/Message.java2
-rw-r--r--core/java/android/os/Parcel.java10
-rw-r--r--core/java/android/os/StatsLogEventWrapper.java21
-rw-r--r--core/java/android/os/SystemUpdateManager.java13
-rw-r--r--core/java/android/os/UpdateEngine.java12
-rw-r--r--core/java/android/os/UpdateEngineCallback.java2
-rw-r--r--core/java/android/preference/PreferenceActivity.java2
-rw-r--r--core/java/android/provider/Settings.java9
-rw-r--r--core/java/android/service/autofill/Dataset.java13
-rw-r--r--core/java/android/service/autofill/FillCallback.java7
-rw-r--r--core/java/android/service/notification/Condition.java32
-rw-r--r--core/java/android/service/notification/ConditionProviderService.java2
-rw-r--r--core/java/android/service/notification/ZenModeConfig.java40
-rw-r--r--core/java/android/service/textclassifier/TextClassifierService.java3
-rw-r--r--core/java/android/util/SparseArray.java36
-rw-r--r--core/java/android/view/DisplayCutout.java24
-rw-r--r--core/java/android/view/ViewStructure.java7
-rw-r--r--core/java/android/view/WindowManager.java15
-rw-r--r--core/java/android/view/accessibility/AccessibilityRecord.java2
-rw-r--r--core/java/android/view/autofill/AutofillManager.java53
-rw-r--r--core/java/android/webkit/WebBackForwardList.java3
-rw-r--r--core/java/android/webkit/WebHistoryItem.java12
-rw-r--r--core/java/android/webkit/WebSettings.java8
-rw-r--r--core/java/android/webkit/WebView.java6
-rw-r--r--core/java/android/webkit/WebViewClient.java60
-rw-r--r--core/java/android/widget/AbsListView.java2
-rw-r--r--core/java/com/android/internal/app/AssistUtils.java21
-rw-r--r--core/java/com/android/internal/app/IntentForwarderActivity.java80
-rw-r--r--core/java/com/android/internal/os/BatteryStatsImpl.java4
-rw-r--r--core/java/com/android/internal/widget/MessagingLinearLayout.java9
-rw-r--r--core/java/com/android/server/SystemConfig.java19
-rw-r--r--core/jni/Android.bp1
-rw-r--r--core/jni/android_app_ActivityThread.cpp55
-rw-r--r--core/jni/android_view_DisplayListCanvas.cpp22
-rw-r--r--core/jni/com_android_internal_net_NetworkStatsFactory.cpp1
-rw-r--r--core/res/AndroidManifest.xml86
-rw-r--r--core/res/res/values-mcc214-mnc01/config.xml4
-rw-r--r--core/res/res/values-mcc234-mnc15/config.xml25
-rw-r--r--core/res/res/values-mcc234-mnc91/config.xml25
-rw-r--r--core/res/res/values-mcc302-mnc220/config.xml2
-rw-r--r--core/res/res/values-mcc302-mnc221/config.xml2
-rw-r--r--core/res/res/values-mcc302-mnc370/config.xml2
-rw-r--r--core/res/res/values-mcc302-mnc610/config.xml2
-rw-r--r--core/res/res/values-mcc302-mnc640/config.xml2
-rw-r--r--core/res/res/values-mcc302-mnc720/config.xml2
-rw-r--r--core/res/res/values/config.xml24
-rw-r--r--core/res/res/values/dimens.xml9
-rw-r--r--core/res/res/values/symbols.xml9
-rw-r--r--core/res/res/values/themes.xml1
-rw-r--r--core/res/res/values/themes_holo.xml3
-rw-r--r--core/tests/coretests/src/android/provider/SettingsBackupTest.java1
-rw-r--r--core/tests/coretests/src/android/view/DisplayCutoutTest.java14
-rw-r--r--core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java205
-rw-r--r--graphics/java/android/graphics/Canvas.java6
-rw-r--r--keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java11
-rw-r--r--keystore/java/android/security/keystore/AttestationUtils.java38
-rw-r--r--libs/androidfw/LocaleData.cpp14
-rw-r--r--libs/androidfw/LocaleDataTables.cpp1454
-rw-r--r--libs/hwui/hwui/Bitmap.cpp2
-rw-r--r--location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java3
-rw-r--r--media/java/android/media/AudioFocusInfo.java7
-rw-r--r--media/java/android/media/MediaCodec.java2
-rw-r--r--media/java/android/media/audiopolicy/AudioMix.java17
-rw-r--r--media/java/android/media/audiopolicy/AudioMixingRule.java9
-rw-r--r--media/java/android/media/audiopolicy/AudioPolicy.java25
-rw-r--r--media/java/android/media/tv/TvInputManager.java1
-rw-r--r--media/jni/android_media_MediaExtractor.cpp16
-rw-r--r--media/jni/audioeffect/android_media_Visualizer.cpp1
-rw-r--r--native/android/libandroid.map.txt4
-rw-r--r--native/android/libandroid_net.map.txt9
-rw-r--r--native/android/net.c28
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java67
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothManager.java12
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/dream/DreamBackend.java12
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java2
-rw-r--r--packages/SystemUI/res/layout/navigation_layout.xml12
-rw-r--r--packages/SystemUI/res/layout/navigation_layout_rot90.xml20
-rw-r--r--packages/SystemUI/res/values/dimens.xml6
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java11
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/ScreenDecorations.java229
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/PowerUI.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSPanel.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java21
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java13
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java47
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java18
-rw-r--r--packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml2
-rw-r--r--packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml2
-rw-r--r--packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml2
-rw-r--r--packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml2
-rw-r--r--packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml2
-rw-r--r--proto/src/gnss.proto3
-rw-r--r--proto/src/metrics_constants.proto304
-rw-r--r--proto/src/wifi.proto33
-rw-r--r--services/appwidget/java/com/android/server/appwidget/AppWidgetService.java5
-rw-r--r--services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java16
-rw-r--r--services/autofill/java/com/android/server/autofill/ui/SaveUi.java9
-rw-r--r--services/core/Android.bp3
-rw-r--r--services/core/java/com/android/server/BatteryService.java2
-rw-r--r--services/core/java/com/android/server/NetworkManagementService.java12
-rw-r--r--services/core/java/com/android/server/PinnerService.java80
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerConstants.java38
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java58
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerShellCommand.java1
-rw-r--r--services/core/java/com/android/server/am/ActivityMetricsLogger.java132
-rw-r--r--services/core/java/com/android/server/am/ActivityRecord.java8
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java2
-rw-r--r--services/core/java/com/android/server/am/ActivityStartController.java13
-rw-r--r--services/core/java/com/android/server/am/ActivityStarter.java76
-rw-r--r--services/core/java/com/android/server/am/AppErrors.java3
-rw-r--r--services/core/java/com/android/server/am/PendingIntentRecord.java8
-rw-r--r--services/core/java/com/android/server/am/ProcessList.java5
-rw-r--r--services/core/java/com/android/server/am/ProcessRecord.java10
-rw-r--r--services/core/java/com/android/server/am/UserController.java14
-rw-r--r--services/core/java/com/android/server/display/DisplayDeviceInfo.java9
-rw-r--r--services/core/java/com/android/server/display/DisplayManagerService.java45
-rw-r--r--services/core/java/com/android/server/display/LocalDisplayAdapter.java4
-rw-r--r--services/core/java/com/android/server/display/LogicalDisplay.java61
-rw-r--r--services/core/java/com/android/server/net/NetworkStatsService.java8
-rw-r--r--services/core/java/com/android/server/notification/ConditionProviders.java1
-rw-r--r--services/core/java/com/android/server/notification/ManagedServices.java10
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java18
-rw-r--r--services/core/java/com/android/server/notification/ZenLog.java3
-rw-r--r--services/core/java/com/android/server/notification/ZenModeConditions.java29
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java54
-rw-r--r--services/core/java/com/android/server/om/OverlayManagerService.java23
-rw-r--r--services/core/java/com/android/server/pm/PackageDexOptimizer.java10
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java7
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerShellCommand.java32
-rw-r--r--services/core/java/com/android/server/pm/dex/ArtManagerService.java9
-rw-r--r--services/core/java/com/android/server/policy/BarController.java2
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java25
-rw-r--r--services/core/java/com/android/server/trust/TrustManagerService.java16
-rw-r--r--services/core/java/com/android/server/wm/BoundsAnimationController.java9
-rw-r--r--services/core/java/com/android/server/wm/DisplayContent.java9
-rw-r--r--services/core/java/com/android/server/wm/ForcedSeamlessRotator.java11
-rw-r--r--services/core/java/com/android/server/wm/ScreenRotationAnimation.java7
-rw-r--r--services/core/java/com/android/server/wm/TaskSnapshotPersister.java3
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java12
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java4
-rw-r--r--services/core/java/com/android/server/wm/utils/InsetUtils.java27
-rw-r--r--services/core/jni/com_android_server_net_NetworkStatsService.cpp1
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java10
-rw-r--r--services/java/com/android/server/SystemServer.java11
-rw-r--r--services/net/java/android/net/apf/ApfFilter.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java52
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java29
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java35
-rw-r--r--startop/view_compiler/config.xml25
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java2
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java2
-rw-r--r--telephony/java/android/telephony/SmsManager.java1
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java6
-rw-r--r--telephony/java/android/telephony/SubscriptionPlan.java1
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java45
-rw-r--r--telephony/java/android/telephony/data/DataServiceCallback.java1
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl13
-rw-r--r--test-base/Android.bp2
-rw-r--r--test-runner/Android.bp2
-rw-r--r--test-runner/api/current.txt4
-rw-r--r--tests/net/java/android/net/NetworkCapabilitiesTest.java11
-rw-r--r--tests/net/java/android/net/apf/ApfTest.java41
-rw-r--r--tests/net/jni/apf_jni.cpp101
-rw-r--r--tests/net/res/raw/apfPcap.pcapbin0 -> 101547 bytes
-rw-r--r--tools/aapt2/configuration/ConfigurationParser_test.cpp4
-rwxr-xr-xtools/localedata/extract_icu_data.py2
-rw-r--r--wifi/java/android/net/wifi/WifiEnterpriseConfig.java11
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java1
209 files changed, 3741 insertions, 2022 deletions
diff --git a/Android.bp b/Android.bp
index cd7f98dbd777..7818d3dba938 100644
--- a/Android.bp
+++ b/Android.bp
@@ -655,7 +655,6 @@ java_defaults {
"frameworks/av/media/libaudioclient/aidl",
"frameworks/native/aidl/gui",
"system/core/storaged/binder",
- "system/netd/server/binder",
"system/vold/binder",
"system/bt/binder",
"system/security/keystore/binder",
diff --git a/api/current.txt b/api/current.txt
index e4f95fd1719f..7b48a5b60dc3 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -42087,6 +42087,7 @@ package android.telephony {
field public static final java.lang.String KEY_CALL_FORWARDING_BLOCKS_WHILE_ROAMING_STRING_ARRAY = "call_forwarding_blocks_while_roaming_string_array";
field public static final java.lang.String KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL = "carrier_allow_turnoff_ims_bool";
field public static final java.lang.String KEY_CARRIER_CALL_SCREENING_APP_STRING = "call_screening_app";
+ field public static final java.lang.String KEY_CARRIER_CONFIG_VERSION_STRING = "carrier_config_version_string";
field public static final java.lang.String KEY_CARRIER_DATA_CALL_PERMANENT_FAILURE_STRINGS = "carrier_data_call_permanent_failure_strings";
field public static final java.lang.String KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT = "carrier_default_wfc_ims_mode_int";
field public static final java.lang.String KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT = "carrier_default_wfc_ims_roaming_mode_int";
diff --git a/api/system-current.txt b/api/system-current.txt
index 18ff66c0c500..fd2e05e9e7d1 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -4,7 +4,6 @@ package android {
field public static final java.lang.String ACCESS_AMBIENT_LIGHT_STATS = "android.permission.ACCESS_AMBIENT_LIGHT_STATS";
field public static final java.lang.String ACCESS_BROADCAST_RADIO = "android.permission.ACCESS_BROADCAST_RADIO";
field public static final java.lang.String ACCESS_CACHE_FILESYSTEM = "android.permission.ACCESS_CACHE_FILESYSTEM";
- field public static final java.lang.String ACCESS_CHECKIN_PROPERTIES = "android.permission.ACCESS_CHECKIN_PROPERTIES";
field public static final java.lang.String ACCESS_DRM_CERTIFICATES = "android.permission.ACCESS_DRM_CERTIFICATES";
field public static final deprecated java.lang.String ACCESS_FM_RADIO = "android.permission.ACCESS_FM_RADIO";
field public static final java.lang.String ACCESS_MOCK_LOCATION = "android.permission.ACCESS_MOCK_LOCATION";
@@ -13,13 +12,10 @@ package android {
field public static final java.lang.String ACCESS_NOTIFICATIONS = "android.permission.ACCESS_NOTIFICATIONS";
field public static final java.lang.String ACCESS_SHORTCUTS = "android.permission.ACCESS_SHORTCUTS";
field public static final java.lang.String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER";
- field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
field public static final java.lang.String ACTIVITY_EMBEDDING = "android.permission.ACTIVITY_EMBEDDING";
field public static final java.lang.String ALLOCATE_AGGRESSIVE = "android.permission.ALLOCATE_AGGRESSIVE";
field public static final java.lang.String ALLOW_ANY_CODEC_FOR_PLAYBACK = "android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK";
field public static final java.lang.String BACKUP = "android.permission.BACKUP";
- field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
- field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
field public static final deprecated java.lang.String BIND_CONNECTION_SERVICE = "android.permission.BIND_CONNECTION_SERVICE";
field public static final java.lang.String BIND_DIRECTORY_SEARCH = "android.permission.BIND_DIRECTORY_SEARCH";
field public static final java.lang.String BIND_EUICC_SERVICE = "android.permission.BIND_EUICC_SERVICE";
@@ -28,7 +24,6 @@ package android {
field public static final java.lang.String BIND_NETWORK_RECOMMENDATION_SERVICE = "android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE";
field public static final java.lang.String BIND_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE";
field public static final java.lang.String BIND_PRINT_RECOMMENDATION_SERVICE = "android.permission.BIND_PRINT_RECOMMENDATION_SERVICE";
- field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
field public static final java.lang.String BIND_RESOLVER_RANKER_SERVICE = "android.permission.BIND_RESOLVER_RANKER_SERVICE";
field public static final java.lang.String BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE = "android.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE";
field public static final java.lang.String BIND_SETTINGS_SUGGESTIONS_SERVICE = "android.permission.BIND_SETTINGS_SUGGESTIONS_SERVICE";
@@ -38,20 +33,13 @@ package android {
field public static final java.lang.String BIND_TEXTCLASSIFIER_SERVICE = "android.permission.BIND_TEXTCLASSIFIER_SERVICE";
field public static final java.lang.String BIND_TRUST_AGENT = "android.permission.BIND_TRUST_AGENT";
field public static final java.lang.String BIND_TV_REMOTE_SERVICE = "android.permission.BIND_TV_REMOTE_SERVICE";
- field public static final java.lang.String BLUETOOTH_PRIVILEGED = "android.permission.BLUETOOTH_PRIVILEGED";
field public static final java.lang.String BRICK = "android.permission.BRICK";
field public static final java.lang.String BRIGHTNESS_SLIDER_USAGE = "android.permission.BRIGHTNESS_SLIDER_USAGE";
field public static final deprecated java.lang.String BROADCAST_NETWORK_PRIVILEGED = "android.permission.BROADCAST_NETWORK_PRIVILEGED";
- field public static final java.lang.String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
field public static final java.lang.String CAMERA_DISABLE_TRANSMIT_LED = "android.permission.CAMERA_DISABLE_TRANSMIT_LED";
field public static final java.lang.String CAPTURE_AUDIO_HOTWORD = "android.permission.CAPTURE_AUDIO_HOTWORD";
- field public static final java.lang.String CAPTURE_AUDIO_OUTPUT = "android.permission.CAPTURE_AUDIO_OUTPUT";
- field public static final java.lang.String CAPTURE_SECURE_VIDEO_OUTPUT = "android.permission.CAPTURE_SECURE_VIDEO_OUTPUT";
field public static final java.lang.String CAPTURE_TV_INPUT = "android.permission.CAPTURE_TV_INPUT";
- field public static final java.lang.String CAPTURE_VIDEO_OUTPUT = "android.permission.CAPTURE_VIDEO_OUTPUT";
field public static final java.lang.String CHANGE_APP_IDLE_STATE = "android.permission.CHANGE_APP_IDLE_STATE";
- field public static final java.lang.String CHANGE_COMPONENT_ENABLED_STATE = "android.permission.CHANGE_COMPONENT_ENABLED_STATE";
- field public static final java.lang.String CHANGE_CONFIGURATION = "android.permission.CHANGE_CONFIGURATION";
field public static final java.lang.String CHANGE_DEVICE_IDLE_TEMP_WHITELIST = "android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST";
field public static final java.lang.String CLEAR_APP_USER_DATA = "android.permission.CLEAR_APP_USER_DATA";
field public static final java.lang.String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS";
@@ -59,30 +47,21 @@ package android {
field public static final java.lang.String CONNECTIVITY_USE_RESTRICTED_NETWORKS = "android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS";
field public static final java.lang.String CONTROL_DISPLAY_SATURATION = "android.permission.CONTROL_DISPLAY_SATURATION";
field public static final java.lang.String CONTROL_INCALL_EXPERIENCE = "android.permission.CONTROL_INCALL_EXPERIENCE";
- field public static final java.lang.String CONTROL_LOCATION_UPDATES = "android.permission.CONTROL_LOCATION_UPDATES";
field public static final java.lang.String CONTROL_VPN = "android.permission.CONTROL_VPN";
field public static final java.lang.String CRYPT_KEEPER = "android.permission.CRYPT_KEEPER";
- field public static final java.lang.String DELETE_CACHE_FILES = "android.permission.DELETE_CACHE_FILES";
- field public static final java.lang.String DELETE_PACKAGES = "android.permission.DELETE_PACKAGES";
field public static final java.lang.String DEVICE_POWER = "android.permission.DEVICE_POWER";
- field public static final java.lang.String DIAGNOSTIC = "android.permission.DIAGNOSTIC";
field public static final java.lang.String DISPATCH_PROVISIONING_MESSAGE = "android.permission.DISPATCH_PROVISIONING_MESSAGE";
- field public static final java.lang.String DUMP = "android.permission.DUMP";
field public static final java.lang.String FORCE_BACK = "android.permission.FORCE_BACK";
field public static final java.lang.String FORCE_STOP_PACKAGES = "android.permission.FORCE_STOP_PACKAGES";
- field public static final java.lang.String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
field public static final java.lang.String GET_APP_OPS_STATS = "android.permission.GET_APP_OPS_STATS";
field public static final java.lang.String GET_PROCESS_STATE_AND_OOM_SCORE = "android.permission.GET_PROCESS_STATE_AND_OOM_SCORE";
field public static final java.lang.String GET_TOP_ACTIVITY_INFO = "android.permission.GET_TOP_ACTIVITY_INFO";
- field public static final java.lang.String GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH";
field public static final java.lang.String GRANT_RUNTIME_PERMISSIONS = "android.permission.GRANT_RUNTIME_PERMISSIONS";
field public static final java.lang.String HARDWARE_TEST = "android.permission.HARDWARE_TEST";
field public static final java.lang.String HDMI_CEC = "android.permission.HDMI_CEC";
field public static final java.lang.String HIDE_NON_SYSTEM_OVERLAY_WINDOWS = "android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS";
field public static final java.lang.String INJECT_EVENTS = "android.permission.INJECT_EVENTS";
field public static final java.lang.String INSTALL_GRANT_RUNTIME_PERMISSIONS = "android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS";
- field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
- field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
field public static final java.lang.String INSTALL_PACKAGE_UPDATES = "android.permission.INSTALL_PACKAGE_UPDATES";
field public static final java.lang.String INSTALL_SELF_UPDATES = "android.permission.INSTALL_SELF_UPDATES";
field public static final java.lang.String INTENT_FILTER_VERIFICATION_AGENT = "android.permission.INTENT_FILTER_VERIFICATION_AGENT";
@@ -92,7 +71,6 @@ package android {
field public static final java.lang.String INVOKE_CARRIER_SETUP = "android.permission.INVOKE_CARRIER_SETUP";
field public static final java.lang.String KILL_UID = "android.permission.KILL_UID";
field public static final java.lang.String LOCAL_MAC_ADDRESS = "android.permission.LOCAL_MAC_ADDRESS";
- field public static final java.lang.String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
field public static final java.lang.String LOOP_RADIO = "android.permission.LOOP_RADIO";
field public static final java.lang.String MANAGE_ACTIVITY_STACKS = "android.permission.MANAGE_ACTIVITY_STACKS";
field public static final java.lang.String MANAGE_APP_OPS_RESTRICTIONS = "android.permission.MANAGE_APP_OPS_RESTRICTIONS";
@@ -107,25 +85,19 @@ package android {
field public static final java.lang.String MANAGE_USB = "android.permission.MANAGE_USB";
field public static final java.lang.String MANAGE_USERS = "android.permission.MANAGE_USERS";
field public static final java.lang.String MANAGE_USER_OEM_UNLOCK_STATE = "android.permission.MANAGE_USER_OEM_UNLOCK_STATE";
- field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
- field public static final java.lang.String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
field public static final java.lang.String MODIFY_APPWIDGET_BIND_PERMISSIONS = "android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS";
field public static final java.lang.String MODIFY_AUDIO_ROUTING = "android.permission.MODIFY_AUDIO_ROUTING";
field public static final java.lang.String MODIFY_CELL_BROADCASTS = "android.permission.MODIFY_CELL_BROADCASTS";
field public static final java.lang.String MODIFY_DAY_NIGHT_MODE = "android.permission.MODIFY_DAY_NIGHT_MODE";
field public static final deprecated java.lang.String MODIFY_NETWORK_ACCOUNTING = "android.permission.MODIFY_NETWORK_ACCOUNTING";
field public static final java.lang.String MODIFY_PARENTAL_CONTROLS = "android.permission.MODIFY_PARENTAL_CONTROLS";
- field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
field public static final java.lang.String MODIFY_QUIET_MODE = "android.permission.MODIFY_QUIET_MODE";
- field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
- field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
field public static final java.lang.String MOVE_PACKAGE = "android.permission.MOVE_PACKAGE";
field public static final java.lang.String NETWORK_SETUP_WIZARD = "android.permission.NETWORK_SETUP_WIZARD";
field public static final java.lang.String NOTIFICATION_DURING_SETUP = "android.permission.NOTIFICATION_DURING_SETUP";
field public static final java.lang.String NOTIFY_TV_INPUTS = "android.permission.NOTIFY_TV_INPUTS";
field public static final java.lang.String OBSERVE_APP_USAGE = "android.permission.OBSERVE_APP_USAGE";
field public static final java.lang.String OVERRIDE_WIFI_CONFIG = "android.permission.OVERRIDE_WIFI_CONFIG";
- field public static final java.lang.String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS";
field public static final java.lang.String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT";
field public static final java.lang.String PEERS_MAC_ADDRESS = "android.permission.PEERS_MAC_ADDRESS";
field public static final java.lang.String PERFORM_CDMA_PROVISIONING = "android.permission.PERFORM_CDMA_PROVISIONING";
@@ -135,9 +107,7 @@ package android {
field public static final java.lang.String QUERY_TIME_ZONE_RULES = "android.permission.QUERY_TIME_ZONE_RULES";
field public static final java.lang.String READ_CONTENT_RATING_SYSTEMS = "android.permission.READ_CONTENT_RATING_SYSTEMS";
field public static final java.lang.String READ_DREAM_STATE = "android.permission.READ_DREAM_STATE";
- field public static final java.lang.String READ_FRAME_BUFFER = "android.permission.READ_FRAME_BUFFER";
field public static final java.lang.String READ_INSTALL_SESSIONS = "android.permission.READ_INSTALL_SESSIONS";
- field public static final java.lang.String READ_LOGS = "android.permission.READ_LOGS";
field public static final java.lang.String READ_NETWORK_USAGE_HISTORY = "android.permission.READ_NETWORK_USAGE_HISTORY";
field public static final java.lang.String READ_OEM_UNLOCK_STATE = "android.permission.READ_OEM_UNLOCK_STATE";
field public static final java.lang.String READ_PRINT_SERVICES = "android.permission.READ_PRINT_SERVICES";
@@ -149,7 +119,6 @@ package android {
field public static final java.lang.String READ_WALLPAPER_INTERNAL = "android.permission.READ_WALLPAPER_INTERNAL";
field public static final java.lang.String READ_WIFI_CREDENTIAL = "android.permission.READ_WIFI_CREDENTIAL";
field public static final java.lang.String REAL_GET_TASKS = "android.permission.REAL_GET_TASKS";
- field public static final java.lang.String REBOOT = "android.permission.REBOOT";
field public static final java.lang.String RECEIVE_DATA_ACTIVITY_CHANGE = "android.permission.RECEIVE_DATA_ACTIVITY_CHANGE";
field public static final java.lang.String RECEIVE_EMERGENCY_BROADCAST = "android.permission.RECEIVE_EMERGENCY_BROADCAST";
field public static final java.lang.String RECEIVE_WIFI_CREDENTIAL_CHANGE = "android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE";
@@ -163,27 +132,19 @@ package android {
field public static final java.lang.String RETRIEVE_WINDOW_CONTENT = "android.permission.RETRIEVE_WINDOW_CONTENT";
field public static final java.lang.String REVOKE_RUNTIME_PERMISSIONS = "android.permission.REVOKE_RUNTIME_PERMISSIONS";
field public static final java.lang.String SCORE_NETWORKS = "android.permission.SCORE_NETWORKS";
- field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
field public static final java.lang.String SEND_SHOW_SUSPENDED_APP_DETAILS = "android.permission.SEND_SHOW_SUSPENDED_APP_DETAILS";
field public static final java.lang.String SEND_SMS_NO_CONFIRMATION = "android.permission.SEND_SMS_NO_CONFIRMATION";
field public static final java.lang.String SERIAL_PORT = "android.permission.SERIAL_PORT";
field public static final java.lang.String SET_ACTIVITY_WATCHER = "android.permission.SET_ACTIVITY_WATCHER";
- field public static final java.lang.String SET_ALWAYS_FINISH = "android.permission.SET_ALWAYS_FINISH";
- field public static final java.lang.String SET_ANIMATION_SCALE = "android.permission.SET_ANIMATION_SCALE";
- field public static final java.lang.String SET_DEBUG_APP = "android.permission.SET_DEBUG_APP";
field public static final java.lang.String SET_HARMFUL_APP_WARNINGS = "android.permission.SET_HARMFUL_APP_WARNINGS";
field public static final java.lang.String SET_MEDIA_KEY_LISTENER = "android.permission.SET_MEDIA_KEY_LISTENER";
field public static final java.lang.String SET_ORIENTATION = "android.permission.SET_ORIENTATION";
field public static final java.lang.String SET_POINTER_SPEED = "android.permission.SET_POINTER_SPEED";
- field public static final java.lang.String SET_PROCESS_LIMIT = "android.permission.SET_PROCESS_LIMIT";
field public static final java.lang.String SET_SCREEN_COMPATIBILITY = "android.permission.SET_SCREEN_COMPATIBILITY";
- field public static final java.lang.String SET_TIME = "android.permission.SET_TIME";
field public static final java.lang.String SET_VOLUME_KEY_LONG_PRESS_LISTENER = "android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER";
field public static final java.lang.String SET_WALLPAPER_COMPONENT = "android.permission.SET_WALLPAPER_COMPONENT";
field public static final java.lang.String SHOW_KEYGUARD_MESSAGE = "android.permission.SHOW_KEYGUARD_MESSAGE";
field public static final java.lang.String SHUTDOWN = "android.permission.SHUTDOWN";
- field public static final java.lang.String SIGNAL_PERSISTENT_PROCESSES = "android.permission.SIGNAL_PERSISTENT_PROCESSES";
- field public static final java.lang.String STATUS_BAR = "android.permission.STATUS_BAR";
field public static final java.lang.String STOP_APP_SWITCHES = "android.permission.STOP_APP_SWITCHES";
field public static final java.lang.String SUBSTITUTE_NOTIFICATION_APP_NAME = "android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME";
field public static final java.lang.String SUSPEND_APPS = "android.permission.SUSPEND_APPS";
@@ -192,17 +153,13 @@ package android {
field public static final java.lang.String TV_VIRTUAL_REMOTE_CONTROLLER = "android.permission.TV_VIRTUAL_REMOTE_CONTROLLER";
field public static final java.lang.String UNLIMITED_SHORTCUTS_API_CALLS = "android.permission.UNLIMITED_SHORTCUTS_API_CALLS";
field public static final java.lang.String UPDATE_APP_OPS_STATS = "android.permission.UPDATE_APP_OPS_STATS";
- field public static final java.lang.String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
field public static final java.lang.String UPDATE_LOCK = "android.permission.UPDATE_LOCK";
field public static final java.lang.String UPDATE_TIME_ZONE_RULES = "android.permission.UPDATE_TIME_ZONE_RULES";
field public static final java.lang.String USER_ACTIVITY = "android.permission.USER_ACTIVITY";
field public static final java.lang.String USE_RESERVED_DISK = "android.permission.USE_RESERVED_DISK";
- field public static final java.lang.String WRITE_APN_SETTINGS = "android.permission.WRITE_APN_SETTINGS";
field public static final java.lang.String WRITE_DREAM_STATE = "android.permission.WRITE_DREAM_STATE";
field public static final java.lang.String WRITE_EMBEDDED_SUBSCRIPTIONS = "android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS";
- field public static final java.lang.String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
field public static final java.lang.String WRITE_MEDIA_STORAGE = "android.permission.WRITE_MEDIA_STORAGE";
- field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
}
public static final class R.array {
@@ -425,10 +382,6 @@ package android.app {
package android.app.admin {
- public class DeviceAdminReceiver extends android.content.BroadcastReceiver {
- method public deprecated void onReadyForUserInitialization(android.content.Context, android.content.Intent);
- }
-
public class DevicePolicyManager {
method public java.lang.String getDeviceOwner();
method public android.content.ComponentName getDeviceOwnerComponentOnAnyUser();
@@ -466,10 +419,7 @@ package android.app.admin {
}
public final class SystemUpdatePolicy implements android.os.Parcelable {
- method public int describeContents();
method public android.app.admin.SystemUpdatePolicy.InstallationOption getInstallationOptionAt(long);
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.admin.SystemUpdatePolicy> CREATOR;
field public static final int TYPE_PAUSE = 4; // 0x4
}
@@ -2948,7 +2898,6 @@ package android.media.tv {
method public void addBlockedRating(android.media.tv.TvContentRating);
method public boolean captureFrame(java.lang.String, android.view.Surface, android.media.tv.TvStreamConfig);
method public java.util.List<android.media.tv.TvStreamConfig> getAvailableTvStreamConfigList(java.lang.String);
- method public java.util.List<android.media.tv.TvContentRating> getBlockedRatings();
method public java.util.List<android.media.tv.TvInputHardwareInfo> getHardwareList();
method public java.util.List<android.media.tv.TvContentRatingSystemInfo> getTvContentRatingSystemList();
method public boolean isSingleSessionActive();
@@ -3163,11 +3112,9 @@ package android.net {
}
public class TrafficStats {
- method public static void clearThreadStatsUid();
method public static void setThreadStatsTagApp();
method public static void setThreadStatsTagBackup();
method public static void setThreadStatsTagRestore();
- method public static void setThreadStatsUid(int);
}
public class VpnService extends android.app.Service {
@@ -3189,14 +3136,6 @@ package android.net {
}
-package android.net.http {
-
- public class X509TrustManagerExtensions {
- method public boolean isSameTrustConfiguration(java.lang.String, java.lang.String);
- }
-
-}
-
package android.net.wifi {
public deprecated class RttManager {
@@ -3415,7 +3354,6 @@ package android.net.wifi {
method public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks();
method public android.net.wifi.WifiConfiguration getWifiApConfiguration();
method public int getWifiApState();
- method public boolean isDeviceToApRttSupported();
method public boolean isDeviceToDeviceRttSupported();
method public boolean isPortableHotspotSupported();
method public boolean isWifiApEnabled();
@@ -4614,28 +4552,6 @@ package android.service.notification {
field public static final java.lang.String KEY_USER_SENTIMENT = "key_user_sentiment";
}
- public final class Condition implements android.os.Parcelable {
- ctor public Condition(android.net.Uri, java.lang.String, java.lang.String, java.lang.String, int, int, int);
- method public android.service.notification.Condition copy();
- method public static boolean isValidId(android.net.Uri, java.lang.String);
- method public static android.net.Uri.Builder newId(android.content.Context);
- method public static java.lang.String relevanceToString(int);
- method public static java.lang.String stateToString(int);
- field public static final int FLAG_RELEVANT_ALWAYS = 2; // 0x2
- field public static final int FLAG_RELEVANT_NOW = 1; // 0x1
- field public static final java.lang.String SCHEME = "condition";
- field public static final int STATE_ERROR = 3; // 0x3
- field public static final int STATE_UNKNOWN = 2; // 0x2
- field public final int flags;
- field public final int icon;
- field public final java.lang.String line1;
- field public final java.lang.String line2;
- }
-
- public abstract class ConditionProviderService extends android.app.Service {
- method public void onRequestConditions(int);
- }
-
public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService {
ctor public NotificationAssistantService();
method public final void adjustNotification(android.service.notification.Adjustment);
@@ -5082,7 +4998,6 @@ package android.telecom {
method public void clearPhoneAccounts();
method public android.telecom.TelecomAnalytics dumpAnalytics();
method public void enablePhoneAccount(android.telecom.PhoneAccountHandle, boolean);
- method public boolean endCall();
method public java.util.List<android.telecom.PhoneAccountHandle> getAllPhoneAccountHandles();
method public java.util.List<android.telecom.PhoneAccount> getAllPhoneAccounts();
method public int getAllPhoneAccountsCount();
@@ -5094,7 +5009,6 @@ package android.telecom {
method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String);
method public boolean isInEmergencyCall();
method public boolean isRinging();
- method public boolean isTtySupported();
method public boolean setDefaultDialer(java.lang.String);
field public static final java.lang.String EXTRA_CALL_BACK_INTENT = "android.telecom.extra.CALL_BACK_INTENT";
field public static final java.lang.String EXTRA_CLEAR_MISSED_CALLS_INTENT = "android.telecom.extra.CLEAR_MISSED_CALLS_INTENT";
@@ -5119,7 +5033,6 @@ package android.telephony {
method public void overrideConfig(int, android.os.PersistableBundle);
method public void updateConfigForPhoneId(int, java.lang.String);
field public static final java.lang.String KEY_CARRIER_SETUP_APP_STRING = "carrier_setup_app_string";
- field public static final java.lang.String KEY_CONFIG_PLANS_PACKAGE_OVERRIDE_STRING = "config_plans_package_override_string";
}
public class MbmsDownloadSession implements java.lang.AutoCloseable {
@@ -5234,7 +5147,6 @@ package android.telephony {
public final class SmsManager {
method public void sendMultipartTextMessageWithoutPersisting(java.lang.String, java.lang.String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>);
- method public void sendTextMessageWithoutPersisting(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
field public static final int RESULT_CANCELLED = 23; // 0x17
field public static final int RESULT_ENCODING_ERROR = 18; // 0x12
field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 6; // 0x6
@@ -5261,13 +5173,7 @@ package android.telephony {
public class SubscriptionManager {
method public java.util.List<android.telephony.SubscriptionInfo> getAvailableSubscriptionInfoList();
- method public java.util.List<android.telephony.SubscriptionPlan> getSubscriptionPlans(int);
method public void requestEmbeddedSubscriptionInfoListRefresh();
- method public void setSubscriptionOverrideCongested(int, boolean, long);
- method public void setSubscriptionOverrideUnmetered(int, boolean, long);
- method public void setSubscriptionPlans(int, java.util.List<android.telephony.SubscriptionPlan>);
- field public static final java.lang.String ACTION_MANAGE_SUBSCRIPTION_PLANS = "android.telephony.action.MANAGE_SUBSCRIPTION_PLANS";
- field public static final java.lang.String ACTION_REFRESH_SUBSCRIPTION_PLANS = "android.telephony.action.REFRESH_SUBSCRIPTION_PLANS";
field public static final android.net.Uri ADVANCED_CALLING_ENABLED_CONTENT_URI;
field public static final android.net.Uri VT_ENABLED_CONTENT_URI;
field public static final android.net.Uri WFC_ENABLED_CONTENT_URI;
@@ -5276,37 +5182,10 @@ package android.telephony {
field public static final android.net.Uri WFC_ROAMING_MODE_CONTENT_URI;
}
- public final class SubscriptionPlan implements android.os.Parcelable {
- method public java.util.Iterator<android.util.Range<java.time.ZonedDateTime>> cycleIterator();
- method public int describeContents();
- method public int getDataLimitBehavior();
- method public long getDataLimitBytes();
- method public long getDataUsageBytes();
- method public long getDataUsageTime();
- method public java.lang.CharSequence getSummary();
- method public java.lang.CharSequence getTitle();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final long BYTES_UNKNOWN = -1L; // 0xffffffffffffffffL
- field public static final long BYTES_UNLIMITED = 9223372036854775807L; // 0x7fffffffffffffffL
- field public static final android.os.Parcelable.Creator<android.telephony.SubscriptionPlan> CREATOR;
- field public static final int LIMIT_BEHAVIOR_BILLED = 1; // 0x1
- field public static final int LIMIT_BEHAVIOR_DISABLED = 0; // 0x0
- field public static final int LIMIT_BEHAVIOR_THROTTLED = 2; // 0x2
- field public static final int LIMIT_BEHAVIOR_UNKNOWN = -1; // 0xffffffff
- field public static final long TIME_UNKNOWN = -1L; // 0xffffffffffffffffL
- }
-
public static class SubscriptionPlan.Builder {
- method public android.telephony.SubscriptionPlan build();
- method public static android.telephony.SubscriptionPlan.Builder createNonrecurring(java.time.ZonedDateTime, java.time.ZonedDateTime);
- method public static android.telephony.SubscriptionPlan.Builder createRecurring(java.time.ZonedDateTime, java.time.Period);
method public static deprecated android.telephony.SubscriptionPlan.Builder createRecurringDaily(java.time.ZonedDateTime);
method public static deprecated android.telephony.SubscriptionPlan.Builder createRecurringMonthly(java.time.ZonedDateTime);
method public static deprecated android.telephony.SubscriptionPlan.Builder createRecurringWeekly(java.time.ZonedDateTime);
- method public android.telephony.SubscriptionPlan.Builder setDataLimit(long, int);
- method public android.telephony.SubscriptionPlan.Builder setDataUsage(long, long);
- method public android.telephony.SubscriptionPlan.Builder setSummary(java.lang.CharSequence);
- method public android.telephony.SubscriptionPlan.Builder setTitle(java.lang.CharSequence);
}
public final class TelephonyHistogram implements android.os.Parcelable {
@@ -5339,6 +5218,7 @@ package android.telephony {
method public void enableVideoCalling(boolean);
method public java.lang.String getAidForAppType(int);
method public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int);
+ method public int getCardIdForDefaultEuicc();
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent);
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int);
method public java.lang.String getCdmaMdn();
@@ -5404,6 +5284,7 @@ package android.telephony {
field public static final java.lang.String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE";
field public static final java.lang.String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
field public static final java.lang.String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
+ field public static final int INVALID_CARD_ID = -1; // 0xffffffff
field public static final long MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS = 60000L; // 0xea60L
field public static final int NETWORK_MODE_CDMA_EVDO = 4; // 0x4
field public static final int NETWORK_MODE_CDMA_NO_EVDO = 5; // 0x5
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 8ffe5bf59315..ed6c25dc49c3 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -302,6 +302,7 @@ status_t BootAnimation::readyToRun() {
mHeight = h;
mFlingerSurfaceControl = control;
mFlingerSurface = s;
+ mTargetInset = -1;
// If the device has encryption turned on or is in process
// of being encrypted we show the encrypted boot animation.
@@ -942,6 +943,7 @@ bool BootAnimation::playAnimation(const Animation& animation)
if (mClockEnabled && mTimeIsAccurate && validClock(part)) {
drawClock(animation.clockFont, part.clockPosX, part.clockPosY);
}
+ handleViewport(frameDuration);
eglSwapBuffers(mDisplay, mSurface);
@@ -966,7 +968,7 @@ bool BootAnimation::playAnimation(const Animation& animation)
usleep(part.pause * ns2us(frameDuration));
// For infinite parts, we've now played them at least once, so perhaps exit
- if(exitPending() && !part.count)
+ if(exitPending() && !part.count && mCurrentInset >= mTargetInset)
break;
}
@@ -986,6 +988,51 @@ bool BootAnimation::playAnimation(const Animation& animation)
return true;
}
+void BootAnimation::handleViewport(nsecs_t timestep) {
+ if (mShuttingDown || !mFlingerSurfaceControl || mTargetInset == 0) {
+ return;
+ }
+ if (mTargetInset < 0) {
+ // Poll the amount for the top display inset. This will return -1 until persistent properties
+ // have been loaded.
+ mTargetInset = android::base::GetIntProperty("persist.sys.displayinset.top",
+ -1 /* default */, -1 /* min */, mHeight / 2 /* max */);
+ }
+ if (mTargetInset <= 0) {
+ return;
+ }
+
+ if (mCurrentInset < mTargetInset) {
+ // After the device boots, the inset will effectively be cropped away. We animate this here.
+ float fraction = static_cast<float>(mCurrentInset) / mTargetInset;
+ int interpolatedInset = (cosf((fraction + 1) * M_PI) / 2.0f + 0.5f) * mTargetInset;
+
+ SurfaceComposerClient::Transaction()
+ .setCrop(mFlingerSurfaceControl, Rect(0, interpolatedInset, mWidth, mHeight))
+ .apply();
+ } else {
+ // At the end of the animation, we switch to the viewport that DisplayManager will apply
+ // later. This changes the coordinate system, and means we must move the surface up by
+ // the inset amount.
+ sp<IBinder> dtoken(SurfaceComposerClient::getBuiltInDisplay(
+ ISurfaceComposer::eDisplayIdMain));
+
+ Rect layerStackRect(0, 0, mWidth, mHeight - mTargetInset);
+ Rect displayRect(0, mTargetInset, mWidth, mHeight);
+
+ SurfaceComposerClient::Transaction t;
+ t.setPosition(mFlingerSurfaceControl, 0, -mTargetInset)
+ .setCrop(mFlingerSurfaceControl, Rect(0, mTargetInset, mWidth, mHeight));
+ t.setDisplayProjection(dtoken, 0 /* orientation */, layerStackRect, displayRect);
+ t.apply();
+
+ mTargetInset = mCurrentInset = 0;
+ }
+
+ int delta = timestep * mTargetInset / ms2ns(200);
+ mCurrentInset += delta;
+}
+
void BootAnimation::releaseAnimation(Animation* animation) const
{
for (Vector<Animation::Part>::iterator it = animation->parts.begin(),
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index 56e131523bcb..b4699d884681 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -157,11 +157,15 @@ private:
void checkExit();
+ void handleViewport(nsecs_t timestep);
+
sp<SurfaceComposerClient> mSession;
AssetManager mAssets;
Texture mAndroid[2];
int mWidth;
int mHeight;
+ int mCurrentInset;
+ int mTargetInset;
bool mUseNpotTextures = false;
EGLDisplay mDisplay;
EGLDisplay mContext;
diff --git a/cmds/incident_helper/tests/KernelWakesParser_test.cpp b/cmds/incident_helper/tests/KernelWakesParser_test.cpp
index f92d81361eab..573ca4f632e0 100644
--- a/cmds/incident_helper/tests/KernelWakesParser_test.cpp
+++ b/cmds/incident_helper/tests/KernelWakesParser_test.cpp
@@ -84,9 +84,9 @@ TEST_F(KernelWakesParserTest, Normal) {
record1->set_event_count(8);
record1->set_wakeup_count(0);
record1->set_expire_count(0);
- record1->set_active_since(0l);
- record1->set_total_time(0l);
- record1->set_max_time(0l);
+ record1->set_active_since(0L);
+ record1->set_total_time(0L);
+ record1->set_max_time(0L);
record1->set_last_change(131348LL);
record1->set_prevent_suspend_time(0LL);
@@ -96,9 +96,9 @@ TEST_F(KernelWakesParserTest, Normal) {
record2->set_event_count(143);
record2->set_wakeup_count(0);
record2->set_expire_count(0);
- record2->set_active_since(0l);
- record2->set_total_time(123l);
- record2->set_max_time(3l);
+ record2->set_active_since(0L);
+ record2->set_total_time(123L);
+ record2->set_max_time(3L);
record2->set_last_change(2067286206LL);
record2->set_prevent_suspend_time(0LL);
diff --git a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
index be2e2faf3739..f0a0e88310f9 100644
--- a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
+++ b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
@@ -30,7 +30,6 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.hardware.fingerprint.FingerprintManager;
-import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
@@ -190,12 +189,10 @@ public class AccessibilityServiceInfo implements Parcelable {
* content and also the accessibility service will receive accessibility events from
* them.
* <p>
- * <strong>Note:</strong> For accessibility services targeting API version
- * {@link Build.VERSION_CODES#JELLY_BEAN} or higher this flag has to be explicitly
- * set for the system to regard views that are not important for accessibility. For
- * accessibility services targeting API version lower than
- * {@link Build.VERSION_CODES#JELLY_BEAN} this flag is ignored and all views are
- * regarded for accessibility purposes.
+ * <strong>Note:</strong> For accessibility services targeting Android 4.1 (API level 16) or
+ * higher, this flag has to be explicitly set for the system to regard views that are not
+ * important for accessibility. For accessibility services targeting Android 4.0.4 (API level
+ * 15) or lower, this flag is ignored and all views are regarded for accessibility purposes.
* </p>
* <p>
* Usually views not important for accessibility are layout managers that do not
@@ -220,19 +217,19 @@ public class AccessibilityServiceInfo implements Parcelable {
* flag does not guarantee that the device will not be in touch exploration
* mode since there may be another enabled service that requested it.
* <p>
- * For accessibility services targeting API version higher than
- * {@link Build.VERSION_CODES#JELLY_BEAN_MR1} that want to set
- * this flag have to declare this capability in their meta-data by setting
- * the attribute {@link android.R.attr#canRequestTouchExplorationMode
- * canRequestTouchExplorationMode} to true, otherwise this flag will
+ * For accessibility services targeting Android 4.3 (API level 18) or higher
+ * that want to set this flag have to declare this capability in their
+ * meta-data by setting the attribute
+ * {@link android.R.attr#canRequestTouchExplorationMode
+ * canRequestTouchExplorationMode} to true. Otherwise, this flag will
* be ignored. For how to declare the meta-data of a service refer to
* {@value AccessibilityService#SERVICE_META_DATA}.
* </p>
* <p>
- * Services targeting API version equal to or lower than
- * {@link Build.VERSION_CODES#JELLY_BEAN_MR1} will work normally, i.e.
- * the first time they are run, if this flag is specified, a dialog is
- * shown to the user to confirm enabling explore by touch.
+ * Services targeting Android 4.2.2 (API level 17) or lower will work
+ * normally. In other words, the first time they are run, if this flag is
+ * specified, a dialog is shown to the user to confirm enabling explore by
+ * touch.
* </p>
* @see android.R.styleable#AccessibilityService_canRequestTouchExplorationMode
*/
@@ -388,10 +385,10 @@ public class AccessibilityServiceInfo implements Parcelable {
public int feedbackType;
/**
- * The timeout after the most recent event of a given type before an
+ * The timeout, in milliseconds, after the most recent event of a given type before an
* {@link AccessibilityService} is notified.
* <p>
- * <strong>Can be dynamically set at runtime.</strong>.
+ * <strong>Can be dynamically set at runtime.</strong>
* </p>
* <p>
* <strong>Note:</strong> The event notification timeout is useful to avoid propagating
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 31b5e0a8e2bf..a6f9bcab716d 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -6375,6 +6375,10 @@ public class Activity extends ContextThemeWrapper
}
void dumpInner(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
+ if (args != null && args.length > 0 && args[0].equals("--autofill")) {
+ dumpAutofillManager(prefix, writer);
+ return;
+ }
writer.print(prefix); writer.print("Local Activity ");
writer.print(Integer.toHexString(System.identityHashCode(this)));
writer.println(" State:");
@@ -6402,16 +6406,20 @@ public class Activity extends ContextThemeWrapper
mHandler.getLooper().dump(new PrintWriterPrinter(writer), prefix);
+ dumpAutofillManager(prefix, writer);
+
+ ResourcesManager.getInstance().dump(prefix, writer);
+ }
+
+ void dumpAutofillManager(String prefix, PrintWriter writer) {
final AutofillManager afm = getAutofillManager();
if (afm != null) {
+ afm.dump(prefix, writer);
writer.print(prefix); writer.print("Autofill Compat Mode: ");
writer.println(isAutofillCompatibilityEnabled());
- afm.dump(prefix, writer);
} else {
writer.print(prefix); writer.println("No AutofillManager");
}
-
- ResourcesManager.getInstance().dump(prefix, writer);
}
/**
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index 9b6764d96fb2..14cae95508e7 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -413,4 +413,9 @@ public abstract class ActivityManagerInternal {
* @return The intent used to launch the home activity.
*/
public abstract Intent getHomeIntent();
+
+ /**
+ * WindowManager notifies AM when display size of the default display changes.
+ */
+ public abstract void notifyDefaultDisplaySizeChanged();
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 0a238588787d..47fddfe80e07 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -147,6 +147,7 @@ import com.android.internal.os.RuntimeInit;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.FastPrintWriter;
+import com.android.internal.util.Preconditions;
import com.android.internal.util.function.pooled.PooledLambda;
import com.android.org.conscrypt.OpenSSLSocketImpl;
import com.android.org.conscrypt.TrustedCertificateStore;
@@ -384,6 +385,9 @@ public final class ActivityThread extends ClientTransactionHandler {
= new ArrayMap<Activity, ArrayList<OnActivityPausedListener>>();
final GcIdler mGcIdler = new GcIdler();
+ final PurgeIdler mPurgeIdler = new PurgeIdler();
+
+ boolean mPurgeIdlerScheduled = false;
boolean mGcIdlerScheduled = false;
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
@@ -1666,6 +1670,7 @@ public final class ActivityThread extends ClientTransactionHandler {
public static final int RUN_ISOLATED_ENTRY_POINT = 158;
public static final int EXECUTE_TRANSACTION = 159;
public static final int RELAUNCH_ACTIVITY = 160;
+ public static final int PURGE_RESOURCES = 161;
String codeToString(int code) {
if (DEBUG_MESSAGES) {
@@ -1709,6 +1714,7 @@ public final class ActivityThread extends ClientTransactionHandler {
case RUN_ISOLATED_ENTRY_POINT: return "RUN_ISOLATED_ENTRY_POINT";
case EXECUTE_TRANSACTION: return "EXECUTE_TRANSACTION";
case RELAUNCH_ACTIVITY: return "RELAUNCH_ACTIVITY";
+ case PURGE_RESOURCES: return "PURGE_RESOURCES";
}
}
return Integer.toString(code);
@@ -1746,6 +1752,7 @@ public final class ActivityThread extends ClientTransactionHandler {
case UNBIND_SERVICE:
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "serviceUnbind");
handleUnbindService((BindServiceData)msg.obj);
+ schedulePurgeIdler();
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
break;
case SERVICE_ARGS:
@@ -1756,6 +1763,7 @@ public final class ActivityThread extends ClientTransactionHandler {
case STOP_SERVICE:
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "serviceStop");
handleStopService((IBinder)msg.obj);
+ schedulePurgeIdler();
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
break;
case CONFIGURATION_CHANGED:
@@ -1889,6 +1897,9 @@ public final class ActivityThread extends ClientTransactionHandler {
case RELAUNCH_ACTIVITY:
handleRelaunchActivityLocally((IBinder) msg.obj);
break;
+ case PURGE_RESOURCES:
+ schedulePurgeIdler();
+ break;
}
Object obj = msg.obj;
if (obj instanceof SomeArgs) {
@@ -1941,6 +1952,17 @@ public final class ActivityThread extends ClientTransactionHandler {
@Override
public final boolean queueIdle() {
doGcIfNeeded();
+ nPurgePendingResources();
+ return false;
+ }
+ }
+
+ final class PurgeIdler implements MessageQueue.IdleHandler {
+ @Override
+ public boolean queueIdle() {
+ Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "purgePendingResources");
+ nPurgePendingResources();
+ Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
return false;
}
}
@@ -2270,6 +2292,22 @@ public final class ActivityThread extends ClientTransactionHandler {
mH.removeMessages(H.GC_WHEN_IDLE);
}
+ void schedulePurgeIdler() {
+ if (!mPurgeIdlerScheduled) {
+ mPurgeIdlerScheduled = true;
+ Looper.myQueue().addIdleHandler(mPurgeIdler);
+ }
+ mH.removeMessages(H.PURGE_RESOURCES);
+ }
+
+ void unschedulePurgeIdler() {
+ if (mPurgeIdlerScheduled) {
+ mPurgeIdlerScheduled = false;
+ Looper.myQueue().removeIdleHandler(mPurgeIdler);
+ }
+ mH.removeMessages(H.PURGE_RESOURCES);
+ }
+
void doGcIfNeeded() {
mGcIdlerScheduled = false;
final long now = SystemClock.uptimeMillis();
@@ -4559,6 +4597,7 @@ public final class ActivityThread extends ClientTransactionHandler {
}
r.setState(ON_DESTROY);
}
+ schedulePurgeIdler();
mActivities.remove(token);
StrictMode.decrementExpectedActivityCount(activityClass);
return r;
@@ -5243,6 +5282,16 @@ public final class ActivityThread extends ClientTransactionHandler {
}
}
+ /**
+ * Updates the application info.
+ *
+ * This only works in the system process. Must be called on the main thread.
+ */
+ public void handleSystemApplicationInfoChanged(@NonNull ApplicationInfo ai) {
+ Preconditions.checkState(mSystemThread, "Must only be called in the system process");
+ handleApplicationInfoChanged(ai);
+ }
+
void handleApplicationInfoChanged(@NonNull final ApplicationInfo ai) {
// Updates triggered by package installation go through a package update
// receiver. Here we try to capture ApplicationInfo changes that are
@@ -6771,6 +6820,6 @@ public final class ActivityThread extends ClientTransactionHandler {
}
// ------------------ Regular JNI ------------------------
-
+ private native void nPurgePendingResources();
private native void nDumpGraphicsInfo(FileDescriptor fd);
}
diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java
index 68869c65d7c9..2d9fbf974397 100644
--- a/core/java/android/app/ResourcesManager.java
+++ b/core/java/android/app/ResourcesManager.java
@@ -125,10 +125,13 @@ public class ResourcesManager {
}
}
+ private static final boolean ENABLE_APK_ASSETS_CACHE = false;
+
/**
* The ApkAssets we are caching and intend to hold strong references to.
*/
- private final LruCache<ApkKey, ApkAssets> mLoadedApkAssets = new LruCache<>(3);
+ private final LruCache<ApkKey, ApkAssets> mLoadedApkAssets =
+ (ENABLE_APK_ASSETS_CACHE) ? new LruCache<>(3) : null;
/**
* The ApkAssets that are being referenced in the wild that we can reuse, even if they aren't
@@ -316,9 +319,12 @@ public class ResourcesManager {
private @NonNull ApkAssets loadApkAssets(String path, boolean sharedLib, boolean overlay)
throws IOException {
final ApkKey newKey = new ApkKey(path, sharedLib, overlay);
- ApkAssets apkAssets = mLoadedApkAssets.get(newKey);
- if (apkAssets != null) {
- return apkAssets;
+ ApkAssets apkAssets = null;
+ if (mLoadedApkAssets != null) {
+ apkAssets = mLoadedApkAssets.get(newKey);
+ if (apkAssets != null) {
+ return apkAssets;
+ }
}
// Optimistically check if this ApkAssets exists somewhere else.
@@ -326,7 +332,10 @@ public class ResourcesManager {
if (apkAssetsRef != null) {
apkAssets = apkAssetsRef.get();
if (apkAssets != null) {
- mLoadedApkAssets.put(newKey, apkAssets);
+ if (mLoadedApkAssets != null) {
+ mLoadedApkAssets.put(newKey, apkAssets);
+ }
+
return apkAssets;
} else {
// Clean up the reference.
@@ -341,7 +350,11 @@ public class ResourcesManager {
} else {
apkAssets = ApkAssets.loadFromPath(path, false /*system*/, sharedLib);
}
- mLoadedApkAssets.put(newKey, apkAssets);
+
+ if (mLoadedApkAssets != null) {
+ mLoadedApkAssets.put(newKey, apkAssets);
+ }
+
mCachedApkAssets.put(newKey, new WeakReference<>(apkAssets));
return apkAssets;
}
@@ -441,18 +454,22 @@ public class ResourcesManager {
pw.println("ResourcesManager:");
pw.increaseIndent();
- pw.print("cached apks: total=");
- pw.print(mLoadedApkAssets.size());
- pw.print(" created=");
- pw.print(mLoadedApkAssets.createCount());
- pw.print(" evicted=");
- pw.print(mLoadedApkAssets.evictionCount());
- pw.print(" hit=");
- pw.print(mLoadedApkAssets.hitCount());
- pw.print(" miss=");
- pw.print(mLoadedApkAssets.missCount());
- pw.print(" max=");
- pw.print(mLoadedApkAssets.maxSize());
+ if (mLoadedApkAssets != null) {
+ pw.print("cached apks: total=");
+ pw.print(mLoadedApkAssets.size());
+ pw.print(" created=");
+ pw.print(mLoadedApkAssets.createCount());
+ pw.print(" evicted=");
+ pw.print(mLoadedApkAssets.evictionCount());
+ pw.print(" hit=");
+ pw.print(mLoadedApkAssets.hitCount());
+ pw.print(" miss=");
+ pw.print(mLoadedApkAssets.missCount());
+ pw.print(" max=");
+ pw.print(mLoadedApkAssets.maxSize());
+ } else {
+ pw.print("cached apks: 0 [cache disabled]");
+ }
pw.println();
pw.print("total apks: ");
diff --git a/core/java/android/app/VrManager.java b/core/java/android/app/VrManager.java
index 66d7a2507bb7..b1465ae9a798 100644
--- a/core/java/android/app/VrManager.java
+++ b/core/java/android/app/VrManager.java
@@ -4,7 +4,6 @@ import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
-import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
@@ -230,7 +229,6 @@ public class VrManager {
* input by InputMethodManagerService.
* @hide
*/
- @TestApi
@RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS)
public void setVrInputMethod(ComponentName componentName) {
try {
diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
index 1c9477d08cb3..6fb0d7ec33ae 100644
--- a/core/java/android/app/admin/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -23,7 +23,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
-import android.annotation.SystemApi;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -755,7 +754,6 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
* @deprecated Do not use
*/
@Deprecated
- @SystemApi
public void onReadyForUserInitialization(Context context, Intent intent) {
}
diff --git a/core/java/android/app/admin/SystemUpdatePolicy.java b/core/java/android/app/admin/SystemUpdatePolicy.java
index 2a451ff07672..96dbc760278f 100644
--- a/core/java/android/app/admin/SystemUpdatePolicy.java
+++ b/core/java/android/app/admin/SystemUpdatePolicy.java
@@ -691,13 +691,11 @@ public final class SystemUpdatePolicy implements Parcelable {
mFreezePeriods.stream().map(n -> n.toString()).collect(Collectors.joining(",")));
}
- @SystemApi
@Override
public int describeContents() {
return 0;
}
- @SystemApi
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mPolicyType);
@@ -714,7 +712,6 @@ public final class SystemUpdatePolicy implements Parcelable {
}
}
- @SystemApi
public static final Parcelable.Creator<SystemUpdatePolicy> CREATOR =
new Parcelable.Creator<SystemUpdatePolicy>() {
diff --git a/core/java/android/app/assist/AssistStructure.java b/core/java/android/app/assist/AssistStructure.java
index d568662409d7..dd61f286c88e 100644
--- a/core/java/android/app/assist/AssistStructure.java
+++ b/core/java/android/app/assist/AssistStructure.java
@@ -41,18 +41,23 @@ import java.util.Arrays;
import java.util.List;
/**
- * Assist data automatically created by the platform's implementation of assist and autofill.
+ * <p>This API automatically creates assist data from the platform's
+ * implementation of assist and autofill.
*
* <p>The structure is used for assist purposes when created by
* {@link android.app.Activity#onProvideAssistData}, {@link View#onProvideStructure(ViewStructure)},
* or {@link View#onProvideVirtualStructure(ViewStructure)}.
*
- * <p>The structure is used for autofill purposes when created by
+ * <p>The structure is also used for autofill purposes when created by
* {@link View#onProvideAutofillStructure(ViewStructure, int)},
* or {@link View#onProvideAutofillVirtualStructure(ViewStructure, int)}.
*
- * <p>For performance reasons, some properties of the assist data might be available just for assist
- * or autofill purposes; in those case, the property availability will be document in its javadoc.
+ * <p>For performance reasons, some properties of the assist data might only be available for
+ * assist or autofill purposes. In those cases, a property's availability will be documented
+ * in its javadoc.
+ *
+ * <p>To learn about using Autofill in your app, read the
+ * <a href="/guide/topics/text/autofill">Autofill Framework</a> guides.
*/
public class AssistStructure implements Parcelable {
static final String TAG = "AssistStructure";
diff --git a/core/java/android/appwidget/AppWidgetManagerInternal.java b/core/java/android/appwidget/AppWidgetManagerInternal.java
index 7ab3d8bdd857..5694ca860453 100644
--- a/core/java/android/appwidget/AppWidgetManagerInternal.java
+++ b/core/java/android/appwidget/AppWidgetManagerInternal.java
@@ -16,12 +16,9 @@
package android.appwidget;
-import android.annotation.NonNull;
import android.annotation.Nullable;
import android.util.ArraySet;
-import java.util.Set;
-
/**
* App widget manager local system service interface.
*
@@ -36,4 +33,13 @@ public abstract class AppWidgetManagerInternal {
* @return Whether the UID hosts widgets from the package.
*/
public abstract @Nullable ArraySet<String> getHostedWidgetPackages(int uid);
+
+ /**
+ * Execute the widget-related work of unlocking a user. This is intentionally
+ * invoked just <em>before</em> the boot-completed broadcast is issued, after
+ * the data-related work of unlock has completed.
+ *
+ * @param userId The user that is being unlocked.
+ */
+ public abstract void unlockUser(int userId);
}
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 654bfaf293b8..10c8b15a7a79 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -643,6 +643,7 @@ public final class BluetoothAdapter {
private final IBluetoothManager mManagerService;
@UnsupportedAppUsage
private IBluetooth mService;
+ private Context mContext;
private final ReentrantReadWriteLock mServiceLock = new ReentrantReadWriteLock();
private final Object mLock = new Object();
@@ -1541,6 +1542,23 @@ public final class BluetoothAdapter {
}
/**
+ * Set the context for this BluetoothAdapter (only called from BluetoothManager)
+ * @hide
+ */
+ public void setContext(Context context) {
+ mContext = context;
+ }
+
+ private String getOpPackageName() {
+ // Workaround for legacy API for getting a BluetoothAdapter not
+ // passing a context
+ if (mContext != null) {
+ return mContext.getOpPackageName();
+ }
+ return ActivityThread.currentOpPackageName();
+ }
+
+ /**
* Start the remote device discovery process.
* <p>The discovery process usually involves an inquiry scan of about 12
* seconds, followed by a page scan of each new device to retrieve its
@@ -1577,7 +1595,7 @@ public final class BluetoothAdapter {
try {
mServiceLock.readLock().lock();
if (mService != null) {
- return mService.startDiscovery();
+ return mService.startDiscovery(getOpPackageName());
}
} catch (RemoteException e) {
Log.e(TAG, "", e);
diff --git a/core/java/android/bluetooth/BluetoothManager.java b/core/java/android/bluetooth/BluetoothManager.java
index e3672a7e064f..e08d405324ea 100644
--- a/core/java/android/bluetooth/BluetoothManager.java
+++ b/core/java/android/bluetooth/BluetoothManager.java
@@ -67,6 +67,7 @@ public final class BluetoothManager {
}
// Legacy api - getDefaultAdapter does not take in the context
mAdapter = BluetoothAdapter.getDefaultAdapter();
+ mAdapter.setContext(context);
}
/**
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index 4c98e23fe9b4..d3393b9193ce 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -56,6 +56,7 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Objects;
/**
* Content providers are one of the primary building blocks of Android applications, providing
@@ -218,7 +219,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public Cursor query(String callingPkg, Uri uri, @Nullable String[] projection,
@Nullable Bundle queryArgs, @Nullable ICancellationSignal cancellationSignal) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
// The caller has no access to the data, so return an empty cursor with
@@ -257,14 +258,14 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public String getType(Uri uri) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
return ContentProvider.this.getType(uri);
}
@Override
public Uri insert(String callingPkg, Uri uri, ContentValues initialValues) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
int userId = getUserIdFromUri(uri);
uri = maybeGetUriWithoutUserId(uri);
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
@@ -280,7 +281,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public int bulkInsert(String callingPkg, Uri uri, ContentValues[] initialValues) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return 0;
@@ -302,11 +303,12 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
for (int i = 0; i < numOperations; i++) {
ContentProviderOperation operation = operations.get(i);
Uri uri = operation.getUri();
- validateIncomingUri(uri);
userIds[i] = getUserIdFromUri(uri);
- if (userIds[i] != UserHandle.USER_CURRENT) {
- // Removing the user id from the uri.
- operation = new ContentProviderOperation(operation, true);
+ uri = validateIncomingUri(uri);
+ uri = maybeGetUriWithoutUserId(uri);
+ // Rebuild operation if we changed the Uri above
+ if (!Objects.equals(operation.getUri(), uri)) {
+ operation = new ContentProviderOperation(operation, uri);
operations.set(i, operation);
}
if (operation.isReadOperation()) {
@@ -341,7 +343,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public int delete(String callingPkg, Uri uri, String selection, String[] selectionArgs) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return 0;
@@ -357,7 +359,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public int update(String callingPkg, Uri uri, ContentValues values, String selection,
String[] selectionArgs) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return 0;
@@ -374,7 +376,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
public ParcelFileDescriptor openFile(
String callingPkg, Uri uri, String mode, ICancellationSignal cancellationSignal,
IBinder callerToken) throws FileNotFoundException {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
enforceFilePermission(callingPkg, uri, mode, callerToken);
final String original = setCallingPackage(callingPkg);
@@ -390,7 +392,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
public AssetFileDescriptor openAssetFile(
String callingPkg, Uri uri, String mode, ICancellationSignal cancellationSignal)
throws FileNotFoundException {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
enforceFilePermission(callingPkg, uri, mode, null);
final String original = setCallingPackage(callingPkg);
@@ -416,7 +418,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public String[] getStreamTypes(Uri uri, String mimeTypeFilter) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
return ContentProvider.this.getStreamTypes(uri, mimeTypeFilter);
}
@@ -425,7 +427,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
public AssetFileDescriptor openTypedAssetFile(String callingPkg, Uri uri, String mimeType,
Bundle opts, ICancellationSignal cancellationSignal) throws FileNotFoundException {
Bundle.setDefusable(opts, true);
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
enforceFilePermission(callingPkg, uri, "r", null);
final String original = setCallingPackage(callingPkg);
@@ -444,7 +446,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public Uri canonicalize(String callingPkg, Uri uri) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
int userId = getUserIdFromUri(uri);
uri = getUriWithoutUserId(uri);
if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
@@ -460,7 +462,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public Uri uncanonicalize(String callingPkg, Uri uri) {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
int userId = getUserIdFromUri(uri);
uri = getUriWithoutUserId(uri);
if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
@@ -477,7 +479,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
@Override
public boolean refresh(String callingPkg, Uri uri, Bundle args,
ICancellationSignal cancellationSignal) throws RemoteException {
- validateIncomingUri(uri);
+ uri = validateIncomingUri(uri);
uri = getUriWithoutUserId(uri);
if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return false;
@@ -1914,7 +1916,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
*/
if (mContext == null) {
mContext = context;
- if (context != null) {
+ if (context != null && mTransport != null) {
mTransport.mAppOpsManager = (AppOpsManager) context.getSystemService(
Context.APP_OPS_SERVICE);
}
@@ -2023,7 +2025,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
}
/** @hide */
- private void validateIncomingUri(Uri uri) throws SecurityException {
+ public Uri validateIncomingUri(Uri uri) throws SecurityException {
String auth = uri.getAuthority();
if (!mSingleUser) {
int userId = getUserIdFromAuthority(auth, UserHandle.USER_CURRENT);
@@ -2042,6 +2044,19 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
}
throw new SecurityException(message);
}
+
+ // Normalize the path by removing any empty path segments, which can be
+ // a source of security issues.
+ final String encodedPath = uri.getEncodedPath();
+ if (encodedPath != null && encodedPath.indexOf("//") != -1) {
+ final Uri normalized = uri.buildUpon()
+ .encodedPath(encodedPath.replaceAll("//+", "/")).build();
+ Log.w(TAG, "Normalized " + uri + " to " + normalized
+ + " to avoid possible security issues");
+ return normalized;
+ } else {
+ return uri;
+ }
}
/** @hide */
diff --git a/core/java/android/content/ContentProviderOperation.java b/core/java/android/content/ContentProviderOperation.java
index e3d9b1931faa..7dc45776715c 100644
--- a/core/java/android/content/ContentProviderOperation.java
+++ b/core/java/android/content/ContentProviderOperation.java
@@ -101,13 +101,9 @@ public class ContentProviderOperation implements Parcelable {
}
/** @hide */
- public ContentProviderOperation(ContentProviderOperation cpo, boolean removeUserIdFromUri) {
+ public ContentProviderOperation(ContentProviderOperation cpo, Uri withUri) {
mType = cpo.mType;
- if (removeUserIdFromUri) {
- mUri = ContentProvider.getUriWithoutUserId(cpo.mUri);
- } else {
- mUri = cpo.mUri;
- }
+ mUri = withUri;
mValues = cpo.mValues;
mSelection = cpo.mSelection;
mSelectionArgs = cpo.mSelectionArgs;
@@ -117,14 +113,6 @@ public class ContentProviderOperation implements Parcelable {
mYieldAllowed = cpo.mYieldAllowed;
}
- /** @hide */
- public ContentProviderOperation getWithoutUserIdInUri() {
- if (ContentProvider.uriHasUserId(mUri)) {
- return new ContentProviderOperation(this, true);
- }
- return this;
- }
-
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mType);
Uri.writeToParcel(dest, mUri);
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 5cbb1f8895c5..d3d07bd79d2a 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -327,6 +327,15 @@ public abstract class Context {
public static final int BIND_ADJUST_WITH_ACTIVITY = 0x0080;
/**
+ * Flag for {@link #bindService}: If binding from something better than perceptible,
+ * still set the adjust below perceptible. This would be used for bound services that can
+ * afford to be evicted when under extreme memory pressure, but should be restarted as soon
+ * as possible.
+ * @hide
+ */
+ public static final int BIND_ADJUST_BELOW_PERCEPTIBLE = 0x0100;
+
+ /**
* @hide Flag for {@link #bindService}: allows binding to a service provided
* by an instant app. Note that the caller may not have access to the instant
* app providing the service which is a violation of the instant app sandbox.
diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java
index 3de7a8bdfaf3..2d590033259f 100644
--- a/core/java/android/content/pm/ShortcutManager.java
+++ b/core/java/android/content/pm/ShortcutManager.java
@@ -21,7 +21,6 @@ import android.annotation.SystemService;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
-import android.app.Activity;
import android.app.usage.UsageStatsManager;
import android.content.Context;
import android.content.Intent;
@@ -31,256 +30,23 @@ import android.os.Build;
import android.os.Build.VERSION_CODES;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.os.UserHandle;
import com.android.internal.annotations.VisibleForTesting;
import java.util.List;
/**
- * The ShortcutManager performs operations on an app's set of <em>shortcuts</em>. The
- * {@link ShortcutInfo} class contains information about each of the shortcuts themselves.
+ * <p><code>ShortcutManager</code> executes operations on an app's set of <i>shortcuts</i>, which
+ * represent specific tasks and actions that users can perform within your app. This page lists
+ * components of the <code>ShortcutManager</code> class that you can use to create and manage
+ * sets of shortcuts.
*
- * <p>An app's shortcuts represent specific tasks and actions that users can perform within your
- * app. When a user selects a shortcut in the currently-active launcher, your app opens an activity
- * other than the app's starting activity, provided that the currently-active launcher supports app
- * shortcuts.</p>
+ * <p>To learn about methods that retrieve information about a single shortcut&mdash;including
+ * identifiers, type, and status&mdash;read the <code>
+ * <a href="/reference/android/content/pm/ShortcutInfo.html">ShortcutInfo</a></code> reference.
*
- * <p>The types of shortcuts that you create for your app depend on the app's key use cases. For
- * example, an email app may publish the "compose new email" shortcut, which allows the app to
- * directly open the compose activity.</p>
- *
- * <p class="note"><b>Note:</b> Only main activities&mdash;activities that handle the
- * {@link Intent#ACTION_MAIN} action and the {@link Intent#CATEGORY_LAUNCHER} category&mdash;can
- * have shortcuts. If an app has multiple main activities, you need to define the set of shortcuts
- * for <em>each</em> activity.
- *
- * <p>This page discusses the implementation details of the <code>ShortcutManager</code> class. For
- * definitions of key terms and guidance on performing operations on shortcuts within your app, see
- * the <a href="/guide/topics/ui/shortcuts.html">App Shortcuts</a> feature guide.
- *
- * <h3>Shortcut characteristics</h3>
- *
- * This section describes in-depth details about each shortcut type's usage and availability.
- *
- * <p class="note"><b>Important security note:</b> All shortcut information is stored in
- * <a href="/training/articles/direct-boot.html">credential encrypted storage</a>, so your app
- * cannot access a user's shortcuts until after they've unlocked the device.
- *
- * <h4>Static and dynamic shortcuts</h4>
- *
- * <p>Static shortcuts and dynamic shortcuts are shown in a supported launcher when the user
- * performs a specific gesture. On currently-supported launchers, the gesture is a long-press on the
- * app's launcher icon, but the actual gesture may be different on other launcher apps.
- *
- * <p>The {@link LauncherApps} class provides APIs for launcher apps to access shortcuts.
- *
- * <h4>Pinned shortcuts</h4>
- *
- * <p>Because pinned shortcuts appear in the launcher itself, they're always visible. A pinned
- * shortcut is removed from the launcher only in the following situations:
- * <ul>
- * <li>The user removes it.
- * <li>The publisher app associated with the shortcut is uninstalled.
- * <li>The user selects <b>Clear data</b> from the publisher app's <i>Storage</i> screen, within
- * the system's <b>Settings</b> app.
- * </ul>
- *
- * <p>Because the system performs
- * <a href="/guide/topics/ui/shortcuts.html#backup-and-restore">backup and restore</a> on pinned
- * shortcuts automatically, these shortcuts' IDs should contain either stable, constant strings or
- * server-side identifiers, rather than identifiers generated locally that might not make sense on
- * other devices.
- *
- * <h3>Shortcut display order</h3>
- *
- * <p>When the launcher displays an app's shortcuts, they should appear in the following order:
- *
- * <ol>
- * <li><b>Static shortcuts:</b> Shortcuts whose {@link ShortcutInfo#isDeclaredInManifest()} method
- * returns {@code true}.</li>
- * <li><b>Dynamic shortcuts:</b> Shortcuts whose {@link ShortcutInfo#isDynamic()} method returns
- * {@code true}.</li>
- * </ol>
- *
- * <p>Within each shortcut type (static and dynamic), shortcuts are sorted in order of increasing
- * rank according to {@link ShortcutInfo#getRank()}.</p>
- *
- * <h4>Shortcut ranks</h4>
- *
- * <p>Shortcut ranks are non-negative, sequential integers that determine the order in which
- * shortcuts appear, assuming that the shortcuts are all in the same category. You can update ranks
- * of existing shortcuts when you call {@link #updateShortcuts(List)},
- * {@link #addDynamicShortcuts(List)}, or {@link #setDynamicShortcuts(List)}.
- *
- * <p class="note"><b>Note:</b> Ranks are auto-adjusted so that they're unique for each type of
- * shortcut (static or dynamic). For example, if there are 3 dynamic shortcuts with ranks 0, 1 and
- * 2, adding another dynamic shortcut with a rank of 1 represents a request to place this shortcut
- * at the second position. In response, the third and fourth shortcuts move closer to the bottom of
- * the shortcut list, with their ranks changing to 2 and 3, respectively.
- *
- * <h3>Options for static shortcuts</h3>
- *
- * The following list includes descriptions for the different attributes within a static shortcut.
- * You must provide a value for {@code android:shortcutId} and {@code android:shortcutShortLabel};
- * all other values are optional.
- *
- * <dl>
- * <dt>{@code android:shortcutId}</dt>
- * <dd><p>A string literal, which represents the shortcut when a {@code ShortcutManager} object
- * performs operations on it.</p>
- * <p class="note"><b>Note: </b>You cannot set this attribute's value to a resource string, such
- * as <code>@string/foo</code>.</p>
- * </dd>
- *
- * <dt>{@code android:enabled}</dt>
- * <dd><p>Whether the user can interact with the shortcut from a supported launcher.</p>
- * <p>The default value is {@code true}. If you set it to {@code false}, you should also set
- * {@code android:shortcutDisabledMessage} to a message that explains why you've disabled the
- * shortcut. If you don't think you need to provide such a message, it's easiest to just remove
- * the shortcut from the XML file entirely, rather than changing the values of the shortcut's
- * {@code android:enabled} and {@code android:shortcutDisabledMessage} attributes.
- * </dd>
- *
- * <dt>{@code android:icon}</dt>
- * <dd><p>The <a href="/topic/performance/graphics/index.html">bitmap</a> or
- * <a href="/guide/practices/ui_guidelines/icon_design_adaptive.html">adaptive icon</a> that the
- * launcher uses when displaying the shortcut to the user. This value can be either the path to an
- * image or the resource file that contains the image. Use adaptive icons whenever possible to
- * improve performance and consistency.</p>
- * <p class="note"><b>Note: </b>Shortcut icons cannot include
- * <a href="/training/material/drawables.html#DrawableTint">tints</a>.
- * </dd>
- *
- * <dt>{@code android:shortcutShortLabel}</dt>
- * <dd><p>A concise phrase that describes the shortcut's purpose. For more information, see
- * {@link ShortcutInfo.Builder#setShortLabel(CharSequence)}.</p>
- * <p class="note"><b>Note: </b>This attribute's value must be a resource string, such as
- * <code>@string/shortcut_short_label</code>.</p>
- * </dd>
- *
- * <dt>{@code android:shortcutLongLabel}</dt>
- * <dd><p>An extended phrase that describes the shortcut's purpose. If there's enough space, the
- * launcher displays this value instead of {@code android:shortcutShortLabel}. For more
- * information, see {@link ShortcutInfo.Builder#setLongLabel(CharSequence)}.</p>
- * <p class="note"><b>Note: </b>This attribute's value must be a resource string, such as
- * <code>@string/shortcut_long_label</code>.</p>
- * </dd>
- *
- * <dt>{@code android:shortcutDisabledMessage}</dt>
- * <dd><p>The message that appears in a supported launcher when the user attempts to launch a
- * disabled shortcut. The message should explain to the user why the shortcut is now disabled.
- * This attribute's value has no effect if {@code android:enabled} is {@code true}.</p>
- * <p class="note"><b>Note: </b>This attribute's value must be a resource string, such as
- * <code>@string/shortcut_disabled_message</code>.</p>
- * </dd>
- * </dl>
- *
- * <h3>Inner elements that define static shortcuts</h3>
- *
- * <p>The XML file that lists an app's static shortcuts supports the following elements inside each
- * {@code <shortcut>} element. You must include an {@code intent} inner element for each
- * static shortcut that you define.</p>
- *
- * <dl>
- * <dt>{@code intent}</dt>
- * <dd><p>The action that the system launches when the user selects the shortcut. This intent must
- * provide a value for the {@code android:action} attribute.</p>
- * <p>You can provide multiple intents for a single shortcut. If you do so, the last defined
- * activity is launched, and the other activities are placed in the
- * <a href="/guide/components/tasks-and-back-stack.html">back stack</a>. See
- * <a href="/guide/topics/ui/shortcuts.html#static">Using Static Shortcuts</a> and the
- * {@link android.app.TaskStackBuilder} class reference for details.</p>
- * <p class="note"><b>Note:</b> This {@code intent} element cannot include string resources.</p>
- * <p>To learn more about how to configure intents, see
- * <a href="{@docRoot}guide/topics/ui/settings.html#Intents">Using intents</a>.</p>
- * </dd>
- *
- * <dt>{@code categories}</dt>
- * <dd><p>Provides a grouping for the types of actions that your app's shortcuts perform, such as
- * creating new chat messages.</p>
- * <p>For a list of supported shortcut categories, see the {@link ShortcutInfo} class reference
- * for a list of supported shortcut categories.
- * </dd>
- * </dl>
- *
- * <h3>Updating shortcuts</h3>
- *
- * <p>Each app's launcher icon can contain at most {@link #getMaxShortcutCountPerActivity()} number
- * of static and dynamic shortcuts combined. There is no limit to the number of pinned shortcuts
- * that an app can create, though.
- *
- * <p>When a dynamic shortcut is pinned, even when the publisher removes it as a dynamic shortcut,
- * the pinned shortcut is still visible and launchable. This allows an app to have more than
- * {@link #getMaxShortcutCountPerActivity()} number of shortcuts.
- *
- * <p>As an example, suppose {@link #getMaxShortcutCountPerActivity()} is 5:
- * <ol>
- * <li>A chat app publishes 5 dynamic shortcuts for the 5 most recent
- * conversations (c1, c2, ..., c5).
- *
- * <li>The user pins all 5 of the shortcuts.
- *
- * <li>Later, the user has started 3 additional conversations (c6, c7, and c8), so the publisher
- * app re-publishes its dynamic shortcuts. The new dynamic shortcut list is: c4, c5, ..., c8.
- * <p>The publisher app has to remove c1, c2, and c3 because it can't have more than 5 dynamic
- * shortcuts. However, c1, c2, and c3 are still pinned shortcuts that the user can access and
- * launch.
- * <p>At this point, the user can access a total of 8 shortcuts that link to activities in the
- * publisher app, including the 3 pinned shortcuts, even though an app can have at most 5
- * dynamic shortcuts.
- *
- * <li>The app can use {@link #updateShortcuts(List)} to update <em>any</em> of the existing
- * 8 shortcuts, when, for example, the chat peers' icons have changed.
- * <p>The {@link #addDynamicShortcuts(List)} and {@link #setDynamicShortcuts(List)} methods
- * can also be used to update existing shortcuts with the same IDs, but they <b>cannot</b> be
- * used for updating non-dynamic, pinned shortcuts because these 2 methods try to convert the
- * given lists of shortcuts to dynamic shortcuts.
- * </ol>
- *
- * <h3>Shortcut intents</h3>
- *
- * <p>
- * Dynamic shortcuts can be published with any set of {@link Intent#addFlags Intent} flags.
- * Typically, {@link Intent#FLAG_ACTIVITY_CLEAR_TASK} is specified, possibly along with other
- * flags; otherwise, if the app is already running, the app is simply brought to
- * the foreground, and the target activity might not appear.
- *
- * <p>Static shortcuts <b>cannot</b> have custom intent flags.
- * The first intent of a static shortcut will always have {@link Intent#FLAG_ACTIVITY_NEW_TASK}
- * and {@link Intent#FLAG_ACTIVITY_CLEAR_TASK} set. This means, when the app is already running, all
- * the existing activities in your app are destroyed when a static shortcut is launched.
- * If this behavior is not desirable, you can use a <em>trampoline activity</em>, or an invisible
- * activity that starts another activity in {@link Activity#onCreate}, then calls
- * {@link Activity#finish()}:
- * <ol>
- * <li>In the <code>AndroidManifest.xml</code> file, the trampoline activity should include the
- * attribute assignment {@code android:taskAffinity=""}.
- * <li>In the shortcuts resource file, the intent within the static shortcut should reference
- * the trampoline activity.
- * </ol>
- *
- * <h3>Rate limiting</h3>
- *
- * <p>When <a href="/guide/topics/ui/shortcuts.html#rate-limit">rate limiting</a> is active,
- * {@link #isRateLimitingActive()} returns {@code true}.
- *
- * <p>Rate limiting is reset upon certain events, so even background apps can call these APIs until
- * the rate limit is reached again. These events include the following:
- * <ul>
- * <li>An app comes to the foreground.
- * <li>The system locale changes.
- * <li>The user performs the <a href="/guide/topics/ui/notifiers/notifications.html#direct">inline
- * reply</a> action on a notification.
- * </ul>
- *
- * <h3>Handling system locale changes</h3>
- *
- * <p>Apps should update dynamic and pinned shortcuts when they receive the
- * {@link Intent#ACTION_LOCALE_CHANGED} broadcast, indicating that the system locale has changed.
- * <p>When the system locale changes, <a href="/guide/topics/ui/shortcuts.html#rate-limit">rate
- * limiting</a> is reset, so even background apps can add and update dynamic shortcuts until the
- * rate limit is reached again.
+ * <p>For guidance about using shortcuts, see
+ * <a href="/guide/topics/ui/shortcuts/index.html">App shortcuts</a>.
*
* <h3>Retrieving class instances</h3>
* <!-- Provides a heading for the content filled in by the @SystemService annotation below -->
@@ -461,8 +227,9 @@ public class ShortcutManager {
}
/**
- * Disable pinned shortcuts. For more details, see the Javadoc for the {@link ShortcutManager}
- * class.
+ * Disable pinned shortcuts. For more details, read
+ * <a href="/guide/topics/ui/shortcuts/managing-shortcuts.html#disable-shortcuts">
+ * Disable shortcuts</a>.
*
* @throws IllegalArgumentException If trying to disable immutable shortcuts.
*
@@ -501,7 +268,9 @@ public class ShortcutManager {
/**
* Disable pinned shortcuts, showing the user a custom error message when they try to select
* the disabled shortcuts.
- * For more details, see the Javadoc for the {@link ShortcutManager} class.
+ * For more details, read
+ * <a href="/guide/topics/ui/shortcuts/managing-shortcuts.html#disable-shortcuts">
+ * Disable shortcuts</a>.
*
* @throws IllegalArgumentException If trying to disable immutable shortcuts.
*
@@ -589,7 +358,8 @@ public class ShortcutManager {
/**
* Return {@code true} when rate-limiting is active for the caller app.
*
- * <p>See the class level javadoc for details.
+ * <p>For details, see <a href="/guide/topics/ui/shortcuts/managing-shortcuts#rate-limiting">
+ * Rate limiting</a>.
*
* @throws IllegalStateException when the user is locked.
*/
@@ -635,7 +405,9 @@ public class ShortcutManager {
* Apps that publish shortcuts should call this method whenever the user
* selects the shortcut containing the given ID or when the user completes
* an action in the app that is equivalent to selecting the shortcut.
- * For more details, see the Javadoc for the {@link ShortcutManager} class
+ * For more details, read about
+ * <a href="/guide/topics/ui/shortcuts/managing-shortcuts.html#track-usage">
+ * tracking shortcut usage</a>.
*
* <p>The information is accessible via {@link UsageStatsManager#queryEvents}
* Typically, launcher apps use this information to build a prediction model
@@ -703,7 +475,9 @@ public class ShortcutManager {
* @param resultIntent If not null, this intent will be sent when the shortcut is pinned.
* Use {@link android.app.PendingIntent#getIntentSender()} to create an {@link IntentSender}.
* To avoid background execution limits, use an unexported, manifest-declared receiver.
- * For more details, see the overview documentation for the {@link ShortcutManager} class.
+ * For more details, see
+ * <a href="/guide/topics/ui/shortcuts/creating-shortcuts.html#pinned">
+ * Creating pinned shortcuts</a>.
*
* @return {@code TRUE} if the launcher supports this feature. Note the API will return without
* waiting for the user to respond, so getting {@code TRUE} from this API does *not* mean
diff --git a/core/java/android/database/sqlite/SQLiteDebug.java b/core/java/android/database/sqlite/SQLiteDebug.java
index d39252130d4b..48f8ac97254a 100644
--- a/core/java/android/database/sqlite/SQLiteDebug.java
+++ b/core/java/android/database/sqlite/SQLiteDebug.java
@@ -119,7 +119,6 @@ public final class SQLiteDebug {
/**
* contains statistics about a database
*/
- @TestApi
public static class DbStats {
/** name of the database */
public String dbName;
@@ -151,7 +150,6 @@ public final class SQLiteDebug {
* return all pager and database stats for the current process.
* @return {@link PagerStats}
*/
- @TestApi
public static PagerStats getDatabaseInfo() {
PagerStats stats = new PagerStats();
nativeGetPagerStats(stats);
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index 0c44a566b48a..8a5f43de6883 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -931,7 +931,7 @@ public final class NetworkCapabilities implements Parcelable {
* Returns a transport-specific information container. The application may cast this
* container to a concrete sub-class based on its knowledge of the network request. The
* application should be able to deal with a {@code null} return value or an invalid case,
- * e.g. use {@code instanceof} operation to verify expected type.
+ * e.g. use {@code instanceof} operator to verify expected type.
*
* @return A concrete implementation of the {@link TransportInfo} class or null if not
* available for the network.
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index 1b22911f0cdc..bbf8f97c8865 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -274,7 +274,6 @@ public class TrafficStats {
* Changes only take effect during subsequent calls to
* {@link #tagSocket(Socket)}.
*/
- @SystemApi
@SuppressLint("Doclava125")
public static void setThreadStatsUid(int uid) {
NetworkManagementSocketTagger.setThreadSocketStatsUid(uid);
@@ -313,7 +312,6 @@ public class TrafficStats {
*
* @see #setThreadStatsUid(int)
*/
- @SystemApi
@SuppressLint("Doclava125")
public static void clearThreadStatsUid() {
NetworkManagementSocketTagger.setThreadSocketStatsUid(-1);
@@ -333,6 +331,14 @@ public class TrafficStats {
/**
* Remove any statistics parameters from the given {@link Socket}.
+ * <p>
+ * In Android 8.1 (API level 27) and lower, a socket is automatically
+ * untagged when it's sent to another process using binder IPC with a
+ * {@code ParcelFileDescriptor} container. In Android 9.0 (API level 28)
+ * and higher, the socket tag is kept when the socket is sent to another
+ * process using binder IPC. You can mimic the previous behavior by
+ * calling {@code untagSocket()} before sending the socket to another
+ * process.
*/
public static void untagSocket(Socket socket) throws SocketException {
SocketTagger.get().untag(socket);
diff --git a/core/java/android/net/http/X509TrustManagerExtensions.java b/core/java/android/net/http/X509TrustManagerExtensions.java
index f9b6dfce32ff..280dad0284b6 100644
--- a/core/java/android/net/http/X509TrustManagerExtensions.java
+++ b/core/java/android/net/http/X509TrustManagerExtensions.java
@@ -16,7 +16,6 @@
package android.net.http;
-import android.annotation.SystemApi;
import android.security.net.config.UserCertificateSource;
import com.android.org.conscrypt.TrustManagerImpl;
@@ -133,7 +132,6 @@ public class X509TrustManagerExtensions {
* Returns {@code true} if the TrustManager uses the same trust configuration for the provided
* hostnames.
*/
- @SystemApi
public boolean isSameTrustConfiguration(String hostname1, String hostname2) {
if (mIsSameTrustConfiguration == null) {
return true;
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 6932aa70267e..6de575960f48 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -628,7 +628,8 @@ public class Build {
* October 2013: Android 4.4, KitKat, another tasty treat.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/kitkat/">Android KitKat overview</a>.</p>
* <ul>
* <li> The default result of
* {@link android.preference.PreferenceActivity#isValidFragment(String)
@@ -678,7 +679,8 @@ public class Build {
* November 2014: Lollipop. A flat one with beautiful shadows. But still tasty.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/lollipop/">Android Lollipop overview</a>.</p>
* <ul>
* <li> {@link android.content.Context#bindService Context.bindService} now
* requires an explicit Intent, and will throw an exception if given an implicit
@@ -707,6 +709,8 @@ public class Build {
/**
* March 2015: Lollipop with an extra sugar coating on the outside!
+ * For more information about this release, see the
+ * <a href="/about/versions/android-5.1">Android 5.1 APIs</a>.
*/
public static final int LOLLIPOP_MR1 = 22;
@@ -714,7 +718,8 @@ public class Build {
* M is for Marshmallow!
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/marshmallow/">Android 6.0 Marshmallow overview</a>.</p>
* <ul>
* <li> Runtime permissions. Dangerous permissions are no longer granted at
* install time, but must be requested by the application at runtime through
@@ -745,7 +750,8 @@ public class Build {
* N is for Nougat.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see
+ * the <a href="/about/versions/nougat/">Android Nougat overview</a>.</p>
* <ul>
* <li> {@link android.app.DownloadManager.Request#setAllowedNetworkTypes
* DownloadManager.Request.setAllowedNetworkTypes}
@@ -795,7 +801,9 @@ public class Build {
public static final int N = 24;
/**
- * N MR1: Nougat++.
+ * N MR1: Nougat++. For more information about this release, see
+ * <a href="/about/versions/nougat/android-7.1">Android 7.1 for
+ * Developers</a>.
*/
public static final int N_MR1 = 25;
@@ -803,7 +811,8 @@ public class Build {
* O.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see
+ * the <a href="/about/versions/oreo/">Android Oreo overview</a>.</p>
* <ul>
* <li><a href="{@docRoot}about/versions/oreo/background.html">Background execution limits</a>
* are applied to the application.</li>
@@ -892,13 +901,16 @@ public class Build {
* O MR1.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see
+ * <a href="/about/versions/oreo/android-8.1">Android 8.1 features and
+ * APIs</a>.</p>
* <ul>
* <li>Apps exporting and linking to apk shared libraries must explicitly
* enumerate all signing certificates in a consistent order.</li>
* <li>{@link android.R.attr#screenOrientation} can not be used to request a fixed
* orientation if the associated activity is not fullscreen and opaque.</li>
* </ul>
+ *
*/
public static final int O_MR1 = 27;
@@ -906,7 +918,8 @@ public class Build {
* P.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/pie/">Android 9 Pie overview</a>.</p>
* <ul>
* <li>{@link android.app.Service#startForeground Service.startForeground} requires
* that apps hold the permission
@@ -914,6 +927,7 @@ public class Build {
* <li>{@link android.widget.LinearLayout} will always remeasure weighted children,
* even if there is no excess space.</li>
* </ul>
+ *
*/
public static final int P = 28;
diff --git a/core/java/android/os/HwBinder.java b/core/java/android/os/HwBinder.java
index 228fe7a3dae5..3de3494e7ea7 100644
--- a/core/java/android/os/HwBinder.java
+++ b/core/java/android/os/HwBinder.java
@@ -32,10 +32,7 @@ public abstract class HwBinder implements IHwBinder {
/**
* Create and initialize a HwBinder object and the native objects
* used to allow this to participate in hwbinder transactions.
- *
- * @hide
*/
- @SystemApi
public HwBinder() {
native_setup();
@@ -44,7 +41,6 @@ public abstract class HwBinder implements IHwBinder {
mNativeContext);
}
- /** @hide */
@Override
public final native void transact(
int code, HwParcel request, HwParcel reply, int flags)
@@ -57,10 +53,7 @@ public abstract class HwBinder implements IHwBinder {
* @param request parceled transaction
* @param reply object to parcel reply into
* @param flags transaction flags to be chosen by wire protocol
- *
- * @hide
*/
- @SystemApi
public abstract void onTransact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
@@ -69,9 +62,7 @@ public abstract class HwBinder implements IHwBinder {
* Registers this service with the hwservicemanager.
*
* @param serviceName instance name of the service
- * @hide
*/
- @SystemApi
public native final void registerService(String serviceName)
throws RemoteException;
@@ -81,9 +72,7 @@ public abstract class HwBinder implements IHwBinder {
* @param iface fully-qualified interface name for example foo.bar@1.3::IBaz
* @param serviceName the instance name of the service for example default.
* @throws NoSuchElementException when the service is unavailable
- * @hide
*/
- @SystemApi
public static final IHwBinder getService(
String iface,
String serviceName)
@@ -96,9 +85,7 @@ public abstract class HwBinder implements IHwBinder {
* @param serviceName the instance name of the service for example default.
* @param retry whether to wait for the service to start if it's not already started
* @throws NoSuchElementException when the service is unavailable
- * @hide
*/
- @SystemApi
public static native final IHwBinder getService(
String iface,
String serviceName,
@@ -112,9 +99,7 @@ public abstract class HwBinder implements IHwBinder {
* @param maxThreads total number of threads to create (includes this thread if
* callerWillJoin is true)
* @param callerWillJoin whether joinRpcThreadpool will be called in advance
- * @hide
*/
- @SystemApi
public static native final void configureRpcThreadpool(
long maxThreads, boolean callerWillJoin);
@@ -124,10 +109,7 @@ public abstract class HwBinder implements IHwBinder {
* a threadpool with callerWillJoin true and then registering
* the provided service if this thread doesn't need to do
* anything else.
- *
- * @hide
*/
- @SystemApi
public static native final void joinRpcThreadpool();
// Returns address of the "freeFunction".
@@ -155,10 +137,7 @@ public abstract class HwBinder implements IHwBinder {
* - tries to enable atracing (if enabled)
* - tries to enable coverage dumps (if running in VTS)
* - tries to enable record and replay (if running in VTS)
- *
- * @hide
*/
- @SystemApi
public static void enableInstrumentation() {
native_report_sysprop_change();
}
diff --git a/core/java/android/os/IHwBinder.java b/core/java/android/os/IHwBinder.java
index fbdf27e38d67..249eb3aa3456 100644
--- a/core/java/android/os/IHwBinder.java
+++ b/core/java/android/os/IHwBinder.java
@@ -28,10 +28,7 @@ public interface IHwBinder {
* @param request parceled transaction
* @param reply object to parcel reply into
* @param flags transaction flags to be chosen by wire protocol
- *
- * @hide
*/
- @SystemApi
public void transact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
@@ -40,23 +37,19 @@ public interface IHwBinder {
* Return as IHwInterface instance only if this implements descriptor.
*
* @param descriptor for example foo.bar@1.0::IBaz
- * @hide
*/
- @SystemApi
public IHwInterface queryLocalInterface(String descriptor);
/**
* Interface for receiving a callback when the process hosting a service
* has gone away.
*/
- @SystemApi
public interface DeathRecipient {
/**
* Callback for a registered process dying.
*
* @param cookie cookie this death recipient was registered with.
*/
- @SystemApi
public void serviceDied(long cookie);
}
@@ -67,13 +60,11 @@ public interface IHwBinder {
* @param recipient callback object to be called on object death.
* @param cookie value to be given to callback on object death.
*/
- @SystemApi
public boolean linkToDeath(DeathRecipient recipient, long cookie);
/**
* Unregisters the death recipient from this binder.
*
* @param recipient callback to no longer recieve death notifications on this binder.
*/
- @SystemApi
public boolean unlinkToDeath(DeathRecipient recipient);
}
diff --git a/core/java/android/os/IHwInterface.java b/core/java/android/os/IHwInterface.java
index 1d9e2b0197c7..f9edd5bf8883 100644
--- a/core/java/android/os/IHwInterface.java
+++ b/core/java/android/os/IHwInterface.java
@@ -23,6 +23,5 @@ public interface IHwInterface {
/**
* @return the binder object that corresponds to this interface.
*/
- @SystemApi
public IHwBinder asBinder();
}
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index c9c42058bad0..be8cf0e9137a 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -18,7 +18,6 @@
package android.os;
import android.net.InterfaceConfiguration;
-import android.net.INetd;
import android.net.INetworkManagementEventObserver;
import android.net.ITetheringStatsProvider;
import android.net.Network;
@@ -47,11 +46,6 @@ interface INetworkManagementService
void unregisterObserver(INetworkManagementEventObserver obs);
/**
- * Retrieve an INetd to talk to netd.
- */
- INetd getNetdService();
-
- /**
* Returns a list of currently known network interfaces
*/
String[] listInterfaces();
diff --git a/core/java/android/os/Message.java b/core/java/android/os/Message.java
index c3f60a332a2b..47659a295c50 100644
--- a/core/java/android/os/Message.java
+++ b/core/java/android/os/Message.java
@@ -349,7 +349,7 @@ public final class Message implements Parcelable {
}
/**
- * Retrieve the a {@link android.os.Handler Handler} implementation that
+ * Retrieve the {@link android.os.Handler Handler} implementation that
* will receive this message. The object must implement
* {@link android.os.Handler#handleMessage(android.os.Message)
* Handler.handleMessage()}. Each Handler has its own name-space for
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index c7ebc8905692..210404ce4d71 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -834,11 +834,19 @@ public final class Parcel {
return;
}
Set<Map.Entry<String,Object>> entries = val.entrySet();
- writeInt(entries.size());
+ int size = entries.size();
+ writeInt(size);
+
for (Map.Entry<String,Object> e : entries) {
writeValue(e.getKey());
writeValue(e.getValue());
+ size--;
}
+
+ if (size != 0) {
+ throw new BadParcelableException("Map size does not match number of entries!");
+ }
+
}
/**
diff --git a/core/java/android/os/StatsLogEventWrapper.java b/core/java/android/os/StatsLogEventWrapper.java
index d4d3dc838d91..7b3ea57ba0e9 100644
--- a/core/java/android/os/StatsLogEventWrapper.java
+++ b/core/java/android/os/StatsLogEventWrapper.java
@@ -65,11 +65,17 @@ public final class StatsLogEventWrapper implements Parcelable {
public static final Parcelable.Creator<StatsLogEventWrapper> CREATOR = new
Parcelable.Creator<StatsLogEventWrapper>() {
public StatsLogEventWrapper createFromParcel(Parcel in) {
- return new StatsLogEventWrapper(in);
+ android.util.EventLog.writeEvent(0x534e4554, "112550251",
+ android.os.Binder.getCallingUid(), "");
+ // Purposefully leaving this method not implemented.
+ throw new RuntimeException("Not implemented");
}
public StatsLogEventWrapper[] newArray(int size) {
- return new StatsLogEventWrapper[size];
+ android.util.EventLog.writeEvent(0x534e4554, "112550251",
+ android.os.Binder.getCallingUid(), "");
+ // Purposefully leaving this method not implemented.
+ throw new RuntimeException("Not implemented");
}
};
@@ -120,10 +126,6 @@ public final class StatsLogEventWrapper implements Parcelable {
mStorage.write(bytes, 0, bytes.length);
}
- private StatsLogEventWrapper(Parcel in) {
- readFromParcel(in);
- }
-
/**
* Writes the stored fields to a byte array. Will first write a new-line character to denote
* END_LIST before writing contents to byte array.
@@ -134,13 +136,6 @@ public final class StatsLogEventWrapper implements Parcelable {
}
/**
- * Not implemented.
- */
- public void readFromParcel(Parcel in) {
- // Not needed since this java class is for sending to statsd only.
- }
-
- /**
* Boilerplate for Parcel.
*/
public int describeContents() {
diff --git a/core/java/android/os/SystemUpdateManager.java b/core/java/android/os/SystemUpdateManager.java
index ce3e225975f0..9146731f8f9f 100644
--- a/core/java/android/os/SystemUpdateManager.java
+++ b/core/java/android/os/SystemUpdateManager.java
@@ -34,62 +34,51 @@ public class SystemUpdateManager {
private static final String TAG = "SystemUpdateManager";
/** The status key of the system update info, expecting an int value. */
- @SystemApi
public static final String KEY_STATUS = "status";
/** The title of the current update, expecting a String value. */
- @SystemApi
public static final String KEY_TITLE = "title";
/** Whether it is a security update, expecting a boolean value. */
- @SystemApi
public static final String KEY_IS_SECURITY_UPDATE = "is_security_update";
/** The build fingerprint after installing the current update, expecting a String value. */
- @SystemApi
public static final String KEY_TARGET_BUILD_FINGERPRINT = "target_build_fingerprint";
/** The security patch level after installing the current update, expecting a String value. */
- @SystemApi
public static final String KEY_TARGET_SECURITY_PATCH_LEVEL = "target_security_patch_level";
/**
* The KEY_STATUS value that indicates there's no update status info available.
*/
- @SystemApi
public static final int STATUS_UNKNOWN = 0;
/**
* The KEY_STATUS value that indicates there's no pending update.
*/
- @SystemApi
public static final int STATUS_IDLE = 1;
/**
* The KEY_STATUS value that indicates an update is available for download, but pending user
* approval to start.
*/
- @SystemApi
public static final int STATUS_WAITING_DOWNLOAD = 2;
/**
* The KEY_STATUS value that indicates an update is in progress (i.e. downloading or installing
* has started).
*/
- @SystemApi
public static final int STATUS_IN_PROGRESS = 3;
/**
* The KEY_STATUS value that indicates an update is available for install.
*/
- @SystemApi
public static final int STATUS_WAITING_INSTALL = 4;
/**
* The KEY_STATUS value that indicates an update will be installed after a reboot. This applies
* to both of A/B and non-A/B OTAs.
*/
- @SystemApi
public static final int STATUS_WAITING_REBOOT = 5;
private final ISystemUpdateManager mService;
@@ -110,7 +99,6 @@ public class SystemUpdateManager {
*
* @throws SecurityException if the caller is not allowed to read the info.
*/
- @SystemApi
@RequiresPermission(anyOf = {
android.Manifest.permission.READ_SYSTEM_UPDATE_INFO,
android.Manifest.permission.RECOVERY,
@@ -137,7 +125,6 @@ public class SystemUpdateManager {
* @throws IllegalArgumentException if @link #KEY_STATUS} does not exist.
* @throws SecurityException if the caller is not allowed to update the info.
*/
- @SystemApi
@RequiresPermission(android.Manifest.permission.RECOVERY)
public void updateSystemUpdateInfo(PersistableBundle infoBundle) {
if (infoBundle == null || !infoBundle.containsKey(KEY_STATUS)) {
diff --git a/core/java/android/os/UpdateEngine.java b/core/java/android/os/UpdateEngine.java
index 24c9c9177360..8f2826c16b63 100644
--- a/core/java/android/os/UpdateEngine.java
+++ b/core/java/android/os/UpdateEngine.java
@@ -54,7 +54,6 @@ public class UpdateEngine {
* Error code from the update engine. Values must agree with the ones in
* system/update_engine/common/error_code.h.
*/
- @SystemApi
public static final class ErrorCodeConstants {
public static final int SUCCESS = 0;
public static final int ERROR = 1;
@@ -74,7 +73,6 @@ public class UpdateEngine {
* Update status code from the update engine. Values must agree with the
* ones in system/update_engine/client_library/include/update_engine/update_status.h.
*/
- @SystemApi
public static final class UpdateStatusConstants {
public static final int IDLE = 0;
public static final int CHECKING_FOR_UPDATE = 1;
@@ -95,7 +93,6 @@ public class UpdateEngine {
/**
* Creates a new instance.
*/
- @SystemApi
public UpdateEngine() {
mUpdateEngine = IUpdateEngine.Stub.asInterface(
ServiceManager.getService(UPDATE_ENGINE_SERVICE));
@@ -106,7 +103,6 @@ public class UpdateEngine {
* status change, and when the update completes. A handler can be supplied
* to control which thread runs the callback, or null.
*/
- @SystemApi
public boolean bind(final UpdateEngineCallback callback, final Handler handler) {
synchronized (mUpdateEngineCallbackLock) {
mUpdateEngineCallback = new IUpdateEngineCallback.Stub() {
@@ -150,7 +146,6 @@ public class UpdateEngine {
/**
* Equivalent to {@code bind(callback, null)}.
*/
- @SystemApi
public boolean bind(final UpdateEngineCallback callback) {
return bind(callback, null);
}
@@ -183,7 +178,6 @@ public class UpdateEngine {
* };
* </pre>
*/
- @SystemApi
public void applyPayload(String url, long offset, long size, String[] headerKeyValuePairs) {
try {
mUpdateEngine.applyPayload(url, offset, size, headerKeyValuePairs);
@@ -201,7 +195,6 @@ public class UpdateEngine {
* <p>See {@link #suspend} for a way to temporarily stop an in-progress
* update with the ability to resume it later.
*/
- @SystemApi
public void cancel() {
try {
mUpdateEngine.cancel();
@@ -214,7 +207,6 @@ public class UpdateEngine {
* Suspends an in-progress update. This can be undone by calling
* {@link #resume}.
*/
- @SystemApi
public void suspend() {
try {
mUpdateEngine.suspend();
@@ -226,7 +218,6 @@ public class UpdateEngine {
/**
* Resumes a suspended update.
*/
- @SystemApi
public void resume() {
try {
mUpdateEngine.resume();
@@ -244,7 +235,6 @@ public class UpdateEngine {
* {@code UPDATED_NEED_REBOOT}, so your callback can remove any outstanding
* notification that rebooting into the new system is possible.
*/
- @SystemApi
public void resetStatus() {
try {
mUpdateEngine.resetStatus();
@@ -256,7 +246,6 @@ public class UpdateEngine {
/**
* Unbinds the last bound callback function.
*/
- @SystemApi
public boolean unbind() {
synchronized (mUpdateEngineCallbackLock) {
if (mUpdateEngineCallback == null) {
@@ -281,7 +270,6 @@ public class UpdateEngine {
* @param payloadMetadataFilename the location of the metadata without the
* {@code file://} prefix.
*/
- @SystemApi
public boolean verifyPayloadMetadata(String payloadMetadataFilename) {
try {
return mUpdateEngine.verifyPayloadApplicable(payloadMetadataFilename);
diff --git a/core/java/android/os/UpdateEngineCallback.java b/core/java/android/os/UpdateEngineCallback.java
index afff60abb22b..f07294e222e2 100644
--- a/core/java/android/os/UpdateEngineCallback.java
+++ b/core/java/android/os/UpdateEngineCallback.java
@@ -37,7 +37,6 @@ public abstract class UpdateEngineCallback {
* be one of the values from {@link UpdateEngine.UpdateStatusConstants},
* and {@code percent} will be valid [TODO: in which cases?].
*/
- @SystemApi
public abstract void onStatusUpdate(int status, float percent);
/**
@@ -45,6 +44,5 @@ public abstract class UpdateEngineCallback {
* unsuccessfully. The value of {@code errorCode} will be one of the
* values from {@link UpdateEngine.ErrorCodeConstants}.
*/
- @SystemApi
public abstract void onPayloadApplicationComplete(int errorCode);
}
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index d16390976d1f..8ed2605e9e8c 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -80,7 +80,7 @@ import java.util.List;
* <li>On a small screen it may display only the headers as a single list when first launched.
* Selecting one of the header items will only show the PreferenceFragment of that header (on
* Android N and lower a new Activity is launched).
- * <li>On a large screen in may display both the headers and current PreferenceFragment together as
+ * <li>On a large screen it may display both the headers and current PreferenceFragment together as
* panes. Selecting a header item switches to showing the correct PreferenceFragment for that item.
* </ul>
*
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 258c9a92fbfc..e6f8a56c17f0 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -10682,6 +10682,15 @@ public final class Settings {
public static final String ACTIVITY_MANAGER_CONSTANTS = "activity_manager_constants";
/**
+ * Feature flag to enable or disable the activity starts logging feature.
+ * Type: int (0 for false, 1 for true)
+ * Default: 0
+ * @hide
+ */
+ public static final String ACTIVITY_STARTS_LOGGING_ENABLED
+ = "activity_starts_logging_enabled";
+
+ /**
* App ops specific settings.
* This is encoded as a key=value list, separated by commas. Ex:
*
diff --git a/core/java/android/service/autofill/Dataset.java b/core/java/android/service/autofill/Dataset.java
index 521176797657..f8408bedd7bc 100644
--- a/core/java/android/service/autofill/Dataset.java
+++ b/core/java/android/service/autofill/Dataset.java
@@ -33,8 +33,13 @@ import java.util.ArrayList;
import java.util.regex.Pattern;
/**
- * A dataset object represents a group of fields (key / value pairs) used to autofill parts of a
- * screen.
+ * <p>A <code>Dataset</code> object represents a group of fields (key / value pairs) used
+ * to autofill parts of a screen.
+ *
+ * <p>For more information about the role of datasets in the autofill workflow, read
+ * <a href="/guide/topics/text/autofill-services">Build autofill services</a> and the
+ * <code><a href="/reference/android/service/autofill/AutofillService">AutofillService</a></code>
+ * documentation.
*
* <a name="BasicUsage"></a>
* <h3>Basic usage</h3>
@@ -88,10 +93,6 @@ import java.util.regex.Pattern;
* <li>All other datasets are hidden.
* </ol>
*
- * <a name="MoreInfo"></a>
- * <h3>More information</h3>
- * <p>See {@link android.service.autofill.AutofillService} for more information and examples about
- * the role of datasets in the autofill workflow.
*/
public final class Dataset implements Parcelable {
diff --git a/core/java/android/service/autofill/FillCallback.java b/core/java/android/service/autofill/FillCallback.java
index 0257891e5f38..1695c1306824 100644
--- a/core/java/android/service/autofill/FillCallback.java
+++ b/core/java/android/service/autofill/FillCallback.java
@@ -21,8 +21,11 @@ import android.app.Activity;
import android.os.RemoteException;
/**
- * Handles autofill requests from the {@link AutofillService} into the {@link Activity} being
- * autofilled.
+ * <p><code>FillCallback</code> handles autofill requests from the {@link AutofillService} into
+ * the {@link Activity} being autofilled.
+ *
+ * <p>To learn about using Autofill services in your app, read
+ * <a href="/guide/topics/text/autofill-services">Build autofill services</a>.
*/
public final class FillCallback {
private final IFillCallback mCallback;
diff --git a/core/java/android/service/notification/Condition.java b/core/java/android/service/notification/Condition.java
index b6c6bdc00bbe..af7e93e0ed74 100644
--- a/core/java/android/service/notification/Condition.java
+++ b/core/java/android/service/notification/Condition.java
@@ -17,7 +17,6 @@
package android.service.notification;
import android.annotation.IntDef;
-import android.annotation.SystemApi;
import android.content.Context;
import android.net.Uri;
import android.os.Parcel;
@@ -35,7 +34,6 @@ import java.util.Objects;
*/
public final class Condition implements Parcelable {
- @SystemApi
public static final String SCHEME = "condition";
/** @hide */
@@ -59,14 +57,10 @@ public final class Condition implements Parcelable {
*/
public static final int STATE_TRUE = 1;
- @SystemApi
public static final int STATE_UNKNOWN = 2;
- @SystemApi
public static final int STATE_ERROR = 3;
- @SystemApi
public static final int FLAG_RELEVANT_NOW = 1 << 0;
- @SystemApi
public static final int FLAG_RELEVANT_ALWAYS = 1 << 1;
/**
@@ -81,9 +75,7 @@ public final class Condition implements Parcelable {
*/
public final String summary;
- @SystemApi
public final String line1;
- @SystemApi
public final String line2;
/**
@@ -94,9 +86,7 @@ public final class Condition implements Parcelable {
@State
public final int state;
- @SystemApi
public final int flags;
- @SystemApi
public final int icon;
/**
@@ -108,7 +98,6 @@ public final class Condition implements Parcelable {
this(id, summary, "", "", -1, state, FLAG_RELEVANT_ALWAYS);
}
- @SystemApi
public Condition(Uri id, String summary, String line1, String line2, int icon,
int state, int flags) {
if (id == null) throw new IllegalArgumentException("id is required");
@@ -151,14 +140,14 @@ public final class Condition implements Parcelable {
@Override
public String toString() {
return new StringBuilder(Condition.class.getSimpleName()).append('[')
- .append("id=").append(id)
- .append(",summary=").append(summary)
- .append(",line1=").append(line1)
- .append(",line2=").append(line2)
- .append(",icon=").append(icon)
- .append(",state=").append(stateToString(state))
- .append(",flags=").append(flags)
- .append(']').toString();
+ .append("state=").append(stateToString(state))
+ .append(",id=").append(id)
+ .append(",summary=").append(summary)
+ .append(",line1=").append(line1)
+ .append(",line2=").append(line2)
+ .append(",icon=").append(icon)
+ .append(",flags=").append(flags)
+ .append(']').toString();
}
/** @hide */
@@ -177,7 +166,6 @@ public final class Condition implements Parcelable {
proto.end(token);
}
- @SystemApi
public static String stateToString(int state) {
if (state == STATE_FALSE) return "STATE_FALSE";
if (state == STATE_TRUE) return "STATE_TRUE";
@@ -186,7 +174,6 @@ public final class Condition implements Parcelable {
throw new IllegalArgumentException("state is invalid: " + state);
}
- @SystemApi
public static String relevanceToString(int flags) {
final boolean now = (flags & FLAG_RELEVANT_NOW) != 0;
final boolean always = (flags & FLAG_RELEVANT_ALWAYS) != 0;
@@ -219,7 +206,6 @@ public final class Condition implements Parcelable {
return 0;
}
- @SystemApi
public Condition copy() {
final Parcel parcel = Parcel.obtain();
try {
@@ -231,14 +217,12 @@ public final class Condition implements Parcelable {
}
}
- @SystemApi
public static Uri.Builder newId(Context context) {
return new Uri.Builder()
.scheme(Condition.SCHEME)
.authority(context.getPackageName());
}
- @SystemApi
public static boolean isValidId(Uri id, String pkg) {
return id != null && SCHEME.equals(id.getScheme()) && pkg.equals(id.getAuthority());
}
diff --git a/core/java/android/service/notification/ConditionProviderService.java b/core/java/android/service/notification/ConditionProviderService.java
index 6fc689ab07cf..5203c8f4bb27 100644
--- a/core/java/android/service/notification/ConditionProviderService.java
+++ b/core/java/android/service/notification/ConditionProviderService.java
@@ -17,7 +17,6 @@
package android.service.notification;
import android.annotation.SdkConstant;
-import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.ActivityManager;
import android.app.INotificationManager;
@@ -107,7 +106,6 @@ public abstract class ConditionProviderService extends Service {
*/
abstract public void onConnected();
- @SystemApi
public void onRequestConditions(int relevance) {}
/**
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java
index f6749ee66bb4..1af2e73c95ce 100644
--- a/core/java/android/service/notification/ZenModeConfig.java
+++ b/core/java/android/service/notification/ZenModeConfig.java
@@ -244,11 +244,29 @@ public class ZenModeConfig implements Parcelable {
.append(",allowMessagesFrom=").append(sourceToString(allowMessagesFrom))
.append(",suppressedVisualEffects=").append(suppressedVisualEffects)
.append(",areChannelsBypassingDnd=").append(areChannelsBypassingDnd)
- .append(",automaticRules=").append(automaticRules)
- .append(",manualRule=").append(manualRule)
+ .append(",\nautomaticRules=").append(rulesToString())
+ .append(",\nmanualRule=").append(manualRule)
.append(']').toString();
}
+ private String rulesToString() {
+ if (automaticRules.isEmpty()) {
+ return "{}";
+ }
+
+ StringBuilder buffer = new StringBuilder(automaticRules.size() * 28);
+ buffer.append('{');
+ for (int i = 0; i < automaticRules.size(); i++) {
+ if (i > 0) {
+ buffer.append(",\n");
+ }
+ Object value = automaticRules.valueAt(i);
+ buffer.append(value);
+ }
+ buffer.append('}');
+ return buffer.toString();
+ }
+
private Diff diff(ZenModeConfig to) {
final Diff d = new Diff();
if (to == null) {
@@ -1014,10 +1032,10 @@ public class ZenModeConfig implements Parcelable {
@UnsupportedAppUsage
public static ScheduleInfo tryParseScheduleConditionId(Uri conditionId) {
final boolean isSchedule = conditionId != null
- && conditionId.getScheme().equals(Condition.SCHEME)
- && conditionId.getAuthority().equals(ZenModeConfig.SYSTEM_AUTHORITY)
+ && Condition.SCHEME.equals(conditionId.getScheme())
+ && ZenModeConfig.SYSTEM_AUTHORITY.equals(conditionId.getAuthority())
&& conditionId.getPathSegments().size() == 1
- && conditionId.getPathSegments().get(0).equals(ZenModeConfig.SCHEDULE_PATH);
+ && ZenModeConfig.SCHEDULE_PATH.equals(conditionId.getPathSegments().get(0));
if (!isSchedule) return null;
final int[] start = tryParseHourAndMinute(conditionId.getQueryParameter("start"));
final int[] end = tryParseHourAndMinute(conditionId.getQueryParameter("end"));
@@ -1120,10 +1138,10 @@ public class ZenModeConfig implements Parcelable {
public static EventInfo tryParseEventConditionId(Uri conditionId) {
final boolean isEvent = conditionId != null
- && conditionId.getScheme().equals(Condition.SCHEME)
- && conditionId.getAuthority().equals(ZenModeConfig.SYSTEM_AUTHORITY)
+ && Condition.SCHEME.equals(conditionId.getScheme())
+ && ZenModeConfig.SYSTEM_AUTHORITY.equals(conditionId.getAuthority())
&& conditionId.getPathSegments().size() == 1
- && conditionId.getPathSegments().get(0).equals(EVENT_PATH);
+ && EVENT_PATH.equals(conditionId.getPathSegments().get(0));
if (!isEvent) return null;
final EventInfo rt = new EventInfo();
rt.userId = tryParseInt(conditionId.getQueryParameter("userId"), UserHandle.USER_NULL);
@@ -1338,14 +1356,14 @@ public class ZenModeConfig implements Parcelable {
@Override
public String toString() {
return new StringBuilder(ZenRule.class.getSimpleName()).append('[')
- .append("enabled=").append(enabled)
+ .append("id=").append(id)
+ .append(",enabled=").append(String.valueOf(enabled).toUpperCase())
.append(",snoozing=").append(snoozing)
.append(",name=").append(name)
.append(",zenMode=").append(Global.zenModeToString(zenMode))
.append(",conditionId=").append(conditionId)
.append(",condition=").append(condition)
.append(",component=").append(component)
- .append(",id=").append(id)
.append(",creationTime=").append(creationTime)
.append(",enabler=").append(enabler)
.append(']').toString();
@@ -1477,7 +1495,7 @@ public class ZenModeConfig implements Parcelable {
final int N = lines.size();
for (int i = 0; i < N; i++) {
if (i > 0) {
- sb.append(',');
+ sb.append(",\n");
}
sb.append(lines.get(i));
}
diff --git a/core/java/android/service/textclassifier/TextClassifierService.java b/core/java/android/service/textclassifier/TextClassifierService.java
index b461c0daaca5..2417e591cb2b 100644
--- a/core/java/android/service/textclassifier/TextClassifierService.java
+++ b/core/java/android/service/textclassifier/TextClassifierService.java
@@ -80,7 +80,6 @@ public abstract class TextClassifierService extends Service {
* {@link android.Manifest.permission#BIND_TEXTCLASSIFIER_SERVICE} permission so
* that other applications can not abuse it.
*/
- @SystemApi
public static final String SERVICE_INTERFACE =
"android.service.textclassifier.TextClassifierService";
@@ -371,9 +370,7 @@ public abstract class TextClassifierService extends Service {
* Callbacks for TextClassifierService results.
*
* @param <T> the type of the result
- * @hide
*/
- @SystemApi
public interface Callback<T> {
/**
* Returns the result.
diff --git a/core/java/android/util/SparseArray.java b/core/java/android/util/SparseArray.java
index dc07494b15db..aa5ca3530621 100644
--- a/core/java/android/util/SparseArray.java
+++ b/core/java/android/util/SparseArray.java
@@ -23,32 +23,34 @@ import android.annotation.UnsupportedAppUsage;
import libcore.util.EmptyArray;
/**
- * SparseArrays map integers to Objects. Unlike a normal array of Objects,
- * there can be gaps in the indices. It is intended to be more memory efficient
- * than using a HashMap to map Integers to Objects, both because it avoids
+ * <code>SparseArray</code> maps integers to Objects and, unlike a normal array of Objects,
+ * its indices can contain gaps. <code>SparseArray</code> is intended to be more memory-efficient
+ * than a
+ * <a href="/reference/java/util/HashMap"><code>HashMap</code></a>, because it avoids
* auto-boxing keys and its data structure doesn't rely on an extra entry object
* for each mapping.
*
* <p>Note that this container keeps its mappings in an array data structure,
- * using a binary search to find keys. The implementation is not intended to be appropriate for
+ * using a binary search to find keys. The implementation is not intended to be appropriate for
* data structures
- * that may contain large numbers of items. It is generally slower than a traditional
- * HashMap, since lookups require a binary search and adds and removes require inserting
- * and deleting entries in the array. For containers holding up to hundreds of items,
- * the performance difference is not significant, less than 50%.</p>
+ * that may contain large numbers of items. It is generally slower than a
+ * <code>HashMap</code> because lookups require a binary search,
+ * and adds and removes require inserting
+ * and deleting entries in the array. For containers holding up to hundreds of items,
+ * the performance difference is less than 50%.
*
* <p>To help with performance, the container includes an optimization when removing
* keys: instead of compacting its array immediately, it leaves the removed entry marked
- * as deleted. The entry can then be re-used for the same key, or compacted later in
- * a single garbage collection step of all removed entries. This garbage collection will
- * need to be performed at any time the array needs to be grown or the the map size or
- * entry values are retrieved.</p>
+ * as deleted. The entry can then be re-used for the same key or compacted later in
+ * a single garbage collection of all removed entries. This garbage collection
+ * must be performed whenever the array needs to be grown, or when the map size or
+ * entry values are retrieved.
*
* <p>It is possible to iterate over the items in this container using
* {@link #keyAt(int)} and {@link #valueAt(int)}. Iterating over the keys using
- * <code>keyAt(int)</code> with ascending values of the index will return the
- * keys in ascending order, or the values corresponding to the keys in ascending
- * order in the case of <code>valueAt(int)</code>.</p>
+ * <code>keyAt(int)</code> with ascending values of the index returns the
+ * keys in ascending order. In the case of <code>valueAt(int)</code>, the
+ * values corresponding to the keys are returned in ascending order.
*/
public class SparseArray<E> implements Cloneable {
private static final Object DELETED = new Object();
@@ -337,7 +339,7 @@ public class SparseArray<E> implements Cloneable {
/**
* Returns an index for which {@link #valueAt} would return the
- * specified key, or a negative number if no keys map to the
+ * specified value, or a negative number if no keys map to the
* specified value.
* <p>Beware that this is a linear search, unlike lookups by key,
* and that multiple keys can map to the same value and this will
@@ -361,7 +363,7 @@ public class SparseArray<E> implements Cloneable {
/**
* Returns an index for which {@link #valueAt} would return the
- * specified key, or a negative number if no keys map to the
+ * specified value, or a negative number if no keys map to the
* specified value.
* <p>Beware that this is a linear search, unlike lookups by key,
* and that multiple keys can map to the same value and this will
diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java
index 496bc9ff5383..5f80d31651a8 100644
--- a/core/java/android/view/DisplayCutout.java
+++ b/core/java/android/view/DisplayCutout.java
@@ -325,6 +325,7 @@ public final class DisplayCutout {
*
* @hide
*/
+ @VisibleForTesting
public static DisplayCutout fromBoundingRect(int left, int top, int right, int bottom) {
Region r = Region.obtain();
r.set(left, top, right, bottom);
@@ -422,8 +423,11 @@ public final class DisplayCutout {
m.postTranslate(offsetX, 0);
p.transform(m);
- addToRegion(p, r);
+ final Rect tmpRect = new Rect();
+ toRectAndAddToRegion(p, r, tmpRect);
+ final int topInset = tmpRect.bottom;
+ final int bottomInset;
if (bottomSpec != null) {
final Path bottomPath;
try {
@@ -436,10 +440,17 @@ public final class DisplayCutout {
m.postTranslate(0, displayHeight);
bottomPath.transform(m);
p.addPath(bottomPath);
- addToRegion(bottomPath, r);
+ toRectAndAddToRegion(bottomPath, r, tmpRect);
+ bottomInset = displayHeight - tmpRect.top;
+ } else {
+ bottomInset = 0;
}
- final Pair<Path, DisplayCutout> result = new Pair<>(p, fromBounds(r));
+ // Reuse tmpRect as the inset rect we store into the DisplayCutout instance.
+ tmpRect.set(0, topInset, 0, bottomInset);
+ final DisplayCutout cutout = new DisplayCutout(tmpRect, r, false /* copyArguments */);
+
+ final Pair<Path, DisplayCutout> result = new Pair<>(p, cutout);
synchronized (CACHE_LOCK) {
sCachedSpec = spec;
sCachedDisplayWidth = displayWidth;
@@ -450,12 +461,11 @@ public final class DisplayCutout {
return result;
}
- private static void addToRegion(Path p, Region r) {
+ private static void toRectAndAddToRegion(Path p, Region inoutRegion, Rect inoutRect) {
final RectF rectF = new RectF();
- final Rect rect = new Rect();
p.computeBounds(rectF, false /* unused */);
- rectF.round(rect);
- r.op(rect, Op.UNION);
+ rectF.round(inoutRect);
+ inoutRegion.op(inoutRect, Op.UNION);
}
private static Region boundingRectsToRegion(List<Rect> rects) {
diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java
index 3f7ab2aed4af..38dcdd30d843 100644
--- a/core/java/android/view/ViewStructure.java
+++ b/core/java/android/view/ViewStructure.java
@@ -33,9 +33,14 @@ import com.android.internal.util.Preconditions;
import java.util.List;
/**
- * Container for storing additional per-view data generated by {@link View#onProvideStructure
+ * <p><code>ViewStructure</code> is a container for storing additional
+ * per-view data generated by {@link View#onProvideStructure
* View.onProvideStructure} and {@link View#onProvideAutofillStructure
* View.onProvideAutofillStructure}.
+ *
+ * <p>To learn more about using Autofill in your app, read the
+ * <a href="/guide/topics/text/autofill">Autofill Framework</a> guides.
+ *
*/
public abstract class ViewStructure {
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 8b9b85651e7e..84a460119726 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1699,6 +1699,15 @@ public interface WindowManager extends ViewManager {
public static final int PRIVATE_FLAG_IS_SCREEN_DECOR = 0x00400000;
/**
+ * Flag to indicate that the status bar window is now in an explicit expanded state, meaning
+ * that status bar will not be hidden by any window with flag {@link #FLAG_FULLSCREEN} or
+ * {@link View#SYSTEM_UI_FLAG_FULLSCREEN} set.
+ * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}.
+ * @hide
+ */
+ public static final int PRIVATE_FLAG_STATUS_BAR_EXPANDED = 0x00800000;
+
+ /**
* Control flags that are private to the platform.
* @hide
*/
@@ -1786,7 +1795,11 @@ public interface WindowManager extends ViewManager {
@ViewDebug.FlagToString(
mask = PRIVATE_FLAG_IS_SCREEN_DECOR,
equals = PRIVATE_FLAG_IS_SCREEN_DECOR,
- name = "IS_SCREEN_DECOR")
+ name = "IS_SCREEN_DECOR"),
+ @ViewDebug.FlagToString(
+ mask = PRIVATE_FLAG_STATUS_BAR_EXPANDED,
+ equals = PRIVATE_FLAG_STATUS_BAR_EXPANDED,
+ name = "STATUS_BAR_EXPANDED")
})
@TestApi
public int privateFlags;
diff --git a/core/java/android/view/accessibility/AccessibilityRecord.java b/core/java/android/view/accessibility/AccessibilityRecord.java
index 769ea3e1d2c4..b382a1863af3 100644
--- a/core/java/android/view/accessibility/AccessibilityRecord.java
+++ b/core/java/android/view/accessibility/AccessibilityRecord.java
@@ -628,7 +628,7 @@ public class AccessibilityRecord {
}
/**
- * Sets the text before a change.
+ * Gets the text before a change.
*
* @return The text before the change.
*/
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index 7555ffff3e38..d21cb3e64b8c 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -77,11 +77,16 @@ import java.util.Objects;
import sun.misc.Cleaner;
/**
- * The {@link AutofillManager} provides ways for apps and custom views to integrate with the
- * Autofill Framework lifecycle.
+ * <p>The {@link AutofillManager} class provides ways for apps and custom views to
+ * integrate with the Autofill Framework lifecycle.
+ *
+ * <p>To learn about using Autofill in your app, read
+ * the <a href="/guide/topics/text/autofill">Autofill Framework</a> guides.
+ *
+ * <h3 id="autofill-lifecycle">Autofill lifecycle</h3>
*
* <p>The autofill lifecycle starts with the creation of an autofill context associated with an
- * activity context; the autofill context is created when one of the following methods is called for
+ * activity context. The autofill context is created when one of the following methods is called for
* the first time in an activity context, and the current user has an enabled autofill service:
*
* <ul>
@@ -90,7 +95,7 @@ import sun.misc.Cleaner;
* <li>{@link #requestAutofill(View)}
* </ul>
*
- * <p>Tipically, the context is automatically created when the first view of the activity is
+ * <p>Typically, the context is automatically created when the first view of the activity is
* focused because {@code View.onFocusChanged()} indirectly calls
* {@link #notifyViewEntered(View)}. App developers can call {@link #requestAutofill(View)} to
* explicitly create it (for example, a custom view developer could offer a contextual menu action
@@ -134,7 +139,9 @@ import sun.misc.Cleaner;
* shows an autofill save UI if the value of savable views have changed. If the user selects the
* option to Save, the current value of the views is then sent to the autofill service.
*
- * <p>It is safe to call into its methods from any thread.
+ * <h3 id="additional-notes">Additional notes</h3>
+ *
+ * <p>It is safe to call <code>AutofillManager</code> methods from any thread.
*/
@SystemService(Context.AUTOFILL_MANAGER_SERVICE)
@RequiresFeature(PackageManager.FEATURE_AUTOFILL)
@@ -2138,7 +2145,11 @@ public final class AutofillManager {
pw.print(pfx); pw.print("sessionId: "); pw.println(mSessionId);
pw.print(pfx); pw.print("state: "); pw.println(getStateAsStringLocked());
pw.print(pfx); pw.print("context: "); pw.println(mContext);
- pw.print(pfx); pw.print("client: "); pw.println(getClient());
+ final AutofillClient client = getClient();
+ if (client != null) {
+ pw.print(pfx); pw.print("client: "); pw.print(client);
+ pw.print(" ("); pw.print(client.autofillClientGetActivityToken()); pw.println(')');
+ }
pw.print(pfx); pw.print("enabled: "); pw.println(mEnabled);
pw.print(pfx); pw.print("hasService: "); pw.println(mService != null);
pw.print(pfx); pw.print("hasCallback: "); pw.println(mCallback != null);
@@ -2157,8 +2168,24 @@ public final class AutofillManager {
pw.print(pfx); pw.print("entered ids: "); pw.println(mEnteredIds);
pw.print(pfx); pw.print("save trigger id: "); pw.println(mSaveTriggerId);
pw.print(pfx); pw.print("save on finish(): "); pw.println(mSaveOnFinish);
- pw.print(pfx); pw.print("compat mode enabled: "); pw.println(
- isCompatibilityModeEnabledLocked());
+ pw.print(pfx); pw.print("compat mode enabled: ");
+ synchronized (mLock) {
+ if (mCompatibilityBridge != null) {
+ final String pfx2 = pfx + " ";
+ pw.println("true");
+ pw.print(pfx2); pw.print("windowId: ");
+ pw.println(mCompatibilityBridge.mFocusedWindowId);
+ pw.print(pfx2); pw.print("nodeId: ");
+ pw.println(mCompatibilityBridge.mFocusedNodeId);
+ pw.print(pfx2); pw.print("virtualId: ");
+ pw.println(AccessibilityNodeInfo
+ .getVirtualDescendantId(mCompatibilityBridge.mFocusedNodeId));
+ pw.print(pfx2); pw.print("focusedBounds: ");
+ pw.println(mCompatibilityBridge.mFocusedBounds);
+ } else {
+ pw.println("false");
+ }
+ }
pw.print(pfx); pw.print("debug: "); pw.print(sDebug);
pw.print(" verbose: "); pw.println(sVerbose);
}
@@ -2292,7 +2319,15 @@ public final class AutofillManager {
@Override
public AccessibilityEvent onAccessibilityEvent(AccessibilityEvent event,
boolean accessibilityEnabled, int relevantEventTypes) {
- switch (event.getEventType()) {
+ final int type = event.getEventType();
+ if (sVerbose) {
+ // NOTE: this is waaay spammy, but that's life.
+ Log.v(TAG, "onAccessibilityEvent(" + AccessibilityEvent.eventTypeToString(type)
+ + "): virtualId="
+ + AccessibilityNodeInfo.getVirtualDescendantId(event.getSourceNodeId())
+ + ", client=" + getClient());
+ }
+ switch (type) {
case AccessibilityEvent.TYPE_VIEW_FOCUSED: {
synchronized (mLock) {
if (mFocusedWindowId == event.getWindowId()
diff --git a/core/java/android/webkit/WebBackForwardList.java b/core/java/android/webkit/WebBackForwardList.java
index 0c34e3c16ac6..4d3bbe475920 100644
--- a/core/java/android/webkit/WebBackForwardList.java
+++ b/core/java/android/webkit/WebBackForwardList.java
@@ -57,7 +57,8 @@ public abstract class WebBackForwardList implements Cloneable, Serializable {
/**
* Clone the entire object to be used in the UI thread by clients of
* WebView. This creates a copy that should never be modified by any of the
- * webkit package classes.
+ * webkit package classes. On Android 4.4 and later there is no need to use
+ * this, as the object is already a read-only copy of the internal state.
*/
protected abstract WebBackForwardList clone();
}
diff --git a/core/java/android/webkit/WebHistoryItem.java b/core/java/android/webkit/WebHistoryItem.java
index 74db039e015d..b9e704285f84 100644
--- a/core/java/android/webkit/WebHistoryItem.java
+++ b/core/java/android/webkit/WebHistoryItem.java
@@ -23,7 +23,7 @@ import android.graphics.Bitmap;
/**
* A convenience class for accessing fields in an entry in the back/forward list
* of a WebView. Each WebHistoryItem is a snapshot of the requested history
- * item. Each history item may be updated during the load of a page.
+ * item.
* @see WebBackForwardList
*/
public abstract class WebHistoryItem implements Cloneable {
@@ -44,8 +44,6 @@ public abstract class WebHistoryItem implements Cloneable {
* history item. See getTargetUrl() for the url that is the actual target of
* this history item.
* @return The base url of this history item.
- * Note: The VM ensures 32-bit atomic read/write operations so we don't have
- * to synchronize this method.
*/
public abstract String getUrl();
@@ -60,22 +58,20 @@ public abstract class WebHistoryItem implements Cloneable {
/**
* Return the document title of this history item.
* @return The document title of this history item.
- * Note: The VM ensures 32-bit atomic read/write operations so we don't have
- * to synchronize this method.
*/
public abstract String getTitle();
/**
* Return the favicon of this history item or {@code null} if no favicon was found.
* @return A Bitmap containing the favicon for this history item or {@code null}.
- * Note: The VM ensures 32-bit atomic read/write operations so we don't have
- * to synchronize this method.
*/
@Nullable
public abstract Bitmap getFavicon();
/**
- * Clone the history item for use by clients of WebView.
+ * Clone the history item for use by clients of WebView. On Android 4.4 and later
+ * there is no need to use this, as the object is already a read-only copy of the
+ * internal state.
*/
protected abstract WebHistoryItem clone();
}
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 66e079e26f1f..c30edd30361f 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -991,7 +991,9 @@ public abstract class WebSettings {
* {@link PluginState#OFF}.
*
* @param state a PluginState value
- * @deprecated Plugins will not be supported in future, and should not be used.
+ * @deprecated Plugins are not supported in API level
+ * {@link android.os.Build.VERSION_CODES#KITKAT} or later;
+ * enabling plugins is a no-op.
*/
@Deprecated
public abstract void setPluginState(PluginState state);
@@ -1187,7 +1189,9 @@ public abstract class WebSettings {
*
* @return the plugin state as a {@link PluginState} value
* @see #setPluginState
- * @deprecated Plugins will not be supported in future, and should not be used.
+ * @deprecated Plugins are not supported in API level
+ * {@link android.os.Build.VERSION_CODES#KITKAT} or later;
+ * enabling plugins is a no-op.
*/
@Deprecated
public abstract PluginState getPluginState();
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 5c5e9de77916..8f03b693e587 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -42,7 +42,6 @@ import android.os.Message;
import android.os.RemoteException;
import android.os.StrictMode;
import android.print.PrintDocumentAdapter;
-import android.security.KeyChain;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
@@ -1432,9 +1431,8 @@ public class WebView extends AbsoluteLayout
/**
* Clears the client certificate preferences stored in response
* to proceeding/cancelling client cert requests. Note that WebView
- * automatically clears these preferences when it receives a
- * {@link KeyChain#ACTION_STORAGE_CHANGED} intent. The preferences are
- * shared by all the WebViews that are created by the embedder application.
+ * automatically clears these preferences when the system keychain is updated.
+ * The preferences are shared by all the WebViews that are created by the embedder application.
*
* @param onCleared A runnable to be invoked when client certs are cleared.
* The runnable will be called in UI thread.
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index f686b6645655..bdd7a0900213 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -31,18 +31,25 @@ import java.lang.annotation.RetentionPolicy;
public class WebViewClient {
/**
- * Give the host application a chance to take over the control when a new
- * url is about to be loaded in the current WebView. If WebViewClient is not
- * provided, by default WebView will ask Activity Manager to choose the
- * proper handler for the url. If WebViewClient is provided, return {@code true}
- * means the host application handles the url, while return {@code false} means the
- * current WebView handles the url.
- * This method is not called for requests using the POST "method".
+ * Give the host application a chance to take control when a URL is about to be loaded in the
+ * current WebView. If a WebViewClient is not provided, by default WebView will ask Activity
+ * Manager to choose the proper handler for the URL. If a WebViewClient is provided, returning
+ * {@code true} causes the current WebView to abort loading the URL, while returning
+ * {@code false} causes the WebView to continue loading the URL as usual.
+ *
+ * <p class="note"><b>Note:</b> Do not call {@link WebView#loadUrl(String)} with the same
+ * URL and then return {@code true}. This unnecessarily cancels the current load and starts a
+ * new load with the same URL. The correct way to continue loading a given URL is to simply
+ * return {@code false}, without calling {@link WebView#loadUrl(String)}.
+ *
+ * <p class="note"><b>Note:</b> This method is not called for POST requests.
+ *
+ * <p class="note"><b>Note:</b> This method may be called for subframes and with non-HTTP(S)
+ * schemes; calling {@link WebView#loadUrl(String)} with such a URL will fail.
*
* @param view The WebView that is initiating the callback.
- * @param url The url to be loaded.
- * @return {@code true} if the host application wants to leave the current WebView
- * and handle the url itself, otherwise return {@code false}.
+ * @param url The URL to be loaded.
+ * @return {@code true} to cancel the current load, otherwise return {@code false}.
* @deprecated Use {@link #shouldOverrideUrlLoading(WebView, WebResourceRequest)
* shouldOverrideUrlLoading(WebView, WebResourceRequest)} instead.
*/
@@ -52,26 +59,25 @@ public class WebViewClient {
}
/**
- * Give the host application a chance to take over the control when a new
- * url is about to be loaded in the current WebView. If WebViewClient is not
- * provided, by default WebView will ask Activity Manager to choose the
- * proper handler for the url. If WebViewClient is provided, return {@code true}
- * means the host application handles the url, while return {@code false} means the
- * current WebView handles the url.
- *
- * <p>Notes:
- * <ul>
- * <li>This method is not called for requests using the POST &quot;method&quot;.</li>
- * <li>This method is also called for subframes with non-http schemes, thus it is
- * strongly disadvised to unconditionally call {@link WebView#loadUrl(String)}
- * with the request's url from inside the method and then return {@code true},
- * as this will make WebView to attempt loading a non-http url, and thus fail.</li>
- * </ul>
+ * Give the host application a chance to take control when a URL is about to be loaded in the
+ * current WebView. If a WebViewClient is not provided, by default WebView will ask Activity
+ * Manager to choose the proper handler for the URL. If a WebViewClient is provided, returning
+ * {@code true} causes the current WebView to abort loading the URL, while returning
+ * {@code false} causes the WebView to continue loading the URL as usual.
+ *
+ * <p class="note"><b>Note:</b> Do not call {@link WebView#loadUrl(String)} with the request's
+ * URL and then return {@code true}. This unnecessarily cancels the current load and starts a
+ * new load with the same URL. The correct way to continue loading a given URL is to simply
+ * return {@code false}, without calling {@link WebView#loadUrl(String)}.
+ *
+ * <p class="note"><b>Note:</b> This method is not called for POST requests.
+ *
+ * <p class="note"><b>Note:</b> This method may be called for subframes and with non-HTTP(S)
+ * schemes; calling {@link WebView#loadUrl(String)} with such a URL will fail.
*
* @param view The WebView that is initiating the callback.
* @param request Object containing the details of the request.
- * @return {@code true} if the host application wants to leave the current WebView
- * and handle the url itself, otherwise return {@code false}.
+ * @return {@code true} to cancel the current load, otherwise return {@code false}.
*/
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
return shouldOverrideUrlLoading(view, request.getUrl().toString());
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 3956215b6f83..66ce0eeafc96 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -812,7 +812,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
* @param firstVisibleItem the index of the first visible cell (ignore if
* visibleItemCount == 0)
* @param visibleItemCount the number of visible cells
- * @param totalItemCount the number of items in the list adaptor
+ * @param totalItemCount the number of items in the list adapter
*/
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
int totalItemCount);
diff --git a/core/java/com/android/internal/app/AssistUtils.java b/core/java/com/android/internal/app/AssistUtils.java
index 9171959537c8..fed0a89a4d75 100644
--- a/core/java/com/android/internal/app/AssistUtils.java
+++ b/core/java/com/android/internal/app/AssistUtils.java
@@ -32,6 +32,8 @@ import android.os.ServiceManager;
import android.provider.Settings;
import android.util.Log;
+import com.android.internal.R;
+
/**
* Utility method for dealing with the assistant aspects of
* {@link com.android.internal.app.IVoiceInteractionManagerService IVoiceInteractionManagerService}.
@@ -40,6 +42,14 @@ public class AssistUtils {
private static final String TAG = "AssistUtils";
+ /**
+ * Sentinel value for "no default assistant specified."
+ *
+ * Empty string is already used to represent an explicit setting of No Assistant. null cannot
+ * be used because we can't represent a null value in XML.
+ */
+ private static final String UNSET = "#+UNSET";
+
private final Context mContext;
private final IVoiceInteractionManagerService mVoiceInteractionManagerService;
@@ -152,10 +162,21 @@ public class AssistUtils {
return ComponentName.unflattenFromString(setting);
}
+ final String defaultSetting = mContext.getResources().getString(
+ R.string.config_defaultAssistantComponentName);
+ if (defaultSetting != null && !defaultSetting.equals(UNSET)) {
+ return ComponentName.unflattenFromString(defaultSetting);
+ }
+
// Fallback to keep backward compatible behavior when there is no user setting.
if (activeServiceSupportsAssistGesture()) {
return getActiveServiceComponentName();
}
+
+ if (UNSET.equals(defaultSetting)) {
+ return null;
+ }
+
final SearchManager searchManager =
(SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE);
if (searchManager == null) {
diff --git a/core/java/com/android/internal/app/IntentForwarderActivity.java b/core/java/com/android/internal/app/IntentForwarderActivity.java
index 398d08791b5c..4728124c17c5 100644
--- a/core/java/com/android/internal/app/IntentForwarderActivity.java
+++ b/core/java/com/android/internal/app/IntentForwarderActivity.java
@@ -16,14 +16,21 @@
package com.android.internal.app;
+import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
+
+import android.annotation.Nullable;
+import android.annotation.StringRes;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityThread;
import android.app.AppGlobals;
import android.app.admin.DevicePolicyManager;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.os.Bundle;
import android.os.RemoteException;
@@ -31,12 +38,11 @@ import android.os.UserHandle;
import android.os.UserManager;
import android.util.Slog;
import android.widget.Toast;
-
import com.android.internal.annotations.VisibleForTesting;
-
+import java.util.Arrays;
+import java.util.HashSet;
import java.util.List;
-
-import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
+import java.util.Set;
/**
* This is used in conjunction with
@@ -44,7 +50,6 @@ import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
* be passed in and out of a managed profile.
*/
public class IntentForwarderActivity extends Activity {
-
public static String TAG = "IntentForwarderActivity";
public static String FORWARD_INTENT_TO_PARENT
@@ -53,6 +58,9 @@ public class IntentForwarderActivity extends Activity {
public static String FORWARD_INTENT_TO_MANAGED_PROFILE
= "com.android.internal.app.ForwardIntentToManagedProfile";
+ private static final Set<String> ALLOWED_TEXT_MESSAGE_SCHEME
+ = new HashSet<>(Arrays.asList("sms", "smsto", "mms", "mmsto"));
+
private Injector mInjector;
@Override
@@ -93,19 +101,8 @@ public class IntentForwarderActivity extends Activity {
newIntent.prepareToLeaveUser(callingUserId);
}
- final android.content.pm.ResolveInfo ri =
- mInjector.getPackageManager().resolveActivityAsUser(
- newIntent,
- MATCH_DEFAULT_ONLY,
- targetUserId);
-
- // Don't show the disclosure if next activity is ResolverActivity or ChooserActivity
- // as those will already have shown work / personal as neccesary etc.
- final boolean shouldShowDisclosure = ri == null || ri.activityInfo == null ||
- !"android".equals(ri.activityInfo.packageName) ||
- !(ResolverActivity.class.getName().equals(ri.activityInfo.name)
- || ChooserActivity.class.getName().equals(ri.activityInfo.name));
-
+ final ResolveInfo ri = mInjector.resolveActivityAsUser(newIntent, MATCH_DEFAULT_ONLY,
+ targetUserId);
try {
startActivityAsCaller(newIntent, null, false, targetUserId);
} catch (RuntimeException e) {
@@ -124,8 +121,8 @@ public class IntentForwarderActivity extends Activity {
+ ActivityThread.currentProcessName(), e);
}
- if (shouldShowDisclosure) {
- Toast.makeText(this, getString(userMessageId), Toast.LENGTH_LONG).show();
+ if (shouldShowDisclosure(ri, intentReceived)) {
+ mInjector.showToast(userMessageId, Toast.LENGTH_LONG);
}
} else {
Slog.wtf(TAG, "the intent: " + intentReceived + " cannot be forwarded from user "
@@ -134,6 +131,35 @@ public class IntentForwarderActivity extends Activity {
finish();
}
+ private boolean shouldShowDisclosure(@Nullable ResolveInfo ri, Intent intent) {
+ if (ri == null || ri.activityInfo == null) {
+ return true;
+ }
+ if (ri.activityInfo.applicationInfo.isSystemApp()
+ && (isDialerIntent(intent) || isTextMessageIntent(intent))) {
+ return false;
+ }
+ return !isTargetResolverOrChooserActivity(ri.activityInfo);
+ }
+
+ private boolean isTextMessageIntent(Intent intent) {
+ return Intent.ACTION_SENDTO.equals(intent.getAction()) && intent.getData() != null
+ && ALLOWED_TEXT_MESSAGE_SCHEME.contains(intent.getData().getScheme());
+ }
+
+ private boolean isDialerIntent(Intent intent) {
+ return Intent.ACTION_DIAL.equals(intent.getAction())
+ || Intent.ACTION_CALL.equals(intent.getAction());
+ }
+
+ private boolean isTargetResolverOrChooserActivity(ActivityInfo activityInfo) {
+ if (!"android".equals(activityInfo.packageName)) {
+ return false;
+ }
+ return ResolverActivity.class.getName().equals(activityInfo.name)
+ || ChooserActivity.class.getName().equals(activityInfo.name);
+ }
+
/**
* Check whether the intent can be forwarded to target user. Return the intent used for
* forwarding if it can be forwarded, {@code null} otherwise.
@@ -241,6 +267,16 @@ public class IntentForwarderActivity extends Activity {
public PackageManager getPackageManager() {
return IntentForwarderActivity.this.getPackageManager();
}
+
+ @Override
+ public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
+ return getPackageManager().resolveActivityAsUser(intent, flags, userId);
+ }
+
+ @Override
+ public void showToast(int messageId, int duration) {
+ Toast.makeText(IntentForwarderActivity.this, getString(messageId), duration).show();
+ }
}
public interface Injector {
@@ -249,5 +285,9 @@ public class IntentForwarderActivity extends Activity {
UserManager getUserManager();
PackageManager getPackageManager();
+
+ ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId);
+
+ void showToast(@StringRes int messageId, int duration);
}
}
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 486c836279ce..8b06c47c60d1 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -4031,7 +4031,9 @@ public class BatteryStatsImpl extends BatteryStats {
try {
IBatteryPropertiesRegistrar registrar = IBatteryPropertiesRegistrar.Stub.asInterface(
ServiceManager.getService("batteryproperties"));
- registrar.scheduleUpdate();
+ if (registrar != null) {
+ registrar.scheduleUpdate();
+ }
} catch (RemoteException e) {
// Ignore.
}
diff --git a/core/java/com/android/internal/widget/MessagingLinearLayout.java b/core/java/com/android/internal/widget/MessagingLinearLayout.java
index 64b1f241464b..0c8613b460f6 100644
--- a/core/java/com/android/internal/widget/MessagingLinearLayout.java
+++ b/core/java/com/android/internal/widget/MessagingLinearLayout.java
@@ -111,14 +111,16 @@ public class MessagingLinearLayout extends ViewGroup {
final int childHeight = child.getMeasuredHeight();
int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin +
lp.bottomMargin + spacing);
- first = false;
int measureType = MessagingChild.MEASURED_NORMAL;
if (messagingChild != null) {
measureType = messagingChild.getMeasuredType();
linesRemaining -= messagingChild.getConsumedLines();
}
- boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED;
- boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL;
+
+ // We never measure the first item as too small, we want to at least show something.
+ boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL && !first;
+ boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED
+ || measureType == MessagingChild.MEASURED_TOO_SMALL && first;
if (newHeight <= targetHeight && !isTooSmall) {
totalHeight = newHeight;
measuredWidth = Math.max(measuredWidth,
@@ -131,6 +133,7 @@ public class MessagingLinearLayout extends ViewGroup {
} else {
break;
}
+ first = false;
}
setMeasuredDimension(
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index 45069ca1d3e2..a07c96ceba2e 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -25,6 +25,7 @@ import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Environment;
import android.os.Process;
+import android.os.SystemProperties;
import android.os.storage.StorageManager;
import android.text.TextUtils;
import android.util.ArrayMap;
@@ -67,6 +68,9 @@ public class SystemConfig {
private static final int ALLOW_HIDDENAPI_WHITELISTING = 0x40;
private static final int ALLOW_ALL = ~0;
+ // property for runtime configuration differentiation
+ private static final String SKU_PROPERTY = "ro.boot.product.hardware.sku";
+
// Group-ids that are given to all packages as read from etc/permissions/*.xml.
int[] mGlobalGids;
@@ -312,6 +316,17 @@ public class SystemConfig {
readPermissions(Environment.buildPath(
Environment.getOdmDirectory(), "etc", "permissions"), odmPermissionFlag);
+ String skuProperty = SystemProperties.get(SKU_PROPERTY, "");
+ if (!skuProperty.isEmpty()) {
+ String skuDir = "sku_" + skuProperty;
+
+ readPermissions(Environment.buildPath(
+ Environment.getOdmDirectory(), "etc", "sysconfig", skuDir), odmPermissionFlag);
+ readPermissions(Environment.buildPath(
+ Environment.getOdmDirectory(), "etc", "permissions", skuDir),
+ odmPermissionFlag);
+ }
+
// Allow OEM to customize features and OEM permissions
int oemPermissionFlag = ALLOW_FEATURES | ALLOW_OEM_PERMISSIONS;
readPermissions(Environment.buildPath(
@@ -342,6 +357,10 @@ public class SystemConfig {
// Iterate over the files in the directory and scan .xml files
File platformFile = null;
for (File f : libraryDir.listFiles()) {
+ if (!f.isFile()) {
+ continue;
+ }
+
// We'll read platform.xml last
if (f.getPath().endsWith("etc/permissions/platform.xml")) {
platformFile = f;
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index ec24980a2e6e..b5860d8a5bc3 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -41,6 +41,7 @@ cc_library_shared {
"com_google_android_gles_jni_EGLImpl.cpp",
"com_google_android_gles_jni_GLImpl.cpp", // TODO: .arm
"android_app_Activity.cpp",
+ "android_app_ActivityThread.cpp",
"android_app_NativeActivity.cpp",
"android_app_admin_SecurityLog.cpp",
"android_opengl_EGL14.cpp",
diff --git a/core/jni/android_app_ActivityThread.cpp b/core/jni/android_app_ActivityThread.cpp
new file mode 100644
index 000000000000..d56e4c51124d
--- /dev/null
+++ b/core/jni/android_app_ActivityThread.cpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+#include "jni.h"
+#include "GraphicsJNI.h"
+#include <nativehelper/JNIHelp.h>
+
+#include <minikin/Layout.h>
+#include <renderthread/RenderProxy.h>
+
+#include "core_jni_helpers.h"
+#include <unistd.h>
+
+namespace android {
+
+static void android_app_ActivityThread_purgePendingResources(JNIEnv* env, jobject clazz) {
+ // Don't care about return values.
+ mallopt(M_PURGE, 0);
+}
+
+static void
+android_app_ActivityThread_dumpGraphics(JNIEnv* env, jobject clazz, jobject javaFileDescriptor) {
+ int fd = jniGetFDFromFileDescriptor(env, javaFileDescriptor);
+ android::uirenderer::renderthread::RenderProxy::dumpGraphicsMemory(fd);
+ minikin::Layout::dumpMinikinStats(fd);
+}
+
+
+static JNINativeMethod gActivityThreadMethods[] = {
+ // ------------ Regular JNI ------------------
+ { "nPurgePendingResources", "()V",
+ (void*) android_app_ActivityThread_purgePendingResources },
+ { "nDumpGraphicsInfo", "(Ljava/io/FileDescriptor;)V",
+ (void*) android_app_ActivityThread_dumpGraphics }
+};
+
+int register_android_app_ActivityThread(JNIEnv* env) {
+ return RegisterMethodsOrDie(env, "android/app/ActivityThread",
+ gActivityThreadMethods, NELEM(gActivityThreadMethods));
+}
+
+};
diff --git a/core/jni/android_view_DisplayListCanvas.cpp b/core/jni/android_view_DisplayListCanvas.cpp
index 7956bf4ee222..5197e7d481eb 100644
--- a/core/jni/android_view_DisplayListCanvas.cpp
+++ b/core/jni/android_view_DisplayListCanvas.cpp
@@ -88,17 +88,6 @@ private:
sp<InvokeRunnableMessage> mMessage;
};
-
-// ---------------- Regular JNI -----------------------------
-
-static void
-android_app_ActivityThread_dumpGraphics(JNIEnv* env, jobject clazz, jobject javaFileDescriptor) {
- int fd = jniGetFDFromFileDescriptor(env, javaFileDescriptor);
- android::uirenderer::renderthread::RenderProxy::dumpGraphicsMemory(fd);
- minikin::Layout::dumpMinikinStats(fd);
-}
-
-
// ---------------- @FastNative -----------------------------
static void android_view_DisplayListCanvas_callDrawGLFunction(JNIEnv* env, jobject clazz,
@@ -215,12 +204,6 @@ static JNINativeMethod gMethods[] = {
{ "nDrawRoundRect", "(JJJJJJJJ)V",(void*) android_view_DisplayListCanvas_drawRoundRectProps },
};
-static JNINativeMethod gActivityThreadMethods[] = {
- // ------------ Regular JNI ------------------
- { "nDumpGraphicsInfo", "(Ljava/io/FileDescriptor;)V",
- (void*) android_app_ActivityThread_dumpGraphics }
-};
-
int register_android_view_DisplayListCanvas(JNIEnv* env) {
jclass runnableClass = FindClassOrDie(env, "java/lang/Runnable");
gRunnableMethodId = GetMethodIDOrDie(env, runnableClass, "run", "()V");
@@ -228,9 +211,4 @@ int register_android_view_DisplayListCanvas(JNIEnv* env) {
return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
-int register_android_app_ActivityThread(JNIEnv* env) {
- return RegisterMethodsOrDie(env, "android/app/ActivityThread",
- gActivityThreadMethods, NELEM(gActivityThreadMethods));
-}
-
};
diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
index b708735616c4..24bafca9c386 100644
--- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
+++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
@@ -35,7 +35,6 @@
#include "bpf/BpfUtils.h"
#include "netdbpf/BpfNetworkStats.h"
-using android::bpf::hasBpfSupport;
using android::bpf::parseBpfNetworkStatsDetail;
using android::bpf::stats_line;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 9ce6044bcf3e..5154de043e19 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1230,7 +1230,7 @@
<!-- ================================== -->
<eat-comment />
- <!-- @SystemApi Allows an application (Phone) to send a request to other applications
+ <!-- Allows an application (Phone) to send a request to other applications
to handle the respond-via-message action during incoming calls.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SEND_RESPOND_VIA_MESSAGE"
@@ -1314,7 +1314,7 @@
android:description="@string/permdesc_accessLocationExtraCommands"
android:protectionLevel="normal" />
- <!-- @SystemApi Allows an application to install a location provider into the Location Manager.
+ <!-- Allows an application to install a location provider into the Location Manager.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"
android:protectionLevel="signature|privileged" />
@@ -1325,7 +1325,7 @@
<permission android:name="android.permission.HDMI_CEC"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to use location features in hardware,
+ <!-- Allows an application to use location features in hardware,
such as the geofencing api.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.LOCATION_HARDWARE"
@@ -1512,7 +1512,7 @@
android:label="@string/permlab_bluetoothAdmin"
android:protectionLevel="normal" />
- <!-- @SystemApi Allows applications to pair bluetooth devices without user interaction, and to
+ <!-- Allows applications to pair bluetooth devices without user interaction, and to
allow or disallow phonebook access or message access.
This is not available to third party applications. -->
<permission android:name="android.permission.BLUETOOTH_PRIVILEGED"
@@ -1602,7 +1602,7 @@
android:label="@string/permlab_getAccounts" />
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
- <!-- @SystemApi Allows applications to call into AccountAuthenticators.
+ <!-- Allows applications to call into AccountAuthenticators.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.ACCOUNT_MANAGER"
android:protectionLevel="signature" />
@@ -1775,7 +1775,7 @@
<!-- =========================================== -->
<eat-comment />
- <!-- @SystemApi Allows modification of the telephony state - power on, mmi, etc.
+ <!-- Allows modification of the telephony state - power on, mmi, etc.
Does not include placing calls.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.MODIFY_PHONE_STATE"
@@ -2206,7 +2206,7 @@
<!-- ============================================ -->
<eat-comment />
- <!-- @SystemApi Allows applications to set the system time.
+ <!-- Allows applications to set the system time.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_TIME"
android:protectionLevel="signature|privileged" />
@@ -2296,7 +2296,7 @@
<permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows an application to modify the current configuration, such
+ <!-- Allows an application to modify the current configuration, such
as locale. -->
<permission android:name="android.permission.CHANGE_CONFIGURATION"
android:protectionLevel="signature|privileged|development" />
@@ -2318,7 +2318,7 @@
android:description="@string/permdesc_writeSettings"
android:protectionLevel="signature|preinstalled|appop|pre23" />
- <!-- @SystemApi Allows an application to modify the Google service map.
+ <!-- Allows an application to modify the Google service map.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_GSERVICES"
android:protectionLevel="signature|privileged" />
@@ -2334,7 +2334,7 @@
<permission android:name="android.permission.RETRIEVE_WINDOW_CONTENT"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Modify the global animation scaling factor.
+ <!-- Modify the global animation scaling factor.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_ANIMATION_SCALE"
android:protectionLevel="signature|privileged|development" />
@@ -2389,12 +2389,12 @@
android:description="@string/permdesc_broadcastSticky"
android:protectionLevel="normal" />
- <!-- @SystemApi Allows mounting and unmounting file systems for removable storage.
+ <!-- Allows mounting and unmounting file systems for removable storage.
<p>Not for use by third-party applications.-->
<permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows formatting file systems for removable storage.
+ <!-- Allows formatting file systems for removable storage.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.MOUNT_FORMAT_FILESYSTEMS"
android:protectionLevel="signature|privileged" />
@@ -2428,7 +2428,7 @@
<permission android:name="android.permission.ASEC_RENAME"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows applications to write the apn settings and read sensitive fields of
+ <!-- Allows applications to write the apn settings and read sensitive fields of
an existing apn settings like user and password.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_APN_SETTINGS"
@@ -2529,40 +2529,40 @@
<!-- ========================================= -->
<eat-comment />
- <!-- @SystemApi Allows an application to read or write the secure system settings.
+ <!-- Allows an application to read or write the secure system settings.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_SECURE_SETTINGS"
android:protectionLevel="signature|privileged|development" />
- <!-- @SystemApi Allows an application to retrieve state dump information from system services.
+ <!-- Allows an application to retrieve state dump information from system services.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.DUMP"
android:protectionLevel="signature|privileged|development" />
- <!-- @SystemApi Allows an application to read the low-level system log files.
+ <!-- Allows an application to read the low-level system log files.
<p>Not for use by third-party applications, because
Log entries can contain the user's private information. -->
<permission android:name="android.permission.READ_LOGS"
android:protectionLevel="signature|privileged|development" />
- <!-- @SystemApi Configure an application for debugging.
+ <!-- Configure an application for debugging.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_DEBUG_APP"
android:protectionLevel="signature|privileged|development" />
- <!-- @SystemApi Allows an application to set the maximum number of (not needed)
+ <!-- Allows an application to set the maximum number of (not needed)
application processes that can be running.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_PROCESS_LIMIT"
android:protectionLevel="signature|privileged|development" />
- <!-- @SystemApi Allows an application to control whether activities are immediately
+ <!-- Allows an application to control whether activities are immediately
finished when put in the background.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_ALWAYS_FINISH"
android:protectionLevel="signature|privileged|development" />
- <!-- @SystemApi Allow an application to request that a signal be sent to all persistent processes.
+ <!-- Allow an application to request that a signal be sent to all persistent processes.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SIGNAL_PERSISTENT_PROCESSES"
android:protectionLevel="signature|privileged|development" />
@@ -2572,7 +2572,7 @@
<!-- ==================================== -->
<eat-comment />
- <!-- @SystemApi Allows access to the list of accounts in the Accounts Service. -->
+ <!-- Allows access to the list of accounts in the Accounts Service. -->
<permission android:name="android.permission.GET_ACCOUNTS_PRIVILEGED"
android:protectionLevel="signature|privileged" />
@@ -2581,12 +2581,12 @@
<permission android:name="android.permission.GET_PASSWORD"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows applications to RW to diagnostic resources.
+ <!-- Allows applications to RW to diagnostic resources.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.DIAGNOSTIC"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows an application to open, close, or disable the status bar
+ <!-- Allows an application to open, close, or disable the status bar
and its icons.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.STATUS_BAR"
@@ -2611,7 +2611,7 @@
<permission android:name="android.permission.FORCE_BACK"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows an application to update device statistics.
+ <!-- Allows an application to update device statistics.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.UPDATE_DEVICE_STATS"
android:protectionLevel="signature|privileged" />
@@ -3017,7 +3017,7 @@
android:description="@string/permdesc_requestDeletePackages"
android:protectionLevel="normal" />
- <!-- @SystemApi Allows an application to install packages.
+ <!-- Allows an application to install packages.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.INSTALL_PACKAGES"
android:protectionLevel="signature|privileged" />
@@ -3090,7 +3090,7 @@
<permission android:name="android.permission.FORCE_PERSISTABLE_URI_PERMISSIONS"
android:protectionLevel="signature" />
- <!-- @SystemApi Old permission for deleting an app's cache files, no longer used,
+ <!-- Old permission for deleting an app's cache files, no longer used,
but signals for us to quietly ignore calls instead of throwing an exception. -->
<permission android:name="android.permission.DELETE_CACHE_FILES"
android:protectionLevel="signature|privileged" />
@@ -3100,7 +3100,7 @@
<permission android:name="android.permission.INTERNAL_DELETE_CACHE_FILES"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows an application to delete packages.
+ <!-- Allows an application to delete packages.
<p>Not for use by third-party applications.
<p>Starting in {@link android.os.Build.VERSION_CODES#N}, user confirmation is requested
when the application deleting the package is not the same application that installed the
@@ -3113,7 +3113,7 @@
<permission android:name="android.permission.MOVE_PACKAGE"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to change whether an application component (other than its own) is
+ <!-- Allows an application to change whether an application component (other than its own) is
enabled or not.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"
@@ -3146,7 +3146,7 @@
<permission android:name="android.permission.ACCESS_SURFACE_FLINGER"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows an application to take screen shots and more generally
+ <!-- Allows an application to take screen shots and more generally
get access to the frame buffer data.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.READ_FRAME_BUFFER"
@@ -3222,7 +3222,7 @@
android:protectionLevel="signature|privileged" />
<uses-permission android:name="android.permission.CONTROL_VPN" />
- <!-- @SystemApi Allows an application to capture audio output.
+ <!-- Allows an application to capture audio output.
<p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT"
android:protectionLevel="signature|privileged" />
@@ -3239,17 +3239,17 @@
<permission android:name="android.permission.MODIFY_AUDIO_ROUTING"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to capture video output.
+ <!-- Allows an application to capture video output.
<p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to capture secure video output.
+ <!-- Allows an application to capture secure video output.
<p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to know what content is playing and control its playback.
+ <!-- Allows an application to know what content is playing and control its playback.
<p>Not for use by third-party applications due to privacy of media consumption</p> -->
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL"
android:protectionLevel="signature|privileged" />
@@ -3276,7 +3276,7 @@
<permission android:name="android.permission.BRICK"
android:protectionLevel="signature" />
- <!-- @SystemApi Required to be able to reboot the device.
+ <!-- Required to be able to reboot the device.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.REBOOT"
android:protectionLevel="signature|privileged" />
@@ -3331,11 +3331,11 @@
<permission android:name="android.permission.BROADCAST_NETWORK_PRIVILEGED"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Not for use by third-party applications. -->
+ <!-- Not for use by third-party applications. -->
<permission android:name="android.permission.MASTER_CLEAR"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to call any phone number, including emergency
+ <!-- Allows an application to call any phone number, including emergency
numbers, without going through the Dialer user interface for the user
to confirm the call being placed.
<p>Not for use by third-party applications. -->
@@ -3350,19 +3350,19 @@
<permission android:name="android.permission.PERFORM_SIM_ACTIVATION"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows enabling/disabling location update notifications from
+ <!-- Allows enabling/disabling location update notifications from
the radio.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.CONTROL_LOCATION_UPDATES"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows read/write access to the "properties" table in the checkin
+ <!-- Allows read/write access to the "properties" table in the checkin
database, to change values that get uploaded.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to collect component usage
+ <!-- Allows an application to collect component usage
statistics
<p>Declaring the permission implies intention to use the API and the user of the
device can grant permission through the Settings application. -->
@@ -3395,7 +3395,7 @@
android:description="@string/permdesc_requestIgnoreBatteryOptimizations"
android:protectionLevel="normal" />
- <!-- @SystemApi Allows an application to collect battery statistics -->
+ <!-- Allows an application to collect battery statistics -->
<permission android:name="android.permission.BATTERY_STATS"
android:protectionLevel="signature|privileged|development" />
@@ -3424,12 +3424,12 @@
<permission android:name="android.permission.CONFIRM_FULL_BACKUP"
android:protectionLevel="signature" />
- <!-- @SystemApi Must be required by a {@link android.widget.RemoteViewsService},
+ <!-- Must be required by a {@link android.widget.RemoteViewsService},
to ensure that only the system can bind to it. -->
<permission android:name="android.permission.BIND_REMOTEVIEWS"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to tell the AppWidget service which application
+ <!-- Allows an application to tell the AppWidget service which application
can access AppWidget's data. The normal user flow is that a user
picks an AppWidget to go into a particular host, thereby giving that
host application access to the private data from the AppWidget app.
@@ -3460,7 +3460,7 @@
<permission android:name="android.permission.CHANGE_BACKGROUND_DATA_SETTING"
android:protectionLevel="signature" />
- <!-- @SystemApi This permission can be used on content providers to allow the global
+ <!-- This permission can be used on content providers to allow the global
search system to access their data. Typically it used when the
provider has some permissions protecting it (which global search
would not be expected to hold), and added as a read-only permission
diff --git a/core/res/res/values-mcc214-mnc01/config.xml b/core/res/res/values-mcc214-mnc01/config.xml
index 876c26e7f629..b34696b14d94 100644
--- a/core/res/res/values-mcc214-mnc01/config.xml
+++ b/core/res/res/values-mcc214-mnc01/config.xml
@@ -30,4 +30,8 @@
<item>7</item>
<item>9</item>
</integer-array>
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
</resources>
diff --git a/core/res/res/values-mcc234-mnc15/config.xml b/core/res/res/values-mcc234-mnc15/config.xml
new file mode 100644
index 000000000000..84e779d240d1
--- /dev/null
+++ b/core/res/res/values-mcc234-mnc15/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
+</resources>
diff --git a/core/res/res/values-mcc234-mnc91/config.xml b/core/res/res/values-mcc234-mnc91/config.xml
new file mode 100644
index 000000000000..84e779d240d1
--- /dev/null
+++ b/core/res/res/values-mcc234-mnc91/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
+</resources>
diff --git a/core/res/res/values-mcc302-mnc220/config.xml b/core/res/res/values-mcc302-mnc220/config.xml
index 7289b4f8135a..36efd0a28b91 100644
--- a/core/res/res/values-mcc302-mnc220/config.xml
+++ b/core/res/res/values-mcc302-mnc220/config.xml
@@ -29,7 +29,7 @@
<item>SUPL_PORT=7275</item>
<item>SUPL_VER=0x20000</item>
<item>SUPL_MODE=1</item>
- <item>SUPL_ES=0</item>
+ <item>SUPL_ES=1</item>
<item>LPP_PROFILE=3</item>
<item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
<item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
diff --git a/core/res/res/values-mcc302-mnc221/config.xml b/core/res/res/values-mcc302-mnc221/config.xml
index ff140756e96a..a11dd95174a2 100644
--- a/core/res/res/values-mcc302-mnc221/config.xml
+++ b/core/res/res/values-mcc302-mnc221/config.xml
@@ -26,7 +26,7 @@
<item>SUPL_PORT=7275</item>
<item>SUPL_VER=0x20000</item>
<item>SUPL_MODE=1</item>
- <item>SUPL_ES=0</item>
+ <item>SUPL_ES=1</item>
<item>LPP_PROFILE=3</item>
<item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
<item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
diff --git a/core/res/res/values-mcc302-mnc370/config.xml b/core/res/res/values-mcc302-mnc370/config.xml
index ad3a654a0390..8d29ec15bf6b 100644
--- a/core/res/res/values-mcc302-mnc370/config.xml
+++ b/core/res/res/values-mcc302-mnc370/config.xml
@@ -30,7 +30,7 @@
<item>SUPL_PORT=7275</item>
<item>SUPL_VER=0x20000</item>
<item>SUPL_MODE=1</item>
- <item>SUPL_ES=0</item>
+ <item>SUPL_ES=1</item>
<item>LPP_PROFILE=2</item>
<item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
<item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
diff --git a/core/res/res/values-mcc302-mnc610/config.xml b/core/res/res/values-mcc302-mnc610/config.xml
index 232f14969ad1..650aa62b4a4e 100644
--- a/core/res/res/values-mcc302-mnc610/config.xml
+++ b/core/res/res/values-mcc302-mnc610/config.xml
@@ -28,7 +28,7 @@
<item>SUPL_PORT=7275</item>
<item>SUPL_VER=0x20000</item>
<item>SUPL_MODE=1</item>
- <item>SUPL_ES=0</item>
+ <item>SUPL_ES=1</item>
<item>LPP_PROFILE=2</item>
<item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
<item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
diff --git a/core/res/res/values-mcc302-mnc640/config.xml b/core/res/res/values-mcc302-mnc640/config.xml
index 1d2e625952f8..4bb68dcf04be 100644
--- a/core/res/res/values-mcc302-mnc640/config.xml
+++ b/core/res/res/values-mcc302-mnc640/config.xml
@@ -24,7 +24,7 @@
<item>SUPL_PORT=7275</item>
<item>SUPL_VER=0x20000</item>
<item>SUPL_MODE=1</item>
- <item>SUPL_ES=0</item>
+ <item>SUPL_ES=1</item>
<item>LPP_PROFILE=2</item>
<item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
<item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
diff --git a/core/res/res/values-mcc302-mnc720/config.xml b/core/res/res/values-mcc302-mnc720/config.xml
index cfcf1f849ec5..735a8c80e4e8 100644
--- a/core/res/res/values-mcc302-mnc720/config.xml
+++ b/core/res/res/values-mcc302-mnc720/config.xml
@@ -30,7 +30,7 @@
<item>SUPL_PORT=7275</item>
<item>SUPL_VER=0x20000</item>
<item>SUPL_MODE=1</item>
- <item>SUPL_ES=0</item>
+ <item>SUPL_ES=1</item>
<item>LPP_PROFILE=2</item>
<item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
<item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 98cb640e7196..31e799dc31db 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -659,6 +659,10 @@
<!-- Boolean indicating whether framework needs to set the tx power limit for meeting SAR requirements -->
<bool translatable="false" name="config_wifi_framework_enable_sar_tx_power_limit">false</bool>
+ <!-- Boolean indicating whether framework should use detection of softAP mode to set the tx
+ power limit for meeting SAR requirements -->
+ <bool translatable="false" name="config_wifi_framework_enable_soft_ap_sar_tx_power_limit">false</bool>
+
<!-- Boolean indicating whether framework needs to use body proximity to set the tx power limit
for meeting SAR requirements -->
<bool translatable="false" name="config_wifi_framework_enable_body_proximity_sar_tx_power_limit">false</bool>
@@ -2346,6 +2350,9 @@
<!-- Whether safe headphone volume is enabled or not (country specific). -->
<bool name="config_safe_media_volume_enabled">true</bool>
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">true</bool>
+
<!-- Set to true if the wifi display supports compositing content stored
in gralloc protected buffers. For this to be true, there must exist
a protected hardware path for surface flinger to composite and send
@@ -2768,7 +2775,7 @@
<item>SUPL_PORT=7275</item>
<item>SUPL_VER=0x20000</item>
<item>SUPL_MODE=1</item>
- <item>SUPL_ES=0</item>
+ <item>SUPL_ES=1</item>
<item>LPP_PROFILE=0</item>
<item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
<item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
@@ -2968,6 +2975,10 @@
-->
<bool name="config_fillMainBuiltInDisplayCutout">false</bool>
+ <!-- If true, and there is a cutout on the main built in display, the cutout will be masked
+ by shrinking the display such that it does not overlap the cutout area. -->
+ <bool name="config_maskMainBuiltInDisplayCutout">false</bool>
+
<!-- Ultrasound support for Mic/speaker path -->
<!-- Whether the default microphone audio source supports near-ultrasound frequencies
(range of 18 - 21 kHz). -->
@@ -3492,6 +3503,13 @@
<!-- Whether or not we should show the option to show battery percentage -->
<bool name="config_battery_percentage_setting_available">true</bool>
+ <!-- Model of potentially misprovisioned devices. If none is specified in an overlay, an
+ empty string is passed in. -->
+ <string name="config_misprovisionedDeviceModel" translatable="false"></string>
+
+ <!-- Brand value for attestation of misprovisioned device. -->
+ <string name="config_misprovisionedBrandValue" translatable="false"></string>
+
<!-- Pre-scale volume at volume step 1 for Absolute Volume -->
<fraction name="config_prescaleAbsoluteVolume_index1">50%</fraction>
@@ -3500,4 +3518,8 @@
<!-- Pre-scale volume at volume step 3 for Absolute Volume -->
<fraction name="config_prescaleAbsoluteVolume_index3">85%</fraction>
+
+ <!-- Component name for default assistant on this device -->
+ <string name="config_defaultAssistantComponentName"></string>
+
</resources>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 471170bbe93b..73cb59e84644 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -61,6 +61,15 @@
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
<dimen name="status_bar_edge_ignore">5dp</dimen>
+ <!-- Default radius of the software rounded corners. -->
+ <dimen name="rounded_corner_radius">0dp</dimen>
+ <!-- Radius of the software rounded corners at the top of the display in its natural
+ orientation. If zero, the value of rounded_corner_radius is used. -->
+ <dimen name="rounded_corner_radius_top">0dp</dimen>
+ <!-- Radius of the software rounded corners at the bottom of the display in its natural
+ orientation. If zero, the value of rounded_corner_radius is used. -->
+ <dimen name="rounded_corner_radius_bottom">0dp</dimen>
+
<!-- Width of the window of the divider bar used to resize docked stacks. -->
<dimen name="docked_stack_divider_thickness">48dp</dimen>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 4d5ef68468e3..310aaf4bce8a 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -310,6 +310,7 @@
<java-symbol type="bool" name="config_allowAnimationsInLowPowerMode" />
<java-symbol type="bool" name="config_useDevInputEventForAudioJack" />
<java-symbol type="bool" name="config_safe_media_volume_enabled" />
+ <java-symbol type="bool" name="config_safe_media_disable_on_volume_up" />
<java-symbol type="bool" name="config_camera_sound_forced" />
<java-symbol type="bool" name="config_dontPreferApn" />
<java-symbol type="bool" name="config_restartRadioAfterProvisioning" />
@@ -338,6 +339,7 @@
<java-symbol type="bool" name="config_wifi_framework_use_single_radio_chain_scan_results_network_selection" />
<java-symbol type="bool" name="config_wifi_only_link_same_credential_configurations" />
<java-symbol type="bool" name="config_wifi_framework_enable_sar_tx_power_limit" />
+ <java-symbol type="bool" name="config_wifi_framework_enable_soft_ap_sar_tx_power_limit" />
<java-symbol type="bool" name="config_wifi_framework_enable_body_proximity_sar_tx_power_limit" />
<java-symbol type="string" name="config_wifi_sar_sensor_type" />
<java-symbol type="integer" name="config_wifi_framework_sar_free_space_event_id" />
@@ -3406,11 +3408,18 @@
<java-symbol type="integer" name="config_defaultHapticFeedbackIntensity" />
<java-symbol type="integer" name="config_defaultNotificationVibrationIntensity" />
+ <java-symbol type="bool" name="config_maskMainBuiltInDisplayCutout" />
+
<java-symbol type="array" name="config_disableApksUnlessMatchedSku_apk_list" />
<java-symbol type="array" name="config_disableApkUnlessMatchedSku_skus_list" />
+ <java-symbol type="string" name="config_misprovisionedDeviceModel" />
+ <java-symbol type="string" name="config_misprovisionedBrandValue" />
+
<!-- For Bluetooth AbsoluteVolume -->
<java-symbol type="fraction" name="config_prescaleAbsoluteVolume_index1" />
<java-symbol type="fraction" name="config_prescaleAbsoluteVolume_index2" />
<java-symbol type="fraction" name="config_prescaleAbsoluteVolume_index3" />
+
+ <java-symbol type="string" name="config_defaultAssistantComponentName" />
</resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 483381660655..090f9afb551e 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -306,6 +306,7 @@ please see themes_device_defaults.xml.
<item name="quickContactBadgeStyleSmallWindowLarge">@style/Widget.QuickContactBadgeSmall.WindowLarge</item>
<item name="listPopupWindowStyle">@style/Widget.ListPopupWindow</item>
<item name="popupMenuStyle">@style/Widget.PopupMenu</item>
+ <item name="popupTheme">@null</item>
<item name="activityChooserViewStyle">@style/Widget.ActivityChooserView</item>
<item name="fragmentBreadCrumbsStyle">@style/Widget.FragmentBreadCrumbs</item>
<item name="contextPopupMenuStyle">?attr/popupMenuStyle</item>
diff --git a/core/res/res/values/themes_holo.xml b/core/res/res/values/themes_holo.xml
index cb5b93dd7df4..33832d4eb689 100644
--- a/core/res/res/values/themes_holo.xml
+++ b/core/res/res/values/themes_holo.xml
@@ -296,6 +296,7 @@ please see themes_device_defaults.xml.
<item name="quickContactBadgeStyleSmallWindowLarge">@style/Widget.Holo.QuickContactBadgeSmall.WindowLarge</item>
<item name="listPopupWindowStyle">@style/Widget.Holo.ListPopupWindow</item>
<item name="popupMenuStyle">@style/Widget.Holo.PopupMenu</item>
+ <item name="popupTheme">@null</item>
<item name="stackViewStyle">@style/Widget.Holo.StackView</item>
<item name="activityChooserViewStyle">@style/Widget.Holo.ActivityChooserView</item>
<item name="fragmentBreadCrumbsStyle">@style/Widget.Holo.FragmentBreadCrumbs</item>
@@ -658,9 +659,11 @@ please see themes_device_defaults.xml.
<item name="quickContactBadgeStyleSmallWindowLarge">@style/Widget.Holo.QuickContactBadgeSmall.WindowLarge</item>
<item name="listPopupWindowStyle">@style/Widget.Holo.Light.ListPopupWindow</item>
<item name="popupMenuStyle">@style/Widget.Holo.Light.PopupMenu</item>
+ <item name="popupTheme">@null</item>
<item name="stackViewStyle">@style/Widget.Holo.StackView</item>
<item name="activityChooserViewStyle">@style/Widget.Holo.Light.ActivityChooserView</item>
<item name="fragmentBreadCrumbsStyle">@style/Widget.Holo.Light.FragmentBreadCrumbs</item>
+ <item name="contextPopupMenuStyle">?attr/popupMenuStyle</item>
<!-- Preference styles -->
<item name="preferenceScreenStyle">@style/Preference.Holo.PreferenceScreen</item>
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index f2f28937bb50..7f23edf27094 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -99,6 +99,7 @@ public class SettingsBackupTest {
private static final Set<String> BACKUP_BLACKLISTED_GLOBAL_SETTINGS =
newHashSet(
Settings.Global.ACTIVITY_MANAGER_CONSTANTS,
+ Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED,
Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED,
Settings.Global.ADB_ENABLED,
Settings.Global.ADD_USERS_WHEN_LOCKED,
diff --git a/core/tests/coretests/src/android/view/DisplayCutoutTest.java b/core/tests/coretests/src/android/view/DisplayCutoutTest.java
index 6ee74cb9a742..fe45fe7d3aaf 100644
--- a/core/tests/coretests/src/android/view/DisplayCutoutTest.java
+++ b/core/tests/coretests/src/android/view/DisplayCutoutTest.java
@@ -19,6 +19,7 @@ package android.view;
import static android.view.DisplayCutout.NO_CUTOUT;
import static android.view.DisplayCutout.fromSpec;
+import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.sameInstance;
import static org.junit.Assert.assertEquals;
@@ -220,6 +221,19 @@ public class DisplayCutoutTest {
}
@Test
+ public void fromSpec_setsSafeInsets_top() {
+ DisplayCutout cutout = fromSpec("M -50,0 v 20 h 100 v -20 z", 200, 400, 2f);
+ assertThat(cutout.getSafeInsets(), equalTo(new Rect(0, 20, 0, 0)));
+ }
+
+ @Test
+ public void fromSpec_setsSafeInsets_top_and_bottom() {
+ DisplayCutout cutout = fromSpec("M -50,0 v 20 h 100 v -20 z"
+ + "@bottom M -50,0 v -10,0 h 100 v 20 z", 200, 400, 2f);
+ assertThat(cutout.getSafeInsets(), equalTo(new Rect(0, 20, 0, 10)));
+ }
+
+ @Test
public void parcel_unparcel_nocutout() {
Parcel p = Parcel.obtain();
diff --git a/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java b/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java
index b18fa747557d..c165b6be525e 100644
--- a/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java
@@ -16,46 +16,50 @@
package com.android.internal.app;
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.nullable;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
+import android.net.Uri;
import android.os.Bundle;
+import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
-import android.util.Log;
-
+import java.util.ArrayList;
+import java.util.List;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import java.util.ArrayList;
-import java.util.List;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.ArgumentMatchers.nullable;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
@RunWith(AndroidJUnit4.class)
public class IntentForwarderActivityTest {
+
private static final ComponentName FORWARD_TO_MANAGED_PROFILE_COMPONENT_NAME =
new ComponentName(
"android",
@@ -77,22 +81,26 @@ public class IntentForwarderActivityTest {
private static IntentForwarderActivity.Injector sInjector;
private static ComponentName sComponentName;
+ private static String sActivityName;
+ private static String sPackageName;
@Mock private IPackageManager mIPm;
@Mock private PackageManager mPm;
@Mock private UserManager mUserManager;
+ @Mock private ApplicationInfo mApplicationInfo;
@Rule
public ActivityTestRule<IntentForwarderWrapperActivity> mActivityRule =
new ActivityTestRule<>(IntentForwarderWrapperActivity.class, true, false);
private Context mContext;
+ public static final String PHONE_NUMBER = "123-456-789";
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
mContext = InstrumentationRegistry.getTargetContext();
- sInjector = new TestInjector();
+ sInjector = spy(new TestInjector());
}
@Test
@@ -252,6 +260,149 @@ public class IntentForwarderActivityTest {
assertEquals(MANAGED_PROFILE_INFO.id, activity.mUserIdActivityLaunchedIn);
}
+ @Test
+ public void shouldSkipDisclosure_notWhitelisted() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SEND)
+ .setType(TYPE_PLAIN_TEXT);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_withResolverActivity() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ sActivityName = ResolverActivity.class.getName();
+ sPackageName = "android";
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SEND)
+ .setType(TYPE_PLAIN_TEXT);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_callIntent_call() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_CALL);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_callIntent_dial() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_DIAL);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_callIntent_notCallOrDial() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_ALARM_CHANGED);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_sms() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("sms", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_smsto() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("smsto", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_mms() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("mms", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_mmsto() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("mmsto", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_invalidUri() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("invalid", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector).showToast(anyInt(), anyInt());
+ }
+
+ private void setupShouldSkipDisclosureTest() throws RemoteException {
+ sComponentName = FORWARD_TO_MANAGED_PROFILE_COMPONENT_NAME;
+ sActivityName = "MyTestActivity";
+ sPackageName = "test.package.name";
+ when(mApplicationInfo.isSystemApp()).thenReturn(true);
+ // Managed profile exists.
+ List<UserInfo> profiles = new ArrayList<>();
+ profiles.add(CURRENT_USER_INFO);
+ profiles.add(MANAGED_PROFILE_INFO);
+ when(mUserManager.getProfiles(anyInt())).thenReturn(profiles);
+ // Intent can be forwarded.
+ when(mIPm.canForwardTo(
+ any(Intent.class), nullable(String.class), anyInt(), anyInt())).thenReturn(true);
+ }
public static class IntentForwarderWrapperActivity extends IntentForwarderActivity {
private Intent mStartActivityIntent;
@@ -276,7 +427,7 @@ public class IntentForwarderActivityTest {
}
}
- class TestInjector implements IntentForwarderActivity.Injector {
+ public class TestInjector implements IntentForwarderActivity.Injector {
@Override
public IPackageManager getIPackageManager() {
@@ -292,5 +443,21 @@ public class IntentForwarderActivityTest {
public PackageManager getPackageManager() {
return mPm;
}
+
+ @Override
+ public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
+ ActivityInfo activityInfo = new ActivityInfo();
+ activityInfo.packageName = sPackageName;
+ activityInfo.name = sActivityName;
+ activityInfo.applicationInfo = mApplicationInfo;
+
+ ResolveInfo resolveInfo = new ResolveInfo();
+ resolveInfo.activityInfo = activityInfo;
+
+ return resolveInfo;
+ }
+
+ @Override
+ public void showToast(int messageId, int duration) {}
}
} \ No newline at end of file
diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index 66f4db318e02..36c1c2133c2c 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -1600,9 +1600,9 @@ public class Canvas extends BaseCanvas {
* Draw the specified circle using the specified paint. If radius is <= 0, then nothing will be
* drawn. The circle will be filled or framed based on the Style in the paint.
*
- * @param cx The x-coordinate of the center of the cirle to be drawn
- * @param cy The y-coordinate of the center of the cirle to be drawn
- * @param radius The radius of the cirle to be drawn
+ * @param cx The x-coordinate of the center of the circle to be drawn
+ * @param cy The y-coordinate of the center of the circle to be drawn
+ * @param radius The radius of the circle to be drawn
* @param paint The paint used to draw the circle
*/
public void drawCircle(float cx, float cy, float radius, @NonNull Paint paint) {
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
index 419eb24e1cc1..953cef7d30ff 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
@@ -301,6 +301,9 @@ public abstract class AndroidKeyStoreKeyGeneratorSpi extends KeyGeneratorSpi {
KeyStoreCryptoOperationUtils.getRandomBytesToMixIntoKeystoreRng(
mRng, (mKeySizeBits + 7) / 8);
int flags = 0;
+ if (spec.isStrongBoxBacked()) {
+ flags |= KeyStore.FLAG_STRONGBOX;
+ }
String keyAliasInKeystore = Credentials.USER_PRIVATE_KEY + spec.getKeystoreAlias();
KeyCharacteristics resultingKeyCharacteristics = new KeyCharacteristics();
boolean success = false;
@@ -314,8 +317,12 @@ public abstract class AndroidKeyStoreKeyGeneratorSpi extends KeyGeneratorSpi {
flags,
resultingKeyCharacteristics);
if (errorCode != KeyStore.NO_ERROR) {
- throw new ProviderException(
- "Keystore operation failed", KeyStore.getKeyStoreException(errorCode));
+ if (errorCode == KeyStore.HARDWARE_TYPE_UNAVAILABLE) {
+ throw new StrongBoxUnavailableException("Failed to generate key");
+ } else {
+ throw new ProviderException(
+ "Keystore operation failed", KeyStore.getKeyStoreException(errorCode));
+ }
}
@KeyProperties.KeyAlgorithmEnum String keyAlgorithmJCA;
try {
diff --git a/keystore/java/android/security/keystore/AttestationUtils.java b/keystore/java/android/security/keystore/AttestationUtils.java
index 1be8309bcf5a..f7993eff6b08 100644
--- a/keystore/java/android/security/keystore/AttestationUtils.java
+++ b/keystore/java/android/security/keystore/AttestationUtils.java
@@ -22,9 +22,9 @@ import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.content.Context;
+import android.content.res.Resources;
import android.os.Build;
import android.security.KeyStore;
-import android.security.KeyStoreException;
import android.security.keymaster.KeymasterArguments;
import android.security.keymaster.KeymasterCertificateChain;
import android.security.keymaster.KeymasterDefs;
@@ -117,6 +117,40 @@ public abstract class AttestationUtils {
@NonNull public static KeymasterArguments prepareAttestationArguments(Context context,
@NonNull int[] idTypes, @NonNull byte[] attestationChallenge) throws
DeviceIdAttestationException {
+ return prepareAttestationArguments(context, idTypes,attestationChallenge, Build.BRAND);
+ }
+
+ /**
+ * Prepares Keymaster Arguments with attestation data for misprovisioned Pixel 2 device.
+ * See http://go/keyAttestationFailure and http://b/69471841 for more info.
+ * @hide should only be used by KeyChain.
+ */
+ @NonNull public static KeymasterArguments prepareAttestationArgumentsIfMisprovisioned(
+ Context context, @NonNull int[] idTypes, @NonNull byte[] attestationChallenge) throws
+ DeviceIdAttestationException {
+ if (!isPotentiallyMisprovisionedDevice(context)) {
+ return null;
+ }
+ Resources resources = context.getResources();
+ String misprovisionedBrand = resources.getString(
+ com.android.internal.R.string.config_misprovisionedBrandValue);
+ return prepareAttestationArguments(
+ context, idTypes, attestationChallenge, misprovisionedBrand);
+ }
+
+ @NonNull private static boolean isPotentiallyMisprovisionedDevice(Context context) {
+ Resources resources = context.getResources();
+ String misprovisionedModel = resources.getString(
+ com.android.internal.R.string.config_misprovisionedDeviceModel);
+ String misprovisionedBrand = resources.getString(
+ com.android.internal.R.string.config_misprovisionedBrandValue);
+
+ return (Build.MODEL.equals(misprovisionedModel));
+ }
+
+ @NonNull private static KeymasterArguments prepareAttestationArguments(Context context,
+ @NonNull int[] idTypes, @NonNull byte[] attestationChallenge, String brand) throws
+ DeviceIdAttestationException {
// Check method arguments, retrieve requested device IDs and prepare attestation arguments.
if (attestationChallenge == null) {
throw new NullPointerException("Missing attestation challenge");
@@ -169,7 +203,7 @@ public abstract class AttestationUtils {
}
}
attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_BRAND,
- Build.BRAND.getBytes(StandardCharsets.UTF_8));
+ brand.getBytes(StandardCharsets.UTF_8));
attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_DEVICE,
Build.DEVICE.getBytes(StandardCharsets.UTF_8));
attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_PRODUCT,
diff --git a/libs/androidfw/LocaleData.cpp b/libs/androidfw/LocaleData.cpp
index 889d166d853b..020cef6012e9 100644
--- a/libs/androidfw/LocaleData.cpp
+++ b/libs/androidfw/LocaleData.cpp
@@ -34,11 +34,11 @@ inline uint32_t packLocale(const char* language, const char* region) {
}
inline uint32_t dropRegion(uint32_t packed_locale) {
- return packed_locale & 0xFFFF0000lu;
+ return packed_locale & 0xFFFF0000LU;
}
inline bool hasRegion(uint32_t packed_locale) {
- return (packed_locale & 0x0000FFFFlu) != 0;
+ return (packed_locale & 0x0000FFFFLU) != 0;
}
const size_t SCRIPT_LENGTH = 4;
@@ -122,9 +122,9 @@ inline bool isRepresentative(uint32_t language_and_region, const char* script) {
return (REPRESENTATIVE_LOCALES.count(packed_locale) != 0);
}
-const uint32_t US_SPANISH = 0x65735553lu; // es-US
-const uint32_t MEXICAN_SPANISH = 0x65734D58lu; // es-MX
-const uint32_t LATIN_AMERICAN_SPANISH = 0x6573A424lu; // es-419
+const uint32_t US_SPANISH = 0x65735553LU; // es-US
+const uint32_t MEXICAN_SPANISH = 0x65734D58LU; // es-MX
+const uint32_t LATIN_AMERICAN_SPANISH = 0x6573A424LU; // es-419
// The two locales es-US and es-MX are treated as special fallbacks for es-419.
// If there is no es-419, they are considered its equivalent.
@@ -225,8 +225,8 @@ void localeDataComputeScript(char out[4], const char* language, const char* regi
}
const uint32_t ENGLISH_STOP_LIST[2] = {
- 0x656E0000lu, // en
- 0x656E8400lu, // en-001
+ 0x656E0000LU, // en
+ 0x656E8400LU, // en-001
};
const char ENGLISH_CHARS[2] = {'e', 'n'};
const char LATIN_CHARS[4] = {'L', 'a', 't', 'n'};
diff --git a/libs/androidfw/LocaleDataTables.cpp b/libs/androidfw/LocaleDataTables.cpp
index 7c381efec7ec..c276a238e2e1 100644
--- a/libs/androidfw/LocaleDataTables.cpp
+++ b/libs/androidfw/LocaleDataTables.cpp
@@ -1446,733 +1446,733 @@ const std::unordered_map<uint32_t, uint8_t> LIKELY_SCRIPTS({
});
std::unordered_set<uint64_t> REPRESENTATIVE_LOCALES({
- 0x616145544C61746Ellu, // aa_Latn_ET
- 0x616247454379726Cllu, // ab_Cyrl_GE
- 0xC42047484C61746Ellu, // abr_Latn_GH
- 0x904049444C61746Ellu, // ace_Latn_ID
- 0x9C4055474C61746Ellu, // ach_Latn_UG
- 0x806047484C61746Ellu, // ada_Latn_GH
- 0xE06052554379726Cllu, // ady_Cyrl_RU
- 0x6165495241767374llu, // ae_Avst_IR
- 0x8480544E41726162llu, // aeb_Arab_TN
- 0x61665A414C61746Ellu, // af_Latn_ZA
- 0xC0C0434D4C61746Ellu, // agq_Latn_CM
- 0xB8E0494E41686F6Dllu, // aho_Ahom_IN
- 0x616B47484C61746Ellu, // ak_Latn_GH
- 0xA940495158737578llu, // akk_Xsux_IQ
- 0xB560584B4C61746Ellu, // aln_Latn_XK
- 0xCD6052554379726Cllu, // alt_Cyrl_RU
- 0x616D455445746869llu, // am_Ethi_ET
- 0xB9804E474C61746Ellu, // amo_Latn_NG
- 0xE5C049444C61746Ellu, // aoz_Latn_ID
- 0x8DE0544741726162llu, // apd_Arab_TG
- 0x6172454741726162llu, // ar_Arab_EG
- 0x8A20495241726D69llu, // arc_Armi_IR
- 0x8A204A4F4E626174llu, // arc_Nbat_JO
- 0x8A20535950616C6Dllu, // arc_Palm_SY
- 0xB620434C4C61746Ellu, // arn_Latn_CL
- 0xBA20424F4C61746Ellu, // aro_Latn_BO
- 0xC220445A41726162llu, // arq_Arab_DZ
- 0xE2204D4141726162llu, // ary_Arab_MA
- 0xE620454741726162llu, // arz_Arab_EG
- 0x6173494E42656E67llu, // as_Beng_IN
- 0x8240545A4C61746Ellu, // asa_Latn_TZ
- 0x9240555353676E77llu, // ase_Sgnw_US
- 0xCE4045534C61746Ellu, // ast_Latn_ES
- 0xA66043414C61746Ellu, // atj_Latn_CA
- 0x617652554379726Cllu, // av_Cyrl_RU
- 0x82C0494E44657661llu, // awa_Deva_IN
- 0x6179424F4C61746Ellu, // ay_Latn_BO
- 0x617A495241726162llu, // az_Arab_IR
- 0x617A415A4C61746Ellu, // az_Latn_AZ
- 0x626152554379726Cllu, // ba_Cyrl_RU
- 0xAC01504B41726162llu, // bal_Arab_PK
- 0xB40149444C61746Ellu, // ban_Latn_ID
- 0xBC014E5044657661llu, // bap_Deva_NP
- 0xC40141544C61746Ellu, // bar_Latn_AT
- 0xC801434D4C61746Ellu, // bas_Latn_CM
- 0xDC01434D42616D75llu, // bax_Bamu_CM
- 0x882149444C61746Ellu, // bbc_Latn_ID
- 0xA421434D4C61746Ellu, // bbj_Latn_CM
- 0xA04143494C61746Ellu, // bci_Latn_CI
- 0x626542594379726Cllu, // be_Cyrl_BY
- 0xA481534441726162llu, // bej_Arab_SD
- 0xB0815A4D4C61746Ellu, // bem_Latn_ZM
- 0xD88149444C61746Ellu, // bew_Latn_ID
- 0xE481545A4C61746Ellu, // bez_Latn_TZ
- 0x8CA1434D4C61746Ellu, // bfd_Latn_CM
- 0xC0A1494E54616D6Cllu, // bfq_Taml_IN
- 0xCCA1504B41726162llu, // bft_Arab_PK
- 0xE0A1494E44657661llu, // bfy_Deva_IN
- 0x626742474379726Cllu, // bg_Cyrl_BG
- 0x88C1494E44657661llu, // bgc_Deva_IN
- 0xB4C1504B41726162llu, // bgn_Arab_PK
- 0xDCC154524772656Bllu, // bgx_Grek_TR
- 0x84E1494E44657661llu, // bhb_Deva_IN
- 0xA0E1494E44657661llu, // bhi_Deva_IN
- 0xA8E150484C61746Ellu, // bhk_Latn_PH
- 0xB8E1494E44657661llu, // bho_Deva_IN
- 0x626956554C61746Ellu, // bi_Latn_VU
- 0xA90150484C61746Ellu, // bik_Latn_PH
- 0xB5014E474C61746Ellu, // bin_Latn_NG
- 0xA521494E44657661llu, // bjj_Deva_IN
- 0xB52149444C61746Ellu, // bjn_Latn_ID
- 0xB141434D4C61746Ellu, // bkm_Latn_CM
- 0xD14150484C61746Ellu, // bku_Latn_PH
- 0xCD61564E54617674llu, // blt_Tavt_VN
- 0x626D4D4C4C61746Ellu, // bm_Latn_ML
- 0xC1814D4C4C61746Ellu, // bmq_Latn_ML
- 0x626E424442656E67llu, // bn_Beng_BD
- 0x626F434E54696274llu, // bo_Tibt_CN
- 0xE1E1494E42656E67llu, // bpy_Beng_IN
- 0xA201495241726162llu, // bqi_Arab_IR
- 0xD60143494C61746Ellu, // bqv_Latn_CI
- 0x627246524C61746Ellu, // br_Latn_FR
- 0x8221494E44657661llu, // bra_Deva_IN
- 0x9E21504B41726162llu, // brh_Arab_PK
- 0xDE21494E44657661llu, // brx_Deva_IN
- 0x627342414C61746Ellu, // bs_Latn_BA
- 0xC2414C5242617373llu, // bsq_Bass_LR
- 0xCA41434D4C61746Ellu, // bss_Latn_CM
- 0xBA6150484C61746Ellu, // bto_Latn_PH
- 0xD661504B44657661llu, // btv_Deva_PK
- 0x828152554379726Cllu, // bua_Cyrl_RU
- 0x8A8159544C61746Ellu, // buc_Latn_YT
- 0x9A8149444C61746Ellu, // bug_Latn_ID
- 0xB281434D4C61746Ellu, // bum_Latn_CM
- 0x86A147514C61746Ellu, // bvb_Latn_GQ
- 0xB701455245746869llu, // byn_Ethi_ER
- 0xD701434D4C61746Ellu, // byv_Latn_CM
- 0x93214D4C4C61746Ellu, // bze_Latn_ML
- 0x636145534C61746Ellu, // ca_Latn_ES
- 0x9C424E474C61746Ellu, // cch_Latn_NG
- 0xBC42494E42656E67llu, // ccp_Beng_IN
- 0xBC42424443616B6Dllu, // ccp_Cakm_BD
- 0x636552554379726Cllu, // ce_Cyrl_RU
- 0x848250484C61746Ellu, // ceb_Latn_PH
- 0x98C255474C61746Ellu, // cgg_Latn_UG
- 0x636847554C61746Ellu, // ch_Latn_GU
- 0xA8E2464D4C61746Ellu, // chk_Latn_FM
- 0xB0E252554379726Cllu, // chm_Cyrl_RU
- 0xB8E255534C61746Ellu, // cho_Latn_US
- 0xBCE243414C61746Ellu, // chp_Latn_CA
- 0xC4E2555343686572llu, // chr_Cher_US
- 0x81224B4841726162llu, // cja_Arab_KH
- 0xB122564E4368616Dllu, // cjm_Cham_VN
- 0x8542495141726162llu, // ckb_Arab_IQ
- 0x636F46524C61746Ellu, // co_Latn_FR
- 0xBDC24547436F7074llu, // cop_Copt_EG
- 0xC9E250484C61746Ellu, // cps_Latn_PH
- 0x6372434143616E73llu, // cr_Cans_CA
- 0xA622434143616E73llu, // crj_Cans_CA
- 0xAA22434143616E73llu, // crk_Cans_CA
- 0xAE22434143616E73llu, // crl_Cans_CA
- 0xB222434143616E73llu, // crm_Cans_CA
- 0xCA2253434C61746Ellu, // crs_Latn_SC
- 0x6373435A4C61746Ellu, // cs_Latn_CZ
- 0x8642504C4C61746Ellu, // csb_Latn_PL
- 0xDA42434143616E73llu, // csw_Cans_CA
- 0x8E624D4D50617563llu, // ctd_Pauc_MM
- 0x637552554379726Cllu, // cu_Cyrl_RU
- 0x63754247476C6167llu, // cu_Glag_BG
- 0x637652554379726Cllu, // cv_Cyrl_RU
- 0x637947424C61746Ellu, // cy_Latn_GB
- 0x6461444B4C61746Ellu, // da_Latn_DK
- 0xA80355534C61746Ellu, // dak_Latn_US
- 0xC40352554379726Cllu, // dar_Cyrl_RU
- 0xD4034B454C61746Ellu, // dav_Latn_KE
- 0x8843494E41726162llu, // dcc_Arab_IN
- 0x646544454C61746Ellu, // de_Latn_DE
- 0xB48343414C61746Ellu, // den_Latn_CA
- 0xC4C343414C61746Ellu, // dgr_Latn_CA
- 0x91234E454C61746Ellu, // dje_Latn_NE
- 0xA5A343494C61746Ellu, // dnj_Latn_CI
- 0xA1C3494E41726162llu, // doi_Arab_IN
- 0x864344454C61746Ellu, // dsb_Latn_DE
- 0xB2634D4C4C61746Ellu, // dtm_Latn_ML
- 0xBE634D594C61746Ellu, // dtp_Latn_MY
- 0xE2634E5044657661llu, // dty_Deva_NP
- 0x8283434D4C61746Ellu, // dua_Latn_CM
- 0x64764D5654686161llu, // dv_Thaa_MV
- 0xBB03534E4C61746Ellu, // dyo_Latn_SN
- 0xD30342464C61746Ellu, // dyu_Latn_BF
- 0x647A425454696274llu, // dz_Tibt_BT
- 0xD0244B454C61746Ellu, // ebu_Latn_KE
- 0x656547484C61746Ellu, // ee_Latn_GH
- 0xA0A44E474C61746Ellu, // efi_Latn_NG
- 0xACC449544C61746Ellu, // egl_Latn_IT
- 0xE0C4454745677970llu, // egy_Egyp_EG
- 0xE1444D4D4B616C69llu, // eky_Kali_MM
- 0x656C47524772656Bllu, // el_Grek_GR
- 0x656E47424C61746Ellu, // en_Latn_GB
- 0x656E55534C61746Ellu, // en_Latn_US
- 0x656E474253686177llu, // en_Shaw_GB
- 0x657345534C61746Ellu, // es_Latn_ES
- 0x65734D584C61746Ellu, // es_Latn_MX
- 0x657355534C61746Ellu, // es_Latn_US
- 0xD24455534C61746Ellu, // esu_Latn_US
- 0x657445454C61746Ellu, // et_Latn_EE
- 0xCE6449544974616Cllu, // ett_Ital_IT
- 0x657545534C61746Ellu, // eu_Latn_ES
- 0xBAC4434D4C61746Ellu, // ewo_Latn_CM
- 0xCEE445534C61746Ellu, // ext_Latn_ES
- 0x6661495241726162llu, // fa_Arab_IR
- 0xB40547514C61746Ellu, // fan_Latn_GQ
- 0x6666474E41646C6Dllu, // ff_Adlm_GN
- 0x6666534E4C61746Ellu, // ff_Latn_SN
- 0xB0A54D4C4C61746Ellu, // ffm_Latn_ML
- 0x666946494C61746Ellu, // fi_Latn_FI
- 0x8105534441726162llu, // fia_Arab_SD
- 0xAD0550484C61746Ellu, // fil_Latn_PH
- 0xCD0553454C61746Ellu, // fit_Latn_SE
- 0x666A464A4C61746Ellu, // fj_Latn_FJ
- 0x666F464F4C61746Ellu, // fo_Latn_FO
- 0xB5C5424A4C61746Ellu, // fon_Latn_BJ
- 0x667246524C61746Ellu, // fr_Latn_FR
- 0x8A2555534C61746Ellu, // frc_Latn_US
- 0xBE2546524C61746Ellu, // frp_Latn_FR
- 0xC62544454C61746Ellu, // frr_Latn_DE
- 0xCA2544454C61746Ellu, // frs_Latn_DE
- 0x8685434D41726162llu, // fub_Arab_CM
- 0x8E8557464C61746Ellu, // fud_Latn_WF
- 0x9685474E4C61746Ellu, // fuf_Latn_GN
- 0xC2854E454C61746Ellu, // fuq_Latn_NE
- 0xC68549544C61746Ellu, // fur_Latn_IT
- 0xD6854E474C61746Ellu, // fuv_Latn_NG
- 0xC6A553444C61746Ellu, // fvr_Latn_SD
- 0x66794E4C4C61746Ellu, // fy_Latn_NL
- 0x676149454C61746Ellu, // ga_Latn_IE
- 0x800647484C61746Ellu, // gaa_Latn_GH
- 0x98064D444C61746Ellu, // gag_Latn_MD
- 0xB406434E48616E73llu, // gan_Hans_CN
- 0xE00649444C61746Ellu, // gay_Latn_ID
- 0xB026494E44657661llu, // gbm_Deva_IN
- 0xE426495241726162llu, // gbz_Arab_IR
- 0xC44647464C61746Ellu, // gcr_Latn_GF
- 0x676447424C61746Ellu, // gd_Latn_GB
- 0xE486455445746869llu, // gez_Ethi_ET
- 0xB4C64E5044657661llu, // ggn_Deva_NP
- 0xAD064B494C61746Ellu, // gil_Latn_KI
- 0xA926504B41726162llu, // gjk_Arab_PK
- 0xD126504B41726162llu, // gju_Arab_PK
- 0x676C45534C61746Ellu, // gl_Latn_ES
- 0xA966495241726162llu, // glk_Arab_IR
- 0x676E50594C61746Ellu, // gn_Latn_PY
- 0xB1C6494E44657661llu, // gom_Deva_IN
- 0xB5C6494E54656C75llu, // gon_Telu_IN
- 0xC5C649444C61746Ellu, // gor_Latn_ID
- 0xC9C64E4C4C61746Ellu, // gos_Latn_NL
- 0xCDC65541476F7468llu, // got_Goth_UA
- 0x8A26435943707274llu, // grc_Cprt_CY
- 0x8A2647524C696E62llu, // grc_Linb_GR
- 0xCE26494E42656E67llu, // grt_Beng_IN
- 0xDA4643484C61746Ellu, // gsw_Latn_CH
- 0x6775494E47756A72llu, // gu_Gujr_IN
- 0x868642524C61746Ellu, // gub_Latn_BR
- 0x8A86434F4C61746Ellu, // guc_Latn_CO
- 0xC68647484C61746Ellu, // gur_Latn_GH
- 0xE6864B454C61746Ellu, // guz_Latn_KE
- 0x6776494D4C61746Ellu, // gv_Latn_IM
- 0xC6A64E5044657661llu, // gvr_Deva_NP
- 0xA2C643414C61746Ellu, // gwi_Latn_CA
- 0x68614E474C61746Ellu, // ha_Latn_NG
- 0xA807434E48616E73llu, // hak_Hans_CN
- 0xD80755534C61746Ellu, // haw_Latn_US
- 0xE407414641726162llu, // haz_Arab_AF
- 0x6865494C48656272llu, // he_Hebr_IL
- 0x6869494E44657661llu, // hi_Deva_IN
- 0x9507464A4C61746Ellu, // hif_Latn_FJ
- 0xAD0750484C61746Ellu, // hil_Latn_PH
- 0xD1675452486C7577llu, // hlu_Hluw_TR
- 0x8D87434E506C7264llu, // hmd_Plrd_CN
- 0x8DA7504B41726162llu, // hnd_Arab_PK
- 0x91A7494E44657661llu, // hne_Deva_IN
- 0xA5A74C41486D6E67llu, // hnj_Hmng_LA
- 0xB5A750484C61746Ellu, // hnn_Latn_PH
- 0xB9A7504B41726162llu, // hno_Arab_PK
- 0x686F50474C61746Ellu, // ho_Latn_PG
- 0x89C7494E44657661llu, // hoc_Deva_IN
- 0xA5C7494E44657661llu, // hoj_Deva_IN
- 0x687248524C61746Ellu, // hr_Latn_HR
- 0x864744454C61746Ellu, // hsb_Latn_DE
- 0xB647434E48616E73llu, // hsn_Hans_CN
- 0x687448544C61746Ellu, // ht_Latn_HT
- 0x687548554C61746Ellu, // hu_Latn_HU
- 0x6879414D41726D6Ellu, // hy_Armn_AM
- 0x687A4E414C61746Ellu, // hz_Latn_NA
- 0x696146524C61746Ellu, // ia_Latn_FR
- 0x80284D594C61746Ellu, // iba_Latn_MY
- 0x84284E474C61746Ellu, // ibb_Latn_NG
- 0x696449444C61746Ellu, // id_Latn_ID
- 0x69674E474C61746Ellu, // ig_Latn_NG
- 0x6969434E59696969llu, // ii_Yiii_CN
- 0x696B55534C61746Ellu, // ik_Latn_US
- 0xCD4843414C61746Ellu, // ikt_Latn_CA
- 0xB96850484C61746Ellu, // ilo_Latn_PH
- 0x696E49444C61746Ellu, // in_Latn_ID
- 0x9DA852554379726Cllu, // inh_Cyrl_RU
- 0x697349534C61746Ellu, // is_Latn_IS
- 0x697449544C61746Ellu, // it_Latn_IT
- 0x6975434143616E73llu, // iu_Cans_CA
- 0x6977494C48656272llu, // iw_Hebr_IL
- 0x9F2852554C61746Ellu, // izh_Latn_RU
- 0x6A614A504A70616Ellu, // ja_Jpan_JP
- 0xB0094A4D4C61746Ellu, // jam_Latn_JM
- 0xB8C9434D4C61746Ellu, // jgo_Latn_CM
- 0x8989545A4C61746Ellu, // jmc_Latn_TZ
- 0xAD894E5044657661llu, // jml_Deva_NP
- 0xCE89444B4C61746Ellu, // jut_Latn_DK
- 0x6A7649444C61746Ellu, // jv_Latn_ID
- 0x6A7749444C61746Ellu, // jw_Latn_ID
- 0x6B61474547656F72llu, // ka_Geor_GE
- 0x800A555A4379726Cllu, // kaa_Cyrl_UZ
- 0x840A445A4C61746Ellu, // kab_Latn_DZ
- 0x880A4D4D4C61746Ellu, // kac_Latn_MM
- 0xA40A4E474C61746Ellu, // kaj_Latn_NG
- 0xB00A4B454C61746Ellu, // kam_Latn_KE
- 0xB80A4D4C4C61746Ellu, // kao_Latn_ML
- 0x8C2A52554379726Cllu, // kbd_Cyrl_RU
- 0xE02A4E4541726162llu, // kby_Arab_NE
- 0x984A4E474C61746Ellu, // kcg_Latn_NG
- 0xA84A5A574C61746Ellu, // kck_Latn_ZW
- 0x906A545A4C61746Ellu, // kde_Latn_TZ
- 0x9C6A544741726162llu, // kdh_Arab_TG
- 0xCC6A544854686169llu, // kdt_Thai_TH
- 0x808A43564C61746Ellu, // kea_Latn_CV
- 0xB48A434D4C61746Ellu, // ken_Latn_CM
- 0xB8AA43494C61746Ellu, // kfo_Latn_CI
- 0xC4AA494E44657661llu, // kfr_Deva_IN
- 0xE0AA494E44657661llu, // kfy_Deva_IN
- 0x6B6743444C61746Ellu, // kg_Latn_CD
- 0x90CA49444C61746Ellu, // kge_Latn_ID
- 0xBCCA42524C61746Ellu, // kgp_Latn_BR
- 0x80EA494E4C61746Ellu, // kha_Latn_IN
- 0x84EA434E54616C75llu, // khb_Talu_CN
- 0xB4EA494E44657661llu, // khn_Deva_IN
- 0xC0EA4D4C4C61746Ellu, // khq_Latn_ML
- 0xCCEA494E4D796D72llu, // kht_Mymr_IN
- 0xD8EA504B41726162llu, // khw_Arab_PK
- 0x6B694B454C61746Ellu, // ki_Latn_KE
- 0xD10A54524C61746Ellu, // kiu_Latn_TR
- 0x6B6A4E414C61746Ellu, // kj_Latn_NA
- 0x992A4C414C616F6Fllu, // kjg_Laoo_LA
- 0x6B6B434E41726162llu, // kk_Arab_CN
- 0x6B6B4B5A4379726Cllu, // kk_Cyrl_KZ
- 0xA54A434D4C61746Ellu, // kkj_Latn_CM
- 0x6B6C474C4C61746Ellu, // kl_Latn_GL
- 0xB56A4B454C61746Ellu, // kln_Latn_KE
- 0x6B6D4B484B686D72llu, // km_Khmr_KH
- 0x858A414F4C61746Ellu, // kmb_Latn_AO
- 0x6B6E494E4B6E6461llu, // kn_Knda_IN
- 0x6B6F4B524B6F7265llu, // ko_Kore_KR
- 0xA1CA52554379726Cllu, // koi_Cyrl_RU
- 0xA9CA494E44657661llu, // kok_Deva_IN
- 0xC9CA464D4C61746Ellu, // kos_Latn_FM
- 0x91EA4C524C61746Ellu, // kpe_Latn_LR
- 0x8A2A52554379726Cllu, // krc_Cyrl_RU
- 0xA22A534C4C61746Ellu, // kri_Latn_SL
- 0xA62A50484C61746Ellu, // krj_Latn_PH
- 0xAE2A52554C61746Ellu, // krl_Latn_RU
- 0xD22A494E44657661llu, // kru_Deva_IN
- 0x6B73494E41726162llu, // ks_Arab_IN
- 0x864A545A4C61746Ellu, // ksb_Latn_TZ
- 0x964A434D4C61746Ellu, // ksf_Latn_CM
- 0x9E4A44454C61746Ellu, // ksh_Latn_DE
- 0x6B75495141726162llu, // ku_Arab_IQ
- 0x6B7554524C61746Ellu, // ku_Latn_TR
- 0xB28A52554379726Cllu, // kum_Cyrl_RU
- 0x6B7652554379726Cllu, // kv_Cyrl_RU
- 0xC6AA49444C61746Ellu, // kvr_Latn_ID
- 0xDEAA504B41726162llu, // kvx_Arab_PK
- 0x6B7747424C61746Ellu, // kw_Latn_GB
- 0xB2EA544854686169llu, // kxm_Thai_TH
- 0xBEEA504B41726162llu, // kxp_Arab_PK
- 0x6B79434E41726162llu, // ky_Arab_CN
- 0x6B794B474379726Cllu, // ky_Cyrl_KG
- 0x6B7954524C61746Ellu, // ky_Latn_TR
- 0x6C6156414C61746Ellu, // la_Latn_VA
- 0x840B47524C696E61llu, // lab_Lina_GR
- 0x8C0B494C48656272llu, // lad_Hebr_IL
- 0x980B545A4C61746Ellu, // lag_Latn_TZ
- 0x9C0B504B41726162llu, // lah_Arab_PK
- 0xA40B55474C61746Ellu, // laj_Latn_UG
- 0x6C624C554C61746Ellu, // lb_Latn_LU
- 0x902B52554379726Cllu, // lbe_Cyrl_RU
- 0xD82B49444C61746Ellu, // lbw_Latn_ID
- 0xBC4B434E54686169llu, // lcp_Thai_CN
- 0xBC8B494E4C657063llu, // lep_Lepc_IN
- 0xE48B52554379726Cllu, // lez_Cyrl_RU
- 0x6C6755474C61746Ellu, // lg_Latn_UG
- 0x6C694E4C4C61746Ellu, // li_Latn_NL
- 0x950B4E5044657661llu, // lif_Deva_NP
- 0x950B494E4C696D62llu, // lif_Limb_IN
- 0xA50B49544C61746Ellu, // lij_Latn_IT
- 0xC90B434E4C697375llu, // lis_Lisu_CN
- 0xBD2B49444C61746Ellu, // ljp_Latn_ID
- 0xA14B495241726162llu, // lki_Arab_IR
- 0xCD4B55534C61746Ellu, // lkt_Latn_US
- 0xB58B494E54656C75llu, // lmn_Telu_IN
- 0xB98B49544C61746Ellu, // lmo_Latn_IT
- 0x6C6E43444C61746Ellu, // ln_Latn_CD
- 0x6C6F4C414C616F6Fllu, // lo_Laoo_LA
- 0xADCB43444C61746Ellu, // lol_Latn_CD
- 0xE5CB5A4D4C61746Ellu, // loz_Latn_ZM
- 0x8A2B495241726162llu, // lrc_Arab_IR
- 0x6C744C544C61746Ellu, // lt_Latn_LT
- 0x9A6B4C564C61746Ellu, // ltg_Latn_LV
- 0x6C7543444C61746Ellu, // lu_Latn_CD
- 0x828B43444C61746Ellu, // lua_Latn_CD
- 0xBA8B4B454C61746Ellu, // luo_Latn_KE
- 0xE28B4B454C61746Ellu, // luy_Latn_KE
- 0xE68B495241726162llu, // luz_Arab_IR
- 0x6C764C564C61746Ellu, // lv_Latn_LV
- 0xAECB544854686169llu, // lwl_Thai_TH
- 0x9F2B434E48616E73llu, // lzh_Hans_CN
- 0xE72B54524C61746Ellu, // lzz_Latn_TR
- 0x8C0C49444C61746Ellu, // mad_Latn_ID
- 0x940C434D4C61746Ellu, // maf_Latn_CM
- 0x980C494E44657661llu, // mag_Deva_IN
- 0xA00C494E44657661llu, // mai_Deva_IN
- 0xA80C49444C61746Ellu, // mak_Latn_ID
- 0xB40C474D4C61746Ellu, // man_Latn_GM
- 0xB40C474E4E6B6F6Fllu, // man_Nkoo_GN
- 0xC80C4B454C61746Ellu, // mas_Latn_KE
- 0xE40C4D584C61746Ellu, // maz_Latn_MX
- 0x946C52554379726Cllu, // mdf_Cyrl_RU
- 0x9C6C50484C61746Ellu, // mdh_Latn_PH
- 0xC46C49444C61746Ellu, // mdr_Latn_ID
- 0xB48C534C4C61746Ellu, // men_Latn_SL
- 0xC48C4B454C61746Ellu, // mer_Latn_KE
- 0x80AC544841726162llu, // mfa_Arab_TH
- 0x90AC4D554C61746Ellu, // mfe_Latn_MU
- 0x6D674D474C61746Ellu, // mg_Latn_MG
- 0x9CCC4D5A4C61746Ellu, // mgh_Latn_MZ
- 0xB8CC434D4C61746Ellu, // mgo_Latn_CM
- 0xBCCC4E5044657661llu, // mgp_Deva_NP
- 0xE0CC545A4C61746Ellu, // mgy_Latn_TZ
- 0x6D684D484C61746Ellu, // mh_Latn_MH
- 0x6D694E5A4C61746Ellu, // mi_Latn_NZ
- 0xB50C49444C61746Ellu, // min_Latn_ID
- 0xC90C495148617472llu, // mis_Hatr_IQ
- 0x6D6B4D4B4379726Cllu, // mk_Cyrl_MK
- 0x6D6C494E4D6C796Dllu, // ml_Mlym_IN
- 0xC96C53444C61746Ellu, // mls_Latn_SD
- 0x6D6E4D4E4379726Cllu, // mn_Cyrl_MN
- 0x6D6E434E4D6F6E67llu, // mn_Mong_CN
- 0xA1AC494E42656E67llu, // mni_Beng_IN
- 0xD9AC4D4D4D796D72llu, // mnw_Mymr_MM
- 0x91CC43414C61746Ellu, // moe_Latn_CA
- 0x9DCC43414C61746Ellu, // moh_Latn_CA
- 0xC9CC42464C61746Ellu, // mos_Latn_BF
- 0x6D72494E44657661llu, // mr_Deva_IN
- 0x8E2C4E5044657661llu, // mrd_Deva_NP
- 0xA62C52554379726Cllu, // mrj_Cyrl_RU
- 0xBA2C42444D726F6Fllu, // mro_Mroo_BD
- 0x6D734D594C61746Ellu, // ms_Latn_MY
- 0x6D744D544C61746Ellu, // mt_Latn_MT
- 0xC66C494E44657661llu, // mtr_Deva_IN
- 0x828C434D4C61746Ellu, // mua_Latn_CM
- 0xCA8C55534C61746Ellu, // mus_Latn_US
- 0xE2AC504B41726162llu, // mvy_Arab_PK
- 0xAACC4D4C4C61746Ellu, // mwk_Latn_ML
- 0xC6CC494E44657661llu, // mwr_Deva_IN
- 0xD6CC49444C61746Ellu, // mwv_Latn_ID
- 0x8AEC5A574C61746Ellu, // mxc_Latn_ZW
- 0x6D794D4D4D796D72llu, // my_Mymr_MM
- 0xD70C52554379726Cllu, // myv_Cyrl_RU
- 0xDF0C55474C61746Ellu, // myx_Latn_UG
- 0xE70C49524D616E64llu, // myz_Mand_IR
- 0xB72C495241726162llu, // mzn_Arab_IR
- 0x6E614E524C61746Ellu, // na_Latn_NR
- 0xB40D434E48616E73llu, // nan_Hans_CN
- 0xBC0D49544C61746Ellu, // nap_Latn_IT
- 0xC00D4E414C61746Ellu, // naq_Latn_NA
- 0x6E624E4F4C61746Ellu, // nb_Latn_NO
- 0x9C4D4D584C61746Ellu, // nch_Latn_MX
- 0x6E645A574C61746Ellu, // nd_Latn_ZW
- 0x886D4D5A4C61746Ellu, // ndc_Latn_MZ
- 0xC86D44454C61746Ellu, // nds_Latn_DE
- 0x6E654E5044657661llu, // ne_Deva_NP
- 0xD88D4E5044657661llu, // new_Deva_NP
- 0x6E674E414C61746Ellu, // ng_Latn_NA
- 0xACCD4D5A4C61746Ellu, // ngl_Latn_MZ
- 0x90ED4D584C61746Ellu, // nhe_Latn_MX
- 0xD8ED4D584C61746Ellu, // nhw_Latn_MX
- 0xA50D49444C61746Ellu, // nij_Latn_ID
- 0xD10D4E554C61746Ellu, // niu_Latn_NU
- 0xB92D494E4C61746Ellu, // njo_Latn_IN
- 0x6E6C4E4C4C61746Ellu, // nl_Latn_NL
- 0x998D434D4C61746Ellu, // nmg_Latn_CM
- 0x6E6E4E4F4C61746Ellu, // nn_Latn_NO
- 0x9DAD434D4C61746Ellu, // nnh_Latn_CM
- 0x6E6F4E4F4C61746Ellu, // no_Latn_NO
- 0x8DCD54484C616E61llu, // nod_Lana_TH
- 0x91CD494E44657661llu, // noe_Deva_IN
- 0xB5CD534552756E72llu, // non_Runr_SE
- 0xBA0D474E4E6B6F6Fllu, // nqo_Nkoo_GN
- 0x6E725A414C61746Ellu, // nr_Latn_ZA
- 0xAA4D434143616E73llu, // nsk_Cans_CA
- 0xBA4D5A414C61746Ellu, // nso_Latn_ZA
- 0xCA8D53534C61746Ellu, // nus_Latn_SS
- 0x6E7655534C61746Ellu, // nv_Latn_US
- 0xC2ED434E4C61746Ellu, // nxq_Latn_CN
- 0x6E794D574C61746Ellu, // ny_Latn_MW
- 0xB30D545A4C61746Ellu, // nym_Latn_TZ
- 0xB70D55474C61746Ellu, // nyn_Latn_UG
- 0xA32D47484C61746Ellu, // nzi_Latn_GH
- 0x6F6346524C61746Ellu, // oc_Latn_FR
- 0x6F6D45544C61746Ellu, // om_Latn_ET
- 0x6F72494E4F727961llu, // or_Orya_IN
- 0x6F7347454379726Cllu, // os_Cyrl_GE
- 0x824E55534F736765llu, // osa_Osge_US
- 0xAA6E4D4E4F726B68llu, // otk_Orkh_MN
- 0x7061504B41726162llu, // pa_Arab_PK
- 0x7061494E47757275llu, // pa_Guru_IN
- 0x980F50484C61746Ellu, // pag_Latn_PH
- 0xAC0F495250686C69llu, // pal_Phli_IR
- 0xAC0F434E50686C70llu, // pal_Phlp_CN
- 0xB00F50484C61746Ellu, // pam_Latn_PH
- 0xBC0F41574C61746Ellu, // pap_Latn_AW
- 0xD00F50574C61746Ellu, // pau_Latn_PW
- 0x8C4F46524C61746Ellu, // pcd_Latn_FR
- 0xB04F4E474C61746Ellu, // pcm_Latn_NG
- 0x886F55534C61746Ellu, // pdc_Latn_US
- 0xCC6F43414C61746Ellu, // pdt_Latn_CA
- 0xB88F49525870656Fllu, // peo_Xpeo_IR
- 0xACAF44454C61746Ellu, // pfl_Latn_DE
- 0xB4EF4C4250686E78llu, // phn_Phnx_LB
- 0x814F494E42726168llu, // pka_Brah_IN
- 0xB94F4B454C61746Ellu, // pko_Latn_KE
- 0x706C504C4C61746Ellu, // pl_Latn_PL
- 0xC98F49544C61746Ellu, // pms_Latn_IT
- 0xCDAF47524772656Bllu, // pnt_Grek_GR
- 0xB5CF464D4C61746Ellu, // pon_Latn_FM
- 0x822F504B4B686172llu, // pra_Khar_PK
- 0x8E2F495241726162llu, // prd_Arab_IR
- 0x7073414641726162llu, // ps_Arab_AF
- 0x707442524C61746Ellu, // pt_Latn_BR
- 0xD28F47414C61746Ellu, // puu_Latn_GA
- 0x717550454C61746Ellu, // qu_Latn_PE
- 0x8A9047544C61746Ellu, // quc_Latn_GT
- 0x9A9045434C61746Ellu, // qug_Latn_EC
- 0xA411494E44657661llu, // raj_Deva_IN
- 0x945152454C61746Ellu, // rcf_Latn_RE
- 0xA49149444C61746Ellu, // rej_Latn_ID
- 0xB4D149544C61746Ellu, // rgn_Latn_IT
- 0x8111494E4C61746Ellu, // ria_Latn_IN
- 0x95114D4154666E67llu, // rif_Tfng_MA
- 0xC9314E5044657661llu, // rjs_Deva_NP
- 0xCD51424442656E67llu, // rkt_Beng_BD
- 0x726D43484C61746Ellu, // rm_Latn_CH
- 0x959146494C61746Ellu, // rmf_Latn_FI
- 0xB99143484C61746Ellu, // rmo_Latn_CH
- 0xCD91495241726162llu, // rmt_Arab_IR
- 0xD19153454C61746Ellu, // rmu_Latn_SE
- 0x726E42494C61746Ellu, // rn_Latn_BI
- 0x99B14D5A4C61746Ellu, // rng_Latn_MZ
- 0x726F524F4C61746Ellu, // ro_Latn_RO
- 0x85D149444C61746Ellu, // rob_Latn_ID
- 0x95D1545A4C61746Ellu, // rof_Latn_TZ
- 0xB271464A4C61746Ellu, // rtm_Latn_FJ
- 0x727552554379726Cllu, // ru_Cyrl_RU
- 0x929155414379726Cllu, // rue_Cyrl_UA
- 0x9A9153424C61746Ellu, // rug_Latn_SB
- 0x727752574C61746Ellu, // rw_Latn_RW
- 0xAAD1545A4C61746Ellu, // rwk_Latn_TZ
- 0xD3114A504B616E61llu, // ryu_Kana_JP
- 0x7361494E44657661llu, // sa_Deva_IN
- 0x941247484C61746Ellu, // saf_Latn_GH
- 0x9C1252554379726Cllu, // sah_Cyrl_RU
- 0xC0124B454C61746Ellu, // saq_Latn_KE
- 0xC81249444C61746Ellu, // sas_Latn_ID
- 0xCC12494E4C61746Ellu, // sat_Latn_IN
- 0xE412494E53617572llu, // saz_Saur_IN
- 0xBC32545A4C61746Ellu, // sbp_Latn_TZ
- 0x736349544C61746Ellu, // sc_Latn_IT
- 0xA852494E44657661llu, // sck_Deva_IN
- 0xB45249544C61746Ellu, // scn_Latn_IT
- 0xB85247424C61746Ellu, // sco_Latn_GB
- 0xC85243414C61746Ellu, // scs_Latn_CA
- 0x7364504B41726162llu, // sd_Arab_PK
- 0x7364494E44657661llu, // sd_Deva_IN
- 0x7364494E4B686F6Allu, // sd_Khoj_IN
- 0x7364494E53696E64llu, // sd_Sind_IN
- 0x887249544C61746Ellu, // sdc_Latn_IT
- 0x9C72495241726162llu, // sdh_Arab_IR
- 0x73654E4F4C61746Ellu, // se_Latn_NO
- 0x949243494C61746Ellu, // sef_Latn_CI
- 0x9C924D5A4C61746Ellu, // seh_Latn_MZ
- 0xA0924D584C61746Ellu, // sei_Latn_MX
- 0xC8924D4C4C61746Ellu, // ses_Latn_ML
- 0x736743464C61746Ellu, // sg_Latn_CF
- 0x80D249454F67616Dllu, // sga_Ogam_IE
- 0xC8D24C544C61746Ellu, // sgs_Latn_LT
- 0xA0F24D4154666E67llu, // shi_Tfng_MA
- 0xB4F24D4D4D796D72llu, // shn_Mymr_MM
- 0x73694C4B53696E68llu, // si_Sinh_LK
- 0x8D1245544C61746Ellu, // sid_Latn_ET
- 0x736B534B4C61746Ellu, // sk_Latn_SK
- 0xC552504B41726162llu, // skr_Arab_PK
- 0x736C53494C61746Ellu, // sl_Latn_SI
- 0xA172504C4C61746Ellu, // sli_Latn_PL
- 0xE17249444C61746Ellu, // sly_Latn_ID
- 0x736D57534C61746Ellu, // sm_Latn_WS
- 0x819253454C61746Ellu, // sma_Latn_SE
- 0xA59253454C61746Ellu, // smj_Latn_SE
- 0xB59246494C61746Ellu, // smn_Latn_FI
- 0xBD92494C53616D72llu, // smp_Samr_IL
- 0xC99246494C61746Ellu, // sms_Latn_FI
- 0x736E5A574C61746Ellu, // sn_Latn_ZW
- 0xA9B24D4C4C61746Ellu, // snk_Latn_ML
- 0x736F534F4C61746Ellu, // so_Latn_SO
- 0xD1D2544854686169llu, // sou_Thai_TH
- 0x7371414C4C61746Ellu, // sq_Latn_AL
- 0x737252534379726Cllu, // sr_Cyrl_RS
- 0x737252534C61746Ellu, // sr_Latn_RS
- 0x8632494E536F7261llu, // srb_Sora_IN
- 0xB63253524C61746Ellu, // srn_Latn_SR
- 0xC632534E4C61746Ellu, // srr_Latn_SN
- 0xDE32494E44657661llu, // srx_Deva_IN
- 0x73735A414C61746Ellu, // ss_Latn_ZA
- 0xE25245524C61746Ellu, // ssy_Latn_ER
- 0x73745A414C61746Ellu, // st_Latn_ZA
- 0xC27244454C61746Ellu, // stq_Latn_DE
- 0x737549444C61746Ellu, // su_Latn_ID
- 0xAA92545A4C61746Ellu, // suk_Latn_TZ
- 0xCA92474E4C61746Ellu, // sus_Latn_GN
- 0x737653454C61746Ellu, // sv_Latn_SE
- 0x7377545A4C61746Ellu, // sw_Latn_TZ
- 0x86D2595441726162llu, // swb_Arab_YT
- 0x8AD243444C61746Ellu, // swc_Latn_CD
- 0x9AD244454C61746Ellu, // swg_Latn_DE
- 0xD6D2494E44657661llu, // swv_Deva_IN
- 0xB6F249444C61746Ellu, // sxn_Latn_ID
- 0xAF12424442656E67llu, // syl_Beng_BD
- 0xC712495153797263llu, // syr_Syrc_IQ
- 0xAF32504C4C61746Ellu, // szl_Latn_PL
- 0x7461494E54616D6Cllu, // ta_Taml_IN
- 0xA4134E5044657661llu, // taj_Deva_NP
- 0xD83350484C61746Ellu, // tbw_Latn_PH
- 0xE053494E4B6E6461llu, // tcy_Knda_IN
- 0x8C73434E54616C65llu, // tdd_Tale_CN
- 0x98734E5044657661llu, // tdg_Deva_NP
- 0x9C734E5044657661llu, // tdh_Deva_NP
- 0x7465494E54656C75llu, // te_Telu_IN
- 0xB093534C4C61746Ellu, // tem_Latn_SL
- 0xB89355474C61746Ellu, // teo_Latn_UG
- 0xCC93544C4C61746Ellu, // tet_Latn_TL
- 0x7467504B41726162llu, // tg_Arab_PK
- 0x7467544A4379726Cllu, // tg_Cyrl_TJ
- 0x7468544854686169llu, // th_Thai_TH
- 0xACF34E5044657661llu, // thl_Deva_NP
- 0xC0F34E5044657661llu, // thq_Deva_NP
- 0xC4F34E5044657661llu, // thr_Deva_NP
- 0x7469455445746869llu, // ti_Ethi_ET
- 0x9913455245746869llu, // tig_Ethi_ER
- 0xD5134E474C61746Ellu, // tiv_Latn_NG
- 0x746B544D4C61746Ellu, // tk_Latn_TM
- 0xAD53544B4C61746Ellu, // tkl_Latn_TK
- 0xC553415A4C61746Ellu, // tkr_Latn_AZ
- 0xCD534E5044657661llu, // tkt_Deva_NP
- 0x746C50484C61746Ellu, // tl_Latn_PH
- 0xE173415A4C61746Ellu, // tly_Latn_AZ
- 0x9D934E454C61746Ellu, // tmh_Latn_NE
- 0x746E5A414C61746Ellu, // tn_Latn_ZA
- 0x746F544F4C61746Ellu, // to_Latn_TO
- 0x99D34D574C61746Ellu, // tog_Latn_MW
- 0xA1F350474C61746Ellu, // tpi_Latn_PG
- 0x747254524C61746Ellu, // tr_Latn_TR
- 0xD23354524C61746Ellu, // tru_Latn_TR
- 0xD63354574C61746Ellu, // trv_Latn_TW
- 0x74735A414C61746Ellu, // ts_Latn_ZA
- 0x8E5347524772656Bllu, // tsd_Grek_GR
- 0x96534E5044657661llu, // tsf_Deva_NP
- 0x9A5350484C61746Ellu, // tsg_Latn_PH
- 0xA653425454696274llu, // tsj_Tibt_BT
- 0x747452554379726Cllu, // tt_Cyrl_RU
- 0xA67355474C61746Ellu, // ttj_Latn_UG
- 0xCA73544854686169llu, // tts_Thai_TH
- 0xCE73415A4C61746Ellu, // ttt_Latn_AZ
- 0xB2934D574C61746Ellu, // tum_Latn_MW
- 0xAEB354564C61746Ellu, // tvl_Latn_TV
- 0xC2D34E454C61746Ellu, // twq_Latn_NE
- 0x9AF3434E54616E67llu, // txg_Tang_CN
- 0x747950464C61746Ellu, // ty_Latn_PF
- 0xD71352554379726Cllu, // tyv_Cyrl_RU
- 0xB3334D414C61746Ellu, // tzm_Latn_MA
- 0xB07452554379726Cllu, // udm_Cyrl_RU
- 0x7567434E41726162llu, // ug_Arab_CN
- 0x75674B5A4379726Cllu, // ug_Cyrl_KZ
- 0x80D4535955676172llu, // uga_Ugar_SY
- 0x756B55414379726Cllu, // uk_Cyrl_UA
- 0xA174464D4C61746Ellu, // uli_Latn_FM
- 0x8594414F4C61746Ellu, // umb_Latn_AO
- 0xC5B4494E42656E67llu, // unr_Beng_IN
- 0xC5B44E5044657661llu, // unr_Deva_NP
- 0xDDB4494E42656E67llu, // unx_Beng_IN
- 0x7572504B41726162llu, // ur_Arab_PK
- 0x757A414641726162llu, // uz_Arab_AF
- 0x757A555A4C61746Ellu, // uz_Latn_UZ
- 0xA0154C5256616969llu, // vai_Vaii_LR
- 0x76655A414C61746Ellu, // ve_Latn_ZA
- 0x889549544C61746Ellu, // vec_Latn_IT
- 0xBC9552554C61746Ellu, // vep_Latn_RU
- 0x7669564E4C61746Ellu, // vi_Latn_VN
- 0x891553584C61746Ellu, // vic_Latn_SX
- 0xC97542454C61746Ellu, // vls_Latn_BE
- 0x959544454C61746Ellu, // vmf_Latn_DE
- 0xD9954D5A4C61746Ellu, // vmw_Latn_MZ
- 0xCDD552554C61746Ellu, // vot_Latn_RU
- 0xBA3545454C61746Ellu, // vro_Latn_EE
- 0xB695545A4C61746Ellu, // vun_Latn_TZ
- 0x776142454C61746Ellu, // wa_Latn_BE
- 0x901643484C61746Ellu, // wae_Latn_CH
- 0xAC16455445746869llu, // wal_Ethi_ET
- 0xC41650484C61746Ellu, // war_Latn_PH
- 0xBC3641554C61746Ellu, // wbp_Latn_AU
- 0xC036494E54656C75llu, // wbq_Telu_IN
- 0xC436494E44657661llu, // wbr_Deva_IN
- 0xC97657464C61746Ellu, // wls_Latn_WF
- 0xA1B64B4D41726162llu, // wni_Arab_KM
- 0x776F534E4C61746Ellu, // wo_Latn_SN
- 0xB276494E44657661llu, // wtm_Deva_IN
- 0xD296434E48616E73llu, // wuu_Hans_CN
- 0xD41742524C61746Ellu, // xav_Latn_BR
- 0xC457545243617269llu, // xcr_Cari_TR
- 0x78685A414C61746Ellu, // xh_Latn_ZA
- 0x897754524C796369llu, // xlc_Lyci_TR
- 0x8D7754524C796469llu, // xld_Lydi_TR
- 0x9597474547656F72llu, // xmf_Geor_GE
- 0xB597434E4D616E69llu, // xmn_Mani_CN
- 0xC59753444D657263llu, // xmr_Merc_SD
- 0x81B753414E617262llu, // xna_Narb_SA
- 0xC5B7494E44657661llu, // xnr_Deva_IN
- 0x99D755474C61746Ellu, // xog_Latn_UG
- 0xC5F7495250727469llu, // xpr_Prti_IR
- 0x8257594553617262llu, // xsa_Sarb_YE
- 0xC6574E5044657661llu, // xsr_Deva_NP
- 0xB8184D5A4C61746Ellu, // yao_Latn_MZ
- 0xBC18464D4C61746Ellu, // yap_Latn_FM
- 0xD418434D4C61746Ellu, // yav_Latn_CM
- 0x8438434D4C61746Ellu, // ybb_Latn_CM
- 0x796F4E474C61746Ellu, // yo_Latn_NG
- 0xAE3842524C61746Ellu, // yrl_Latn_BR
- 0x82984D584C61746Ellu, // yua_Latn_MX
- 0x9298434E48616E73llu, // yue_Hans_CN
- 0x9298484B48616E74llu, // yue_Hant_HK
- 0x7A61434E4C61746Ellu, // za_Latn_CN
- 0x981953444C61746Ellu, // zag_Latn_SD
- 0xA4794B4D41726162llu, // zdj_Arab_KM
- 0x80994E4C4C61746Ellu, // zea_Latn_NL
- 0x9CD94D4154666E67llu, // zgh_Tfng_MA
- 0x7A685457426F706Fllu, // zh_Bopo_TW
- 0x7A68545748616E62llu, // zh_Hanb_TW
- 0x7A68434E48616E73llu, // zh_Hans_CN
- 0x7A68545748616E74llu, // zh_Hant_TW
- 0xB17954474C61746Ellu, // zlm_Latn_TG
- 0xA1994D594C61746Ellu, // zmi_Latn_MY
- 0x7A755A414C61746Ellu, // zu_Latn_ZA
- 0x833954524C61746Ellu, // zza_Latn_TR
+ 0x616145544C61746ELLU, // aa_Latn_ET
+ 0x616247454379726CLLU, // ab_Cyrl_GE
+ 0xC42047484C61746ELLU, // abr_Latn_GH
+ 0x904049444C61746ELLU, // ace_Latn_ID
+ 0x9C4055474C61746ELLU, // ach_Latn_UG
+ 0x806047484C61746ELLU, // ada_Latn_GH
+ 0xE06052554379726CLLU, // ady_Cyrl_RU
+ 0x6165495241767374LLU, // ae_Avst_IR
+ 0x8480544E41726162LLU, // aeb_Arab_TN
+ 0x61665A414C61746ELLU, // af_Latn_ZA
+ 0xC0C0434D4C61746ELLU, // agq_Latn_CM
+ 0xB8E0494E41686F6DLLU, // aho_Ahom_IN
+ 0x616B47484C61746ELLU, // ak_Latn_GH
+ 0xA940495158737578LLU, // akk_Xsux_IQ
+ 0xB560584B4C61746ELLU, // aln_Latn_XK
+ 0xCD6052554379726CLLU, // alt_Cyrl_RU
+ 0x616D455445746869LLU, // am_Ethi_ET
+ 0xB9804E474C61746ELLU, // amo_Latn_NG
+ 0xE5C049444C61746ELLU, // aoz_Latn_ID
+ 0x8DE0544741726162LLU, // apd_Arab_TG
+ 0x6172454741726162LLU, // ar_Arab_EG
+ 0x8A20495241726D69LLU, // arc_Armi_IR
+ 0x8A204A4F4E626174LLU, // arc_Nbat_JO
+ 0x8A20535950616C6DLLU, // arc_Palm_SY
+ 0xB620434C4C61746ELLU, // arn_Latn_CL
+ 0xBA20424F4C61746ELLU, // aro_Latn_BO
+ 0xC220445A41726162LLU, // arq_Arab_DZ
+ 0xE2204D4141726162LLU, // ary_Arab_MA
+ 0xE620454741726162LLU, // arz_Arab_EG
+ 0x6173494E42656E67LLU, // as_Beng_IN
+ 0x8240545A4C61746ELLU, // asa_Latn_TZ
+ 0x9240555353676E77LLU, // ase_Sgnw_US
+ 0xCE4045534C61746ELLU, // ast_Latn_ES
+ 0xA66043414C61746ELLU, // atj_Latn_CA
+ 0x617652554379726CLLU, // av_Cyrl_RU
+ 0x82C0494E44657661LLU, // awa_Deva_IN
+ 0x6179424F4C61746ELLU, // ay_Latn_BO
+ 0x617A495241726162LLU, // az_Arab_IR
+ 0x617A415A4C61746ELLU, // az_Latn_AZ
+ 0x626152554379726CLLU, // ba_Cyrl_RU
+ 0xAC01504B41726162LLU, // bal_Arab_PK
+ 0xB40149444C61746ELLU, // ban_Latn_ID
+ 0xBC014E5044657661LLU, // bap_Deva_NP
+ 0xC40141544C61746ELLU, // bar_Latn_AT
+ 0xC801434D4C61746ELLU, // bas_Latn_CM
+ 0xDC01434D42616D75LLU, // bax_Bamu_CM
+ 0x882149444C61746ELLU, // bbc_Latn_ID
+ 0xA421434D4C61746ELLU, // bbj_Latn_CM
+ 0xA04143494C61746ELLU, // bci_Latn_CI
+ 0x626542594379726CLLU, // be_Cyrl_BY
+ 0xA481534441726162LLU, // bej_Arab_SD
+ 0xB0815A4D4C61746ELLU, // bem_Latn_ZM
+ 0xD88149444C61746ELLU, // bew_Latn_ID
+ 0xE481545A4C61746ELLU, // bez_Latn_TZ
+ 0x8CA1434D4C61746ELLU, // bfd_Latn_CM
+ 0xC0A1494E54616D6CLLU, // bfq_Taml_IN
+ 0xCCA1504B41726162LLU, // bft_Arab_PK
+ 0xE0A1494E44657661LLU, // bfy_Deva_IN
+ 0x626742474379726CLLU, // bg_Cyrl_BG
+ 0x88C1494E44657661LLU, // bgc_Deva_IN
+ 0xB4C1504B41726162LLU, // bgn_Arab_PK
+ 0xDCC154524772656BLLU, // bgx_Grek_TR
+ 0x84E1494E44657661LLU, // bhb_Deva_IN
+ 0xA0E1494E44657661LLU, // bhi_Deva_IN
+ 0xA8E150484C61746ELLU, // bhk_Latn_PH
+ 0xB8E1494E44657661LLU, // bho_Deva_IN
+ 0x626956554C61746ELLU, // bi_Latn_VU
+ 0xA90150484C61746ELLU, // bik_Latn_PH
+ 0xB5014E474C61746ELLU, // bin_Latn_NG
+ 0xA521494E44657661LLU, // bjj_Deva_IN
+ 0xB52149444C61746ELLU, // bjn_Latn_ID
+ 0xB141434D4C61746ELLU, // bkm_Latn_CM
+ 0xD14150484C61746ELLU, // bku_Latn_PH
+ 0xCD61564E54617674LLU, // blt_Tavt_VN
+ 0x626D4D4C4C61746ELLU, // bm_Latn_ML
+ 0xC1814D4C4C61746ELLU, // bmq_Latn_ML
+ 0x626E424442656E67LLU, // bn_Beng_BD
+ 0x626F434E54696274LLU, // bo_Tibt_CN
+ 0xE1E1494E42656E67LLU, // bpy_Beng_IN
+ 0xA201495241726162LLU, // bqi_Arab_IR
+ 0xD60143494C61746ELLU, // bqv_Latn_CI
+ 0x627246524C61746ELLU, // br_Latn_FR
+ 0x8221494E44657661LLU, // bra_Deva_IN
+ 0x9E21504B41726162LLU, // brh_Arab_PK
+ 0xDE21494E44657661LLU, // brx_Deva_IN
+ 0x627342414C61746ELLU, // bs_Latn_BA
+ 0xC2414C5242617373LLU, // bsq_Bass_LR
+ 0xCA41434D4C61746ELLU, // bss_Latn_CM
+ 0xBA6150484C61746ELLU, // bto_Latn_PH
+ 0xD661504B44657661LLU, // btv_Deva_PK
+ 0x828152554379726CLLU, // bua_Cyrl_RU
+ 0x8A8159544C61746ELLU, // buc_Latn_YT
+ 0x9A8149444C61746ELLU, // bug_Latn_ID
+ 0xB281434D4C61746ELLU, // bum_Latn_CM
+ 0x86A147514C61746ELLU, // bvb_Latn_GQ
+ 0xB701455245746869LLU, // byn_Ethi_ER
+ 0xD701434D4C61746ELLU, // byv_Latn_CM
+ 0x93214D4C4C61746ELLU, // bze_Latn_ML
+ 0x636145534C61746ELLU, // ca_Latn_ES
+ 0x9C424E474C61746ELLU, // cch_Latn_NG
+ 0xBC42494E42656E67LLU, // ccp_Beng_IN
+ 0xBC42424443616B6DLLU, // ccp_Cakm_BD
+ 0x636552554379726CLLU, // ce_Cyrl_RU
+ 0x848250484C61746ELLU, // ceb_Latn_PH
+ 0x98C255474C61746ELLU, // cgg_Latn_UG
+ 0x636847554C61746ELLU, // ch_Latn_GU
+ 0xA8E2464D4C61746ELLU, // chk_Latn_FM
+ 0xB0E252554379726CLLU, // chm_Cyrl_RU
+ 0xB8E255534C61746ELLU, // cho_Latn_US
+ 0xBCE243414C61746ELLU, // chp_Latn_CA
+ 0xC4E2555343686572LLU, // chr_Cher_US
+ 0x81224B4841726162LLU, // cja_Arab_KH
+ 0xB122564E4368616DLLU, // cjm_Cham_VN
+ 0x8542495141726162LLU, // ckb_Arab_IQ
+ 0x636F46524C61746ELLU, // co_Latn_FR
+ 0xBDC24547436F7074LLU, // cop_Copt_EG
+ 0xC9E250484C61746ELLU, // cps_Latn_PH
+ 0x6372434143616E73LLU, // cr_Cans_CA
+ 0xA622434143616E73LLU, // crj_Cans_CA
+ 0xAA22434143616E73LLU, // crk_Cans_CA
+ 0xAE22434143616E73LLU, // crl_Cans_CA
+ 0xB222434143616E73LLU, // crm_Cans_CA
+ 0xCA2253434C61746ELLU, // crs_Latn_SC
+ 0x6373435A4C61746ELLU, // cs_Latn_CZ
+ 0x8642504C4C61746ELLU, // csb_Latn_PL
+ 0xDA42434143616E73LLU, // csw_Cans_CA
+ 0x8E624D4D50617563LLU, // ctd_Pauc_MM
+ 0x637552554379726CLLU, // cu_Cyrl_RU
+ 0x63754247476C6167LLU, // cu_Glag_BG
+ 0x637652554379726CLLU, // cv_Cyrl_RU
+ 0x637947424C61746ELLU, // cy_Latn_GB
+ 0x6461444B4C61746ELLU, // da_Latn_DK
+ 0xA80355534C61746ELLU, // dak_Latn_US
+ 0xC40352554379726CLLU, // dar_Cyrl_RU
+ 0xD4034B454C61746ELLU, // dav_Latn_KE
+ 0x8843494E41726162LLU, // dcc_Arab_IN
+ 0x646544454C61746ELLU, // de_Latn_DE
+ 0xB48343414C61746ELLU, // den_Latn_CA
+ 0xC4C343414C61746ELLU, // dgr_Latn_CA
+ 0x91234E454C61746ELLU, // dje_Latn_NE
+ 0xA5A343494C61746ELLU, // dnj_Latn_CI
+ 0xA1C3494E41726162LLU, // doi_Arab_IN
+ 0x864344454C61746ELLU, // dsb_Latn_DE
+ 0xB2634D4C4C61746ELLU, // dtm_Latn_ML
+ 0xBE634D594C61746ELLU, // dtp_Latn_MY
+ 0xE2634E5044657661LLU, // dty_Deva_NP
+ 0x8283434D4C61746ELLU, // dua_Latn_CM
+ 0x64764D5654686161LLU, // dv_Thaa_MV
+ 0xBB03534E4C61746ELLU, // dyo_Latn_SN
+ 0xD30342464C61746ELLU, // dyu_Latn_BF
+ 0x647A425454696274LLU, // dz_Tibt_BT
+ 0xD0244B454C61746ELLU, // ebu_Latn_KE
+ 0x656547484C61746ELLU, // ee_Latn_GH
+ 0xA0A44E474C61746ELLU, // efi_Latn_NG
+ 0xACC449544C61746ELLU, // egl_Latn_IT
+ 0xE0C4454745677970LLU, // egy_Egyp_EG
+ 0xE1444D4D4B616C69LLU, // eky_Kali_MM
+ 0x656C47524772656BLLU, // el_Grek_GR
+ 0x656E47424C61746ELLU, // en_Latn_GB
+ 0x656E55534C61746ELLU, // en_Latn_US
+ 0x656E474253686177LLU, // en_Shaw_GB
+ 0x657345534C61746ELLU, // es_Latn_ES
+ 0x65734D584C61746ELLU, // es_Latn_MX
+ 0x657355534C61746ELLU, // es_Latn_US
+ 0xD24455534C61746ELLU, // esu_Latn_US
+ 0x657445454C61746ELLU, // et_Latn_EE
+ 0xCE6449544974616CLLU, // ett_Ital_IT
+ 0x657545534C61746ELLU, // eu_Latn_ES
+ 0xBAC4434D4C61746ELLU, // ewo_Latn_CM
+ 0xCEE445534C61746ELLU, // ext_Latn_ES
+ 0x6661495241726162LLU, // fa_Arab_IR
+ 0xB40547514C61746ELLU, // fan_Latn_GQ
+ 0x6666474E41646C6DLLU, // ff_Adlm_GN
+ 0x6666534E4C61746ELLU, // ff_Latn_SN
+ 0xB0A54D4C4C61746ELLU, // ffm_Latn_ML
+ 0x666946494C61746ELLU, // fi_Latn_FI
+ 0x8105534441726162LLU, // fia_Arab_SD
+ 0xAD0550484C61746ELLU, // fil_Latn_PH
+ 0xCD0553454C61746ELLU, // fit_Latn_SE
+ 0x666A464A4C61746ELLU, // fj_Latn_FJ
+ 0x666F464F4C61746ELLU, // fo_Latn_FO
+ 0xB5C5424A4C61746ELLU, // fon_Latn_BJ
+ 0x667246524C61746ELLU, // fr_Latn_FR
+ 0x8A2555534C61746ELLU, // frc_Latn_US
+ 0xBE2546524C61746ELLU, // frp_Latn_FR
+ 0xC62544454C61746ELLU, // frr_Latn_DE
+ 0xCA2544454C61746ELLU, // frs_Latn_DE
+ 0x8685434D41726162LLU, // fub_Arab_CM
+ 0x8E8557464C61746ELLU, // fud_Latn_WF
+ 0x9685474E4C61746ELLU, // fuf_Latn_GN
+ 0xC2854E454C61746ELLU, // fuq_Latn_NE
+ 0xC68549544C61746ELLU, // fur_Latn_IT
+ 0xD6854E474C61746ELLU, // fuv_Latn_NG
+ 0xC6A553444C61746ELLU, // fvr_Latn_SD
+ 0x66794E4C4C61746ELLU, // fy_Latn_NL
+ 0x676149454C61746ELLU, // ga_Latn_IE
+ 0x800647484C61746ELLU, // gaa_Latn_GH
+ 0x98064D444C61746ELLU, // gag_Latn_MD
+ 0xB406434E48616E73LLU, // gan_Hans_CN
+ 0xE00649444C61746ELLU, // gay_Latn_ID
+ 0xB026494E44657661LLU, // gbm_Deva_IN
+ 0xE426495241726162LLU, // gbz_Arab_IR
+ 0xC44647464C61746ELLU, // gcr_Latn_GF
+ 0x676447424C61746ELLU, // gd_Latn_GB
+ 0xE486455445746869LLU, // gez_Ethi_ET
+ 0xB4C64E5044657661LLU, // ggn_Deva_NP
+ 0xAD064B494C61746ELLU, // gil_Latn_KI
+ 0xA926504B41726162LLU, // gjk_Arab_PK
+ 0xD126504B41726162LLU, // gju_Arab_PK
+ 0x676C45534C61746ELLU, // gl_Latn_ES
+ 0xA966495241726162LLU, // glk_Arab_IR
+ 0x676E50594C61746ELLU, // gn_Latn_PY
+ 0xB1C6494E44657661LLU, // gom_Deva_IN
+ 0xB5C6494E54656C75LLU, // gon_Telu_IN
+ 0xC5C649444C61746ELLU, // gor_Latn_ID
+ 0xC9C64E4C4C61746ELLU, // gos_Latn_NL
+ 0xCDC65541476F7468LLU, // got_Goth_UA
+ 0x8A26435943707274LLU, // grc_Cprt_CY
+ 0x8A2647524C696E62LLU, // grc_Linb_GR
+ 0xCE26494E42656E67LLU, // grt_Beng_IN
+ 0xDA4643484C61746ELLU, // gsw_Latn_CH
+ 0x6775494E47756A72LLU, // gu_Gujr_IN
+ 0x868642524C61746ELLU, // gub_Latn_BR
+ 0x8A86434F4C61746ELLU, // guc_Latn_CO
+ 0xC68647484C61746ELLU, // gur_Latn_GH
+ 0xE6864B454C61746ELLU, // guz_Latn_KE
+ 0x6776494D4C61746ELLU, // gv_Latn_IM
+ 0xC6A64E5044657661LLU, // gvr_Deva_NP
+ 0xA2C643414C61746ELLU, // gwi_Latn_CA
+ 0x68614E474C61746ELLU, // ha_Latn_NG
+ 0xA807434E48616E73LLU, // hak_Hans_CN
+ 0xD80755534C61746ELLU, // haw_Latn_US
+ 0xE407414641726162LLU, // haz_Arab_AF
+ 0x6865494C48656272LLU, // he_Hebr_IL
+ 0x6869494E44657661LLU, // hi_Deva_IN
+ 0x9507464A4C61746ELLU, // hif_Latn_FJ
+ 0xAD0750484C61746ELLU, // hil_Latn_PH
+ 0xD1675452486C7577LLU, // hlu_Hluw_TR
+ 0x8D87434E506C7264LLU, // hmd_Plrd_CN
+ 0x8DA7504B41726162LLU, // hnd_Arab_PK
+ 0x91A7494E44657661LLU, // hne_Deva_IN
+ 0xA5A74C41486D6E67LLU, // hnj_Hmng_LA
+ 0xB5A750484C61746ELLU, // hnn_Latn_PH
+ 0xB9A7504B41726162LLU, // hno_Arab_PK
+ 0x686F50474C61746ELLU, // ho_Latn_PG
+ 0x89C7494E44657661LLU, // hoc_Deva_IN
+ 0xA5C7494E44657661LLU, // hoj_Deva_IN
+ 0x687248524C61746ELLU, // hr_Latn_HR
+ 0x864744454C61746ELLU, // hsb_Latn_DE
+ 0xB647434E48616E73LLU, // hsn_Hans_CN
+ 0x687448544C61746ELLU, // ht_Latn_HT
+ 0x687548554C61746ELLU, // hu_Latn_HU
+ 0x6879414D41726D6ELLU, // hy_Armn_AM
+ 0x687A4E414C61746ELLU, // hz_Latn_NA
+ 0x696146524C61746ELLU, // ia_Latn_FR
+ 0x80284D594C61746ELLU, // iba_Latn_MY
+ 0x84284E474C61746ELLU, // ibb_Latn_NG
+ 0x696449444C61746ELLU, // id_Latn_ID
+ 0x69674E474C61746ELLU, // ig_Latn_NG
+ 0x6969434E59696969LLU, // ii_Yiii_CN
+ 0x696B55534C61746ELLU, // ik_Latn_US
+ 0xCD4843414C61746ELLU, // ikt_Latn_CA
+ 0xB96850484C61746ELLU, // ilo_Latn_PH
+ 0x696E49444C61746ELLU, // in_Latn_ID
+ 0x9DA852554379726CLLU, // inh_Cyrl_RU
+ 0x697349534C61746ELLU, // is_Latn_IS
+ 0x697449544C61746ELLU, // it_Latn_IT
+ 0x6975434143616E73LLU, // iu_Cans_CA
+ 0x6977494C48656272LLU, // iw_Hebr_IL
+ 0x9F2852554C61746ELLU, // izh_Latn_RU
+ 0x6A614A504A70616ELLU, // ja_Jpan_JP
+ 0xB0094A4D4C61746ELLU, // jam_Latn_JM
+ 0xB8C9434D4C61746ELLU, // jgo_Latn_CM
+ 0x8989545A4C61746ELLU, // jmc_Latn_TZ
+ 0xAD894E5044657661LLU, // jml_Deva_NP
+ 0xCE89444B4C61746ELLU, // jut_Latn_DK
+ 0x6A7649444C61746ELLU, // jv_Latn_ID
+ 0x6A7749444C61746ELLU, // jw_Latn_ID
+ 0x6B61474547656F72LLU, // ka_Geor_GE
+ 0x800A555A4379726CLLU, // kaa_Cyrl_UZ
+ 0x840A445A4C61746ELLU, // kab_Latn_DZ
+ 0x880A4D4D4C61746ELLU, // kac_Latn_MM
+ 0xA40A4E474C61746ELLU, // kaj_Latn_NG
+ 0xB00A4B454C61746ELLU, // kam_Latn_KE
+ 0xB80A4D4C4C61746ELLU, // kao_Latn_ML
+ 0x8C2A52554379726CLLU, // kbd_Cyrl_RU
+ 0xE02A4E4541726162LLU, // kby_Arab_NE
+ 0x984A4E474C61746ELLU, // kcg_Latn_NG
+ 0xA84A5A574C61746ELLU, // kck_Latn_ZW
+ 0x906A545A4C61746ELLU, // kde_Latn_TZ
+ 0x9C6A544741726162LLU, // kdh_Arab_TG
+ 0xCC6A544854686169LLU, // kdt_Thai_TH
+ 0x808A43564C61746ELLU, // kea_Latn_CV
+ 0xB48A434D4C61746ELLU, // ken_Latn_CM
+ 0xB8AA43494C61746ELLU, // kfo_Latn_CI
+ 0xC4AA494E44657661LLU, // kfr_Deva_IN
+ 0xE0AA494E44657661LLU, // kfy_Deva_IN
+ 0x6B6743444C61746ELLU, // kg_Latn_CD
+ 0x90CA49444C61746ELLU, // kge_Latn_ID
+ 0xBCCA42524C61746ELLU, // kgp_Latn_BR
+ 0x80EA494E4C61746ELLU, // kha_Latn_IN
+ 0x84EA434E54616C75LLU, // khb_Talu_CN
+ 0xB4EA494E44657661LLU, // khn_Deva_IN
+ 0xC0EA4D4C4C61746ELLU, // khq_Latn_ML
+ 0xCCEA494E4D796D72LLU, // kht_Mymr_IN
+ 0xD8EA504B41726162LLU, // khw_Arab_PK
+ 0x6B694B454C61746ELLU, // ki_Latn_KE
+ 0xD10A54524C61746ELLU, // kiu_Latn_TR
+ 0x6B6A4E414C61746ELLU, // kj_Latn_NA
+ 0x992A4C414C616F6FLLU, // kjg_Laoo_LA
+ 0x6B6B434E41726162LLU, // kk_Arab_CN
+ 0x6B6B4B5A4379726CLLU, // kk_Cyrl_KZ
+ 0xA54A434D4C61746ELLU, // kkj_Latn_CM
+ 0x6B6C474C4C61746ELLU, // kl_Latn_GL
+ 0xB56A4B454C61746ELLU, // kln_Latn_KE
+ 0x6B6D4B484B686D72LLU, // km_Khmr_KH
+ 0x858A414F4C61746ELLU, // kmb_Latn_AO
+ 0x6B6E494E4B6E6461LLU, // kn_Knda_IN
+ 0x6B6F4B524B6F7265LLU, // ko_Kore_KR
+ 0xA1CA52554379726CLLU, // koi_Cyrl_RU
+ 0xA9CA494E44657661LLU, // kok_Deva_IN
+ 0xC9CA464D4C61746ELLU, // kos_Latn_FM
+ 0x91EA4C524C61746ELLU, // kpe_Latn_LR
+ 0x8A2A52554379726CLLU, // krc_Cyrl_RU
+ 0xA22A534C4C61746ELLU, // kri_Latn_SL
+ 0xA62A50484C61746ELLU, // krj_Latn_PH
+ 0xAE2A52554C61746ELLU, // krl_Latn_RU
+ 0xD22A494E44657661LLU, // kru_Deva_IN
+ 0x6B73494E41726162LLU, // ks_Arab_IN
+ 0x864A545A4C61746ELLU, // ksb_Latn_TZ
+ 0x964A434D4C61746ELLU, // ksf_Latn_CM
+ 0x9E4A44454C61746ELLU, // ksh_Latn_DE
+ 0x6B75495141726162LLU, // ku_Arab_IQ
+ 0x6B7554524C61746ELLU, // ku_Latn_TR
+ 0xB28A52554379726CLLU, // kum_Cyrl_RU
+ 0x6B7652554379726CLLU, // kv_Cyrl_RU
+ 0xC6AA49444C61746ELLU, // kvr_Latn_ID
+ 0xDEAA504B41726162LLU, // kvx_Arab_PK
+ 0x6B7747424C61746ELLU, // kw_Latn_GB
+ 0xB2EA544854686169LLU, // kxm_Thai_TH
+ 0xBEEA504B41726162LLU, // kxp_Arab_PK
+ 0x6B79434E41726162LLU, // ky_Arab_CN
+ 0x6B794B474379726CLLU, // ky_Cyrl_KG
+ 0x6B7954524C61746ELLU, // ky_Latn_TR
+ 0x6C6156414C61746ELLU, // la_Latn_VA
+ 0x840B47524C696E61LLU, // lab_Lina_GR
+ 0x8C0B494C48656272LLU, // lad_Hebr_IL
+ 0x980B545A4C61746ELLU, // lag_Latn_TZ
+ 0x9C0B504B41726162LLU, // lah_Arab_PK
+ 0xA40B55474C61746ELLU, // laj_Latn_UG
+ 0x6C624C554C61746ELLU, // lb_Latn_LU
+ 0x902B52554379726CLLU, // lbe_Cyrl_RU
+ 0xD82B49444C61746ELLU, // lbw_Latn_ID
+ 0xBC4B434E54686169LLU, // lcp_Thai_CN
+ 0xBC8B494E4C657063LLU, // lep_Lepc_IN
+ 0xE48B52554379726CLLU, // lez_Cyrl_RU
+ 0x6C6755474C61746ELLU, // lg_Latn_UG
+ 0x6C694E4C4C61746ELLU, // li_Latn_NL
+ 0x950B4E5044657661LLU, // lif_Deva_NP
+ 0x950B494E4C696D62LLU, // lif_Limb_IN
+ 0xA50B49544C61746ELLU, // lij_Latn_IT
+ 0xC90B434E4C697375LLU, // lis_Lisu_CN
+ 0xBD2B49444C61746ELLU, // ljp_Latn_ID
+ 0xA14B495241726162LLU, // lki_Arab_IR
+ 0xCD4B55534C61746ELLU, // lkt_Latn_US
+ 0xB58B494E54656C75LLU, // lmn_Telu_IN
+ 0xB98B49544C61746ELLU, // lmo_Latn_IT
+ 0x6C6E43444C61746ELLU, // ln_Latn_CD
+ 0x6C6F4C414C616F6FLLU, // lo_Laoo_LA
+ 0xADCB43444C61746ELLU, // lol_Latn_CD
+ 0xE5CB5A4D4C61746ELLU, // loz_Latn_ZM
+ 0x8A2B495241726162LLU, // lrc_Arab_IR
+ 0x6C744C544C61746ELLU, // lt_Latn_LT
+ 0x9A6B4C564C61746ELLU, // ltg_Latn_LV
+ 0x6C7543444C61746ELLU, // lu_Latn_CD
+ 0x828B43444C61746ELLU, // lua_Latn_CD
+ 0xBA8B4B454C61746ELLU, // luo_Latn_KE
+ 0xE28B4B454C61746ELLU, // luy_Latn_KE
+ 0xE68B495241726162LLU, // luz_Arab_IR
+ 0x6C764C564C61746ELLU, // lv_Latn_LV
+ 0xAECB544854686169LLU, // lwl_Thai_TH
+ 0x9F2B434E48616E73LLU, // lzh_Hans_CN
+ 0xE72B54524C61746ELLU, // lzz_Latn_TR
+ 0x8C0C49444C61746ELLU, // mad_Latn_ID
+ 0x940C434D4C61746ELLU, // maf_Latn_CM
+ 0x980C494E44657661LLU, // mag_Deva_IN
+ 0xA00C494E44657661LLU, // mai_Deva_IN
+ 0xA80C49444C61746ELLU, // mak_Latn_ID
+ 0xB40C474D4C61746ELLU, // man_Latn_GM
+ 0xB40C474E4E6B6F6FLLU, // man_Nkoo_GN
+ 0xC80C4B454C61746ELLU, // mas_Latn_KE
+ 0xE40C4D584C61746ELLU, // maz_Latn_MX
+ 0x946C52554379726CLLU, // mdf_Cyrl_RU
+ 0x9C6C50484C61746ELLU, // mdh_Latn_PH
+ 0xC46C49444C61746ELLU, // mdr_Latn_ID
+ 0xB48C534C4C61746ELLU, // men_Latn_SL
+ 0xC48C4B454C61746ELLU, // mer_Latn_KE
+ 0x80AC544841726162LLU, // mfa_Arab_TH
+ 0x90AC4D554C61746ELLU, // mfe_Latn_MU
+ 0x6D674D474C61746ELLU, // mg_Latn_MG
+ 0x9CCC4D5A4C61746ELLU, // mgh_Latn_MZ
+ 0xB8CC434D4C61746ELLU, // mgo_Latn_CM
+ 0xBCCC4E5044657661LLU, // mgp_Deva_NP
+ 0xE0CC545A4C61746ELLU, // mgy_Latn_TZ
+ 0x6D684D484C61746ELLU, // mh_Latn_MH
+ 0x6D694E5A4C61746ELLU, // mi_Latn_NZ
+ 0xB50C49444C61746ELLU, // min_Latn_ID
+ 0xC90C495148617472LLU, // mis_Hatr_IQ
+ 0x6D6B4D4B4379726CLLU, // mk_Cyrl_MK
+ 0x6D6C494E4D6C796DLLU, // ml_Mlym_IN
+ 0xC96C53444C61746ELLU, // mls_Latn_SD
+ 0x6D6E4D4E4379726CLLU, // mn_Cyrl_MN
+ 0x6D6E434E4D6F6E67LLU, // mn_Mong_CN
+ 0xA1AC494E42656E67LLU, // mni_Beng_IN
+ 0xD9AC4D4D4D796D72LLU, // mnw_Mymr_MM
+ 0x91CC43414C61746ELLU, // moe_Latn_CA
+ 0x9DCC43414C61746ELLU, // moh_Latn_CA
+ 0xC9CC42464C61746ELLU, // mos_Latn_BF
+ 0x6D72494E44657661LLU, // mr_Deva_IN
+ 0x8E2C4E5044657661LLU, // mrd_Deva_NP
+ 0xA62C52554379726CLLU, // mrj_Cyrl_RU
+ 0xBA2C42444D726F6FLLU, // mro_Mroo_BD
+ 0x6D734D594C61746ELLU, // ms_Latn_MY
+ 0x6D744D544C61746ELLU, // mt_Latn_MT
+ 0xC66C494E44657661LLU, // mtr_Deva_IN
+ 0x828C434D4C61746ELLU, // mua_Latn_CM
+ 0xCA8C55534C61746ELLU, // mus_Latn_US
+ 0xE2AC504B41726162LLU, // mvy_Arab_PK
+ 0xAACC4D4C4C61746ELLU, // mwk_Latn_ML
+ 0xC6CC494E44657661LLU, // mwr_Deva_IN
+ 0xD6CC49444C61746ELLU, // mwv_Latn_ID
+ 0x8AEC5A574C61746ELLU, // mxc_Latn_ZW
+ 0x6D794D4D4D796D72LLU, // my_Mymr_MM
+ 0xD70C52554379726CLLU, // myv_Cyrl_RU
+ 0xDF0C55474C61746ELLU, // myx_Latn_UG
+ 0xE70C49524D616E64LLU, // myz_Mand_IR
+ 0xB72C495241726162LLU, // mzn_Arab_IR
+ 0x6E614E524C61746ELLU, // na_Latn_NR
+ 0xB40D434E48616E73LLU, // nan_Hans_CN
+ 0xBC0D49544C61746ELLU, // nap_Latn_IT
+ 0xC00D4E414C61746ELLU, // naq_Latn_NA
+ 0x6E624E4F4C61746ELLU, // nb_Latn_NO
+ 0x9C4D4D584C61746ELLU, // nch_Latn_MX
+ 0x6E645A574C61746ELLU, // nd_Latn_ZW
+ 0x886D4D5A4C61746ELLU, // ndc_Latn_MZ
+ 0xC86D44454C61746ELLU, // nds_Latn_DE
+ 0x6E654E5044657661LLU, // ne_Deva_NP
+ 0xD88D4E5044657661LLU, // new_Deva_NP
+ 0x6E674E414C61746ELLU, // ng_Latn_NA
+ 0xACCD4D5A4C61746ELLU, // ngl_Latn_MZ
+ 0x90ED4D584C61746ELLU, // nhe_Latn_MX
+ 0xD8ED4D584C61746ELLU, // nhw_Latn_MX
+ 0xA50D49444C61746ELLU, // nij_Latn_ID
+ 0xD10D4E554C61746ELLU, // niu_Latn_NU
+ 0xB92D494E4C61746ELLU, // njo_Latn_IN
+ 0x6E6C4E4C4C61746ELLU, // nl_Latn_NL
+ 0x998D434D4C61746ELLU, // nmg_Latn_CM
+ 0x6E6E4E4F4C61746ELLU, // nn_Latn_NO
+ 0x9DAD434D4C61746ELLU, // nnh_Latn_CM
+ 0x6E6F4E4F4C61746ELLU, // no_Latn_NO
+ 0x8DCD54484C616E61LLU, // nod_Lana_TH
+ 0x91CD494E44657661LLU, // noe_Deva_IN
+ 0xB5CD534552756E72LLU, // non_Runr_SE
+ 0xBA0D474E4E6B6F6FLLU, // nqo_Nkoo_GN
+ 0x6E725A414C61746ELLU, // nr_Latn_ZA
+ 0xAA4D434143616E73LLU, // nsk_Cans_CA
+ 0xBA4D5A414C61746ELLU, // nso_Latn_ZA
+ 0xCA8D53534C61746ELLU, // nus_Latn_SS
+ 0x6E7655534C61746ELLU, // nv_Latn_US
+ 0xC2ED434E4C61746ELLU, // nxq_Latn_CN
+ 0x6E794D574C61746ELLU, // ny_Latn_MW
+ 0xB30D545A4C61746ELLU, // nym_Latn_TZ
+ 0xB70D55474C61746ELLU, // nyn_Latn_UG
+ 0xA32D47484C61746ELLU, // nzi_Latn_GH
+ 0x6F6346524C61746ELLU, // oc_Latn_FR
+ 0x6F6D45544C61746ELLU, // om_Latn_ET
+ 0x6F72494E4F727961LLU, // or_Orya_IN
+ 0x6F7347454379726CLLU, // os_Cyrl_GE
+ 0x824E55534F736765LLU, // osa_Osge_US
+ 0xAA6E4D4E4F726B68LLU, // otk_Orkh_MN
+ 0x7061504B41726162LLU, // pa_Arab_PK
+ 0x7061494E47757275LLU, // pa_Guru_IN
+ 0x980F50484C61746ELLU, // pag_Latn_PH
+ 0xAC0F495250686C69LLU, // pal_Phli_IR
+ 0xAC0F434E50686C70LLU, // pal_Phlp_CN
+ 0xB00F50484C61746ELLU, // pam_Latn_PH
+ 0xBC0F41574C61746ELLU, // pap_Latn_AW
+ 0xD00F50574C61746ELLU, // pau_Latn_PW
+ 0x8C4F46524C61746ELLU, // pcd_Latn_FR
+ 0xB04F4E474C61746ELLU, // pcm_Latn_NG
+ 0x886F55534C61746ELLU, // pdc_Latn_US
+ 0xCC6F43414C61746ELLU, // pdt_Latn_CA
+ 0xB88F49525870656FLLU, // peo_Xpeo_IR
+ 0xACAF44454C61746ELLU, // pfl_Latn_DE
+ 0xB4EF4C4250686E78LLU, // phn_Phnx_LB
+ 0x814F494E42726168LLU, // pka_Brah_IN
+ 0xB94F4B454C61746ELLU, // pko_Latn_KE
+ 0x706C504C4C61746ELLU, // pl_Latn_PL
+ 0xC98F49544C61746ELLU, // pms_Latn_IT
+ 0xCDAF47524772656BLLU, // pnt_Grek_GR
+ 0xB5CF464D4C61746ELLU, // pon_Latn_FM
+ 0x822F504B4B686172LLU, // pra_Khar_PK
+ 0x8E2F495241726162LLU, // prd_Arab_IR
+ 0x7073414641726162LLU, // ps_Arab_AF
+ 0x707442524C61746ELLU, // pt_Latn_BR
+ 0xD28F47414C61746ELLU, // puu_Latn_GA
+ 0x717550454C61746ELLU, // qu_Latn_PE
+ 0x8A9047544C61746ELLU, // quc_Latn_GT
+ 0x9A9045434C61746ELLU, // qug_Latn_EC
+ 0xA411494E44657661LLU, // raj_Deva_IN
+ 0x945152454C61746ELLU, // rcf_Latn_RE
+ 0xA49149444C61746ELLU, // rej_Latn_ID
+ 0xB4D149544C61746ELLU, // rgn_Latn_IT
+ 0x8111494E4C61746ELLU, // ria_Latn_IN
+ 0x95114D4154666E67LLU, // rif_Tfng_MA
+ 0xC9314E5044657661LLU, // rjs_Deva_NP
+ 0xCD51424442656E67LLU, // rkt_Beng_BD
+ 0x726D43484C61746ELLU, // rm_Latn_CH
+ 0x959146494C61746ELLU, // rmf_Latn_FI
+ 0xB99143484C61746ELLU, // rmo_Latn_CH
+ 0xCD91495241726162LLU, // rmt_Arab_IR
+ 0xD19153454C61746ELLU, // rmu_Latn_SE
+ 0x726E42494C61746ELLU, // rn_Latn_BI
+ 0x99B14D5A4C61746ELLU, // rng_Latn_MZ
+ 0x726F524F4C61746ELLU, // ro_Latn_RO
+ 0x85D149444C61746ELLU, // rob_Latn_ID
+ 0x95D1545A4C61746ELLU, // rof_Latn_TZ
+ 0xB271464A4C61746ELLU, // rtm_Latn_FJ
+ 0x727552554379726CLLU, // ru_Cyrl_RU
+ 0x929155414379726CLLU, // rue_Cyrl_UA
+ 0x9A9153424C61746ELLU, // rug_Latn_SB
+ 0x727752574C61746ELLU, // rw_Latn_RW
+ 0xAAD1545A4C61746ELLU, // rwk_Latn_TZ
+ 0xD3114A504B616E61LLU, // ryu_Kana_JP
+ 0x7361494E44657661LLU, // sa_Deva_IN
+ 0x941247484C61746ELLU, // saf_Latn_GH
+ 0x9C1252554379726CLLU, // sah_Cyrl_RU
+ 0xC0124B454C61746ELLU, // saq_Latn_KE
+ 0xC81249444C61746ELLU, // sas_Latn_ID
+ 0xCC12494E4C61746ELLU, // sat_Latn_IN
+ 0xE412494E53617572LLU, // saz_Saur_IN
+ 0xBC32545A4C61746ELLU, // sbp_Latn_TZ
+ 0x736349544C61746ELLU, // sc_Latn_IT
+ 0xA852494E44657661LLU, // sck_Deva_IN
+ 0xB45249544C61746ELLU, // scn_Latn_IT
+ 0xB85247424C61746ELLU, // sco_Latn_GB
+ 0xC85243414C61746ELLU, // scs_Latn_CA
+ 0x7364504B41726162LLU, // sd_Arab_PK
+ 0x7364494E44657661LLU, // sd_Deva_IN
+ 0x7364494E4B686F6ALLU, // sd_Khoj_IN
+ 0x7364494E53696E64LLU, // sd_Sind_IN
+ 0x887249544C61746ELLU, // sdc_Latn_IT
+ 0x9C72495241726162LLU, // sdh_Arab_IR
+ 0x73654E4F4C61746ELLU, // se_Latn_NO
+ 0x949243494C61746ELLU, // sef_Latn_CI
+ 0x9C924D5A4C61746ELLU, // seh_Latn_MZ
+ 0xA0924D584C61746ELLU, // sei_Latn_MX
+ 0xC8924D4C4C61746ELLU, // ses_Latn_ML
+ 0x736743464C61746ELLU, // sg_Latn_CF
+ 0x80D249454F67616DLLU, // sga_Ogam_IE
+ 0xC8D24C544C61746ELLU, // sgs_Latn_LT
+ 0xA0F24D4154666E67LLU, // shi_Tfng_MA
+ 0xB4F24D4D4D796D72LLU, // shn_Mymr_MM
+ 0x73694C4B53696E68LLU, // si_Sinh_LK
+ 0x8D1245544C61746ELLU, // sid_Latn_ET
+ 0x736B534B4C61746ELLU, // sk_Latn_SK
+ 0xC552504B41726162LLU, // skr_Arab_PK
+ 0x736C53494C61746ELLU, // sl_Latn_SI
+ 0xA172504C4C61746ELLU, // sli_Latn_PL
+ 0xE17249444C61746ELLU, // sly_Latn_ID
+ 0x736D57534C61746ELLU, // sm_Latn_WS
+ 0x819253454C61746ELLU, // sma_Latn_SE
+ 0xA59253454C61746ELLU, // smj_Latn_SE
+ 0xB59246494C61746ELLU, // smn_Latn_FI
+ 0xBD92494C53616D72LLU, // smp_Samr_IL
+ 0xC99246494C61746ELLU, // sms_Latn_FI
+ 0x736E5A574C61746ELLU, // sn_Latn_ZW
+ 0xA9B24D4C4C61746ELLU, // snk_Latn_ML
+ 0x736F534F4C61746ELLU, // so_Latn_SO
+ 0xD1D2544854686169LLU, // sou_Thai_TH
+ 0x7371414C4C61746ELLU, // sq_Latn_AL
+ 0x737252534379726CLLU, // sr_Cyrl_RS
+ 0x737252534C61746ELLU, // sr_Latn_RS
+ 0x8632494E536F7261LLU, // srb_Sora_IN
+ 0xB63253524C61746ELLU, // srn_Latn_SR
+ 0xC632534E4C61746ELLU, // srr_Latn_SN
+ 0xDE32494E44657661LLU, // srx_Deva_IN
+ 0x73735A414C61746ELLU, // ss_Latn_ZA
+ 0xE25245524C61746ELLU, // ssy_Latn_ER
+ 0x73745A414C61746ELLU, // st_Latn_ZA
+ 0xC27244454C61746ELLU, // stq_Latn_DE
+ 0x737549444C61746ELLU, // su_Latn_ID
+ 0xAA92545A4C61746ELLU, // suk_Latn_TZ
+ 0xCA92474E4C61746ELLU, // sus_Latn_GN
+ 0x737653454C61746ELLU, // sv_Latn_SE
+ 0x7377545A4C61746ELLU, // sw_Latn_TZ
+ 0x86D2595441726162LLU, // swb_Arab_YT
+ 0x8AD243444C61746ELLU, // swc_Latn_CD
+ 0x9AD244454C61746ELLU, // swg_Latn_DE
+ 0xD6D2494E44657661LLU, // swv_Deva_IN
+ 0xB6F249444C61746ELLU, // sxn_Latn_ID
+ 0xAF12424442656E67LLU, // syl_Beng_BD
+ 0xC712495153797263LLU, // syr_Syrc_IQ
+ 0xAF32504C4C61746ELLU, // szl_Latn_PL
+ 0x7461494E54616D6CLLU, // ta_Taml_IN
+ 0xA4134E5044657661LLU, // taj_Deva_NP
+ 0xD83350484C61746ELLU, // tbw_Latn_PH
+ 0xE053494E4B6E6461LLU, // tcy_Knda_IN
+ 0x8C73434E54616C65LLU, // tdd_Tale_CN
+ 0x98734E5044657661LLU, // tdg_Deva_NP
+ 0x9C734E5044657661LLU, // tdh_Deva_NP
+ 0x7465494E54656C75LLU, // te_Telu_IN
+ 0xB093534C4C61746ELLU, // tem_Latn_SL
+ 0xB89355474C61746ELLU, // teo_Latn_UG
+ 0xCC93544C4C61746ELLU, // tet_Latn_TL
+ 0x7467504B41726162LLU, // tg_Arab_PK
+ 0x7467544A4379726CLLU, // tg_Cyrl_TJ
+ 0x7468544854686169LLU, // th_Thai_TH
+ 0xACF34E5044657661LLU, // thl_Deva_NP
+ 0xC0F34E5044657661LLU, // thq_Deva_NP
+ 0xC4F34E5044657661LLU, // thr_Deva_NP
+ 0x7469455445746869LLU, // ti_Ethi_ET
+ 0x9913455245746869LLU, // tig_Ethi_ER
+ 0xD5134E474C61746ELLU, // tiv_Latn_NG
+ 0x746B544D4C61746ELLU, // tk_Latn_TM
+ 0xAD53544B4C61746ELLU, // tkl_Latn_TK
+ 0xC553415A4C61746ELLU, // tkr_Latn_AZ
+ 0xCD534E5044657661LLU, // tkt_Deva_NP
+ 0x746C50484C61746ELLU, // tl_Latn_PH
+ 0xE173415A4C61746ELLU, // tly_Latn_AZ
+ 0x9D934E454C61746ELLU, // tmh_Latn_NE
+ 0x746E5A414C61746ELLU, // tn_Latn_ZA
+ 0x746F544F4C61746ELLU, // to_Latn_TO
+ 0x99D34D574C61746ELLU, // tog_Latn_MW
+ 0xA1F350474C61746ELLU, // tpi_Latn_PG
+ 0x747254524C61746ELLU, // tr_Latn_TR
+ 0xD23354524C61746ELLU, // tru_Latn_TR
+ 0xD63354574C61746ELLU, // trv_Latn_TW
+ 0x74735A414C61746ELLU, // ts_Latn_ZA
+ 0x8E5347524772656BLLU, // tsd_Grek_GR
+ 0x96534E5044657661LLU, // tsf_Deva_NP
+ 0x9A5350484C61746ELLU, // tsg_Latn_PH
+ 0xA653425454696274LLU, // tsj_Tibt_BT
+ 0x747452554379726CLLU, // tt_Cyrl_RU
+ 0xA67355474C61746ELLU, // ttj_Latn_UG
+ 0xCA73544854686169LLU, // tts_Thai_TH
+ 0xCE73415A4C61746ELLU, // ttt_Latn_AZ
+ 0xB2934D574C61746ELLU, // tum_Latn_MW
+ 0xAEB354564C61746ELLU, // tvl_Latn_TV
+ 0xC2D34E454C61746ELLU, // twq_Latn_NE
+ 0x9AF3434E54616E67LLU, // txg_Tang_CN
+ 0x747950464C61746ELLU, // ty_Latn_PF
+ 0xD71352554379726CLLU, // tyv_Cyrl_RU
+ 0xB3334D414C61746ELLU, // tzm_Latn_MA
+ 0xB07452554379726CLLU, // udm_Cyrl_RU
+ 0x7567434E41726162LLU, // ug_Arab_CN
+ 0x75674B5A4379726CLLU, // ug_Cyrl_KZ
+ 0x80D4535955676172LLU, // uga_Ugar_SY
+ 0x756B55414379726CLLU, // uk_Cyrl_UA
+ 0xA174464D4C61746ELLU, // uli_Latn_FM
+ 0x8594414F4C61746ELLU, // umb_Latn_AO
+ 0xC5B4494E42656E67LLU, // unr_Beng_IN
+ 0xC5B44E5044657661LLU, // unr_Deva_NP
+ 0xDDB4494E42656E67LLU, // unx_Beng_IN
+ 0x7572504B41726162LLU, // ur_Arab_PK
+ 0x757A414641726162LLU, // uz_Arab_AF
+ 0x757A555A4C61746ELLU, // uz_Latn_UZ
+ 0xA0154C5256616969LLU, // vai_Vaii_LR
+ 0x76655A414C61746ELLU, // ve_Latn_ZA
+ 0x889549544C61746ELLU, // vec_Latn_IT
+ 0xBC9552554C61746ELLU, // vep_Latn_RU
+ 0x7669564E4C61746ELLU, // vi_Latn_VN
+ 0x891553584C61746ELLU, // vic_Latn_SX
+ 0xC97542454C61746ELLU, // vls_Latn_BE
+ 0x959544454C61746ELLU, // vmf_Latn_DE
+ 0xD9954D5A4C61746ELLU, // vmw_Latn_MZ
+ 0xCDD552554C61746ELLU, // vot_Latn_RU
+ 0xBA3545454C61746ELLU, // vro_Latn_EE
+ 0xB695545A4C61746ELLU, // vun_Latn_TZ
+ 0x776142454C61746ELLU, // wa_Latn_BE
+ 0x901643484C61746ELLU, // wae_Latn_CH
+ 0xAC16455445746869LLU, // wal_Ethi_ET
+ 0xC41650484C61746ELLU, // war_Latn_PH
+ 0xBC3641554C61746ELLU, // wbp_Latn_AU
+ 0xC036494E54656C75LLU, // wbq_Telu_IN
+ 0xC436494E44657661LLU, // wbr_Deva_IN
+ 0xC97657464C61746ELLU, // wls_Latn_WF
+ 0xA1B64B4D41726162LLU, // wni_Arab_KM
+ 0x776F534E4C61746ELLU, // wo_Latn_SN
+ 0xB276494E44657661LLU, // wtm_Deva_IN
+ 0xD296434E48616E73LLU, // wuu_Hans_CN
+ 0xD41742524C61746ELLU, // xav_Latn_BR
+ 0xC457545243617269LLU, // xcr_Cari_TR
+ 0x78685A414C61746ELLU, // xh_Latn_ZA
+ 0x897754524C796369LLU, // xlc_Lyci_TR
+ 0x8D7754524C796469LLU, // xld_Lydi_TR
+ 0x9597474547656F72LLU, // xmf_Geor_GE
+ 0xB597434E4D616E69LLU, // xmn_Mani_CN
+ 0xC59753444D657263LLU, // xmr_Merc_SD
+ 0x81B753414E617262LLU, // xna_Narb_SA
+ 0xC5B7494E44657661LLU, // xnr_Deva_IN
+ 0x99D755474C61746ELLU, // xog_Latn_UG
+ 0xC5F7495250727469LLU, // xpr_Prti_IR
+ 0x8257594553617262LLU, // xsa_Sarb_YE
+ 0xC6574E5044657661LLU, // xsr_Deva_NP
+ 0xB8184D5A4C61746ELLU, // yao_Latn_MZ
+ 0xBC18464D4C61746ELLU, // yap_Latn_FM
+ 0xD418434D4C61746ELLU, // yav_Latn_CM
+ 0x8438434D4C61746ELLU, // ybb_Latn_CM
+ 0x796F4E474C61746ELLU, // yo_Latn_NG
+ 0xAE3842524C61746ELLU, // yrl_Latn_BR
+ 0x82984D584C61746ELLU, // yua_Latn_MX
+ 0x9298434E48616E73LLU, // yue_Hans_CN
+ 0x9298484B48616E74LLU, // yue_Hant_HK
+ 0x7A61434E4C61746ELLU, // za_Latn_CN
+ 0x981953444C61746ELLU, // zag_Latn_SD
+ 0xA4794B4D41726162LLU, // zdj_Arab_KM
+ 0x80994E4C4C61746ELLU, // zea_Latn_NL
+ 0x9CD94D4154666E67LLU, // zgh_Tfng_MA
+ 0x7A685457426F706FLLU, // zh_Bopo_TW
+ 0x7A68545748616E62LLU, // zh_Hanb_TW
+ 0x7A68434E48616E73LLU, // zh_Hans_CN
+ 0x7A68545748616E74LLU, // zh_Hant_TW
+ 0xB17954474C61746ELLU, // zlm_Latn_TG
+ 0xA1994D594C61746ELLU, // zmi_Latn_MY
+ 0x7A755A414C61746ELLU, // zu_Latn_ZA
+ 0x833954524C61746ELLU, // zza_Latn_TR
});
const std::unordered_map<uint32_t, uint32_t> ARAB_PARENTS({
diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp
index 263d249d20e9..c6ef090c1f76 100644
--- a/libs/hwui/hwui/Bitmap.cpp
+++ b/libs/hwui/hwui/Bitmap.cpp
@@ -223,6 +223,7 @@ Bitmap::~Bitmap() {
break;
case PixelStorageType::Heap:
free(mPixelStorage.heap.address);
+ mallopt(M_PURGE, 0);
break;
case PixelStorageType::Hardware:
auto buffer = mPixelStorage.hardware.buffer;
@@ -230,7 +231,6 @@ Bitmap::~Bitmap() {
mPixelStorage.hardware.buffer = nullptr;
break;
}
-
android::uirenderer::renderthread::RenderProxy::onBitmapDestroyed(getStableID());
}
diff --git a/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java b/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
index 3643ca4a02f7..8a02a82194df 100644
--- a/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
+++ b/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
@@ -18,6 +18,7 @@ package com.android.internal.location.gnssmetrics;
import android.os.SystemClock;
import android.os.connectivity.GpsBatteryStats;
+import android.os.SystemProperties;
import android.text.format.DateUtils;
import android.util.Base64;
@@ -175,6 +176,7 @@ public class GnssMetrics {
= topFourAverageCn0Statistics.getStandardDeviation();
}
msg.powerMetrics = mGnssPowerMetrics.buildProto();
+ msg.hardwareRevision = SystemProperties.get("ro.boot.revision", "");
String s = Base64.encodeToString(GnssLog.toByteArray(msg), Base64.DEFAULT);
reset();
return s;
@@ -239,6 +241,7 @@ public class GnssMetrics {
s.append(" Energy consumed while on battery (mAh): ").append(
stats.getEnergyConsumedMaMs() / ((double) DateUtils.HOUR_IN_MILLIS)).append("\n");
}
+ s.append("Hardware Version: " + SystemProperties.get("ro.boot.revision", "")).append("\n");
return s.toString();
}
diff --git a/media/java/android/media/AudioFocusInfo.java b/media/java/android/media/AudioFocusInfo.java
index 5467a69ea0bb..0a9ca025e2b0 100644
--- a/media/java/android/media/AudioFocusInfo.java
+++ b/media/java/android/media/AudioFocusInfo.java
@@ -80,16 +80,12 @@ public final class AudioFocusInfo implements Parcelable {
* The audio attributes for the audio focus request.
* @return non-null {@link AudioAttributes}.
*/
- @SystemApi
public AudioAttributes getAttributes() { return mAttributes; }
- @SystemApi
public int getClientUid() { return mClientUid; }
- @SystemApi
public String getClientId() { return mClientId; }
- @SystemApi
public String getPackageName() { return mPackageName; }
/**
@@ -99,7 +95,6 @@ public final class AudioFocusInfo implements Parcelable {
* {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK},
* {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE}.
*/
- @SystemApi
public int getGainRequest() { return mGainRequest; }
/**
@@ -109,7 +104,6 @@ public final class AudioFocusInfo implements Parcelable {
* {@link AudioManager#AUDIOFOCUS_LOSS_TRANSIENT} or
* {@link AudioManager#AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK}.
*/
- @SystemApi
public int getLossReceived() { return mLossReceived; }
/** @hide */
@@ -124,7 +118,6 @@ public final class AudioFocusInfo implements Parcelable {
* {@link AudioManager#AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS}, and
* {@link AudioManager#AUDIOFOCUS_FLAG_LOCK}.
*/
- @SystemApi
public int getFlags() { return mFlags; }
@Override
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index 2443b739dfa4..d1d605fc8399 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -406,7 +406,7 @@ import java.util.Map;
<p>
The codec in turn will return a read-only output buffer via the {@link
Callback#onOutputBufferAvailable onOutputBufferAvailable} callback in asynchronous mode, or in
- response to a {@link #dequeueOutputBuffer dequeuOutputBuffer} call in synchronous mode. After the
+ response to a {@link #dequeueOutputBuffer dequeueOutputBuffer} call in synchronous mode. After the
output buffer has been processed, call one of the {@link #releaseOutputBuffer
releaseOutputBuffer} methods to return the buffer to the codec.
<p>
diff --git a/media/java/android/media/audiopolicy/AudioMix.java b/media/java/android/media/audiopolicy/AudioMix.java
index 8bc1d35fef36..7fb3aa6d79f9 100644
--- a/media/java/android/media/audiopolicy/AudioMix.java
+++ b/media/java/android/media/audiopolicy/AudioMix.java
@@ -81,14 +81,12 @@ public class AudioMix {
* An audio mix behavior where the output of the mix is sent to the original destination of
* the audio signal, i.e. an output device for an output mix, or a recording for an input mix.
*/
- @SystemApi
public static final int ROUTE_FLAG_RENDER = 0x1;
/**
* An audio mix behavior where the output of the mix is rerouted back to the framework and
* is accessible for injection or capture through the {@link AudioTrack} and {@link AudioRecord}
* APIs.
*/
- @SystemApi
public static final int ROUTE_FLAG_LOOP_BACK = 0x1 << 1;
private static final int ROUTE_FLAG_SUPPORTED = ROUTE_FLAG_RENDER | ROUTE_FLAG_LOOP_BACK;
@@ -113,31 +111,23 @@ public class AudioMix {
// MIX_STATE_* values to keep in sync with frameworks/av/include/media/AudioPolicy.h
/**
- * @hide
* State of a mix before its policy is enabled.
*/
- @SystemApi
public static final int MIX_STATE_DISABLED = -1;
/**
- * @hide
* State of a mix when there is no audio to mix.
*/
- @SystemApi
public static final int MIX_STATE_IDLE = 0;
/**
- * @hide
* State of a mix that is actively mixing audio.
*/
- @SystemApi
public static final int MIX_STATE_MIXING = 1;
/**
- * @hide
* The current mixing state.
* @return one of {@link #MIX_STATE_DISABLED}, {@link #MIX_STATE_IDLE},
* {@link #MIX_STATE_MIXING}.
*/
- @SystemApi
public int getMixState() {
return mMixState;
}
@@ -201,9 +191,7 @@ public class AudioMix {
/**
* Builder class for {@link AudioMix} objects
- *
*/
- @SystemApi
public static class Builder {
private AudioMixingRule mRule = null;
private AudioFormat mFormat = null;
@@ -224,7 +212,6 @@ public class AudioMix {
* @param rule a non-null {@link AudioMixingRule} instance.
* @throws IllegalArgumentException
*/
- @SystemApi
public Builder(AudioMixingRule rule)
throws IllegalArgumentException {
if (rule == null) {
@@ -284,7 +271,6 @@ public class AudioMix {
* @return the same Builder instance.
* @throws IllegalArgumentException
*/
- @SystemApi
public Builder setFormat(AudioFormat format)
throws IllegalArgumentException {
if (format == null) {
@@ -302,7 +288,6 @@ public class AudioMix {
* @return the same Builder instance.
* @throws IllegalArgumentException
*/
- @SystemApi
public Builder setRouteFlags(@RouteFlags int routeFlags)
throws IllegalArgumentException {
if (routeFlags == 0) {
@@ -329,7 +314,6 @@ public class AudioMix {
* @return the same Builder instance
* @throws IllegalArgumentException
*/
- @SystemApi
public Builder setDevice(@NonNull AudioDeviceInfo device) throws IllegalArgumentException {
if (device == null) {
throw new IllegalArgumentException("Illegal null AudioDeviceInfo argument");
@@ -347,7 +331,6 @@ public class AudioMix {
* @return a new {@link AudioMix} object
* @throws IllegalArgumentException if no {@link AudioMixingRule} has been set.
*/
- @SystemApi
public AudioMix build() throws IllegalArgumentException {
if (mRule == null) {
throw new IllegalArgumentException("Illegal null AudioMixingRule");
diff --git a/media/java/android/media/audiopolicy/AudioMixingRule.java b/media/java/android/media/audiopolicy/AudioMixingRule.java
index fbee62a86dcd..6c48cdb7b643 100644
--- a/media/java/android/media/audiopolicy/AudioMixingRule.java
+++ b/media/java/android/media/audiopolicy/AudioMixingRule.java
@@ -54,7 +54,6 @@ public class AudioMixingRule {
* {@link Builder#addMixRule(int, Object)} where the Object parameter is an instance of
* {@link AudioAttributes}.
*/
- @SystemApi
public static final int RULE_MATCH_ATTRIBUTE_USAGE = 0x1;
/**
* A rule requiring the capture preset information of the {@link AudioAttributes} to match.
@@ -62,14 +61,12 @@ public class AudioMixingRule {
* {@link Builder#addMixRule(int, Object)} where the Object parameter is an instance of
* {@link AudioAttributes}.
*/
- @SystemApi
public static final int RULE_MATCH_ATTRIBUTE_CAPTURE_PRESET = 0x1 << 1;
/**
* A rule requiring the UID of the audio stream to match that specified.
* This mixing rule can be added with {@link Builder#addMixRule(int, Object)} where the Object
* parameter is an instance of {@link java.lang.Integer}.
*/
- @SystemApi
public static final int RULE_MATCH_UID = 0x1 << 2;
private final static int RULE_EXCLUSION_MASK = 0x8000;
@@ -239,7 +236,6 @@ public class AudioMixingRule {
/**
* Builder class for {@link AudioMixingRule} objects
*/
- @SystemApi
public static class Builder {
private ArrayList<AudioMixMatchCriterion> mCriteria;
private int mTargetMixType = AudioMix.MIX_TYPE_INVALID;
@@ -247,7 +243,6 @@ public class AudioMixingRule {
/**
* Constructs a new Builder with no rules.
*/
- @SystemApi
public Builder() {
mCriteria = new ArrayList<AudioMixMatchCriterion>();
}
@@ -262,7 +257,6 @@ public class AudioMixingRule {
* @throws IllegalArgumentException
* @see #excludeRule(AudioAttributes, int)
*/
- @SystemApi
public Builder addRule(AudioAttributes attrToMatch, int rule)
throws IllegalArgumentException {
if (!isValidAttributesSystemApiRule(rule)) {
@@ -291,7 +285,6 @@ public class AudioMixingRule {
* @throws IllegalArgumentException
* @see #addRule(AudioAttributes, int)
*/
- @SystemApi
public Builder excludeRule(AudioAttributes attrToMatch, int rule)
throws IllegalArgumentException {
if (!isValidAttributesSystemApiRule(rule)) {
@@ -313,7 +306,6 @@ public class AudioMixingRule {
* @throws IllegalArgumentException
* @see #excludeMixRule(int, Object)
*/
- @SystemApi
public Builder addMixRule(int rule, Object property) throws IllegalArgumentException {
if (!isValidSystemApiRule(rule)) {
throw new IllegalArgumentException("Illegal rule value " + rule);
@@ -343,7 +335,6 @@ public class AudioMixingRule {
* @return the same Builder instance.
* @throws IllegalArgumentException
*/
- @SystemApi
public Builder excludeMixRule(int rule, Object property) throws IllegalArgumentException {
if (!isValidSystemApiRule(rule)) {
throw new IllegalArgumentException("Illegal rule value " + rule);
diff --git a/media/java/android/media/audiopolicy/AudioPolicy.java b/media/java/android/media/audiopolicy/AudioPolicy.java
index 11107e2dd420..6103f55745f9 100644
--- a/media/java/android/media/audiopolicy/AudioPolicy.java
+++ b/media/java/android/media/audiopolicy/AudioPolicy.java
@@ -58,12 +58,10 @@ public class AudioPolicy {
/**
* The status of an audio policy that is valid but cannot be used because it is not registered.
*/
- @SystemApi
public static final int POLICY_STATUS_UNREGISTERED = 1;
/**
* The status of an audio policy that is valid, successfully registered and thus active.
*/
- @SystemApi
public static final int POLICY_STATUS_REGISTERED = 2;
private int mStatus;
@@ -75,7 +73,6 @@ public class AudioPolicy {
* The behavior of a policy with regards to audio focus where it relies on the application
* to do the ducking, the is the legacy and default behavior.
*/
- @SystemApi
public static final int FOCUS_POLICY_DUCKING_IN_APP = 0;
public static final int FOCUS_POLICY_DUCKING_DEFAULT = FOCUS_POLICY_DUCKING_IN_APP;
/**
@@ -85,7 +82,6 @@ public class AudioPolicy {
* <br>Can only be used after having set a listener with
* {@link AudioPolicy#setAudioPolicyFocusListener(AudioPolicyFocusListener)}.
*/
- @SystemApi
public static final int FOCUS_POLICY_DUCKING_IN_POLICY = 1;
private AudioPolicyFocusListener mFocusListener;
@@ -133,7 +129,6 @@ public class AudioPolicy {
* Builder class for {@link AudioPolicy} objects.
* By default the policy to be created doesn't govern audio focus decisions.
*/
- @SystemApi
public static class Builder {
private ArrayList<AudioMix> mMixes;
private Context mContext;
@@ -147,7 +142,6 @@ public class AudioPolicy {
* Constructs a new Builder with no audio mixes.
* @param context the context for the policy
*/
- @SystemApi
public Builder(Context context) {
mMixes = new ArrayList<AudioMix>();
mContext = context;
@@ -159,7 +153,6 @@ public class AudioPolicy {
* @return the same Builder instance.
* @throws IllegalArgumentException
*/
- @SystemApi
public Builder addMix(@NonNull AudioMix mix) throws IllegalArgumentException {
if (mix == null) {
throw new IllegalArgumentException("Illegal null AudioMix argument");
@@ -174,7 +167,6 @@ public class AudioPolicy {
* @return the same Builder instance.
* @throws IllegalArgumentException
*/
- @SystemApi
public Builder setLooper(@NonNull Looper looper) throws IllegalArgumentException {
if (looper == null) {
throw new IllegalArgumentException("Illegal null Looper argument");
@@ -187,7 +179,6 @@ public class AudioPolicy {
* Sets the audio focus listener for the policy.
* @param l a {@link AudioPolicy.AudioPolicyFocusListener}
*/
- @SystemApi
public void setAudioPolicyFocusListener(AudioPolicyFocusListener l) {
mFocusListener = l;
}
@@ -201,7 +192,6 @@ public class AudioPolicy {
* @param enforce true if the policy will govern audio focus decisions.
* @return the same Builder instance.
*/
- @SystemApi
public Builder setIsAudioFocusPolicy(boolean isFocusPolicy) {
mIsFocusPolicy = isFocusPolicy;
return this;
@@ -211,12 +201,10 @@ public class AudioPolicy {
* Sets the audio policy status listener.
* @param l a {@link AudioPolicy.AudioPolicyStatusListener}
*/
- @SystemApi
public void setAudioPolicyStatusListener(AudioPolicyStatusListener l) {
mStatusListener = l;
}
- @SystemApi
/**
* Sets the callback to receive all volume key-related events.
* The callback will only be called if the device is configured to handle volume events
@@ -240,7 +228,6 @@ public class AudioPolicy {
* {@link AudioPolicy.AudioPolicyStatusListener} but the policy was configured
* as an audio focus policy with {@link #setIsAudioFocusPolicy(boolean)}.
*/
- @SystemApi
public AudioPolicy build() {
if (mStatusListener != null) {
// the AudioPolicy status listener includes updates on each mix activity state
@@ -258,7 +245,6 @@ public class AudioPolicy {
}
/**
- * @hide
* Update the current configuration of the set of audio mixes by adding new ones, while
* keeping the policy registered.
* This method can only be called on a registered policy.
@@ -266,7 +252,6 @@ public class AudioPolicy {
* @return {@link AudioManager#SUCCESS} if the change was successful, {@link AudioManager#ERROR}
* otherwise.
*/
- @SystemApi
public int attachMixes(@NonNull List<AudioMix> mixes) {
if (mixes == null) {
throw new IllegalArgumentException("Illegal null list of AudioMix");
@@ -299,7 +284,6 @@ public class AudioPolicy {
}
/**
- * @hide
* Update the current configuration of the set of audio mixes by removing some, while
* keeping the policy registered.
* This method can only be called on a registered policy.
@@ -307,7 +291,6 @@ public class AudioPolicy {
* @return {@link AudioManager#SUCCESS} if the change was successful, {@link AudioManager#ERROR}
* otherwise.
*/
- @SystemApi
public int detachMixes(@NonNull List<AudioMix> mixes) {
if (mixes == null) {
throw new IllegalArgumentException("Illegal null list of AudioMix");
@@ -405,7 +388,6 @@ public class AudioPolicy {
* Returns the current behavior for audio focus-related ducking.
* @return {@link #FOCUS_POLICY_DUCKING_IN_APP} or {@link #FOCUS_POLICY_DUCKING_IN_POLICY}
*/
- @SystemApi
public int getFocusDuckingBehavior() {
return mConfig.mDuckingPolicy;
}
@@ -422,7 +404,6 @@ public class AudioPolicy {
* @throws IllegalArgumentException
* @throws IllegalStateException
*/
- @SystemApi
public int setFocusDuckingBehavior(int behavior)
throws IllegalArgumentException, IllegalStateException {
if ((behavior != FOCUS_POLICY_DUCKING_IN_APP)
@@ -466,7 +447,6 @@ public class AudioPolicy {
* with {@link AudioManager#registerAudioPolicy(AudioPolicy)}.
* @throws IllegalArgumentException
*/
- @SystemApi
public AudioRecord createAudioRecordSink(AudioMix mix) throws IllegalArgumentException {
if (!policyReadyToUse()) {
Log.e(TAG, "Cannot create AudioRecord sink for AudioMix");
@@ -506,7 +486,6 @@ public class AudioPolicy {
* with {@link AudioManager#registerAudioPolicy(AudioPolicy)}.
* @throws IllegalArgumentException
*/
- @SystemApi
public AudioTrack createAudioTrackSource(AudioMix mix) throws IllegalArgumentException {
if (!policyReadyToUse()) {
Log.e(TAG, "Cannot create AudioTrack source for AudioMix");
@@ -528,18 +507,15 @@ public class AudioPolicy {
return at;
}
- @SystemApi
public int getStatus() {
return mStatus;
}
- @SystemApi
public static abstract class AudioPolicyStatusListener {
public void onStatusChange() {}
public void onMixStateUpdate(AudioMix mix) {}
}
- @SystemApi
public static abstract class AudioPolicyFocusListener {
public void onAudioFocusGrant(AudioFocusInfo afi, int requestResult) {}
public void onAudioFocusLoss(AudioFocusInfo afi, boolean wasNotified) {}
@@ -563,7 +539,6 @@ public class AudioPolicy {
public void onAudioFocusAbandon(AudioFocusInfo afi) {}
}
- @SystemApi
/**
* Callback class to receive volume change-related events.
* See {@link #Builder.setAudioPolicyVolumeCallback(AudioPolicyCallback)} to configure the
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index 143182f83ace..a5121a0d7f5e 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -1330,7 +1330,6 @@ public final class TvInputManager {
*
* @return the list of content ratings blocked by the user.
*/
- @SystemApi
public List<TvContentRating> getBlockedRatings() {
try {
List<TvContentRating> ratings = new ArrayList<>();
diff --git a/media/jni/android_media_MediaExtractor.cpp b/media/jni/android_media_MediaExtractor.cpp
index 15957c6a9c5e..dad0e53963b0 100644
--- a/media/jni/android_media_MediaExtractor.cpp
+++ b/media/jni/android_media_MediaExtractor.cpp
@@ -494,17 +494,17 @@ static jlong android_media_MediaExtractor_getSampleTime(
if (extractor == NULL) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
- return -1ll;
+ return -1LL;
}
int64_t sampleTimeUs;
status_t err = extractor->getSampleTime(&sampleTimeUs);
if (err == ERROR_END_OF_STREAM) {
- return -1ll;
+ return -1LL;
} else if (err != OK) {
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
- return -1ll;
+ return -1LL;
}
return (jlong) sampleTimeUs;
@@ -516,17 +516,17 @@ static jlong android_media_MediaExtractor_getSampleSize(
if (extractor == NULL) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
- return -1ll;
+ return -1LL;
}
size_t sampleSize;
status_t err = extractor->getSampleSize(&sampleSize);
if (err == ERROR_END_OF_STREAM) {
- return -1ll;
+ return -1LL;
} else if (err != OK) {
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
- return -1ll;
+ return -1LL;
}
return (jlong) sampleSize;
@@ -828,13 +828,13 @@ static jlong android_media_MediaExtractor_getCachedDurationUs(
if (extractor == NULL) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
- return -1ll;
+ return -1LL;
}
int64_t cachedDurationUs;
bool eos;
if (!extractor->getCachedDuration(&cachedDurationUs, &eos)) {
- return -1ll;
+ return -1LL;
}
return (jlong) cachedDurationUs;
diff --git a/media/jni/audioeffect/android_media_Visualizer.cpp b/media/jni/audioeffect/android_media_Visualizer.cpp
index b7d7b0339376..45de36ed3e4d 100644
--- a/media/jni/audioeffect/android_media_Visualizer.cpp
+++ b/media/jni/audioeffect/android_media_Visualizer.cpp
@@ -440,6 +440,7 @@ static void android_media_visualizer_native_release(JNIEnv *env, jobject thiz)
if (lpVisualizer == 0) {
return;
}
+ lpVisualizer->release();
}
// delete the JNI data
VisualizerJniStorage* lpJniStorage =
diff --git a/native/android/libandroid.map.txt b/native/android/libandroid.map.txt
index ac5ded60bf6b..f840d5e2f968 100644
--- a/native/android/libandroid.map.txt
+++ b/native/android/libandroid.map.txt
@@ -218,6 +218,10 @@ LIBANDROID {
android_getaddrinfofornetwork; # introduced=23
android_setprocnetwork; # introduced=23
android_setsocknetwork; # introduced=23
+ android_res_cancel; # introduced=29
+ android_res_nquery; # introduced=29
+ android_res_nresult; # introduced=29
+ android_res_nsend; # introduced=29
local:
*;
};
diff --git a/native/android/libandroid_net.map.txt b/native/android/libandroid_net.map.txt
index 9b5a5a1f4b52..be3531da462d 100644
--- a/native/android/libandroid_net.map.txt
+++ b/native/android/libandroid_net.map.txt
@@ -1,10 +1,15 @@
-# These functions have been part of the NDK since API 24.
# They are also all available to vendor code.
LIBANDROID_NET {
global:
+ # These functions have been part of the NDK since API 24.
+ android_getaddrinfofornetwork; # vndk
android_setsocknetwork; # vndk
android_setprocnetwork; # vndk
- android_getaddrinfofornetwork; # vndk
+ # These functions have been part of the NDK since API 29.
+ android_res_cancel; # vndk
+ android_res_nquery; # vndk
+ android_res_nresult; # vndk
+ android_res_nsend; # vndk
local:
*;
};
diff --git a/native/android/net.c b/native/android/net.c
index 60296a7bd00c..e32b7875b4e7 100644
--- a/native/android/net.c
+++ b/native/android/net.c
@@ -83,3 +83,31 @@ int android_getaddrinfofornetwork(net_handle_t network,
return android_getaddrinfofornet(node, service, hints, netid, 0, res);
}
+
+int android_res_nquery(net_handle_t network,
+ const char *dname, int ns_class, int ns_type) {
+ unsigned netid;
+ if (!getnetidfromhandle(network, &netid)) {
+ return -ENONET;
+ }
+
+ return resNetworkQuery(netid, dname, ns_class, ns_type);
+}
+
+int android_res_nresult(int fd, int *rcode, unsigned char *answer, int anslen) {
+ return resNetworkResult(fd, rcode, answer, anslen);
+}
+
+int android_res_nsend(net_handle_t network,
+ const unsigned char *msg, int msglen) {
+ unsigned netid;
+ if (!getnetidfromhandle(network, &netid)) {
+ return -ENONET;
+ }
+
+ return resNetworkSend(netid, msg, msglen);
+}
+
+void android_res_cancel(int nsend_fd) {
+ resNetworkCancel(nsend_fd);
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
index a3c1fc6ff265..fd80edf839bc 100644
--- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
@@ -62,6 +62,7 @@ import java.io.File;
import java.io.IOException;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.WeakReference;
import java.text.Collator;
import java.text.Normalizer;
import java.text.Normalizer.Form;
@@ -132,7 +133,7 @@ public class ApplicationsState {
boolean mSessionsChanged;
// Temporary for dispatching session callbacks. Only touched by main thread.
- final ArrayList<Session> mActiveSessions = new ArrayList<Session>();
+ final ArrayList<WeakReference<Session>> mActiveSessions = new ArrayList<>();
final HandlerThread mThread;
final BackgroundHandler mBackgroundHandler;
@@ -618,7 +619,7 @@ public class ApplicationsState {
for (int i=0; i<mSessions.size(); i++) {
Session s = mSessions.get(i);
if (s.mResumed) {
- mActiveSessions.add(s);
+ mActiveSessions.add(new WeakReference<>(s));
}
}
}
@@ -830,46 +831,70 @@ public class ApplicationsState {
rebuildActiveSessions();
switch (msg.what) {
case MSG_REBUILD_COMPLETE: {
- Session s = (Session)msg.obj;
- if (mActiveSessions.contains(s)) {
- s.mCallbacks.onRebuildComplete(s.mLastAppList);
+ Session s = (Session) msg.obj;
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null && session == s) {
+ s.mCallbacks.onRebuildComplete(s.mLastAppList);
+ }
}
} break;
case MSG_PACKAGE_LIST_CHANGED: {
- for (int i=0; i<mActiveSessions.size(); i++) {
- mActiveSessions.get(i).mCallbacks.onPackageListChanged();
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null) {
+ session.mCallbacks.onPackageListChanged();
+ }
}
} break;
case MSG_PACKAGE_ICON_CHANGED: {
- for (int i=0; i<mActiveSessions.size(); i++) {
- mActiveSessions.get(i).mCallbacks.onPackageIconChanged();
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null) {
+ session.mCallbacks.onPackageIconChanged();
+ }
}
} break;
case MSG_PACKAGE_SIZE_CHANGED: {
- for (int i=0; i<mActiveSessions.size(); i++) {
- mActiveSessions.get(i).mCallbacks.onPackageSizeChanged(
- (String)msg.obj);
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null) {
+ session.mCallbacks.onPackageSizeChanged(
+ (String) msg.obj);
+ }
}
} break;
case MSG_ALL_SIZES_COMPUTED: {
- for (int i=0; i<mActiveSessions.size(); i++) {
- mActiveSessions.get(i).mCallbacks.onAllSizesComputed();
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null) {
+ session.mCallbacks.onAllSizesComputed();
+ }
}
} break;
case MSG_RUNNING_STATE_CHANGED: {
- for (int i=0; i<mActiveSessions.size(); i++) {
- mActiveSessions.get(i).mCallbacks.onRunningStateChanged(
- msg.arg1 != 0);
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null) {
+ session.mCallbacks.onRunningStateChanged(
+ msg.arg1 != 0);
+ }
}
} break;
case MSG_LAUNCHER_INFO_CHANGED: {
- for (int i=0; i<mActiveSessions.size(); i++) {
- mActiveSessions.get(i).mCallbacks.onLauncherInfoChanged();
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null) {
+ session.mCallbacks.onLauncherInfoChanged();
+ }
}
} break;
case MSG_LOAD_ENTRIES_COMPLETE: {
- for (int i=0; i<mActiveSessions.size(); i++) {
- mActiveSessions.get(i).mCallbacks.onLoadEntriesCompleted();
+ for (WeakReference<Session> sessionRef : mActiveSessions) {
+ final Session session = sessionRef.get();
+ if (session != null) {
+ session.mCallbacks.onLoadEntriesCompleted();
+ }
}
} break;
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothManager.java
index 373247162563..1c50953bac12 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothManager.java
@@ -19,6 +19,8 @@ package com.android.settingslib.bluetooth;
import android.content.Context;
import android.util.Log;
+import java.lang.ref.WeakReference;
+
/**
* LocalBluetoothManager provides a simplified interface on top of a subset of
* the Bluetooth API. Note that {@link #getInstance} will return null
@@ -34,7 +36,7 @@ public class LocalBluetoothManager {
private final Context mContext;
/** If a BT-related activity is in the foreground, this will be it. */
- private Context mForegroundActivity;
+ private WeakReference<Context> mForegroundActivity;
private final LocalBluetoothAdapter mLocalAdapter;
@@ -85,17 +87,19 @@ public class LocalBluetoothManager {
}
public Context getForegroundActivity() {
- return mForegroundActivity;
+ return mForegroundActivity == null
+ ? null
+ : mForegroundActivity.get();
}
public boolean isForegroundActivity() {
- return mForegroundActivity != null;
+ return mForegroundActivity != null && mForegroundActivity.get() != null;
}
public synchronized void setForegroundActivity(Context context) {
if (context != null) {
Log.d(TAG, "setting foreground activity to non-null context");
- mForegroundActivity = context;
+ mForegroundActivity = new WeakReference<>(context);
} else {
if (mForegroundActivity != null) {
Log.d(TAG, "setting foreground activity to null");
diff --git a/packages/SettingsLib/src/com/android/settingslib/dream/DreamBackend.java b/packages/SettingsLib/src/com/android/settingslib/dream/DreamBackend.java
index 988060eac64d..e5d97c9b4a7b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/dream/DreamBackend.java
+++ b/packages/SettingsLib/src/com/android/settingslib/dream/DreamBackend.java
@@ -36,12 +36,12 @@ import android.util.AttributeSet;
import android.util.Log;
import android.util.Xml;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -97,15 +97,15 @@ public class DreamBackend {
}
public DreamBackend(Context context) {
- mContext = context;
+ mContext = context.getApplicationContext();
mDreamManager = IDreamManager.Stub.asInterface(
ServiceManager.getService(DreamService.DREAM_SERVICE));
mComparator = new DreamInfoComparator(getDefaultDream());
- mDreamsEnabledByDefault = context.getResources()
+ mDreamsEnabledByDefault = mContext.getResources()
.getBoolean(com.android.internal.R.bool.config_dreamsEnabledByDefault);
- mDreamsActivatedOnSleepByDefault = context.getResources()
+ mDreamsActivatedOnSleepByDefault = mContext.getResources()
.getBoolean(com.android.internal.R.bool.config_dreamsActivatedOnSleepByDefault);
- mDreamsActivatedOnDockByDefault = context.getResources()
+ mDreamsActivatedOnDockByDefault = mContext.getResources()
.getBoolean(com.android.internal.R.bool.config_dreamsActivatedOnDockByDefault);
}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
index bc9f52c2f88b..bca353050c46 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
@@ -43,7 +43,7 @@ public interface QSTile {
boolean isAvailable();
void setTileSpec(String tileSpec);
- void clearState();
+ @Deprecated default void clearState() {}
void refreshState();
void addCallback(Callback callback);
diff --git a/packages/SystemUI/res/layout/navigation_layout.xml b/packages/SystemUI/res/layout/navigation_layout.xml
index baaf699c278a..d72021e27e0b 100644
--- a/packages/SystemUI/res/layout/navigation_layout.xml
+++ b/packages/SystemUI/res/layout/navigation_layout.xml
@@ -18,14 +18,16 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:layout_marginStart="@dimen/rounded_corner_content_padding"
+ android:layout_marginEnd="@dimen/rounded_corner_content_padding"
+ android:paddingStart="@dimen/nav_content_padding"
+ android:paddingEnd="@dimen/nav_content_padding">
<com.android.systemui.statusbar.phone.NearestTouchFrame
android:id="@+id/nav_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingStart="@dimen/rounded_corner_content_padding"
- android:paddingEnd="@dimen/rounded_corner_content_padding"
android:clipChildren="false"
android:clipToPadding="false">
@@ -34,8 +36,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
- android:paddingStart="@dimen/nav_content_padding"
- android:paddingEnd="@dimen/nav_content_padding"
android:clipToPadding="false"
android:clipChildren="false" />
@@ -46,8 +46,6 @@
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
- android:paddingStart="@dimen/nav_content_padding"
- android:paddingEnd="@dimen/nav_content_padding"
android:clipToPadding="false"
android:clipChildren="false" />
diff --git a/packages/SystemUI/res/layout/navigation_layout_rot90.xml b/packages/SystemUI/res/layout/navigation_layout_rot90.xml
index 6d5b77885a09..24a0c71f3bad 100644
--- a/packages/SystemUI/res/layout/navigation_layout_rot90.xml
+++ b/packages/SystemUI/res/layout/navigation_layout_rot90.xml
@@ -18,14 +18,16 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:layout_marginTop="@dimen/rounded_corner_content_padding"
+ android:layout_marginBottom="@dimen/rounded_corner_content_padding"
+ android:paddingTop="@dimen/nav_content_padding"
+ android:paddingBottom="@dimen/nav_content_padding">
<com.android.systemui.statusbar.phone.NearestTouchFrame
android:id="@+id/nav_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingTop="@dimen/rounded_corner_content_padding"
- android:paddingBottom="@dimen/rounded_corner_content_padding"
android:clipChildren="false"
android:clipToPadding="false">
@@ -34,10 +36,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:paddingTop="@dimen/nav_content_padding"
- android:paddingBottom="@dimen/nav_content_padding"
- android:clipChildren="false"
- android:clipToPadding="false" />
+ android:clipToPadding="false"
+ android:clipChildren="false" />
<com.android.systemui.statusbar.phone.ReverseLinearLayout
android:id="@+id/center_group"
@@ -45,10 +45,8 @@
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
- android:paddingTop="@dimen/nav_content_padding"
- android:paddingBottom="@dimen/nav_content_padding"
- android:clipChildren="false"
- android:clipToPadding="false" />
+ android:clipToPadding="false"
+ android:clipChildren="false" />
</com.android.systemui.statusbar.phone.NearestTouchFrame>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index be80d52f2a57..79e1fae98c21 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -943,9 +943,9 @@
<dimen name="bottom_padding">48dp</dimen>
<dimen name="edge_margin">8dp</dimen>
- <dimen name="rounded_corner_radius">0dp</dimen>
- <dimen name="rounded_corner_radius_top">0dp</dimen>
- <dimen name="rounded_corner_radius_bottom">0dp</dimen>
+ <dimen name="rounded_corner_radius">@*android:dimen/rounded_corner_radius</dimen>
+ <dimen name="rounded_corner_radius_top">@*android:dimen/rounded_corner_radius_top</dimen>
+ <dimen name="rounded_corner_radius_bottom">@*android:dimen/rounded_corner_radius_bottom</dimen>
<dimen name="rounded_corner_content_padding">0dp</dimen>
<dimen name="nav_content_padding">0dp</dimen>
<dimen name="nav_quick_scrub_track_edge_padding">24dp</dimen>
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
index 35abb0a523a1..03fb9bbdbd4e 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -15,7 +15,6 @@
*/
package com.android.keyguard;
-import android.R.style;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.admin.DevicePolicyManager;
@@ -26,7 +25,6 @@ import android.util.AttributeSet;
import android.util.Log;
import android.util.Slog;
import android.util.StatsLog;
-import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
@@ -142,6 +140,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
mSecurityViewFlipper.addView(v);
updateSecurityView(v);
view = (KeyguardSecurityView)v;
+ view.reset();
}
return view;
@@ -209,7 +208,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
if (messageId != 0) {
final String message = mContext.getString(messageId,
- KeyguardUpdateMonitor.getInstance(mContext).getFailedUnlockAttempts(userId),
+ mLockPatternUtils.getCurrentFailedPasswordAttempts(userId),
timeoutInSeconds);
showDialog(null, message);
}
@@ -254,8 +253,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
}
private void reportFailedUnlockAttempt(int userId, int timeoutMs) {
- final KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
- final int failedAttempts = monitor.getFailedUnlockAttempts(userId) + 1; // +1 for this time
+ // +1 for this time
+ final int failedAttempts = mLockPatternUtils.getCurrentFailedPasswordAttempts(userId) + 1;
if (DEBUG) Log.d(TAG, "reportFailedPatternAttempt: #" + failedAttempts);
@@ -289,7 +288,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
showWipeDialog(failedAttempts, userType);
}
}
- monitor.reportFailedStrongAuthUnlockAttempt(userId);
mLockPatternUtils.reportFailedPasswordAttempt(userId);
if (timeoutMs > 0) {
mLockPatternUtils.reportPasswordLockout(timeoutMs, userId);
@@ -432,7 +430,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
if (success) {
StatsLog.write(StatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED,
StatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED__RESULT__SUCCESS);
- monitor.clearFailedUnlockAttempts();
mLockPatternUtils.reportSuccessfulPasswordAttempt(userId);
} else {
StatsLog.write(StatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED,
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index ef3aa42727e9..0e2181532630 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -209,9 +209,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
// Battery status
private BatteryStatus mBatteryStatus;
- // Password attempts
- private SparseIntArray mFailedAttempts = new SparseIntArray();
-
private final StrongAuthTracker mStrongAuthTracker;
private final ArrayList<WeakReference<KeyguardUpdateMonitorCallback>>
@@ -1800,22 +1797,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
return mDeviceProvisioned;
}
- public void clearFailedUnlockAttempts() {
- mFailedAttempts.delete(sCurrentUser);
- }
-
public ServiceState getServiceState(int subId) {
return mServiceStates.get(subId);
}
- public int getFailedUnlockAttempts(int userId) {
- return mFailedAttempts.get(userId, 0);
- }
-
- public void reportFailedStrongAuthUnlockAttempt(int userId) {
- mFailedAttempts.put(userId, getFailedUnlockAttempts(userId) + 1);
- }
-
public void clearFingerprintRecognized() {
mUserFingerprintAuthenticated.clear();
mTrustManager.clearAllFingerprints();
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index 79302f2aa2ff..16b54b4cea5b 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -39,10 +39,13 @@ import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.Region;
import android.hardware.display.DisplayManager;
+import android.os.Handler;
+import android.os.HandlerThread;
import android.os.SystemProperties;
import android.provider.Settings.Secure;
import androidx.annotation.VisibleForTesting;
import android.util.DisplayMetrics;
+import android.util.Log;
import android.view.DisplayCutout;
import android.view.DisplayInfo;
import android.view.Gravity;
@@ -57,6 +60,7 @@ import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
+import com.android.internal.util.Preconditions;
import com.android.systemui.RegionInterceptingFrameLayout.RegionInterceptableView;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentHostManager.FragmentListener;
@@ -74,6 +78,9 @@ import com.android.systemui.util.leak.RotationUtils;
* for antialiasing and emulation purposes.
*/
public class ScreenDecorations extends SystemUI implements Tunable {
+ private static final boolean DEBUG = false;
+ private static final String TAG = "ScreenDecorations";
+
public static final String SIZE = "sysui_rounded_size";
public static final String PADDING = "sysui_rounded_content_padding";
private static final boolean DEBUG_SCREENSHOT_ROUNDED_CORNERS =
@@ -82,9 +89,9 @@ public class ScreenDecorations extends SystemUI implements Tunable {
private DisplayManager mDisplayManager;
private DisplayManager.DisplayListener mDisplayListener;
- private int mRoundedDefault;
- private int mRoundedDefaultTop;
- private int mRoundedDefaultBottom;
+ @VisibleForTesting protected int mRoundedDefault;
+ @VisibleForTesting protected int mRoundedDefaultTop;
+ @VisibleForTesting protected int mRoundedDefaultBottom;
private View mOverlay;
private View mBottomOverlay;
private float mDensity;
@@ -93,26 +100,30 @@ public class ScreenDecorations extends SystemUI implements Tunable {
private DisplayCutoutView mCutoutTop;
private DisplayCutoutView mCutoutBottom;
private boolean mPendingRotationChange;
+ private Handler mHandler;
@Override
public void start() {
+ mHandler = startHandlerThread();
+ mHandler.post(this::startOnScreenDecorationsThread);
+ setupStatusBarPaddingIfNeeded();
+ }
+
+ @VisibleForTesting
+ Handler startHandlerThread() {
+ HandlerThread thread = new HandlerThread("ScreenDecorations");
+ thread.start();
+ return thread.getThreadHandler();
+ }
+
+ private void startOnScreenDecorationsThread() {
+ mRotation = RotationUtils.getExactRotation(mContext);
mWindowManager = mContext.getSystemService(WindowManager.class);
- mRoundedDefault = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_radius);
- mRoundedDefaultTop = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_radius_top);
- mRoundedDefaultBottom = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_radius_bottom);
+ updateRoundedCornerRadii();
if (hasRoundedCorners() || shouldDrawCutout()) {
setupDecorations();
}
- int padding = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_content_padding);
- if (padding != 0) {
- setupPadding(padding);
- }
-
mDisplayListener = new DisplayManager.DisplayListener() {
@Override
public void onDisplayAdded(int displayId) {
@@ -126,8 +137,8 @@ public class ScreenDecorations extends SystemUI implements Tunable {
@Override
public void onDisplayChanged(int displayId) {
- if (mOverlay != null && mBottomOverlay != null
- && mRotation != RotationUtils.getExactRotation(mContext)) {
+ final int newRotation = RotationUtils.getExactRotation(mContext);
+ if (mOverlay != null && mBottomOverlay != null && mRotation != newRotation) {
// We cannot immediately update the orientation. Otherwise
// WindowManager is still deferring layout until it has finished dispatching
// the config changes, which may cause divergence between what we draw
@@ -136,20 +147,24 @@ public class ScreenDecorations extends SystemUI implements Tunable {
// - we are trying to redraw. This because WM resized our window and told us to.
// - the config change has been dispatched, so WM is no longer deferring layout.
mPendingRotationChange = true;
+ if (DEBUG) {
+ Log.i(TAG, "Rotation changed, deferring " + newRotation + ", staying at "
+ + mRotation);
+ }
+
mOverlay.getViewTreeObserver().addOnPreDrawListener(
- new RestartingPreDrawListener(mOverlay));
+ new RestartingPreDrawListener(mOverlay, newRotation));
mBottomOverlay.getViewTreeObserver().addOnPreDrawListener(
- new RestartingPreDrawListener(mBottomOverlay));
-
+ new RestartingPreDrawListener(mBottomOverlay, newRotation));
}
updateOrientation();
}
};
- mRotation = -1;
mDisplayManager = (DisplayManager) mContext.getSystemService(
Context.DISPLAY_SERVICE);
- mDisplayManager.registerDisplayListener(mDisplayListener, null);
+ mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
+ updateOrientation();
}
private void setupDecorations() {
@@ -179,10 +194,11 @@ public class ScreenDecorations extends SystemUI implements Tunable {
mWindowManager.getDefaultDisplay().getMetrics(metrics);
mDensity = metrics.density;
- Dependency.get(TunerService.class).addTunable(this, SIZE);
+ Dependency.get(Dependency.MAIN_HANDLER).post(
+ () -> Dependency.get(TunerService.class).addTunable(this, SIZE));
// Watch color inversion and invert the overlay as needed.
- SecureSetting setting = new SecureSetting(mContext, Dependency.get(Dependency.MAIN_HANDLER),
+ SecureSetting setting = new SecureSetting(mContext, mHandler,
Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED) {
@Override
protected void handleValueChanged(int value, boolean observedChange) {
@@ -215,18 +231,38 @@ public class ScreenDecorations extends SystemUI implements Tunable {
.start();
}
});
+
+ mOverlay.getViewTreeObserver().addOnPreDrawListener(
+ new ValidatingPreDrawListener(mOverlay));
+ mBottomOverlay.getViewTreeObserver().addOnPreDrawListener(
+ new ValidatingPreDrawListener(mBottomOverlay));
}
@Override
protected void onConfigurationChanged(Configuration newConfig) {
- mPendingRotationChange = false;
- updateOrientation();
- if (shouldDrawCutout() && mOverlay == null) {
- setupDecorations();
- }
+ mHandler.post(() -> {
+ int oldRotation = mRotation;
+ mPendingRotationChange = false;
+ updateOrientation();
+ updateRoundedCornerRadii();
+ if (DEBUG) Log.i(TAG, "onConfigChanged from rot " + oldRotation + " to " + mRotation);
+ if (shouldDrawCutout() && mOverlay == null) {
+ setupDecorations();
+ }
+ if (mOverlay != null) {
+ // Updating the layout params ensures that ViewRootImpl will call relayoutWindow(),
+ // which ensures that the forced seamless rotation will end, even if we updated
+ // the rotation before window manager was ready (and was still waiting for sending
+ // the updated rotation).
+ updateLayoutParams();
+ }
+ });
}
- protected void updateOrientation() {
+ private void updateOrientation() {
+ Preconditions.checkState(mHandler.getLooper().getThread() == Thread.currentThread(),
+ "must call on " + mHandler.getLooper().getThread()
+ + ", but was " + Thread.currentThread());
if (mPendingRotationChange) {
return;
}
@@ -241,6 +277,26 @@ public class ScreenDecorations extends SystemUI implements Tunable {
}
}
+ private void updateRoundedCornerRadii() {
+ final int newRoundedDefault = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_radius);
+ final int newRoundedDefaultTop = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_radius_top);
+ final int newRoundedDefaultBottom = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_radius_bottom);
+
+ final boolean roundedCornersChanged = mRoundedDefault != newRoundedDefault
+ || mRoundedDefaultBottom != newRoundedDefaultBottom
+ || mRoundedDefaultTop != newRoundedDefaultTop;
+
+ if (roundedCornersChanged) {
+ mRoundedDefault = newRoundedDefault;
+ mRoundedDefaultTop = newRoundedDefaultTop;
+ mRoundedDefaultBottom = newRoundedDefaultBottom;
+ onTuningChanged(SIZE, null);
+ }
+ }
+
private void updateViews() {
View topLeft = mOverlay.findViewById(R.id.left);
View topRight = mOverlay.findViewById(R.id.right);
@@ -306,7 +362,19 @@ public class ScreenDecorations extends SystemUI implements Tunable {
com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout);
}
- private void setupPadding(int padding) {
+
+ private void setupStatusBarPaddingIfNeeded() {
+ // TODO: This should be moved to a more appropriate place, as it is not related to the
+ // screen decorations overlay.
+ int padding = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_content_padding);
+ if (padding != 0) {
+ setupStatusBarPadding(padding);
+ }
+
+ }
+
+ private void setupStatusBarPadding(int padding) {
// Add some padding to all the content near the edge of the screen.
StatusBar sb = getComponent(StatusBar.class);
View statusBar = (sb != null ? sb.getStatusBarWindow() : null);
@@ -375,30 +443,32 @@ public class ScreenDecorations extends SystemUI implements Tunable {
@Override
public void onTuningChanged(String key, String newValue) {
- if (mOverlay == null) return;
- if (SIZE.equals(key)) {
- int size = mRoundedDefault;
- int sizeTop = mRoundedDefaultTop;
- int sizeBottom = mRoundedDefaultBottom;
- if (newValue != null) {
- try {
- size = (int) (Integer.parseInt(newValue) * mDensity);
- } catch (Exception e) {
+ mHandler.post(() -> {
+ if (mOverlay == null) return;
+ if (SIZE.equals(key)) {
+ int size = mRoundedDefault;
+ int sizeTop = mRoundedDefaultTop;
+ int sizeBottom = mRoundedDefaultBottom;
+ if (newValue != null) {
+ try {
+ size = (int) (Integer.parseInt(newValue) * mDensity);
+ } catch (Exception e) {
+ }
}
- }
- if (sizeTop == 0) {
- sizeTop = size;
- }
- if (sizeBottom == 0) {
- sizeBottom = size;
- }
+ if (sizeTop == 0) {
+ sizeTop = size;
+ }
+ if (sizeBottom == 0) {
+ sizeBottom = size;
+ }
- setSize(mOverlay.findViewById(R.id.left), sizeTop);
- setSize(mOverlay.findViewById(R.id.right), sizeTop);
- setSize(mBottomOverlay.findViewById(R.id.left), sizeBottom);
- setSize(mBottomOverlay.findViewById(R.id.right), sizeBottom);
- }
+ setSize(mOverlay.findViewById(R.id.left), sizeTop);
+ setSize(mOverlay.findViewById(R.id.right), sizeTop);
+ setSize(mBottomOverlay.findViewById(R.id.left), sizeBottom);
+ setSize(mBottomOverlay.findViewById(R.id.right), sizeBottom);
+ }
+ });
}
private void setSize(View view, int pixelSize) {
@@ -457,6 +527,11 @@ public class ScreenDecorations extends SystemUI implements Tunable {
mVisibilityChangedListener = visibilityChangedListener;
mDecorations = decorations;
setId(R.id.display_cutout);
+ if (DEBUG) {
+ getViewTreeObserver().addOnDrawListener(() -> Log.i(TAG,
+ (mInitialStart ? "OverlayTop" : "OverlayBottom")
+ + " drawn in rot " + mRotation));
+ }
}
public void setColor(int color) {
@@ -692,20 +767,66 @@ public class ScreenDecorations extends SystemUI implements Tunable {
private class RestartingPreDrawListener implements ViewTreeObserver.OnPreDrawListener {
private final View mView;
+ private final int mTargetRotation;
- private RestartingPreDrawListener(View view) {
+ private RestartingPreDrawListener(View view, int targetRotation) {
mView = view;
+ mTargetRotation = targetRotation;
}
@Override
public boolean onPreDraw() {
- mPendingRotationChange = false;
mView.getViewTreeObserver().removeOnPreDrawListener(this);
+
+ if (mTargetRotation == mRotation) {
+ if (DEBUG) {
+ Log.i(TAG, (mView == mOverlay ? "OverlayTop" : "OverlayBottom")
+ + " already in target rot "
+ + mTargetRotation + ", allow draw without restarting it");
+ }
+ return true;
+ }
+
+ mPendingRotationChange = false;
// This changes the window attributes - we need to restart the traversal for them to
// take effect.
updateOrientation();
+ if (DEBUG) {
+ Log.i(TAG, (mView == mOverlay ? "OverlayTop" : "OverlayBottom")
+ + " restarting listener fired, restarting draw for rot " + mRotation);
+ }
mView.invalidate();
return false;
}
}
+
+ /**
+ * A pre-draw listener, that validates that the rotation we draw in matches the displays
+ * rotation before continuing the draw.
+ *
+ * This is to prevent a race condition, where we have not received the display changed event
+ * yet, and would thus draw in an old orientation.
+ */
+ private class ValidatingPreDrawListener implements ViewTreeObserver.OnPreDrawListener {
+
+ private final View mView;
+
+ public ValidatingPreDrawListener(View view) {
+ mView = view;
+ }
+
+ @Override
+ public boolean onPreDraw() {
+ final int displayRotation = RotationUtils.getExactRotation(mContext);
+ if (displayRotation != mRotation && !mPendingRotationChange) {
+ if (DEBUG) {
+ Log.i(TAG, "Drawing rot " + mRotation + ", but display is at rot "
+ + displayRotation + ". Restarting draw");
+ }
+ mView.invalidate();
+ return false;
+ }
+ return true;
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 89688fba1cc6..33db2c8bc16f 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1647,7 +1647,6 @@ public class KeyguardViewMediator extends SystemUI {
resetKeyguardDonePendingLocked();
}
- mUpdateMonitor.clearFailedUnlockAttempts();
mUpdateMonitor.clearFingerprintRecognized();
if (mGoingToSleep) {
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index da41136767aa..2e5eb342347b 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -266,9 +266,12 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|| mEstimate.estimateMillis < mSevereWarningThreshold) {
nb.setColor(Utils.getColorAttr(mContext, android.R.attr.colorError));
}
- nb.addAction(0,
- mContext.getString(R.string.battery_saver_start_action),
- pendingBroadcast(ACTION_START_SAVER));
+
+ if (!mPowerMan.isPowerSaveMode()) {
+ nb.addAction(0,
+ mContext.getString(R.string.battery_saver_start_action),
+ pendingBroadcast(ACTION_START_SAVER));
+ }
nb.setOnlyAlertOnce(!mPlaySound);
mPlaySound = false;
SystemUI.overrideNotificationAppName(mContext, nb, false);
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
index 9a648d17c4ff..0b9067e5dc1f 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
@@ -333,10 +333,11 @@ public class PowerUI extends SystemUI {
@VisibleForTesting
boolean shouldDismissLowBatteryWarning(boolean plugged, int oldBucket, int bucket,
long timeRemaining, boolean isPowerSaver) {
- final boolean hybridWouldDismiss = mEnhancedEstimates.isHybridNotificationEnabled()
+ final boolean hybridEnabled = mEnhancedEstimates.isHybridNotificationEnabled();
+ final boolean hybridWouldDismiss = hybridEnabled
&& timeRemaining > mEnhancedEstimates.getLowWarningThreshold();
final boolean standardWouldDismiss = (bucket > oldBucket && bucket > 0);
- return isPowerSaver
+ return (isPowerSaver && !hybridEnabled)
|| plugged
|| (standardWouldDismiss && (!mEnhancedEstimates.isHybridNotificationEnabled()
|| hybridWouldDismiss));
@@ -344,14 +345,14 @@ public class PowerUI extends SystemUI {
private boolean isEnhancedTrigger(boolean plugged, long timeRemaining, boolean isPowerSaver,
int batteryStatus) {
- if (plugged || isPowerSaver || batteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) {
+ if (plugged || batteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) {
return false;
}
int warnLevel = mLowBatteryReminderLevels[0];
int critLevel = mLowBatteryReminderLevels[1];
- // Only show the low warning once per charge cycle
- final boolean canShowWarning = !mLowWarningShownThisChargeCycle
+ // Only show the low warning once per charge cycle & no battery saver
+ final boolean canShowWarning = !mLowWarningShownThisChargeCycle && !isPowerSaver
&& (timeRemaining < mEnhancedEstimates.getLowWarningThreshold()
|| mBatteryLevel <= warnLevel);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 0876a5d3f456..3fc258b1e8e9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -285,9 +285,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback, Brightne
updatePageIndicator();
- for (TileRecord r : mRecords) {
- r.tile.clearState();
- }
if (mListening) {
refreshAllTiles();
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
index 53a576d3519d..591e9e015897 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -95,7 +95,6 @@ public class TileQueryHelper {
continue;
}
tile.setListening(this, true);
- tile.clearState();
tile.refreshState();
tile.setListening(this, false);
tile.setTileSpec(spec);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
index 834feb7781ea..022a2b4a5fbf 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
@@ -211,10 +211,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
mHandler.obtainMessage(H.REFRESH_STATE, arg).sendToTarget();
}
- public void clearState() {
- mHandler.sendEmptyMessage(H.CLEAR_STATE);
- }
-
public void userSwitch(int newUserId) {
mHandler.obtainMessage(H.USER_SWITCH, newUserId, 0).sendToTarget();
}
@@ -266,11 +262,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
public abstract Intent getLongClickIntent();
- protected void handleClearState() {
- mTmpState = newTileState();
- mState = newTileState();
- }
-
protected void handleRefreshState(Object arg) {
handleUpdateState(mTmpState, arg);
final boolean changed = mTmpState.copyTo(mState);
@@ -409,11 +400,10 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
private static final int TOGGLE_STATE_CHANGED = 8;
private static final int SCAN_STATE_CHANGED = 9;
private static final int DESTROY = 10;
- private static final int CLEAR_STATE = 11;
- private static final int REMOVE_CALLBACKS = 12;
- private static final int REMOVE_CALLBACK = 13;
- private static final int SET_LISTENING = 14;
- private static final int STALE = 15;
+ private static final int REMOVE_CALLBACKS = 11;
+ private static final int REMOVE_CALLBACK = 12;
+ private static final int SET_LISTENING = 13;
+ private static final int STALE = 14;
@VisibleForTesting
protected H(Looper looper) {
@@ -467,9 +457,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile {
} else if (msg.what == DESTROY) {
name = "handleDestroy";
handleDestroy();
- } else if (msg.what == CLEAR_STATE) {
- name = "handleClearState";
- handleClearState();
} else if (msg.what == SET_LISTENING) {
name = "handleSetListeningInternal";
handleSetListeningInternal(msg.obj, msg.arg1 != 0);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java
index 06f26c9cbc7c..469c3c2c60b1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java
@@ -667,9 +667,15 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater.
entry.row.getNotificationChildren();
for (int i = 0; i < notificationChildren.size(); i++) {
ExpandableNotificationRow row = notificationChildren.get(i);
- if ((row.getStatusBarNotification().getNotification().flags
- & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
- // the child is a foreground service notification which we can't remove!
+ NotificationData.Entry childEntry = row.getEntry();
+ boolean isForeground = (row.getStatusBarNotification().getNotification().flags
+ & Notification.FLAG_FOREGROUND_SERVICE) != 0;
+ boolean keepForReply = FORCE_REMOTE_INPUT_HISTORY
+ && (shouldKeepForRemoteInput(childEntry)
+ || shouldKeepForSmartReply(childEntry));
+ if (isForeground || keepForReply) {
+ // the child is a foreground service notification which we can't remove or it's
+ // a child we're keeping around for reply!
continue;
}
row.setKeepInParent(true);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 306319903ecb..a215ec6ecafa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -151,12 +151,11 @@ public class NotificationShelf extends ActivatableNotificationView implements
}
public void fadeInTranslating() {
- float translation = mShelfIcons.getTranslationY();
- mShelfIcons.setTranslationY(translation - mShelfAppearTranslation);
+ mShelfIcons.setTranslationY(-mShelfAppearTranslation);
mShelfIcons.setAlpha(0);
mShelfIcons.animate()
.setInterpolator(Interpolators.DECELERATE_QUINT)
- .translationY(translation)
+ .translationY(0)
.setDuration(SHELF_IN_TRANSLATION_DURATION)
.start();
mShelfIcons.animate()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 7e6abe95e226..5c18782727df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1358,9 +1358,7 @@ public class NotificationPanelView extends PanelView implements
mQsExpansionHeight = height;
updateQsExpansion();
requestScrollerTopPaddingUpdate(false /* animate */);
- if (mKeyguardShowing) {
- updateHeaderKeyguardAlpha();
- }
+ updateHeaderKeyguardAlpha();
if (mStatusBarState == StatusBarState.SHADE_LOCKED
|| mStatusBarState == StatusBarState.KEYGUARD) {
updateKeyguardBottomAreaAlpha();
@@ -1763,6 +1761,9 @@ public class NotificationPanelView extends PanelView implements
}
private void updateHeaderKeyguardAlpha() {
+ if (!mKeyguardShowing) {
+ return;
+ }
float alphaQsExpansion = 1 - Math.min(1, getQsExpansionFraction() * 2);
mKeyguardStatusBar.setAlpha(Math.min(getKeyguardContentsAlpha(), alphaQsExpansion)
* mKeyguardStatusBarAnimateAlpha);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
index bd73a4064908..d68e2fa34cbc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
@@ -189,7 +189,7 @@ public class QuickStepController implements GestureHelper {
mNavigationBarView.getDownHitTarget() == HIT_TARGET_DEAD_ZONE;
if (mOverviewEventSender.getProxy() == null || (!mNavigationBarView.isQuickScrubEnabled()
&& !mNavigationBarView.isQuickStepSwipeUpEnabled())) {
- return false;
+ return deadZoneConsumed;
}
mNavigationBarView.requestUnbufferedDispatch(event);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
index fadc0eac9e73..a38328a8161e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
@@ -180,6 +180,15 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D
mLpChanged.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
}
+ private void applyExpandedFlag(State state) {
+ if (state.panelExpanded || state.isKeyguardShowingAndNotOccluded() || state.bouncerShowing
+ || ENABLE_REMOTE_INPUT && state.remoteInputActive) {
+ mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
+ } else {
+ mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
+ }
+ }
+
private void applyHeight(State state) {
boolean expanded = isExpanded(state);
if (state.forcePluginOpen) {
@@ -234,6 +243,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D
applyKeyguardFlags(state);
applyForceStatusBarVisibleFlag(state);
applyFocusableFlag(state);
+ applyExpandedFlag(state);
adjustScreenOrientation(state);
applyHeight(state);
applyUserActivityTimeout(state);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java
index d6d0673e2c0b..3c16329e6f19 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java
@@ -134,6 +134,10 @@ public class HotspotControllerImpl implements HotspotController, WifiManager.Sof
@Override
public void setHotspotEnabled(boolean enabled) {
+ if (mWaitingForCallback) {
+ if (DEBUG) Log.d(TAG, "Ignoring setHotspotEnabled; waiting for callback.");
+ return;
+ }
if (enabled) {
OnStartTetheringCallback callback = new OnStartTetheringCallback();
mWaitingForCallback = true;
diff --git a/packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java b/packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java
index d7c4bbf3ea1d..c97095e1860b 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java
@@ -21,11 +21,13 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.res.Resources.NotFoundException;
import android.media.AudioManager;
import android.util.Log;
import android.view.KeyEvent;
import android.view.WindowManager;
+
import com.android.systemui.statusbar.phone.SystemUIDialog;
abstract public class SafetyWarningDialog extends SystemUIDialog
@@ -40,12 +42,18 @@ abstract public class SafetyWarningDialog extends SystemUIDialog
private long mShowTime;
private boolean mNewVolumeUp;
+ private boolean mDisableOnVolumeUp;
public SafetyWarningDialog(Context context, AudioManager audioManager) {
super(context);
mContext = context;
mAudioManager = audioManager;
-
+ try {
+ mDisableOnVolumeUp = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_safe_media_disable_on_volume_up);
+ } catch (NotFoundException e) {
+ mDisableOnVolumeUp = true;
+ }
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
setShowForAllUsers(true);
setMessage(mContext.getString(com.android.internal.R.string.safe_media_volume_warning));
@@ -63,7 +71,8 @@ abstract public class SafetyWarningDialog extends SystemUIDialog
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_VOLUME_UP && event.getRepeatCount() == 0) {
+ if (mDisableOnVolumeUp && keyCode == KeyEvent.KEYCODE_VOLUME_UP
+ && event.getRepeatCount() == 0) {
mNewVolumeUp = true;
}
return super.onKeyDown(keyCode, event);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
index f1bf31d7a58a..cc969177ab2e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
@@ -21,6 +21,7 @@ import static com.android.systemui.tuner.TunablePadding.FLAG_START;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
@@ -34,8 +35,10 @@ import static org.mockito.Mockito.when;
import android.app.Fragment;
import android.content.res.Configuration;
+import android.os.Handler;
import android.support.test.filters.SmallTest;
import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import android.view.Display;
import android.view.View;
@@ -60,6 +63,7 @@ import org.junit.runner.RunWith;
@SmallTest
public class ScreenDecorationsTest extends SysuiTestCase {
+ private TestableLooper mTestableLooper;
private ScreenDecorations mScreenDecorations;
private StatusBar mStatusBar;
private WindowManager mWindowManager;
@@ -71,6 +75,10 @@ public class ScreenDecorationsTest extends SysuiTestCase {
@Before
public void setup() {
+ mTestableLooper = TestableLooper.get(this);
+ mDependency.injectTestDependency(Dependency.MAIN_HANDLER,
+ new Handler(mTestableLooper.getLooper()));
+
mStatusBar = mock(StatusBar.class);
mWindowManager = mock(WindowManager.class);
mView = spy(new StatusBarWindowView(mContext, null));
@@ -88,7 +96,31 @@ public class ScreenDecorationsTest extends SysuiTestCase {
mTunerService = mDependency.injectMockDependency(TunerService.class);
- mScreenDecorations = new ScreenDecorations();
+
+ mScreenDecorations = new ScreenDecorations() {
+ @Override
+ public void start() {
+ super.start();
+ mTestableLooper.processAllMessages();
+ }
+
+ @Override
+ Handler startHandlerThread() {
+ return new Handler(mTestableLooper.getLooper());
+ }
+
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ mTestableLooper.processAllMessages();
+ }
+
+ @Override
+ public void onTuningChanged(String key, String newValue) {
+ super.onTuningChanged(key, newValue);
+ mTestableLooper.processAllMessages();
+ }
+ };
mScreenDecorations.mContext = mContext;
mScreenDecorations.mComponents = mContext.getComponents();
@@ -195,4 +227,17 @@ public class ScreenDecorationsTest extends SysuiTestCase {
verify(padding).destroy();
}
+ @Test
+ public void testUpdateRoundedCorners() {
+ mContext.getOrCreateTestableResources().addOverride(
+ com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout, false);
+ mContext.getOrCreateTestableResources().addOverride(dimen.rounded_corner_radius, 20);
+
+ mScreenDecorations.start();
+ assertEquals(mScreenDecorations.mRoundedDefault, 20);
+
+ mContext.getOrCreateTestableResources().addOverride(dimen.rounded_corner_radius, 5);
+ mScreenDecorations.onConfigurationChanged(null);
+ assertEquals(mScreenDecorations.mRoundedDefault, 5);
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
index 5ecf0c04aeb1..a9d49f91e44e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
@@ -323,9 +323,9 @@ public class PowerUITest extends SysuiTestCase {
}
@Test
- public void testShouldDismissLowBatteryWarning_dismissWhenPowerSaverEnabled() {
+ public void testShouldDismissLowBatteryWarning_dismissWhenPowerSaverEnabledLegacy() {
mPowerUI.start();
- when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(false);
when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
@@ -337,6 +337,20 @@ public class PowerUITest extends SysuiTestCase {
}
@Test
+ public void testShouldNotDismissLowBatteryWarning_dismissWhenPowerSaverEnabledHybrid() {
+ mPowerUI.start();
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
+
+ // device that gets power saver turned on should dismiss
+ boolean shouldDismiss =
+ mPowerUI.shouldDismissLowBatteryWarning(UNPLUGGED, BELOW_WARNING_BUCKET,
+ BELOW_WARNING_BUCKET, ABOVE_HYBRID_THRESHOLD, !POWER_SAVER_OFF);
+ assertFalse(shouldDismiss);
+ }
+
+ @Test
public void testShouldDismissLowBatteryWarning_dismissWhenPlugged() {
mPowerUI.start();
when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
diff --git a/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
index 754ba722d081..b08924b8adb6 100644
--- a/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Corner display cutout</string>
+ <string name="display_cutout_emulation_overlay">Corner cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml
index 68c2dcbbe3f6..0a106fa0c08f 100644
--- a/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Double display cutout</string>
+ <string name="display_cutout_emulation_overlay">Double cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
index 49896773ac55..0bf83306f875 100644
--- a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
@@ -18,7 +18,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Narrow display cutout</string>
+ <string name="display_cutout_emulation_overlay">Narrow cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
index 6dcbbd923601..bcc7c9756a6e 100644
--- a/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Tall display cutout</string>
+ <string name="display_cutout_emulation_overlay">Tall cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
index f4b9f7ea7c37..0fcbdebbd345 100644
--- a/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Wide display cutout</string>
+ <string name="display_cutout_emulation_overlay">Wide cutout</string>
</resources>
diff --git a/proto/src/gnss.proto b/proto/src/gnss.proto
index 016839232255..1509fc00fb1d 100644
--- a/proto/src/gnss.proto
+++ b/proto/src/gnss.proto
@@ -45,6 +45,9 @@ message GnssLog {
// Power metrics
optional PowerMetrics power_metrics = 12;
+
+ // Hardware revision (EVT, DVT, PVT etc.)
+ optional string hardware_revision = 13;
}
// Power metrics
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 03ab60c33f51..b990175fd616 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -941,9 +941,10 @@ message MetricsEvent {
// OS: 6.0
NOTIFICATION_ZEN_MODE_EVENT_RULE = 146;
- // ACTION: App notification settings > Block Notifications
+ // ACTION: App notification settings > Block Notifications or long press on
+ // notification blocks.
// CATEGORY: SETTINGS
- // OS: 6.0
+ // OS: 9.0
ACTION_BAN_APP_NOTES = 147;
// ACTION: Notification shade > Dismiss all button
@@ -6129,6 +6130,305 @@ message MetricsEvent {
// CATEGORY: NOTIFICATION
NOTIFICATION_INTERRUPTION = 1501;
+ // OPEN: Settings
+ // CATEGORY: SETTINGS
+ // OS: Q
+ SETTINGS_HOMEPAGE = 1502;
+
+ // OPEN: Settings > Create shortcut(widget)
+ // CATEGORY: SETTINGS
+ // OS: Q
+ SETTINGS_CREATE_SHORTCUT = 1503;
+
+ // ACTION: Authenticate using fingerprint
+ // CATEGORY: SETTINGS
+ // OS: Q
+ ACTION_FACE_AUTH = 1504;
+
+ // ACTION: Add fingerprint > Enroll fingerprint
+ // CATEGORY: SETTINGS
+ // OS: Q
+ ACTION_FACE_ENROLL = 1505;
+
+ // OPEN: Face Enroll introduction
+ // CATEGORY: SETTINGS
+ // OS: Q
+ FACE_ENROLL_INTRO = 1506;
+
+ // OPEN: Face Enroll introduction
+ // CATEGORY: SETTINGS
+ // OS: Q
+ FACE_ENROLL_ENROLLING = 1507;
+
+ // OPEN: Face Enroll introduction
+ // CATEGORY: SETTINGS
+ // OS: Q
+ FACE_ENROLL_FINISHED = 1508;
+
+ // OPEN: Face Enroll sidecar
+ // CATEGORY: SETTINGS
+ // OS: Q
+ FACE_ENROLL_SIDECAR = 1509;
+
+ // OPEN: Settings > Add face > Error dialog
+ // OS: Q
+ DIALOG_FACE_ERROR = 1510;
+
+ // OPEN: Settings > Security > Face
+ // CATEGORY: SETTINGS
+ // OS: Q
+ FACE = 1511;
+
+ // OPEN: Settings > Acessibility > HearingAid pairing instructions dialog
+ // CATEGORY: SETTINGS
+ // OS: Q
+ DIALOG_ACCESSIBILITY_HEARINGAID = 1512;
+
+ // ACTION: Activity start
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ ACTION_ACTIVITY_START = 1513;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling UID
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_UID = 1514;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling package name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_PACKAGE_NAME = 1515;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling UID proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_UID_PROC_STATE = 1516;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling UID has any visible window
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_UID_HAS_ANY_VISIBLE_WINDOW = 1517;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Real calling UID
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_REAL_CALLING_UID = 1518;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Real calling UID proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_REAL_CALLING_UID_PROC_STATE = 1519;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Real calling UID has any visible window
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_REAL_CALLING_UID_HAS_ANY_VISIBLE_WINDOW = 1520;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_UID = 1521;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID package name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_PACKAGE_NAME = 1522;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_UID_PROC_STATE = 1523;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID has any visible window
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_UID_HAS_ANY_VISIBLE_WINDOW = 1524;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target doze whitelist tag
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_WHITELIST_TAG = 1525;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target short component name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_SHORT_COMPONENT_NAME = 1526;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Coming from pending intent
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_COMING_FROM_PENDING_INTENT = 1527;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Intent action
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_INTENT_ACTION = 1528;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record process name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_PROCESS_NAME = 1529;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record current proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_CUR_PROC_STATE = 1530;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has client activities
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_CLIENT_ACTIVITIES = 1531;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has foreground services
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_FOREGROUND_SERVICES = 1532;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has foreground activities
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_FOREGROUND_ACTIVITIES = 1533;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has top UI
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_TOP_UI = 1534;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has overlay UI
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_OVERLAY_UI = 1535;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record pending UI clean
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_PENDING_UI_CLEAN = 1536;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since caller app's process record last interaction event
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_MILLIS_SINCE_LAST_INTERACTION_EVENT = 1537;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since caller app's process record fg interaction
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_MILLIS_SINCE_FG_INTERACTION = 1538;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since caller app's process record last became unimportant
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_MILLIS_SINCE_UNIMPORTANT = 1539;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record launch mode
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_LAUNCH_MODE = 1540;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record target activity
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY = 1541;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record flags
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_FLAGS = 1542;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record real activity
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_REAL_ACTIVITY = 1543;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record short component name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME = 1544;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record process name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_PROCESS_NAME = 1545;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is fullscreen
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_FULLSCREEN = 1546;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is no display
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_NO_DISPLAY = 1547;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since activity was last visible
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_VISIBLE = 1548;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record's resultTo packageName
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_RESULT_TO_PKG_NAME = 1549;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record's resultTo shortComponentName
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_RESULT_TO_SHORT_COMPONENT_NAME = 1550;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is visible
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_VISIBLE = 1551;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is visible ignoring keyguard
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_VISIBLE_IGNORING_KEYGUARD = 1552;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since activity's last launch
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_LAUNCH = 1553;
+
// OPEN: Emergency dialer opened
// CLOSE: Emergency dialer closed
// SUBTYPE: The entry type that user opened emergency dialer
diff --git a/proto/src/wifi.proto b/proto/src/wifi.proto
index 72f11e0a63c1..b29c992120d4 100644
--- a/proto/src/wifi.proto
+++ b/proto/src/wifi.proto
@@ -457,6 +457,11 @@ message WifiLog {
// Identifier for experimental scoring parameter settings.
optional string score_experiment_id = 117;
+ // Histogram of the EAP method type of all installed Passpoint profiles
+ repeated PasspointProfileTypeCount installed_passpoint_profile_type = 123;
+
+ // Hardware revision (EVT, DVT, PVT etc.)
+ optional string hardware_revision = 124;
}
// Information that gets logged for every WiFi connection.
@@ -1503,3 +1508,31 @@ message WifiRttLog {
optional int32 count = 2;
}
}
+
+message PasspointProfileTypeCount {
+ enum EapMethod {
+ // Unknown Type
+ TYPE_UNKNOWN = 0;
+
+ // EAP_TLS (13)
+ TYPE_EAP_TLS = 1;
+
+ // EAP_TTLS (21)
+ TYPE_EAP_TTLS = 2;
+
+ // EAP_SIM (18)
+ TYPE_EAP_SIM = 3;
+
+ // EAP_AKA (23)
+ TYPE_EAP_AKA = 4;
+
+ // EAP_AKA_PRIME (50)
+ TYPE_EAP_AKA_PRIME = 5;
+ }
+
+ // Eap method type set in Passpoint profile
+ optional EapMethod eap_method_type = 1;
+
+ // Num of installed Passpoint profile with same eap method
+ optional int32 count = 2;
+}
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java
index c9c7adc45697..f69b6387a605 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java
@@ -48,11 +48,6 @@ public class AppWidgetService extends SystemService {
}
@Override
- public void onUnlockUser(int userHandle) {
- FgThread.getHandler().post(() -> mImpl.onUserUnlocked(userHandle));
- }
-
- @Override
public void onStopUser(int userHandle) {
mImpl.onUserStopped(userHandle);
}
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index db8ad12cfdf8..b71d7a726b28 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -19,7 +19,6 @@ package com.android.server.appwidget;
import static android.content.Context.KEYGUARD_SERVICE;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
-
import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;
import android.annotation.UserIdInt;
@@ -2697,7 +2696,12 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
}
- void onUserUnlocked(int userId) {
+ /**
+ * This does not use the usual onUserUnlocked() listener mechanism because it is
+ * invoked at a choreographed point in the middle of the user unlock sequence,
+ * before the boot-completed broadcast is issued and the listeners notified.
+ */
+ void handleUserUnlocked(int userId) {
if (isProfileWithLockedParent(userId)) {
return;
}
@@ -2734,7 +2738,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
}
}
- Slog.i(TAG, "Async processing of onUserUnlocked u" + userId + " took "
+ Slog.i(TAG, "Processing of handleUserUnlocked u" + userId + " took "
+ (SystemClock.elapsedRealtime() - time) + " ms");
}
@@ -4801,5 +4805,11 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
return widgetPackages;
}
}
+
+ @Override
+ public void unlockUser(int userId) {
+ handleUserUnlocked(userId);
+ }
+
}
}
diff --git a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
index dc84498353ea..58823036212d 100644
--- a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
+++ b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
@@ -81,6 +81,13 @@ final class SaveUi {
void onDestroy();
}
+ /**
+ * Wrapper that guarantees that only one callback is triggered by ignoring further calls after
+ * it's destroyed.
+ *
+ * <p>It's needed becase {@link #onCancel(IntentSender)} is always called when the Save UI
+ * dialog is dismissed.
+ */
private class OneTimeListener implements OnSaveListener {
private final OnSaveListener mRealListener;
@@ -96,7 +103,6 @@ final class SaveUi {
if (mDone) {
return;
}
- mDone = true;
mRealListener.onSave();
}
@@ -106,7 +112,6 @@ final class SaveUi {
if (mDone) {
return;
}
- mDone = true;
mRealListener.onCancel(listener);
}
diff --git a/services/core/Android.bp b/services/core/Android.bp
index 43469fff3088..9b8f51e49b26 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -6,7 +6,6 @@ java_library_static {
"frameworks/native/aidl/binder",
"frameworks/native/cmds/dumpstate/binder",
"system/core/storaged/binder",
- "system/netd/server/binder",
"system/vold/binder",
],
},
@@ -19,7 +18,6 @@ java_library_static {
":mediaupdateservice_aidl",
"java/com/android/server/EventLogTags.logtags",
"java/com/android/server/am/EventLogTags.logtags",
- ":netd_metrics_aidl",
],
libs: [
@@ -49,6 +47,7 @@ java_library_static {
"android.hardware.contexthub-V1.0-java",
"android.hidl.manager-V1.0-java",
"netd_aidl_interface-java",
+ "netd_event_listener_interface-java",
],
}
diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index 5c14459da566..50f15ca0739f 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -624,7 +624,7 @@ public final class BatteryService extends SystemService {
// them will get the new sequence number at that point. (See for example how testing
// of JobScheduler's BatteryController works.)
sendBatteryChangedIntentLocked();
- if (mLastBatteryLevel != mHealthInfo.batteryLevel) {
+ if (mLastBatteryLevel != mHealthInfo.batteryLevel || mLastPlugType != mPlugType) {
sendBatteryLevelChangedIntentLocked();
}
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index fc1e1f016c4d..d0e8b47e6db7 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -951,18 +951,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
// INetworkManagementService members
//
@Override
- public INetd getNetdService() throws RemoteException {
- final CountDownLatch connectedSignal = mConnectedSignal;
- if (connectedSignal != null) {
- try {
- connectedSignal.await();
- } catch (InterruptedException ignored) {}
- }
-
- return mNetdService;
- }
-
- @Override
public String[] listInterfaces() {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
diff --git a/services/core/java/com/android/server/PinnerService.java b/services/core/java/com/android/server/PinnerService.java
index f5b29e9b76b8..0deaee7f7878 100644
--- a/services/core/java/com/android/server/PinnerService.java
+++ b/services/core/java/com/android/server/PinnerService.java
@@ -43,6 +43,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.MediaStore;
import android.provider.Settings;
import android.system.ErrnoException;
@@ -69,6 +70,7 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.List;
import java.util.ArrayList;
import java.util.zip.ZipFile;
@@ -103,6 +105,7 @@ public final class PinnerService extends SystemService {
private final Context mContext;
private final ActivityManagerInternal mAmInternal;
private final IActivityManager mAm;
+ private final UserManager mUserManager;
/** The list of the statically pinned files. */
@GuardedBy("this")
@@ -164,6 +167,8 @@ public final class PinnerService extends SystemService {
mAmInternal = LocalServices.getService(ActivityManagerInternal.class);
mAm = ActivityManager.getService();
+ mUserManager = mContext.getSystemService(UserManager.class);
+
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
filter.addDataScheme("package");
@@ -194,12 +199,16 @@ public final class PinnerService extends SystemService {
*/
@Override
public void onSwitchUser(int userHandle) {
- sendPinAppsMessage(userHandle);
+ if (!mUserManager.isManagedProfile(userHandle)) {
+ sendPinAppsMessage(userHandle);
+ }
}
@Override
public void onUnlockUser(int userHandle) {
- sendPinAppsMessage(userHandle);
+ if (!mUserManager.isManagedProfile(userHandle)) {
+ sendPinAppsMessage(userHandle);
+ }
}
/**
@@ -345,31 +354,76 @@ public final class PinnerService extends SystemService {
}
private ApplicationInfo getCameraInfo(int userHandle) {
- // find the camera via an intent
- // use INTENT_ACTION_STILL_IMAGE_CAMERA instead of _SECURE. On a
- // device without a fbe enabled, the _SECURE intent will never get set.
Intent cameraIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
- return getApplicationInfoForIntent(cameraIntent, userHandle);
+ ApplicationInfo info = getApplicationInfoForIntent(cameraIntent, userHandle,
+ false /* defaultToSystemApp */);
+
+ // If the STILL_IMAGE_CAMERA intent doesn't resolve, try the _SECURE intent.
+ // We don't use _SECURE first because it will never get set on a device
+ // without File-based Encryption. But if the user has only set the intent
+ // before unlocking their device, we may still be able to identify their
+ // preference using this intent.
+ if (info == null) {
+ cameraIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE);
+ info = getApplicationInfoForIntent(cameraIntent, userHandle,
+ false /* defaultToSystemApp */);
+ }
+
+ // If the _SECURE intent doesn't resolve, try the original intent but request
+ // the system app for camera if there was more than one result.
+ if (info == null) {
+ cameraIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
+ info = getApplicationInfoForIntent(cameraIntent, userHandle,
+ true /* defaultToSystemApp */);
+ }
+ return info;
}
private ApplicationInfo getHomeInfo(int userHandle) {
Intent intent = mAmInternal.getHomeIntent();
- return getApplicationInfoForIntent(intent, userHandle);
+ return getApplicationInfoForIntent(intent, userHandle, false);
}
- private ApplicationInfo getApplicationInfoForIntent(Intent intent, int userHandle) {
+ private ApplicationInfo getApplicationInfoForIntent(Intent intent, int userHandle,
+ boolean defaultToSystemApp) {
if (intent == null) {
return null;
}
- ResolveInfo info = mContext.getPackageManager().resolveActivityAsUser(intent,
+
+ ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivityAsUser(intent,
MATCH_FLAGS, userHandle);
- if (info == null) {
+
+ // If this intent can resolve to only one app, choose that one.
+ // Otherwise, if we've requested to default to the system app, return it;
+ // if we have not requested that default, return null if there's more than one option.
+ // If there's more than one system app, return null since we don't know which to pick.
+ if (resolveInfo == null) {
return null;
}
- if (isResolverActivity(info.activityInfo)) {
- return null;
+
+ if (!isResolverActivity(resolveInfo.activityInfo)) {
+ return resolveInfo.activityInfo.applicationInfo;
}
- return info.activityInfo.applicationInfo;
+
+ if (defaultToSystemApp) {
+ List<ResolveInfo> infoList = mContext.getPackageManager()
+ .queryIntentActivitiesAsUser(intent, MATCH_FLAGS, userHandle);
+ ApplicationInfo systemAppInfo = null;
+ for (ResolveInfo info : infoList) {
+ if ((info.activityInfo.applicationInfo.flags
+ & ApplicationInfo.FLAG_SYSTEM) != 0) {
+ if (systemAppInfo == null) {
+ systemAppInfo = info.activityInfo.applicationInfo;
+ } else {
+ // If there's more than one system app, return null due to ambiguity.
+ return null;
+ }
+ }
+ }
+ return systemAppInfo;
+ }
+
+ return null;
}
private void sendPinAppsMessage(int userHandle) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerConstants.java b/services/core/java/com/android/server/am/ActivityManagerConstants.java
index 6550d06b8a12..d14c1a1adf77 100644
--- a/services/core/java/com/android/server/am/ActivityManagerConstants.java
+++ b/services/core/java/com/android/server/am/ActivityManagerConstants.java
@@ -67,6 +67,7 @@ final class ActivityManagerConstants extends ContentObserver {
static final String KEY_BOUND_SERVICE_CRASH_RESTART_DURATION = "service_crash_restart_duration";
static final String KEY_BOUND_SERVICE_CRASH_MAX_RETRY = "service_crash_max_retry";
static final String KEY_PROCESS_START_ASYNC = "process_start_async";
+ static final String KEY_TOP_TO_FGS_GRACE_DURATION = "top_to_fgs_grace_duration";
private static final int DEFAULT_MAX_CACHED_PROCESSES = 32;
private static final long DEFAULT_BACKGROUND_SETTLE_TIME = 60*1000;
@@ -95,7 +96,7 @@ final class ActivityManagerConstants extends ContentObserver {
private static final long DEFAULT_BOUND_SERVICE_CRASH_RESTART_DURATION = 30*60_000;
private static final int DEFAULT_BOUND_SERVICE_CRASH_MAX_RETRY = 16;
private static final boolean DEFAULT_PROCESS_START_ASYNC = true;
-
+ private static final long DEFAULT_TOP_TO_FGS_GRACE_DURATION = 15 * 1000;
// Maximum number of cached processes we will allow.
public int MAX_CACHED_PROCESSES = DEFAULT_MAX_CACHED_PROCESSES;
@@ -207,6 +208,14 @@ final class ActivityManagerConstants extends ContentObserver {
// Indicates if the processes need to be started asynchronously.
public boolean FLAG_PROCESS_START_ASYNC = DEFAULT_PROCESS_START_ASYNC;
+ // Allow app just moving from TOP to FOREGROUND_SERVICE to stay in a higher adj value for
+ // this long.
+ public long TOP_TO_FGS_GRACE_DURATION = DEFAULT_TOP_TO_FGS_GRACE_DURATION;
+
+ // Indicates whether the activity starts logging is enabled.
+ // Controlled by Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED
+ boolean mFlagActivityStartsLoggingEnabled;
+
private final ActivityManagerService mService;
private ContentResolver mResolver;
private final KeyValueListParser mParser = new KeyValueListParser(',');
@@ -235,6 +244,12 @@ final class ActivityManagerConstants extends ContentObserver {
// memory trimming.
public int CUR_TRIM_CACHED_PROCESSES;
+ private static final Uri ACTIVITY_MANAGER_CONSTANTS_URI = Settings.Global.getUriFor(
+ Settings.Global.ACTIVITY_MANAGER_CONSTANTS);
+
+ private static final Uri ACTIVITY_STARTS_LOGGING_ENABLED_URI = Settings.Global.getUriFor(
+ Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED);
+
public ActivityManagerConstants(ActivityManagerService service, Handler handler) {
super(handler);
mService = service;
@@ -243,9 +258,10 @@ final class ActivityManagerConstants extends ContentObserver {
public void start(ContentResolver resolver) {
mResolver = resolver;
- mResolver.registerContentObserver(Settings.Global.getUriFor(
- Settings.Global.ACTIVITY_MANAGER_CONSTANTS), false, this);
+ mResolver.registerContentObserver(ACTIVITY_MANAGER_CONSTANTS_URI, false, this);
+ mResolver.registerContentObserver(ACTIVITY_STARTS_LOGGING_ENABLED_URI, false, this);
updateConstants();
+ updateActivityStartsLoggingEnabled();
}
public void setOverrideMaxCachedProcesses(int value) {
@@ -263,7 +279,12 @@ final class ActivityManagerConstants extends ContentObserver {
@Override
public void onChange(boolean selfChange, Uri uri) {
- updateConstants();
+ if (uri == null) return;
+ if (ACTIVITY_MANAGER_CONSTANTS_URI.equals(uri)) {
+ updateConstants();
+ } else if (ACTIVITY_STARTS_LOGGING_ENABLED_URI.equals(uri)) {
+ updateActivityStartsLoggingEnabled();
+ }
}
private void updateConstants() {
@@ -332,11 +353,18 @@ final class ActivityManagerConstants extends ContentObserver {
DEFAULT_BOUND_SERVICE_CRASH_MAX_RETRY);
FLAG_PROCESS_START_ASYNC = mParser.getBoolean(KEY_PROCESS_START_ASYNC,
DEFAULT_PROCESS_START_ASYNC);
+ TOP_TO_FGS_GRACE_DURATION = mParser.getDurationMillis(KEY_TOP_TO_FGS_GRACE_DURATION,
+ DEFAULT_TOP_TO_FGS_GRACE_DURATION);
updateMaxCachedProcesses();
}
}
+ private void updateActivityStartsLoggingEnabled() {
+ mFlagActivityStartsLoggingEnabled = Settings.Global.getInt(mResolver,
+ Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED, 0) == 1;
+ }
+
private void updateMaxCachedProcesses() {
CUR_MAX_CACHED_PROCESSES = mOverrideMaxCachedProcesses < 0
? MAX_CACHED_PROCESSES : mOverrideMaxCachedProcesses;
@@ -402,6 +430,8 @@ final class ActivityManagerConstants extends ContentObserver {
pw.println(MAX_SERVICE_INACTIVITY);
pw.print(" "); pw.print(KEY_BG_START_TIMEOUT); pw.print("=");
pw.println(BG_START_TIMEOUT);
+ pw.print(" "); pw.print(KEY_TOP_TO_FGS_GRACE_DURATION); pw.print("=");
+ pw.println(TOP_TO_FGS_GRACE_DURATION);
pw.println();
if (mOverrideMaxCachedProcesses >= 0) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 5df2c64c8a3d..514c9f62387f 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5579,7 +5579,7 @@ public class ActivityManagerService extends IActivityManager.Stub
// TODO: Switch to user app stacks here.
int ret = mActivityStartController.startActivities(caller, -1, callingPackage,
intents, resolvedTypes, resultTo, SafeActivityOptions.fromBundle(bOptions), userId,
- reason);
+ reason, null /* originatingPendingIntent */);
return ret;
}
@@ -10936,6 +10936,20 @@ public class ActivityManagerService extends IActivityManager.Stub
}
}
+ /**
+ * @return whitelist tag for a uid from mPendingTempWhitelist, null if not currently on
+ * the whitelist
+ */
+ String getPendingTempWhitelistTagForUidLocked(int uid) {
+ final PendingTempWhitelist ptw = mPendingTempWhitelist.get(uid);
+ return ptw != null ? ptw.tag : null;
+ }
+
+ @VisibleForTesting
+ boolean isActivityStartsLoggingEnabled() {
+ return mConstants.mFlagActivityStartsLoggingEnabled;
+ }
+
@Override
public void moveStackToDisplay(int stackId, int displayId) {
enforceCallingPermission(INTERNAL_SYSTEM_WINDOW, "moveStackToDisplay()");
@@ -13647,7 +13661,7 @@ public class ActivityManagerService extends IActivityManager.Stub
String extraOptions = null;
switch (bugreportType) {
case ActivityManager.BUGREPORT_OPTION_FULL:
- // Default options.
+ extraOptions = "bugreportfull";
break;
case ActivityManager.BUGREPORT_OPTION_INTERACTIVE:
extraOptions = "bugreportplus";
@@ -23245,6 +23259,19 @@ public class ActivityManagerService extends IActivityManager.Stub
}
}
+ // If the app was recently in the foreground and moved to a foreground service status,
+ // allow it to get a higher rank in memory for some time, compared to other foreground
+ // services so that it can finish performing any persistence/processing of in-memory state.
+ if (app.foregroundServices && adj > ProcessList.PERCEPTIBLE_RECENT_FOREGROUND_APP_ADJ
+ && (app.lastTopTime + mConstants.TOP_TO_FGS_GRACE_DURATION > now
+ || app.setProcState <= ActivityManager.PROCESS_STATE_TOP)) {
+ adj = ProcessList.PERCEPTIBLE_RECENT_FOREGROUND_APP_ADJ;
+ app.adjType = "fg-service-act";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ, "Raise to recent fg: " + app);
+ }
+ }
+
if (adj > ProcessList.PERCEPTIBLE_APP_ADJ
|| procState > ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND) {
if (app.forcingToImportant != null) {
@@ -23509,6 +23536,10 @@ public class ActivityManagerService extends IActivityManager.Stub
schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
procState = ActivityManager.PROCESS_STATE_PERSISTENT;
}
+ } else if ((cr.flags & Context.BIND_ADJUST_BELOW_PERCEPTIBLE) != 0
+ && clientAdj < ProcessList.PERCEPTIBLE_APP_ADJ
+ && adj > ProcessList.PERCEPTIBLE_APP_ADJ + 1) {
+ newAdj = ProcessList.PERCEPTIBLE_APP_ADJ + 1;
} else if ((cr.flags&Context.BIND_NOT_VISIBLE) != 0
&& clientAdj < ProcessList.PERCEPTIBLE_APP_ADJ
&& adj > ProcessList.PERCEPTIBLE_APP_ADJ) {
@@ -24479,6 +24510,8 @@ public class ActivityManagerService extends IActivityManager.Stub
// Must be called before updating setProcState
maybeUpdateUsageStatsLocked(app, nowElapsed);
+ maybeUpdateLastTopTime(app, now);
+
app.setProcState = app.curProcState;
if (app.setProcState >= ActivityManager.PROCESS_STATE_HOME) {
app.notCachedSinceIdle = false;
@@ -24703,6 +24736,13 @@ public class ActivityManagerService extends IActivityManager.Stub
}
}
+ private void maybeUpdateLastTopTime(ProcessRecord app, long nowUptime) {
+ if (app.setProcState <= ActivityManager.PROCESS_STATE_TOP
+ && app.curProcState > ActivityManager.PROCESS_STATE_TOP) {
+ app.lastTopTime = nowUptime;
+ }
+ }
+
private final void setProcessTrackerStateLocked(ProcessRecord proc, int memFactor, long now) {
if (proc.thread != null) {
if (proc.baseProcessTracker != null) {
@@ -26400,7 +26440,7 @@ public class ActivityManagerService extends IActivityManager.Stub
packageUid, packageName,
intents, resolvedTypes, null /* resultTo */,
SafeActivityOptions.fromBundle(bOptions), userId,
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */, null /* originatingPendingIntent */);
}
}
@@ -26739,6 +26779,18 @@ public class ActivityManagerService extends IActivityManager.Stub
return ActivityManagerService.this.getHomeIntent();
}
}
+
+ @Override
+ public void notifyDefaultDisplaySizeChanged() {
+ synchronized (ActivityManagerService.this) {
+ if (mSystemServiceManager.isBootCompleted() && mHomeProcess != null) {
+
+ // TODO: Ugly hack to unblock the release
+ Slog.i(TAG, "Killing home process because of display size change");
+ removeProcessLocked(mHomeProcess, false, true, "kill home screen size");
+ }
+ }
+ }
}
/**
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index 7fb161c8c4ae..843699ccf191 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -2849,6 +2849,7 @@ final class ActivityManagerShellCommand extends ShellCommand {
pw.println(" --checkin: output checkin format, resetting data.");
pw.println(" --C: output checkin format, not resetting data.");
pw.println(" --proto: output dump in protocol buffer format.");
+ pw.println(" --autofill: dump just the autofill-related state of an activity");
} else {
pw.println("Activity manager (activity) commands:");
pw.println(" help");
diff --git a/services/core/java/com/android/server/am/ActivityMetricsLogger.java b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
index 47d0423550c4..9ffa6627836f 100644
--- a/services/core/java/com/android/server/am/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
@@ -2,6 +2,7 @@ package com.android.server.am;
import static android.app.ActivityManager.START_SUCCESS;
import static android.app.ActivityManager.START_TASK_TO_FRONT;
+import static android.app.ActivityManager.processStateAmToProto;
import static android.app.ActivityManagerInternal.APP_TRANSITION_TIMEOUT;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
@@ -9,6 +10,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.ACTION_ACTIVITY_START;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_BIND_APPLICATION_DELAY_MS;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_CALLING_PACKAGE_NAME;
@@ -21,8 +23,48 @@ import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TR
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_REPORTED_DRAWN_MS;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_STARTING_WINDOW_DELAY_MS;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_FLAGS;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_FULLSCREEN;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_NO_DISPLAY;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_VISIBLE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_VISIBLE_IGNORING_KEYGUARD;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_LAUNCH;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_VISIBLE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_LAUNCH_MODE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_PROCESS_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_REAL_ACTIVITY;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_RESULT_TO_PKG_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_RESULT_TO_SHORT_COMPONENT_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_PACKAGE_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_UID;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_UID_HAS_ANY_VISIBLE_WINDOW;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_UID_PROC_STATE;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CLASS_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_COMING_FROM_PENDING_INTENT;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_INSTANT_APP_LAUNCH_TOKEN;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_INTENT_ACTION;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_CUR_PROC_STATE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_CLIENT_ACTIVITIES;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_FOREGROUND_ACTIVITIES;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_FOREGROUND_SERVICES;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_OVERLAY_UI;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_TOP_UI;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_MILLIS_SINCE_FG_INTERACTION;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_MILLIS_SINCE_LAST_INTERACTION_EVENT;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_MILLIS_SINCE_UNIMPORTANT;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_PENDING_UI_CLEAN;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_PROCESS_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_REAL_CALLING_UID;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_REAL_CALLING_UID_PROC_STATE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_REAL_CALLING_UID_HAS_ANY_VISIBLE_WINDOW;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_PACKAGE_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_SHORT_COMPONENT_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_UID;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_UID_HAS_ANY_VISIBLE_WINDOW;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_UID_PROC_STATE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_WHITELIST_TAG;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.PACKAGE_OPTIMIZATION_COMPILATION_REASON;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.PACKAGE_OPTIMIZATION_COMPILATION_FILTER;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.TYPE_TRANSITION_COLD_LAUNCH;
@@ -37,6 +79,7 @@ import static com.android.server.am.MemoryStatUtil.MemoryStat;
import static com.android.server.am.MemoryStatUtil.readMemoryStatFromFilesystem;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.dex.ArtManagerInternal;
import android.content.pm.dex.PackageOptimizationInfo;
@@ -622,6 +665,95 @@ class ActivityMetricsLogger {
startupTimeMs);
}
+ void logActivityStart(Intent intent, ProcessRecord callerApp, ActivityRecord r,
+ int callingUid, String callingPackage, int callingUidProcState,
+ boolean callingUidHasAnyVisibleWindow,
+ int realCallingUid, int realCallingUidProcState,
+ boolean realCallingUidHasAnyVisibleWindow,
+ int targetUid, String targetPackage, int targetUidProcState,
+ boolean targetUidHasAnyVisibleWindow, String targetWhitelistTag,
+ boolean comingFromPendingIntent) {
+
+ final long nowElapsed = SystemClock.elapsedRealtime();
+ final long nowUptime = SystemClock.uptimeMillis();
+ final LogMaker builder = new LogMaker(ACTION_ACTIVITY_START);
+ builder.setTimestamp(System.currentTimeMillis());
+ builder.addTaggedData(FIELD_CALLING_UID, callingUid);
+ builder.addTaggedData(FIELD_CALLING_PACKAGE_NAME, callingPackage);
+ builder.addTaggedData(FIELD_CALLING_UID_PROC_STATE,
+ processStateAmToProto(callingUidProcState));
+ builder.addTaggedData(FIELD_CALLING_UID_HAS_ANY_VISIBLE_WINDOW,
+ callingUidHasAnyVisibleWindow ? 1 : 0);
+ builder.addTaggedData(FIELD_REAL_CALLING_UID, realCallingUid);
+ builder.addTaggedData(FIELD_REAL_CALLING_UID_PROC_STATE,
+ processStateAmToProto(realCallingUidProcState));
+ builder.addTaggedData(FIELD_REAL_CALLING_UID_HAS_ANY_VISIBLE_WINDOW,
+ realCallingUidHasAnyVisibleWindow ? 1 : 0);
+ builder.addTaggedData(FIELD_TARGET_UID, targetUid);
+ builder.addTaggedData(FIELD_TARGET_PACKAGE_NAME, targetPackage);
+ builder.addTaggedData(FIELD_TARGET_UID_PROC_STATE,
+ processStateAmToProto(targetUidProcState));
+ builder.addTaggedData(FIELD_TARGET_UID_HAS_ANY_VISIBLE_WINDOW,
+ targetUidHasAnyVisibleWindow ? 1 : 0);
+ builder.addTaggedData(FIELD_TARGET_WHITELIST_TAG, targetWhitelistTag);
+ builder.addTaggedData(FIELD_TARGET_SHORT_COMPONENT_NAME, r.shortComponentName);
+ builder.addTaggedData(FIELD_COMING_FROM_PENDING_INTENT, comingFromPendingIntent ? 1 : 0);
+ builder.addTaggedData(FIELD_INTENT_ACTION, intent.getAction());
+ if (callerApp != null) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_PROCESS_NAME, callerApp.processName);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_CUR_PROC_STATE,
+ processStateAmToProto(callerApp.curProcState));
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_CLIENT_ACTIVITIES,
+ callerApp.hasClientActivities ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_FOREGROUND_SERVICES,
+ callerApp.hasForegroundServices() ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_FOREGROUND_ACTIVITIES,
+ callerApp.foregroundActivities ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_TOP_UI, callerApp.hasTopUi ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_OVERLAY_UI,
+ callerApp.hasOverlayUi ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_PENDING_UI_CLEAN,
+ callerApp.pendingUiClean ? 1 : 0);
+ if (callerApp.interactionEventTime != 0) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_MILLIS_SINCE_LAST_INTERACTION_EVENT,
+ (nowElapsed - callerApp.interactionEventTime));
+ }
+ if (callerApp.fgInteractionTime != 0) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_MILLIS_SINCE_FG_INTERACTION,
+ (nowElapsed - callerApp.fgInteractionTime));
+ }
+ if (callerApp.whenUnimportant != 0) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_MILLIS_SINCE_UNIMPORTANT,
+ (nowUptime - callerApp.whenUnimportant));
+ }
+ }
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_LAUNCH_MODE, r.info.launchMode);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY, r.info.targetActivity);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_FLAGS, r.info.flags);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_REAL_ACTIVITY, r.realActivity.toShortString());
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME, r.shortComponentName);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_PROCESS_NAME, r.processName);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_FULLSCREEN, r.fullscreen ? 1 : 0);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_NO_DISPLAY, r.noDisplay ? 1 : 0);
+ if (r.lastVisibleTime != 0) {
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_VISIBLE,
+ (nowUptime - r.lastVisibleTime));
+ }
+ if (r.resultTo != null) {
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_RESULT_TO_PKG_NAME, r.resultTo.packageName);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_RESULT_TO_SHORT_COMPONENT_NAME,
+ r.resultTo.shortComponentName);
+ }
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_VISIBLE, r.visible ? 1 : 0);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_VISIBLE_IGNORING_KEYGUARD,
+ r.visibleIgnoringKeyguard ? 1 : 0);
+ if (r.lastLaunchTime != 0) {
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_LAUNCH,
+ (nowUptime - r.lastLaunchTime));
+ }
+ mMetricsLogger.write(builder);
+ }
+
private int getTransitionType(WindowingModeTransitionInfo info) {
if (info.currentTransitionProcessRunning) {
if (info.startResult == START_SUCCESS) {
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 75f27231c976..60f79f720242 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -694,9 +694,13 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
final boolean inPictureInPictureMode = inPinnedWindowingMode() && targetStackBounds != null;
if (inPictureInPictureMode != mLastReportedPictureInPictureMode || forceUpdate) {
// Picture-in-picture mode changes also trigger a multi-window mode change as well, so
- // update that here in order
+ // update that here in order. Set the last reported MW state to the same as the PiP
+ // state since we haven't yet actually resized the task (these callbacks need to
+ // preceed the configuration change from the resiez.
+ // TODO(110009072): Once we move these callbacks to the client, remove all logic related
+ // to forcing the update of the picture-in-picture mode as a part of the PiP animation.
mLastReportedPictureInPictureMode = inPictureInPictureMode;
- mLastReportedMultiWindowMode = inMultiWindowMode();
+ mLastReportedMultiWindowMode = inPictureInPictureMode;
final Configuration newConfig = task.computeNewOverrideConfigurationForBounds(
targetStackBounds, null);
schedulePictureInPictureModeChanged(newConfig);
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index c520101d3ff4..2ae056fe18a5 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -4853,7 +4853,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
return mService.getActivityStartController().startActivityInPackage(
task.mCallingUid, callingPid, callingUid, callingPackage, intent, null, null,
null, 0, 0, options, userId, task, "startActivityFromRecents",
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */, null /* originatingPendingIntent */);
} finally {
if (windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY && task != null) {
// If we are launching the task in the docked stack, put it into resizing mode so
diff --git a/services/core/java/com/android/server/am/ActivityStartController.java b/services/core/java/com/android/server/am/ActivityStartController.java
index a7c32009a4c4..edcf6e7bd516 100644
--- a/services/core/java/com/android/server/am/ActivityStartController.java
+++ b/services/core/java/com/android/server/am/ActivityStartController.java
@@ -248,7 +248,8 @@ public class ActivityStartController {
final int startActivityInPackage(int uid, int realCallingPid, int realCallingUid,
String callingPackage, Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, int startFlags, SafeActivityOptions options,
- int userId, TaskRecord inTask, String reason, boolean validateIncomingUser) {
+ int userId, TaskRecord inTask, String reason, boolean validateIncomingUser,
+ PendingIntentRecord originatingPendingIntent) {
userId = checkTargetUser(userId, validateIncomingUser, realCallingPid, realCallingUid,
reason);
@@ -267,6 +268,7 @@ public class ActivityStartController {
.setActivityOptions(options)
.setMayWait(userId)
.setInTask(inTask)
+ .setOriginatingPendingIntent(originatingPendingIntent)
.execute();
}
@@ -278,10 +280,12 @@ public class ActivityStartController {
* @param intents Intents to start.
* @param userId Start the intents on this user.
* @param validateIncomingUser Set true to skip checking {@code userId} with the calling UID.
+ * @param originatingPendingIntent PendingIntentRecord that originated this activity start or
+ * null if not originated by PendingIntent
*/
final int startActivitiesInPackage(int uid, String callingPackage, Intent[] intents,
String[] resolvedTypes, IBinder resultTo, SafeActivityOptions options, int userId,
- boolean validateIncomingUser) {
+ boolean validateIncomingUser, PendingIntentRecord originatingPendingIntent) {
final String reason = "startActivityInPackage";
@@ -290,12 +294,12 @@ public class ActivityStartController {
// TODO: Switch to user app stacks here.
return startActivities(null, uid, callingPackage, intents, resolvedTypes, resultTo, options,
- userId, reason);
+ userId, reason, originatingPendingIntent);
}
int startActivities(IApplicationThread caller, int callingUid, String callingPackage,
Intent[] intents, String[] resolvedTypes, IBinder resultTo, SafeActivityOptions options,
- int userId, String reason) {
+ int userId, String reason, PendingIntentRecord originatingPendingIntent) {
if (intents == null) {
throw new NullPointerException("intents is null");
}
@@ -374,6 +378,7 @@ public class ActivityStartController {
// Top activity decides on animation being run, so we allow only for the
// top one as otherwise an activity below might consume it.
.setAllowPendingRemoteAnimationRegistryLookup(top /* allowLookup*/)
+ .setOriginatingPendingIntent(originatingPendingIntent)
.execute();
if (res < 0) {
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 73e3d33073fc..00ba3a61d1d6 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -99,6 +99,7 @@ import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.service.voice.IVoiceInteractionSession;
@@ -313,6 +314,7 @@ class ActivityStarter {
int userId;
WaitResult waitResult;
int filterCallingUid;
+ PendingIntentRecord originatingPendingIntent;
/**
* If set to {@code true}, allows this activity start to look into
@@ -369,6 +371,7 @@ class ActivityStarter {
avoidMoveToFront = false;
allowPendingRemoteAnimationRegistryLookup = true;
filterCallingUid = UserHandle.USER_NULL;
+ originatingPendingIntent = null;
}
/**
@@ -407,6 +410,7 @@ class ActivityStarter {
allowPendingRemoteAnimationRegistryLookup
= request.allowPendingRemoteAnimationRegistryLookup;
filterCallingUid = request.filterCallingUid;
+ originatingPendingIntent = request.originatingPendingIntent;
}
}
@@ -490,7 +494,8 @@ class ActivityStarter {
mRequest.profilerInfo, mRequest.waitResult, mRequest.globalConfig,
mRequest.activityOptions, mRequest.ignoreTargetSecurity, mRequest.userId,
mRequest.inTask, mRequest.reason,
- mRequest.allowPendingRemoteAnimationRegistryLookup);
+ mRequest.allowPendingRemoteAnimationRegistryLookup,
+ mRequest.originatingPendingIntent);
} else {
return startActivity(mRequest.caller, mRequest.intent, mRequest.ephemeralIntent,
mRequest.resolvedType, mRequest.activityInfo, mRequest.resolveInfo,
@@ -500,7 +505,8 @@ class ActivityStarter {
mRequest.realCallingUid, mRequest.startFlags, mRequest.activityOptions,
mRequest.ignoreTargetSecurity, mRequest.componentSpecified,
mRequest.outActivity, mRequest.inTask, mRequest.reason,
- mRequest.allowPendingRemoteAnimationRegistryLookup);
+ mRequest.allowPendingRemoteAnimationRegistryLookup,
+ mRequest.originatingPendingIntent);
}
} finally {
onExecutionComplete();
@@ -532,7 +538,8 @@ class ActivityStarter {
String callingPackage, int realCallingPid, int realCallingUid, int startFlags,
SafeActivityOptions options, boolean ignoreTargetSecurity, boolean componentSpecified,
ActivityRecord[] outActivity, TaskRecord inTask, String reason,
- boolean allowPendingRemoteAnimationRegistryLookup) {
+ boolean allowPendingRemoteAnimationRegistryLookup,
+ PendingIntentRecord originatingPendingIntent) {
if (TextUtils.isEmpty(reason)) {
throw new IllegalArgumentException("Need to specify a reason.");
@@ -545,7 +552,7 @@ class ActivityStarter {
aInfo, rInfo, voiceSession, voiceInteractor, resultTo, resultWho, requestCode,
callingPid, callingUid, callingPackage, realCallingPid, realCallingUid, startFlags,
options, ignoreTargetSecurity, componentSpecified, mLastStartActivityRecord,
- inTask, allowPendingRemoteAnimationRegistryLookup);
+ inTask, allowPendingRemoteAnimationRegistryLookup, originatingPendingIntent);
if (outActivity != null) {
// mLastStartActivityRecord[0] is set in the call to startActivity above.
@@ -575,7 +582,8 @@ class ActivityStarter {
String callingPackage, int realCallingPid, int realCallingUid, int startFlags,
SafeActivityOptions options,
boolean ignoreTargetSecurity, boolean componentSpecified, ActivityRecord[] outActivity,
- TaskRecord inTask, boolean allowPendingRemoteAnimationRegistryLookup) {
+ TaskRecord inTask, boolean allowPendingRemoteAnimationRegistryLookup,
+ PendingIntentRecord originatingPendingIntent) {
int err = ActivityManager.START_SUCCESS;
// Pull the optional Ephemeral Installer-only bundle out of the options early.
final Bundle verificationBundle
@@ -865,10 +873,58 @@ class ActivityStarter {
mController.doPendingActivityLaunches(false);
+ maybeLogActivityStart(callingUid, callingPackage, realCallingUid, intent, callerApp, r,
+ originatingPendingIntent);
+
return startActivity(r, sourceRecord, voiceSession, voiceInteractor, startFlags,
true /* doResume */, checkedOptions, inTask, outActivity);
}
+ private void maybeLogActivityStart(int callingUid, String callingPackage, int realCallingUid,
+ Intent intent, ProcessRecord callerApp, ActivityRecord r,
+ PendingIntentRecord originatingPendingIntent) {
+ boolean callerAppHasForegroundActivity = (callerApp != null)
+ ? callerApp.foregroundActivities
+ : false;
+ if (!mService.isActivityStartsLoggingEnabled() || callerAppHasForegroundActivity
+ || r == null) {
+ // skip logging in this case
+ return;
+ }
+
+ try {
+ Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "logActivityStart");
+ final int callingUidProcState = mService.getUidStateLocked(callingUid);
+ final boolean callingUidHasAnyVisibleWindow =
+ mService.mWindowManager.isAnyWindowVisibleForUid(callingUid);
+ final int realCallingUidProcState = (callingUid == realCallingUid)
+ ? callingUidProcState
+ : mService.getUidStateLocked(realCallingUid);
+ final boolean realCallingUidHasAnyVisibleWindow = (callingUid == realCallingUid)
+ ? callingUidHasAnyVisibleWindow
+ : mService.mWindowManager.isAnyWindowVisibleForUid(realCallingUid);
+ final String targetPackage = r.packageName;
+ final int targetUid = (r.appInfo != null) ? r.appInfo.uid : -1;
+ final int targetUidProcState = mService.getUidStateLocked(targetUid);
+ final boolean targetUidHasAnyVisibleWindow = (targetUid != -1)
+ ? mService.mWindowManager.isAnyWindowVisibleForUid(targetUid)
+ : false;
+ final String targetWhitelistTag = (targetUid != -1)
+ ? mService.getPendingTempWhitelistTagForUidLocked(targetUid)
+ : null;
+
+ mSupervisor.getActivityMetricsLogger().logActivityStart(intent, callerApp, r,
+ callingUid, callingPackage, callingUidProcState,
+ callingUidHasAnyVisibleWindow,
+ realCallingUid, realCallingUidProcState,
+ realCallingUidHasAnyVisibleWindow,
+ targetUid, targetPackage, targetUidProcState,
+ targetUidHasAnyVisibleWindow, targetWhitelistTag,
+ (originatingPendingIntent != null));
+ } finally {
+ Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
+ }
+ }
/**
* Creates a launch intent for the given auxiliary resolution data.
@@ -949,7 +1005,8 @@ class ActivityStarter {
ProfilerInfo profilerInfo, WaitResult outResult,
Configuration globalConfig, SafeActivityOptions options, boolean ignoreTargetSecurity,
int userId, TaskRecord inTask, String reason,
- boolean allowPendingRemoteAnimationRegistryLookup) {
+ boolean allowPendingRemoteAnimationRegistryLookup,
+ PendingIntentRecord originatingPendingIntent) {
// Refuse possible leaked file descriptors
if (intent != null && intent.hasFileDescriptors()) {
throw new IllegalArgumentException("File descriptors passed in Intent");
@@ -1100,7 +1157,7 @@ class ActivityStarter {
voiceSession, voiceInteractor, resultTo, resultWho, requestCode, callingPid,
callingUid, callingPackage, realCallingPid, realCallingUid, startFlags, options,
ignoreTargetSecurity, componentSpecified, outRecord, inTask, reason,
- allowPendingRemoteAnimationRegistryLookup);
+ allowPendingRemoteAnimationRegistryLookup, originatingPendingIntent);
Binder.restoreCallingIdentity(origId);
@@ -2625,6 +2682,11 @@ class ActivityStarter {
return this;
}
+ ActivityStarter setOriginatingPendingIntent(PendingIntentRecord originatingPendingIntent) {
+ mRequest.originatingPendingIntent = originatingPendingIntent;
+ return this;
+ }
+
void dump(PrintWriter pw, String prefix) {
prefix = prefix + " ";
pw.print(prefix);
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index a6dafbb1db36..f0e2876b4761 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -484,7 +484,8 @@ class AppErrors {
task.intent, null, null, null, 0, 0,
new SafeActivityOptions(ActivityOptions.makeBasic()),
task.userId, null,
- "AppErrors", false /*validateIncomingUser*/);
+ "AppErrors", false /*validateIncomingUser*/,
+ null /* originatingPendingIntent */);
}
}
}
diff --git a/services/core/java/com/android/server/am/PendingIntentRecord.java b/services/core/java/com/android/server/am/PendingIntentRecord.java
index e0aa2a261b3c..4e00304a9da6 100644
--- a/services/core/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/core/java/com/android/server/am/PendingIntentRecord.java
@@ -307,7 +307,7 @@ final class PendingIntentRecord extends IIntentSender.Stub {
} else if (finalIntent.getComponent() != null) {
finalIntent.getComponent().appendShortString(tag);
} else if (finalIntent.getData() != null) {
- tag.append(finalIntent.getData());
+ tag.append(finalIntent.getData().toSafeString());
}
owner.tempWhitelistForPendingIntentLocked(callingPid,
callingUid, uid, duration, tag.toString());
@@ -346,13 +346,15 @@ final class PendingIntentRecord extends IIntentSender.Stub {
res = owner.getActivityStartController().startActivitiesInPackage(
uid, key.packageName, allIntents, allResolvedTypes,
resultTo, mergedOptions, userId,
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */,
+ this /* originatingPendingIntent */);
} else {
res = owner.getActivityStartController().startActivityInPackage(uid,
callingPid, callingUid, key.packageName, finalIntent,
resolvedType, resultTo, resultWho, requestCode, 0,
mergedOptions, userId, null, "PendingIntentRecord",
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */,
+ this /* originatingPendingIntent */);
}
} catch (RuntimeException e) {
Slog.w(TAG, "Unable to send startActivity intent", e);
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index 302e1950b9a9..9e7ce3204444 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -104,6 +104,11 @@ public final class ProcessList {
static final int VISIBLE_APP_ADJ = 100;
static final int VISIBLE_APP_LAYER_MAX = PERCEPTIBLE_APP_ADJ - VISIBLE_APP_ADJ - 1;
+ // This is a process that was recently TOP and moved to FGS. Continue to treat it almost
+ // like a foreground app for a while.
+ // @see TOP_TO_FGS_GRACE_PERIOD
+ static final int PERCEPTIBLE_RECENT_FOREGROUND_APP_ADJ = 50;
+
// This is the process running the current foreground app. We'd really
// rather not kill it!
static final int FOREGROUND_APP_ADJ = 0;
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index caf52e359548..e3e839f63172 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -163,6 +163,7 @@ final class ProcessRecord {
long lastRequestedGc; // When we last asked the app to do a gc
long lastLowMemory; // When we last told the app that memory is low
long lastProviderTime; // The last time someone else was using a provider in this process.
+ long lastTopTime; // The last time the process was in the TOP state or greater.
boolean reportLowMemory; // Set to true when waiting to report low mem
boolean empty; // Is this an empty background process?
boolean cached; // Is this a cached process?
@@ -380,6 +381,11 @@ final class ProcessRecord {
TimeUtils.formatDuration(lastProviderTime, nowUptime, pw);
pw.println();
}
+ if (lastTopTime > 0) {
+ pw.print(prefix); pw.print("lastTopTime=");
+ TimeUtils.formatDuration(lastTopTime, nowUptime, pw);
+ pw.println();
+ }
if (hasStartedServices) {
pw.print(prefix); pw.print("hasStartedServices="); pw.println(hasStartedServices);
}
@@ -856,4 +862,8 @@ final class ProcessRecord {
}
return list;
}
+
+ boolean hasForegroundServices() {
+ return foregroundServices;
+ }
}
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 18c095725b09..415a822e3160 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -24,7 +24,6 @@ import static android.app.ActivityManager.USER_OP_IS_CURRENT;
import static android.app.ActivityManager.USER_OP_SUCCESS;
import static android.os.Process.SHELL_UID;
import static android.os.Process.SYSTEM_UID;
-
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_MU;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -48,6 +47,7 @@ import android.app.IStopUserCallback;
import android.app.IUserSwitchObserver;
import android.app.KeyguardManager;
import android.app.usage.UsageEvents;
+import android.appwidget.AppWidgetManagerInternal;
import android.content.Context;
import android.content.IIntentReceiver;
import android.content.Intent;
@@ -87,8 +87,8 @@ import android.util.SparseArray;
import android.util.SparseIntArray;
import android.util.TimingsTraceLog;
import android.util.proto.ProtoOutputStream;
-
import android.view.Window;
+
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -533,6 +533,9 @@ class UserController implements Handler.Callback {
}
}
+ // Spin up app widgets prior to boot-complete, so they can be ready promptly
+ mInjector.startUserWidgets(userId);
+
Slog.i(TAG, "Sending BOOT_COMPLETE user #" + userId);
// Do not report secondary users, runtime restarts or first boot/upgrade
if (userId == UserHandle.USER_SYSTEM
@@ -2173,6 +2176,13 @@ class UserController implements Handler.Callback {
}
}
+ void startUserWidgets(int userId) {
+ AppWidgetManagerInternal awm = LocalServices.getService(AppWidgetManagerInternal.class);
+ if (awm != null) {
+ awm.unlockUser(userId);
+ }
+ }
+
void updateUserConfiguration() {
synchronized (mService) {
mService.updateUserConfigurationLocked();
diff --git a/services/core/java/com/android/server/display/DisplayDeviceInfo.java b/services/core/java/com/android/server/display/DisplayDeviceInfo.java
index 349e1c8b713e..512e85192d36 100644
--- a/services/core/java/com/android/server/display/DisplayDeviceInfo.java
+++ b/services/core/java/com/android/server/display/DisplayDeviceInfo.java
@@ -104,6 +104,12 @@ final class DisplayDeviceInfo {
public static final int FLAG_DESTROY_CONTENT_ON_REMOVAL = 1 << 10;
/**
+ * Flag: The display cutout of this display is masked.
+ * @hide
+ */
+ public static final int FLAG_MASK_DISPLAY_CUTOUT = 1 << 11;
+
+ /**
* Touch attachment: Display does not receive touch.
*/
public static final int TOUCH_NONE = 0;
@@ -453,6 +459,9 @@ final class DisplayDeviceInfo {
if ((flags & FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD) != 0) {
msg.append(", FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD");
}
+ if ((flags & FLAG_MASK_DISPLAY_CUTOUT) != 0) {
+ msg.append(", FLAG_MASK_DISPLAY_CUTOUT");
+ }
return msg.toString();
}
}
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index ddd8855f3199..cc5a8271eb5f 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -151,6 +151,8 @@ public final class DisplayManagerService extends SystemService {
// Otherwise WFD is enabled according to the value of config_enableWifiDisplay.
private static final String FORCE_WIFI_DISPLAY_ENABLE = "persist.debug.wfd.enable";
+ private static final String PROP_DEFAULT_DISPLAY_TOP_INSET = "persist.sys.displayinset.top";
+
private static final long WAIT_FOR_DEFAULT_DISPLAY_TIMEOUT = 10000;
private static final int MSG_REGISTER_DEFAULT_DISPLAY_ADAPTERS = 1;
@@ -243,6 +245,15 @@ public final class DisplayManagerService extends SystemService {
// device).
private Point mStableDisplaySize = new Point();
+ // Whether the system has finished booting or not.
+ private boolean mSystemReady;
+
+ // The top inset of the default display.
+ // This gets persisted so that the boot animation knows how to transition from the display's
+ // full size to the size configured by the user. Right now we only persist and animate the top
+ // inset, but theoretically we could do it for all of them.
+ private int mDefaultDisplayTopInset;
+
// Viewports of the default display and the display that should receive touch
// input from an external source. Used by the input system.
private final DisplayViewport mDefaultViewport = new DisplayViewport();
@@ -301,6 +312,7 @@ public final class DisplayManagerService extends SystemService {
Resources resources = mContext.getResources();
mDefaultDisplayDefaultColorMode = mContext.getResources().getInteger(
com.android.internal.R.integer.config_defaultDisplayDefaultColorMode);
+ mDefaultDisplayTopInset = SystemProperties.getInt(PROP_DEFAULT_DISPLAY_TOP_INSET, -1);
float[] lux = getFloatArray(resources.obtainTypedArray(
com.android.internal.R.array.config_minimumBrightnessCurveLux));
float[] nits = getFloatArray(resources.obtainTypedArray(
@@ -311,6 +323,8 @@ public final class DisplayManagerService extends SystemService {
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
mGlobalDisplayBrightness = pm.getDefaultScreenBrightnessSetting();
mCurrentUserId = UserHandle.USER_SYSTEM;
+
+ mSystemReady = false;
}
public void setupSchedulerPolicies() {
@@ -400,6 +414,10 @@ public final class DisplayManagerService extends SystemService {
synchronized (mSyncRoot) {
mSafeMode = safeMode;
mOnlyCore = onlyCore;
+ mSystemReady = true;
+ // Just in case the top inset changed before the system was ready. At this point, any
+ // relevant configuration should be in place.
+ recordTopInsetLocked(mLogicalDisplays.get(Display.DEFAULT_DISPLAY));
}
mHandler.sendEmptyMessage(MSG_REGISTER_ADDITIONAL_DISPLAY_ADAPTERS);
@@ -457,7 +475,7 @@ public final class DisplayManagerService extends SystemService {
LogicalDisplay display = mLogicalDisplays.get(displayId);
if (display != null) {
if (display.setDisplayInfoOverrideFromWindowManagerLocked(info)) {
- sendDisplayEventLocked(displayId, DisplayManagerGlobal.EVENT_DISPLAY_CHANGED);
+ handleLogicalDisplayChanged(displayId, display);
scheduleTraversalLocked(false);
}
}
@@ -938,6 +956,13 @@ public final class DisplayManagerService extends SystemService {
scheduleTraversalLocked(false);
}
+ private void handleLogicalDisplayChanged(int displayId, @NonNull LogicalDisplay display) {
+ if (displayId == Display.DEFAULT_DISPLAY) {
+ recordTopInsetLocked(display);
+ }
+ sendDisplayEventLocked(displayId, DisplayManagerGlobal.EVENT_DISPLAY_CHANGED);
+ }
+
private void applyGlobalDisplayStateLocked(List<Runnable> workQueue) {
final int count = mDisplayDevices.size();
for (int i = 0; i < count; i++) {
@@ -991,6 +1016,7 @@ public final class DisplayManagerService extends SystemService {
configureColorModeLocked(display, device);
if (isDefault) {
recordStableDisplayStatsIfNeededLocked(display);
+ recordTopInsetLocked(display);
}
mLogicalDisplays.put(displayId, display);
@@ -1039,6 +1065,21 @@ public final class DisplayManagerService extends SystemService {
}
}
+ private void recordTopInsetLocked(@Nullable LogicalDisplay d) {
+ // We must only persist the inset after boot has completed, otherwise we will end up
+ // overwriting the persisted value before the masking flag has been loaded from the
+ // resource overlay.
+ if (!mSystemReady || d == null) {
+ return;
+ }
+ int topInset = d.getInsets().top;
+ if (topInset == mDefaultDisplayTopInset) {
+ return;
+ }
+ mDefaultDisplayTopInset = topInset;
+ SystemProperties.set(PROP_DEFAULT_DISPLAY_TOP_INSET, Integer.toString(topInset));
+ }
+
private void setStableDisplaySizeLocked(int width, int height) {
mStableDisplaySize = new Point(width, height);
try {
@@ -1118,7 +1159,7 @@ public final class DisplayManagerService extends SystemService {
sendDisplayEventLocked(displayId, DisplayManagerGlobal.EVENT_DISPLAY_REMOVED);
changed = true;
} else if (!mTempDisplayInfo.equals(display.getDisplayInfoLocked())) {
- sendDisplayEventLocked(displayId, DisplayManagerGlobal.EVENT_DISPLAY_CHANGED);
+ handleLogicalDisplayChanged(displayId, display);
changed = true;
}
}
diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
index 21ae048e1d75..16d82df4dd5b 100644
--- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java
+++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
@@ -402,6 +402,10 @@ final class LocalDisplayAdapter extends DisplayAdapter {
&& SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))) {
mInfo.flags |= DisplayDeviceInfo.FLAG_ROUND;
}
+ if (res.getBoolean(
+ com.android.internal.R.bool.config_maskMainBuiltInDisplayCutout)) {
+ mInfo.flags |= DisplayDeviceInfo.FLAG_MASK_DISPLAY_CUTOUT;
+ }
mInfo.displayCutout = DisplayCutout.fromResourcesRectApproximation(res,
mInfo.width, mInfo.height);
mInfo.type = Display.TYPE_BUILT_IN;
diff --git a/services/core/java/com/android/server/display/LogicalDisplay.java b/services/core/java/com/android/server/display/LogicalDisplay.java
index 23ee56b24b19..5b7c5205ce3a 100644
--- a/services/core/java/com/android/server/display/LogicalDisplay.java
+++ b/services/core/java/com/android/server/display/LogicalDisplay.java
@@ -18,11 +18,14 @@ package com.android.server.display;
import android.graphics.Rect;
import android.hardware.display.DisplayManagerInternal;
+import android.os.SystemProperties;
import android.view.Display;
import android.view.DisplayInfo;
import android.view.Surface;
import android.view.SurfaceControl;
+import com.android.server.wm.utils.InsetUtils;
+
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.List;
@@ -55,6 +58,8 @@ import java.util.Objects;
* </p>
*/
final class LogicalDisplay {
+ private static final String PROP_MASKING_INSET_TOP = "persist.sys.displayinset.top";
+
private final DisplayInfo mBaseDisplayInfo = new DisplayInfo();
// The layer stack we use when the display has been blanked to prevent any
@@ -251,14 +256,18 @@ final class LogicalDisplay {
if ((deviceInfo.flags & DisplayDeviceInfo.FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD) != 0) {
mBaseDisplayInfo.flags |= Display.FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD;
}
+ Rect maskingInsets = getMaskingInsets(deviceInfo);
+ int maskedWidth = deviceInfo.width - maskingInsets.left - maskingInsets.right;
+ int maskedHeight = deviceInfo.height - maskingInsets.top - maskingInsets.bottom;
+
mBaseDisplayInfo.type = deviceInfo.type;
mBaseDisplayInfo.address = deviceInfo.address;
mBaseDisplayInfo.name = deviceInfo.name;
mBaseDisplayInfo.uniqueId = deviceInfo.uniqueId;
- mBaseDisplayInfo.appWidth = deviceInfo.width;
- mBaseDisplayInfo.appHeight = deviceInfo.height;
- mBaseDisplayInfo.logicalWidth = deviceInfo.width;
- mBaseDisplayInfo.logicalHeight = deviceInfo.height;
+ mBaseDisplayInfo.appWidth = maskedWidth;
+ mBaseDisplayInfo.appHeight = maskedHeight;
+ mBaseDisplayInfo.logicalWidth = maskedWidth;
+ mBaseDisplayInfo.logicalHeight = maskedHeight;
mBaseDisplayInfo.rotation = Surface.ROTATION_0;
mBaseDisplayInfo.modeId = deviceInfo.modeId;
mBaseDisplayInfo.defaultModeId = deviceInfo.defaultModeId;
@@ -275,13 +284,15 @@ final class LogicalDisplay {
mBaseDisplayInfo.appVsyncOffsetNanos = deviceInfo.appVsyncOffsetNanos;
mBaseDisplayInfo.presentationDeadlineNanos = deviceInfo.presentationDeadlineNanos;
mBaseDisplayInfo.state = deviceInfo.state;
- mBaseDisplayInfo.smallestNominalAppWidth = deviceInfo.width;
- mBaseDisplayInfo.smallestNominalAppHeight = deviceInfo.height;
- mBaseDisplayInfo.largestNominalAppWidth = deviceInfo.width;
- mBaseDisplayInfo.largestNominalAppHeight = deviceInfo.height;
+ mBaseDisplayInfo.smallestNominalAppWidth = maskedWidth;
+ mBaseDisplayInfo.smallestNominalAppHeight = maskedHeight;
+ mBaseDisplayInfo.largestNominalAppWidth = maskedWidth;
+ mBaseDisplayInfo.largestNominalAppHeight = maskedHeight;
mBaseDisplayInfo.ownerUid = deviceInfo.ownerUid;
mBaseDisplayInfo.ownerPackageName = deviceInfo.ownerPackageName;
- mBaseDisplayInfo.displayCutout = deviceInfo.displayCutout;
+ boolean maskCutout =
+ (deviceInfo.flags & DisplayDeviceInfo.FLAG_MASK_DISPLAY_CUTOUT) != 0;
+ mBaseDisplayInfo.displayCutout = maskCutout ? null : deviceInfo.displayCutout;
mPrimaryDisplayDeviceInfo = deviceInfo;
mInfo = null;
@@ -289,6 +300,29 @@ final class LogicalDisplay {
}
/**
+ * Return the insets currently applied to the display.
+ *
+ * Note that the base DisplayInfo already takes these insets into account, so if you want to
+ * find out the <b>true</b> size of the display, you need to add them back to the logical
+ * dimensions.
+ */
+ public Rect getInsets() {
+ return getMaskingInsets(mPrimaryDisplayDeviceInfo);
+ }
+
+ /**
+ * Returns insets in ROTATION_0 for areas that are masked.
+ */
+ private static Rect getMaskingInsets(DisplayDeviceInfo deviceInfo) {
+ boolean maskCutout = (deviceInfo.flags & DisplayDeviceInfo.FLAG_MASK_DISPLAY_CUTOUT) != 0;
+ if (maskCutout && deviceInfo.displayCutout != null) {
+ return deviceInfo.displayCutout.getSafeInsets();
+ } else {
+ return new Rect();
+ }
+ }
+
+ /**
* Applies the layer stack and transformation to the given display device
* so that it shows the contents of this logical display.
*
@@ -349,6 +383,12 @@ final class LogicalDisplay {
int physWidth = rotated ? displayDeviceInfo.height : displayDeviceInfo.width;
int physHeight = rotated ? displayDeviceInfo.width : displayDeviceInfo.height;
+ Rect maskingInsets = getMaskingInsets(displayDeviceInfo);
+ InsetUtils.rotateInsets(maskingInsets, orientation);
+ // Don't consider the masked area as available when calculating the scaling below.
+ physWidth -= maskingInsets.left + maskingInsets.right;
+ physHeight -= maskingInsets.top + maskingInsets.bottom;
+
// Determine whether the width or height is more constrained to be scaled.
// physWidth / displayInfo.logicalWidth => letter box
// or physHeight / displayInfo.logicalHeight => pillar box
@@ -375,6 +415,9 @@ final class LogicalDisplay {
mTempDisplayRect.set(displayRectLeft, displayRectTop,
displayRectLeft + displayRectWidth, displayRectTop + displayRectHeight);
+ // Now add back the offset for the masked area.
+ mTempDisplayRect.offset(maskingInsets.left, maskingInsets.top);
+
mTempDisplayRect.left += mDisplayOffsetX;
mTempDisplayRect.right += mDisplayOffsetX;
mTempDisplayRect.top += mDisplayOffsetY;
diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java
index 383e1e0288ca..82371855bdda 100644
--- a/services/core/java/com/android/server/net/NetworkStatsService.java
+++ b/services/core/java/com/android/server/net/NetworkStatsService.java
@@ -955,7 +955,13 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
@Override
public long getIfaceStats(String iface, int type) {
- return nativeGetIfaceStat(iface, type, checkBpfStatsEnable());
+ // eBPF code doesn't provide per-interface TCP counters. Use xt_qtaguid for now.
+ // TODO: delete getMobileTcp(Rx|Tx)Packets entirely. See b/110443385 .
+ if (type == TYPE_TCP_TX_PACKETS || type == TYPE_TCP_RX_PACKETS) {
+ return nativeGetIfaceStat(iface, type, false);
+ } else {
+ return nativeGetIfaceStat(iface, type, checkBpfStatsEnable());
+ }
}
@Override
diff --git a/services/core/java/com/android/server/notification/ConditionProviders.java b/services/core/java/com/android/server/notification/ConditionProviders.java
index c0fbfbb20b95..18f4bc768632 100644
--- a/services/core/java/com/android/server/notification/ConditionProviders.java
+++ b/services/core/java/com/android/server/notification/ConditionProviders.java
@@ -150,6 +150,7 @@ public class ConditionProviders extends ManagedServices {
try {
provider.onConnected();
} catch (RemoteException e) {
+ Slog.e(TAG, "can't connect to service " + info, e);
// we tried
}
if (mCallback != null) {
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index f7becd518861..30fa7fe4ce87 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -175,6 +175,10 @@ abstract public class ManagedServices {
}
}
+ protected int getBindFlags() {
+ return BIND_AUTO_CREATE | BIND_FOREGROUND_SERVICE | BIND_ALLOW_WHITELIST_MANAGEMENT;
+ }
+
protected void onServiceRemovedLocked(ManagedServiceInfo removed) { }
private ManagedServiceInfo newServiceInfo(IInterface service,
@@ -1022,9 +1026,9 @@ abstract public class ManagedServices {
}
};
if (!mContext.bindServiceAsUser(intent,
- serviceConnection,
- BIND_AUTO_CREATE | BIND_FOREGROUND_SERVICE | BIND_ALLOW_WHITELIST_MANAGEMENT,
- new UserHandle(userid))) {
+ serviceConnection,
+ getBindFlags(),
+ new UserHandle(userid))) {
mServicesBinding.remove(servicesBindingTag);
Slog.w(TAG, "Unable to bind " + getCaption() + " service: " + intent);
return;
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 1284468947c2..f70ecd54c711 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -33,6 +33,10 @@ import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_PEEK;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_SCREEN_OFF;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_SCREEN_ON;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_STATUS_BAR;
+import static android.content.Context.BIND_ADJUST_BELOW_PERCEPTIBLE;
+import static android.content.Context.BIND_ALLOW_WHITELIST_MANAGEMENT;
+import static android.content.Context.BIND_AUTO_CREATE;
+import static android.content.Context.BIND_FOREGROUND_SERVICE;
import static android.content.pm.PackageManager.FEATURE_LEANBACK;
import static android.content.pm.PackageManager.FEATURE_TELEVISION;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
@@ -2122,6 +2126,10 @@ public class NotificationManagerService extends SystemService {
enforceSystemOrSystemUI("setNotificationsEnabledForPackage");
mRankingHelper.setEnabled(pkg, uid, enabled);
+ mMetricsLogger.write(new LogMaker(MetricsEvent.ACTION_BAN_APP_NOTES)
+ .setType(MetricsEvent.TYPE_ACTION)
+ .setPackageName(pkg)
+ .setSubtype(enabled ? 1 : 0));
// Now, cancel any outstanding notifications that are part of a just-disabled app
if (!enabled) {
cancelAllNotificationsInt(MY_UID, MY_PID, pkg, null, 0, 0, true,
@@ -6510,6 +6518,16 @@ public class NotificationManagerService extends SystemService {
}
@Override
+ protected int getBindFlags() {
+ // Most of the same flags as the base, but also add BIND_ADJUST_BELOW_PERCEPTIBLE
+ // because too many 3P apps could be kept in memory as notification listeners and
+ // cause extreme memory pressure.
+ // TODO: Change the binding lifecycle of NotificationListeners to avoid this situation.
+ return BIND_AUTO_CREATE | BIND_FOREGROUND_SERVICE
+ | BIND_ADJUST_BELOW_PERCEPTIBLE | BIND_ALLOW_WHITELIST_MANAGEMENT;
+ }
+
+ @Override
protected Config getConfig() {
Config c = new Config();
c.caption = "notification listener";
diff --git a/services/core/java/com/android/server/notification/ZenLog.java b/services/core/java/com/android/server/notification/ZenLog.java
index 67608753a2c3..b016fafa3d29 100644
--- a/services/core/java/com/android/server/notification/ZenLog.java
+++ b/services/core/java/com/android/server/notification/ZenLog.java
@@ -36,7 +36,8 @@ import java.util.List;
public class ZenLog {
private static final String TAG = "ZenLog";
- private static final boolean DEBUG = Build.IS_DEBUGGABLE;
+ // the ZenLog is *very* verbose, so be careful about setting this to true
+ private static final boolean DEBUG = false;
private static final int SIZE = Build.IS_DEBUGGABLE ? 100 : 20;
diff --git a/services/core/java/com/android/server/notification/ZenModeConditions.java b/services/core/java/com/android/server/notification/ZenModeConditions.java
index 63c0bafe389d..b080a73c1e42 100644
--- a/services/core/java/com/android/server/notification/ZenModeConditions.java
+++ b/services/core/java/com/android/server/notification/ZenModeConditions.java
@@ -19,7 +19,6 @@ package com.android.server.notification;
import android.content.ComponentName;
import android.net.Uri;
import android.service.notification.Condition;
-import android.service.notification.IConditionListener;
import android.service.notification.IConditionProvider;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeConfig.ZenRule;
@@ -27,6 +26,8 @@ import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.io.PrintWriter;
import java.util.Objects;
@@ -36,7 +37,9 @@ public class ZenModeConditions implements ConditionProviders.Callback {
private final ZenModeHelper mHelper;
private final ConditionProviders mConditionProviders;
- private final ArrayMap<Uri, ComponentName> mSubscriptions = new ArrayMap<>();
+
+ @VisibleForTesting
+ protected final ArrayMap<Uri, ComponentName> mSubscriptions = new ArrayMap<>();
private boolean mFirstEvaluation = true;
@@ -59,7 +62,8 @@ public class ZenModeConditions implements ConditionProviders.Callback {
pw.print(prefix); pw.print("mSubscriptions="); pw.println(mSubscriptions);
}
- public void evaluateConfig(ZenModeConfig config, boolean processSubscriptions) {
+ public void evaluateConfig(ZenModeConfig config, ComponentName trigger,
+ boolean processSubscriptions) {
if (config == null) return;
if (config.manualRule != null && config.manualRule.condition != null
&& !config.manualRule.isTrueOrUnknown()) {
@@ -67,9 +71,9 @@ public class ZenModeConditions implements ConditionProviders.Callback {
config.manualRule = null;
}
final ArraySet<Uri> current = new ArraySet<>();
- evaluateRule(config.manualRule, current, processSubscriptions);
+ evaluateRule(config.manualRule, current, null, processSubscriptions);
for (ZenRule automaticRule : config.automaticRules.values()) {
- evaluateRule(automaticRule, current, processSubscriptions);
+ evaluateRule(automaticRule, current, trigger, processSubscriptions);
updateSnoozing(automaticRule);
}
@@ -102,7 +106,7 @@ public class ZenModeConditions implements ConditionProviders.Callback {
@Override
public void onServiceAdded(ComponentName component) {
if (DEBUG) Log.d(TAG, "onServiceAdded " + component);
- mHelper.setConfig(mHelper.getConfig(), "zmc.onServiceAdded");
+ mHelper.setConfig(mHelper.getConfig(), component, "zmc.onServiceAdded");
}
@Override
@@ -110,17 +114,22 @@ public class ZenModeConditions implements ConditionProviders.Callback {
if (DEBUG) Log.d(TAG, "onConditionChanged " + id + " " + condition);
ZenModeConfig config = mHelper.getConfig();
if (config == null) return;
+ ComponentName trigger = null;
boolean updated = updateCondition(id, condition, config.manualRule);
for (ZenRule automaticRule : config.automaticRules.values()) {
updated |= updateCondition(id, condition, automaticRule);
updated |= updateSnoozing(automaticRule);
+ if (updated) {
+ trigger = automaticRule.component;
+ }
}
if (updated) {
- mHelper.setConfig(config, "conditionChanged");
+ mHelper.setConfig(config, trigger, "conditionChanged");
}
}
- private void evaluateRule(ZenRule rule, ArraySet<Uri> current, boolean processSubscriptions) {
+ private void evaluateRule(ZenRule rule, ArraySet<Uri> current, ComponentName trigger,
+ boolean processSubscriptions) {
if (rule == null || rule.conditionId == null) return;
final Uri id = rule.conditionId;
boolean isSystemCondition = false;
@@ -146,7 +155,9 @@ public class ZenModeConditions implements ConditionProviders.Callback {
if (current != null) {
current.add(id);
}
- if (processSubscriptions) {
+ if (processSubscriptions && ((trigger != null && trigger.equals(rule.component))
+ || isSystemCondition)) {
+ if (DEBUG) Log.d(TAG, "Subscribing to " + rule.component);
if (mConditionProviders.subscribeIfNecessary(rule.component, rule.conditionId)) {
synchronized (mSubscriptions) {
mSubscriptions.put(rule.conditionId, rule.component);
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 669d5565534d..0c42f8ab8345 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -102,7 +102,7 @@ public class ZenModeHelper {
private final ZenModeFiltering mFiltering;
protected final RingerModeDelegate mRingerModeDelegate = new
RingerModeDelegate();
- private final ZenModeConditions mConditions;
+ @VisibleForTesting protected final ZenModeConditions mConditions;
private final SparseArray<ZenModeConfig> mConfigs = new SparseArray<>();
private final Metrics mMetrics = new Metrics();
private final ConditionProviders.Config mServiceConfig;
@@ -225,7 +225,7 @@ public class ZenModeHelper {
config.user = user;
}
synchronized (mConfig) {
- setConfigLocked(config, reason);
+ setConfigLocked(config, null, reason);
}
cleanUpZenRules();
}
@@ -312,7 +312,7 @@ public class ZenModeHelper {
ZenRule rule = new ZenRule();
populateZenRule(automaticZenRule, rule, true);
newConfig.automaticRules.put(rule.id, rule);
- if (setConfigLocked(newConfig, reason, true)) {
+ if (setConfigLocked(newConfig, reason, rule.component, true)) {
return rule.id;
} else {
throw new AndroidRuntimeException("Could not create rule");
@@ -342,7 +342,7 @@ public class ZenModeHelper {
}
populateZenRule(automaticZenRule, rule, false);
newConfig.automaticRules.put(ruleId, rule);
- return setConfigLocked(newConfig, reason, true);
+ return setConfigLocked(newConfig, reason, rule.component, true);
}
}
@@ -360,7 +360,7 @@ public class ZenModeHelper {
throw new SecurityException(
"Cannot delete rules not owned by your condition provider");
}
- return setConfigLocked(newConfig, reason, true);
+ return setConfigLocked(newConfig, reason, null, true);
}
}
@@ -376,7 +376,7 @@ public class ZenModeHelper {
newConfig.automaticRules.removeAt(i);
}
}
- return setConfigLocked(newConfig, reason, true);
+ return setConfigLocked(newConfig, reason, null, true);
}
}
@@ -537,7 +537,7 @@ public class ZenModeHelper {
newRule.enabler = caller;
newConfig.manualRule = newRule;
}
- setConfigLocked(newConfig, reason, setRingerMode);
+ setConfigLocked(newConfig, reason, null, setRingerMode);
}
}
@@ -644,7 +644,7 @@ public class ZenModeHelper {
}
if (DEBUG) Log.d(TAG, reason);
synchronized (mConfig) {
- setConfigLocked(config, reason);
+ setConfigLocked(config, null, reason);
}
}
}
@@ -673,7 +673,7 @@ public class ZenModeHelper {
synchronized (mConfig) {
final ZenModeConfig newConfig = mConfig.copy();
newConfig.applyNotificationPolicy(policy);
- setConfigLocked(newConfig, "setNotificationPolicy");
+ setConfigLocked(newConfig, null, "setNotificationPolicy");
}
}
@@ -697,7 +697,7 @@ public class ZenModeHelper {
}
}
}
- setConfigLocked(newConfig, "cleanUpZenRules");
+ setConfigLocked(newConfig, null, "cleanUpZenRules");
}
}
@@ -710,17 +710,19 @@ public class ZenModeHelper {
}
}
- public boolean setConfigLocked(ZenModeConfig config, String reason) {
- return setConfigLocked(config, reason, true /*setRingerMode*/);
+ public boolean setConfigLocked(ZenModeConfig config, ComponentName triggeringComponent,
+ String reason) {
+ return setConfigLocked(config, reason, triggeringComponent, true /*setRingerMode*/);
}
- public void setConfig(ZenModeConfig config, String reason) {
+ public void setConfig(ZenModeConfig config, ComponentName triggeringComponent, String reason) {
synchronized (mConfig) {
- setConfigLocked(config, reason);
+ setConfigLocked(config, triggeringComponent, reason);
}
}
- private boolean setConfigLocked(ZenModeConfig config, String reason, boolean setRingerMode) {
+ private boolean setConfigLocked(ZenModeConfig config, String reason,
+ ComponentName triggeringComponent, boolean setRingerMode) {
final long identity = Binder.clearCallingIdentity();
try {
if (config == null || !config.isValid()) {
@@ -733,7 +735,8 @@ public class ZenModeHelper {
if (DEBUG) Log.d(TAG, "setConfigLocked: store config for user " + config.user);
return true;
}
- mConditions.evaluateConfig(config, false /*processSubscriptions*/); // may modify config
+ // may modify config
+ mConditions.evaluateConfig(config, null, false /*processSubscriptions*/);
mConfigs.put(config.user, config);
if (DEBUG) Log.d(TAG, "setConfigLocked reason=" + reason, new Throwable());
ZenLog.traceConfig(reason, mConfig, config);
@@ -746,7 +749,7 @@ public class ZenModeHelper {
dispatchOnPolicyChanged();
}
mConfig = config;
- mHandler.postApplyConfig(config, reason, setRingerMode);
+ mHandler.postApplyConfig(config, reason, triggeringComponent, setRingerMode);
return true;
} catch (SecurityException e) {
Log.wtf(TAG, "Invalid rule in config", e);
@@ -756,13 +759,14 @@ public class ZenModeHelper {
}
}
- private void applyConfig(ZenModeConfig config, String reason, boolean setRingerMode) {
+ private void applyConfig(ZenModeConfig config, String reason,
+ ComponentName triggeringComponent, boolean setRingerMode) {
final String val = Integer.toString(config.hashCode());
Global.putString(mContext.getContentResolver(), Global.ZEN_MODE_CONFIG_ETAG, val);
if (!evaluateZenMode(reason, setRingerMode)) {
applyRestrictions(); // evaluateZenMode will also apply restrictions if changed
}
- mConditions.evaluateConfig(config, true /*processSubscriptions*/);
+ mConditions.evaluateConfig(config, triggeringComponent, true /*processSubscriptions*/);
}
private int getZenModeSetting() {
@@ -1260,13 +1264,16 @@ public class ZenModeHelper {
private final class ConfigMessageData {
public final ZenModeConfig config;
+ public ComponentName triggeringComponent;
public final String reason;
public final boolean setRingerMode;
- ConfigMessageData(ZenModeConfig config, String reason, boolean setRingerMode) {
+ ConfigMessageData(ZenModeConfig config, String reason,
+ ComponentName triggeringComponent, boolean setRingerMode) {
this.config = config;
this.reason = reason;
this.setRingerMode = setRingerMode;
+ this.triggeringComponent = triggeringComponent;
}
}
@@ -1286,9 +1293,10 @@ public class ZenModeHelper {
sendEmptyMessageDelayed(MSG_METRICS, METRICS_PERIOD_MS);
}
- private void postApplyConfig(ZenModeConfig config, String reason, boolean setRingerMode) {
+ private void postApplyConfig(ZenModeConfig config, String reason,
+ ComponentName triggeringComponent, boolean setRingerMode) {
sendMessage(obtainMessage(MSG_APPLY_CONFIG,
- new ConfigMessageData(config, reason, setRingerMode)));
+ new ConfigMessageData(config, reason, triggeringComponent, setRingerMode)));
}
@Override
@@ -1303,7 +1311,7 @@ public class ZenModeHelper {
case MSG_APPLY_CONFIG:
ConfigMessageData applyConfigData = (ConfigMessageData) msg.obj;
applyConfig(applyConfigData.config, applyConfigData.reason,
- applyConfigData.setRingerMode);
+ applyConfigData.triggeringComponent, applyConfigData.setRingerMode);
}
}
}
diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
index 350fb2f6c58a..f1b03d1fc9d6 100644
--- a/services/core/java/com/android/server/om/OverlayManagerService.java
+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
@@ -22,11 +22,14 @@ import static android.content.Intent.ACTION_PACKAGE_CHANGED;
import static android.content.Intent.ACTION_PACKAGE_REMOVED;
import static android.content.Intent.ACTION_USER_ADDED;
import static android.content.Intent.ACTION_USER_REMOVED;
+import static android.content.pm.PackageManager.GET_SHARED_LIBRARY_FILES;
+import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
import static android.content.pm.PackageManager.SIGNATURE_MATCH;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
+import android.app.ActivityThread;
import android.app.IActivityManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -34,6 +37,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.om.IOverlayManager;
import android.content.om.OverlayInfo;
+import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManagerInternal;
@@ -269,13 +273,30 @@ public final class OverlayManagerService extends SystemService {
@Override
public void onBootPhase(int phase) {
- if (phase == PHASE_SYSTEM_SERVICES_READY) {
+ if (phase == PHASE_SYSTEM_SERVICES_READY && mInitCompleteSignal != null) {
ConcurrentUtils.waitForFutureNoInterrupt(mInitCompleteSignal,
"Wait for OverlayManagerService init");
mInitCompleteSignal = null;
}
}
+ public void updateSystemUiContext() {
+ if (mInitCompleteSignal != null) {
+ ConcurrentUtils.waitForFutureNoInterrupt(mInitCompleteSignal,
+ "Wait for OverlayManagerService init");
+ mInitCompleteSignal = null;
+ }
+
+ final ApplicationInfo ai;
+ try {
+ ai = mPackageManager.mPackageManager.getApplicationInfo("android",
+ GET_SHARED_LIBRARY_FILES, UserHandle.USER_SYSTEM);
+ } catch (RemoteException e) {
+ throw e.rethrowAsRuntimeException();
+ }
+ ActivityThread.currentActivityThread().handleSystemApplicationInfoChanged(ai);
+ }
+
private void initIfNeeded() {
final UserManager um = getContext().getSystemService(UserManager.class);
final List<UserInfo> users = um.getUsers(true /*excludeDying*/);
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index c197d2302ebf..cc640f03edba 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -35,6 +35,7 @@ import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.pm.Installer.InstallerException;
+import com.android.server.pm.dex.ArtManagerService;
import com.android.server.pm.dex.DexManager;
import com.android.server.pm.dex.DexoptOptions;
import com.android.server.pm.dex.DexoptUtils;
@@ -291,7 +292,8 @@ public class PackageDexOptimizer {
mInstaller.dexopt(path, uid, pkg.packageName, isa, dexoptNeeded, oatDir, dexoptFlags,
compilerFilter, pkg.volumeUuid, classLoaderContext, pkg.applicationInfo.seInfo,
false /* downgrade*/, pkg.applicationInfo.targetSdkVersion,
- profileName, dexMetadataPath, getReasonName(compilationReason));
+ profileName, dexMetadataPath,
+ getAugmentedReasonName(compilationReason, dexMetadataPath != null));
if (packageStats != null) {
long endTime = System.currentTimeMillis();
@@ -304,6 +306,12 @@ public class PackageDexOptimizer {
}
}
+ private String getAugmentedReasonName(int compilationReason, boolean useDexMetadata) {
+ String annotation = useDexMetadata
+ ? ArtManagerService.DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION : "";
+ return getReasonName(compilationReason) + annotation;
+ }
+
/**
* Performs dexopt on the secondary dex {@code path} belonging to the app {@code info}.
*
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 52b6ffcd3d19..9345ad1339af 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -22060,9 +22060,6 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
//TODO: b/111402650
private void disableSkuSpecificApps() {
- if (!mIsUpgrade && !mFirstBoot) {
- return;
- }
String apkList[] = mContext.getResources().getStringArray(
R.array.config_disableApksUnlessMatchedSku_apk_list);
String skuArray[] = mContext.getResources().getStringArray(
@@ -22076,7 +22073,9 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
}
for (String packageName : apkList) {
setSystemAppHiddenUntilInstalled(packageName, true);
- setSystemAppInstallState(packageName, false, ActivityManager.getCurrentUser());
+ for (UserInfo user : sUserManager.getUsers(false)) {
+ setSystemAppInstallState(packageName, false, user.id);
+ }
}
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index 580126f5c330..7856bcf956cb 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -534,6 +534,7 @@ class PackageManagerShellCommand extends ShellCommand {
boolean listInstaller = false;
boolean showUid = false;
boolean showVersionCode = false;
+ boolean listApexOnly = false;
int uid = -1;
int userId = UserHandle.USER_SYSTEM;
try {
@@ -573,6 +574,10 @@ class PackageManagerShellCommand extends ShellCommand {
case "--show-versioncode":
showVersionCode = true;
break;
+ case "--apex-only":
+ getFlags |= PackageManager.MATCH_APEX;
+ listApexOnly = true;
+ break;
case "--user":
userId = UserHandle.parseUserArg(getNextArgRequired());
break;
@@ -603,30 +608,34 @@ class PackageManagerShellCommand extends ShellCommand {
if (filter != null && !info.packageName.contains(filter)) {
continue;
}
- if (uid != -1 && info.applicationInfo.uid != uid) {
+ final boolean isApex = info.isApex;
+ if (uid != -1 && !isApex && info.applicationInfo.uid != uid) {
continue;
}
- final boolean isSystem =
+
+ final boolean isSystem = !isApex &&
(info.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0;
- if ((!listDisabled || !info.applicationInfo.enabled) &&
- (!listEnabled || info.applicationInfo.enabled) &&
+ final boolean isEnabled = !isApex && info.applicationInfo.enabled;
+ if ((!listDisabled || !isEnabled) &&
+ (!listEnabled || isEnabled) &&
(!listSystem || isSystem) &&
- (!listThirdParty || !isSystem)) {
+ (!listThirdParty || !isSystem) &&
+ (!listApexOnly || isApex)) {
pw.print("package:");
- if (showSourceDir) {
+ if (showSourceDir && !isApex) {
pw.print(info.applicationInfo.sourceDir);
pw.print("=");
}
pw.print(info.packageName);
- if (showVersionCode) {
+ if (showVersionCode && !isApex) {
pw.print(" versionCode:");
pw.print(info.applicationInfo.versionCode);
}
- if (listInstaller) {
+ if (listInstaller && !isApex) {
pw.print(" installer=");
pw.print(mInterface.getInstallerPackageName(info.packageName));
}
- if (showUid) {
+ if (showUid && !isApex) {
pw.print(" uid:");
pw.print(info.applicationInfo.uid);
}
@@ -2692,11 +2701,11 @@ class PackageManagerShellCommand extends ShellCommand {
pw.println(" Prints all system libraries.");
pw.println("");
pw.println(" list packages [-f] [-d] [-e] [-s] [-3] [-i] [-l] [-u] [-U] ");
- pw.println(" [--uid UID] [--user USER_ID] [FILTER]");
+ pw.println(" [--apex-only] [--uid UID] [--user USER_ID] [FILTER]");
pw.println(" Prints all packages; optionally only those whose name contains");
pw.println(" the text in FILTER. Options are:");
pw.println(" -f: see their associated file");
- pw.println(" -a: all known packages");
+ pw.println(" -a: all known packages (but excluding APEXes)");
pw.println(" -d: filter to only show disabled packages");
pw.println(" -e: filter to only show enabled packages");
pw.println(" -s: filter to only show system packages");
@@ -2705,6 +2714,7 @@ class PackageManagerShellCommand extends ShellCommand {
pw.println(" -l: ignored (used for compatibility with older releases)");
pw.println(" -U: also show the package UID");
pw.println(" -u: also include uninstalled packages");
+ pw.println(" --apex-only: only show APEX packages");
pw.println(" --uid UID: filter to only show packages with the given UID");
pw.println(" --user USER_ID: only list packages belonging to the given user");
pw.println("");
diff --git a/services/core/java/com/android/server/pm/dex/ArtManagerService.java b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
index 1fb51b7fa0e8..1f05dc966555 100644
--- a/services/core/java/com/android/server/pm/dex/ArtManagerService.java
+++ b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
@@ -527,6 +527,11 @@ public class ArtManagerService extends android.content.pm.dex.IArtManager.Stub {
private static final int TRON_COMPILATION_REASON_AB_OTA = 6;
private static final int TRON_COMPILATION_REASON_INACTIVE = 7;
private static final int TRON_COMPILATION_REASON_SHARED = 8;
+ private static final int TRON_COMPILATION_REASON_INSTALL_WITH_DEX_METADATA = 9;
+
+ // The annotation to add as a suffix to the compilation reason when dexopt was
+ // performed with dex metadata.
+ public static final String DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION = "-dm";
/**
* Convert the compilation reason to an int suitable to be logged to TRON.
@@ -542,6 +547,10 @@ public class ArtManagerService extends android.content.pm.dex.IArtManager.Stub {
case "ab-ota" : return TRON_COMPILATION_REASON_AB_OTA;
case "inactive" : return TRON_COMPILATION_REASON_INACTIVE;
case "shared" : return TRON_COMPILATION_REASON_SHARED;
+ // This is a special marker for dex metadata installation that does not
+ // have an equivalent as a system property.
+ case "install" + DEXOPT_REASON_WITH_DEX_METADATA_ANNOTATION :
+ return TRON_COMPILATION_REASON_INSTALL_WITH_DEX_METADATA;
default: return TRON_COMPILATION_REASON_UNKNOWN;
}
}
diff --git a/services/core/java/com/android/server/policy/BarController.java b/services/core/java/com/android/server/policy/BarController.java
index eca6f9f1ec47..14c985c090a3 100644
--- a/services/core/java/com/android/server/policy/BarController.java
+++ b/services/core/java/com/android/server/policy/BarController.java
@@ -196,7 +196,7 @@ public class BarController {
}
protected boolean skipAnimation() {
- return false;
+ return !mWin.isDrawnLw();
}
private int computeStateLw(boolean wasVis, boolean wasAnim, WindowState win, boolean change) {
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index dfb617999668..9a741bcfc3d6 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -76,6 +76,7 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CO
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT;
@@ -4397,17 +4398,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (isKeyguardShowingAndNotOccluded()) {
// don't launch home if keyguard showing
return;
- } else if (mKeyguardOccluded && mKeyguardDelegate.isShowing()) {
- mKeyguardDelegate.dismiss(new KeyguardDismissCallback() {
- @Override
- public void onDismissSucceeded() throws RemoteException {
- mHandler.post(() -> {
- startDockOrHome(true /*fromHomeKey*/, awakenFromDreams);
- });
- }
- }, null /* message */);
- return;
- } else if (!mKeyguardOccluded && mKeyguardDelegate.isInputRestricted()) {
+ }
+
+ if (!mKeyguardOccluded && mKeyguardDelegate.isInputRestricted()) {
// when in keyguard restricted mode, must first verify unlock
// before launching home
mKeyguardDelegate.verifyUnlock(new OnKeyguardExitResult() {
@@ -4692,8 +4685,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
navTranslucent &= areTranslucentBarsAllowed();
}
boolean statusBarExpandedNotKeyguard = !isKeyguardShowing && mStatusBar != null
- && mStatusBar.getAttrs().height == MATCH_PARENT
- && mStatusBar.getAttrs().width == MATCH_PARENT;
+ && (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0;
// When the navigation bar isn't visible, we put up a fake input window to catch all
// touch events. This way we can detect when the user presses anywhere to bring back the
@@ -5696,7 +5688,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
// Take note if a window wants to acquire a sleep token.
- if (win.isVisibleLw() && (attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0
+ if ((attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0
&& win.canAcquireSleepToken()) {
mWindowSleepTokenNeeded = true;
}
@@ -5752,9 +5744,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mStatusBarController.setShowTransparent(true /* transparent */);
}
- WindowManager.LayoutParams statusBarAttrs = mStatusBar.getAttrs();
- boolean statusBarExpanded = statusBarAttrs.height == MATCH_PARENT
- && statusBarAttrs.width == MATCH_PARENT;
+ boolean statusBarExpanded =
+ (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0;
boolean topAppHidesStatusBar = topAppHidesStatusBar();
if (mForceStatusBar || mForceStatusBarFromKeyguard || mForceStatusBarTransparent
|| statusBarExpanded) {
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 44136661bee5..f9f4bbfc8eb0 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -46,7 +46,6 @@ import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
-import android.os.storage.StorageManager;
import android.provider.Settings;
import android.service.trust.TrustAgentService;
import android.text.TextUtils;
@@ -60,7 +59,6 @@ import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.content.PackageMonitor;
-import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.internal.util.DumpUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.server.SystemService;
@@ -431,13 +429,20 @@ public class TrustManagerService extends SystemService {
for (int i = 0; i < userInfos.size(); i++) {
UserInfo info = userInfos.get(i);
- if (info == null || info.partial || !info.isEnabled() || info.guestToRemove
- || !info.supportsSwitchToByUser()) {
+ if (info == null || info.partial || !info.isEnabled() || info.guestToRemove) {
continue;
}
int id = info.id;
boolean secure = mLockPatternUtils.isSecure(id);
+
+ if (!info.supportsSwitchToByUser()) {
+ if (info.isManagedProfile() && !secure) {
+ setDeviceLockedForUser(id, false);
+ }
+ continue;
+ }
+
boolean trusted = aggregateIsTrusted(id);
boolean showingKeyguard = true;
boolean fingerprintAuthenticated = false;
@@ -992,7 +997,8 @@ public class TrustManagerService extends SystemService {
enforceReportPermission();
final long identity = Binder.clearCallingIdentity();
try {
- if (mLockPatternUtils.isSeparateProfileChallengeEnabled(userId)) {
+ if (mLockPatternUtils.isSeparateProfileChallengeEnabled(userId)
+ && mLockPatternUtils.isSecure(userId)) {
synchronized (mDeviceLockedForUser) {
mDeviceLockedForUser.put(userId, locked);
}
diff --git a/services/core/java/com/android/server/wm/BoundsAnimationController.java b/services/core/java/com/android/server/wm/BoundsAnimationController.java
index b2a12bef5283..86f328d248db 100644
--- a/services/core/java/com/android/server/wm/BoundsAnimationController.java
+++ b/services/core/java/com/android/server/wm/BoundsAnimationController.java
@@ -31,11 +31,13 @@ import android.os.IBinder;
import android.os.Debug;
import android.util.ArrayMap;
import android.util.Slog;
+import android.view.Choreographer;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -112,6 +114,7 @@ public class BoundsAnimationController {
private final Interpolator mFastOutSlowInInterpolator;
private boolean mFinishAnimationAfterTransition = false;
private final AnimationHandler mAnimationHandler;
+ private Choreographer mChoreographer;
private static final int WAIT_FOR_DRAW_TIMEOUT_MS = 3000;
@@ -123,6 +126,12 @@ public class BoundsAnimationController {
mFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
com.android.internal.R.interpolator.fast_out_slow_in);
mAnimationHandler = animationHandler;
+ if (animationHandler != null) {
+ // If an animation handler is provided, then ensure that it runs on the sf vsync tick
+ handler.runWithScissors(() -> mChoreographer = Choreographer.getSfInstance(),
+ 0 /* timeout */);
+ animationHandler.setProvider(new SfVsyncFrameCallbackProvider(mChoreographer));
+ }
}
@VisibleForTesting
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 2887e5ef9061..2941e93d12dc 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -1775,8 +1775,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
final int newDensity = mDisplayInfo.logicalDensityDpi;
final DisplayCutout newCutout = mDisplayInfo.displayCutout;
- final boolean displayMetricsChanged = mInitialDisplayWidth != newWidth
- || mInitialDisplayHeight != newHeight
+ final boolean sizeChanged = mInitialDisplayWidth != newWidth
+ || mInitialDisplayHeight != newHeight;
+ final boolean displayMetricsChanged = sizeChanged
|| mInitialDisplayDensity != mDisplayInfo.logicalDensityDpi
|| !Objects.equals(mInitialDisplayCutout, newCutout);
@@ -1798,6 +1799,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
mInitialDisplayCutout = newCutout;
mService.reconfigureDisplayLocked(this);
}
+
+ if (isDefaultDisplay && sizeChanged) {
+ mService.mH.post(mService.mAmInternal::notifyDefaultDisplaySizeChanged);
+ }
}
/** Sets the maximum width the screen resolution can be */
diff --git a/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java b/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java
index bebc5656c284..efb43a6b90cf 100644
--- a/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java
+++ b/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java
@@ -21,6 +21,7 @@ import static android.view.Surface.ROTATION_90;
import android.graphics.Matrix;
import android.view.DisplayInfo;
+import android.view.Surface.Rotation;
import com.android.server.wm.utils.CoordinateTransforms;
@@ -65,6 +66,16 @@ public class ForcedSeamlessRotator {
}
/**
+ * Returns the rotation of the display before it started rotating.
+ *
+ * @return the old rotation of the display
+ */
+ @Rotation
+ public int getOldRotation() {
+ return mOldRotation;
+ }
+
+ /**
* Removes the transform to the window token's surface that undoes the effect of the global
* display rotation.
*
diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
index fa8a5c66aeea..755a571cf5f7 100644
--- a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -37,6 +37,7 @@ import android.view.DisplayInfo;
import android.view.Surface;
import android.view.Surface.OutOfResourcesException;
import android.view.SurfaceControl;
+import android.view.SurfaceControl.Transaction;
import android.view.SurfaceSession;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
@@ -268,6 +269,12 @@ class ScreenRotationAnimation {
.setSecure(isSecure)
.build();
+ // In case display bounds change, screenshot buffer and surface may mismatch so set a
+ // scaling mode.
+ Transaction t2 = new Transaction();
+ t2.setOverrideScalingMode(mSurfaceControl, Surface.SCALING_MODE_SCALE_TO_WINDOW);
+ t2.apply(true /* sync */);
+
// capture a screenshot into the surface we just created
// TODO(multidisplay): we should use the proper display
final int displayId = SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN;
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
index a642e6ab744a..d1c0443c58e1 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
@@ -360,6 +360,7 @@ class TaskSnapshotPersister {
// For snapshots with reduced resolution, do not create or save full sized bitmaps
if (mSnapshot.isReducedResolution()) {
+ swBitmap.recycle();
return true;
}
@@ -372,6 +373,8 @@ class TaskSnapshotPersister {
Slog.e(TAG, "Unable to open " + file + " for persisting.", e);
return false;
}
+ reduced.recycle();
+ swBitmap.recycle();
return true;
}
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 8bc224636c1e..8b4a2dd36e6c 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -1005,7 +1005,6 @@ public class WindowManagerService extends IWindowManager.Stub
mAppTransition.registerListenerLocked(mActivityManagerAppTransitionNotifier);
final AnimationHandler animationHandler = new AnimationHandler();
- animationHandler.setProvider(new SfVsyncFrameCallbackProvider());
mBoundsAnimationController = new BoundsAnimationController(context, mAppTransition,
AnimationThread.getHandler(), animationHandler);
@@ -6221,6 +6220,17 @@ public class WindowManagerService extends IWindowManager.Stub
}
/**
+ * Returns true if the callingUid has any window currently visible to the user.
+ */
+ public boolean isAnyWindowVisibleForUid(int callingUid) {
+ synchronized (mWindowMap) {
+ return mRoot.forAllWindows(w -> {
+ return w.getOwningUid() == callingUid && w.isVisible();
+ }, true /* traverseTopToBottom */);
+ }
+ }
+
+ /**
* Called when a task has been removed from the recent tasks list.
* <p>
* Note: This doesn't go through {@link TaskWindowContainerController} yet as the window
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 009f3930d02e..1ae680f793ca 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -681,6 +681,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
void forceSeamlesslyRotateIfAllowed(int oldRotation, int rotation) {
if (mForceSeamlesslyRotate) {
+ if (mPendingForcedSeamlessRotate != null) {
+ oldRotation = mPendingForcedSeamlessRotate.getOldRotation();
+ }
+
mPendingForcedSeamlessRotate = new ForcedSeamlessRotator(
oldRotation, rotation, getDisplayInfo());
mPendingForcedSeamlessRotate.unrotate(this.mToken);
diff --git a/services/core/java/com/android/server/wm/utils/InsetUtils.java b/services/core/java/com/android/server/wm/utils/InsetUtils.java
index b4a998add374..c8600dd151d2 100644
--- a/services/core/java/com/android/server/wm/utils/InsetUtils.java
+++ b/services/core/java/com/android/server/wm/utils/InsetUtils.java
@@ -17,6 +17,7 @@
package com.android.server.wm.utils;
import android.graphics.Rect;
+import android.view.Surface;
/**
* Utility methods to handle insets represented as rects.
@@ -27,6 +28,32 @@ public class InsetUtils {
}
/**
+ * Transforms insets given in one rotation into insets in a different rotation.
+ *
+ * @param inOutInsets the insets to transform, is set to the transformed insets
+ * @param rotationDelta the delta between the new and old rotation.
+ * Must be one of Surface.ROTATION_0/90/180/270.
+ */
+ public static void rotateInsets(Rect inOutInsets, int rotationDelta) {
+ final Rect r = inOutInsets;
+ switch (rotationDelta) {
+ case Surface.ROTATION_0:
+ return;
+ case Surface.ROTATION_90:
+ r.set(r.top, r.right, r.bottom, r.left);
+ break;
+ case Surface.ROTATION_180:
+ r.set(r.right, r.bottom, r.left, r.top);
+ break;
+ case Surface.ROTATION_270:
+ r.set(r.bottom, r.left, r.top, r.right);
+ break;
+ default:
+ throw new IllegalArgumentException("Unknown rotation: " + rotationDelta);
+ }
+ }
+
+ /**
* Adds {@code insetsToAdd} to {@code inOutInsets}.
*/
public static void addInsets(Rect inOutInsets, Rect insetsToAdd) {
diff --git a/services/core/jni/com_android_server_net_NetworkStatsService.cpp b/services/core/jni/com_android_server_net_NetworkStatsService.cpp
index 649f1a56f011..4d4a7b41643c 100644
--- a/services/core/jni/com_android_server_net_NetworkStatsService.cpp
+++ b/services/core/jni/com_android_server_net_NetworkStatsService.cpp
@@ -34,7 +34,6 @@
#include "netdbpf/BpfNetworkStats.h"
using android::bpf::Stats;
-using android::bpf::hasBpfSupport;
using android::bpf::bpfGetUidStats;
using android::bpf::bpfGetIfaceStats;
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 123d6159d940..8f5d36abcf2c 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -4572,10 +4572,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
enforceFullCrossUsersPermission(userHandle);
synchronized (getLockObject()) {
if (!isCallerWithSystemUid()) {
- // This API can only be called by an active device admin,
- // so try to retrieve it to check that the caller is one.
- getActiveAdminForCallerLocked(
- null, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, parent);
+ // This API can be called by an active device admin or by keyguard code.
+ if (mContext.checkCallingPermission(permission.ACCESS_KEYGUARD_SECURE_STORAGE)
+ != PackageManager.PERMISSION_GRANTED) {
+ getActiveAdminForCallerLocked(
+ null, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, parent);
+ }
}
DevicePolicyData policy = getUserDataUnchecked(getCredentialOwner(userHandle, parent));
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 65ee52a0d876..4decd4f1a414 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -29,6 +29,7 @@ import android.content.res.Configuration;
import android.content.res.Resources.Theme;
import android.database.sqlite.SQLiteCompatibilityWalFlags;
import android.database.sqlite.SQLiteGlobal;
+import android.hardware.display.DisplayManagerInternal;
import android.os.BaseBundle;
import android.os.Binder;
import android.os.Build;
@@ -688,9 +689,17 @@ public final class SystemServer {
// Manages Overlay packages
traceBeginAndSlog("StartOverlayManagerService");
- mSystemServiceManager.startService(new OverlayManagerService(mSystemContext, installer));
+ OverlayManagerService overlayManagerService = new OverlayManagerService(
+ mSystemContext, installer);
+ mSystemServiceManager.startService(overlayManagerService);
traceEnd();
+ if (SystemProperties.getInt("persist.sys.displayinset.top", 0) > 0) {
+ // DisplayManager needs the overlay immediately.
+ overlayManagerService.updateSystemUiContext();
+ LocalServices.getService(DisplayManagerInternal.class).onOverlayChanged();
+ }
+
// The sensor service needs access to package manager service, app ops
// service, and permissions service, therefore we start it after them.
// Start sensor service in a separate thread. Completion should be checked
diff --git a/services/net/java/android/net/apf/ApfFilter.java b/services/net/java/android/net/apf/ApfFilter.java
index a7209a076461..b9cc372c5138 100644
--- a/services/net/java/android/net/apf/ApfFilter.java
+++ b/services/net/java/android/net/apf/ApfFilter.java
@@ -111,7 +111,7 @@ public class ApfFilter {
* the last writable 32bit word.
*/
@VisibleForTesting
- private static enum Counter {
+ public static enum Counter {
RESERVED_OOB, // Points to offset 0 from the end of the buffer (out-of-bounds)
TOTAL_PACKETS,
PASSED_ARP,
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
index 1520859d4aac..8d056fc4a8c0 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
@@ -53,6 +53,7 @@ import android.view.Gravity;
import org.junit.runner.RunWith;
import org.junit.Test;
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED;
import static com.android.server.am.ActivityManagerService.ANIMATE;
@@ -62,11 +63,13 @@ import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyBoolean;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.anyObject;
+import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.times;
@@ -91,6 +94,7 @@ public class ActivityStarterTests extends ActivityTestsBase {
private ActivityManagerService mService;
private ActivityStarter mStarter;
private ActivityStartController mController;
+ private ActivityMetricsLogger mActivityMetricsLogger;
private static final int PRECONDITION_NO_CALLER_APP = 1;
private static final int PRECONDITION_NO_INTENT_COMPONENT = 1 << 1;
@@ -104,11 +108,17 @@ public class ActivityStarterTests extends ActivityTestsBase {
private static final int PRECONDITION_CANNOT_START_ANY_ACTIVITY = 1 << 9;
private static final int PRECONDITION_DISALLOW_APP_SWITCHING = 1 << 10;
+ private static final int FAKE_CALLING_UID = 666;
+ private static final int FAKE_REAL_CALLING_UID = 667;
+ private static final String FAKE_CALLING_PACKAGE = "com.whatever.dude";
+
@Override
public void setUp() throws Exception {
super.setUp();
mService = createActivityManagerService();
mController = mock(ActivityStartController.class);
+ mActivityMetricsLogger = mock(ActivityMetricsLogger.class);
+ clearInvocations(mActivityMetricsLogger);
mStarter = new ActivityStarter(mController, mService, mService.mStackSupervisor,
mock(ActivityStartInterceptor.class));
}
@@ -471,4 +481,46 @@ public class ActivityStarterTests extends ActivityTestsBase {
assertTrue(stack.getAllTasks().isEmpty());
}
}
+
+ /**
+ * This test ensures that activity starts are not being logged when the logging is disabled.
+ */
+ @Test
+ public void testActivityStartsLogging_noLoggingWhenDisabled() {
+ doReturn(false).when(mService).isActivityStartsLoggingEnabled();
+ doReturn(mActivityMetricsLogger).when(mService.mStackSupervisor).getActivityMetricsLogger();
+
+ ActivityStarter starter = prepareStarter(FLAG_ACTIVITY_NEW_TASK);
+ starter.setReason("testActivityStartsLogging_noLoggingWhenDisabled").execute();
+
+ // verify logging wasn't done
+ verify(mActivityMetricsLogger, never()).logActivityStart(any(), any(), any(), anyInt(),
+ any(), anyInt(), anyBoolean(), anyInt(), anyInt(), anyBoolean(), anyInt(), any(),
+ anyInt(), anyBoolean(), any(), anyBoolean());
+ }
+
+ /**
+ * This test ensures that activity starts are being logged when the logging is enabled.
+ */
+ @Test
+ public void testActivityStartsLogging_logsWhenEnabled() {
+ // note: conveniently this package doesn't have any activity visible
+ doReturn(true).when(mService).isActivityStartsLoggingEnabled();
+ doReturn(mActivityMetricsLogger).when(mService.mStackSupervisor).getActivityMetricsLogger();
+
+ ActivityStarter starter = prepareStarter(FLAG_ACTIVITY_NEW_TASK)
+ .setCallingUid(FAKE_CALLING_UID)
+ .setRealCallingUid(FAKE_REAL_CALLING_UID)
+ .setCallingPackage(FAKE_CALLING_PACKAGE)
+ .setOriginatingPendingIntent(null);
+
+ starter.setReason("testActivityStartsLogging_logsWhenEnabled").execute();
+
+ // verify the above activity start was logged
+ verify(mActivityMetricsLogger, times(1)).logActivityStart(any(), any(), any(),
+ eq(FAKE_CALLING_UID), eq(FAKE_CALLING_PACKAGE), anyInt(), anyBoolean(),
+ eq(FAKE_REAL_CALLING_UID), anyInt(), anyBoolean(), anyInt(),
+ eq(ActivityBuilder.getDefaultComponent().getPackageName()), anyInt(), anyBoolean(),
+ any(), eq(false));
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
index d0f0fe315bcf..08bcc3d751f2 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
@@ -16,6 +16,11 @@
package com.android.server.wm.utils;
+import static android.hardware.camera2.params.OutputConfiguration.ROTATION_90;
+import static android.view.Surface.ROTATION_0;
+import static android.view.Surface.ROTATION_180;
+import static android.view.Surface.ROTATION_270;
+
import static junit.framework.Assert.assertEquals;
import android.graphics.Rect;
@@ -39,5 +44,29 @@ public class InsetUtilsTest {
InsetUtils.addInsets(rect1, rect2);
assertEquals(new Rect(60, 80, 100, 120), rect1);
}
+
+ @Test
+ public void rotate() {
+ final Rect original = new Rect(1, 2, 3, 4);
+
+ assertEquals("rot0", original, rotateCopy(original, ROTATION_0));
+
+ final Rect rot90 = rotateCopy(original, ROTATION_90);
+ assertEquals("rot90", new Rect(2, 3, 4, 1), rot90);
+
+ final Rect rot180 = rotateCopy(original, ROTATION_180);
+ assertEquals("rot180", new Rect(3, 4, 1, 2), rot180);
+ assertEquals("rot90(rot90)=rot180", rotateCopy(rot90, ROTATION_90), rot180);
+
+ final Rect rot270 = rotateCopy(original, ROTATION_270);
+ assertEquals("rot270", new Rect(4, 1, 2, 3), rot270);
+ assertEquals("rot90(rot180)=rot270", rotateCopy(rot180, ROTATION_90), rot270);
+ }
+
+ private static Rect rotateCopy(Rect insets, int rotationDelta) {
+ final Rect copy = new Rect(insets);
+ InsetUtils.rotateInsets(copy, rotationDelta);
+ return copy;
+ }
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
index afc12636007f..8222c386c0d9 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
@@ -38,6 +38,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.app.AppGlobals;
import android.app.AppOpsManager;
import android.app.NotificationManager;
import android.content.ComponentName;
@@ -49,8 +50,10 @@ import android.media.AudioManager;
import android.media.AudioManagerInternal;
import android.media.VolumePolicy;
import android.media.AudioSystem;
+import android.net.Uri;
import android.provider.Settings;
import android.provider.Settings.Global;
+import android.service.notification.Condition;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeConfig.ScheduleInfo;
import android.test.suitebuilder.annotation.SmallTest;
@@ -61,6 +64,7 @@ import android.util.Xml;
import com.android.internal.R;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+import com.android.server.notification.ManagedServices.UserProfiles;
import com.android.internal.util.FastXmlSerializer;
import com.android.server.UiServiceTestCase;
import android.util.Slog;
@@ -83,7 +87,7 @@ import java.io.ByteArrayOutputStream;
@TestableLooper.RunWithLooper
public class ZenModeHelperTest extends UiServiceTestCase {
- @Mock ConditionProviders mConditionProviders;
+ ConditionProviders mConditionProviders;
@Mock NotificationManager mNotificationManager;
@Mock private Resources mResources;
private TestableLooper mTestableLooper;
@@ -103,6 +107,9 @@ public class ZenModeHelperTest extends UiServiceTestCase {
when(mResources.getString(R.string.zen_mode_default_events_name)).thenReturn("events");
when(mContext.getSystemService(NotificationManager.class)).thenReturn(mNotificationManager);
+ mConditionProviders = new ConditionProviders(mContext, new UserProfiles(),
+ AppGlobals.getPackageManager());
+ mConditionProviders.addSystemProvider(new CountdownConditionProvider());
mZenModeHelperSpy = spy(new ZenModeHelper(mContext, mTestableLooper.getLooper(),
mConditionProviders));
}
@@ -116,7 +123,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
mZenModeHelperSpy.writeXml(serializer, forBackup, version);
serializer.endDocument();
serializer.flush();
- mZenModeHelperSpy.setConfig(new ZenModeConfig(), "writing xml");
+ mZenModeHelperSpy.setConfig(new ZenModeConfig(), null, "writing xml");
return baos;
}
@@ -813,6 +820,30 @@ public class ZenModeHelperTest extends UiServiceTestCase {
setupZenConfigMaintained();
}
+ @Test
+ public void testCountdownConditionSubscription() throws Exception {
+ ZenModeConfig config = new ZenModeConfig();
+ mZenModeHelperSpy.mConfig = config;
+ mZenModeHelperSpy.mConditions.evaluateConfig(mZenModeHelperSpy.mConfig, null, true);
+ assertEquals(0, mZenModeHelperSpy.mConditions.mSubscriptions.size());
+
+ mZenModeHelperSpy.mConfig.manualRule = new ZenModeConfig.ZenRule();
+ Uri conditionId = ZenModeConfig.toCountdownConditionId(9000000, false);
+ mZenModeHelperSpy.mConfig.manualRule.conditionId = conditionId;
+ mZenModeHelperSpy.mConfig.manualRule.component = new ComponentName("android",
+ CountdownConditionProvider.class.getName());
+ mZenModeHelperSpy.mConfig.manualRule.condition = new Condition(conditionId, "", "", "", 0,
+ Condition.STATE_TRUE, Condition.FLAG_RELEVANT_NOW);
+ mZenModeHelperSpy.mConfig.manualRule.enabled = true;
+ ZenModeConfig originalConfig = mZenModeHelperSpy.mConfig.copy();
+
+ mZenModeHelperSpy.mConditions.evaluateConfig(mZenModeHelperSpy.mConfig, null, true);
+
+ assertEquals(true, ZenModeConfig.isValidCountdownConditionId(conditionId));
+ assertEquals(originalConfig, mZenModeHelperSpy.mConfig);
+ assertEquals(1, mZenModeHelperSpy.mConditions.mSubscriptions.size());
+ }
+
private void setupZenConfig() {
mZenModeHelperSpy.mZenMode = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
mZenModeHelperSpy.mConfig.allowAlarms = false;
diff --git a/startop/view_compiler/config.xml b/startop/view_compiler/config.xml
new file mode 100644
index 000000000000..84e779d240d1
--- /dev/null
+++ b/startop/view_compiler/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
+</resources>
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 9f0bdd715359..e7ce78a7380c 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -1462,7 +1462,6 @@ public class TelecomManager {
* otherwise.
*/
@RequiresPermission(Manifest.permission.ANSWER_PHONE_CALLS)
- @SystemApi
public boolean endCall() {
try {
if (isServiceConnected()) {
@@ -1539,7 +1538,6 @@ public class TelecomManager {
/**
* Returns whether TTY is supported on this device.
*/
- @SystemApi
@RequiresPermission(anyOf = {
android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
android.Manifest.permission.READ_PHONE_STATE
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index e72d67b20160..14e0909bba97 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -81,7 +81,6 @@ public class CarrierConfigManager {
* Specifies a value that identifies the version of the carrier configuration that is
* currently in use. This string is displayed on the UI.
* The format of the string is not specified.
- * @hide
*/
public static final String KEY_CARRIER_CONFIG_VERSION_STRING =
"carrier_config_version_string";
@@ -403,7 +402,6 @@ public class CarrierConfigManager {
* @see SubscriptionManager#getSubscriptionPlans(int)
* @see SubscriptionManager#setSubscriptionPlans(int, java.util.List)
*/
- @SystemApi
public static final String KEY_CONFIG_PLANS_PACKAGE_OVERRIDE_STRING =
"config_plans_package_override_string";
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index ea408bf8ff59..1b37bad65d57 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -365,7 +365,6 @@ public final class SmsManager {
*
* @see #sendTextMessage(String, String, String, PendingIntent, PendingIntent)
*/
- @SystemApi
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
@RequiresPermission(allOf = {
android.Manifest.permission.MODIFY_PHONE_STATE,
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index ff20fd23b0c1..4181f11bf625 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -635,7 +635,6 @@ public class SubscriptionManager {
* the user is interested in.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
- @SystemApi
public static final String ACTION_MANAGE_SUBSCRIPTION_PLANS
= "android.telephony.action.MANAGE_SUBSCRIPTION_PLANS";
@@ -655,7 +654,6 @@ public class SubscriptionManager {
* {@code android.permission.MANAGE_SUBSCRIPTION_PLANS} permission.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- @SystemApi
public static final String ACTION_REFRESH_SUBSCRIPTION_PLANS
= "android.telephony.action.REFRESH_SUBSCRIPTION_PLANS";
@@ -2043,7 +2041,6 @@ public class SubscriptionManager {
* @throws SecurityException if the caller doesn't meet the requirements
* outlined above.
*/
- @SystemApi
public @NonNull List<SubscriptionPlan> getSubscriptionPlans(int subId) {
try {
SubscriptionPlan[] subscriptionPlans =
@@ -2075,7 +2072,6 @@ public class SubscriptionManager {
* @throws SecurityException if the caller doesn't meet the requirements
* outlined above.
*/
- @SystemApi
public void setSubscriptionPlans(int subId, @NonNull List<SubscriptionPlan> plans) {
try {
getNetworkPolicy().setSubscriptionPlans(subId,
@@ -2117,7 +2113,6 @@ public class SubscriptionManager {
* @throws SecurityException if the caller doesn't meet the requirements
* outlined above.
*/
- @SystemApi
public void setSubscriptionOverrideUnmetered(int subId, boolean overrideUnmetered,
@DurationMillisLong long timeoutMillis) {
try {
@@ -2153,7 +2148,6 @@ public class SubscriptionManager {
* @throws SecurityException if the caller doesn't meet the requirements
* outlined above.
*/
- @SystemApi
public void setSubscriptionOverrideCongested(int subId, boolean overrideCongested,
@DurationMillisLong long timeoutMillis) {
try {
diff --git a/telephony/java/android/telephony/SubscriptionPlan.java b/telephony/java/android/telephony/SubscriptionPlan.java
index e8bbe42e834e..d67169ccd284 100644
--- a/telephony/java/android/telephony/SubscriptionPlan.java
+++ b/telephony/java/android/telephony/SubscriptionPlan.java
@@ -45,7 +45,6 @@ import java.util.Objects;
* @see SubscriptionManager#setSubscriptionPlans(int, java.util.List)
* @see SubscriptionManager#getSubscriptionPlans(int)
*/
-@SystemApi
public final class SubscriptionPlan implements Parcelable {
/** {@hide} */
@IntDef(prefix = "LIMIT_BEHAVIOR_", value = {
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index a976fe6ef2fe..3649ecada9d2 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -225,6 +225,13 @@ public class TelephonyManager {
@SystemApi
public static final int SRVCC_STATE_HANDOVER_CANCELED = 3;
+ /**
+ * An invalid card identifier.
+ * @hide
+ */
+ @SystemApi
+ public static final int INVALID_CARD_ID = -1;
+
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@IntDef(prefix = {"SRVCC_STATE_"},
@@ -3094,6 +3101,34 @@ public class TelephonyManager {
}
/**
+ * Get the card ID of the default eUICC card. If there is no eUICC, returns
+ * {@link #INVALID_CARD_ID}.
+ *
+ * <p>The card ID is a unique identifier associated with a UICC or eUICC card. Card IDs are
+ * unique to a device, and always refer to the same UICC or eUICC card unless the device goes
+ * through a factory reset.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ *
+ * @return card ID of the default eUICC card.
+ * @hide
+ */
+ @SystemApi
+ @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ public int getCardIdForDefaultEuicc() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) {
+ return INVALID_CARD_ID;
+ }
+ return telephony.getCardIdForDefaultEuicc(mSubId, mContext.getOpPackageName());
+ } catch (RemoteException e) {
+ return INVALID_CARD_ID;
+ }
+ }
+
+ /**
* Gets all the UICC slots. The objects in the array can be null if the slot info is not
* available, which is possible between phone process starting and getting slot info from modem.
*
@@ -5569,7 +5604,7 @@ public class TelephonyManager {
if (value == null) {
value = "";
}
-
+ value.replace(',', ' ');
if (prop != null) {
p = prop.split(",");
}
@@ -5595,7 +5630,13 @@ public class TelephonyManager {
}
}
- if (propVal.length() > SystemProperties.PROP_VALUE_MAX) {
+ int propValLen = propVal.length();
+ try {
+ propValLen = propVal.getBytes("utf-8").length;
+ } catch (java.io.UnsupportedEncodingException e) {
+ Rlog.d(TAG, "setTelephonyProperty: utf-8 not supported");
+ }
+ if (propValLen > SystemProperties.PROP_VALUE_MAX) {
Rlog.d(TAG, "setTelephonyProperty: property too long phoneId=" + phoneId +
" property=" + property + " value: " + value + " propVal=" + propVal);
return;
diff --git a/telephony/java/android/telephony/data/DataServiceCallback.java b/telephony/java/android/telephony/data/DataServiceCallback.java
index 4af31b5e5346..bef11425b470 100644
--- a/telephony/java/android/telephony/data/DataServiceCallback.java
+++ b/telephony/java/android/telephony/data/DataServiceCallback.java
@@ -125,7 +125,6 @@ public class DataServiceCallback {
*
* @param result The result code. Must be one of the {@link ResultCode}.
*/
- @SystemApi
public void onSetDataProfileComplete(@ResultCode int result) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 8a1fb7bc8ff0..5a06f6aaf7ea 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1482,6 +1482,19 @@ interface ITelephony {
SignalStrength getSignalStrength(int subId);
/**
+ * Get the card ID of the default eUICC card. If there is no eUICC, returns
+ * {@link #INVALID_CARD_ID}.
+ *
+ * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ *
+ * @param subId subscription ID used for authentication
+ * @param callingPackage package making the call
+ * @return card ID of the default eUICC card.
+ * @hide
+ */
+ int getCardIdForDefaultEuicc(int subId, String callingPackage);
+
+ /**
* Get slot info for all the UICC slots.
* @return UiccSlotInfo array.
* @hide
diff --git a/test-base/Android.bp b/test-base/Android.bp
index 4d765d3e5f3f..157609cec09c 100644
--- a/test-base/Android.bp
+++ b/test-base/Android.bp
@@ -37,8 +37,6 @@ java_sdk_library {
"junit.framework",
],
- droiddoc_options: ["-stubsourceonly"],
- metalava_enabled: false,
compile_dex: true,
}
diff --git a/test-runner/Android.bp b/test-runner/Android.bp
index 0a0d50cc330c..db5053eeb903 100644
--- a/test-runner/Android.bp
+++ b/test-runner/Android.bp
@@ -40,8 +40,6 @@ java_sdk_library {
"junit.textui",
],
- droiddoc_options: ["-stubsourceonly"],
- metalava_enabled: false,
compile_dex: true
}
diff --git a/test-runner/api/current.txt b/test-runner/api/current.txt
index 1170eb53ab7f..4ba1b8f2fdc1 100644
--- a/test-runner/api/current.txt
+++ b/test-runner/api/current.txt
@@ -125,8 +125,8 @@ package android.test {
method public static void assertEquals(double[], double[]);
method public static void assertEquals(java.lang.String, java.lang.Object[], java.lang.Object[]);
method public static void assertEquals(java.lang.Object[], java.lang.Object[]);
- method public static void assertEquals(java.lang.String, java.util.Set<? extends java.lang.Object>, java.util.Set<? extends java.lang.Object>);
- method public static void assertEquals(java.util.Set<? extends java.lang.Object>, java.util.Set<? extends java.lang.Object>);
+ method public static void assertEquals(java.lang.String, java.util.Set<?>, java.util.Set<?>);
+ method public static void assertEquals(java.util.Set<?>, java.util.Set<?>);
method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String, java.lang.String);
method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String);
method public static void assertNotContainsRegex(java.lang.String, java.lang.String, java.lang.String);
diff --git a/tests/net/java/android/net/NetworkCapabilitiesTest.java b/tests/net/java/android/net/NetworkCapabilitiesTest.java
index 50aef1d24faf..84f735985b0d 100644
--- a/tests/net/java/android/net/NetworkCapabilitiesTest.java
+++ b/tests/net/java/android/net/NetworkCapabilitiesTest.java
@@ -474,7 +474,7 @@ public class NetworkCapabilitiesTest {
new StringNetworkSpecifier("specs"));
try {
nc2.addTransportType(TRANSPORT_WIFI);
- fail("Cannot set NetworkSpecifier on a NetworkCapability with multiple transports!");
+ fail("Cannot set a second TransportType of a network which has a NetworkSpecifier!");
} catch (IllegalStateException expected) {
// empty
}
@@ -500,16 +500,23 @@ public class NetworkCapabilitiesTest {
// empty
});
NetworkCapabilities nc2 = new NetworkCapabilities();
+ // new TransportInfo so that object is not #equals to nc1's TransportInfo (that's where
+ // combine fails)
nc2.setTransportInfo(new TransportInfo() {
// empty
});
try {
nc1.combineCapabilities(nc2);
- fail("Should not be able to combine NetworkCaabilities which contain TransportInfos");
+ fail("Should not be able to combine NetworkCabilities which contain TransportInfos");
} catch (IllegalStateException expected) {
// empty
}
+
+ // verify that can combine with identical TransportInfo objects
+ NetworkCapabilities nc3 = new NetworkCapabilities();
+ nc3.setTransportInfo(nc1.getTransportInfo());
+ nc1.combineCapabilities(nc3);
}
private void assertEqualsThroughMarshalling(NetworkCapabilities netCap) {
diff --git a/tests/net/java/android/net/apf/ApfTest.java b/tests/net/java/android/net/apf/ApfTest.java
index 983802035bfb..436dd859beca 100644
--- a/tests/net/java/android/net/apf/ApfTest.java
+++ b/tests/net/java/android/net/apf/ApfTest.java
@@ -46,6 +46,7 @@ import android.support.test.runner.AndroidJUnit4;
import android.system.ErrnoException;
import android.system.Os;
import android.text.format.DateUtils;
+import android.util.Log;
import com.android.frameworks.tests.net.R;
import com.android.internal.util.HexDump;
import java.io.File;
@@ -89,6 +90,7 @@ public class ApfTest {
System.loadLibrary("frameworksnettestsjni");
}
+ private static final String TAG = "ApfTest";
// Expected return codes from APF interpreter.
private static final int PASS = 1;
private static final int DROP = 0;
@@ -869,6 +871,37 @@ public class ApfTest {
}
}
+ /**
+ * Generate APF program, run pcap file though APF filter, then check all the packets in the file
+ * should be dropped.
+ */
+ @Test
+ public void testApfFilterPcapFile() throws Exception {
+ final byte[] MOCK_PCAP_IPV4_ADDR = {(byte) 172, 16, 7, (byte) 151};
+ String pcapFilename = stageFile(R.raw.apfPcap);
+ MockIpClientCallback ipClientCallback = new MockIpClientCallback();
+ LinkAddress link = new LinkAddress(InetAddress.getByAddress(MOCK_PCAP_IPV4_ADDR), 16);
+ LinkProperties lp = new LinkProperties();
+ lp.addLinkAddress(link);
+
+ ApfConfiguration config = getDefaultConfig();
+ ApfCapabilities MOCK_APF_PCAP_CAPABILITIES = new ApfCapabilities(4, 1700, ARPHRD_ETHER);
+ config.apfCapabilities = MOCK_APF_PCAP_CAPABILITIES;
+ config.multicastFilter = DROP_MULTICAST;
+ config.ieee802_3Filter = DROP_802_3_FRAMES;
+ TestApfFilter apfFilter = new TestApfFilter(mContext, config, ipClientCallback, mLog);
+ apfFilter.setLinkProperties(lp);
+ byte[] program = ipClientCallback.getApfProgram();
+ byte[] data = new byte[ApfFilter.Counter.totalSize()];
+ final boolean result;
+
+ result = dropsAllPackets(program, data, pcapFilename);
+ Log.i(TAG, "testApfFilterPcapFile(): Data counters: " + HexDump.toHexString(data, false));
+
+ assertTrue("Failed to drop all packets by filter. \nAPF counters:" +
+ HexDump.toHexString(data, false), result);
+ }
+
private class MockIpClientCallback extends IpClient.Callback {
private final ConditionVariable mGotApfProgram = new ConditionVariable();
private byte[] mLastApfProgram;
@@ -1706,6 +1739,14 @@ public class ApfTest {
private native static boolean compareBpfApf(String filter, String pcap_filename,
byte[] apf_program);
+
+ /**
+ * Open packet capture file {@code pcapFilename} and run it through APF filter. Then
+ * checks whether all the packets are dropped and populates data[] {@code data} with
+ * the APF counters.
+ */
+ private native static boolean dropsAllPackets(byte[] program, byte[] data, String pcapFilename);
+
@Test
public void testBroadcastAddress() throws Exception {
assertEqualsIp("255.255.255.255", ApfFilter.ipv4BroadcastAddress(IPV4_ANY_HOST_ADDR, 0));
diff --git a/tests/net/jni/apf_jni.cpp b/tests/net/jni/apf_jni.cpp
index 1ea9e274ab9e..4222adf9e06b 100644
--- a/tests/net/jni/apf_jni.cpp
+++ b/tests/net/jni/apf_jni.cpp
@@ -21,37 +21,40 @@
#include <stdlib.h>
#include <string>
#include <utils/Log.h>
+#include <vector>
#include "apf_interpreter.h"
+#include "nativehelper/scoped_primitive_array.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
// JNI function acting as simply call-through to native APF interpreter.
static jint com_android_server_ApfTest_apfSimulate(
- JNIEnv* env, jclass, jbyteArray program, jbyteArray packet,
- jbyteArray data, jint filter_age) {
- uint8_t* program_raw = (uint8_t*)env->GetByteArrayElements(program, nullptr);
- uint8_t* packet_raw = (uint8_t*)env->GetByteArrayElements(packet, nullptr);
- uint8_t* data_raw = (uint8_t*)(data ? env->GetByteArrayElements(data, nullptr) : nullptr);
- uint32_t program_len = env->GetArrayLength(program);
- uint32_t packet_len = env->GetArrayLength(packet);
- uint32_t data_len = data ? env->GetArrayLength(data) : 0;
-
- // Merge program and data into a single buffer.
- uint8_t* program_and_data = (uint8_t*)malloc(program_len + data_len);
- memcpy(program_and_data, program_raw, program_len);
- memcpy(program_and_data + program_len, data_raw, data_len);
+ JNIEnv* env, jclass, jbyteArray jprogram, jbyteArray jpacket,
+ jbyteArray jdata, jint filter_age) {
+
+ ScopedByteArrayRO packet(env, jpacket);
+ uint32_t packet_len = (uint32_t)packet.size();
+ uint32_t program_len = env->GetArrayLength(jprogram);
+ uint32_t data_len = jdata ? env->GetArrayLength(jdata) : 0;
+ std::vector<uint8_t> buf(program_len + data_len, 0);
+
+ env->GetByteArrayRegion(jprogram, 0, program_len, reinterpret_cast<jbyte*>(buf.data()));
+ if (jdata) {
+ // Merge program and data into a single buffer.
+ env->GetByteArrayRegion(jdata, 0, data_len,
+ reinterpret_cast<jbyte*>(buf.data() + program_len));
+ }
jint result =
- accept_packet(program_and_data, program_len, program_len + data_len,
- packet_raw, packet_len, filter_age);
- if (data) {
- memcpy(data_raw, program_and_data + program_len, data_len);
- env->ReleaseByteArrayElements(data, (jbyte*)data_raw, 0 /* copy back */);
- }
- free(program_and_data);
- env->ReleaseByteArrayElements(packet, (jbyte*)packet_raw, JNI_ABORT);
- env->ReleaseByteArrayElements(program, (jbyte*)program_raw, JNI_ABORT);
+ accept_packet(buf.data(), program_len, program_len + data_len,
+ reinterpret_cast<const uint8_t*>(packet.get()), packet_len, filter_age);
+
+ if (jdata) {
+ env->SetByteArrayRegion(jdata, 0, data_len,
+ reinterpret_cast<jbyte*>(buf.data() + program_len));
+ }
+
return result;
}
@@ -118,8 +121,7 @@ static jboolean com_android_server_ApfTest_compareBpfApf(JNIEnv* env, jclass, js
jstring jpcap_filename, jbyteArray japf_program) {
ScopedUtfChars filter(env, jfilter);
ScopedUtfChars pcap_filename(env, jpcap_filename);
- uint8_t* apf_program = (uint8_t*)env->GetByteArrayElements(japf_program, NULL);
- uint32_t apf_program_len = env->GetArrayLength(japf_program);
+ ScopedByteArrayRO apf_program(env, japf_program);
// Open pcap file for BPF filtering
ScopedFILE bpf_fp(fopen(pcap_filename.c_str(), "rb"));
@@ -161,14 +163,15 @@ static jboolean com_android_server_ApfTest_compareBpfApf(JNIEnv* env, jclass, js
do {
apf_packet = pcap_next(apf_pcap.get(), &apf_header);
} while (apf_packet != NULL && !accept_packet(
- apf_program, apf_program_len, 0 /* data_len */,
+ reinterpret_cast<uint8_t*>(const_cast<int8_t*>(apf_program.get())),
+ apf_program.size(), 0 /* data_len */,
apf_packet, apf_header.len, 0 /* filter_age */));
// Make sure both filters matched the same packet.
if (apf_packet == NULL && bpf_packet == NULL)
- break;
+ break;
if (apf_packet == NULL || bpf_packet == NULL)
- return false;
+ return false;
if (apf_header.len != bpf_header.len ||
apf_header.ts.tv_sec != bpf_header.ts.tv_sec ||
apf_header.ts.tv_usec != bpf_header.ts.tv_usec ||
@@ -178,6 +181,48 @@ static jboolean com_android_server_ApfTest_compareBpfApf(JNIEnv* env, jclass, js
return true;
}
+static jboolean com_android_server_ApfTest_dropsAllPackets(JNIEnv* env, jclass, jbyteArray jprogram,
+ jbyteArray jdata, jstring jpcap_filename) {
+ ScopedUtfChars pcap_filename(env, jpcap_filename);
+ ScopedByteArrayRO apf_program(env, jprogram);
+ uint32_t apf_program_len = (uint32_t)apf_program.size();
+ uint32_t data_len = env->GetArrayLength(jdata);
+ pcap_pkthdr apf_header;
+ const uint8_t* apf_packet;
+ char pcap_error[PCAP_ERRBUF_SIZE];
+ std::vector<uint8_t> buf(apf_program_len + data_len, 0);
+
+ // Merge program and data into a single buffer.
+ env->GetByteArrayRegion(jprogram, 0, apf_program_len, reinterpret_cast<jbyte*>(buf.data()));
+ env->GetByteArrayRegion(jdata, 0, data_len,
+ reinterpret_cast<jbyte*>(buf.data() + apf_program_len));
+
+ // Open pcap file
+ ScopedFILE apf_fp(fopen(pcap_filename.c_str(), "rb"));
+ ScopedPcap apf_pcap(pcap_fopen_offline(apf_fp.get(), pcap_error));
+
+ if (apf_pcap.get() == NULL) {
+ throwException(env, "pcap_fopen_offline failed: " + std::string(pcap_error));
+ return false;
+ }
+
+ while ((apf_packet = pcap_next(apf_pcap.get(), &apf_header)) != NULL) {
+ int result = accept_packet(buf.data(), apf_program_len,
+ apf_program_len + data_len, apf_packet, apf_header.len, 0);
+
+ // Return false once packet passes the filter
+ if (result) {
+ env->SetByteArrayRegion(jdata, 0, data_len,
+ reinterpret_cast<jbyte*>(buf.data() + apf_program_len));
+ return false;
+ }
+ }
+
+ env->SetByteArrayRegion(jdata, 0, data_len,
+ reinterpret_cast<jbyte*>(buf.data() + apf_program_len));
+ return true;
+}
+
extern "C" jint JNI_OnLoad(JavaVM* vm, void*) {
JNIEnv *env;
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
@@ -192,6 +237,8 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void*) {
(void*)com_android_server_ApfTest_compileToBpf },
{ "compareBpfApf", "(Ljava/lang/String;Ljava/lang/String;[B)Z",
(void*)com_android_server_ApfTest_compareBpfApf },
+ { "dropsAllPackets", "([B[BLjava/lang/String;)Z",
+ (void*)com_android_server_ApfTest_dropsAllPackets },
};
jniRegisterNativeMethods(env, "android/net/apf/ApfTest",
diff --git a/tests/net/res/raw/apfPcap.pcap b/tests/net/res/raw/apfPcap.pcap
new file mode 100644
index 000000000000..6f69c4add0f8
--- /dev/null
+++ b/tests/net/res/raw/apfPcap.pcap
Binary files differ
diff --git a/tools/aapt2/configuration/ConfigurationParser_test.cpp b/tools/aapt2/configuration/ConfigurationParser_test.cpp
index 960880a8daa6..4c23bd3d6e3e 100644
--- a/tools/aapt2/configuration/ConfigurationParser_test.cpp
+++ b/tools/aapt2/configuration/ConfigurationParser_test.cpp
@@ -230,7 +230,7 @@ TEST_F(ConfigurationParserTest, ValidateFile) {
test::ParseConfigOrDie("fr"), test::ParseConfigOrDie("de")));
ASSERT_TRUE(a1.android_sdk);
ASSERT_TRUE(a1.android_sdk.value().min_sdk_version);
- EXPECT_EQ(a1.android_sdk.value().min_sdk_version, 19l);
+ EXPECT_EQ(a1.android_sdk.value().min_sdk_version, 19L);
EXPECT_THAT(a1.textures, SizeIs(1ul));
EXPECT_THAT(a1.features, SizeIs(1ul));
@@ -250,7 +250,7 @@ TEST_F(ConfigurationParserTest, ValidateFile) {
test::ParseConfigOrDie("fr-rCA")));
ASSERT_TRUE(a2.android_sdk);
ASSERT_TRUE(a2.android_sdk.value().min_sdk_version);
- EXPECT_EQ(a2.android_sdk.value().min_sdk_version, 19l);
+ EXPECT_EQ(a2.android_sdk.value().min_sdk_version, 19L);
EXPECT_THAT(a2.textures, SizeIs(1ul));
EXPECT_THAT(a2.features, SizeIs(1ul));
}
diff --git a/tools/localedata/extract_icu_data.py b/tools/localedata/extract_icu_data.py
index 9dceba2163eb..6b4c34677d96 100755
--- a/tools/localedata/extract_icu_data.py
+++ b/tools/localedata/extract_icu_data.py
@@ -155,7 +155,7 @@ def dump_representative_locales(representative_locales):
print
print 'std::unordered_set<uint64_t> REPRESENTATIVE_LOCALES({'
for locale in sorted(representative_locales):
- print ' 0x%08Xllu, // %s' % (
+ print ' 0x%08XLLU, // %s' % (
pack_to_uint64(locale),
locale)
print '});'
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index 66c1a3c0ffbc..17847eaa0ca5 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -954,16 +954,15 @@ public class WifiEnterpriseConfig implements Parcelable {
* for Hotspot 2.0 defined matching of AAA server certs per WFA HS2.0 spec, section 7.3.3.2,
* second paragraph.
*
- * From wpa_supplicant documentation:
- * Constraint for server domain name. If set, this FQDN is used as a suffix match requirement
+ * <p>From wpa_supplicant documentation:
+ * <p>Constraint for server domain name. If set, this FQDN is used as a suffix match requirement
* for the AAAserver certificate in SubjectAltName dNSName element(s). If a matching dNSName is
- * found, this constraint is met. If no dNSName values are present, this constraint is matched
- * against SubjectName CN using same suffix match comparison.
- * Suffix match here means that the host/domain name is compared one label at a time starting
+ * found, this constraint is met.
+ * <p>Suffix match here means that the host/domain name is compared one label at a time starting
* from the top-level domain and all the labels in domain_suffix_match shall be included in the
* certificate. The certificate may include additional sub-level labels in addition to the
* required labels.
- * For example, domain_suffix_match=example.com would match test.example.com but would not
+ * <p>For example, domain_suffix_match=example.com would match test.example.com but would not
* match test-example.com.
* @param domain The domain value
*/
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 15e092bc8623..2aed2de064f2 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1550,7 +1550,6 @@ public class WifiManager {
/**
* @return true if this adapter supports Device-to-AP RTT
*/
- @SystemApi
public boolean isDeviceToApRttSupported() {
return isFeatureSupported(WIFI_FEATURE_D2AP_RTT);
}