summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk18
-rw-r--r--CleanSpec.mk3
-rw-r--r--api/current.txt1077
-rw-r--r--api/removed.txt39
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java79
-rw-r--r--cmds/app_process/app_main.cpp29
-rw-r--r--cmds/dpm/Android.mk15
-rw-r--r--cmds/dpm/MODULE_LICENSE_APACHE20
-rw-r--r--cmds/dpm/NOTICE190
-rwxr-xr-xcmds/dpm/dpm6
-rw-r--r--cmds/dpm/src/com/android/commands/dpm/Dpm.java77
-rw-r--r--cmds/pm/src/com/android/commands/pm/Pm.java38
-rw-r--r--core/java/android/animation/AnimatorSet.java1
-rw-r--r--core/java/android/animation/PathKeyframes.java42
-rw-r--r--core/java/android/app/Activity.java6
-rw-r--r--core/java/android/app/ActivityManagerNative.java18
-rw-r--r--core/java/android/app/ActivityOptions.java6
-rw-r--r--core/java/android/app/ActivityThread.java4
-rw-r--r--core/java/android/app/ActivityTransitionCoordinator.java75
-rw-r--r--core/java/android/app/ActivityTransitionState.java4
-rw-r--r--core/java/android/app/ApplicationPackageManager.java31
-rw-r--r--core/java/android/app/BackStackRecord.java465
-rw-r--r--core/java/android/app/ContextImpl.java11
-rw-r--r--core/java/android/app/EnterTransitionCoordinator.java142
-rw-r--r--core/java/android/app/ExitTransitionCoordinator.java51
-rw-r--r--core/java/android/app/Fragment.java25
-rw-r--r--core/java/android/app/IActivityManager.java3
-rw-r--r--core/java/android/app/INotificationManager.aidl1
-rw-r--r--core/java/android/app/Notification.java4
-rw-r--r--core/java/android/app/SharedElementCallback.java4
-rw-r--r--core/java/android/app/admin/DeviceAdminReceiver.java2
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java41
-rw-r--r--core/java/android/app/admin/IDevicePolicyManager.aidl2
-rw-r--r--core/java/android/app/job/JobParameters.java17
-rw-r--r--core/java/android/bluetooth/BluetoothGatt.java3
-rw-r--r--core/java/android/bluetooth/BluetoothGattCallback.java14
-rw-r--r--core/java/android/bluetooth/BluetoothGattServer.java3
-rw-r--r--core/java/android/bluetooth/BluetoothGattServerCallback.java14
-rw-r--r--core/java/android/content/ContentResolver.java8
-rw-r--r--core/java/android/content/Context.java17
-rw-r--r--core/java/android/content/pm/ActivityInfo.java3
-rw-r--r--core/java/android/content/pm/IPackageManager.aidl6
-rw-r--r--core/java/android/content/pm/LauncherApps.java11
-rw-r--r--core/java/android/content/pm/PackageManager.java28
-rw-r--r--core/java/android/content/pm/PackageParser.java3
-rw-r--r--core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java11
-rw-r--r--core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java26
-rw-r--r--core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java29
-rw-r--r--core/java/android/hardware/camera2/legacy/LegacyResultMapper.java25
-rw-r--r--core/java/android/hardware/camera2/legacy/RequestThreadManager.java3
-rw-r--r--core/java/android/hardware/camera2/params/TonemapCurve.java60
-rw-r--r--core/java/android/hardware/hdmi/HdmiTvClient.java44
-rw-r--r--core/java/android/hardware/hdmi/IHdmiControlService.aidl7
-rw-r--r--core/java/android/hardware/hdmi/IHdmiMhlVendorCommandListener.aidl (renamed from core/java/android/hardware/hdmi/IHdmiMhlScratchpadCommandListener.aidl)5
-rw-r--r--core/java/android/hardware/soundtrigger/SoundTrigger.java5
-rw-r--r--core/java/android/net/ConnectivityManager.java17
-rw-r--r--core/java/android/net/Network.java68
-rw-r--r--core/java/android/net/NetworkAgent.java3
-rw-r--r--core/java/android/net/VpnService.java18
-rw-r--r--core/java/android/os/IUserManager.aidl1
-rw-r--r--core/java/android/os/Parcel.java5
-rw-r--r--core/java/android/os/PowerManager.java6
-rw-r--r--core/java/android/os/UserManager.java9
-rw-r--r--core/java/android/provider/CallLog.java2
-rw-r--r--core/java/android/provider/Settings.java10
-rw-r--r--core/java/android/service/dreams/DreamService.java1
-rw-r--r--core/java/android/speech/tts/TextToSpeech.java9
-rw-r--r--core/java/android/transition/Transition.java56
-rw-r--r--core/java/android/transition/TransitionSet.java49
-rw-r--r--core/java/android/transition/TransitionValues.java6
-rw-r--r--core/java/android/transition/Visibility.java12
-rw-r--r--core/java/android/util/SizeF.java56
-rw-r--r--core/java/android/view/HardwareRenderer.java3
-rw-r--r--core/java/android/view/ThreadedRenderer.java15
-rw-r--r--core/java/android/view/View.java26
-rw-r--r--core/java/android/view/ViewDebug.java5
-rw-r--r--core/java/android/view/ViewRootImpl.java12
-rw-r--r--core/java/android/view/Window.java41
-rw-r--r--core/java/android/view/WindowInsets.java15
-rw-r--r--core/java/android/view/WindowManager.java20
-rw-r--r--core/java/android/view/WindowManagerPolicy.java5
-rw-r--r--core/java/android/view/inputmethod/BaseInputConnection.java8
-rw-r--r--core/java/android/view/inputmethod/CursorAnchorInfo.java121
-rw-r--r--core/java/android/view/inputmethod/InputConnection.java15
-rw-r--r--core/java/android/view/inputmethod/InputConnectionWrapper.java7
-rw-r--r--core/java/android/webkit/WebChromeClient.java69
-rw-r--r--core/java/android/webkit/WebResourceRequest.java11
-rw-r--r--core/java/android/webkit/WebViewFactoryProvider.java8
-rw-r--r--core/java/android/widget/AbsListView.java8
-rw-r--r--core/java/android/widget/ActionMenuPresenter.java20
-rw-r--r--core/java/android/widget/Editor.java5
-rw-r--r--core/java/android/widget/SearchView.java5
-rw-r--r--core/java/android/widget/SimpleMonthView.java13
-rw-r--r--core/java/android/widget/TextView.java160
-rw-r--r--core/java/android/widget/Toolbar.java105
-rw-r--r--core/java/com/android/internal/app/ToolbarActionBar.java26
-rw-r--r--core/java/com/android/internal/inputmethod/InputMethodUtils.java78
-rw-r--r--core/java/com/android/internal/os/BatteryStatsImpl.java23
-rw-r--r--core/java/com/android/internal/os/ProcessCpuTracker.java24
-rw-r--r--core/java/com/android/internal/os/ZygoteInit.java8
-rw-r--r--core/java/com/android/internal/util/ArrayUtils.java2
-rw-r--r--core/java/com/android/internal/util/UserIcons.java75
-rw-r--r--core/java/com/android/internal/view/InputConnectionWrapper.java7
-rw-r--r--core/java/com/android/internal/widget/ActionBarView.java14
-rw-r--r--core/java/com/android/internal/widget/DecorToolbar.java1
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java6
-rw-r--r--core/java/com/android/internal/widget/ToolbarWidgetWrapper.java40
-rw-r--r--core/java/com/android/server/BootReceiver.java11
-rw-r--r--core/jni/AndroidRuntime.cpp23
-rw-r--r--core/jni/android/graphics/Path.cpp19
-rw-r--r--core/jni/android_util_AssetManager.cpp2
-rw-r--r--core/res/res/drawable-hdpi/ic_ab_back_mtrl_am_alpha.pngbin667 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_dialog_alert_mtrl_alpha.pngbin506 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_go_search_api_mtrl_alpha.pngbin120 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_copy_mtrl_am_alpha.pngbin186 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_cut_mtrl_alpha.pngbin577 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_moreoverflow_mtrl_alpha.pngbin220 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_paste_mtrl_am_alpha.pngbin268 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_selectall_mtrl_alpha.pngbin301 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_share_mtrl_alpha.pngbin549 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_search_api_mtrl_alpha.pngbin1150 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_voice_search_api_mtrl_alpha.pngbin428 -> 0 bytes
-rw-r--r--core/res/res/drawable-hdpi/list_divider_mtrl_alpha.9.pngbin78 -> 136 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_ab_back_mtrl_am_alpha.pngbin159 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_dialog_alert_mtrl_alpha.pngbin281 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_menu_copy_mtrl_am_alpha.pngbin170 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_menu_cut_mtrl_alpha.pngbin319 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_menu_moreoverflow_mtrl_alpha.pngbin145 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_menu_paste_mtrl_am_alpha.pngbin194 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_menu_selectall_mtrl_alpha.pngbin208 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/ic_menu_share_mtrl_alpha.pngbin317 -> 0 bytes
-rw-r--r--core/res/res/drawable-ldpi/list_divider_mtrl_alpha.9.pngbin78 -> 136 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_ab_back_mtrl_am_alpha.pngbin583 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_dialog_alert_mtrl_alpha.pngbin405 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_go_search_api_mtrl_alpha.pngbin110 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_copy_mtrl_am_alpha.pngbin161 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_cut_mtrl_alpha.pngbin433 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_moreoverflow_mtrl_alpha.pngbin171 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_paste_mtrl_am_alpha.pngbin208 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_selectall_mtrl_alpha.pngbin339 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_share_mtrl_alpha.pngbin463 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_search_api_mtrl_alpha.pngbin794 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_voice_search_api_mtrl_alpha.pngbin374 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/list_divider_mtrl_alpha.9.pngbin78 -> 136 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_ab_back_mtrl_am_alpha.pngbin706 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_dialog_alert_mtrl_alpha.pngbin805 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_go_search_api_mtrl_alpha.pngbin155 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_copy_mtrl_am_alpha.pngbin213 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_cut_mtrl_alpha.pngbin845 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_moreoverflow_mtrl_alpha.pngbin287 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_paste_mtrl_am_alpha.pngbin372 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_selectall_mtrl_alpha.pngbin385 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_share_mtrl_alpha.pngbin857 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_search_api_mtrl_alpha.pngbin1373 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_voice_search_api_mtrl_alpha.pngbin656 -> 0 bytes
-rw-r--r--core/res/res/drawable-xhdpi/list_divider_mtrl_alpha.9.pngbin78 -> 136 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_ab_back_mtrl_am_alpha.pngbin924 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_dialog_alert_mtrl_alpha.pngbin1018 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_go_search_api_mtrl_alpha.pngbin172 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_menu_copy_mtrl_am_alpha.pngbin317 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_menu_cut_mtrl_alpha.pngbin1155 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_mtrl_alpha.pngbin414 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_menu_paste_mtrl_am_alpha.pngbin553 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_menu_selectall_mtrl_alpha.pngbin503 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_menu_share_mtrl_alpha.pngbin1127 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_search_api_mtrl_alpha.pngbin2221 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_voice_search_api_mtrl_alpha.pngbin767 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/list_divider_mtrl_alpha.9.pngbin122 -> 138 bytes
-rw-r--r--core/res/res/drawable-xxxhdpi/ic_ab_back_mtrl_am_alpha.pngbin1437 -> 0 bytes
-rw-r--r--core/res/res/drawable-xxxhdpi/ic_search_api_mtrl_alpha.pngbin2402 -> 0 bytes
-rw-r--r--core/res/res/drawable/ic_ab_back_material.xml38
-rw-r--r--core/res/res/drawable/ic_account_circle.xml (renamed from packages/SystemUI/res/drawable/ic_account_circle.xml)19
-rw-r--r--core/res/res/drawable/ic_corp_icon_badge.xml10
-rw-r--r--core/res/res/drawable/ic_dialog_alert_material.xml36
-rw-r--r--core/res/res/drawable/ic_go_search_api_material.xml36
-rw-r--r--core/res/res/drawable/ic_lock_bugreport.xml6
-rw-r--r--core/res/res/drawable/ic_menu_copy_material.xml38
-rw-r--r--core/res/res/drawable/ic_menu_cut_material.xml37
-rw-r--r--core/res/res/drawable/ic_menu_moreoverflow_material.xml36
-rw-r--r--core/res/res/drawable/ic_menu_paste_material.xml38
-rw-r--r--core/res/res/drawable/ic_menu_selectall_material.xml37
-rw-r--r--core/res/res/drawable/ic_menu_share_material.xml36
-rw-r--r--core/res/res/drawable/ic_search_api_material.xml36
-rw-r--r--core/res/res/drawable/ic_voice_search_api_material.xml36
-rw-r--r--core/res/res/drawable/list_divider_material.xml3
-rw-r--r--core/res/res/drawable/vector_drawable_progress_indeterminate_horizontal.xml4
-rw-r--r--core/res/res/layout/action_mode_close_item_material.xml1
-rw-r--r--core/res/res/layout/alert_dialog_material.xml4
-rw-r--r--core/res/res/layout/notification_template_part_line1.xml2
-rw-r--r--core/res/res/layout/preference_material.xml1
-rw-r--r--core/res/res/layout/simple_spinner_dropdown_item.xml21
-rw-r--r--core/res/res/values-cs/strings.xml24
-rw-r--r--core/res/res/values-it/strings.xml4
-rw-r--r--core/res/res/values-mcc234-mnc20/config.xml16
-rw-r--r--core/res/res/values-mcc235-mnc94/config.xml16
-rw-r--r--core/res/res/values-mcc310-mnc120/config.xml2
-rw-r--r--core/res/res/values-mcc311-mnc220/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc221/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc222/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc223/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc224/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc225/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc226/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc227/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc228/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc229/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc490/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc580/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc581/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc582/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc583/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc584/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc585/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc586/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc587/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc588/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc589/config.xml26
-rw-r--r--core/res/res/values-mcc311-mnc870/config.xml30
-rw-r--r--core/res/res/values-mcc312-mnc530/config.xml30
-rw-r--r--core/res/res/values-mcc425-mnc01/config.xml40
-rw-r--r--core/res/res/values-my-rMM/strings.xml12
-rw-r--r--core/res/res/values-sw600dp/dimens_material.xml27
-rw-r--r--core/res/res/values-sw720dp/styles.xml9
-rw-r--r--core/res/res/values-television/dimens.xml2
-rw-r--r--core/res/res/values/arrays.xml22
-rw-r--r--core/res/res/values/attrs.xml28
-rw-r--r--core/res/res/values/colors.xml11
-rw-r--r--core/res/res/values/config.xml49
-rw-r--r--core/res/res/values/dimens.xml4
-rw-r--r--core/res/res/values/dimens_material.xml9
-rw-r--r--core/res/res/values/public.xml95
-rw-r--r--core/res/res/values/removed.xml26
-rw-r--r--core/res/res/values/styles_leanback.xml8
-rw-r--r--core/res/res/values/styles_material.xml8
-rw-r--r--core/res/res/values/symbols.xml34
-rw-r--r--core/res/res/values/themes.xml4
-rw-r--r--core/res/res/values/themes_leanback.xml1
-rw-r--r--core/res/res/values/themes_material.xml9
-rw-r--r--core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiAssociationTestRunner.java38
-rw-r--r--core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java125
-rw-r--r--core/tests/inputmethodtests/src/android/os/InputMethodTest.java336
-rw-r--r--docs/html/preview/tv/ui/recommendations.jd1
-rw-r--r--docs/html/sdk/installing/studio.jd2
-rw-r--r--docs/html/tools/building/index.jd11
-rw-r--r--docs/html/training/efficient-downloads/redundant_redundant.jd8
-rw-r--r--graphics/java/android/graphics/Canvas.java26
-rw-r--r--graphics/java/android/graphics/PorterDuffColorFilter.java20
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java47
-rw-r--r--graphics/java/android/graphics/drawable/BitmapDrawable.java2
-rw-r--r--graphics/java/android/graphics/drawable/ColorDrawable.java4
-rw-r--r--graphics/java/android/graphics/drawable/Drawable.java2
-rw-r--r--graphics/java/android/graphics/drawable/GradientDrawable.java44
-rw-r--r--graphics/java/android/graphics/drawable/NinePatchDrawable.java2
-rw-r--r--graphics/java/android/graphics/drawable/RippleDrawable.java18
-rw-r--r--graphics/java/android/graphics/drawable/ShapeDrawable.java4
-rw-r--r--graphics/java/android/graphics/drawable/VectorDrawable.java293
-rw-r--r--include/android_runtime/AndroidRuntime.h4
-rw-r--r--keystore/java/android/security/IKeyChainService.aidl3
-rw-r--r--libs/hwui/AmbientShadow.cpp37
-rw-r--r--libs/hwui/Animator.cpp3
-rw-r--r--libs/hwui/Caches.cpp1
-rw-r--r--libs/hwui/Layer.cpp3
-rw-r--r--libs/hwui/Layer.h11
-rw-r--r--libs/hwui/LayerCache.cpp5
-rwxr-xr-xlibs/hwui/OpenGLRenderer.cpp31
-rw-r--r--libs/hwui/RenderState.cpp21
-rw-r--r--libs/hwui/RenderState.h4
-rw-r--r--libs/hwui/ShadowTessellator.cpp26
-rw-r--r--libs/hwui/ShadowTessellator.h4
-rw-r--r--libs/hwui/SpotShadow.cpp1034
-rw-r--r--libs/hwui/SpotShadow.h46
-rw-r--r--libs/hwui/TessellationCache.cpp2
-rw-r--r--libs/hwui/VertexBuffer.h2
-rw-r--r--location/java/com/android/internal/location/GpsNetInitiatedHandler.java90
-rw-r--r--media/java/android/media/AudioAttributes.java56
-rw-r--r--media/java/android/media/AudioDevice.java157
-rw-r--r--media/java/android/media/AudioFormat.java15
-rw-r--r--media/java/android/media/AudioManager.java16
-rw-r--r--media/java/android/media/AudioService.java71
-rw-r--r--media/java/android/media/IAudioService.aidl4
-rw-r--r--media/java/android/media/MediaCodec.java2
-rw-r--r--media/java/android/media/audiofx/Virtualizer.java181
-rw-r--r--media/java/android/media/projection/IMediaProjection.aidl4
-rw-r--r--media/java/android/media/projection/MediaProjection.java10
-rw-r--r--media/java/android/media/projection/MediaProjectionManager.java2
-rw-r--r--media/java/android/media/tv/ITvInputManagerCallback.aidl1
-rw-r--r--media/java/android/media/tv/TvInputInfo.java34
-rw-r--r--media/java/android/media/tv/TvInputManager.java34
-rw-r--r--media/java/android/media/tv/TvInputService.java3
-rw-r--r--media/java/android/media/tv/TvView.java7
-rw-r--r--media/jni/audioeffect/android_media_AudioEffect.cpp40
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_breadcrumb_arrow_am_alpha.pngbin0 -> 471 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_accept_alpha.pngbin0 -> 755 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_cancel_alpha.pngbin0 -> 960 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_select_item_alpha.pngbin0 -> 1046 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_alert_alpha.pngbin0 -> 1500 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_info_alpha.pngbin0 -> 1819 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_album_alpha.pngbin0 -> 1103 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_apk_alpha.pngbin0 -> 1144 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_audio_alpha.pngbin0 -> 1056 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_certificate_alpha.pngbin0 -> 1236 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_codes_alpha.pngbin0 -> 1314 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_compressed_alpha.pngbin0 -> 556 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_contact_am_alpha.pngbin0 -> 911 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_event_am_alpha.pngbin0 -> 549 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_excel_alpha.pngbin0 -> 922 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_folder_alpha.pngbin0 -> 506 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_font_alpha.pngbin0 -> 1473 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_generic_am_alpha.pngbin0 -> 624 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_image_alpha.pngbin0 -> 814 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_pdf_alpha.pngbin0 -> 1460 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_powerpoint_alpha.pngbin0 -> 869 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_presentation_alpha.pngbin0 -> 483 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_spreadsheet_am_alpha.pngbin0 -> 516 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_text_am_alpha.pngbin0 -> 508 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_video_am_alpha.pngbin0 -> 516 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_word_alpha.pngbin0 -> 1296 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_folder_alpha.pngbin0 -> 784 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_grid_folder_alpha.pngbin0 -> 1320 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_hamburger_alpha.pngbin0 -> 420 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_copy_alpha.pngbin0 -> 906 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_delete_alpha.pngbin0 -> 656 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_disconnect_am_alpha.pngbin0 -> 1609 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_new_folder_am_alpha.pngbin0 -> 916 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_overflow_alpha.pngbin0 -> 798 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_rename_am_alpha.pngbin0 -> 1007 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_search_alpha.pngbin0 -> 1955 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_settings_alpha.pngbin0 -> 2067 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_share_alpha.pngbin0 -> 2080 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_sortby_am_alpha.pngbin0 -> 446 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_undo_am_alpha.pngbin0 -> 2015 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_grid_alpha.pngbin0 -> 464 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_list_alpha.pngbin0 -> 533 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_open_am_alpha.pngbin0 -> 867 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_popout_am_alpha.pngbin0 -> 731 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_download_alpha.pngbin0 -> 1896 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_folder_am_alpha.pngbin0 -> 798 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_recent_alpha.pngbin0 -> 2529 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_sdcard_alpha.pngbin0 -> 817 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_usb_light_alpha.pngbin0 -> 1546 bytes
-rw-r--r--packages/DocumentsUI/res/drawable-xxxhdpi/ic_subdirectory_arrow_am_alpha.pngbin0 -> 883 bytes
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/RootsCache.java9
-rw-r--r--packages/Keyguard/res/drawable-hdpi/kg_bouncer_bg_white.9.pngbin546 -> 0 bytes
-rw-r--r--packages/Keyguard/res/drawable-mdpi/kg_bouncer_bg_white.9.pngbin397 -> 0 bytes
-rw-r--r--packages/Keyguard/res/drawable-xhdpi/kg_bouncer_bg_white.9.pngbin775 -> 0 bytes
-rw-r--r--packages/Keyguard/res/layout/keyguard_face_unlock_view.xml1
-rw-r--r--packages/Keyguard/res/layout/keyguard_password_view.xml1
-rw-r--r--packages/Keyguard/res/layout/keyguard_pattern_view.xml1
-rw-r--r--packages/Keyguard/res/layout/keyguard_pin_view.xml6
-rw-r--r--packages/Keyguard/res/layout/keyguard_selector_view.xml3
-rw-r--r--packages/Keyguard/res/values-h650dp/dimens.xml20
-rw-r--r--packages/Keyguard/src/com/android/keyguard/AlphaOptimizedImageButton.java38
-rw-r--r--packages/Keyguard/src/com/android/keyguard/AlphaOptimizedLinearLayout.java (renamed from packages/SystemUI/src/com/android/systemui/statusbar/AlphaOptimizedLinearLayout.java)2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java37
-rw-r--r--packages/Keyguard/src/com/android/keyguard/EmergencyCarrierArea.java4
-rw-r--r--packages/PrintSpooler/AndroidManifest.xml3
-rw-r--r--packages/PrintSpooler/res/layout/preview_page.xml10
-rw-r--r--packages/PrintSpooler/res/layout/print_activity.xml2
-rw-r--r--packages/PrintSpooler/res/layout/print_activity_controls.xml24
-rw-r--r--packages/PrintSpooler/res/values/strings.xml28
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java8
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerProvider.java2
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java33
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java50
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java91
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java27
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/widget/CustomErrorEditText.java44
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java10
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/widget/PreviewPageFrame.java89
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java15
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java2
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml5
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java33
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java11
-rw-r--r--packages/SystemUI/res/drawable/ic_account_circle_qs.xml34
-rw-r--r--packages/SystemUI/res/layout-sw600dp/navigation_bar.xml17
-rw-r--r--packages/SystemUI/res/layout/keyguard_user_switcher.xml4
-rw-r--r--packages/SystemUI/res/layout/navigation_bar.xml14
-rw-r--r--packages/SystemUI/res/layout/status_bar.xml8
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded_header.xml2
-rw-r--r--packages/SystemUI/res/layout/system_icons.xml2
-rw-r--r--packages/SystemUI/res/values-af/strings.xml6
-rw-r--r--packages/SystemUI/res/values-am/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ar/strings.xml6
-rw-r--r--packages/SystemUI/res/values-bg/strings.xml7
-rw-r--r--packages/SystemUI/res/values-bn-rBD/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ca/strings.xml6
-rw-r--r--packages/SystemUI/res/values-cs/strings.xml24
-rw-r--r--packages/SystemUI/res/values-da/strings.xml7
-rw-r--r--packages/SystemUI/res/values-de/strings.xml6
-rw-r--r--packages/SystemUI/res/values-el/strings.xml6
-rw-r--r--packages/SystemUI/res/values-en-rGB/strings.xml4
-rw-r--r--packages/SystemUI/res/values-en-rIN/strings.xml4
-rw-r--r--packages/SystemUI/res/values-es-rUS/strings.xml7
-rw-r--r--packages/SystemUI/res/values-es/strings.xml6
-rw-r--r--packages/SystemUI/res/values-et-rEE/strings.xml6
-rw-r--r--packages/SystemUI/res/values-eu-rES/strings.xml6
-rw-r--r--packages/SystemUI/res/values-fa/strings.xml8
-rw-r--r--packages/SystemUI/res/values-fi/strings.xml7
-rw-r--r--packages/SystemUI/res/values-fr-rCA/strings.xml7
-rw-r--r--packages/SystemUI/res/values-fr/strings.xml6
-rw-r--r--packages/SystemUI/res/values-gl-rES/strings.xml7
-rw-r--r--packages/SystemUI/res/values-h650dp/config.xml24
-rw-r--r--packages/SystemUI/res/values-h650dp/dimens.xml23
-rw-r--r--packages/SystemUI/res/values-hi/strings.xml6
-rw-r--r--packages/SystemUI/res/values-hr/strings.xml7
-rw-r--r--packages/SystemUI/res/values-hu/strings.xml6
-rw-r--r--packages/SystemUI/res/values-hy-rAM/strings.xml27
-rw-r--r--packages/SystemUI/res/values-in/strings.xml6
-rw-r--r--packages/SystemUI/res/values-is-rIS/strings.xml6
-rw-r--r--packages/SystemUI/res/values-it/strings.xml16
-rw-r--r--packages/SystemUI/res/values-iw/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ja/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ka-rGE/strings.xml15
-rw-r--r--packages/SystemUI/res/values-kk-rKZ/strings.xml7
-rw-r--r--packages/SystemUI/res/values-km-rKH/strings.xml6
-rw-r--r--packages/SystemUI/res/values-kn-rIN/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ko/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ky-rKG/strings.xml7
-rw-r--r--packages/SystemUI/res/values-land/dimens.xml2
-rw-r--r--packages/SystemUI/res/values-lo-rLA/strings.xml7
-rw-r--r--packages/SystemUI/res/values-lt/strings.xml6
-rw-r--r--packages/SystemUI/res/values-lv/strings.xml6
-rw-r--r--packages/SystemUI/res/values-mk-rMK/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ml-rIN/strings.xml6
-rw-r--r--packages/SystemUI/res/values-mn-rMN/strings.xml6
-rw-r--r--packages/SystemUI/res/values-mr-rIN/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ms-rMY/strings.xml9
-rw-r--r--packages/SystemUI/res/values-my-rMM/strings.xml6
-rw-r--r--packages/SystemUI/res/values-nb/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ne-rNP/strings.xml6
-rw-r--r--packages/SystemUI/res/values-nl/strings.xml6
-rw-r--r--packages/SystemUI/res/values-pl/strings.xml6
-rw-r--r--packages/SystemUI/res/values-pt-rPT/strings.xml6
-rw-r--r--packages/SystemUI/res/values-pt/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ro/strings.xml7
-rw-r--r--packages/SystemUI/res/values-ru/strings.xml7
-rw-r--r--packages/SystemUI/res/values-si-rLK/strings.xml7
-rw-r--r--packages/SystemUI/res/values-sk/strings.xml7
-rw-r--r--packages/SystemUI/res/values-sl/strings.xml6
-rw-r--r--packages/SystemUI/res/values-sr/strings.xml7
-rw-r--r--packages/SystemUI/res/values-sv/strings.xml6
-rw-r--r--packages/SystemUI/res/values-sw/strings.xml9
-rw-r--r--packages/SystemUI/res/values-ta-rIN/strings.xml6
-rw-r--r--packages/SystemUI/res/values-te-rIN/strings.xml6
-rw-r--r--packages/SystemUI/res/values-th/strings.xml7
-rw-r--r--packages/SystemUI/res/values-tl/strings.xml7
-rw-r--r--packages/SystemUI/res/values-tr/strings.xml7
-rw-r--r--packages/SystemUI/res/values-uk/strings.xml6
-rw-r--r--packages/SystemUI/res/values-ur-rPK/strings.xml6
-rw-r--r--packages/SystemUI/res/values-uz-rUZ/strings.xml7
-rw-r--r--packages/SystemUI/res/values-vi/strings.xml6
-rw-r--r--packages/SystemUI/res/values-zh-rCN/strings.xml7
-rw-r--r--packages/SystemUI/res/values-zh-rHK/strings.xml8
-rw-r--r--packages/SystemUI/res/values-zh-rTW/strings.xml18
-rw-r--r--packages/SystemUI/res/values-zu/strings.xml6
-rw-r--r--packages/SystemUI/res/values/config.xml19
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeService.java99
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java132
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java70
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java53
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java59
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java151
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java120
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java19
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java4
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java53
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java125
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerService.java91
-rw-r--r--services/core/java/com/android/server/AlarmManagerService.java7
-rw-r--r--services/core/java/com/android/server/AppOpsService.java16
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java169
-rw-r--r--services/core/java/com/android/server/MmsServiceBroker.java9
-rw-r--r--services/core/java/com/android/server/NsdService.java3
-rw-r--r--services/core/java/com/android/server/PersistentDataBlockService.java7
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java315
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityStack.java11
-rw-r--r--services/core/java/com/android/server/am/ProcessList.java15
-rw-r--r--services/core/java/com/android/server/am/TaskPersister.java4
-rw-r--r--services/core/java/com/android/server/connectivity/NetworkAgentInfo.java30
-rw-r--r--services/core/java/com/android/server/connectivity/NetworkMonitor.java49
-rw-r--r--services/core/java/com/android/server/content/SyncManager.java3
-rw-r--r--services/core/java/com/android/server/display/DisplayPowerController.java9
-rw-r--r--services/core/java/com/android/server/display/VirtualDisplayAdapter.java2
-rw-r--r--services/core/java/com/android/server/hdmi/Constants.java46
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecController.java42
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java27
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java16
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java23
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiControlService.java148
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java37
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiMhlLocalDeviceStub.java46
-rw-r--r--services/core/java/com/android/server/hdmi/MhlConstants.java40
-rw-r--r--services/core/java/com/android/server/job/JobServiceContext.java19
-rw-r--r--services/core/java/com/android/server/job/controllers/JobStatus.java15
-rw-r--r--services/core/java/com/android/server/location/GpsLocationProvider.java3
-rw-r--r--services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java6
-rw-r--r--services/core/java/com/android/server/net/NetworkPolicyManagerService.java6
-rw-r--r--services/core/java/com/android/server/net/NetworkStatsService.java2
-rw-r--r--services/core/java/com/android/server/notification/ManagedServices.java17
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java21
-rw-r--r--services/core/java/com/android/server/notification/ValidateNotificationPeople.java22
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java6
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerService.java69
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerSession.java46
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java328
-rw-r--r--services/core/java/com/android/server/pm/Settings.java182
-rw-r--r--services/core/java/com/android/server/pm/UserManagerService.java9
-rw-r--r--services/core/java/com/android/server/power/PowerManagerService.java112
-rw-r--r--services/core/java/com/android/server/tv/TvInputHal.java3
-rw-r--r--services/core/java/com/android/server/tv/TvInputManagerService.java93
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java2
-rw-r--r--services/core/java/com/android/server/wm/WindowAnimator.java27
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java215
-rw-r--r--services/core/java/com/android/server/wm/WindowStateAnimator.java5
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java110
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsDatabase.java103
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsService.java100
-rw-r--r--services/usage/java/com/android/server/usage/UserUsageStatsService.java56
-rw-r--r--telecomm/java/android/telecom/AudioState.aidl (renamed from telecomm/java/android/telecomm/AudioState.aidl)2
-rw-r--r--telecomm/java/android/telecom/AudioState.java (renamed from telecomm/java/android/telecomm/AudioState.java)2
-rw-r--r--telecomm/java/android/telecom/Call.java (renamed from telecomm/java/android/telecomm/Call.java)58
-rw-r--r--telecomm/java/android/telecom/CallProperties.java (renamed from telecomm/java/android/telecomm/CallProperties.java)2
-rw-r--r--telecomm/java/android/telecom/CallState.java (renamed from telecomm/java/android/telecomm/CallState.java)4
-rw-r--r--telecomm/java/android/telecom/CameraCapabilities.aidl (renamed from telecomm/java/android/telecomm/CameraCapabilities.aidl)2
-rw-r--r--telecomm/java/android/telecom/CameraCapabilities.java (renamed from telecomm/java/android/telecomm/CameraCapabilities.java)2
-rw-r--r--telecomm/java/android/telecom/Conference.java (renamed from telecomm/java/android/telecomm/Conference.java)32
-rw-r--r--telecomm/java/android/telecom/Connection.java (renamed from telecomm/java/android/telecomm/Connection.java)83
-rw-r--r--telecomm/java/android/telecom/ConnectionRequest.aidl (renamed from telecomm/java/android/telecomm/ConnectionRequest.aidl)2
-rw-r--r--telecomm/java/android/telecom/ConnectionRequest.java (renamed from telecomm/java/android/telecomm/ConnectionRequest.java)2
-rw-r--r--telecomm/java/android/telecom/ConnectionService.java (renamed from telecomm/java/android/telecomm/ConnectionService.java)71
-rw-r--r--telecomm/java/android/telecom/ConnectionServiceAdapter.java (renamed from telecomm/java/android/telecomm/ConnectionServiceAdapter.java)23
-rw-r--r--telecomm/java/android/telecom/ConnectionServiceAdapterServant.java (renamed from telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java)41
-rw-r--r--telecomm/java/android/telecom/GatewayInfo.aidl (renamed from telecomm/java/android/telecomm/GatewayInfo.aidl)2
-rw-r--r--telecomm/java/android/telecom/GatewayInfo.java (renamed from telecomm/java/android/telecomm/GatewayInfo.java)36
-rw-r--r--telecomm/java/android/telecom/InCallAdapter.java (renamed from telecomm/java/android/telecomm/InCallAdapter.java)54
-rw-r--r--telecomm/java/android/telecom/InCallService.java (renamed from telecomm/java/android/telecomm/InCallService.java)11
-rw-r--r--telecomm/java/android/telecom/Log.java (renamed from telecomm/java/android/telecomm/Log.java)6
-rw-r--r--telecomm/java/android/telecom/ParcelableCall.aidl (renamed from telecomm/java/android/telecomm/ParcelableCall.aidl)2
-rw-r--r--telecomm/java/android/telecom/ParcelableCall.java (renamed from telecomm/java/android/telecomm/ParcelableCall.java)15
-rw-r--r--telecomm/java/android/telecom/ParcelableConference.aidl (renamed from telecomm/java/android/telecomm/ParcelableConference.aidl)2
-rw-r--r--telecomm/java/android/telecom/ParcelableConference.java (renamed from telecomm/java/android/telecomm/ParcelableConference.java)2
-rw-r--r--telecomm/java/android/telecom/ParcelableConnection.aidl (renamed from telecomm/java/android/telecomm/ParcelableConnection.aidl)2
-rw-r--r--telecomm/java/android/telecom/ParcelableConnection.java (renamed from telecomm/java/android/telecomm/ParcelableConnection.java)64
-rw-r--r--telecomm/java/android/telecom/Phone.java (renamed from telecomm/java/android/telecomm/Phone.java)29
-rw-r--r--telecomm/java/android/telecom/PhoneAccount.aidl (renamed from telecomm/java/android/telecomm/PhoneAccount.aidl)2
-rw-r--r--telecomm/java/android/telecom/PhoneAccount.java (renamed from telecomm/java/android/telecomm/PhoneAccount.java)96
-rw-r--r--telecomm/java/android/telecom/PhoneAccountHandle.aidl (renamed from telecomm/java/android/telecomm/PhoneAccountHandle.aidl)2
-rw-r--r--telecomm/java/android/telecom/PhoneAccountHandle.java (renamed from telecomm/java/android/telecomm/PhoneAccountHandle.java)4
-rw-r--r--telecomm/java/android/telecom/PhoneCapabilities.java (renamed from telecomm/java/android/telecomm/PhoneCapabilities.java)17
-rw-r--r--telecomm/java/android/telecom/RemoteConference.java (renamed from telecomm/java/android/telecomm/RemoteConference.java)8
-rw-r--r--telecomm/java/android/telecom/RemoteConnection.java (renamed from telecomm/java/android/telecomm/RemoteConnection.java)212
-rw-r--r--telecomm/java/android/telecom/RemoteConnectionManager.java (renamed from telecomm/java/android/telecomm/RemoteConnectionManager.java)4
-rw-r--r--telecomm/java/android/telecom/RemoteConnectionService.java (renamed from telecomm/java/android/telecomm/RemoteConnectionService.java)38
-rw-r--r--telecomm/java/android/telecom/Response.java (renamed from telecomm/java/android/telecomm/Response.java)7
-rw-r--r--telecomm/java/android/telecom/StatusHints.aidl (renamed from telecomm/java/android/telecomm/StatusHints.aidl)2
-rw-r--r--telecomm/java/android/telecom/StatusHints.java (renamed from telecomm/java/android/telecomm/StatusHints.java)2
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java (renamed from telecomm/java/android/telecomm/TelecommManager.java)343
-rw-r--r--telecomm/java/android/telecom/VideoCallImpl.java (renamed from telecomm/java/android/telecomm/VideoCallImpl.java)8
-rw-r--r--telecomm/java/android/telecom/VideoCallbackServant.java (renamed from telecomm/java/android/telecomm/VideoCallbackServant.java)4
-rw-r--r--telecomm/java/android/telecom/VideoProfile.aidl (renamed from telecomm/java/android/telecomm/VideoProfile.aidl)2
-rw-r--r--telecomm/java/android/telecom/VideoProfile.java (renamed from telecomm/java/android/telecomm/VideoProfile.java)2
-rw-r--r--telecomm/java/android/telecomm/PropertyPresentation.java34
-rw-r--r--telecomm/java/com/android/internal/telecom/IConnectionService.aidl (renamed from telecomm/java/com/android/internal/telecomm/IConnectionService.aidl)14
-rw-r--r--telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl (renamed from telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl)22
-rw-r--r--telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl (renamed from telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl)8
-rw-r--r--telecomm/java/com/android/internal/telecom/IInCallService.aidl (renamed from telecomm/java/com/android/internal/telecomm/IInCallService.aidl)10
-rw-r--r--telecomm/java/com/android/internal/telecom/ITelecomService.aidl (renamed from telecomm/java/com/android/internal/telecomm/ITelecommService.aidl)83
-rw-r--r--telecomm/java/com/android/internal/telecom/IVideoCallback.aidl (renamed from telecomm/java/com/android/internal/telecomm/IVideoCallback.aidl)8
-rw-r--r--telecomm/java/com/android/internal/telecom/IVideoProvider.aidl (renamed from telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl)6
-rw-r--r--telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl (renamed from telecomm/java/com/android/internal/telecomm/RemoteServiceCallback.aidl)2
-rw-r--r--telephony/java/android/telephony/DisconnectCause.java2
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java13
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java49
-rw-r--r--telephony/java/com/android/ims/ImsCallProfile.java2
-rw-r--r--telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl8
-rw-r--r--telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl6
-rw-r--r--telephony/java/com/android/internal/telephony/IMms.aidl31
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl15
-rw-r--r--test-runner/src/android/test/mock/MockPackageManager.java18
-rw-r--r--tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/service/TestJobService.java11
-rw-r--r--tests/StatusBar/src/com/android/statusbartest/PowerTest.java9
-rw-r--r--tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java5
-rw-r--r--tests/VectorDrawableTest/res/anim/trim_path_animation06.xml25
-rw-r--r--tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml3
-rw-r--r--tests/VectorDrawableTest/res/drawable/vector_drawable05.xml3
-rw-r--r--tests/VectorDrawableTest/res/drawable/vector_drawable12.xml4
-rw-r--r--tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml6
-rw-r--r--tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java2
-rw-r--r--tools/aapt/Command.cpp3
-rw-r--r--tools/aapt/Resource.cpp174
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java181
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Shader_Delegate.java9
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java36
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java132
608 files changed, 10262 insertions, 5730 deletions
diff --git a/Android.mk b/Android.mk
index 35d13d74d2af..6a9da2f0dd7f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -156,7 +156,7 @@ LOCAL_SRC_FILES += \
core/java/android/hardware/hdmi/IHdmiDeviceEventListener.aidl \
core/java/android/hardware/hdmi/IHdmiHotplugEventListener.aidl \
core/java/android/hardware/hdmi/IHdmiInputChangeListener.aidl \
- core/java/android/hardware/hdmi/IHdmiMhlScratchpadCommandListener.aidl \
+ core/java/android/hardware/hdmi/IHdmiMhlVendorCommandListener.aidl \
core/java/android/hardware/hdmi/IHdmiRecordListener.aidl \
core/java/android/hardware/hdmi/IHdmiSystemAudioModeChangeListener.aidl \
core/java/android/hardware/hdmi/IHdmiVendorCommandListener.aidl \
@@ -347,14 +347,14 @@ LOCAL_SRC_FILES += \
media/java/android/media/tv/ITvInputSessionCallback.aidl \
media/java/android/service/media/IMediaBrowserService.aidl \
media/java/android/service/media/IMediaBrowserServiceCallbacks.aidl \
- telecomm/java/com/android/internal/telecomm/IVideoCallback.aidl \
- telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl \
- telecomm/java/com/android/internal/telecomm/IConnectionService.aidl \
- telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl \
- telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl \
- telecomm/java/com/android/internal/telecomm/IInCallService.aidl \
- telecomm/java/com/android/internal/telecomm/ITelecommService.aidl \
- telecomm/java/com/android/internal/telecomm/RemoteServiceCallback.aidl \
+ telecomm/java/com/android/internal/telecom/IVideoCallback.aidl \
+ telecomm/java/com/android/internal/telecom/IVideoProvider.aidl \
+ telecomm/java/com/android/internal/telecom/IConnectionService.aidl \
+ telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl \
+ telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl \
+ telecomm/java/com/android/internal/telecom/IInCallService.aidl \
+ telecomm/java/com/android/internal/telecom/ITelecomService.aidl \
+ telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl \
telephony/java/com/android/ims/internal/IImsCallSession.aidl \
telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl \
telephony/java/com/android/ims/internal/IImsConfig.aidl \
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 547ec6c43f24..28c2172294ba 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -209,7 +209,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framew
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework2_intermediates)
-$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/telecomm/java/com/android/internal/telecomm)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/telecomm/java/com/android/internal/telecom)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework.* $(PRODUCT_OUT)/system/framework2.*)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates)
@@ -223,6 +223,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/servic
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/services_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/inputflinger $(PRODUCT_OUT)/symbols/system/bin/inputflinger)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/RsFountainFbo_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework-base_intermediates/src/telecomm/java/com/android/internal/telecomm)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
diff --git a/api/current.txt b/api/current.txt
index 48e34d7eaaae..293dca63e81b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -225,34 +225,6 @@ package android {
ctor public R.array();
field public static final int emailAddressTypes = 17235968; // 0x1070000
field public static final int imProtocols = 17235969; // 0x1070001
- field public static final int l_resource_pad1 = 17236000; // 0x1070020
- field public static final int l_resource_pad10 = 17235991; // 0x1070017
- field public static final int l_resource_pad11 = 17235990; // 0x1070016
- field public static final int l_resource_pad12 = 17235989; // 0x1070015
- field public static final int l_resource_pad13 = 17235988; // 0x1070014
- field public static final int l_resource_pad14 = 17235987; // 0x1070013
- field public static final int l_resource_pad15 = 17235986; // 0x1070012
- field public static final int l_resource_pad16 = 17235985; // 0x1070011
- field public static final int l_resource_pad17 = 17235984; // 0x1070010
- field public static final int l_resource_pad18 = 17235983; // 0x107000f
- field public static final int l_resource_pad19 = 17235982; // 0x107000e
- field public static final int l_resource_pad2 = 17235999; // 0x107001f
- field public static final int l_resource_pad20 = 17235981; // 0x107000d
- field public static final int l_resource_pad21 = 17235980; // 0x107000c
- field public static final int l_resource_pad22 = 17235979; // 0x107000b
- field public static final int l_resource_pad23 = 17235978; // 0x107000a
- field public static final int l_resource_pad24 = 17235977; // 0x1070009
- field public static final int l_resource_pad25 = 17235976; // 0x1070008
- field public static final int l_resource_pad26 = 17235975; // 0x1070007
- field public static final int l_resource_pad27 = 17235974; // 0x1070006
- field public static final int l_resource_pad28 = 17235973; // 0x1070005
- field public static final int l_resource_pad3 = 17235998; // 0x107001e
- field public static final int l_resource_pad4 = 17235997; // 0x107001d
- field public static final int l_resource_pad5 = 17235996; // 0x107001c
- field public static final int l_resource_pad6 = 17235995; // 0x107001b
- field public static final int l_resource_pad7 = 17235994; // 0x107001a
- field public static final int l_resource_pad8 = 17235993; // 0x1070019
- field public static final int l_resource_pad9 = 17235992; // 0x1070018
field public static final int organizationTypes = 17235970; // 0x1070002
field public static final int phoneTypes = 17235971; // 0x1070003
field public static final int postalAddressTypes = 17235972; // 0x1070004
@@ -260,7 +232,6 @@ package android {
public static final class R.attr {
ctor public R.attr();
- field public static final int __removed2 = 16843937; // 0x10104a1
field public static final int absListViewStyle = 16842858; // 0x101006a
field public static final int accessibilityEventTypes = 16843648; // 0x1010380
field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
@@ -325,9 +296,9 @@ package android {
field public static final int alphabeticShortcut = 16843235; // 0x10101e3
field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
- field public static final int amPmBackgroundColor = 16843942; // 0x10104a6
- field public static final int amPmTextColor = 16843941; // 0x10104a5
- field public static final int ambientShadowAlpha = 16843967; // 0x10104bf
+ field public static final int amPmBackgroundColor = 16843941; // 0x10104a5
+ field public static final int amPmTextColor = 16843940; // 0x10104a4
+ field public static final int ambientShadowAlpha = 16843966; // 0x10104be
field public static final int angle = 16843168; // 0x10101a0
field public static final int animateFirstView = 16843477; // 0x10102d5
field public static final int animateLayoutChanges = 16843506; // 0x10102f2
@@ -406,8 +377,8 @@ package android {
field public static final int centerY = 16843171; // 0x10101a3
field public static final int checkBoxPreferenceStyle = 16842895; // 0x101008f
field public static final int checkMark = 16843016; // 0x1010108
- field public static final int checkMarkTint = 16843944; // 0x10104a8
- field public static final int checkMarkTintMode = 16843945; // 0x10104a9
+ field public static final int checkMarkTint = 16843943; // 0x10104a7
+ field public static final int checkMarkTintMode = 16843944; // 0x10104a8
field public static final int checkable = 16843237; // 0x10101e5
field public static final int checkableBehavior = 16843232; // 0x10101e0
field public static final int checkboxStyle = 16842860; // 0x101006c
@@ -459,18 +430,18 @@ package android {
field public static final int configure = 16843357; // 0x101025d
field public static final int constantSize = 16843158; // 0x1010196
field public static final int content = 16843355; // 0x101025b
- field public static final int contentAgeHint = 16843962; // 0x10104ba
+ field public static final int contentAgeHint = 16843961; // 0x10104b9
field public static final int contentAuthority = 16843408; // 0x1010290
field public static final int contentDescription = 16843379; // 0x1010273
field public static final int contentInsetEnd = 16843860; // 0x1010454
field public static final int contentInsetLeft = 16843861; // 0x1010455
field public static final int contentInsetRight = 16843862; // 0x1010456
field public static final int contentInsetStart = 16843859; // 0x1010453
- field public static final int controlX1 = 16843798; // 0x1010416
- field public static final int controlX2 = 16843800; // 0x1010418
- field public static final int controlY1 = 16843799; // 0x1010417
- field public static final int controlY2 = 16843801; // 0x1010419
- field public static final int country = 16843963; // 0x10104bb
+ field public static final int controlX1 = 16843772; // 0x10103fc
+ field public static final int controlX2 = 16843774; // 0x10103fe
+ field public static final int controlY1 = 16843773; // 0x10103fd
+ field public static final int controlY2 = 16843775; // 0x10103ff
+ field public static final int country = 16843962; // 0x10104ba
field public static final int cropToPadding = 16843043; // 0x1010123
field public static final int cursorVisible = 16843090; // 0x1010152
field public static final int customNavigationLayout = 16843474; // 0x10102d2
@@ -479,8 +450,8 @@ package android {
field public static final int dashGap = 16843175; // 0x10101a7
field public static final int dashWidth = 16843174; // 0x10101a6
field public static final int data = 16842798; // 0x101002e
- field public static final int datePickerDialogTheme = 16843949; // 0x10104ad
- field public static final int datePickerMode = 16843956; // 0x10104b4
+ field public static final int datePickerDialogTheme = 16843948; // 0x10104ac
+ field public static final int datePickerMode = 16843955; // 0x10104b3
field public static final int datePickerStyle = 16843612; // 0x101035c
field public static final int dateTextAppearance = 16843593; // 0x1010349
field public static final int dayOfWeekBackground = 16843924; // 0x1010494
@@ -583,13 +554,14 @@ package android {
field public static final int fastScrollOverlayPosition = 16843578; // 0x101033a
field public static final int fastScrollPreviewBackgroundLeft = 16843575; // 0x1010337
field public static final int fastScrollPreviewBackgroundRight = 16843576; // 0x1010338
- field public static final int fastScrollStyle = 16843793; // 0x1010411
+ field public static final int fastScrollStyle = 16843767; // 0x10103f7
field public static final int fastScrollTextColor = 16843609; // 0x1010359
field public static final int fastScrollThumbDrawable = 16843574; // 0x1010336
field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
field public static final int fillAfter = 16843197; // 0x10101bd
+ field public static final int fillAlpha = 16843980; // 0x10104cc
field public static final int fillBefore = 16843196; // 0x10101bc
- field public static final int fillColor = 16843806; // 0x101041e
+ field public static final int fillColor = 16843780; // 0x1010404
field public static final int fillEnabled = 16843343; // 0x101024f
field public static final int fillViewport = 16843130; // 0x101017a
field public static final int filter = 16843035; // 0x101011b
@@ -603,7 +575,7 @@ package android {
field public static final int focusableInTouchMode = 16842971; // 0x10100db
field public static final int focusedMonthDateColor = 16843587; // 0x1010343
field public static final int fontFamily = 16843692; // 0x10103ac
- field public static final int fontFeatureSettings = 16843960; // 0x10104b8
+ field public static final int fontFeatureSettings = 16843959; // 0x10104b7
field public static final int footerDividersEnabled = 16843311; // 0x101022f
field public static final int foreground = 16843017; // 0x1010109
field public static final int foregroundGravity = 16843264; // 0x1010200
@@ -613,20 +585,20 @@ package android {
field public static final int format12Hour = 16843722; // 0x10103ca
field public static final int format24Hour = 16843723; // 0x10103cb
field public static final int fragment = 16843491; // 0x10102e3
- field public static final int fragmentAllowEnterTransitionOverlap = 16843977; // 0x10104c9
- field public static final int fragmentAllowReturnTransitionOverlap = 16843978; // 0x10104ca
+ field public static final int fragmentAllowEnterTransitionOverlap = 16843976; // 0x10104c8
+ field public static final int fragmentAllowReturnTransitionOverlap = 16843977; // 0x10104c9
field public static final int fragmentCloseEnterAnimation = 16843495; // 0x10102e7
field public static final int fragmentCloseExitAnimation = 16843496; // 0x10102e8
- field public static final int fragmentEnterTransition = 16843972; // 0x10104c4
- field public static final int fragmentExitTransition = 16843971; // 0x10104c3
+ field public static final int fragmentEnterTransition = 16843971; // 0x10104c3
+ field public static final int fragmentExitTransition = 16843970; // 0x10104c2
field public static final int fragmentFadeEnterAnimation = 16843497; // 0x10102e9
field public static final int fragmentFadeExitAnimation = 16843498; // 0x10102ea
field public static final int fragmentOpenEnterAnimation = 16843493; // 0x10102e5
field public static final int fragmentOpenExitAnimation = 16843494; // 0x10102e6
- field public static final int fragmentReenterTransition = 16843976; // 0x10104c8
- field public static final int fragmentReturnTransition = 16843974; // 0x10104c6
- field public static final int fragmentSharedElementEnterTransition = 16843973; // 0x10104c5
- field public static final int fragmentSharedElementReturnTransition = 16843975; // 0x10104c7
+ field public static final int fragmentReenterTransition = 16843975; // 0x10104c7
+ field public static final int fragmentReturnTransition = 16843973; // 0x10104c5
+ field public static final int fragmentSharedElementEnterTransition = 16843972; // 0x10104c4
+ field public static final int fragmentSharedElementReturnTransition = 16843974; // 0x10104c6
field public static final int freezesText = 16843116; // 0x101016c
field public static final int fromAlpha = 16843210; // 0x10101ca
field public static final int fromDegrees = 16843187; // 0x10101b3
@@ -720,7 +692,7 @@ package android {
field public static final int innerRadiusRatio = 16843163; // 0x101019b
field public static final deprecated int inputMethod = 16843112; // 0x1010168
field public static final int inputType = 16843296; // 0x1010220
- field public static final int inset = 16843958; // 0x10104b6
+ field public static final int inset = 16843957; // 0x10104b5
field public static final int insetBottom = 16843194; // 0x10101ba
field public static final int insetLeft = 16843191; // 0x10101b7
field public static final int insetRight = 16843192; // 0x10101b8
@@ -761,32 +733,6 @@ package android {
field public static final int keyboardMode = 16843341; // 0x101024d
field public static final int keycode = 16842949; // 0x10100c5
field public static final int killAfterRestore = 16843420; // 0x101029c
- field public static final int l_resource_pad1 = 16843792; // 0x1010410
- field public static final int l_resource_pad10 = 16843783; // 0x1010407
- field public static final int l_resource_pad11 = 16843782; // 0x1010406
- field public static final int l_resource_pad12 = 16843781; // 0x1010405
- field public static final int l_resource_pad13 = 16843780; // 0x1010404
- field public static final int l_resource_pad14 = 16843779; // 0x1010403
- field public static final int l_resource_pad15 = 16843778; // 0x1010402
- field public static final int l_resource_pad16 = 16843777; // 0x1010401
- field public static final int l_resource_pad17 = 16843776; // 0x1010400
- field public static final int l_resource_pad18 = 16843775; // 0x10103ff
- field public static final int l_resource_pad19 = 16843774; // 0x10103fe
- field public static final int l_resource_pad2 = 16843791; // 0x101040f
- field public static final int l_resource_pad20 = 16843773; // 0x10103fd
- field public static final int l_resource_pad21 = 16843772; // 0x10103fc
- field public static final int l_resource_pad22 = 16843771; // 0x10103fb
- field public static final int l_resource_pad23 = 16843770; // 0x10103fa
- field public static final int l_resource_pad24 = 16843769; // 0x10103f9
- field public static final int l_resource_pad25 = 16843768; // 0x10103f8
- field public static final int l_resource_pad26 = 16843767; // 0x10103f7
- field public static final int l_resource_pad3 = 16843790; // 0x101040e
- field public static final int l_resource_pad4 = 16843789; // 0x101040d
- field public static final int l_resource_pad5 = 16843788; // 0x101040c
- field public static final int l_resource_pad6 = 16843787; // 0x101040b
- field public static final int l_resource_pad7 = 16843786; // 0x101040a
- field public static final int l_resource_pad8 = 16843785; // 0x1010409
- field public static final int l_resource_pad9 = 16843784; // 0x1010408
field public static final int label = 16842753; // 0x1010001
field public static final int labelFor = 16843718; // 0x10103c6
field public static final int labelTextSize = 16843317; // 0x1010235
@@ -846,7 +792,7 @@ package android {
field public static final int layout_x = 16843135; // 0x101017f
field public static final int layout_y = 16843136; // 0x1010180
field public static final int left = 16843181; // 0x10101ad
- field public static final int letterSpacing = 16843959; // 0x10104b7
+ field public static final int letterSpacing = 16843958; // 0x10104b6
field public static final int lineSpacingExtra = 16843287; // 0x1010217
field public static final int lineSpacingMultiplier = 16843288; // 0x1010218
field public static final int lines = 16843092; // 0x1010154
@@ -913,8 +859,8 @@ package android {
field public static final int multiprocess = 16842771; // 0x1010013
field public static final int name = 16842755; // 0x1010003
field public static final int navigationBarColor = 16843858; // 0x1010452
- field public static final int navigationContentDescription = 16843970; // 0x10104c2
- field public static final int navigationIcon = 16843969; // 0x10104c1
+ field public static final int navigationContentDescription = 16843969; // 0x10104c1
+ field public static final int navigationIcon = 16843968; // 0x10104c0
field public static final int navigationMode = 16843471; // 0x10102cf
field public static final int negativeButtonText = 16843254; // 0x10101f6
field public static final int nestedScrollingEnabled = 16843830; // 0x1010436
@@ -928,9 +874,9 @@ package android {
field public static final int notificationTimeout = 16843651; // 0x1010383
field public static final int numColumns = 16843032; // 0x1010118
field public static final int numStars = 16843076; // 0x1010144
- field public static final int numbersBackgroundColor = 16843939; // 0x10104a3
- field public static final int numbersSelectorColor = 16843940; // 0x10104a4
- field public static final int numbersTextColor = 16843938; // 0x10104a2
+ field public static final int numbersBackgroundColor = 16843938; // 0x10104a2
+ field public static final int numbersSelectorColor = 16843939; // 0x10104a3
+ field public static final int numbersTextColor = 16843937; // 0x10104a1
field public static final deprecated int numeric = 16843109; // 0x1010165
field public static final int numericShortcut = 16843236; // 0x10101e4
field public static final int onClick = 16843375; // 0x101026f
@@ -942,7 +888,7 @@ package android {
field public static final int orderingFromXml = 16843239; // 0x10101e7
field public static final int orientation = 16842948; // 0x10100c4
field public static final int outAnimation = 16843128; // 0x1010178
- field public static final int outlineProvider = 16843961; // 0x10104b9
+ field public static final int outlineProvider = 16843960; // 0x10104b8
field public static final int overScrollFooter = 16843459; // 0x10102c3
field public static final int overScrollHeader = 16843458; // 0x10102c2
field public static final int overScrollMode = 16843457; // 0x10102c1
@@ -965,10 +911,10 @@ package android {
field public static final int parentActivityName = 16843687; // 0x10103a7
field public static final deprecated int password = 16843100; // 0x101015c
field public static final int path = 16842794; // 0x101002a
- field public static final int pathData = 16843807; // 0x101041f
+ field public static final int pathData = 16843781; // 0x1010405
field public static final int pathPattern = 16842796; // 0x101002c
field public static final int pathPrefix = 16842795; // 0x101002b
- field public static final int patternPathData = 16843979; // 0x10104cb
+ field public static final int patternPathData = 16843978; // 0x10104ca
field public static final int permission = 16842758; // 0x1010006
field public static final int permissionFlags = 16843719; // 0x10103c7
field public static final int permissionGroup = 16842762; // 0x101000a
@@ -986,7 +932,7 @@ package android {
field public static final int popupKeyboard = 16843331; // 0x1010243
field public static final int popupLayout = 16843323; // 0x101023b
field public static final int popupMenuStyle = 16843520; // 0x1010300
- field public static final int popupTheme = 16843946; // 0x10104aa
+ field public static final int popupTheme = 16843945; // 0x10104a9
field public static final int popupWindowStyle = 16842870; // 0x1010076
field public static final int port = 16842793; // 0x1010029
field public static final int positiveButtonText = 16843253; // 0x10101f5
@@ -1040,8 +986,8 @@ package android {
field public static final int readPermission = 16842759; // 0x1010007
field public static final int recognitionService = 16843932; // 0x101049c
field public static final int relinquishTaskIdentity = 16843894; // 0x1010476
- field public static final int reparent = 16843965; // 0x10104bd
- field public static final int reparentWithOverlay = 16843966; // 0x10104be
+ field public static final int reparent = 16843964; // 0x10104bc
+ field public static final int reparentWithOverlay = 16843965; // 0x10104bd
field public static final int repeatCount = 16843199; // 0x10101bf
field public static final int repeatMode = 16843200; // 0x10101c0
field public static final int reqFiveWayNav = 16843314; // 0x1010232
@@ -1062,7 +1008,7 @@ package android {
field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
field public static final int restrictedAccountType = 16843733; // 0x10103d5
field public static final int restrictionType = 16843923; // 0x1010493
- field public static final int resumeWhilePausing = 16843955; // 0x10104b3
+ field public static final int resumeWhilePausing = 16843954; // 0x10104b2
field public static final int reversible = 16843851; // 0x101044b
field public static final int right = 16843183; // 0x10101af
field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093
@@ -1141,7 +1087,7 @@ package android {
field public static final int showDividers = 16843561; // 0x1010329
field public static final int showOnLockScreen = 16843721; // 0x10103c9
field public static final int showSilent = 16843259; // 0x10101fb
- field public static final int showText = 16843950; // 0x10104ae
+ field public static final int showText = 16843949; // 0x10104ad
field public static final int showWeekNumber = 16843582; // 0x101033e
field public static final int shownWeekCount = 16843585; // 0x1010341
field public static final int shrinkColumns = 16843082; // 0x101014a
@@ -1160,7 +1106,7 @@ package android {
field public static final int spinnersShown = 16843595; // 0x101034b
field public static final int splitMotionEvents = 16843503; // 0x10102ef
field public static final int splitTrack = 16843852; // 0x101044c
- field public static final int spotShadowAlpha = 16843968; // 0x10104c0
+ field public static final int spotShadowAlpha = 16843967; // 0x10104bf
field public static final int src = 16843033; // 0x1010119
field public static final int ssp = 16843747; // 0x10103e3
field public static final int sspPattern = 16843749; // 0x10103e5
@@ -1203,11 +1149,12 @@ package android {
field public static final int streamType = 16843273; // 0x1010209
field public static final int stretchColumns = 16843081; // 0x1010149
field public static final int stretchMode = 16843030; // 0x1010116
- field public static final int strokeColor = 16843808; // 0x1010420
- field public static final int strokeLineCap = 16843813; // 0x1010425
- field public static final int strokeLineJoin = 16843814; // 0x1010426
- field public static final int strokeMiterLimit = 16843815; // 0x1010427
- field public static final int strokeWidth = 16843809; // 0x1010421
+ field public static final int strokeAlpha = 16843979; // 0x10104cb
+ field public static final int strokeColor = 16843782; // 0x1010406
+ field public static final int strokeLineCap = 16843787; // 0x101040b
+ field public static final int strokeLineJoin = 16843788; // 0x101040c
+ field public static final int strokeMiterLimit = 16843789; // 0x101040d
+ field public static final int strokeWidth = 16843783; // 0x1010407
field public static final int submitBackground = 16843912; // 0x1010488
field public static final int subtitle = 16843473; // 0x10102d1
field public static final int subtitleTextAppearance = 16843823; // 0x101042f
@@ -1330,11 +1277,11 @@ package android {
field public static final int tileModeX = 16843895; // 0x1010477
field public static final int tileModeY = 16843896; // 0x1010478
field public static final int timePickerDialogTheme = 16843934; // 0x101049e
- field public static final int timePickerMode = 16843957; // 0x10104b5
+ field public static final int timePickerMode = 16843956; // 0x10104b4
field public static final int timePickerStyle = 16843933; // 0x101049d
field public static final int timeZone = 16843724; // 0x10103cc
field public static final int tint = 16843041; // 0x1010121
- field public static final int tintMode = 16843797; // 0x1010415
+ field public static final int tintMode = 16843771; // 0x10103fb
field public static final int title = 16843233; // 0x10101e1
field public static final int titleCondensed = 16843234; // 0x10101e2
field public static final int titleTextAppearance = 16843822; // 0x101042e
@@ -1347,7 +1294,7 @@ package android {
field public static final int toXScale = 16843203; // 0x10101c3
field public static final int toYDelta = 16843209; // 0x10101c9
field public static final int toYScale = 16843205; // 0x10101c5
- field public static final int toolbarStyle = 16843947; // 0x10104ab
+ field public static final int toolbarStyle = 16843946; // 0x10104aa
field public static final int top = 16843182; // 0x10101ae
field public static final int topBright = 16842955; // 0x10100cb
field public static final int topDark = 16842951; // 0x10100c7
@@ -1360,18 +1307,18 @@ package android {
field public static final int transformPivotX = 16843552; // 0x1010320
field public static final int transformPivotY = 16843553; // 0x1010321
field public static final int transition = 16843743; // 0x10103df
- field public static final int transitionGroup = 16843803; // 0x101041b
- field public static final int transitionName = 16843802; // 0x101041a
+ field public static final int transitionGroup = 16843777; // 0x1010401
+ field public static final int transitionName = 16843776; // 0x1010400
field public static final int transitionOrdering = 16843744; // 0x10103e0
field public static final int transitionVisibilityMode = 16843900; // 0x101047c
field public static final int translateX = 16843866; // 0x101045a
field public static final int translateY = 16843867; // 0x101045b
field public static final int translationX = 16843554; // 0x1010322
field public static final int translationY = 16843555; // 0x1010323
- field public static final int translationZ = 16843796; // 0x1010414
- field public static final int trimPathEnd = 16843811; // 0x1010423
- field public static final int trimPathOffset = 16843812; // 0x1010424
- field public static final int trimPathStart = 16843810; // 0x1010422
+ field public static final int translationZ = 16843770; // 0x10103fa
+ field public static final int trimPathEnd = 16843785; // 0x1010409
+ field public static final int trimPathOffset = 16843786; // 0x101040a
+ field public static final int trimPathStart = 16843784; // 0x1010408
field public static final int type = 16843169; // 0x10101a1
field public static final int typeface = 16842902; // 0x1010096
field public static final int uiOptions = 16843672; // 0x1010398
@@ -1396,8 +1343,8 @@ package android {
field public static final int verticalGap = 16843328; // 0x1010240
field public static final int verticalScrollbarPosition = 16843572; // 0x1010334
field public static final int verticalSpacing = 16843029; // 0x1010115
- field public static final int viewportHeight = 16843805; // 0x101041d
- field public static final int viewportWidth = 16843804; // 0x101041c
+ field public static final int viewportHeight = 16843779; // 0x1010403
+ field public static final int viewportWidth = 16843778; // 0x1010402
field public static final int visibility = 16842972; // 0x10100dc
field public static final int visible = 16843156; // 0x1010194
field public static final int vmSafeMode = 16843448; // 0x10102b8
@@ -1427,15 +1374,16 @@ package android {
field public static final int windowActionBar = 16843469; // 0x10102cd
field public static final int windowActionBarOverlay = 16843492; // 0x10102e4
field public static final int windowActionModeOverlay = 16843485; // 0x10102dd
+ field public static final int windowActivityTransitions = 16843981; // 0x10104cd
field public static final int windowAllowEnterTransitionOverlap = 16843836; // 0x101043c
field public static final int windowAllowReturnTransitionOverlap = 16843835; // 0x101043b
field public static final int windowAnimationStyle = 16842926; // 0x10100ae
field public static final int windowBackground = 16842836; // 0x1010054
- field public static final int windowClipToOutline = 16843948; // 0x10104ac
+ field public static final int windowClipToOutline = 16843947; // 0x10104ab
field public static final int windowCloseOnTouchOutside = 16843611; // 0x101035b
field public static final int windowContentOverlay = 16842841; // 0x1010059
- field public static final int windowContentTransitionManager = 16843795; // 0x1010413
- field public static final int windowContentTransitions = 16843794; // 0x1010412
+ field public static final int windowContentTransitionManager = 16843769; // 0x10103f9
+ field public static final int windowContentTransitions = 16843768; // 0x10103f8
field public static final int windowDisablePreview = 16843298; // 0x1010222
field public static final int windowDrawsSystemBarBackgrounds = 16843856; // 0x1010450
field public static final int windowElevation = 16843920; // 0x1010490
@@ -1454,13 +1402,13 @@ package android {
field public static final int windowNoDisplay = 16843294; // 0x101021e
field public static final int windowNoTitle = 16842838; // 0x1010056
field public static final int windowOverscan = 16843727; // 0x10103cf
- field public static final int windowReenterTransition = 16843952; // 0x10104b0
- field public static final int windowReturnTransition = 16843951; // 0x10104af
+ field public static final int windowReenterTransition = 16843951; // 0x10104af
+ field public static final int windowReturnTransition = 16843950; // 0x10104ae
field public static final int windowSharedElementEnterTransition = 16843833; // 0x1010439
field public static final int windowSharedElementExitTransition = 16843834; // 0x101043a
- field public static final int windowSharedElementReenterTransition = 16843954; // 0x10104b2
- field public static final int windowSharedElementReturnTransition = 16843953; // 0x10104b1
- field public static final int windowSharedElementsUseOverlay = 16843964; // 0x10104bc
+ field public static final int windowSharedElementReenterTransition = 16843953; // 0x10104b1
+ field public static final int windowSharedElementReturnTransition = 16843952; // 0x10104b0
+ field public static final int windowSharedElementsUseOverlay = 16843963; // 0x10104bb
field public static final int windowShowAnimation = 16842934; // 0x10100b6
field public static final int windowShowWallpaper = 16843410; // 0x1010292
field public static final int windowSoftInputMode = 16843307; // 0x101022b
@@ -1522,16 +1470,6 @@ package android {
field public static final int app_icon_size = 17104896; // 0x1050000
field public static final int dialog_min_width_major = 17104899; // 0x1050003
field public static final int dialog_min_width_minor = 17104900; // 0x1050004
- field public static final int l_resource_pad1 = 17104912; // 0x1050010
- field public static final int l_resource_pad10 = 17104903; // 0x1050007
- field public static final int l_resource_pad2 = 17104911; // 0x105000f
- field public static final int l_resource_pad3 = 17104910; // 0x105000e
- field public static final int l_resource_pad4 = 17104909; // 0x105000d
- field public static final int l_resource_pad5 = 17104908; // 0x105000c
- field public static final int l_resource_pad6 = 17104907; // 0x105000b
- field public static final int l_resource_pad7 = 17104906; // 0x105000a
- field public static final int l_resource_pad8 = 17104905; // 0x1050009
- field public static final int l_resource_pad9 = 17104904; // 0x1050008
field public static final int notification_large_icon_height = 17104902; // 0x1050006
field public static final int notification_large_icon_width = 17104901; // 0x1050005
field public static final int thumbnail_height = 17104897; // 0x1050001
@@ -1747,29 +1685,10 @@ package android {
field public static final int inputArea = 16908318; // 0x102001e
field public static final int inputExtractEditText = 16908325; // 0x1020025
field public static final int keyboardView = 16908326; // 0x1020026
- field public static final int l_resource_pad1 = 16908352; // 0x1020040
- field public static final int l_resource_pad10 = 16908343; // 0x1020037
- field public static final int l_resource_pad11 = 16908342; // 0x1020036
- field public static final int l_resource_pad12 = 16908341; // 0x1020035
- field public static final int l_resource_pad13 = 16908340; // 0x1020034
- field public static final int l_resource_pad14 = 16908339; // 0x1020033
- field public static final int l_resource_pad15 = 16908338; // 0x1020032
- field public static final int l_resource_pad16 = 16908337; // 0x1020031
- field public static final int l_resource_pad17 = 16908336; // 0x1020030
- field public static final int l_resource_pad18 = 16908335; // 0x102002f
- field public static final int l_resource_pad19 = 16908334; // 0x102002e
- field public static final int l_resource_pad2 = 16908351; // 0x102003f
- field public static final int l_resource_pad3 = 16908350; // 0x102003e
- field public static final int l_resource_pad4 = 16908349; // 0x102003d
- field public static final int l_resource_pad5 = 16908348; // 0x102003c
- field public static final int l_resource_pad6 = 16908347; // 0x102003b
- field public static final int l_resource_pad7 = 16908346; // 0x102003a
- field public static final int l_resource_pad8 = 16908345; // 0x1020039
- field public static final int l_resource_pad9 = 16908344; // 0x1020038
field public static final int list = 16908298; // 0x102000a
- field public static final int mask = 16908353; // 0x1020041
+ field public static final int mask = 16908334; // 0x102002e
field public static final int message = 16908299; // 0x102000b
- field public static final int navigationBarBackground = 16908355; // 0x1020043
+ field public static final int navigationBarBackground = 16908336; // 0x1020030
field public static final int paste = 16908322; // 0x1020022
field public static final int primary = 16908300; // 0x102000c
field public static final int progress = 16908301; // 0x102000d
@@ -1778,7 +1697,7 @@ package android {
field public static final int selectTextMode = 16908333; // 0x102002d
field public static final int selectedIcon = 16908302; // 0x102000e
field public static final int startSelectingText = 16908328; // 0x1020028
- field public static final int statusBarBackground = 16908354; // 0x1020042
+ field public static final int statusBarBackground = 16908335; // 0x102002f
field public static final int stopSelectingText = 16908329; // 0x1020029
field public static final int summary = 16908304; // 0x1020010
field public static final int switchInputMethod = 16908324; // 0x1020024
@@ -1813,14 +1732,10 @@ package android {
field public static final int decelerate_cubic = 17563651; // 0x10c0003
field public static final int decelerate_quad = 17563649; // 0x10c0001
field public static final int decelerate_quint = 17563653; // 0x10c0005
- field public static final int fast_out_linear_in = 17563667; // 0x10c0013
- field public static final int fast_out_slow_in = 17563665; // 0x10c0011
- field public static final int l_resource_pad1 = 17563664; // 0x10c0010
- field public static final int l_resource_pad2 = 17563663; // 0x10c000f
- field public static final int l_resource_pad3 = 17563662; // 0x10c000e
- field public static final int l_resource_pad4 = 17563661; // 0x10c000d
+ field public static final int fast_out_linear_in = 17563663; // 0x10c000f
+ field public static final int fast_out_slow_in = 17563661; // 0x10c000d
field public static final int linear = 17563659; // 0x10c000b
- field public static final int linear_out_slow_in = 17563666; // 0x10c0012
+ field public static final int linear_out_slow_in = 17563662; // 0x10c000e
field public static final int overshoot = 17563656; // 0x10c0008
}
@@ -1885,31 +1800,6 @@ package android {
field public static final int emptyPhoneNumber = 17039366; // 0x1040006
field public static final int httpErrorBadUrl = 17039367; // 0x1040007
field public static final int httpErrorUnsupportedScheme = 17039368; // 0x1040008
- field public static final int l_resource_pad1 = 17039408; // 0x1040030
- field public static final int l_resource_pad10 = 17039399; // 0x1040027
- field public static final int l_resource_pad11 = 17039398; // 0x1040026
- field public static final int l_resource_pad12 = 17039397; // 0x1040025
- field public static final int l_resource_pad13 = 17039396; // 0x1040024
- field public static final int l_resource_pad14 = 17039395; // 0x1040023
- field public static final int l_resource_pad15 = 17039394; // 0x1040022
- field public static final int l_resource_pad16 = 17039393; // 0x1040021
- field public static final int l_resource_pad17 = 17039392; // 0x1040020
- field public static final int l_resource_pad18 = 17039391; // 0x104001f
- field public static final int l_resource_pad19 = 17039390; // 0x104001e
- field public static final int l_resource_pad2 = 17039407; // 0x104002f
- field public static final int l_resource_pad20 = 17039389; // 0x104001d
- field public static final int l_resource_pad21 = 17039388; // 0x104001c
- field public static final int l_resource_pad22 = 17039387; // 0x104001b
- field public static final int l_resource_pad23 = 17039386; // 0x104001a
- field public static final int l_resource_pad24 = 17039385; // 0x1040019
- field public static final int l_resource_pad25 = 17039384; // 0x1040018
- field public static final int l_resource_pad3 = 17039406; // 0x104002e
- field public static final int l_resource_pad4 = 17039405; // 0x104002d
- field public static final int l_resource_pad5 = 17039404; // 0x104002c
- field public static final int l_resource_pad6 = 17039403; // 0x104002b
- field public static final int l_resource_pad7 = 17039402; // 0x104002a
- field public static final int l_resource_pad8 = 17039401; // 0x1040029
- field public static final int l_resource_pad9 = 17039400; // 0x1040028
field public static final int no = 17039369; // 0x1040009
field public static final int ok = 17039370; // 0x104000a
field public static final int paste = 17039371; // 0x104000b
@@ -2022,60 +1912,60 @@ package android {
field public static final int TextAppearance_Inverse = 16973887; // 0x103003f
field public static final int TextAppearance_Large = 16973890; // 0x1030042
field public static final int TextAppearance_Large_Inverse = 16973891; // 0x1030043
- field public static final int TextAppearance_Material = 16974350; // 0x103020e
- field public static final int TextAppearance_Material_Body1 = 16974552; // 0x10302d8
- field public static final int TextAppearance_Material_Body2 = 16974551; // 0x10302d7
- field public static final int TextAppearance_Material_Button = 16974555; // 0x10302db
- field public static final int TextAppearance_Material_Caption = 16974553; // 0x10302d9
- field public static final int TextAppearance_Material_DialogWindowTitle = 16974351; // 0x103020f
- field public static final int TextAppearance_Material_Display1 = 16974547; // 0x10302d3
- field public static final int TextAppearance_Material_Display2 = 16974546; // 0x10302d2
- field public static final int TextAppearance_Material_Display3 = 16974545; // 0x10302d1
- field public static final int TextAppearance_Material_Display4 = 16974544; // 0x10302d0
- field public static final int TextAppearance_Material_Headline = 16974548; // 0x10302d4
- field public static final int TextAppearance_Material_Inverse = 16974352; // 0x1030210
- field public static final int TextAppearance_Material_Large = 16974353; // 0x1030211
- field public static final int TextAppearance_Material_Large_Inverse = 16974354; // 0x1030212
- field public static final int TextAppearance_Material_Medium = 16974355; // 0x1030213
- field public static final int TextAppearance_Material_Medium_Inverse = 16974356; // 0x1030214
- field public static final int TextAppearance_Material_Menu = 16974554; // 0x10302da
- field public static final int TextAppearance_Material_Notification = 16974560; // 0x10302e0
- field public static final int TextAppearance_Material_Notification_Emphasis = 16974565; // 0x10302e5
- field public static final int TextAppearance_Material_Notification_Info = 16974563; // 0x10302e3
- field public static final int TextAppearance_Material_Notification_Line2 = 16974562; // 0x10302e2
- field public static final int TextAppearance_Material_Notification_Time = 16974564; // 0x10302e4
- field public static final int TextAppearance_Material_Notification_Title = 16974561; // 0x10302e1
- field public static final int TextAppearance_Material_SearchResult_Subtitle = 16974357; // 0x1030215
- field public static final int TextAppearance_Material_SearchResult_Title = 16974358; // 0x1030216
- field public static final int TextAppearance_Material_Small = 16974359; // 0x1030217
- field public static final int TextAppearance_Material_Small_Inverse = 16974360; // 0x1030218
- field public static final int TextAppearance_Material_Subhead = 16974550; // 0x10302d6
- field public static final int TextAppearance_Material_Title = 16974549; // 0x10302d5
- field public static final int TextAppearance_Material_Widget = 16974362; // 0x103021a
- field public static final int TextAppearance_Material_Widget_ActionBar_Menu = 16974363; // 0x103021b
- field public static final int TextAppearance_Material_Widget_ActionBar_Subtitle = 16974364; // 0x103021c
- field public static final int TextAppearance_Material_Widget_ActionBar_Subtitle_Inverse = 16974365; // 0x103021d
- field public static final int TextAppearance_Material_Widget_ActionBar_Title = 16974366; // 0x103021e
- field public static final int TextAppearance_Material_Widget_ActionBar_Title_Inverse = 16974367; // 0x103021f
- field public static final int TextAppearance_Material_Widget_ActionMode_Subtitle = 16974368; // 0x1030220
- field public static final int TextAppearance_Material_Widget_ActionMode_Subtitle_Inverse = 16974369; // 0x1030221
- field public static final int TextAppearance_Material_Widget_ActionMode_Title = 16974370; // 0x1030222
- field public static final int TextAppearance_Material_Widget_ActionMode_Title_Inverse = 16974371; // 0x1030223
- field public static final int TextAppearance_Material_Widget_Button = 16974372; // 0x1030224
- field public static final int TextAppearance_Material_Widget_DropDownHint = 16974373; // 0x1030225
- field public static final int TextAppearance_Material_Widget_DropDownItem = 16974374; // 0x1030226
- field public static final int TextAppearance_Material_Widget_EditText = 16974375; // 0x1030227
- field public static final int TextAppearance_Material_Widget_IconMenu_Item = 16974376; // 0x1030228
- field public static final int TextAppearance_Material_Widget_PopupMenu = 16974377; // 0x1030229
- field public static final int TextAppearance_Material_Widget_PopupMenu_Large = 16974378; // 0x103022a
- field public static final int TextAppearance_Material_Widget_PopupMenu_Small = 16974379; // 0x103022b
- field public static final int TextAppearance_Material_Widget_TabWidget = 16974380; // 0x103022c
- field public static final int TextAppearance_Material_Widget_TextView = 16974381; // 0x103022d
- field public static final int TextAppearance_Material_Widget_TextView_PopupMenu = 16974382; // 0x103022e
- field public static final int TextAppearance_Material_Widget_TextView_SpinnerItem = 16974383; // 0x103022f
- field public static final int TextAppearance_Material_Widget_Toolbar_Subtitle = 16974569; // 0x10302e9
- field public static final int TextAppearance_Material_Widget_Toolbar_Title = 16974568; // 0x10302e8
- field public static final int TextAppearance_Material_WindowTitle = 16974361; // 0x1030219
+ field public static final int TextAppearance_Material = 16974317; // 0x10301ed
+ field public static final int TextAppearance_Material_Body1 = 16974320; // 0x10301f0
+ field public static final int TextAppearance_Material_Body2 = 16974319; // 0x10301ef
+ field public static final int TextAppearance_Material_Button = 16974318; // 0x10301ee
+ field public static final int TextAppearance_Material_Caption = 16974321; // 0x10301f1
+ field public static final int TextAppearance_Material_DialogWindowTitle = 16974322; // 0x10301f2
+ field public static final int TextAppearance_Material_Display1 = 16974326; // 0x10301f6
+ field public static final int TextAppearance_Material_Display2 = 16974325; // 0x10301f5
+ field public static final int TextAppearance_Material_Display3 = 16974324; // 0x10301f4
+ field public static final int TextAppearance_Material_Display4 = 16974323; // 0x10301f3
+ field public static final int TextAppearance_Material_Headline = 16974327; // 0x10301f7
+ field public static final int TextAppearance_Material_Inverse = 16974328; // 0x10301f8
+ field public static final int TextAppearance_Material_Large = 16974329; // 0x10301f9
+ field public static final int TextAppearance_Material_Large_Inverse = 16974330; // 0x10301fa
+ field public static final int TextAppearance_Material_Medium = 16974331; // 0x10301fb
+ field public static final int TextAppearance_Material_Medium_Inverse = 16974332; // 0x10301fc
+ field public static final int TextAppearance_Material_Menu = 16974333; // 0x10301fd
+ field public static final int TextAppearance_Material_Notification = 16974334; // 0x10301fe
+ field public static final int TextAppearance_Material_Notification_Emphasis = 16974335; // 0x10301ff
+ field public static final int TextAppearance_Material_Notification_Info = 16974336; // 0x1030200
+ field public static final int TextAppearance_Material_Notification_Line2 = 16974337; // 0x1030201
+ field public static final int TextAppearance_Material_Notification_Time = 16974338; // 0x1030202
+ field public static final int TextAppearance_Material_Notification_Title = 16974339; // 0x1030203
+ field public static final int TextAppearance_Material_SearchResult_Subtitle = 16974340; // 0x1030204
+ field public static final int TextAppearance_Material_SearchResult_Title = 16974341; // 0x1030205
+ field public static final int TextAppearance_Material_Small = 16974342; // 0x1030206
+ field public static final int TextAppearance_Material_Small_Inverse = 16974343; // 0x1030207
+ field public static final int TextAppearance_Material_Subhead = 16974344; // 0x1030208
+ field public static final int TextAppearance_Material_Title = 16974345; // 0x1030209
+ field public static final int TextAppearance_Material_Widget = 16974347; // 0x103020b
+ field public static final int TextAppearance_Material_Widget_ActionBar_Menu = 16974348; // 0x103020c
+ field public static final int TextAppearance_Material_Widget_ActionBar_Subtitle = 16974349; // 0x103020d
+ field public static final int TextAppearance_Material_Widget_ActionBar_Subtitle_Inverse = 16974350; // 0x103020e
+ field public static final int TextAppearance_Material_Widget_ActionBar_Title = 16974351; // 0x103020f
+ field public static final int TextAppearance_Material_Widget_ActionBar_Title_Inverse = 16974352; // 0x1030210
+ field public static final int TextAppearance_Material_Widget_ActionMode_Subtitle = 16974353; // 0x1030211
+ field public static final int TextAppearance_Material_Widget_ActionMode_Subtitle_Inverse = 16974354; // 0x1030212
+ field public static final int TextAppearance_Material_Widget_ActionMode_Title = 16974355; // 0x1030213
+ field public static final int TextAppearance_Material_Widget_ActionMode_Title_Inverse = 16974356; // 0x1030214
+ field public static final int TextAppearance_Material_Widget_Button = 16974357; // 0x1030215
+ field public static final int TextAppearance_Material_Widget_DropDownHint = 16974358; // 0x1030216
+ field public static final int TextAppearance_Material_Widget_DropDownItem = 16974359; // 0x1030217
+ field public static final int TextAppearance_Material_Widget_EditText = 16974360; // 0x1030218
+ field public static final int TextAppearance_Material_Widget_IconMenu_Item = 16974361; // 0x1030219
+ field public static final int TextAppearance_Material_Widget_PopupMenu = 16974362; // 0x103021a
+ field public static final int TextAppearance_Material_Widget_PopupMenu_Large = 16974363; // 0x103021b
+ field public static final int TextAppearance_Material_Widget_PopupMenu_Small = 16974364; // 0x103021c
+ field public static final int TextAppearance_Material_Widget_TabWidget = 16974365; // 0x103021d
+ field public static final int TextAppearance_Material_Widget_TextView = 16974366; // 0x103021e
+ field public static final int TextAppearance_Material_Widget_TextView_PopupMenu = 16974367; // 0x103021f
+ field public static final int TextAppearance_Material_Widget_TextView_SpinnerItem = 16974368; // 0x1030220
+ field public static final int TextAppearance_Material_Widget_Toolbar_Subtitle = 16974369; // 0x1030221
+ field public static final int TextAppearance_Material_Widget_Toolbar_Title = 16974370; // 0x1030222
+ field public static final int TextAppearance_Material_WindowTitle = 16974346; // 0x103020a
field public static final int TextAppearance_Medium = 16973892; // 0x1030044
field public static final int TextAppearance_Medium_Inverse = 16973893; // 0x1030045
field public static final int TextAppearance_Small = 16973894; // 0x1030046
@@ -2101,12 +1991,12 @@ package android {
field public static final int TextAppearance_Widget_TextView_SpinnerItem = 16973906; // 0x1030052
field public static final int TextAppearance_WindowTitle = 16973907; // 0x1030053
field public static final int Theme = 16973829; // 0x1030005
- field public static final int ThemeOverlay = 16974416; // 0x1030250
- field public static final int ThemeOverlay_Material = 16974417; // 0x1030251
- field public static final int ThemeOverlay_Material_ActionBar = 16974418; // 0x1030252
- field public static final int ThemeOverlay_Material_Dark = 16974420; // 0x1030254
- field public static final int ThemeOverlay_Material_Dark_ActionBar = 16974421; // 0x1030255
- field public static final int ThemeOverlay_Material_Light = 16974419; // 0x1030253
+ field public static final int ThemeOverlay = 16974407; // 0x1030247
+ field public static final int ThemeOverlay_Material = 16974408; // 0x1030248
+ field public static final int ThemeOverlay_Material_ActionBar = 16974409; // 0x1030249
+ field public static final int ThemeOverlay_Material_Dark = 16974411; // 0x103024b
+ field public static final int ThemeOverlay_Material_Dark_ActionBar = 16974412; // 0x103024c
+ field public static final int ThemeOverlay_Material_Light = 16974410; // 0x103024a
field public static final int Theme_Black = 16973832; // 0x1030008
field public static final int Theme_Black_NoTitleBar = 16973833; // 0x1030009
field public static final int Theme_Black_NoTitleBar_Fullscreen = 16973834; // 0x103000a
@@ -2136,7 +2026,7 @@ package android {
field public static final int Theme_DeviceDefault_NoActionBar_Overscan = 16974303; // 0x10301df
field public static final int Theme_DeviceDefault_NoActionBar_TranslucentDecor = 16974307; // 0x10301e3
field public static final int Theme_DeviceDefault_Panel = 16974138; // 0x103013a
- field public static final int Theme_DeviceDefault_Settings = 16974384; // 0x1030230
+ field public static final int Theme_DeviceDefault_Settings = 16974371; // 0x1030223
field public static final int Theme_DeviceDefault_Wallpaper = 16974140; // 0x103013c
field public static final int Theme_DeviceDefault_Wallpaper_NoTitleBar = 16974141; // 0x103013d
field public static final int Theme_Dialog = 16973835; // 0x103000b
@@ -2174,41 +2064,41 @@ package android {
field public static final int Theme_Light_NoTitleBar_Fullscreen = 16973838; // 0x103000e
field public static final int Theme_Light_Panel = 16973914; // 0x103005a
field public static final int Theme_Light_WallpaperSettings = 16973922; // 0x1030062
- field public static final int Theme_Material = 16974385; // 0x1030231
- field public static final int Theme_Material_Dialog = 16974386; // 0x1030232
- field public static final int Theme_Material_DialogWhenLarge = 16974390; // 0x1030236
- field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974391; // 0x1030237
- field public static final int Theme_Material_Dialog_Alert = 16974570; // 0x10302ea
- field public static final int Theme_Material_Dialog_MinWidth = 16974387; // 0x1030233
- field public static final int Theme_Material_Dialog_NoActionBar = 16974388; // 0x1030234
- field public static final int Theme_Material_Dialog_NoActionBar_MinWidth = 16974389; // 0x1030235
- field public static final int Theme_Material_Dialog_Presentation = 16974571; // 0x10302eb
- field public static final int Theme_Material_InputMethod = 16974392; // 0x1030238
- field public static final int Theme_Material_Light = 16974402; // 0x1030242
- field public static final int Theme_Material_Light_DarkActionBar = 16974403; // 0x1030243
- field public static final int Theme_Material_Light_Dialog = 16974404; // 0x1030244
- field public static final int Theme_Material_Light_DialogWhenLarge = 16974408; // 0x1030248
- field public static final int Theme_Material_Light_DialogWhenLarge_NoActionBar = 16974409; // 0x1030249
- field public static final int Theme_Material_Light_Dialog_Alert = 16974572; // 0x10302ec
- field public static final int Theme_Material_Light_Dialog_MinWidth = 16974405; // 0x1030245
- field public static final int Theme_Material_Light_Dialog_NoActionBar = 16974406; // 0x1030246
- field public static final int Theme_Material_Light_Dialog_NoActionBar_MinWidth = 16974407; // 0x1030247
- field public static final int Theme_Material_Light_Dialog_Presentation = 16974573; // 0x10302ed
- field public static final int Theme_Material_Light_NoActionBar = 16974410; // 0x103024a
- field public static final int Theme_Material_Light_NoActionBar_Fullscreen = 16974411; // 0x103024b
- field public static final int Theme_Material_Light_NoActionBar_Overscan = 16974412; // 0x103024c
- field public static final int Theme_Material_Light_NoActionBar_TranslucentDecor = 16974413; // 0x103024d
- field public static final int Theme_Material_Light_Panel = 16974414; // 0x103024e
- field public static final int Theme_Material_Light_Voice = 16974415; // 0x103024f
- field public static final int Theme_Material_NoActionBar = 16974393; // 0x1030239
- field public static final int Theme_Material_NoActionBar_Fullscreen = 16974394; // 0x103023a
- field public static final int Theme_Material_NoActionBar_Overscan = 16974395; // 0x103023b
- field public static final int Theme_Material_NoActionBar_TranslucentDecor = 16974396; // 0x103023c
- field public static final int Theme_Material_Panel = 16974397; // 0x103023d
- field public static final int Theme_Material_Settings = 16974398; // 0x103023e
- field public static final int Theme_Material_Voice = 16974399; // 0x103023f
- field public static final int Theme_Material_Wallpaper = 16974400; // 0x1030240
- field public static final int Theme_Material_Wallpaper_NoTitleBar = 16974401; // 0x1030241
+ field public static final int Theme_Material = 16974372; // 0x1030224
+ field public static final int Theme_Material_Dialog = 16974373; // 0x1030225
+ field public static final int Theme_Material_DialogWhenLarge = 16974379; // 0x103022b
+ field public static final int Theme_Material_DialogWhenLarge_NoActionBar = 16974380; // 0x103022c
+ field public static final int Theme_Material_Dialog_Alert = 16974374; // 0x1030226
+ field public static final int Theme_Material_Dialog_MinWidth = 16974375; // 0x1030227
+ field public static final int Theme_Material_Dialog_NoActionBar = 16974376; // 0x1030228
+ field public static final int Theme_Material_Dialog_NoActionBar_MinWidth = 16974377; // 0x1030229
+ field public static final int Theme_Material_Dialog_Presentation = 16974378; // 0x103022a
+ field public static final int Theme_Material_InputMethod = 16974381; // 0x103022d
+ field public static final int Theme_Material_Light = 16974391; // 0x1030237
+ field public static final int Theme_Material_Light_DarkActionBar = 16974392; // 0x1030238
+ field public static final int Theme_Material_Light_Dialog = 16974393; // 0x1030239
+ field public static final int Theme_Material_Light_DialogWhenLarge = 16974399; // 0x103023f
+ field public static final int Theme_Material_Light_DialogWhenLarge_NoActionBar = 16974400; // 0x1030240
+ field public static final int Theme_Material_Light_Dialog_Alert = 16974394; // 0x103023a
+ field public static final int Theme_Material_Light_Dialog_MinWidth = 16974395; // 0x103023b
+ field public static final int Theme_Material_Light_Dialog_NoActionBar = 16974396; // 0x103023c
+ field public static final int Theme_Material_Light_Dialog_NoActionBar_MinWidth = 16974397; // 0x103023d
+ field public static final int Theme_Material_Light_Dialog_Presentation = 16974398; // 0x103023e
+ field public static final int Theme_Material_Light_NoActionBar = 16974401; // 0x1030241
+ field public static final int Theme_Material_Light_NoActionBar_Fullscreen = 16974402; // 0x1030242
+ field public static final int Theme_Material_Light_NoActionBar_Overscan = 16974403; // 0x1030243
+ field public static final int Theme_Material_Light_NoActionBar_TranslucentDecor = 16974404; // 0x1030244
+ field public static final int Theme_Material_Light_Panel = 16974405; // 0x1030245
+ field public static final int Theme_Material_Light_Voice = 16974406; // 0x1030246
+ field public static final int Theme_Material_NoActionBar = 16974382; // 0x103022e
+ field public static final int Theme_Material_NoActionBar_Fullscreen = 16974383; // 0x103022f
+ field public static final int Theme_Material_NoActionBar_Overscan = 16974384; // 0x1030230
+ field public static final int Theme_Material_NoActionBar_TranslucentDecor = 16974385; // 0x1030231
+ field public static final int Theme_Material_Panel = 16974386; // 0x1030232
+ field public static final int Theme_Material_Settings = 16974387; // 0x1030233
+ field public static final int Theme_Material_Voice = 16974388; // 0x1030234
+ field public static final int Theme_Material_Wallpaper = 16974389; // 0x1030235
+ field public static final int Theme_Material_Wallpaper_NoTitleBar = 16974390; // 0x1030236
field public static final int Theme_NoDisplay = 16973909; // 0x1030055
field public static final int Theme_NoTitleBar = 16973830; // 0x1030006
field public static final int Theme_NoTitleBar_Fullscreen = 16973831; // 0x1030007
@@ -2270,7 +2160,7 @@ package android {
field public static final int Widget_DeviceDefault_DropDownItem_Spinner = 16974178; // 0x1030162
field public static final int Widget_DeviceDefault_EditText = 16974154; // 0x103014a
field public static final int Widget_DeviceDefault_ExpandableListView = 16974155; // 0x103014b
- field public static final int Widget_DeviceDefault_FastScroll = 16974346; // 0x103020a
+ field public static final int Widget_DeviceDefault_FastScroll = 16974313; // 0x10301e9
field public static final int Widget_DeviceDefault_GridView = 16974156; // 0x103014c
field public static final int Widget_DeviceDefault_HorizontalScrollView = 16974171; // 0x103015b
field public static final int Widget_DeviceDefault_ImageButton = 16974157; // 0x103014d
@@ -2304,7 +2194,7 @@ package android {
field public static final int Widget_DeviceDefault_Light_DropDownItem_Spinner = 16974233; // 0x1030199
field public static final int Widget_DeviceDefault_Light_EditText = 16974206; // 0x103017e
field public static final int Widget_DeviceDefault_Light_ExpandableListView = 16974207; // 0x103017f
- field public static final int Widget_DeviceDefault_Light_FastScroll = 16974348; // 0x103020c
+ field public static final int Widget_DeviceDefault_Light_FastScroll = 16974315; // 0x10301eb
field public static final int Widget_DeviceDefault_Light_GridView = 16974208; // 0x1030180
field public static final int Widget_DeviceDefault_Light_HorizontalScrollView = 16974226; // 0x1030192
field public static final int Widget_DeviceDefault_Light_ImageButton = 16974209; // 0x1030181
@@ -2328,7 +2218,7 @@ package android {
field public static final int Widget_DeviceDefault_Light_ScrollView = 16974225; // 0x1030191
field public static final int Widget_DeviceDefault_Light_SeekBar = 16974220; // 0x103018c
field public static final int Widget_DeviceDefault_Light_Spinner = 16974227; // 0x1030193
- field public static final int Widget_DeviceDefault_Light_StackView = 16974349; // 0x103020d
+ field public static final int Widget_DeviceDefault_Light_StackView = 16974316; // 0x10301ec
field public static final int Widget_DeviceDefault_Light_Tab = 16974237; // 0x103019d
field public static final int Widget_DeviceDefault_Light_TabWidget = 16974229; // 0x1030195
field public static final int Widget_DeviceDefault_Light_TextView = 16974202; // 0x103017a
@@ -2352,7 +2242,7 @@ package android {
field public static final int Widget_DeviceDefault_ScrollView = 16974170; // 0x103015a
field public static final int Widget_DeviceDefault_SeekBar = 16974165; // 0x1030155
field public static final int Widget_DeviceDefault_Spinner = 16974172; // 0x103015c
- field public static final int Widget_DeviceDefault_StackView = 16974347; // 0x103020b
+ field public static final int Widget_DeviceDefault_StackView = 16974314; // 0x10301ea
field public static final int Widget_DeviceDefault_Tab = 16974189; // 0x103016d
field public static final int Widget_DeviceDefault_TabWidget = 16974174; // 0x103015e
field public static final int Widget_DeviceDefault_TextView = 16974150; // 0x1030146
@@ -2363,7 +2253,7 @@ package android {
field public static final int Widget_DropDownItem_Spinner = 16973868; // 0x103002c
field public static final int Widget_EditText = 16973859; // 0x1030023
field public static final int Widget_ExpandableListView = 16973860; // 0x1030024
- field public static final int Widget_FastScroll = 16974337; // 0x1030201
+ field public static final int Widget_FastScroll = 16974309; // 0x10301e5
field public static final int Widget_FragmentBreadCrumbs = 16973961; // 0x1030089
field public static final int Widget_Gallery = 16973877; // 0x1030035
field public static final int Widget_GridView = 16973874; // 0x1030032
@@ -2395,7 +2285,6 @@ package android {
field public static final int Widget_Holo_DropDownItem_Spinner = 16973995; // 0x10300ab
field public static final int Widget_Holo_EditText = 16973971; // 0x1030093
field public static final int Widget_Holo_ExpandableListView = 16973972; // 0x1030094
- field public static final int Widget_Holo_FastScroll = 16974341; // 0x1030205
field public static final int Widget_Holo_GridView = 16973973; // 0x1030095
field public static final int Widget_Holo_HorizontalScrollView = 16973988; // 0x10300a4
field public static final int Widget_Holo_ImageButton = 16973974; // 0x1030096
@@ -2416,7 +2305,6 @@ package android {
field public static final int Widget_Holo_Light_ActionMode_Inverse = 16974119; // 0x1030127
field public static final int Widget_Holo_Light_AutoCompleteTextView = 16974011; // 0x10300bb
field public static final int Widget_Holo_Light_Button = 16974006; // 0x10300b6
- field public static final int Widget_Holo_Light_Button_Borderless = 16974343; // 0x1030207
field public static final int Widget_Holo_Light_Button_Borderless_Small = 16974107; // 0x103011b
field public static final int Widget_Holo_Light_Button_Inset = 16974008; // 0x10300b8
field public static final int Widget_Holo_Light_Button_Small = 16974007; // 0x10300b7
@@ -2430,7 +2318,6 @@ package android {
field public static final int Widget_Holo_Light_DropDownItem_Spinner = 16974041; // 0x10300d9
field public static final int Widget_Holo_Light_EditText = 16974014; // 0x10300be
field public static final int Widget_Holo_Light_ExpandableListView = 16974015; // 0x10300bf
- field public static final int Widget_Holo_Light_FastScroll = 16974344; // 0x1030208
field public static final int Widget_Holo_Light_GridView = 16974016; // 0x10300c0
field public static final int Widget_Holo_Light_HorizontalScrollView = 16974034; // 0x10300d2
field public static final int Widget_Holo_Light_ImageButton = 16974017; // 0x10300c1
@@ -2454,7 +2341,6 @@ package android {
field public static final int Widget_Holo_Light_ScrollView = 16974033; // 0x10300d1
field public static final int Widget_Holo_Light_SeekBar = 16974028; // 0x10300cc
field public static final int Widget_Holo_Light_Spinner = 16974035; // 0x10300d3
- field public static final int Widget_Holo_Light_StackView = 16974345; // 0x1030209
field public static final int Widget_Holo_Light_Tab = 16974052; // 0x10300e4
field public static final int Widget_Holo_Light_TabWidget = 16974037; // 0x10300d5
field public static final int Widget_Holo_Light_TextView = 16974010; // 0x10300ba
@@ -2478,7 +2364,6 @@ package android {
field public static final int Widget_Holo_ScrollView = 16973987; // 0x10300a3
field public static final int Widget_Holo_SeekBar = 16973982; // 0x103009e
field public static final int Widget_Holo_Spinner = 16973989; // 0x10300a5
- field public static final int Widget_Holo_StackView = 16974342; // 0x1030206
field public static final int Widget_Holo_Tab = 16974051; // 0x10300e3
field public static final int Widget_Holo_TabWidget = 16973991; // 0x10300a7
field public static final int Widget_Holo_TextView = 16973967; // 0x103008f
@@ -2493,132 +2378,137 @@ package android {
field public static final int Widget_ListView_DropDown = 16973872; // 0x1030030
field public static final int Widget_ListView_Menu = 16973873; // 0x1030031
field public static final int Widget_ListView_White = 16973871; // 0x103002f
- field public static final int Widget_Material = 16974422; // 0x1030256
- field public static final int Widget_Material_ActionBar = 16974423; // 0x1030257
- field public static final int Widget_Material_ActionBar_Solid = 16974424; // 0x1030258
- field public static final int Widget_Material_ActionBar_TabBar = 16974425; // 0x1030259
- field public static final int Widget_Material_ActionBar_TabText = 16974426; // 0x103025a
- field public static final int Widget_Material_ActionBar_TabView = 16974427; // 0x103025b
- field public static final int Widget_Material_ActionButton = 16974428; // 0x103025c
- field public static final int Widget_Material_ActionButton_CloseMode = 16974429; // 0x103025d
- field public static final int Widget_Material_ActionButton_Overflow = 16974430; // 0x103025e
- field public static final int Widget_Material_ActionMode = 16974431; // 0x103025f
- field public static final int Widget_Material_AutoCompleteTextView = 16974432; // 0x1030260
- field public static final int Widget_Material_Button = 16974433; // 0x1030261
- field public static final int Widget_Material_ButtonBar = 16974439; // 0x1030267
- field public static final int Widget_Material_ButtonBar_AlertDialog = 16974440; // 0x1030268
- field public static final int Widget_Material_Button_Borderless = 16974434; // 0x1030262
- field public static final int Widget_Material_Button_Borderless_Colored = 16974556; // 0x10302dc
- field public static final int Widget_Material_Button_Borderless_Small = 16974435; // 0x1030263
- field public static final int Widget_Material_Button_Inset = 16974436; // 0x1030264
- field public static final int Widget_Material_Button_Small = 16974437; // 0x1030265
- field public static final int Widget_Material_Button_Toggle = 16974438; // 0x1030266
- field public static final int Widget_Material_CalendarView = 16974441; // 0x1030269
- field public static final int Widget_Material_CheckedTextView = 16974442; // 0x103026a
- field public static final int Widget_Material_CompoundButton_CheckBox = 16974443; // 0x103026b
- field public static final int Widget_Material_CompoundButton_RadioButton = 16974444; // 0x103026c
- field public static final int Widget_Material_CompoundButton_Star = 16974445; // 0x103026d
- field public static final int Widget_Material_DatePicker = 16974446; // 0x103026e
- field public static final int Widget_Material_DropDownItem = 16974447; // 0x103026f
- field public static final int Widget_Material_DropDownItem_Spinner = 16974448; // 0x1030270
- field public static final int Widget_Material_EditText = 16974449; // 0x1030271
- field public static final int Widget_Material_ExpandableListView = 16974450; // 0x1030272
- field public static final int Widget_Material_FastScroll = 16974451; // 0x1030273
- field public static final int Widget_Material_GridView = 16974452; // 0x1030274
- field public static final int Widget_Material_HorizontalScrollView = 16974453; // 0x1030275
- field public static final int Widget_Material_ImageButton = 16974454; // 0x1030276
- field public static final int Widget_Material_Light = 16974483; // 0x1030293
- field public static final int Widget_Material_Light_ActionBar = 16974484; // 0x1030294
- field public static final int Widget_Material_Light_ActionBar_Solid = 16974485; // 0x1030295
- field public static final int Widget_Material_Light_ActionBar_TabBar = 16974486; // 0x1030296
- field public static final int Widget_Material_Light_ActionBar_TabText = 16974487; // 0x1030297
- field public static final int Widget_Material_Light_ActionBar_TabView = 16974488; // 0x1030298
- field public static final int Widget_Material_Light_ActionButton = 16974489; // 0x1030299
- field public static final int Widget_Material_Light_ActionButton_CloseMode = 16974490; // 0x103029a
- field public static final int Widget_Material_Light_ActionButton_Overflow = 16974491; // 0x103029b
- field public static final int Widget_Material_Light_ActionMode = 16974492; // 0x103029c
- field public static final int Widget_Material_Light_AutoCompleteTextView = 16974493; // 0x103029d
- field public static final int Widget_Material_Light_Button = 16974494; // 0x103029e
- field public static final int Widget_Material_Light_ButtonBar = 16974500; // 0x10302a4
- field public static final int Widget_Material_Light_ButtonBar_AlertDialog = 16974501; // 0x10302a5
- field public static final int Widget_Material_Light_Button_Borderless = 16974495; // 0x103029f
- field public static final int Widget_Material_Light_Button_Borderless_Colored = 16974557; // 0x10302dd
- field public static final int Widget_Material_Light_Button_Borderless_Small = 16974496; // 0x10302a0
- field public static final int Widget_Material_Light_Button_Inset = 16974497; // 0x10302a1
- field public static final int Widget_Material_Light_Button_Small = 16974498; // 0x10302a2
- field public static final int Widget_Material_Light_Button_Toggle = 16974499; // 0x10302a3
- field public static final int Widget_Material_Light_CalendarView = 16974502; // 0x10302a6
- field public static final int Widget_Material_Light_CheckedTextView = 16974503; // 0x10302a7
- field public static final int Widget_Material_Light_CompoundButton_CheckBox = 16974504; // 0x10302a8
- field public static final int Widget_Material_Light_CompoundButton_RadioButton = 16974505; // 0x10302a9
- field public static final int Widget_Material_Light_CompoundButton_Star = 16974506; // 0x10302aa
- field public static final int Widget_Material_Light_DropDownItem = 16974507; // 0x10302ab
- field public static final int Widget_Material_Light_DropDownItem_Spinner = 16974508; // 0x10302ac
- field public static final int Widget_Material_Light_EditText = 16974509; // 0x10302ad
- field public static final int Widget_Material_Light_ExpandableListView = 16974510; // 0x10302ae
- field public static final int Widget_Material_Light_FastScroll = 16974511; // 0x10302af
- field public static final int Widget_Material_Light_GridView = 16974512; // 0x10302b0
- field public static final int Widget_Material_Light_HorizontalScrollView = 16974513; // 0x10302b1
- field public static final int Widget_Material_Light_ImageButton = 16974514; // 0x10302b2
- field public static final int Widget_Material_Light_ListPopupWindow = 16974515; // 0x10302b3
- field public static final int Widget_Material_Light_ListView = 16974516; // 0x10302b4
- field public static final int Widget_Material_Light_ListView_DropDown = 16974517; // 0x10302b5
- field public static final int Widget_Material_Light_MediaRouteButton = 16974518; // 0x10302b6
- field public static final int Widget_Material_Light_PopupMenu = 16974519; // 0x10302b7
- field public static final int Widget_Material_Light_PopupMenu_Overflow = 16974520; // 0x10302b8
- field public static final int Widget_Material_Light_PopupWindow = 16974521; // 0x10302b9
- field public static final int Widget_Material_Light_ProgressBar = 16974522; // 0x10302ba
- field public static final int Widget_Material_Light_ProgressBar_Horizontal = 16974523; // 0x10302bb
- field public static final int Widget_Material_Light_ProgressBar_Inverse = 16974524; // 0x10302bc
- field public static final int Widget_Material_Light_ProgressBar_Large = 16974525; // 0x10302bd
- field public static final int Widget_Material_Light_ProgressBar_Large_Inverse = 16974526; // 0x10302be
- field public static final int Widget_Material_Light_ProgressBar_Small = 16974527; // 0x10302bf
- field public static final int Widget_Material_Light_ProgressBar_Small_Inverse = 16974528; // 0x10302c0
- field public static final int Widget_Material_Light_ProgressBar_Small_Title = 16974529; // 0x10302c1
- field public static final int Widget_Material_Light_RatingBar = 16974530; // 0x10302c2
- field public static final int Widget_Material_Light_RatingBar_Indicator = 16974531; // 0x10302c3
- field public static final int Widget_Material_Light_RatingBar_Small = 16974532; // 0x10302c4
- field public static final int Widget_Material_Light_ScrollView = 16974533; // 0x10302c5
- field public static final int Widget_Material_Light_SeekBar = 16974534; // 0x10302c6
- field public static final int Widget_Material_Light_SegmentedButton = 16974535; // 0x10302c7
- field public static final int Widget_Material_Light_Spinner = 16974537; // 0x10302c9
- field public static final int Widget_Material_Light_Spinner_Underlined = 16974567; // 0x10302e7
- field public static final int Widget_Material_Light_StackView = 16974536; // 0x10302c8
- field public static final int Widget_Material_Light_Tab = 16974538; // 0x10302ca
- field public static final int Widget_Material_Light_TabWidget = 16974539; // 0x10302cb
- field public static final int Widget_Material_Light_TextView = 16974540; // 0x10302cc
- field public static final int Widget_Material_Light_TextView_SpinnerItem = 16974541; // 0x10302cd
+ field public static final int Widget_Material = 16974413; // 0x103024d
+ field public static final int Widget_Material_ActionBar = 16974414; // 0x103024e
+ field public static final int Widget_Material_ActionBar_Solid = 16974415; // 0x103024f
+ field public static final int Widget_Material_ActionBar_TabBar = 16974416; // 0x1030250
+ field public static final int Widget_Material_ActionBar_TabText = 16974417; // 0x1030251
+ field public static final int Widget_Material_ActionBar_TabView = 16974418; // 0x1030252
+ field public static final int Widget_Material_ActionButton = 16974419; // 0x1030253
+ field public static final int Widget_Material_ActionButton_CloseMode = 16974420; // 0x1030254
+ field public static final int Widget_Material_ActionButton_Overflow = 16974421; // 0x1030255
+ field public static final int Widget_Material_ActionMode = 16974422; // 0x1030256
+ field public static final int Widget_Material_AutoCompleteTextView = 16974423; // 0x1030257
+ field public static final int Widget_Material_Button = 16974424; // 0x1030258
+ field public static final int Widget_Material_ButtonBar = 16974431; // 0x103025f
+ field public static final int Widget_Material_ButtonBar_AlertDialog = 16974432; // 0x1030260
+ field public static final int Widget_Material_Button_Borderless = 16974425; // 0x1030259
+ field public static final int Widget_Material_Button_Borderless_Colored = 16974426; // 0x103025a
+ field public static final int Widget_Material_Button_Borderless_Small = 16974427; // 0x103025b
+ field public static final int Widget_Material_Button_Inset = 16974428; // 0x103025c
+ field public static final int Widget_Material_Button_Small = 16974429; // 0x103025d
+ field public static final int Widget_Material_Button_Toggle = 16974430; // 0x103025e
+ field public static final int Widget_Material_CalendarView = 16974433; // 0x1030261
+ field public static final int Widget_Material_CheckedTextView = 16974434; // 0x1030262
+ field public static final int Widget_Material_CompoundButton_CheckBox = 16974435; // 0x1030263
+ field public static final int Widget_Material_CompoundButton_RadioButton = 16974436; // 0x1030264
+ field public static final int Widget_Material_CompoundButton_Star = 16974437; // 0x1030265
+ field public static final int Widget_Material_DatePicker = 16974438; // 0x1030266
+ field public static final int Widget_Material_DropDownItem = 16974439; // 0x1030267
+ field public static final int Widget_Material_DropDownItem_Spinner = 16974440; // 0x1030268
+ field public static final int Widget_Material_EditText = 16974441; // 0x1030269
+ field public static final int Widget_Material_ExpandableListView = 16974442; // 0x103026a
+ field public static final int Widget_Material_FastScroll = 16974443; // 0x103026b
+ field public static final int Widget_Material_GridView = 16974444; // 0x103026c
+ field public static final int Widget_Material_HorizontalScrollView = 16974445; // 0x103026d
+ field public static final int Widget_Material_ImageButton = 16974446; // 0x103026e
+ field public static final int Widget_Material_Light = 16974478; // 0x103028e
+ field public static final int Widget_Material_Light_ActionBar = 16974479; // 0x103028f
+ field public static final int Widget_Material_Light_ActionBar_Solid = 16974480; // 0x1030290
+ field public static final int Widget_Material_Light_ActionBar_TabBar = 16974481; // 0x1030291
+ field public static final int Widget_Material_Light_ActionBar_TabText = 16974482; // 0x1030292
+ field public static final int Widget_Material_Light_ActionBar_TabView = 16974483; // 0x1030293
+ field public static final int Widget_Material_Light_ActionButton = 16974484; // 0x1030294
+ field public static final int Widget_Material_Light_ActionButton_CloseMode = 16974485; // 0x1030295
+ field public static final int Widget_Material_Light_ActionButton_Overflow = 16974486; // 0x1030296
+ field public static final int Widget_Material_Light_ActionMode = 16974487; // 0x1030297
+ field public static final int Widget_Material_Light_AutoCompleteTextView = 16974488; // 0x1030298
+ field public static final int Widget_Material_Light_Button = 16974489; // 0x1030299
+ field public static final int Widget_Material_Light_ButtonBar = 16974496; // 0x10302a0
+ field public static final int Widget_Material_Light_ButtonBar_AlertDialog = 16974497; // 0x10302a1
+ field public static final int Widget_Material_Light_Button_Borderless = 16974490; // 0x103029a
+ field public static final int Widget_Material_Light_Button_Borderless_Colored = 16974491; // 0x103029b
+ field public static final int Widget_Material_Light_Button_Borderless_Small = 16974492; // 0x103029c
+ field public static final int Widget_Material_Light_Button_Inset = 16974493; // 0x103029d
+ field public static final int Widget_Material_Light_Button_Small = 16974494; // 0x103029e
+ field public static final int Widget_Material_Light_Button_Toggle = 16974495; // 0x103029f
+ field public static final int Widget_Material_Light_CalendarView = 16974498; // 0x10302a2
+ field public static final int Widget_Material_Light_CheckedTextView = 16974499; // 0x10302a3
+ field public static final int Widget_Material_Light_CompoundButton_CheckBox = 16974500; // 0x10302a4
+ field public static final int Widget_Material_Light_CompoundButton_RadioButton = 16974501; // 0x10302a5
+ field public static final int Widget_Material_Light_CompoundButton_Star = 16974502; // 0x10302a6
+ field public static final int Widget_Material_Light_DatePicker = 16974503; // 0x10302a7
+ field public static final int Widget_Material_Light_DropDownItem = 16974504; // 0x10302a8
+ field public static final int Widget_Material_Light_DropDownItem_Spinner = 16974505; // 0x10302a9
+ field public static final int Widget_Material_Light_EditText = 16974506; // 0x10302aa
+ field public static final int Widget_Material_Light_ExpandableListView = 16974507; // 0x10302ab
+ field public static final int Widget_Material_Light_FastScroll = 16974508; // 0x10302ac
+ field public static final int Widget_Material_Light_GridView = 16974509; // 0x10302ad
+ field public static final int Widget_Material_Light_HorizontalScrollView = 16974510; // 0x10302ae
+ field public static final int Widget_Material_Light_ImageButton = 16974511; // 0x10302af
+ field public static final int Widget_Material_Light_ListPopupWindow = 16974512; // 0x10302b0
+ field public static final int Widget_Material_Light_ListView = 16974513; // 0x10302b1
+ field public static final int Widget_Material_Light_ListView_DropDown = 16974514; // 0x10302b2
+ field public static final int Widget_Material_Light_MediaRouteButton = 16974515; // 0x10302b3
+ field public static final int Widget_Material_Light_PopupMenu = 16974516; // 0x10302b4
+ field public static final int Widget_Material_Light_PopupMenu_Overflow = 16974517; // 0x10302b5
+ field public static final int Widget_Material_Light_PopupWindow = 16974518; // 0x10302b6
+ field public static final int Widget_Material_Light_ProgressBar = 16974519; // 0x10302b7
+ field public static final int Widget_Material_Light_ProgressBar_Horizontal = 16974520; // 0x10302b8
+ field public static final int Widget_Material_Light_ProgressBar_Inverse = 16974521; // 0x10302b9
+ field public static final int Widget_Material_Light_ProgressBar_Large = 16974522; // 0x10302ba
+ field public static final int Widget_Material_Light_ProgressBar_Large_Inverse = 16974523; // 0x10302bb
+ field public static final int Widget_Material_Light_ProgressBar_Small = 16974524; // 0x10302bc
+ field public static final int Widget_Material_Light_ProgressBar_Small_Inverse = 16974525; // 0x10302bd
+ field public static final int Widget_Material_Light_ProgressBar_Small_Title = 16974526; // 0x10302be
+ field public static final int Widget_Material_Light_RatingBar = 16974527; // 0x10302bf
+ field public static final int Widget_Material_Light_RatingBar_Indicator = 16974528; // 0x10302c0
+ field public static final int Widget_Material_Light_RatingBar_Small = 16974529; // 0x10302c1
+ field public static final int Widget_Material_Light_ScrollView = 16974530; // 0x10302c2
+ field public static final int Widget_Material_Light_SearchView = 16974531; // 0x10302c3
+ field public static final int Widget_Material_Light_SeekBar = 16974532; // 0x10302c4
+ field public static final int Widget_Material_Light_SegmentedButton = 16974533; // 0x10302c5
+ field public static final int Widget_Material_Light_Spinner = 16974535; // 0x10302c7
+ field public static final int Widget_Material_Light_Spinner_Underlined = 16974536; // 0x10302c8
+ field public static final int Widget_Material_Light_StackView = 16974534; // 0x10302c6
+ field public static final int Widget_Material_Light_Tab = 16974537; // 0x10302c9
+ field public static final int Widget_Material_Light_TabWidget = 16974538; // 0x10302ca
+ field public static final int Widget_Material_Light_TextView = 16974539; // 0x10302cb
+ field public static final int Widget_Material_Light_TextView_SpinnerItem = 16974540; // 0x10302cc
+ field public static final int Widget_Material_Light_TimePicker = 16974541; // 0x10302cd
field public static final int Widget_Material_Light_WebTextView = 16974542; // 0x10302ce
field public static final int Widget_Material_Light_WebView = 16974543; // 0x10302cf
- field public static final int Widget_Material_ListPopupWindow = 16974455; // 0x1030277
- field public static final int Widget_Material_ListView = 16974456; // 0x1030278
- field public static final int Widget_Material_ListView_DropDown = 16974457; // 0x1030279
- field public static final int Widget_Material_MediaRouteButton = 16974458; // 0x103027a
- field public static final int Widget_Material_PopupMenu = 16974459; // 0x103027b
- field public static final int Widget_Material_PopupMenu_Overflow = 16974460; // 0x103027c
- field public static final int Widget_Material_PopupWindow = 16974461; // 0x103027d
- field public static final int Widget_Material_ProgressBar = 16974462; // 0x103027e
- field public static final int Widget_Material_ProgressBar_Horizontal = 16974463; // 0x103027f
- field public static final int Widget_Material_ProgressBar_Large = 16974464; // 0x1030280
- field public static final int Widget_Material_ProgressBar_Small = 16974465; // 0x1030281
- field public static final int Widget_Material_ProgressBar_Small_Title = 16974466; // 0x1030282
- field public static final int Widget_Material_RatingBar = 16974467; // 0x1030283
- field public static final int Widget_Material_RatingBar_Indicator = 16974468; // 0x1030284
- field public static final int Widget_Material_RatingBar_Small = 16974469; // 0x1030285
- field public static final int Widget_Material_ScrollView = 16974470; // 0x1030286
- field public static final int Widget_Material_SeekBar = 16974471; // 0x1030287
- field public static final int Widget_Material_SegmentedButton = 16974472; // 0x1030288
- field public static final int Widget_Material_Spinner = 16974474; // 0x103028a
- field public static final int Widget_Material_Spinner_Underlined = 16974566; // 0x10302e6
- field public static final int Widget_Material_StackView = 16974473; // 0x1030289
- field public static final int Widget_Material_Tab = 16974475; // 0x103028b
- field public static final int Widget_Material_TabWidget = 16974476; // 0x103028c
- field public static final int Widget_Material_TextView = 16974477; // 0x103028d
- field public static final int Widget_Material_TextView_SpinnerItem = 16974478; // 0x103028e
- field public static final int Widget_Material_Toolbar = 16974479; // 0x103028f
- field public static final int Widget_Material_Toolbar_Button_Navigation = 16974480; // 0x1030290
- field public static final int Widget_Material_WebTextView = 16974481; // 0x1030291
- field public static final int Widget_Material_WebView = 16974482; // 0x1030292
+ field public static final int Widget_Material_ListPopupWindow = 16974447; // 0x103026f
+ field public static final int Widget_Material_ListView = 16974448; // 0x1030270
+ field public static final int Widget_Material_ListView_DropDown = 16974449; // 0x1030271
+ field public static final int Widget_Material_MediaRouteButton = 16974450; // 0x1030272
+ field public static final int Widget_Material_PopupMenu = 16974451; // 0x1030273
+ field public static final int Widget_Material_PopupMenu_Overflow = 16974452; // 0x1030274
+ field public static final int Widget_Material_PopupWindow = 16974453; // 0x1030275
+ field public static final int Widget_Material_ProgressBar = 16974454; // 0x1030276
+ field public static final int Widget_Material_ProgressBar_Horizontal = 16974455; // 0x1030277
+ field public static final int Widget_Material_ProgressBar_Large = 16974456; // 0x1030278
+ field public static final int Widget_Material_ProgressBar_Small = 16974457; // 0x1030279
+ field public static final int Widget_Material_ProgressBar_Small_Title = 16974458; // 0x103027a
+ field public static final int Widget_Material_RatingBar = 16974459; // 0x103027b
+ field public static final int Widget_Material_RatingBar_Indicator = 16974460; // 0x103027c
+ field public static final int Widget_Material_RatingBar_Small = 16974461; // 0x103027d
+ field public static final int Widget_Material_ScrollView = 16974462; // 0x103027e
+ field public static final int Widget_Material_SearchView = 16974463; // 0x103027f
+ field public static final int Widget_Material_SeekBar = 16974464; // 0x1030280
+ field public static final int Widget_Material_SegmentedButton = 16974465; // 0x1030281
+ field public static final int Widget_Material_Spinner = 16974467; // 0x1030283
+ field public static final int Widget_Material_Spinner_Underlined = 16974468; // 0x1030284
+ field public static final int Widget_Material_StackView = 16974466; // 0x1030282
+ field public static final int Widget_Material_Tab = 16974469; // 0x1030285
+ field public static final int Widget_Material_TabWidget = 16974470; // 0x1030286
+ field public static final int Widget_Material_TextView = 16974471; // 0x1030287
+ field public static final int Widget_Material_TextView_SpinnerItem = 16974472; // 0x1030288
+ field public static final int Widget_Material_TimePicker = 16974473; // 0x1030289
+ field public static final int Widget_Material_Toolbar = 16974474; // 0x103028a
+ field public static final int Widget_Material_Toolbar_Button_Navigation = 16974475; // 0x103028b
+ field public static final int Widget_Material_WebTextView = 16974476; // 0x103028c
+ field public static final int Widget_Material_WebView = 16974477; // 0x103028d
field public static final int Widget_PopupMenu = 16973958; // 0x1030086
field public static final int Widget_PopupWindow = 16973878; // 0x1030036
field public static final int Widget_ProgressBar = 16973852; // 0x103001c
@@ -2633,43 +2523,14 @@ package android {
field public static final int Widget_SeekBar = 16973856; // 0x1030020
field public static final int Widget_Spinner = 16973864; // 0x1030028
field public static final int Widget_Spinner_DropDown = 16973955; // 0x1030083
- field public static final int Widget_StackView = 16974338; // 0x1030202
+ field public static final int Widget_StackView = 16974310; // 0x10301e6
field public static final int Widget_TabWidget = 16973876; // 0x1030034
field public static final int Widget_TextView = 16973858; // 0x1030022
field public static final int Widget_TextView_PopupMenu = 16973865; // 0x1030029
field public static final int Widget_TextView_SpinnerItem = 16973866; // 0x103002a
- field public static final int Widget_Toolbar = 16974339; // 0x1030203
- field public static final int Widget_Toolbar_Button_Navigation = 16974340; // 0x1030204
+ field public static final int Widget_Toolbar = 16974311; // 0x10301e7
+ field public static final int Widget_Toolbar_Button_Navigation = 16974312; // 0x10301e8
field public static final int Widget_WebView = 16973875; // 0x1030033
- field public static final int __removed = 16974559; // 0x10302df
- field public static final int l_resource_pad1 = 16974336; // 0x1030200
- field public static final int l_resource_pad10 = 16974327; // 0x10301f7
- field public static final int l_resource_pad11 = 16974326; // 0x10301f6
- field public static final int l_resource_pad12 = 16974325; // 0x10301f5
- field public static final int l_resource_pad13 = 16974324; // 0x10301f4
- field public static final int l_resource_pad14 = 16974323; // 0x10301f3
- field public static final int l_resource_pad15 = 16974322; // 0x10301f2
- field public static final int l_resource_pad16 = 16974321; // 0x10301f1
- field public static final int l_resource_pad17 = 16974320; // 0x10301f0
- field public static final int l_resource_pad18 = 16974319; // 0x10301ef
- field public static final int l_resource_pad19 = 16974318; // 0x10301ee
- field public static final int l_resource_pad2 = 16974335; // 0x10301ff
- field public static final int l_resource_pad20 = 16974317; // 0x10301ed
- field public static final int l_resource_pad21 = 16974316; // 0x10301ec
- field public static final int l_resource_pad22 = 16974315; // 0x10301eb
- field public static final int l_resource_pad23 = 16974314; // 0x10301ea
- field public static final int l_resource_pad24 = 16974313; // 0x10301e9
- field public static final int l_resource_pad25 = 16974312; // 0x10301e8
- field public static final int l_resource_pad26 = 16974311; // 0x10301e7
- field public static final int l_resource_pad27 = 16974310; // 0x10301e6
- field public static final int l_resource_pad28 = 16974309; // 0x10301e5
- field public static final int l_resource_pad3 = 16974334; // 0x10301fe
- field public static final int l_resource_pad4 = 16974333; // 0x10301fd
- field public static final int l_resource_pad5 = 16974332; // 0x10301fc
- field public static final int l_resource_pad6 = 16974331; // 0x10301fb
- field public static final int l_resource_pad7 = 16974330; // 0x10301fa
- field public static final int l_resource_pad8 = 16974329; // 0x10301f9
- field public static final int l_resource_pad9 = 16974328; // 0x10301f8
}
public static final class R.transition {
@@ -4320,9 +4181,9 @@ package android.app {
method public void setAllowEnterTransitionOverlap(boolean);
method public void setAllowReturnTransitionOverlap(boolean);
method public void setArguments(android.os.Bundle);
- method public void setEnterSharedElementTransitionCallback(android.app.SharedElementCallback);
+ method public void setEnterSharedElementCallback(android.app.SharedElementCallback);
method public void setEnterTransition(android.transition.Transition);
- method public void setExitSharedElementTransitionCallback(android.app.SharedElementCallback);
+ method public void setExitSharedElementCallback(android.app.SharedElementCallback);
method public void setExitTransition(android.transition.Transition);
method public void setHasOptionsMenu(boolean);
method public void setInitialSavedState(android.app.Fragment.SavedState);
@@ -5398,7 +5259,7 @@ package android.app.admin {
field public static final java.lang.String ACTION_PASSWORD_EXPIRING = "android.app.action.ACTION_PASSWORD_EXPIRING";
field public static final java.lang.String ACTION_PASSWORD_FAILED = "android.app.action.ACTION_PASSWORD_FAILED";
field public static final java.lang.String ACTION_PASSWORD_SUCCEEDED = "android.app.action.ACTION_PASSWORD_SUCCEEDED";
- field public static final java.lang.String ACTION_PROFILE_PROVISIONING_COMPLETE = "android.app.action.ACTION_PROFILE_PROVISIONING_COMPLETE";
+ field public static final java.lang.String ACTION_PROFILE_PROVISIONING_COMPLETE = "android.app.action.PROFILE_PROVISIONING_COMPLETE";
field public static final java.lang.String DEVICE_ADMIN_META_DATA = "android.app.device_admin";
field public static final java.lang.String EXTRA_DISABLE_WARNING = "android.app.extra.DISABLE_WARNING";
field public static final java.lang.String EXTRA_LOCK_TASK_PACKAGE = "android.app.extra.LOCK_TASK_PACKAGE";
@@ -5449,6 +5310,7 @@ package android.app.admin {
method public boolean hasCaCertInstalled(android.content.ComponentName, byte[]);
method public boolean hasGrantedPolicy(android.content.ComponentName, int);
method public boolean installCaCert(android.content.ComponentName, byte[]);
+ method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String);
method public boolean isActivePasswordSufficient();
method public boolean isAdminActive(android.content.ComponentName);
method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String);
@@ -5513,6 +5375,7 @@ package android.app.admin {
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME";
+ field public static final java.lang.String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.PROVISIONING_EMAIL_ADDRESS";
field public static final java.lang.String EXTRA_PROVISIONING_LOCALE = "android.app.extra.PROVISIONING_LOCALE";
field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.PROVISIONING_LOCAL_TIME";
field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.PROVISIONING_TIME_ZONE";
@@ -5534,7 +5397,6 @@ package android.app.admin {
field public static final int KEYGUARD_DISABLE_TRUST_AGENTS = 16; // 0x10
field public static final int KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS = 8; // 0x8
field public static final int KEYGUARD_DISABLE_WIDGETS_ALL = 1; // 0x1
- field public static final java.lang.String KEY_PROVISIONING_EMAIL_ADDRESS = "android.app.key.PROVISIONING_EMAIL_ADDRESS";
field public static final java.lang.String MIME_TYPE_PROVISIONING_NFC = "application/com.android.managedprovisioning";
field public static final int PASSWORD_QUALITY_ALPHABETIC = 262144; // 0x40000
field public static final int PASSWORD_QUALITY_ALPHANUMERIC = 327680; // 0x50000
@@ -5679,6 +5541,7 @@ package android.app.job {
method public int describeContents();
method public android.os.PersistableBundle getExtras();
method public int getJobId();
+ method public boolean isOverrideDeadlineExpired();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
}
@@ -6384,7 +6247,6 @@ package android.bluetooth {
method public void onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic);
method public void onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
method public void onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
- method public void onConnectionCongested(android.bluetooth.BluetoothGatt, boolean);
method public void onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int);
method public void onDescriptorRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
method public void onDescriptorWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
@@ -6484,7 +6346,6 @@ package android.bluetooth {
ctor public BluetoothGattServerCallback();
method public void onCharacteristicReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattCharacteristic);
method public void onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[]);
- method public void onConnectionCongested(android.bluetooth.BluetoothDevice, boolean);
method public void onConnectionStateChange(android.bluetooth.BluetoothDevice, int, int);
method public void onDescriptorReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattDescriptor);
method public void onDescriptorWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattDescriptor, boolean, boolean, int, byte[]);
@@ -7378,7 +7239,7 @@ package android.content {
field public static final java.lang.String SEARCH_SERVICE = "search";
field public static final java.lang.String SENSOR_SERVICE = "sensor";
field public static final java.lang.String STORAGE_SERVICE = "storage";
- field public static final java.lang.String TELECOMM_SERVICE = "telecomm";
+ field public static final java.lang.String TELECOM_SERVICE = "telecom";
field public static final java.lang.String TELEPHONY_SERVICE = "phone";
field public static final java.lang.String TEXT_SERVICES_MANAGER_SERVICE = "textservices";
field public static final java.lang.String TV_INPUT_SERVICE = "tv_input";
@@ -8614,13 +8475,11 @@ package android.content.pm {
}
public class LauncherApps {
- method public void addCallback(android.content.pm.LauncherApps.Callback);
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
method public boolean isPackageEnabled(java.lang.String, android.os.UserHandle);
method public void registerCallback(android.content.pm.LauncherApps.Callback);
method public void registerCallback(android.content.pm.LauncherApps.Callback, android.os.Handler);
- method public void removeCallback(android.content.pm.LauncherApps.Callback);
method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle);
method public void startAppDetailsActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
@@ -8899,7 +8758,7 @@ package android.content.pm {
field public static final java.lang.String FEATURE_LOCATION = "android.hardware.location";
field public static final java.lang.String FEATURE_LOCATION_GPS = "android.hardware.location.gps";
field public static final java.lang.String FEATURE_LOCATION_NETWORK = "android.hardware.location.network";
- field public static final java.lang.String FEATURE_MANAGED_PROFILES = "android.software.managed_profiles";
+ field public static final java.lang.String FEATURE_MANAGED_USERS = "android.software.managed_users";
field public static final java.lang.String FEATURE_MICROPHONE = "android.hardware.microphone";
field public static final java.lang.String FEATURE_NFC = "android.hardware.nfc";
field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
@@ -14075,29 +13934,6 @@ package android.media {
method public android.media.AudioAttributes.Builder setUsage(int);
}
- public class AudioDevice {
- field public static final int DEVICE_TYPE_AUX_LINE = 19; // 0x13
- field public static final int DEVICE_TYPE_BLUETOOTH_A2DP = 8; // 0x8
- field public static final int DEVICE_TYPE_BLUETOOTH_SCO = 7; // 0x7
- field public static final int DEVICE_TYPE_BUILTIN_EARPIECE = 1; // 0x1
- field public static final int DEVICE_TYPE_BUILTIN_MIC = 15; // 0xf
- field public static final int DEVICE_TYPE_BUILTIN_SPEAKER = 2; // 0x2
- field public static final int DEVICE_TYPE_DOCK = 13; // 0xd
- field public static final int DEVICE_TYPE_FM = 14; // 0xe
- field public static final int DEVICE_TYPE_FM_TUNER = 16; // 0x10
- field public static final int DEVICE_TYPE_HDMI = 9; // 0x9
- field public static final int DEVICE_TYPE_HDMI_ARC = 10; // 0xa
- field public static final int DEVICE_TYPE_LINE_ANALOG = 5; // 0x5
- field public static final int DEVICE_TYPE_LINE_DIGITAL = 6; // 0x6
- field public static final int DEVICE_TYPE_TELEPHONY = 18; // 0x12
- field public static final int DEVICE_TYPE_TV_TUNER = 17; // 0x11
- field public static final int DEVICE_TYPE_UNKNOWN = 0; // 0x0
- field public static final int DEVICE_TYPE_USB_ACCESSORY = 12; // 0xc
- field public static final int DEVICE_TYPE_USB_DEVICE = 11; // 0xb
- field public static final int DEVICE_TYPE_WIRED_HEADPHONES = 4; // 0x4
- field public static final int DEVICE_TYPE_WIRED_HEADSET = 3; // 0x3
- }
-
public class AudioFormat {
method public int getChannelMask();
method public int getEncoding();
@@ -16190,12 +16026,16 @@ package android.media.audiofx {
method public short getRoundedStrength() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
method public boolean getSpeakerAngles(int, int, int[]) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
method public boolean getStrengthSupported();
- method public int getVirtualizationMode() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
+ method public int getVirtualizationMode() throws java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
method public void setParameterListener(android.media.audiofx.Virtualizer.OnParameterChangeListener);
method public void setProperties(android.media.audiofx.Virtualizer.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
method public void setStrength(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
field public static final int PARAM_STRENGTH = 1; // 0x1
field public static final int PARAM_STRENGTH_SUPPORTED = 0; // 0x0
+ field public static final int VIRTUALIZATION_MODE_AUTO = 1; // 0x1
+ field public static final int VIRTUALIZATION_MODE_BINAURAL = 2; // 0x2
+ field public static final int VIRTUALIZATION_MODE_OFF = 0; // 0x0
+ field public static final int VIRTUALIZATION_MODE_TRANSAURAL = 3; // 0x3
}
public static abstract interface Virtualizer.OnParameterChangeListener {
@@ -16358,10 +16198,10 @@ package android.media.effect {
package android.media.projection {
public final class MediaProjection {
- method public void addCallback(android.media.projection.MediaProjection.Callback, android.os.Handler);
method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay.Callback, android.os.Handler);
- method public void removeCallback(android.media.projection.MediaProjection.Callback);
+ method public void registerCallback(android.media.projection.MediaProjection.Callback, android.os.Handler);
method public void stop();
+ method public void unregisterCallback(android.media.projection.MediaProjection.Callback);
}
public static abstract class MediaProjection.Callback {
@@ -16370,8 +16210,8 @@ package android.media.projection {
}
public final class MediaProjectionManager {
+ method public android.content.Intent createScreenCaptureIntent();
method public android.media.projection.MediaProjection getMediaProjection(int, android.content.Intent);
- method public android.content.Intent getScreenCaptureIntent();
}
}
@@ -17550,14 +17390,12 @@ package android.net {
public class VpnService extends android.app.Service {
ctor public VpnService();
- method public boolean addAddress(java.net.InetAddress, int);
method public android.os.IBinder onBind(android.content.Intent);
method public void onRevoke();
method public static android.content.Intent prepare(android.content.Context);
method public boolean protect(int);
method public boolean protect(java.net.Socket);
method public boolean protect(java.net.DatagramSocket);
- method public boolean removeAddress(java.net.InetAddress, int);
field public static final java.lang.String SERVICE_INTERFACE = "android.net.VpnService";
}
@@ -22266,9 +22104,9 @@ package android.os {
field public static final int ON_AFTER_RELEASE = 536870912; // 0x20000000
field public static final int PARTIAL_WAKE_LOCK = 1; // 0x1
field public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32; // 0x20
+ field public static final int RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY = 1; // 0x1
field public static final deprecated int SCREEN_BRIGHT_WAKE_LOCK = 10; // 0xa
field public static final deprecated int SCREEN_DIM_WAKE_LOCK = 6; // 0x6
- field public static final int WAIT_FOR_DISTANT_PROXIMITY = 1; // 0x1
}
public final class PowerManager.WakeLock {
@@ -25752,6 +25590,8 @@ package android.provider {
public static final class Telephony.Mms.Intents {
field public static final java.lang.String CONTENT_CHANGED_ACTION = "android.intent.action.CONTENT_CHANGED";
field public static final java.lang.String DELETED_CONTENTS = "deleted_contents";
+ field public static final java.lang.String EXTRA_MMS_CONTENT_URI = "android.provider.Telephony.extra.MMS_CONTENT_URI";
+ field public static final java.lang.String EXTRA_MMS_LOCATION_URL = "android.provider.Telephony.extra.MMS_LOCATION_URL";
field public static final java.lang.String MMS_DOWNLOAD_ACTION = "android.provider.Telephony.MMS_DOWNLOAD";
field public static final java.lang.String MMS_SEND_ACTION = "android.provider.Telephony.MMS_SEND";
}
@@ -28210,11 +28050,11 @@ package android.system {
}
-package android.telecomm {
+package android.telecom {
public final class AudioState implements android.os.Parcelable {
ctor public AudioState(boolean, int, int);
- ctor public AudioState(android.telecomm.AudioState);
+ ctor public AudioState(android.telecom.AudioState);
method public int describeContents();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
@@ -28229,20 +28069,20 @@ package android.telecomm {
}
public abstract class Conference {
- ctor public Conference(android.telecomm.PhoneAccountHandle);
- method public final boolean addConnection(android.telecomm.Connection);
+ ctor public Conference(android.telecom.PhoneAccountHandle);
+ method public final boolean addConnection(android.telecom.Connection);
method public final void destroy();
method public final int getCapabilities();
- method public final java.util.List<android.telecomm.Connection> getConnections();
- method public final android.telecomm.PhoneAccountHandle getPhoneAccountHandle();
+ method public final java.util.List<android.telecom.Connection> getConnections();
+ method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle();
method public final int getState();
method public void onDisconnect();
method public void onHold();
method public void onMerge();
- method public void onSeparate(android.telecomm.Connection);
+ method public void onSeparate(android.telecom.Connection);
method public void onSwap();
method public void onUnhold();
- method public final void removeConnection(android.telecomm.Connection);
+ method public final void removeConnection(android.telecom.Connection);
method public final void setActive();
method public final void setCapabilities(int);
method public final void setDisconnected(int, java.lang.String);
@@ -28251,53 +28091,52 @@ package android.telecomm {
public abstract class Connection {
ctor public Connection();
- method public static android.telecomm.Connection createCanceledConnection();
- method public static android.telecomm.Connection createFailedConnection(int, java.lang.String);
+ method public static android.telecom.Connection createCanceledConnection();
+ method public static android.telecom.Connection createFailedConnection(int, java.lang.String);
method public final void destroy();
+ method public final android.net.Uri getAddress();
+ method public final int getAddressPresentation();
method public final boolean getAudioModeIsVoip();
- method public final android.telecomm.AudioState getAudioState();
+ method public final android.telecom.AudioState getAudioState();
method public final int getCallCapabilities();
method public final java.lang.String getCallerDisplayName();
method public final int getCallerDisplayNamePresentation();
- method public final android.telecomm.Conference getConference();
- method public final java.util.List<android.telecomm.Connection> getConferenceableConnections();
+ method public final android.telecom.Conference getConference();
+ method public final java.util.List<android.telecom.Connection> getConferenceableConnections();
method public final int getDisconnectCause();
method public final java.lang.String getDisconnectMessage();
- method public final android.net.Uri getHandle();
- method public final int getHandlePresentation();
method public final int getState();
- method public final android.telecomm.StatusHints getStatusHints();
- method public final boolean isRequestingRingback();
+ method public final android.telecom.StatusHints getStatusHints();
+ method public final boolean isRingbackRequested();
method public void onAbort();
method public void onAnswer();
- method public void onConferenceWith(android.telecomm.Connection);
+ method public void onAudioStateChanged(android.telecom.AudioState);
+ method public void onConferenceWith(android.telecom.Connection);
method public void onDisconnect();
method public void onHold();
- method public void onPhoneAccountClicked();
method public void onPlayDtmfTone(char);
method public void onPostDialContinue(boolean);
method public void onReject();
method public void onSeparate();
- method public void onSetAudioState(android.telecomm.AudioState);
- method public void onSetState(int);
+ method public void onStateChanged(int);
method public void onStopDtmfTone();
method public void onUnhold();
method public final void setActive();
+ method public final void setAddress(android.net.Uri, int);
method public final void setAudioModeIsVoip(boolean);
method public final void setCallCapabilities(int);
method public final void setCallerDisplayName(java.lang.String, int);
- method public final void setConferenceableConnections(java.util.List<android.telecomm.Connection>);
- method public final void setConnectionService(android.telecomm.ConnectionService);
+ method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
+ method public final void setConnectionService(android.telecom.ConnectionService);
method public final void setDialing();
method public final void setDisconnected(int, java.lang.String);
- method public final void setHandle(android.net.Uri, int);
method public final void setInitialized();
method public final void setInitializing();
method public final void setOnHold();
method public final void setPostDialWait(java.lang.String);
- method public final void setRequestingRingback(boolean);
+ method public final void setRingbackRequested(boolean);
method public final void setRinging();
- method public final void setStatusHints(android.telecomm.StatusHints);
+ method public final void setStatusHints(android.telecom.StatusHints);
method public static java.lang.String stateToString(int);
field public static final int STATE_ACTIVE = 4; // 0x4
field public static final int STATE_DIALING = 3; // 0x3
@@ -28309,9 +28148,9 @@ package android.telecomm {
}
public final class ConnectionRequest implements android.os.Parcelable {
- ctor public ConnectionRequest(android.telecomm.PhoneAccountHandle, android.net.Uri, android.os.Bundle);
+ ctor public ConnectionRequest(android.telecom.PhoneAccountHandle, android.net.Uri, android.os.Bundle);
method public int describeContents();
- method public android.telecomm.PhoneAccountHandle getAccountHandle();
+ method public android.telecom.PhoneAccountHandle getAccountHandle();
method public android.net.Uri getAddress();
method public android.os.Bundle getExtras();
method public void writeToParcel(android.os.Parcel, int);
@@ -28320,33 +28159,33 @@ package android.telecomm {
public abstract class ConnectionService extends android.app.Service {
ctor public ConnectionService();
- method public final void addConference(android.telecomm.Conference);
- method public final void conferenceRemoteConnections(android.telecomm.RemoteConnection, android.telecomm.RemoteConnection);
- method public final android.telecomm.RemoteConnection createRemoteIncomingConnection(android.telecomm.PhoneAccountHandle, android.telecomm.ConnectionRequest);
- method public final android.telecomm.RemoteConnection createRemoteOutgoingConnection(android.telecomm.PhoneAccountHandle, android.telecomm.ConnectionRequest);
- method public final java.util.Collection<android.telecomm.Connection> getAllConnections();
+ method public final void addConference(android.telecom.Conference);
+ method public final void conferenceRemoteConnections(android.telecom.RemoteConnection, android.telecom.RemoteConnection);
+ method public final android.telecom.RemoteConnection createRemoteIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public final android.telecom.RemoteConnection createRemoteOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public final java.util.Collection<android.telecom.Connection> getAllConnections();
method public final android.os.IBinder onBind(android.content.Intent);
- method public void onConference(android.telecomm.Connection, android.telecomm.Connection);
- method public android.telecomm.Connection onCreateIncomingConnection(android.telecomm.PhoneAccountHandle, android.telecomm.ConnectionRequest);
- method public android.telecomm.Connection onCreateOutgoingConnection(android.telecomm.PhoneAccountHandle, android.telecomm.ConnectionRequest);
- method public void onRemoteConferenceAdded(android.telecomm.RemoteConference);
- field public static final java.lang.String SERVICE_INTERFACE = "android.telecomm.ConnectionService";
+ method public void onConference(android.telecom.Connection, android.telecom.Connection);
+ method public android.telecom.Connection onCreateIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public android.telecom.Connection onCreateOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public void onRemoteConferenceAdded(android.telecom.RemoteConference);
+ field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.ConnectionService";
}
public class GatewayInfo implements android.os.Parcelable {
method public int describeContents();
- method public android.net.Uri getGatewayHandle();
+ method public android.net.Uri getGatewayAddress();
method public java.lang.String getGatewayProviderPackageName();
- method public android.net.Uri getOriginalHandle();
+ method public android.net.Uri getOriginalAddress();
method public boolean isEmpty();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
}
public class PhoneAccount implements android.os.Parcelable {
- method public static android.telecomm.PhoneAccount.Builder builder(android.telecomm.PhoneAccountHandle, java.lang.CharSequence);
+ method public static android.telecom.PhoneAccount.Builder builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
method public int describeContents();
- method public android.telecomm.PhoneAccountHandle getAccountHandle();
+ method public android.telecom.PhoneAccountHandle getAccountHandle();
method public android.net.Uri getAddress();
method public int getCapabilities();
method public android.graphics.drawable.Drawable getIcon(android.content.Context);
@@ -28355,9 +28194,12 @@ package android.telecomm {
method public java.lang.CharSequence getShortDescription();
method public android.net.Uri getSubscriptionAddress();
method public java.util.List<java.lang.String> getSupportedUriSchemes();
+ method public boolean hasCapabilities(int);
+ method public boolean isEnabled();
method public boolean supportsUriScheme(java.lang.String);
method public void writeToParcel(android.os.Parcel, int);
field public static final int CAPABILITY_CONNECTION_MANAGER = 1; // 0x1
+ field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10
field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4
field public static final android.os.Parcelable.Creator CREATOR;
field public static final java.lang.String SCHEME_SIP = "sip";
@@ -28366,14 +28208,15 @@ package android.telecomm {
}
public static class PhoneAccount.Builder {
- ctor public PhoneAccount.Builder(android.telecomm.PhoneAccountHandle, java.lang.CharSequence);
- method public android.telecomm.PhoneAccount build();
- method public android.telecomm.PhoneAccount.Builder setAddress(android.net.Uri);
- method public android.telecomm.PhoneAccount.Builder setCapabilities(int);
- method public android.telecomm.PhoneAccount.Builder setIconResId(int);
- method public android.telecomm.PhoneAccount.Builder setShortDescription(java.lang.CharSequence);
- method public android.telecomm.PhoneAccount.Builder setSubscriptionAddress(android.net.Uri);
- method public android.telecomm.PhoneAccount.Builder setSupportedUriSchemes(java.util.List<java.lang.String>);
+ ctor public PhoneAccount.Builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
+ ctor public PhoneAccount.Builder(android.telecom.PhoneAccount);
+ method public android.telecom.PhoneAccount build();
+ method public android.telecom.PhoneAccount.Builder setAddress(android.net.Uri);
+ method public android.telecom.PhoneAccount.Builder setCapabilities(int);
+ method public android.telecom.PhoneAccount.Builder setIconResId(int);
+ method public android.telecom.PhoneAccount.Builder setShortDescription(java.lang.CharSequence);
+ method public android.telecom.PhoneAccount.Builder setSubscriptionAddress(android.net.Uri);
+ method public android.telecom.PhoneAccount.Builder setSupportedUriSchemes(java.util.List<java.lang.String>);
}
public class PhoneAccountHandle implements android.os.Parcelable {
@@ -28388,101 +28231,86 @@ package android.telecomm {
public final class PhoneCapabilities {
method public static java.lang.String toString(int);
field public static final int ADD_CALL = 16; // 0x10
- field public static final int ALL = 255; // 0xff
+ field public static final int ALL = 12543; // 0x30ff
+ field public static final int DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
field public static final int HOLD = 1; // 0x1
field public static final int MANAGE_CONFERENCE = 128; // 0x80
field public static final int MERGE_CONFERENCE = 4; // 0x4
field public static final int MUTE = 64; // 0x40
field public static final int RESPOND_VIA_TEXT = 32; // 0x20
+ field public static final int SEPARATE_FROM_CONFERENCE = 4096; // 0x1000
field public static final int SUPPORT_HOLD = 2; // 0x2
field public static final int SWAP_CONFERENCE = 8; // 0x8
}
- public class PropertyPresentation {
- ctor public PropertyPresentation();
- field public static final int ALLOWED = 1; // 0x1
- field public static final int PAYPHONE = 4; // 0x4
- field public static final int RESTRICTED = 2; // 0x2
- field public static final int UNKNOWN = 3; // 0x3
- }
-
public final class RemoteConference {
- method public final void addCallback(android.telecomm.RemoteConference.Callback);
method public void disconnect();
method public final int getCallCapabilities();
- method public final java.util.List<android.telecomm.RemoteConnection> getConnections();
+ method public final java.util.List<android.telecom.RemoteConnection> getConnections();
method public int getDisconnectCause();
method public java.lang.String getDisconnectMessage();
method public final int getState();
method public void hold();
- method public final void removeCallback(android.telecomm.RemoteConference.Callback);
- method public void separate(android.telecomm.RemoteConnection);
+ method public final void registerCallback(android.telecom.RemoteConference.Callback);
+ method public void separate(android.telecom.RemoteConnection);
method public void unhold();
+ method public final void unregisterCallback(android.telecom.RemoteConference.Callback);
}
public static abstract class RemoteConference.Callback {
ctor public RemoteConference.Callback();
- method public void onCapabilitiesChanged(android.telecomm.RemoteConference, int);
- method public void onConnectionAdded(android.telecomm.RemoteConference, android.telecomm.RemoteConnection);
- method public void onConnectionRemoved(android.telecomm.RemoteConference, android.telecomm.RemoteConnection);
- method public void onDestroyed(android.telecomm.RemoteConference);
- method public void onDisconnected(android.telecomm.RemoteConference, int, java.lang.String);
- method public void onStateChanged(android.telecomm.RemoteConference, int, int);
+ method public void onCapabilitiesChanged(android.telecom.RemoteConference, int);
+ method public void onConnectionAdded(android.telecom.RemoteConference, android.telecom.RemoteConnection);
+ method public void onConnectionRemoved(android.telecom.RemoteConference, android.telecom.RemoteConnection);
+ method public void onDestroyed(android.telecom.RemoteConference);
+ method public void onDisconnected(android.telecom.RemoteConference, int, java.lang.String);
+ method public void onStateChanged(android.telecom.RemoteConference, int, int);
}
public final class RemoteConnection {
method public void abort();
- method public void addListener(android.telecomm.RemoteConnection.Listener);
method public void answer();
method public void disconnect();
- method public boolean getAudioModeIsVoip();
+ method public android.net.Uri getAddress();
+ method public int getAddressPresentation();
method public int getCallCapabilities();
- method public java.lang.String getCallerDisplayName();
+ method public java.lang.CharSequence getCallerDisplayName();
method public int getCallerDisplayNamePresentation();
- method public java.util.List<android.telecomm.RemoteConnection> getChildren();
- method public android.telecomm.RemoteConference getConference();
- method public java.util.List<android.telecomm.RemoteConnection> getConferenceableConnections();
+ method public android.telecom.RemoteConference getConference();
+ method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
method public int getDisconnectCauseCode();
method public java.lang.String getDisconnectCauseMessage();
method public int getFailureCode();
method public java.lang.String getFailureMessage();
- method public android.net.Uri getHandle();
- method public int getHandlePresentation();
- method public android.telecomm.RemoteConnection getParent();
method public int getState();
- method public android.telecomm.StatusHints getStatusHints();
+ method public android.telecom.StatusHints getStatusHints();
method public void hold();
- method public boolean isRequestingRingback();
+ method public boolean isRingbackRequested();
+ method public boolean isVoipAudioMode();
method public void playDtmfTone(char);
method public void postDialContinue(boolean);
+ method public void registerCallback(android.telecom.RemoteConnection.Callback);
method public void reject();
- method public void removeListener(android.telecomm.RemoteConnection.Listener);
- method public void setAudioState(android.telecomm.AudioState);
+ method public void setAudioState(android.telecom.AudioState);
method public void stopDtmfTone();
method public void unhold();
+ method public void unregisterCallback(android.telecom.RemoteConnection.Callback);
}
- public static abstract class RemoteConnection.Listener {
- ctor public RemoteConnection.Listener();
- method public void onAudioModeIsVoipChanged(android.telecomm.RemoteConnection, boolean);
- method public void onCallCapabilitiesChanged(android.telecomm.RemoteConnection, int);
- method public void onCallerDisplayNameChanged(android.telecomm.RemoteConnection, java.lang.String, int);
- method public void onChildrenChanged(android.telecomm.RemoteConnection, java.util.List<android.telecomm.RemoteConnection>);
- method public void onConferenceChanged(android.telecomm.RemoteConnection, android.telecomm.RemoteConference);
- method public void onConferenceableConnectionsChanged(android.telecomm.RemoteConnection, java.util.List<android.telecomm.RemoteConnection>);
- method public void onDestroyed(android.telecomm.RemoteConnection);
- method public void onDisconnected(android.telecomm.RemoteConnection, int, java.lang.String);
- method public void onHandleChanged(android.telecomm.RemoteConnection, android.net.Uri, int);
- method public void onParentChanged(android.telecomm.RemoteConnection, android.telecomm.RemoteConnection);
- method public void onPostDialWait(android.telecomm.RemoteConnection, java.lang.String);
- method public void onRequestingRingback(android.telecomm.RemoteConnection, boolean);
- method public void onStateChanged(android.telecomm.RemoteConnection, int);
- method public void onStatusHintsChanged(android.telecomm.RemoteConnection, android.telecomm.StatusHints);
- }
-
- public abstract interface Response {
- method public abstract void onError(IN, int, java.lang.String);
- method public abstract void onResult(IN, OUT...);
+ public static abstract class RemoteConnection.Callback {
+ ctor public RemoteConnection.Callback();
+ method public void onAddressChanged(android.telecom.RemoteConnection, android.net.Uri, int);
+ method public void onCallCapabilitiesChanged(android.telecom.RemoteConnection, int);
+ method public void onCallerDisplayNameChanged(android.telecom.RemoteConnection, java.lang.String, int);
+ method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
+ method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
+ method public void onDestroyed(android.telecom.RemoteConnection);
+ method public void onDisconnected(android.telecom.RemoteConnection, int, java.lang.String);
+ method public void onPostDialWait(android.telecom.RemoteConnection, java.lang.String);
+ method public void onRingbackRequested(android.telecom.RemoteConnection, boolean);
+ method public void onStateChanged(android.telecom.RemoteConnection, int);
+ method public void onStatusHintsChanged(android.telecom.RemoteConnection, android.telecom.StatusHints);
+ method public void onVoipAudioChanged(android.telecom.RemoteConnection, boolean);
}
public final class StatusHints implements android.os.Parcelable {
@@ -28497,32 +28325,40 @@ package android.telecomm {
field public static final android.os.Parcelable.Creator CREATOR;
}
- public class TelecommManager {
- method public void addNewIncomingCall(android.telecomm.PhoneAccountHandle, android.os.Bundle);
+ public class TelecomManager {
+ method public void addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle);
method public void cancelMissedCallsNotification();
- method public void clearAccounts(java.lang.String);
- method public android.telecomm.PhoneAccountHandle getConnectionManager();
- method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
- method public java.util.List<android.telecomm.PhoneAccountHandle> getEnabledPhoneAccounts();
- method public android.telecomm.PhoneAccount getPhoneAccount(android.telecomm.PhoneAccountHandle);
- method public java.util.List<android.telecomm.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String);
+ method public void clearAccounts();
+ method public android.telecom.PhoneAccountHandle getConnectionManager();
+ method public android.telecom.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
+ method public java.util.List<android.telecom.PhoneAccountHandle> getEnabledPhoneAccounts();
+ method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle);
+ method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String);
method public boolean handleMmi(java.lang.String);
method public boolean hasMultipleEnabledAccounts();
method public boolean isInCall();
- method public void registerPhoneAccount(android.telecomm.PhoneAccount);
+ method public void registerPhoneAccount(android.telecom.PhoneAccount);
method public void showInCallScreen(boolean);
- method public void unregisterPhoneAccount(android.telecomm.PhoneAccountHandle);
- field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecomm.action.CHANGE_PHONE_ACCOUNTS";
- field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.telecomm.action.CONNECTION_SERVICE_CONFIGURE";
- field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecomm.action.SHOW_CALL_SETTINGS";
+ method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
+ field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
+ field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.telecom.action.CONNECTION_SERVICE_CONFIGURE";
+ field public static final java.lang.String ACTION_PHONE_ACCOUNT_DISABLED = "android.telecom.action.PHONE_ACCOUNT_DISABLED";
+ field public static final java.lang.String ACTION_PHONE_ACCOUNT_ENABLED = "android.telecom.action.PHONE_ACCOUNT_ENABLED";
+ field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
- field public static final java.lang.String EXTRA_CALL_BACK_NUMBER = "android.telecomm.extra.CALL_BACK_NUMBER";
- field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecomm.extra.CALL_DISCONNECT_CAUSE";
- field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecomm.extra.CALL_DISCONNECT_MESSAGE";
- field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecomm.extra.CONNECTION_SERVICE";
- field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecomm.extra.PHONE_ACCOUNT_HANDLE";
- field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecomm.extra.START_CALL_WITH_SPEAKERPHONE";
+ field public static final java.lang.String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
+ field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecom.extra.CALL_DISCONNECT_CAUSE";
+ field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecom.extra.CALL_DISCONNECT_MESSAGE";
+ field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecom.extra.CONNECTION_SERVICE";
+ field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecom.extra.PHONE_ACCOUNT_HANDLE";
+ field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
+ field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
+ field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
+ field public static final int PRESENTATION_ALLOWED = 1; // 0x1
+ field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
+ field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
+ field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
}
}
@@ -28883,16 +28719,16 @@ package android.telephony {
public final class SmsManager {
method public java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
- method public void downloadMultimediaMessage(java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent);
+ method public void downloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent);
method public android.os.Bundle getCarrierConfigValues();
method public static android.telephony.SmsManager getDefault();
method public void injectSmsPdu(byte[], java.lang.String, android.app.PendingIntent);
method public void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
- method public void sendMultimediaMessage(android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent);
+ method public void sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent);
method public void sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
method public void sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
- method public void updateMmsDownloadStatus(int, byte[]);
- method public void updateMmsSendStatus(int, boolean);
+ method public void updateMmsDownloadStatus(android.content.Context, int, int, android.net.Uri);
+ method public void updateMmsSendStatus(android.content.Context, int, byte[], int, android.net.Uri);
method public void updateSmsSendStatus(int, boolean);
field public static final java.lang.String EXTRA_MMS_DATA = "android.telephony.extra.MMS_DATA";
field public static final java.lang.String MMS_CONFIG_ALIAS_ENABLED = "aliasEnabled";
@@ -28927,6 +28763,7 @@ package android.telephony {
field public static final int MMS_ERROR_HTTP_FAILURE = 4; // 0x4
field public static final int MMS_ERROR_INVALID_APN = 2; // 0x2
field public static final int MMS_ERROR_IO_ERROR = 5; // 0x5
+ field public static final int MMS_ERROR_RETRY = 6; // 0x6
field public static final int MMS_ERROR_UNABLE_CONNECT_MMS = 3; // 0x3
field public static final int MMS_ERROR_UNSPECIFIED = 1; // 0x1
field public static final int RESULT_ERROR_GENERIC_FAILURE = 1; // 0x1
@@ -32149,6 +31986,7 @@ package android.util {
ctor public SizeF(float, float);
method public float getHeight();
method public float getWidth();
+ method public static android.util.SizeF parseSizeF(java.lang.String) throws java.lang.NumberFormatException;
}
public class SparseArray implements java.lang.Cloneable {
@@ -33668,6 +33506,7 @@ package android.view {
method protected int computeHorizontalScrollOffset();
method protected int computeHorizontalScrollRange();
method public void computeScroll();
+ method public android.view.WindowInsets computeSystemWindowInsets(android.view.WindowInsets, android.graphics.Rect);
method protected int computeVerticalScrollExtent();
method protected int computeVerticalScrollOffset();
method protected int computeVerticalScrollRange();
@@ -33852,8 +33691,6 @@ package android.view {
method public boolean hasTransientState();
method public boolean hasWindowFocus();
method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
- method protected void initializeFadingEdge(android.content.res.TypedArray);
- method protected void initializeScrollbars(android.content.res.TypedArray);
method public void invalidate(android.graphics.Rect);
method public void invalidate(int, int, int, int);
method public void invalidate();
@@ -34900,6 +34737,7 @@ package android.view {
field public static final int FEATURE_ACTION_BAR = 8; // 0x8
field public static final int FEATURE_ACTION_BAR_OVERLAY = 9; // 0x9
field public static final int FEATURE_ACTION_MODE_OVERLAY = 10; // 0xa
+ field public static final int FEATURE_ACTIVITY_TRANSITIONS = 13; // 0xd
field public static final int FEATURE_CONTENT_TRANSITIONS = 12; // 0xc
field public static final int FEATURE_CONTEXT_MENU = 6; // 0x6
field public static final int FEATURE_CUSTOM_TITLE = 7; // 0x7
@@ -34994,6 +34832,7 @@ package android.view {
method public boolean isConsumed();
method public boolean isRound();
method public android.view.WindowInsets replaceSystemWindowInsets(int, int, int, int);
+ method public android.view.WindowInsets replaceSystemWindowInsets(android.graphics.Rect);
}
public abstract interface WindowManager implements android.view.ViewManager {
@@ -36501,23 +36340,18 @@ package android.webkit {
public static abstract class WebChromeClient.FileChooserParams {
ctor public WebChromeClient.FileChooserParams();
+ method public abstract android.content.Intent createIntent();
method public abstract java.lang.String[] getAcceptTypes();
method public abstract java.lang.String getFilenameHint();
method public abstract int getMode();
method public abstract java.lang.CharSequence getTitle();
- method public abstract android.webkit.WebChromeClient.UploadHelper getUploadHelper();
method public abstract boolean isCaptureEnabled();
+ method public static android.net.Uri[] parseResult(int, android.content.Intent);
field public static final int MODE_OPEN = 0; // 0x0
field public static final int MODE_OPEN_MULTIPLE = 1; // 0x1
field public static final int MODE_SAVE = 3; // 0x3
}
- public static abstract class WebChromeClient.UploadHelper {
- ctor public WebChromeClient.UploadHelper();
- method public abstract android.content.Intent buildIntent();
- method public abstract android.net.Uri[] parseResult(int, android.content.Intent);
- }
-
public class WebHistoryItem implements java.lang.Cloneable {
method public android.graphics.Bitmap getFavicon();
method public java.lang.String getOriginalUrl();
@@ -36544,7 +36378,6 @@ package android.webkit {
method public abstract java.util.Map<java.lang.String, java.lang.String> getRequestHeaders();
method public abstract android.net.Uri getUrl();
method public abstract boolean hasGesture();
- method public abstract boolean hasUserGestureInsecure();
method public abstract boolean isForMainFrame();
}
@@ -39141,9 +38974,7 @@ package android.widget {
method public float getShadowRadius();
method public final boolean getShowSoftInputOnFocus();
method public java.lang.CharSequence getText();
- method public static int getTextColor(android.content.Context, android.content.res.TypedArray, int);
method public final android.content.res.ColorStateList getTextColors();
- method public static android.content.res.ColorStateList getTextColors(android.content.Context, android.content.res.TypedArray);
method public java.util.Locale getTextLocale();
method public float getTextScaleX();
method public float getTextSize();
diff --git a/api/removed.txt b/api/removed.txt
index c8a3b4bfe693..89726793064c 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -24,43 +24,22 @@ package android.os {
package android.view {
+ public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
+ method protected void initializeFadingEdge(android.content.res.TypedArray);
+ method protected void initializeScrollbars(android.content.res.TypedArray);
+ }
+
public static class WindowManager.LayoutParams extends android.view.ViewGroup.LayoutParams implements android.os.Parcelable {
field public static final int TYPE_KEYGUARD = 2004; // 0x7d4
}
}
-package android.view.inputmethod {
-
- public class BaseInputConnection implements android.view.inputmethod.InputConnection {
- method public final boolean requestUpdateCursorAnchorInfo(int);
- }
-
- public final class CursorAnchorInfo implements android.os.Parcelable {
- method public android.graphics.RectF getCharacterRect(int);
- method public int getCharacterRectFlags(int);
- method public boolean isInsertionMarkerClipped();
- field public static final int CHARACTER_RECT_TYPE_FULLY_VISIBLE = 1; // 0x1
- field public static final int CHARACTER_RECT_TYPE_INVISIBLE = 3; // 0x3
- field public static final int CHARACTER_RECT_TYPE_MASK = 15; // 0xf
- field public static final int CHARACTER_RECT_TYPE_NOT_FEASIBLE = 4; // 0x4
- field public static final int CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE = 2; // 0x2
- field public static final int CHARACTER_RECT_TYPE_UNSPECIFIED = 0; // 0x0
- }
-
- public static final class CursorAnchorInfo.Builder {
- method public android.view.inputmethod.CursorAnchorInfo.Builder addCharacterRect(int, float, float, float, float, int);
- method public android.view.inputmethod.CursorAnchorInfo.Builder setInsertionMarkerLocation(float, float, float, float, boolean);
- }
-
- public abstract interface InputConnection {
- method public abstract boolean requestUpdateCursorAnchorInfo(int);
- field public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 2; // 0x2
- field public static final int REQUEST_UPDATE_CURSOR_UPDATE_IMMEDIATE = 1; // 0x1
- }
+package android.widget {
- public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
- method public final boolean requestUpdateCursorAnchorInfo(int);
+ public class TextView extends android.view.View implements android.view.ViewTreeObserver.OnPreDrawListener {
+ method public static int getTextColor(android.content.Context, android.content.res.TypedArray, int);
+ method public static android.content.res.ColorStateList getTextColors(android.content.Context, android.content.res.TypedArray);
}
}
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index c06ef0d874c5..57c1505d2ac3 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -28,10 +28,15 @@ import android.app.IInstrumentationWatcher;
import android.app.Instrumentation;
import android.app.ProfilerInfo;
import android.app.UiAutomationConnection;
+import android.app.usage.ConfigurationStats;
+import android.app.usage.IUsageStatsManager;
+import android.app.usage.UsageStatsManager;
import android.content.ComponentName;
+import android.content.Context;
import android.content.IIntentReceiver;
import android.content.Intent;
import android.content.pm.IPackageManager;
+import android.content.pm.ParceledListSlice;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.graphics.Rect;
@@ -47,6 +52,7 @@ import android.os.SystemProperties;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.AndroidException;
+import android.util.ArrayMap;
import android.view.IWindowManager;
import android.view.View;
@@ -61,6 +67,9 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
@@ -846,7 +855,7 @@ public class Am extends BaseCommand {
}
private void sendBroadcast() throws Exception {
- Intent intent = makeIntent(UserHandle.USER_ALL);
+ Intent intent = makeIntent(UserHandle.USER_CURRENT);
IntentReceiver receiver = new IntentReceiver();
System.out.println("Broadcasting: " + intent);
mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, mReceiverPermission,
@@ -1722,7 +1731,64 @@ public class Am extends BaseCommand {
}
}
+ private List<Configuration> getRecentConfigurations(int days) {
+ IUsageStatsManager usm = IUsageStatsManager.Stub.asInterface(ServiceManager.getService(
+ Context.USAGE_STATS_SERVICE));
+ final long now = System.currentTimeMillis();
+ final long nDaysAgo = now - (days * 24 * 60 * 60 * 1000);
+ try {
+ @SuppressWarnings("unchecked")
+ ParceledListSlice<ConfigurationStats> configStatsSlice = usm.queryConfigurationStats(
+ UsageStatsManager.INTERVAL_BEST, nDaysAgo, now, "com.android.shell");
+ if (configStatsSlice == null) {
+ return Collections.emptyList();
+ }
+
+ final ArrayMap<Configuration, Integer> recentConfigs = new ArrayMap<>();
+ final List<ConfigurationStats> configStatsList = configStatsSlice.getList();
+ final int configStatsListSize = configStatsList.size();
+ for (int i = 0; i < configStatsListSize; i++) {
+ final ConfigurationStats stats = configStatsList.get(i);
+ final int indexOfKey = recentConfigs.indexOfKey(stats.getConfiguration());
+ if (indexOfKey < 0) {
+ recentConfigs.put(stats.getConfiguration(), stats.getActivationCount());
+ } else {
+ recentConfigs.setValueAt(indexOfKey,
+ recentConfigs.valueAt(indexOfKey) + stats.getActivationCount());
+ }
+ }
+
+ final Comparator<Configuration> comparator = new Comparator<Configuration>() {
+ @Override
+ public int compare(Configuration a, Configuration b) {
+ return recentConfigs.get(b).compareTo(recentConfigs.get(a));
+ }
+ };
+
+ ArrayList<Configuration> configs = new ArrayList<>(recentConfigs.size());
+ configs.addAll(recentConfigs.keySet());
+ Collections.sort(configs, comparator);
+ return configs;
+
+ } catch (RemoteException e) {
+ return Collections.emptyList();
+ }
+ }
+
private void runGetConfig() throws Exception {
+ int days = 14;
+ String option = nextOption();
+ if (option != null) {
+ if (!option.equals("--days")) {
+ throw new IllegalArgumentException("unrecognized option " + option);
+ }
+
+ days = Integer.parseInt(nextArgRequired());
+ if (days <= 0) {
+ throw new IllegalArgumentException("--days must be a positive integer");
+ }
+ }
+
try {
Configuration config = mAm.getConfiguration();
if (config == null) {
@@ -1733,6 +1799,17 @@ public class Am extends BaseCommand {
System.out.println("config: " + Configuration.resourceQualifierString(config));
System.out.println("abi: " + TextUtils.join(",", Build.SUPPORTED_ABIS));
+ final List<Configuration> recentConfigs = getRecentConfigurations(days);
+ final int recentConfigSize = recentConfigs.size();
+ if (recentConfigSize > 0) {
+ System.out.println("recentConfigs:");
+ }
+
+ for (int i = 0; i < recentConfigSize; i++) {
+ System.out.println(" config: " + Configuration.resourceQualifierString(
+ recentConfigs.get(i)));
+ }
+
} catch (RemoteException e) {
}
}
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 6e77e1324e03..1bb28c38ceef 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -133,8 +133,7 @@ static size_t computeArgBlockSize(int argc, char* const argv[]) {
// names if the zygote command line decreases in size.
uintptr_t start = reinterpret_cast<uintptr_t>(argv[0]);
uintptr_t end = reinterpret_cast<uintptr_t>(argv[argc - 1]);
- end += strlen(argv[argc - 1]);
-
+ end += strlen(argv[argc - 1]) + 1;
return (end - start);
}
@@ -220,15 +219,27 @@ int main(int argc, char* const argv[])
//
// For zygote starts, all remaining arguments are passed to the zygote.
// main function.
+ //
+ // Note that we must copy argument string values since we will rewrite the
+ // entire argument block when we apply the nice name to argv0.
-
- int i = runtime.addVmArguments(argc, argv);
+ int i;
+ for (i = 0; i < argc; i++) {
+ if (argv[i][0] != '-') {
+ break;
+ }
+ if (argv[i][1] == '-' && argv[i][2] == 0) {
+ ++i; // Skip --.
+ break;
+ }
+ runtime.addOption(strdup(argv[i]));
+ }
// Parse runtime arguments. Stop at first unrecognized option.
bool zygote = false;
bool startSystemServer = false;
bool application = false;
- const char* niceName = NULL;
+ String8 niceName;
String8 className;
++i; // Skip unused "parent dir" argument.
@@ -242,7 +253,7 @@ int main(int argc, char* const argv[])
} else if (strcmp(arg, "--application") == 0) {
application = true;
} else if (strncmp(arg, "--nice-name=", 12) == 0) {
- niceName = arg + 12;
+ niceName.setTo(arg + 12);
} else if (strncmp(arg, "--", 2) != 0) {
className.setTo(arg);
break;
@@ -287,9 +298,9 @@ int main(int argc, char* const argv[])
}
}
- if (niceName && *niceName) {
- runtime.setArgv0(niceName);
- set_process_name(niceName);
+ if (!niceName.isEmpty()) {
+ runtime.setArgv0(niceName.string());
+ set_process_name(niceName.string());
}
if (zygote) {
diff --git a/cmds/dpm/Android.mk b/cmds/dpm/Android.mk
new file mode 100644
index 000000000000..9f5aee403f82
--- /dev/null
+++ b/cmds/dpm/Android.mk
@@ -0,0 +1,15 @@
+# Copyright 2014 The Android Open Source Project
+#
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+LOCAL_MODULE := dpm
+include $(BUILD_JAVA_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := dpm
+LOCAL_SRC_FILES := dpm
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_PREBUILT)
diff --git a/cmds/dpm/MODULE_LICENSE_APACHE2 b/cmds/dpm/MODULE_LICENSE_APACHE2
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/cmds/dpm/MODULE_LICENSE_APACHE2
diff --git a/cmds/dpm/NOTICE b/cmds/dpm/NOTICE
new file mode 100644
index 000000000000..316b4eb5a9ef
--- /dev/null
+++ b/cmds/dpm/NOTICE
@@ -0,0 +1,190 @@
+
+ Copyright (c) 2014, 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.
+
+ 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.
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/cmds/dpm/dpm b/cmds/dpm/dpm
new file mode 100755
index 000000000000..c2e5cbb61c18
--- /dev/null
+++ b/cmds/dpm/dpm
@@ -0,0 +1,6 @@
+# Script to start "dpm" on the device
+#
+base=/system
+export CLASSPATH=$base/framework/dpm.jar
+exec app_process $base/bin com.android.commands.dpm.Dpm "$@"
+
diff --git a/cmds/dpm/src/com/android/commands/dpm/Dpm.java b/cmds/dpm/src/com/android/commands/dpm/Dpm.java
new file mode 100644
index 000000000000..724b3121bfdb
--- /dev/null
+++ b/cmds/dpm/src/com/android/commands/dpm/Dpm.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.commands.dpm;
+
+import android.app.admin.IDevicePolicyManager;
+import android.content.Context;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+
+import com.android.internal.os.BaseCommand;
+
+import java.io.PrintStream;
+
+public final class Dpm extends BaseCommand {
+
+ /**
+ * Command-line entry point.
+ *
+ * @param args The command-line arguments
+ */
+ public static void main(String[] args) {
+ (new Dpm()).run(args);
+ }
+
+ private static final String COMMAND_SET_DEVICE_OWNER = "set-device-owner";
+
+ private IDevicePolicyManager mDevicePolicyManager;
+
+ @Override
+ public void onShowUsage(PrintStream out) {
+ out.println("usage: adb shell dpm [subcommand] [options]\n" +
+ "\n" +
+ "usage: adb shell dpm set-device-owner <PACKAGE>\n" +
+ " <PACKAGE> an Android package name.\n");
+ }
+
+ @Override
+ public void onRun() throws Exception {
+ mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface(
+ ServiceManager.getService(Context.DEVICE_POLICY_SERVICE));
+ if (mDevicePolicyManager == null) {
+ showError("Error: Could not access the Device Policy Manager. Is the system running?");
+ return;
+ }
+
+ String command = nextArgRequired();
+ switch (command) {
+ case COMMAND_SET_DEVICE_OWNER:
+ runSetDeviceOwner(nextArgRequired());
+ break;
+ default:
+ showError("Error: unknown command '" + command + "'");
+ }
+ }
+
+ private void runSetDeviceOwner(String packageName) throws RemoteException {
+ if (mDevicePolicyManager.setDeviceOwner(packageName, null)) {
+ System.out.println("Device owner set to package " + packageName);
+ } else {
+ showError("Error: Can't set package " + packageName + " as device owner.");
+ }
+ }
+} \ No newline at end of file
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index da3409488460..3863bc7949b0 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -865,7 +865,7 @@ public final class Pm {
}
private void runInstall() {
- int installFlags = PackageManager.INSTALL_ALL_USERS;
+ int installFlags = 0;
int userId = UserHandle.USER_ALL;
String installerPackageName = null;
@@ -912,17 +912,17 @@ public final class Pm {
abi = checkAbiArgument(nextOptionData());
} else if (opt.equals("--user")) {
userId = Integer.parseInt(nextOptionData());
- if (userId == UserHandle.USER_ALL) {
- installFlags |= PackageManager.INSTALL_ALL_USERS;
- } else {
- installFlags &= ~PackageManager.INSTALL_ALL_USERS;
- }
} else {
System.err.println("Error: Unknown option: " + opt);
return;
}
}
+ if (userId == UserHandle.USER_ALL) {
+ userId = UserHandle.USER_OWNER;
+ installFlags |= PackageManager.INSTALL_ALL_USERS;
+ }
+
final Uri verificationURI;
final Uri originatingURI;
final Uri referrerURI;
@@ -961,8 +961,8 @@ public final class Pm {
VerificationParams verificationParams = new VerificationParams(verificationURI,
originatingURI, referrerURI, VerificationParams.NO_UID, null);
- mPm.installPackageAsUser(apkFilePath, obs.getBinder(), installFlags, installerPackageName,
- verificationParams, abi, userId);
+ mPm.installPackageAsUser(apkFilePath, obs.getBinder(), installFlags,
+ installerPackageName, verificationParams, abi, userId);
synchronized (obs) {
while (!obs.finished) {
@@ -986,10 +986,10 @@ public final class Pm {
}
private void runInstallCreate() throws RemoteException {
+ int userId = UserHandle.USER_ALL;
String installerPackageName = null;
final SessionParams params = new SessionParams(SessionParams.MODE_FULL_INSTALL);
- params.installFlags = PackageManager.INSTALL_ALL_USERS;
String opt;
while ((opt = nextOption()) != null) {
@@ -1010,6 +1010,10 @@ public final class Pm {
params.installFlags |= PackageManager.INSTALL_INTERNAL;
} else if (opt.equals("-d")) {
params.installFlags |= PackageManager.INSTALL_ALLOW_DOWNGRADE;
+ } else if (opt.equals("--originating-uri")) {
+ params.originatingUri = Uri.parse(nextOptionData());
+ } else if (opt.equals("--referrer")) {
+ params.referrerUri = Uri.parse(nextOptionData());
} else if (opt.equals("-p")) {
params.mode = SessionParams.MODE_INHERIT_EXISTING;
params.appPackageName = nextOptionData();
@@ -1020,13 +1024,19 @@ public final class Pm {
params.setSize(Long.parseLong(nextOptionData()));
} else if (opt.equals("--abi")) {
params.abiOverride = checkAbiArgument(nextOptionData());
+ } else if (opt.equals("--user")) {
+ userId = Integer.parseInt(nextOptionData());
} else {
throw new IllegalArgumentException("Unknown option " + opt);
}
}
- final int sessionId = mInstaller.createSession(params, installerPackageName,
- UserHandle.USER_OWNER);
+ if (userId == UserHandle.USER_ALL) {
+ userId = UserHandle.USER_OWNER;
+ params.installFlags |= PackageManager.INSTALL_ALL_USERS;
+ }
+
+ final int sessionId = mInstaller.createSession(params, installerPackageName, userId);
// NOTE: adb depends on parsing this string
System.out.println("Success: created install session [" + sessionId + "]");
@@ -1692,11 +1702,7 @@ public final class Pm {
}
public Intent getResult() {
- try {
- return mResult.poll(30, TimeUnit.SECONDS);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
+ return mResult.poll();
}
}
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java
index 7c13dbe07f75..0aa8fdd06e23 100644
--- a/core/java/android/animation/AnimatorSet.java
+++ b/core/java/android/animation/AnimatorSet.java
@@ -636,6 +636,7 @@ public final class AnimatorSet extends Animator {
anim.mNodes = new ArrayList<Node>();
anim.mSortedNodes = new ArrayList<Node>();
anim.mReversible = mReversible;
+ anim.mSetListener = null;
// Walk through the old nodes list, cloning each node and adding it to the new nodemap.
// One problem is that the old node dependencies point to nodes in the old AnimatorSet.
diff --git a/core/java/android/animation/PathKeyframes.java b/core/java/android/animation/PathKeyframes.java
index 70eed904006c..2a47b68a41b0 100644
--- a/core/java/android/animation/PathKeyframes.java
+++ b/core/java/android/animation/PathKeyframes.java
@@ -17,7 +17,6 @@ package android.animation;
import android.graphics.Path;
import android.graphics.PointF;
-import android.util.MathUtils;
import java.util.ArrayList;
@@ -64,11 +63,12 @@ class PathKeyframes implements Keyframes {
@Override
public Object getValue(float fraction) {
- fraction = MathUtils.constrain(fraction, 0, 1);
-
int numPoints = mKeyframeData.length / 3;
-
- if (fraction == 0) {
+ if (fraction < 0) {
+ return interpolateInRange(fraction, 0, 1);
+ } else if (fraction > 1) {
+ return interpolateInRange(fraction, numPoints - 2, numPoints - 1);
+ } else if (fraction == 0) {
return pointForIndex(0);
} else if (fraction == 1) {
return pointForIndex(numPoints - 1);
@@ -91,25 +91,29 @@ class PathKeyframes implements Keyframes {
}
// now high is below the fraction and low is above the fraction
- int startBase = (high * NUM_COMPONENTS);
- int endBase = (low * NUM_COMPONENTS);
+ return interpolateInRange(fraction, high, low);
+ }
+ }
- float startFraction = mKeyframeData[startBase + FRACTION_OFFSET];
- float endFraction = mKeyframeData[endBase + FRACTION_OFFSET];
+ private PointF interpolateInRange(float fraction, int startIndex, int endIndex) {
+ int startBase = (startIndex * NUM_COMPONENTS);
+ int endBase = (endIndex * NUM_COMPONENTS);
- float intervalFraction = (fraction - startFraction)/(endFraction - startFraction);
+ float startFraction = mKeyframeData[startBase + FRACTION_OFFSET];
+ float endFraction = mKeyframeData[endBase + FRACTION_OFFSET];
- float startX = mKeyframeData[startBase + X_OFFSET];
- float endX = mKeyframeData[endBase + X_OFFSET];
- float startY = mKeyframeData[startBase + Y_OFFSET];
- float endY = mKeyframeData[endBase + Y_OFFSET];
+ float intervalFraction = (fraction - startFraction)/(endFraction - startFraction);
- float x = interpolate(intervalFraction, startX, endX);
- float y = interpolate(intervalFraction, startY, endY);
+ float startX = mKeyframeData[startBase + X_OFFSET];
+ float endX = mKeyframeData[endBase + X_OFFSET];
+ float startY = mKeyframeData[startBase + Y_OFFSET];
+ float endY = mKeyframeData[endBase + Y_OFFSET];
- mTempPointF.set(x, y);
- return mTempPointF;
- }
+ float x = interpolate(intervalFraction, startX, endX);
+ float y = interpolate(intervalFraction, startY, endY);
+
+ mTempPointF.set(x, y);
+ return mTempPointF;
}
@Override
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 89a9692fb2c7..701ab1d809dc 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -4756,7 +4756,7 @@ public class Activity extends ContextThemeWrapper
* Activity through a returning activity transition, giving you the resultCode
* and any additional data from it. This method will only be called if the activity
* set a result code other than {@link #RESULT_CANCELED} and it supports activity
- * transitions with {@link Window#FEATURE_CONTENT_TRANSITIONS}.
+ * transitions with {@link Window#FEATURE_ACTIVITY_TRANSITIONS}.
*
* <p>The purpose of this function is to let the called Activity send a hint about
* its state so that this underlying Activity can prepare to be exposed. A call to
@@ -5781,7 +5781,7 @@ public class Activity extends ContextThemeWrapper
* When {@link android.app.ActivityOptions#makeSceneTransitionAnimation(Activity,
* android.view.View, String)} was used to start an Activity, <var>callback</var>
* will be called to handle shared elements on the <i>launched</i> Activity. This requires
- * {@link Window#FEATURE_CONTENT_TRANSITIONS}.
+ * {@link Window#FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param callback Used to manipulate shared element transitions on the launched Activity.
*/
@@ -5797,7 +5797,7 @@ public class Activity extends ContextThemeWrapper
* android.view.View, String)} was used to start an Activity, <var>callback</var>
* will be called to handle shared elements on the <i>launching</i> Activity. Most
* calls will only come when returning from the started Activity.
- * This requires {@link Window#FEATURE_CONTENT_TRANSITIONS}.
+ * This requires {@link Window#FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param callback Used to manipulate shared element transitions on the launching Activity.
*/
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 394b183ffd06..677fcef8d01a 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -2295,6 +2295,13 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
reply.writeNoException();
return true;
}
+
+ case BOOT_ANIMATION_COMPLETE_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ bootAnimationComplete();
+ reply.writeNoException();
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -5301,5 +5308,16 @@ class ActivityManagerProxy implements IActivityManager
reply.recycle();
}
+ @Override
+ public void bootAnimationComplete() throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ mRemote.transact(BOOT_ANIMATION_COMPLETE_TRANSACTION, data, reply, 0);
+ reply.readException();
+ data.recycle();
+ reply.recycle();
+ }
+
private IBinder mRemote;
}
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 213c7f6eff6d..cd6a4f51bf90 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -414,7 +414,7 @@ public class ActivityOptions {
* exit Transition. The position of the shared element in the launched Activity will be the
* epicenter of its entering Transition.
*
- * <p>This requires {@link android.view.Window#FEATURE_CONTENT_TRANSITIONS} to be
+ * <p>This requires {@link android.view.Window#FEATURE_ACTIVITY_TRANSITIONS} to be
* enabled on the calling Activity to cause an exit transition. The same must be in
* the called Activity to get an entering transition.</p>
* @param activity The Activity whose window contains the shared elements.
@@ -438,7 +438,7 @@ public class ActivityOptions {
* will be used as the epicenter for the exit Transition. The position of the associated
* shared element in the launched Activity will be the epicenter of its entering Transition.
*
- * <p>This requires {@link android.view.Window#FEATURE_CONTENT_TRANSITIONS} to be
+ * <p>This requires {@link android.view.Window#FEATURE_ACTIVITY_TRANSITIONS} to be
* enabled on the calling Activity to cause an exit transition. The same must be in
* the called Activity to get an entering transition.</p>
* @param activity The Activity whose window contains the shared elements.
@@ -453,7 +453,7 @@ public class ActivityOptions {
public static ActivityOptions makeSceneTransitionAnimation(Activity activity,
Pair<View, String>... sharedElements) {
ActivityOptions opts = new ActivityOptions();
- if (!activity.getWindow().hasFeature(Window.FEATURE_CONTENT_TRANSITIONS)) {
+ if (!activity.getWindow().hasFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)) {
opts.mAnimationType = ANIM_DEFAULT;
return opts;
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 3a399008a31a..b4877de7a2e5 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -122,6 +122,7 @@ import java.util.regex.Pattern;
import libcore.io.DropBox;
import libcore.io.EventLogger;
import libcore.io.IoUtils;
+import libcore.net.event.NetworkEventDispatcher;
import dalvik.system.CloseGuard;
import dalvik.system.VMDebug;
@@ -827,6 +828,9 @@ public final class ActivityThread {
public void clearDnsCache() {
// a non-standard API to get this to libcore
InetAddress.clearDnsCache();
+ // Allow libcore to perform the necessary actions as it sees fit upon a network
+ // configuration change.
+ NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
}
public void setHttpProxy(String host, String port, String exclList, Uri pacFileUrl) {
diff --git a/core/java/android/app/ActivityTransitionCoordinator.java b/core/java/android/app/ActivityTransitionCoordinator.java
index 43fa3f04ef5b..d02d17febbfb 100644
--- a/core/java/android/app/ActivityTransitionCoordinator.java
+++ b/core/java/android/app/ActivityTransitionCoordinator.java
@@ -223,7 +223,10 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
mSharedElementNames.addAll(sharedElements.keySet());
mSharedElements.addAll(sharedElements.values());
if (getViewsTransition() != null) {
- getDecor().captureTransitioningViews(mTransitioningViews);
+ ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ decorView.captureTransitioningViews(mTransitioningViews);
+ }
mTransitioningViews.removeAll(mSharedElements);
}
setEpicenter();
@@ -235,6 +238,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
View view = mTransitioningViews.get(i);
if (!view.getGlobalVisibleRect(r)) {
mTransitioningViews.remove(i);
+ showView(view, true);
}
}
}
@@ -350,7 +354,10 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
sharedElements.put(accepted.get(i), localViews.get(i));
}
} else {
- getDecor().findNamedViews(sharedElements);
+ ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ decorView.findNamedViews(sharedElements);
+ }
}
return sharedElements;
}
@@ -471,16 +478,18 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
protected void scheduleSetSharedElementEnd(final ArrayList<View> snapshots) {
final View decorView = getDecor();
- decorView.getViewTreeObserver().addOnPreDrawListener(
- new ViewTreeObserver.OnPreDrawListener() {
- @Override
- public boolean onPreDraw() {
- decorView.getViewTreeObserver().removeOnPreDrawListener(this);
- notifySharedElementEnd(snapshots);
- return true;
+ if (decorView != null) {
+ decorView.getViewTreeObserver().addOnPreDrawListener(
+ new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ decorView.getViewTreeObserver().removeOnPreDrawListener(this);
+ notifySharedElementEnd(snapshots);
+ return true;
+ }
}
- }
- );
+ );
+ }
}
private static SharedElementOriginalState getOldSharedElementState(View view, String name,
@@ -523,7 +532,10 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
ArrayList<View> snapshots = new ArrayList<View>(numSharedElements);
Context context = getWindow().getContext();
int[] decorLoc = new int[2];
- getDecor().getLocationOnScreen(decorLoc);
+ ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ decorView.getLocationOnScreen(decorLoc);
+ }
for (String name: names) {
Bundle sharedElementBundle = state.getBundle(name);
if (sharedElementBundle != null) {
@@ -605,14 +617,17 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
protected void showViews(ArrayList<View> views, boolean setTransitionAlpha) {
int count = views.size();
for (int i = 0; i < count; i++) {
- View view = views.get(i);
- Float alpha = mOriginalAlphas.remove(view);
- if (alpha != null) {
- view.setAlpha(alpha);
- }
- if (setTransitionAlpha) {
- view.setTransitionAlpha(1f);
- }
+ showView(views.get(i), setTransitionAlpha);
+ }
+ }
+
+ private void showView(View view, boolean setTransitionAlpha) {
+ Float alpha = mOriginalAlphas.remove(view);
+ if (alpha != null) {
+ view.setAlpha(alpha);
+ }
+ if (setTransitionAlpha) {
+ view.setTransitionAlpha(1f);
}
}
@@ -746,15 +761,17 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver {
protected void scheduleGhostVisibilityChange(final int visibility) {
final View decorView = getDecor();
- decorView.getViewTreeObserver()
- .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
- @Override
- public boolean onPreDraw() {
- decorView.getViewTreeObserver().removeOnPreDrawListener(this);
- setGhostVisibility(visibility);
- return true;
- }
- });
+ if (decorView != null) {
+ decorView.getViewTreeObserver()
+ .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ decorView.getViewTreeObserver().removeOnPreDrawListener(this);
+ setGhostVisibility(visibility);
+ return true;
+ }
+ });
+ }
}
protected class ContinueTransitionListener extends Transition.TransitionListenerAdapter {
diff --git a/core/java/android/app/ActivityTransitionState.java b/core/java/android/app/ActivityTransitionState.java
index ad4a22bb7a57..bc2e6ca5f57f 100644
--- a/core/java/android/app/ActivityTransitionState.java
+++ b/core/java/android/app/ActivityTransitionState.java
@@ -144,7 +144,7 @@ class ActivityTransitionState {
}
public void setEnterActivityOptions(Activity activity, ActivityOptions options) {
- if (activity.getWindow().hasFeature(Window.FEATURE_CONTENT_TRANSITIONS)
+ if (activity.getWindow().hasFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)
&& options != null && mEnterActivityOptions == null
&& mEnterTransitionCoordinator == null
&& options.getAnimationType() == ActivityOptions.ANIM_SCENE_TRANSITION) {
@@ -272,7 +272,7 @@ class ActivityTransitionState {
}
public void startExitOutTransition(Activity activity, Bundle options) {
- if (!activity.getWindow().hasFeature(Window.FEATURE_CONTENT_TRANSITIONS)) {
+ if (!activity.getWindow().hasFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)) {
return;
}
ActivityOptions activityOptions = new ActivityOptions(options);
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 404268cdb6ce..6860683679fd 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -66,6 +66,7 @@ import android.view.Display;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.Preconditions;
+import com.android.internal.util.UserIcons;
import dalvik.system.VMRuntime;
@@ -1645,30 +1646,6 @@ final class ApplicationPackageManager extends PackageManager {
/**
* @hide
*/
- public void addCrossProfileIntentsForPackage(String packageName,
- int sourceUserId, int targetUserId) {
- try {
- mPM.addCrossProfileIntentsForPackage(packageName, sourceUserId, targetUserId);
- } catch (RemoteException e) {
- // Should never happen!
- }
- }
-
- /**
- * @hide
- */
- public void removeCrossProfileIntentsForPackage(String packageName,
- int sourceUserId, int targetUserId) {
- try {
- mPM.removeCrossProfileIntentsForPackage(packageName, sourceUserId, targetUserId);
- } catch (RemoteException e) {
- // Should never happen!
- }
- }
-
- /**
- * @hide
- */
@Override
public void clearCrossProfileIntentFilters(int sourceUserId) {
try {
@@ -1684,7 +1661,11 @@ final class ApplicationPackageManager extends PackageManager {
*/
public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
if (itemInfo.showUserIcon != UserHandle.USER_NULL) {
- return new BitmapDrawable(getUserManager().getUserIcon(itemInfo.showUserIcon));
+ Bitmap bitmap = getUserManager().getUserIcon(itemInfo.showUserIcon);
+ if (bitmap == null) {
+ return UserIcons.getDefaultUserIcon(itemInfo.showUserIcon, /* light= */ false);
+ }
+ return new BitmapDrawable(bitmap);
}
Drawable dr = null;
if (itemInfo.packageName != null) {
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index 8227915926d1..b09f169338b5 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -38,7 +38,6 @@ import android.view.ViewTreeObserver;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
-import java.util.Collection;
final class BackStackState implements Parcelable {
final int[] mOps;
@@ -745,13 +744,8 @@ final class BackStackRecord extends FragmentTransaction implements
SparseArray<Fragment> firstOutFragments = new SparseArray<Fragment>();
SparseArray<Fragment> lastInFragments = new SparseArray<Fragment>();
-
calculateFragments(firstOutFragments, lastInFragments);
-
- TransitionState state = null;
- if (firstOutFragments.size() != 0 || lastInFragments.size() != 0) {
- state = beginTransition(firstOutFragments, lastInFragments, false);
- }
+ beginTransition(firstOutFragments, lastInFragments, false);
Op op = mHead;
while (op != null) {
@@ -842,10 +836,6 @@ final class BackStackRecord extends FragmentTransaction implements
if (mAddToBackStack) {
mManager.addBackStackState(this);
}
-
- if (state != null) {
- updateTransitionEndState(state, firstOutFragments, lastInFragments, false);
- }
}
private static void setFirstOut(SparseArray<Fragment> fragments, Fragment fragment) {
@@ -920,43 +910,6 @@ final class BackStackRecord extends FragmentTransaction implements
op = op.next;
}
-
- if (!haveTransitions(firstOutFragments, lastInFragments, false)) {
- firstOutFragments.clear();
- lastInFragments.clear();
- }
- }
-
- /**
- * @return true if custom transitions exist on any fragment in firstOutFragments or
- * lastInFragments or false otherwise.
- */
- private static boolean haveTransitions(SparseArray<Fragment> firstOutFragments,
- SparseArray<Fragment> lastInFragments, boolean isBack) {
- for (int i = firstOutFragments.size() - 1; i >= 0; i--) {
- Fragment f = firstOutFragments.valueAt(i);
- if (isBack) {
- if (f.getReturnTransition() != null ||
- f.getSharedElementReturnTransition() != null) {
- return true;
- }
- } else if (f.getExitTransition() != null) {
- return true;
- }
- }
-
- for (int i = lastInFragments.size() - 1; i >= 0; i--) {
- Fragment f = lastInFragments.valueAt(i);
- if (isBack) {
- if (f.getReenterTransition() != null) {
- return true;
- }
- } else if (f.getEnterTransition() != null ||
- f.getSharedElementEnterTransition() != null) {
- return true;
- }
- }
- return false;
}
/**
@@ -1003,11 +956,6 @@ final class BackStackRecord extends FragmentTransaction implements
op = op.next;
}
-
- if (!haveTransitions(firstOutFragments, lastInFragments, true)) {
- firstOutFragments.clear();
- lastInFragments.clear();
- }
}
/**
@@ -1038,8 +986,8 @@ final class BackStackRecord extends FragmentTransaction implements
* @param isBack true if this is popping the back stack or false if this is a
* forward operation.
* @return The TransitionState used to complete the operation of the transition
- * in {@link #updateTransitionEndState(android.app.BackStackRecord.TransitionState,
- * android.util.SparseArray, android.util.SparseArray, boolean)}.
+ * in {@link #setNameOverrides(android.app.BackStackRecord.TransitionState, java.util.ArrayList,
+ * java.util.ArrayList)}.
*/
private TransitionState beginTransition(SparseArray<Fragment> firstOutFragments,
SparseArray<Fragment> lastInFragments, boolean isBack) {
@@ -1050,16 +998,11 @@ final class BackStackRecord extends FragmentTransaction implements
// add any, then no views will be targeted.
state.nonExistentView = new View(mManager.mActivity);
- ArrayMap<String, View> tempViews1 = new ArrayMap<String, View>();
- ArrayMap<String, View> tempViews2 = new ArrayMap<String, View>();
- ArrayList<String> tempNames = new ArrayList<String>();
- ArrayList<View> tempViewList = new ArrayList<View>();
-
// Go over all leaving fragments.
for (int i = 0; i < firstOutFragments.size(); i++) {
int containerId = firstOutFragments.keyAt(i);
configureTransitions(containerId, state, isBack, firstOutFragments,
- lastInFragments, tempViews1, tempViews2, tempNames, tempViewList);
+ lastInFragments);
}
// Now go over all entering fragments that didn't have a leaving fragment.
@@ -1067,28 +1010,33 @@ final class BackStackRecord extends FragmentTransaction implements
int containerId = lastInFragments.keyAt(i);
if (firstOutFragments.get(containerId) == null) {
configureTransitions(containerId, state, isBack, firstOutFragments,
- lastInFragments, tempViews1, tempViews2, tempNames, tempViewList);
+ lastInFragments);
}
}
+ return state;
+ }
- if (state.overallTransitions.size() == 0) {
- state = null;
+ private static Transition cloneTransition(Transition transition) {
+ if (transition != null) {
+ transition = transition.clone();
}
- return state;
+ return transition;
}
private static Transition getEnterTransition(Fragment inFragment, boolean isBack) {
if (inFragment == null) {
return null;
}
- return isBack ? inFragment.getReenterTransition() : inFragment.getEnterTransition();
+ return cloneTransition(isBack ? inFragment.getReenterTransition() :
+ inFragment.getEnterTransition());
}
private static Transition getExitTransition(Fragment outFragment, boolean isBack) {
if (outFragment == null) {
return null;
}
- return isBack ? outFragment.getReturnTransition() : outFragment.getExitTransition();
+ return cloneTransition(isBack ? outFragment.getReturnTransition() :
+ outFragment.getExitTransition());
}
private static Transition getSharedElementTransition(Fragment inFragment, Fragment outFragment,
@@ -1096,34 +1044,32 @@ final class BackStackRecord extends FragmentTransaction implements
if (inFragment == null || outFragment == null) {
return null;
}
- return isBack ? outFragment.getSharedElementReturnTransition() :
- inFragment.getSharedElementEnterTransition();
+ return cloneTransition(isBack ? outFragment.getSharedElementReturnTransition() :
+ inFragment.getSharedElementEnterTransition());
}
- private static Transition captureExitingViews(Transition exitTransition, Fragment outFragment,
- ArrayList<View> viewList) {
+ private static ArrayList<View> captureExitingViews(Transition exitTransition,
+ Fragment outFragment) {
+ ArrayList<View> viewList = null;
if (exitTransition != null) {
+ viewList = new ArrayList<View>();
View root = outFragment.getView();
- viewList.clear();
root.captureTransitioningViews(viewList);
- if (viewList.isEmpty()) {
- exitTransition = null;
- } else {
- addTransitioningViews(exitTransition, viewList);
- }
+ addTargets(exitTransition, viewList);
}
- return exitTransition;
+ return viewList;
}
private ArrayMap<String, View> remapSharedElements(TransitionState state, Fragment outFragment,
- ArrayMap<String, View> namedViews, ArrayMap<String, View> tempViews2, boolean isBack) {
+ boolean isBack) {
+ ArrayMap<String, View> namedViews = new ArrayMap<String, View>();
if (mSharedElementSourceNames != null) {
outFragment.getView().findNamedViews(namedViews);
if (isBack) {
namedViews.retainAll(mSharedElementTargetNames);
} else {
namedViews = remapNames(mSharedElementSourceNames, mSharedElementTargetNames,
- namedViews, tempViews2);
+ namedViews);
}
}
@@ -1147,41 +1093,94 @@ final class BackStackRecord extends FragmentTransaction implements
* We will add to the views before the end state of the transition is captured so that the
* views will appear. At the start of the transition, we clear the list of targets so that
* we can restore the state of the transition and use it again.
+ *
+ * <p>The shared element transition maps its shared elements immediately prior to
+ * capturing the final state of the Transition.</p>
*/
- private void prepareEnterTransition(TransitionState state, final Transition enterTransition,
- final View container, final Fragment inFragment) {
- if (enterTransition != null) {
- final ArrayList<View> enteringViews = new ArrayList<View>();
- final View nonExistentView = state.nonExistentView;
- enterTransition.addTarget(state.nonExistentView);
- enterTransition.addListener(new Transition.TransitionListenerAdapter() {
- @Override
- public void onTransitionStart(Transition transition) {
- transition.removeListener(this);
- transition.removeTarget(nonExistentView);
- int numViews = enteringViews.size();
- for (int i = 0; i < numViews; i++) {
- transition.removeTarget(enteringViews.get(i));
- }
- }
- });
- container.getViewTreeObserver().addOnPreDrawListener(
- new ViewTreeObserver.OnPreDrawListener() {
- @Override
- public boolean onPreDraw() {
- container.getViewTreeObserver().removeOnPreDrawListener(this);
+ private ArrayList<View> addTransitionTargets(final TransitionState state,
+ final Transition enterTransition, final Transition sharedElementTransition,
+ final Transition overallTransition, final View container,
+ final Fragment inFragment, final Fragment outFragment,
+ final ArrayList<View> hiddenFragmentViews, final boolean isBack) {
+ if (enterTransition == null && sharedElementTransition == null &&
+ overallTransition == null) {
+ return null;
+ }
+ final ArrayList<View> enteringViews = new ArrayList<View>();
+ container.getViewTreeObserver().addOnPreDrawListener(
+ new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ container.getViewTreeObserver().removeOnPreDrawListener(this);
+
+ // Don't include any newly-hidden fragments in the transition.
+ excludeHiddenFragments(hiddenFragmentViews, inFragment.mContainerId,
+ overallTransition);
+
+ if (sharedElementTransition != null) {
+ ArrayMap<String, View> namedViews = mapSharedElementsIn(
+ state, isBack, inFragment);
+
+ setEpicenterIn(namedViews, state);
+
+ callSharedElementEnd(state, inFragment, outFragment, isBack,
+ namedViews);
+ }
+
+ if (enterTransition != null) {
View view = inFragment.getView();
if (view != null) {
view.captureTransitioningViews(enteringViews);
- addTransitioningViews(enterTransition, enteringViews);
+ addTargets(enterTransition, enteringViews);
}
- return true;
+ setSharedElementEpicenter(enterTransition, state);
}
- });
- setSharedElementEpicenter(enterTransition, state);
+ return true;
+ }
+ });
+ return enteringViews;
+ }
+
+ private void callSharedElementEnd(TransitionState state, Fragment inFragment,
+ Fragment outFragment, boolean isBack, ArrayMap<String, View> namedViews) {
+ SharedElementCallback sharedElementCallback = isBack ?
+ outFragment.mEnterTransitionCallback :
+ inFragment.mEnterTransitionCallback;
+ ArrayList<String> names = new ArrayList<String>(namedViews.keySet());
+ ArrayList<View> views = new ArrayList<View>(namedViews.values());
+ sharedElementCallback.onSharedElementEnd(names, views, null);
+ }
+
+ private void setEpicenterIn(ArrayMap<String, View> namedViews, TransitionState state) {
+ if (mSharedElementTargetNames != null && !namedViews.isEmpty()) {
+ // now we know the epicenter of the entering transition.
+ View epicenter = namedViews
+ .get(mSharedElementTargetNames.get(0));
+ if (epicenter != null) {
+ state.enteringEpicenterView = epicenter;
+ }
}
}
+ private ArrayMap<String, View> mapSharedElementsIn(TransitionState state,
+ boolean isBack, Fragment inFragment) {
+ // Now map the shared elements in the incoming fragment
+ ArrayMap<String, View> namedViews = mapEnteringSharedElements(state, inFragment, isBack);
+
+ // remap shared elements and set the name mapping used
+ // in the shared element transition.
+ if (isBack) {
+ inFragment.mExitTransitionCallback.onMapSharedElements(
+ mSharedElementTargetNames, namedViews);
+ setBackNameOverrides(state, namedViews, true);
+ } else {
+ inFragment.mEnterTransitionCallback.onMapSharedElements(
+ mSharedElementTargetNames, namedViews);
+ setNameOverrides(state, namedViews, true);
+ }
+ return namedViews;
+ }
+
private static Transition mergeTransitions(Transition enterTransition,
Transition exitTransition, Transition sharedElementTransition, Fragment inFragment,
boolean isBack) {
@@ -1209,26 +1208,16 @@ final class BackStackRecord extends FragmentTransaction implements
* Configures custom transitions for a specific fragment container.
*
* @param containerId The container ID of the fragments to configure the transition for.
- * @param state The Transition State to be shared with {@link #updateTransitionEndState(
- * android.app.BackStackRecord.TransitionState, android.util.SparseArray,
- * android.util.SparseArray, boolean)} later.
+ * @param state The Transition State keeping track of the executing transitions.
* @param firstOutFragments The list of first fragments to be removed, keyed on the
* container ID.
* @param lastInFragments The list of last fragments to be added, keyed on the
* container ID.
* @param isBack true if this is popping the back stack or false if this is a
* forward operation.
- * @param tempViews1 A temporary mapping of names to Views, used to avoid allocation
- * inside a loop.
- * @param tempViews2 A temporary mapping of names to Views, used to avoid allocation
- * inside a loop.
- * @param tempNames A temporary list of Strings, used to avoid allocation inside a loop.
- * @param tempViewList A temporary list of Views, used to avoid allocation inside a loop.
*/
private void configureTransitions(int containerId, TransitionState state, boolean isBack,
- SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments,
- ArrayMap<String, View> tempViews1, ArrayMap<String, View> tempViews2,
- ArrayList<String> tempNames, ArrayList<View> tempViewList) {
+ SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments) {
ViewGroup sceneRoot = (ViewGroup) mManager.mContainer.findViewById(containerId);
if (sceneRoot != null) {
Fragment inFragment = lastInFragments.get(containerId);
@@ -1238,146 +1227,150 @@ final class BackStackRecord extends FragmentTransaction implements
Transition sharedElementTransition = getSharedElementTransition(inFragment, outFragment,
isBack);
Transition exitTransition = getExitTransition(outFragment, isBack);
- exitTransition = captureExitingViews(exitTransition, outFragment, tempViewList);
- ArrayMap<String, View> namedViews = tempViews1;
- namedViews.clear();
- if (sharedElementTransition != null) {
- namedViews = remapSharedElements(state,
- outFragment, namedViews, tempViews2, isBack);
+ if (enterTransition == null && sharedElementTransition == null &&
+ exitTransition == null) {
+ return; // no transitions!
+ }
+ ArrayList<View> exitingViews = captureExitingViews(exitTransition, outFragment);
+ if (exitingViews == null || exitingViews.isEmpty()) {
+ exitTransition = null;
}
- // Notify the start of the transition.
- SharedElementCallback callback = isBack ?
- outFragment.mEnterTransitionCallback :
- inFragment.mEnterTransitionCallback;
- tempNames.clear();
- tempNames.addAll(namedViews.keySet());
- tempViewList.clear();
- tempViewList.addAll(namedViews.values());
- callback.onSharedElementStart(tempNames, tempViewList, null);
+ ArrayMap<String, View> namedViews = null;
+ if (sharedElementTransition != null) {
+ namedViews = remapSharedElements(state, outFragment, isBack);
+
+ // Notify the start of the transition.
+ SharedElementCallback callback = isBack ?
+ outFragment.mEnterTransitionCallback :
+ inFragment.mEnterTransitionCallback;
+ ArrayList<String> names = new ArrayList<String>(namedViews.keySet());
+ ArrayList<View> views = new ArrayList<View>(namedViews.values());
+ callback.onSharedElementStart(names, views, null);
+ }
// Set the epicenter of the exit transition
- if (mSharedElementTargetNames != null && exitTransition != null) {
+ if (mSharedElementTargetNames != null && exitTransition != null && namedViews != null) {
View epicenterView = namedViews.get(mSharedElementTargetNames.get(0));
if (epicenterView != null) {
setEpicenter(exitTransition, epicenterView);
}
}
- prepareEnterTransition(state, enterTransition, sceneRoot, inFragment);
-
Transition transition = mergeTransitions(enterTransition, exitTransition,
sharedElementTransition, inFragment, isBack);
if (transition != null) {
- state.overallTransitions.put(containerId, transition);
+ ArrayList<View> hiddenFragments = new ArrayList<View>();
+ ArrayList<View> enteringViews = addTransitionTargets(state, enterTransition,
+ sharedElementTransition, transition, sceneRoot, inFragment, outFragment,
+ hiddenFragments, isBack);
+
transition.setNameOverrides(state.nameOverrides);
// We want to exclude hidden views later, so we need a non-null list in the
// transition now.
transition.excludeTarget(state.nonExistentView, true);
// Now exclude all currently hidden fragments.
- excludeHiddenFragments(state, containerId, transition);
- cleanupHiddenFragments(transition, state);
+ excludeHiddenFragments(hiddenFragments, containerId, transition);
TransitionManager.beginDelayedTransition(sceneRoot, transition);
+ // Remove the view targeting after the transition starts
+ removeTargetedViewsFromTransitions(sceneRoot, state.nonExistentView,
+ enterTransition, enteringViews, exitTransition, exitingViews,
+ transition, hiddenFragments);
}
}
}
/**
+ * After the transition has started, remove all targets that we added to the transitions
+ * so that the transitions are left in a clean state.
+ */
+ private void removeTargetedViewsFromTransitions(
+ final ViewGroup sceneRoot, final View nonExistingView,
+ final Transition enterTransition, final ArrayList<View> enteringViews,
+ final Transition exitTransition, final ArrayList<View> exitingViews,
+ final Transition overallTransition, final ArrayList<View> hiddenViews) {
+ if (enterTransition != null || exitTransition != null) {
+ sceneRoot.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
+ if (enterTransition != null) {
+ enterTransition.removeTarget(nonExistingView);
+ removeTargets(enterTransition, enteringViews);
+ }
+ if (exitTransition != null) {
+ removeTargets(exitTransition, exitingViews);
+ }
+ int numViews = hiddenViews.size();
+ for (int i = 0; i < numViews; i++) {
+ overallTransition.excludeTarget(hiddenViews.get(i), false);
+ }
+ overallTransition.excludeTarget(nonExistingView, false);
+ return true;
+ }
+ });
+ }
+ }
+
+ private static void removeTargets(Transition transition, ArrayList<View> views) {
+ int numViews = views.size();
+ for (int i = 0; i < numViews; i++) {
+ transition.removeTarget(views.get(i));
+ }
+ }
+
+ private static void addTargets(Transition transition, ArrayList<View> views) {
+ int numViews = views.size();
+ for (int i = 0; i < numViews; i++) {
+ transition.addTarget(views.get(i));
+ }
+ }
+
+ /**
* Remaps a name-to-View map, substituting different names for keys.
*
* @param inMap A list of keys found in the map, in the order in toGoInMap
* @param toGoInMap A list of keys to use for the new map, in the order of inMap
* @param namedViews The current mapping
- * @param tempMap A temporary mapping that will be filled with the new values.
- * @return tempMap after it has been mapped with the new names as keys.
+ * @return a new Map after it has been mapped with the new names as keys.
*/
private static ArrayMap<String, View> remapNames(ArrayList<String> inMap,
- ArrayList<String> toGoInMap, ArrayMap<String, View> namedViews,
- ArrayMap<String, View> tempMap) {
- tempMap.clear();
+ ArrayList<String> toGoInMap, ArrayMap<String, View> namedViews) {
+ ArrayMap<String, View> remappedViews = new ArrayMap<String, View>();
if (!namedViews.isEmpty()) {
int numKeys = inMap.size();
for (int i = 0; i < numKeys; i++) {
View view = namedViews.get(inMap.get(i));
+
if (view != null) {
- tempMap.put(toGoInMap.get(i), view);
+ remappedViews.put(toGoInMap.get(i), view);
}
}
}
- return tempMap;
+ return remappedViews;
}
/**
- * After making all fragment changes, this updates the custom transitions to take into
- * account the entering views and any remapping.
+ * Maps shared elements to views in the entering fragment.
*
* @param state The transition State as returned from {@link #beginTransition(
* android.util.SparseArray, android.util.SparseArray, boolean)}.
- * @param outFragments The list of first fragments to be removed, keyed on the
- * container ID.
- * @param inFragments The list of last fragments to be added, keyed on the
- * container ID.
+ * @param inFragment The last fragment to be added.
* @param isBack true if this is popping the back stack or false if this is a
* forward operation.
*/
- private void updateTransitionEndState(TransitionState state, SparseArray<Fragment> outFragments,
- SparseArray<Fragment> inFragments, boolean isBack) {
- ArrayMap<String, View> tempViews1 = new ArrayMap<String, View>();
- ArrayMap<String, View> tempViews2 = new ArrayMap<String, View>();
- ArrayList<String> tempNames = new ArrayList<String>();
- ArrayList<View> tempViews = new ArrayList<View>();
-
- int numInFragments = inFragments.size();
- for (int i = 0; i < numInFragments; i++) {
- Fragment inFragment = inFragments.valueAt(i);
- tempViews1.clear();
- ArrayMap<String, View> namedViews = mapEnteringSharedElements(inFragment, tempViews1,
- tempViews2, isBack);
- // remap shared elements and set the name mapping used in the shared element transition.
- if (isBack) {
- inFragment.mExitTransitionCallback.onMapSharedElements(
- mSharedElementTargetNames, namedViews);
- setBackNameOverrides(state, namedViews, true);
- } else {
- inFragment.mEnterTransitionCallback.onMapSharedElements(
- mSharedElementTargetNames, namedViews);
- setNameOverrides(state, namedViews, true);
- }
-
- if (mSharedElementTargetNames != null && !namedViews.isEmpty()) {
- // now we know the epicenter of the entering transition.
- View epicenter = namedViews.get(mSharedElementTargetNames.get(0));
- if (epicenter != null) {
- state.enteringEpicenterView = epicenter;
- }
- }
-
- int containerId = inFragments.keyAt(i);
- SharedElementCallback sharedElementCallback = isBack ?
- outFragments.get(containerId).mEnterTransitionCallback :
- inFragment.mEnterTransitionCallback;
- tempNames.clear();
- tempNames.addAll(namedViews.keySet());
- tempViews.clear();
- tempViews.addAll(namedViews.values());
- sharedElementCallback.onSharedElementEnd(tempNames, tempViews, null);
- }
-
- // Don't include any newly-hidden fragments in the transition.
- excludeHiddenFragments(state);
- }
-
- private ArrayMap<String, View> mapEnteringSharedElements(Fragment inFragment,
- ArrayMap<String, View> namedViews, ArrayMap<String, View> tempViews2, boolean isBack) {
+ private ArrayMap<String, View> mapEnteringSharedElements(TransitionState state,
+ Fragment inFragment, boolean isBack) {
+ ArrayMap<String, View> namedViews = new ArrayMap<String, View>();
View root = inFragment.getView();
if (root != null) {
if (mSharedElementSourceNames != null) {
root.findNamedViews(namedViews);
if (isBack) {
namedViews = remapNames(mSharedElementSourceNames,
- mSharedElementTargetNames, namedViews, tempViews2);
+ mSharedElementTargetNames, namedViews);
} else {
namedViews.retainAll(mSharedElementTargetNames);
}
@@ -1386,21 +1379,7 @@ final class BackStackRecord extends FragmentTransaction implements
return namedViews;
}
- private static void cleanupHiddenFragments(Transition transition, TransitionState state) {
- final ArrayList<View> hiddenViews = state.hiddenFragmentViews;
- transition.addListener(new Transition.TransitionListenerAdapter() {
- @Override
- public void onTransitionStart(Transition transition) {
- transition.removeListener(this);
- int numViews = hiddenViews.size();
- for (int i = 0; i < numViews; i++) {
- transition.excludeTarget(hiddenViews.get(i), false);
- }
- }
- });
- }
-
- private void excludeHiddenFragments(TransitionState state, int containerId,
+ private void excludeHiddenFragments(final ArrayList<View> hiddenFragmentViews, int containerId,
Transition transition) {
if (mManager.mAdded != null) {
for (int i = 0; i < mManager.mAdded.size(); i++) {
@@ -1408,44 +1387,19 @@ final class BackStackRecord extends FragmentTransaction implements
if (fragment.mView != null && fragment.mContainer != null &&
fragment.mContainerId == containerId) {
if (fragment.mHidden) {
- if (!state.hiddenFragmentViews.contains(fragment.mView)) {
+ if (!hiddenFragmentViews.contains(fragment.mView)) {
transition.excludeTarget(fragment.mView, true);
- state.hiddenFragmentViews.add(fragment.mView);
+ hiddenFragmentViews.add(fragment.mView);
}
} else {
transition.excludeTarget(fragment.mView, false);
- state.hiddenFragmentViews.remove(fragment.mView);
+ hiddenFragmentViews.remove(fragment.mView);
}
}
}
}
}
- private void excludeHiddenFragments(TransitionState state) {
- int numTransitions = state.overallTransitions.size();
- for (int i = 0; i < numTransitions; i++) {
- Transition transition = state.overallTransitions.valueAt(i);
- int containerId = state.overallTransitions.keyAt(i);
- excludeHiddenFragments(state, containerId, transition);
- }
- }
-
- private static void addTransitioningViews(Transition transition, final Collection<View> views) {
- for (View view : views) {
- transition.addTarget(view);
- }
-
- transition.addListener(new Transition.TransitionListenerAdapter() {
- @Override
- public void onTransitionStart(Transition transition) {
- transition.removeListener(this);
- for (View view : views) {
- transition.removeTarget(view);
- }
- }
- });
- }
-
private static void setEpicenter(Transition transition, View view) {
final Rect epicenter = new Rect();
view.getBoundsOnScreen(epicenter);
@@ -1566,10 +1520,7 @@ final class BackStackRecord extends FragmentTransaction implements
if (doStateMove) {
mManager.moveToState(mManager.mCurState,
FragmentManagerImpl.reverseTransit(mTransition), mTransitionStyle, true);
- if (state != null) {
- updateTransitionEndState(state, firstOutFragments, lastInFragments, true);
- state = null;
- }
+ state = null;
}
if (mIndex >= 0) {
@@ -1609,11 +1560,14 @@ final class BackStackRecord extends FragmentTransaction implements
for (int i = 0; i < count; i++) {
String source = mSharedElementSourceNames.get(i);
String originalTarget = mSharedElementTargetNames.get(i);
- String target = namedViews.get(originalTarget).getTransitionName();
- if (isEnd) {
- setNameOverride(state.nameOverrides, source, target);
- } else {
- setNameOverride(state.nameOverrides, target, source);
+ View view = namedViews.get(originalTarget);
+ if (view != null) {
+ String target = view.getTransitionName();
+ if (isEnd) {
+ setNameOverride(state.nameOverrides, source, target);
+ } else {
+ setNameOverride(state.nameOverrides, target, source);
+ }
}
}
}
@@ -1649,10 +1603,7 @@ final class BackStackRecord extends FragmentTransaction implements
}
public class TransitionState {
- public SparseArray<Transition> overallTransitions = new SparseArray<Transition>();
public ArrayMap<String, String> nameOverrides = new ArrayMap<String, String>();
- public ArrayList<View> hiddenFragmentViews = new ArrayList<View>();
-
public View enteringEpicenterView;
public View nonExistentView;
}
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 91a0aede99ef..e9340eb2812c 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -124,7 +124,7 @@ import android.print.IPrintManager;
import android.print.PrintManager;
import android.service.fingerprint.IFingerprintService;
import android.service.fingerprint.FingerprintManager;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.telephony.TelephonyManager;
import android.content.ClipboardManager;
import android.util.AndroidRuntimeException;
@@ -148,7 +148,7 @@ import android.app.trust.TrustManager;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IAppOpsService;
import com.android.internal.os.IDropBoxManagerService;
-import com.android.internal.telecomm.ITelecommService;
+import com.android.internal.telecom.ITelecomService;
import java.io.File;
import java.io.FileInputStream;
@@ -562,9 +562,9 @@ class ContextImpl extends Context {
return new TelephonyManager(ctx.getOuterContext());
}});
- registerService(TELECOMM_SERVICE, new ServiceFetcher() {
+ registerService(TELECOM_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
- return new TelecommManager(ctx.getOuterContext());
+ return new TelecomManager(ctx.getOuterContext());
}});
registerService(UI_MODE_SERVICE, new ServiceFetcher() {
@@ -2237,7 +2237,6 @@ class ContextImpl extends Context {
mUser = user;
mPackageInfo = packageInfo;
- mContentResolver = new ApplicationContentResolver(this, mainThread, user);
mResourcesManager = ResourcesManager.getInstance();
mDisplay = display;
mOverrideConfiguration = overrideConfiguration;
@@ -2284,6 +2283,8 @@ class ContextImpl extends Context {
mOpPackageName = mBasePackageName;
}
}
+
+ mContentResolver = new ApplicationContentResolver(this, mainThread, user);
}
void installSystemApplicationInfo(ApplicationInfo info, ClassLoader classLoader) {
diff --git a/core/java/android/app/EnterTransitionCoordinator.java b/core/java/android/app/EnterTransitionCoordinator.java
index 9c7728eb90b3..bfdb0eb56e24 100644
--- a/core/java/android/app/EnterTransitionCoordinator.java
+++ b/core/java/android/app/EnterTransitionCoordinator.java
@@ -70,16 +70,18 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
resultReceiverBundle.putParcelable(KEY_REMOTE_RECEIVER, this);
mResultReceiver.send(MSG_SET_REMOTE_RECEIVER, resultReceiverBundle);
final View decorView = getDecor();
- decorView.getViewTreeObserver().addOnPreDrawListener(
- new ViewTreeObserver.OnPreDrawListener() {
- @Override
- public boolean onPreDraw() {
- if (mIsReadyForTransition) {
- decorView.getViewTreeObserver().removeOnPreDrawListener(this);
+ if (decorView != null) {
+ decorView.getViewTreeObserver().addOnPreDrawListener(
+ new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ if (mIsReadyForTransition) {
+ decorView.getViewTreeObserver().removeOnPreDrawListener(this);
+ }
+ return mIsReadyForTransition;
}
- return mIsReadyForTransition;
- }
- });
+ });
+ }
}
public void viewInstancesReady(ArrayList<String> accepted, ArrayList<String> localNames,
@@ -136,11 +138,12 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
if (sharedElements.isEmpty() || !sharedElements.valueAt(0).isLayoutRequested()) {
viewsReady(sharedElements);
} else {
- sharedElements.valueAt(0).getViewTreeObserver()
+ final View sharedElement = sharedElements.valueAt(0);
+ sharedElement.getViewTreeObserver()
.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
- sharedElements.valueAt(0).getViewTreeObserver().removeOnPreDrawListener(this);
+ sharedElement.getViewTreeObserver().removeOnPreDrawListener(this);
viewsReady(sharedElements);
return true;
}
@@ -151,7 +154,10 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
private ArrayMap<String, View> mapNamedElements(ArrayList<String> accepted,
ArrayList<String> localNames) {
ArrayMap<String, View> sharedElements = new ArrayMap<String, View>();
- getDecor().findNamedViews(sharedElements);
+ ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ decorView.findNamedViews(sharedElements);
+ }
if (accepted != null) {
for (int i = 0; i < localNames.size(); i++) {
String localName = localNames.get(i);
@@ -169,10 +175,13 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
private void sendSharedElementDestination() {
boolean allReady;
+ final View decorView = getDecor();
if (allowOverlappingTransitions() && getEnterViewsTransition() != null) {
allReady = false;
+ } else if (decorView == null) {
+ allReady = true;
} else {
- allReady = !getDecor().isLayoutRequested();
+ allReady = !decorView.isLayoutRequested();
if (allReady) {
for (int i = 0; i < mSharedElements.size(); i++) {
if (mSharedElements.get(i).isLayoutRequested()) {
@@ -187,8 +196,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
setSharedElementMatrices();
moveSharedElementsToOverlay();
mResultReceiver.send(MSG_SHARED_ELEMENT_DESTINATION, state);
- } else {
- final View decorView = getDecor();
+ } else if (decorView != null) {
decorView.getViewTreeObserver()
.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
@@ -290,6 +298,10 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
}
private void startSharedElementTransition(Bundle sharedElementState) {
+ ViewGroup decorView = getDecor();
+ if (decorView == null) {
+ return;
+ }
// Remove rejected shared elements
ArrayList<String> rejectedNames = new ArrayList<String>(mAllSharedElementNames);
rejectedNames.removeAll(mSharedElementNames);
@@ -310,7 +322,8 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
boolean startSharedElementTransition = true;
setGhostVisibility(View.INVISIBLE);
scheduleGhostVisibilityChange(View.INVISIBLE);
- Transition transition = beginTransition(startEnterTransition, startSharedElementTransition);
+ Transition transition = beginTransition(decorView, startEnterTransition,
+ startSharedElementTransition);
scheduleGhostVisibilityChange(View.VISIBLE);
setGhostVisibility(View.VISIBLE);
@@ -323,12 +336,16 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
if (mResultReceiver != null) {
// We can't trust that the view will disappear on the same frame that the shared
// element appears here. Assure that we get at least 2 frames for double-buffering.
- getDecor().postOnAnimation(new Runnable() {
+ decorView.postOnAnimation(new Runnable() {
int mAnimations;
+
@Override
public void run() {
if (mAnimations++ < MIN_ANIMATION_FRAMES) {
- getDecor().postOnAnimation(this);
+ View decorView = getDecor();
+ if (decorView != null) {
+ decorView.postOnAnimation(this);
+ }
} else if (mResultReceiver != null) {
mResultReceiver.send(MSG_HIDE_SHARED_ELEMENTS, null);
mResultReceiver = null; // all done sending messages.
@@ -345,21 +362,23 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
final Bundle sharedElementState = mSharedElementsBundle;
mSharedElementsBundle = null;
final View decorView = getDecor();
- decorView.getViewTreeObserver()
- .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
- @Override
- public boolean onPreDraw() {
- decorView.getViewTreeObserver().removeOnPreDrawListener(this);
- startTransition(new Runnable() {
- @Override
- public void run() {
- startSharedElementTransition(sharedElementState);
- }
- });
- return false;
- }
- });
- decorView.invalidate();
+ if (decorView != null) {
+ decorView.getViewTreeObserver()
+ .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ decorView.getViewTreeObserver().removeOnPreDrawListener(this);
+ startTransition(new Runnable() {
+ @Override
+ public void run() {
+ startSharedElementTransition(sharedElementState);
+ }
+ });
+ return false;
+ }
+ });
+ decorView.invalidate();
+ }
}
private void requestLayoutForSharedElements() {
@@ -369,7 +388,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
}
}
- private Transition beginTransition(boolean startEnterTransition,
+ private Transition beginTransition(ViewGroup decorView, boolean startEnterTransition,
boolean startSharedElementTransition) {
Transition sharedElementTransition = null;
if (startSharedElementTransition) {
@@ -429,7 +448,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
Transition transition = mergeTransitions(sharedElementTransition, viewsTransition);
if (transition != null) {
transition.addListener(new ContinueTransitionListener());
- TransitionManager.beginDelayedTransition(getDecor(), transition);
+ TransitionManager.beginDelayedTransition(decorView, transition);
if (startSharedElementTransition && !mSharedElementNames.isEmpty()) {
mSharedElements.get(0).invalidate();
} else if (startEnterTransition && !mTransitioningViews.isEmpty()) {
@@ -463,8 +482,9 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
}
private void startEnterTransition(Transition transition) {
- if (!mIsReturning) {
- Drawable background = getDecor().getBackground();
+ ViewGroup decorView = getDecor();
+ if (!mIsReturning && decorView != null) {
+ Drawable background = decorView.getBackground();
if (background != null) {
background = background.mutate();
getWindow().setBackgroundDrawable(background);
@@ -535,25 +555,28 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
if (rejectedSnapshots == null || rejectedSnapshots.isEmpty()) {
return;
}
- ViewGroupOverlay overlay = getDecor().getOverlay();
- ObjectAnimator animator = null;
- int numRejected = rejectedSnapshots.size();
- for (int i = 0; i < numRejected; i++) {
- View snapshot = rejectedSnapshots.get(i);
- overlay.add(snapshot);
- animator = ObjectAnimator.ofFloat(snapshot, View.ALPHA, 1, 0);
- animator.start();
- }
- animator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- ViewGroupOverlay overlay = getDecor().getOverlay();
- int numRejected = rejectedSnapshots.size();
- for (int i = 0; i < numRejected; i++) {
- overlay.remove(rejectedSnapshots.get(i));
- }
+ final ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ ViewGroupOverlay overlay = decorView.getOverlay();
+ ObjectAnimator animator = null;
+ int numRejected = rejectedSnapshots.size();
+ for (int i = 0; i < numRejected; i++) {
+ View snapshot = rejectedSnapshots.get(i);
+ overlay.add(snapshot);
+ animator = ObjectAnimator.ofFloat(snapshot, View.ALPHA, 1, 0);
+ animator.start();
}
- });
+ animator.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ ViewGroupOverlay overlay = decorView.getOverlay();
+ int numRejected = rejectedSnapshots.size();
+ for (int i = 0; i < numRejected; i++) {
+ overlay.remove(rejectedSnapshots.get(i));
+ }
+ }
+ });
+ }
}
protected void onRemoteExitTransitionComplete() {
@@ -568,9 +591,12 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
public void run() {
boolean startEnterTransition = true;
boolean startSharedElementTransition = false;
- Transition transition = beginTransition(startEnterTransition,
- startSharedElementTransition);
- startEnterTransition(transition);
+ ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ Transition transition = beginTransition(decorView, startEnterTransition,
+ startSharedElementTransition);
+ startEnterTransition(transition);
+ }
}
});
}
diff --git a/core/java/android/app/ExitTransitionCoordinator.java b/core/java/android/app/ExitTransitionCoordinator.java
index e85ec6384fee..41b0db6387ae 100644
--- a/core/java/android/app/ExitTransitionCoordinator.java
+++ b/core/java/android/app/ExitTransitionCoordinator.java
@@ -129,22 +129,25 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
showViews(mTransitioningViews, true);
showViews(mSharedElements, true);
mIsHidden = true;
- if (!mIsReturning && getDecor() != null) {
- getDecor().suppressLayout(false);
+ ViewGroup decorView = getDecor();
+ if (!mIsReturning && decorView != null) {
+ decorView.suppressLayout(false);
}
moveSharedElementsFromOverlay();
clearState();
}
private void sharedElementExitBack() {
- if (getDecor() != null) {
- getDecor().suppressLayout(true);
+ final ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ decorView.suppressLayout(true);
}
- if (mExitSharedElementBundle != null && !mExitSharedElementBundle.isEmpty() &&
+ if (decorView != null && mExitSharedElementBundle != null &&
+ !mExitSharedElementBundle.isEmpty() &&
!mSharedElements.isEmpty() && getSharedElementTransition() != null) {
startTransition(new Runnable() {
public void run() {
- startSharedElementExit();
+ startSharedElementExit(decorView);
}
});
} else {
@@ -152,7 +155,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
}
}
- private void startSharedElementExit() {
+ private void startSharedElementExit(final ViewGroup decorView) {
Transition transition = getSharedElementExitTransition();
transition.addListener(new Transition.TransitionListenerAdapter() {
@Override
@@ -165,7 +168,6 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
});
final ArrayList<View> sharedElementSnapshots = createSnapshots(mExitSharedElementBundle,
mSharedElementNames);
- final View decorView = getDecor();
decorView.getViewTreeObserver()
.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
@@ -178,10 +180,10 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
setGhostVisibility(View.INVISIBLE);
scheduleGhostVisibilityChange(View.INVISIBLE);
mListener.onSharedElementEnd(mSharedElementNames, mSharedElements, sharedElementSnapshots);
- TransitionManager.beginDelayedTransition(getDecor(), transition);
+ TransitionManager.beginDelayedTransition(decorView, transition);
scheduleGhostVisibilityChange(View.VISIBLE);
setGhostVisibility(View.VISIBLE);
- getDecor().invalidate();
+ decorView.invalidate();
}
private void hideSharedElements() {
@@ -196,8 +198,9 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
public void startExit() {
if (!mIsExitStarted) {
mIsExitStarted = true;
- if (getDecor() != null) {
- getDecor().suppressLayout(true);
+ ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ decorView.suppressLayout(true);
}
moveSharedElementsToOverlay();
startTransition(new Runnable() {
@@ -212,8 +215,9 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
public void startExit(int resultCode, Intent data) {
if (!mIsExitStarted) {
mIsExitStarted = true;
- if (getDecor() != null) {
- getDecor().suppressLayout(true);
+ ViewGroup decorView = getDecor();
+ if (decorView != null) {
+ decorView.suppressLayout(true);
}
mHandler = new Handler() {
@Override
@@ -224,7 +228,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
};
delayCancel();
moveSharedElementsToOverlay();
- if (getDecor().getBackground() == null) {
+ if (decorView != null && decorView.getBackground() == null) {
getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK));
}
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(mActivity, this,
@@ -248,8 +252,9 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
private void startExitTransition() {
Transition transition = getExitTransition();
- if (transition != null) {
- TransitionManager.beginDelayedTransition(getDecor(), transition);
+ ViewGroup decorView = getDecor();
+ if (transition != null && decorView != null) {
+ TransitionManager.beginDelayedTransition(decorView, transition);
mTransitioningViews.get(0).invalidate();
} else {
transitionStarted();
@@ -337,13 +342,14 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
Transition viewsTransition = getExitTransition();
Transition transition = mergeTransitions(sharedElementTransition, viewsTransition);
- if (transition != null) {
+ ViewGroup decorView = getDecor();
+ if (transition != null && decorView != null) {
setGhostVisibility(View.INVISIBLE);
scheduleGhostVisibilityChange(View.INVISIBLE);
- TransitionManager.beginDelayedTransition(getDecor(), transition);
+ TransitionManager.beginDelayedTransition(decorView, transition);
scheduleGhostVisibilityChange(View.VISIBLE);
setGhostVisibility(View.VISIBLE);
- getDecor().invalidate();
+ decorView.invalidate();
} else {
transitionStarted();
}
@@ -392,8 +398,9 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
mExitNotified = true;
mResultReceiver.send(MSG_EXIT_TRANSITION_COMPLETE, null);
mResultReceiver = null; // done talking
- if (!mIsReturning && getDecor() != null) {
- getDecor().suppressLayout(false);
+ ViewGroup decorView = getDecor();
+ if (!mIsReturning && decorView != null) {
+ decorView.suppressLayout(false);
}
finishIfNecessary();
}
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 672ef7b20ee4..a95abab94eb9 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -166,11 +166,12 @@ final class FragmentState implements Parcelable {
* activity: if the activity is stopped, no fragments inside of it can be
* started; when the activity is destroyed, all fragments will be destroyed.
*
- * <p>All subclasses of Fragment must include a public empty constructor.
+ * <p>All subclasses of Fragment must include a public no-argument constructor.
* The framework will often re-instantiate a fragment class when needed,
* in particular during state restore, and needs to be able to find this
- * constructor to instantiate it. If the empty constructor is not available,
- * a runtime exception will occur in some cases during state restore.
+ * constructor to instantiate it. If the no-argument constructor is not
+ * available, a runtime exception will occur in some cases during state
+ * restore.
*
* <p>Topics covered here:
* <ol>
@@ -1627,7 +1628,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
* @param callback Used to manipulate the shared element transitions on this Fragment
* when added not as a pop from the back stack.
*/
- public void setEnterSharedElementTransitionCallback(SharedElementCallback callback) {
+ public void setEnterSharedElementCallback(SharedElementCallback callback) {
if (callback == null) {
callback = SharedElementCallback.NULL_CALLBACK;
}
@@ -1635,13 +1636,20 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
}
/**
+ * @hide
+ */
+ public void setEnterSharedElementTransitionCallback(SharedElementCallback callback) {
+ setEnterSharedElementCallback(callback);
+ }
+
+ /**
* When custom transitions are used with Fragments, the exit transition callback
* is called when this Fragment is attached or detached when popping the back stack.
*
* @param callback Used to manipulate the shared element transitions on this Fragment
* when added as a pop from the back stack.
*/
- public void setExitSharedElementTransitionCallback(SharedElementCallback callback) {
+ public void setExitSharedElementCallback(SharedElementCallback callback) {
if (callback == null) {
callback = SharedElementCallback.NULL_CALLBACK;
}
@@ -1649,6 +1657,13 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
}
/**
+ * @hide
+ */
+ public void setExitSharedElementTransitionCallback(SharedElementCallback callback) {
+ setExitSharedElementCallback(callback);
+ }
+
+ /**
* Sets the Transition that will be used to move Views into the initial scene. The entering
* Views will be those that are regular Views or ViewGroups that have
* {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 948368039c1c..8fa1fd539973 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -327,6 +327,8 @@ public interface IActivityManager extends IInterface {
public void notifyActivityDrawn(IBinder token) throws RemoteException;
public ActivityOptions getActivityOptions(IBinder token) throws RemoteException;
+ public void bootAnimationComplete() throws RemoteException;
+
public void setImmersive(IBinder token, boolean immersive) throws RemoteException;
public boolean isImmersive(IBinder token) throws RemoteException;
public boolean isTopActivityImmersive() throws RemoteException;
@@ -772,4 +774,5 @@ public interface IActivityManager extends IInterface {
int GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+234;
int RELEASE_ACTIVITY_INSTANCE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+235;
int RELEASE_SOME_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+236;
+ int BOOT_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+237;
}
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index 7d4512bd1509..bdcff381b154 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -71,7 +71,6 @@ interface INotificationManager
ComponentName getEffectsSuppressor();
boolean matchesCallFilter(in Bundle extras);
- boolean matchesCallFilterAsUser(in Bundle extras, int userId);
ZenModeConfig getZenModeConfig();
boolean setZenModeConfig(in ZenModeConfig config);
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index f9e4895411dd..31b39ebb24a4 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -2680,6 +2680,8 @@ public class Notification implements Parcelable
contentView.setViewVisibility(R.id.line3, View.GONE);
contentView.setViewVisibility(R.id.overflow_divider, View.GONE);
contentView.setViewVisibility(R.id.progress, View.GONE);
+ contentView.setViewVisibility(R.id.chronometer, View.GONE);
+ contentView.setViewVisibility(R.id.time, View.GONE);
}
private RemoteViews applyStandardTemplate(int resId) {
@@ -2775,8 +2777,6 @@ public class Notification implements Parcelable
contentView.setViewVisibility(R.id.time, View.VISIBLE);
contentView.setLong(R.id.time, "setTime", mWhen);
}
- } else {
- contentView.setViewVisibility(R.id.time, View.GONE);
}
// Adjust padding depending on line count and font size.
diff --git a/core/java/android/app/SharedElementCallback.java b/core/java/android/app/SharedElementCallback.java
index 82d8e5b5393c..d7727435fbd8 100644
--- a/core/java/android/app/SharedElementCallback.java
+++ b/core/java/android/app/SharedElementCallback.java
@@ -32,8 +32,8 @@ import java.util.Map;
* Listener provided in
* {@link Activity#setEnterSharedElementCallback(SharedElementCallback)} and
* {@link Activity#setExitSharedElementCallback(SharedElementCallback)} as well as
- * {@link Fragment#setEnterSharedElementTransitionCallback(SharedElementCallback)} and
- * {@link Fragment#setExitSharedElementTransitionCallback(SharedElementCallback)}
+ * {@link Fragment#setEnterSharedElementCallback(SharedElementCallback)} and
+ * {@link Fragment#setExitSharedElementCallback(SharedElementCallback)}
* to monitor the Shared element transitions. The events can be used to customize Activity
* and Fragment Transition behavior.
*/
diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
index e2f175c10bf9..e9cce51ec2a4 100644
--- a/core/java/android/app/admin/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -221,7 +221,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_PROFILE_PROVISIONING_COMPLETE =
- "android.app.action.ACTION_PROFILE_PROVISIONING_COMPLETE";
+ "android.app.action.PROFILE_PROVISIONING_COMPLETE";
/**
* Name under which a DevicePolicy component publishes information
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index ea041e8102ed..13ed8d1f7bce 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -38,6 +38,7 @@ import android.os.ServiceManager;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
+import android.security.Credentials;
import android.service.restrictions.RestrictionsReceiver;
import android.util.Log;
@@ -49,6 +50,8 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
+import java.security.PrivateKey;
+import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
@@ -145,14 +148,16 @@ public class DevicePolicyManager {
* created for. Used with {@link #ACTION_PROVISION_MANAGED_PROFILE} and
* {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE}.
*
+ * <p> This extra is part of the {@link #EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE}.
+ *
* <p> If the {@link #ACTION_PROVISION_MANAGED_PROFILE} intent that starts managed provisioning
* contains this extra, it is forwarded in the
* {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} intent to the mobile
* device management application that was set as the profile owner during provisioning.
* It is usually used to avoid that the user has to enter their email address twice.
*/
- public static final String KEY_PROVISIONING_EMAIL_ADDRESS
- = "android.app.key.PROVISIONING_EMAIL_ADDRESS";
+ public static final String EXTRA_PROVISIONING_EMAIL_ADDRESS
+ = "android.app.extra.PROVISIONING_EMAIL_ADDRESS";
/**
* A String extra holding the time zone {@link android.app.AlarmManager} that the device
@@ -1838,6 +1843,32 @@ public class DevicePolicyManager {
}
/**
+ * Called by a device or profile owner to install a certificate and private key pair. The
+ * keypair will be visible to all apps within the profile.
+ *
+ * @param who Which {@link DeviceAdminReceiver} this request is associated with.
+ * @param privKey The private key to install.
+ * @param cert The certificate to install.
+ * @param alias The private key alias under which to install the certificate. If a certificate
+ * with that alias already exists, it will be overwritten.
+ * @return {@code true} if the keys were installed, {@code false} otherwise.
+ */
+ public boolean installKeyPair(ComponentName who, PrivateKey privKey, Certificate cert,
+ String alias) {
+ try {
+ final byte[] pemCert = Credentials.convertToPem(cert);
+ return mService.installKeyPair(who, privKey.getEncoded(), pemCert, alias);
+ } catch (CertificateException e) {
+ Log.w(TAG, "Error encoding certificate", e);
+ } catch (IOException e) {
+ Log.w(TAG, "Error writing certificate", e);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed talking with device policy service", e);
+ }
+ return false;
+ }
+
+ /**
* Returns the alias of a given CA certificate in the certificate store, or null if it
* doesn't exist.
*/
@@ -3245,11 +3276,15 @@ public class DevicePolicyManager {
* Called by profile or device owners to update {@link Settings.Secure} settings. Validation
* that the value of the setting is in the correct form for the setting type should be performed
* by the caller.
- * <p>The settings that can be updated with this method are:
+ * <p>The settings that can be updated by a profile or device owner with this method are:
* <ul>
* <li>{@link Settings.Secure#DEFAULT_INPUT_METHOD}</li>
* <li>{@link Settings.Secure#SKIP_FIRST_USE_HINTS}</li>
* </ul>
+ * <p>A device owner can additionally update the following settings:
+ * <ul>
+ * <li>{@link Settings.Secure#LOCATION_MODE}</li>
+ * </ul>
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @param setting The name of the setting to update.
* @param value The value to update the setting to.
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index 57d8b957dd55..c8e17800267f 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -126,6 +126,8 @@ interface IDevicePolicyManager {
void uninstallCaCert(in ComponentName admin, in String alias);
void enforceCanManageCaCerts(in ComponentName admin);
+ boolean installKeyPair(in ComponentName who, in byte[] privKeyBuffer, in byte[] certBuffer, String alias);
+
void addPersistentPreferredActivity(in ComponentName admin, in IntentFilter filter, in ComponentName activity);
void clearPackagePersistentPreferredActivities(in ComponentName admin, String packageName);
diff --git a/core/java/android/app/job/JobParameters.java b/core/java/android/app/job/JobParameters.java
index 724856ad3d4e..62734f27fb59 100644
--- a/core/java/android/app/job/JobParameters.java
+++ b/core/java/android/app/job/JobParameters.java
@@ -32,12 +32,15 @@ public class JobParameters implements Parcelable {
private final int jobId;
private final PersistableBundle extras;
private final IBinder callback;
+ private final boolean overrideDeadlineExpired;
/** @hide */
- public JobParameters(int jobId, PersistableBundle extras, IBinder callback) {
+ public JobParameters(IBinder callback, int jobId, PersistableBundle extras,
+ boolean overrideDeadlineExpired) {
this.jobId = jobId;
this.extras = extras;
this.callback = callback;
+ this.overrideDeadlineExpired = overrideDeadlineExpired;
}
/**
@@ -56,6 +59,16 @@ public class JobParameters implements Parcelable {
return extras;
}
+ /**
+ * For jobs with {@link android.app.job.JobInfo.Builder#setOverrideDeadline(long)} set, this
+ * provides an easy way to tell whether the job is being executed due to the deadline
+ * expiring. Note: If the job is running because its deadline expired, it implies that its
+ * constraints will not be met.
+ */
+ public boolean isOverrideDeadlineExpired() {
+ return overrideDeadlineExpired;
+ }
+
/** @hide */
public IJobCallback getCallback() {
return IJobCallback.Stub.asInterface(callback);
@@ -65,6 +78,7 @@ public class JobParameters implements Parcelable {
jobId = in.readInt();
extras = in.readPersistableBundle();
callback = in.readStrongBinder();
+ overrideDeadlineExpired = in.readInt() == 1;
}
@Override
@@ -77,6 +91,7 @@ public class JobParameters implements Parcelable {
dest.writeInt(jobId);
dest.writePersistableBundle(extras);
dest.writeStrongBinder(callback);
+ dest.writeInt(overrideDeadlineExpired ? 1 : 0);
}
public static final Creator<JobParameters> CREATOR = new Creator<JobParameters>() {
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index d77a77ba4127..22762297f927 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -51,6 +51,7 @@ public final class BluetoothGatt implements BluetoothProfile {
private int mConnState;
private final Object mStateLock = new Object();
private Boolean mDeviceBusy = false;
+ private Boolean mIsCongested = false;
private int mTransport;
private static final int CONN_STATE_IDLE = 0;
@@ -616,7 +617,7 @@ public final class BluetoothGatt implements BluetoothProfile {
+ " congested=" + congested);
if (!address.equals(mDevice.getAddress())) return;
try {
- mCallback.onConnectionCongested(BluetoothGatt.this, congested);
+ mIsCongested = congested;
} catch (Exception ex) {
Log.w(TAG, "Unhandled exception in callback", ex);
}
diff --git a/core/java/android/bluetooth/BluetoothGattCallback.java b/core/java/android/bluetooth/BluetoothGattCallback.java
index 19900ec97e5f..a9156205afca 100644
--- a/core/java/android/bluetooth/BluetoothGattCallback.java
+++ b/core/java/android/bluetooth/BluetoothGattCallback.java
@@ -152,18 +152,4 @@ public abstract class BluetoothGattCallback {
*/
public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {
}
-
- /**
- * Callback indicating that a remote device connection congestestion status has changed.
- *
- * An application should refrain from sending additional data to a remote device when
- * a callback is received with the congested flag set to true. Once the congestion status
- * is cleared up, the application will receive an additional callback with the congested
- * flag set to false.
- *
- * @param gatt The GATT client associated with the remote device
- * @param congested true, if the connection is currently congested
- */
- public void onConnectionCongested(BluetoothGatt gatt, boolean congested) {
- }
}
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index c8df60e800f1..a7f117b44c50 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -48,6 +48,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
private BluetoothAdapter mAdapter;
private IBluetoothGatt mService;
private BluetoothGattServerCallback mCallback;
+ private Boolean mIsCongested = false;
private Object mServerIfLock = new Object();
private int mServerIf;
@@ -297,7 +298,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
if (device == null) return;
try {
- mCallback.onConnectionCongested(device, congested);
+ mIsCongested = congested;
} catch (Exception ex) {
Log.w(TAG, "Unhandled exception in callback", ex);
}
diff --git a/core/java/android/bluetooth/BluetoothGattServerCallback.java b/core/java/android/bluetooth/BluetoothGattServerCallback.java
index b0ddc26ef38d..1dd06f2ce1c6 100644
--- a/core/java/android/bluetooth/BluetoothGattServerCallback.java
+++ b/core/java/android/bluetooth/BluetoothGattServerCallback.java
@@ -145,18 +145,4 @@ public abstract class BluetoothGattServerCallback {
*/
public void onNotificationSent(BluetoothDevice device, int status) {
}
-
- /**
- * Callback indicating that a remote device connection congestestion status has changed.
- *
- * An application should refrain from sending additional data (notifications, indications
- * etc.) to a remote device when a callback is received with the congested flag set
- * to true. Once the congestion status is cleared up, the application will receive an
- * additional callback with the congested flag set to false.
- *
- * @param device The remote device that triggered the congestion state change
- * @param congested true, if the connection is currently congested
- */
- public void onConnectionCongested(BluetoothDevice device, boolean congested) {
- }
}
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index b2b48e879446..a09fee9aa9e0 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -1763,7 +1763,7 @@ public abstract class ContentResolver {
* @param extras any extras to pass to the SyncAdapter.
*/
public static void requestSync(Account account, String authority, Bundle extras) {
- requestSyncAsUser(account, authority, UserHandle.getCallingUserId(), extras);
+ requestSyncAsUser(account, authority, UserHandle.myUserId(), extras);
}
/**
@@ -1938,7 +1938,7 @@ public abstract class ContentResolver {
* @param sync true if the provider should be synced when tickles are received for it
*/
public static void setSyncAutomatically(Account account, String authority, boolean sync) {
- setSyncAutomaticallyAsUser(account, authority, sync, UserHandle.getCallingUserId());
+ setSyncAutomaticallyAsUser(account, authority, sync, UserHandle.myUserId());
}
/**
@@ -2165,7 +2165,7 @@ public abstract class ContentResolver {
* @param sync the master auto-sync setting that applies to all the providers and accounts
*/
public static void setMasterSyncAutomatically(boolean sync) {
- setMasterSyncAutomaticallyAsUser(sync, UserHandle.getCallingUserId());
+ setMasterSyncAutomaticallyAsUser(sync, UserHandle.myUserId());
}
/**
@@ -2297,7 +2297,7 @@ public abstract class ContentResolver {
* @return true if there is a pending sync with the matching account and authority
*/
public static boolean isSyncPending(Account account, String authority) {
- return isSyncPendingAsUser(account, authority, UserHandle.getCallingUserId());
+ return isSyncPendingAsUser(account, authority, UserHandle.myUserId());
}
/**
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index f979a0c58582..158a40cd2eb5 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2037,6 +2037,7 @@ public abstract class Context {
* argument for use by system server and other multi-user aware code.
* @hide
*/
+ @SystemApi
public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user) {
throw new RuntimeException("Not implemented. Must override in a subclass.");
}
@@ -2114,7 +2115,7 @@ public abstract class Context {
AUDIO_SERVICE,
MEDIA_ROUTER_SERVICE,
TELEPHONY_SERVICE,
- TELECOMM_SERVICE,
+ TELECOM_SERVICE,
CLIPBOARD_SERVICE,
INPUT_METHOD_SERVICE,
TEXT_SERVICES_MANAGER_SERVICE,
@@ -2587,13 +2588,13 @@ public abstract class Context {
/**
* Use with {@link #getSystemService} to retrieve a
- * {@link android.telecomm.TelecommManager} to manage telecomm-related features
+ * {@link android.telecom.TelecomManager} to manage telecom-related features
* of the device.
*
* @see #getSystemService
- * @see android.telecomm.TelecommManager
+ * @see android.telecom.TelecomManager
*/
- public static final String TELECOMM_SERVICE = "telecomm";
+ public static final String TELECOM_SERVICE = "telecom";
/**
* Use with {@link #getSystemService} to retrieve a
@@ -3062,6 +3063,14 @@ public abstract class Context {
* "content://foo". It will not remove any prefix grants that exist at a
* higher level.
*
+ * <p>Prior to {@link android.os.Build.VERSION_CODES#L}, if you did not have
+ * regular permission access to a Uri, but had received access to it through
+ * a specific Uri permission grant, you could not revoke that grant with this
+ * function and a {@link SecurityException} would be thrown. As of
+ * {@link android.os.Build.VERSION_CODES#L}, this function will not throw a security exception,
+ * but will remove whatever permission grants to the Uri had been given to the app
+ * (or none).</p>
+ *
* @param uri The Uri you would like to revoke access to.
* @param modeFlags The desired access modes. Any combination of
* {@link Intent#FLAG_GRANT_READ_URI_PERMISSION
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 8d3126de15e1..641f843ea2d5 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -657,6 +657,7 @@ public class ActivityInfo extends ComponentInfo
softInputMode = orig.softInputMode;
uiOptions = orig.uiOptions;
parentActivityName = orig.parentActivityName;
+ maxRecents = orig.maxRecents;
}
/**
@@ -728,6 +729,7 @@ public class ActivityInfo extends ComponentInfo
dest.writeInt(uiOptions);
dest.writeString(parentActivityName);
dest.writeInt(persistableMode);
+ dest.writeInt(maxRecents);
}
public static final Parcelable.Creator<ActivityInfo> CREATOR
@@ -754,5 +756,6 @@ public class ActivityInfo extends ComponentInfo
uiOptions = source.readInt();
parentActivityName = source.readString();
persistableMode = source.readInt();
+ maxRecents = source.readInt();
}
}
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 3e1f60a8bd15..6d9c58b58836 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -259,12 +259,6 @@ interface IPackageManager {
void addCrossProfileIntentFilter(in IntentFilter intentFilter, String ownerPackage,
int ownerUserId, int sourceUserId, int targetUserId, int flags);
- void addCrossProfileIntentsForPackage(in String packageName, int sourceUserId,
- int targetUserId);
-
- void removeCrossProfileIntentsForPackage(String packageName, int sourceUserId,
- int targetUserId);
-
void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage, int ownerUserId);
/**
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index d49bc509fefe..5ee0b673e3e5 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -500,11 +500,18 @@ public class LauncherApps {
}
}
- /** STOPSHIP remove when launcher 3 has been updated */
+ /**
+ * TODO Remove after 2014-09-22
+ * @hide
+ */
public void addCallback(Callback callback) {
registerCallback(callback);
}
- /** STOPSHIP remove when launcher 3 has been updated */
+
+ /**
+ * TODO Remove after 2014-09-22
+ * @hide
+ */
public void removeCallback(Callback callback) {
unregisterCallback(callback);
}
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 5ce968b5e0d9..3fc9b679ac2f 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -23,6 +23,7 @@ import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.app.PackageDeleteObserver;
import android.app.PackageInstallObserver;
+import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -1518,10 +1519,17 @@ public abstract class PackageManager {
/**
* Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
- * The device supports managed profiles for enterprise users.
+ * The device supports creating secondary users and managed profiles via
+ * {@link DevicePolicyManager}.
*/
@SdkConstant(SdkConstantType.FEATURE)
- public static final String FEATURE_MANAGED_PROFILES = "android.software.managed_profiles";
+ public static final String FEATURE_MANAGED_USERS = "android.software.managed_users";
+
+ /**
+ * @hide
+ * TODO: Remove after dependencies updated b/17392243
+ */
+ public static final String FEATURE_MANAGED_PROFILES = "android.software.managed_users";
/**
* Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
@@ -3893,22 +3901,6 @@ public abstract class PackageManager {
public abstract void clearCrossProfileIntentFilters(int sourceUserId);
/**
- * Forwards all intents for {@link packageName} for user {@link sourceUserId} to user
- * {@link targetUserId}.
- * @hide
- */
- public abstract void addCrossProfileIntentsForPackage(String packageName,
- int sourceUserId, int targetUserId);
-
- /**
- * Removes all intents for {@link packageName} for user {@link sourceUserId} to user
- * {@link targetUserId}.
- * @hide
- */
- public abstract void removeCrossProfileIntentsForPackage(String packageName,
- int sourceUserId, int targetUserId);
-
- /**
* @hide
*/
public abstract Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo);
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index ddb0a6d7ab62..ffde7cefa943 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -3308,7 +3308,8 @@ public class PackageParser {
info.softInputMode = target.info.softInputMode;
info.uiOptions = target.info.uiOptions;
info.parentActivityName = target.info.parentActivityName;
-
+ info.maxRecents = target.info.maxRecents;
+
Activity a = new Activity(mParseActivityAliasArgs, info);
if (outError[0] != null) {
sa.recycle();
diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
index 843f1176833b..0057f61a0a57 100644
--- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
@@ -143,7 +143,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
}
checkNotClosed();
- checkLegalToCapture();
handler = checkHandler(handler, callback);
@@ -166,7 +165,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
}
checkNotClosed();
- checkLegalToCapture();
handler = checkHandler(handler, callback);
@@ -188,7 +186,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
}
checkNotClosed();
- checkLegalToCapture();
handler = checkHandler(handler, callback);
@@ -211,7 +208,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
}
checkNotClosed();
- checkLegalToCapture();
handler = checkHandler(handler, callback);
@@ -542,13 +538,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
}
}
- private void checkLegalToCapture() {
- if (mAborting) {
- throw new IllegalStateException(
- "Session is aborting captures; new captures are not permitted");
- }
- }
-
private void checkNotClosed() {
if (mClosed) {
throw new IllegalStateException(
diff --git a/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java b/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
index 3c0e0e44c1cc..c36b63a474d9 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
@@ -165,6 +165,12 @@ public class LegacyMetadataMapper {
private static void mapCharacteristicsFromParameters(CameraMetadataNative m,
Camera.Parameters p) {
+
+ /*
+ * colorCorrection.*
+ */
+ m.set(COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES,
+ new int[] { COLOR_CORRECTION_ABERRATION_MODE_FAST });
/*
* control.ae*
*/
@@ -196,6 +202,12 @@ public class LegacyMetadataMapper {
mapJpeg(m, p);
/*
+ * noiseReduction.*
+ */
+ m.set(NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES,
+ new int[] { NOISE_REDUCTION_MODE_FAST });
+
+ /*
* scaler.*
*/
mapScaler(m, p);
@@ -626,6 +638,7 @@ public class LegacyMetadataMapper {
// Note: We only list public keys. Native HALs should list ALL keys regardless of visibility.
Key<?> availableKeys[] = new Key<?>[] {
+ CameraCharacteristics.COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES ,
CameraCharacteristics.CONTROL_AE_AVAILABLE_ANTIBANDING_MODES ,
CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES ,
CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES ,
@@ -642,6 +655,7 @@ public class LegacyMetadataMapper {
CameraCharacteristics.JPEG_AVAILABLE_THUMBNAIL_SIZES ,
CameraCharacteristics.LENS_FACING ,
CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS ,
+ CameraCharacteristics.NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES ,
CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES ,
CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_STREAMS ,
CameraCharacteristics.REQUEST_PARTIAL_RESULT_COUNT ,
@@ -653,6 +667,7 @@ public class LegacyMetadataMapper {
CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE ,
CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE ,
CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE ,
+ CameraCharacteristics.SENSOR_INFO_TIMESTAMP_SOURCE ,
CameraCharacteristics.SENSOR_ORIENTATION ,
CameraCharacteristics.STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES ,
CameraCharacteristics.STATISTICS_INFO_MAX_FACE_COUNT ,
@@ -676,6 +691,7 @@ public class LegacyMetadataMapper {
*/
{
CaptureRequest.Key<?> defaultAvailableKeys[] = new CaptureRequest.Key<?>[] {
+ CaptureRequest.COLOR_CORRECTION_ABERRATION_MODE,
CaptureRequest.CONTROL_AE_ANTIBANDING_MODE,
CaptureRequest.CONTROL_AE_EXPOSURE_COMPENSATION,
CaptureRequest.CONTROL_AE_LOCK,
@@ -699,6 +715,7 @@ public class LegacyMetadataMapper {
CaptureRequest.JPEG_THUMBNAIL_QUALITY,
CaptureRequest.JPEG_THUMBNAIL_SIZE,
CaptureRequest.LENS_FOCAL_LENGTH,
+ CaptureRequest.NOISE_REDUCTION_MODE,
CaptureRequest.SCALER_CROP_REGION,
CaptureRequest.STATISTICS_FACE_DETECT_MODE,
};
@@ -723,6 +740,7 @@ public class LegacyMetadataMapper {
*/
{
CaptureResult.Key<?> defaultAvailableKeys[] = new CaptureResult.Key<?>[] {
+ CaptureResult.COLOR_CORRECTION_ABERRATION_MODE ,
CaptureResult.CONTROL_AE_ANTIBANDING_MODE ,
CaptureResult.CONTROL_AE_EXPOSURE_COMPENSATION ,
CaptureResult.CONTROL_AE_LOCK ,
@@ -740,6 +758,7 @@ public class LegacyMetadataMapper {
CaptureResult.JPEG_QUALITY ,
CaptureResult.JPEG_THUMBNAIL_QUALITY ,
CaptureResult.LENS_FOCAL_LENGTH ,
+ CaptureResult.NOISE_REDUCTION_MODE ,
CaptureResult.REQUEST_PIPELINE_DEPTH ,
CaptureResult.SCALER_CROP_REGION ,
CaptureResult.SENSOR_TIMESTAMP ,
@@ -844,6 +863,13 @@ public class LegacyMetadataMapper {
m.set(SENSOR_INFO_PHYSICAL_SIZE, new SizeF(width, height)); // in mm
}
+
+ /*
+ * sensor.info.timestampSource
+ */
+ {
+ m.set(SENSOR_INFO_TIMESTAMP_SOURCE, SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN);
+ }
}
private static void mapStatistics(CameraMetadataNative m, Parameters p) {
diff --git a/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java b/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java
index 42ee4fac0622..42fe897bf563 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java
@@ -80,6 +80,20 @@ public class LegacyRequestMapper {
}
}
+ /*
+ * colorCorrection.*
+ */
+ // colorCorrection.aberrationMode
+ {
+ int aberrationMode = ParamsUtils.getOrDefault(request,
+ COLOR_CORRECTION_ABERRATION_MODE,
+ /*defaultValue*/COLOR_CORRECTION_ABERRATION_MODE_FAST);
+
+ if (aberrationMode != COLOR_CORRECTION_ABERRATION_MODE_FAST) {
+ Log.w(TAG, "convertRequestToMetadata - Ignoring unsupported " +
+ "colorCorrection.aberrationMode = " + aberrationMode);
+ }
+ }
/*
* control.ae*
@@ -419,6 +433,21 @@ public class LegacyRequestMapper {
}
}
}
+
+ /*
+ * noiseReduction.*
+ */
+ // noiseReduction.mode
+ {
+ int mode = ParamsUtils.getOrDefault(request,
+ NOISE_REDUCTION_MODE,
+ /*defaultValue*/NOISE_REDUCTION_MODE_FAST);
+
+ if (mode != NOISE_REDUCTION_MODE_FAST) {
+ Log.w(TAG, "convertRequestToMetadata - Ignoring unsupported " +
+ "noiseReduction.mode = " + mode);
+ }
+ }
}
private static boolean checkForCompleteGpsData(Location location) {
diff --git a/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java b/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java
index ddaa6ee77c94..bad1d28a913c 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java
@@ -28,14 +28,12 @@ import android.hardware.camera2.legacy.ParameterUtils.ZoomData;
import android.hardware.camera2.params.MeteringRectangle;
import android.hardware.camera2.utils.ListUtils;
import android.hardware.camera2.utils.ParamsUtils;
-import android.location.Location;
import android.util.Log;
import android.util.Size;
import java.util.ArrayList;
import java.util.List;
-import static com.android.internal.util.Preconditions.*;
import static android.hardware.camera2.CaptureResult.*;
/**
@@ -73,7 +71,7 @@ public class LegacyResultMapper {
result = new CameraMetadataNative(mCachedResult);
cached = true;
} else {
- result = convertResultMetadata(legacyRequest, timestamp);
+ result = convertResultMetadata(legacyRequest);
cached = false;
// Always cache a *copy* of the metadata result,
@@ -106,12 +104,9 @@ public class LegacyResultMapper {
* Generate capture result metadata from the legacy camera request.
*
* @param legacyRequest a non-{@code null} legacy request containing the latest parameters
- * @param timestamp the timestamp to use for this result in nanoseconds.
- *
* @return a {@link CameraMetadataNative} object containing result metadata.
*/
- private static CameraMetadataNative convertResultMetadata(LegacyRequest legacyRequest,
- long timestamp) {
+ private static CameraMetadataNative convertResultMetadata(LegacyRequest legacyRequest) {
CameraCharacteristics characteristics = legacyRequest.characteristics;
CaptureRequest request = legacyRequest.captureRequest;
Size previewSize = legacyRequest.previewSize;
@@ -125,6 +120,15 @@ public class LegacyResultMapper {
request.get(CaptureRequest.SCALER_CROP_REGION), previewSize, params);
/*
+ * colorCorrection
+ */
+ // colorCorrection.aberrationMode
+ {
+ // Always hardcoded to FAST
+ result.set(COLOR_CORRECTION_ABERRATION_MODE, COLOR_CORRECTION_ABERRATION_MODE_FAST);
+ }
+
+ /*
* control
*/
@@ -274,7 +278,12 @@ public class LegacyResultMapper {
Log.w(TAG, "Null thumbnail size received from parameters.");
}
- // TODO: Remaining result metadata tags conversions.
+ /*
+ * noiseReduction.*
+ */
+ // noiseReduction.mode
+ result.set(NOISE_REDUCTION_MODE, NOISE_REDUCTION_MODE_FAST);
+
return result;
}
diff --git a/core/java/android/hardware/camera2/legacy/RequestThreadManager.java b/core/java/android/hardware/camera2/legacy/RequestThreadManager.java
index e6ff17b86455..e6da670d0c56 100644
--- a/core/java/android/hardware/camera2/legacy/RequestThreadManager.java
+++ b/core/java/android/hardware/camera2/legacy/RequestThreadManager.java
@@ -374,6 +374,9 @@ public class RequestThreadManager {
}
mIntermediateBufferSize = bestPreviewDimen;
+ mParams.setPreviewSize(mIntermediateBufferSize.getWidth(),
+ mIntermediateBufferSize.getHeight());
+
if (DEBUG) {
Log.d(TAG, "Intermediate buffer selected with dimens: " +
bestPreviewDimen.toString());
diff --git a/core/java/android/hardware/camera2/params/TonemapCurve.java b/core/java/android/hardware/camera2/params/TonemapCurve.java
index 481d67a3880a..398a7e91a53d 100644
--- a/core/java/android/hardware/camera2/params/TonemapCurve.java
+++ b/core/java/android/hardware/camera2/params/TonemapCurve.java
@@ -81,7 +81,8 @@ public final class TonemapCurve {
* <p>Values are stored as a contiguous array of {@code (Pin, Pout)} points.</p>
*
* <p>All parameters may have independent length but should have at most
- * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS} * {@value #POINT_SIZE} elements.</p>
+ * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS} * {@value #POINT_SIZE} elements and
+ * at least 2 * {@value #POINT_SIZE} elements.</p>
*
* <p>All sub-elements must be in the inclusive range of
* [{@value #LEVEL_BLACK}, {@value #LEVEL_WHITE}].</p>
@@ -110,6 +111,10 @@ public final class TonemapCurve {
checkArgumentArrayLengthDivisibleBy(green, POINT_SIZE, "green");
checkArgumentArrayLengthDivisibleBy(blue, POINT_SIZE, "blue");
+ checkArgumentArrayLengthNoLessThan(red, MIN_CURVE_LENGTH, "red");
+ checkArgumentArrayLengthNoLessThan(green, MIN_CURVE_LENGTH, "green");
+ checkArgumentArrayLengthNoLessThan(blue, MIN_CURVE_LENGTH, "blue");
+
checkArrayElementsInRange(red, LEVEL_BLACK, LEVEL_WHITE, "red");
checkArrayElementsInRange(green, LEVEL_BLACK, LEVEL_WHITE, "green");
checkArrayElementsInRange(blue, LEVEL_BLACK, LEVEL_WHITE, "blue");
@@ -140,6 +145,14 @@ public final class TonemapCurve {
return colorChannel;
}
+ private static void checkArgumentArrayLengthNoLessThan(float[] array, int minLength,
+ String arrayName) {
+ if (array.length < minLength) {
+ throw new IllegalArgumentException(arrayName + " size must be at least "
+ + minLength);
+ }
+ }
+
/**
* Get the number of points stored in this tonemap curve for the specified color channel.
*
@@ -270,6 +283,47 @@ public final class TonemapCurve {
return mHashCode;
}
+ /**
+ * Return the TonemapCurve as a string representation.
+ *
+ * <p> {@code "TonemapCurve{R:[(%f, %f), (%f, %f) ... (%f, %f)], G:[(%f, %f), (%f, %f) ...
+ * (%f, %f)], B:[(%f, %f), (%f, %f) ... (%f, %f)]}"},
+ * where each {@code (%f, %f)} respectively represents one point of the corresponding
+ * tonemap curve. </p>
+ *
+ * @return string representation of {@link TonemapCurve}
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TonemapCurve{");
+ sb.append("R:");
+ sb.append(curveToString(CHANNEL_RED));
+ sb.append(", G:");
+ sb.append(curveToString(CHANNEL_GREEN));
+ sb.append(", B:");
+ sb.append(curveToString(CHANNEL_BLUE));
+ sb.append("}");
+ return sb.toString();
+ }
+
+ private String curveToString(int colorChannel) {
+ checkArgumentColorChannel(colorChannel);
+ StringBuilder sb = new StringBuilder("[");
+ float[] curve = getCurve(colorChannel);
+ int pointCount = curve.length / POINT_SIZE;
+ for (int i = 0, j = 0; i < pointCount; i++, j += 2) {
+ sb.append("(");
+ sb.append(curve[j]);
+ sb.append(", ");
+ sb.append(curve[j+1]);
+ sb.append("), ");
+ }
+ // trim extra ", " at the end. Guaranteed to work because pointCount >= 2
+ sb.setLength(sb.length() - 2);
+ sb.append("]");
+ return sb.toString();
+ }
+
private float[] getCurve(int colorChannel) {
switch (colorChannel) {
case CHANNEL_RED:
@@ -285,6 +339,8 @@ public final class TonemapCurve {
private final static int OFFSET_POINT_IN = 0;
private final static int OFFSET_POINT_OUT = 1;
+ private final static int TONEMAP_MIN_CURVE_POINTS = 2;
+ private final static int MIN_CURVE_LENGTH = TONEMAP_MIN_CURVE_POINTS * POINT_SIZE;
private final float[] mRed;
private final float[] mGreen;
@@ -292,4 +348,4 @@ public final class TonemapCurve {
private int mHashCode;
private boolean mHashCalculated = false;
-};
+}
diff --git a/core/java/android/hardware/hdmi/HdmiTvClient.java b/core/java/android/hardware/hdmi/HdmiTvClient.java
index c37fb5bd21fc..9d92fd9c7fbd 100644
--- a/core/java/android/hardware/hdmi/HdmiTvClient.java
+++ b/core/java/android/hardware/hdmi/HdmiTvClient.java
@@ -36,9 +36,9 @@ public final class HdmiTvClient extends HdmiClient {
private static final String TAG = "HdmiTvClient";
/**
- * Size of MHL scratchpad register.
+ * Size of MHL register for vendor command
*/
- public static final int SCRATCHPAD_DATA_SIZE = 16;
+ public static final int VENDOR_DATA_SIZE = 16;
HdmiTvClient(IHdmiControlService service) {
super(service);
@@ -332,31 +332,31 @@ public final class HdmiTvClient extends HdmiClient {
}
/**
- * Interface used to get incoming MHL scratchpad command.
+ * Interface used to get incoming MHL vendor command.
*/
- public interface HdmiMhlScratchpadCommandListener {
+ public interface HdmiMhlVendorCommandListener {
void onReceived(int portId, int offset, int length, byte[] data);
}
/**
- * Set {@link HdmiMhlScratchpadCommandListener} to get incoming MHL sSratchpad command.
+ * Set {@link HdmiMhlVendorCommandListener} to get incoming MHL vendor command.
*
- * @param listener to receive incoming MHL Scratchpad command
+ * @param listener to receive incoming MHL vendor command
*/
- public void setHdmiMhlScratchpadCommandListener(HdmiMhlScratchpadCommandListener listener) {
+ public void setHdmiMhlVendorCommandListener(HdmiMhlVendorCommandListener listener) {
if (listener == null) {
throw new IllegalArgumentException("listener must not be null.");
}
try {
- mService.addHdmiMhlScratchpadCommandListener(getListenerWrapper(listener));
+ mService.addHdmiMhlVendorCommandListener(getListenerWrapper(listener));
} catch (RemoteException e) {
- Log.e(TAG, "failed to set hdmi mhl scratchpad command listener: ", e);
+ Log.e(TAG, "failed to set hdmi mhl vendor command listener: ", e);
}
}
- private IHdmiMhlScratchpadCommandListener getListenerWrapper(
- final HdmiMhlScratchpadCommandListener listener) {
- return new IHdmiMhlScratchpadCommandListener.Stub() {
+ private IHdmiMhlVendorCommandListener getListenerWrapper(
+ final HdmiMhlVendorCommandListener listener) {
+ return new IHdmiMhlVendorCommandListener.Stub() {
@Override
public void onReceived(int portId, int offset, int length, byte[] data) {
listener.onReceived(portId, offset, length, data);
@@ -365,29 +365,29 @@ public final class HdmiTvClient extends HdmiClient {
}
/**
- * Send MHL Scratchpad command to the device connected to a port of the given portId.
+ * Send MHL vendor command to the device connected to a port of the given portId.
*
- * @param portId id of port to send MHL Scratchpad command
+ * @param portId id of port to send MHL vendor command
* @param offset offset in the in given data
* @param length length of data. offset + length should be bound to length of data.
- * @param data container for Scratchpad data. It should be 16 bytes.
+ * @param data container for vendor command data. It should be 16 bytes.
* @throws IllegalArgumentException if the given parameters are invalid
*/
- public void sendScratchpadCommand(int portId, int offset, int length, byte[] data) {
- if (data == null || data.length != SCRATCHPAD_DATA_SIZE) {
- throw new IllegalArgumentException("Invalid scratchpad data.");
+ public void sendMhlVendorCommand(int portId, int offset, int length, byte[] data) {
+ if (data == null || data.length != VENDOR_DATA_SIZE) {
+ throw new IllegalArgumentException("Invalid vendor command data.");
}
- if (offset < 0 || offset >= SCRATCHPAD_DATA_SIZE) {
+ if (offset < 0 || offset >= VENDOR_DATA_SIZE) {
throw new IllegalArgumentException("Invalid offset:" + offset);
}
- if (length < 0 || offset + length > SCRATCHPAD_DATA_SIZE) {
+ if (length < 0 || offset + length > VENDOR_DATA_SIZE) {
throw new IllegalArgumentException("Invalid length:" + length);
}
try {
- mService.sendScratchpadCommand(portId, offset, length, data);
+ mService.sendMhlVendorCommand(portId, offset, length, data);
} catch (RemoteException e) {
- Log.e(TAG, "failed to send scratchpad command: ", e);
+ Log.e(TAG, "failed to send vendor command: ", e);
}
}
}
diff --git a/core/java/android/hardware/hdmi/IHdmiControlService.aidl b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
index 3bd45ed2e372..4866a9a9b6e2 100644
--- a/core/java/android/hardware/hdmi/IHdmiControlService.aidl
+++ b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
@@ -22,7 +22,7 @@ import android.hardware.hdmi.IHdmiControlCallback;
import android.hardware.hdmi.IHdmiDeviceEventListener;
import android.hardware.hdmi.IHdmiHotplugEventListener;
import android.hardware.hdmi.IHdmiInputChangeListener;
-import android.hardware.hdmi.IHdmiMhlScratchpadCommandListener;
+import android.hardware.hdmi.IHdmiMhlVendorCommandListener;
import android.hardware.hdmi.IHdmiRecordListener;
import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener;
import android.hardware.hdmi.IHdmiVendorCommandListener;
@@ -62,11 +62,12 @@ interface IHdmiControlService {
void sendVendorCommand(int deviceType, int targetAddress, in byte[] params,
boolean hasVendorId);
void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType);
+ void sendStandby(int deviceType, int deviceId);
void setHdmiRecordListener(IHdmiRecordListener callback);
void startOneTouchRecord(int recorderAddress, in byte[] recordSource);
void stopOneTouchRecord(int recorderAddress);
void startTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource);
void clearTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource);
- void sendScratchpadCommand(int portId, int offset, int length, in byte[] data);
- void addHdmiMhlScratchpadCommandListener(IHdmiMhlScratchpadCommandListener listener);
+ void sendMhlVendorCommand(int portId, int offset, int length, in byte[] data);
+ void addHdmiMhlVendorCommandListener(IHdmiMhlVendorCommandListener listener);
}
diff --git a/core/java/android/hardware/hdmi/IHdmiMhlScratchpadCommandListener.aidl b/core/java/android/hardware/hdmi/IHdmiMhlVendorCommandListener.aidl
index 4176597ae8b6..4696677bc73c 100644
--- a/core/java/android/hardware/hdmi/IHdmiMhlScratchpadCommandListener.aidl
+++ b/core/java/android/hardware/hdmi/IHdmiMhlVendorCommandListener.aidl
@@ -17,11 +17,10 @@
package android.hardware.hdmi;
/**
- * Callback interface definition for MHL client to get the scratchpad
- * command.
+ * Callback interface definition for MHL client to get the vendor command.
*
* @hide
*/
- oneway interface IHdmiMhlScratchpadCommandListener {
+ oneway interface IHdmiMhlVendorCommandListener {
void onReceived(int portId, int offset, int length, in byte[] data);
}
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.java b/core/java/android/hardware/soundtrigger/SoundTrigger.java
index 7390e2b6b7de..746ead29bf2e 100644
--- a/core/java/android/hardware/soundtrigger/SoundTrigger.java
+++ b/core/java/android/hardware/soundtrigger/SoundTrigger.java
@@ -873,7 +873,7 @@ public class SoundTrigger {
int capturePreambleMs = in.readInt();
boolean triggerInData = in.readByte() == 1;
AudioFormat captureFormat = null;
- if (triggerInData) {
+ if (in.readByte() == 1) {
int sampleRate = in.readInt();
int encoding = in.readInt();
int channelMask = in.readInt();
@@ -899,7 +899,8 @@ public class SoundTrigger {
dest.writeInt(captureSession);
dest.writeInt(captureDelayMs);
dest.writeInt(capturePreambleMs);
- if (triggerInData && (captureFormat != null)) {
+ dest.writeByte((byte) (triggerInData ? 1 : 0));
+ if (captureFormat != null) {
dest.writeByte((byte)1);
dest.writeInt(captureFormat.getSampleRate());
dest.writeInt(captureFormat.getEncoding());
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 70b402d8fcf6..7c69a7da145f 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -48,6 +48,8 @@ import java.net.InetAddress;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.HashMap;
+import libcore.net.event.NetworkEventDispatcher;
+
/**
* Class that answers queries about the state of network connectivity. It also
* notifies applications when network connectivity changes. Get an instance
@@ -2467,7 +2469,20 @@ public class ConnectivityManager {
* @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
*/
public static boolean setProcessDefaultNetwork(Network network) {
- return NetworkUtils.bindProcessToNetwork(network == null ? NETID_UNSET : network.netId);
+ int netId = (network == null) ? NETID_UNSET : network.netId;
+ if (netId == NetworkUtils.getNetworkBoundToProcess()) {
+ return true;
+ }
+ if (NetworkUtils.bindProcessToNetwork(netId)) {
+ // Must flush DNS cache as new network may have different DNS resolutions.
+ InetAddress.clearDnsCache();
+ // Must flush socket pool as idle sockets will be bound to previous network and may
+ // cause subsequent fetches to be performed on old network.
+ NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
+ return true;
+ } else {
+ return false;
+ }
}
/**
diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java
index e686be797997..58f0fc047dd8 100644
--- a/core/java/android/net/Network.java
+++ b/core/java/android/net/Network.java
@@ -37,6 +37,8 @@ import javax.net.SocketFactory;
import com.android.okhttp.ConnectionPool;
import com.android.okhttp.HostResolver;
+import com.android.okhttp.HttpHandler;
+import com.android.okhttp.HttpsHandler;
import com.android.okhttp.OkHttpClient;
/**
@@ -58,7 +60,10 @@ public class Network implements Parcelable {
// Objects used to perform per-network operations such as getSocketFactory
// and openConnection, and a lock to protect access to them.
private volatile NetworkBoundSocketFactory mNetworkBoundSocketFactory = null;
- private volatile OkHttpClient mOkHttpClient = null;
+ // mLock should be used to control write access to mConnectionPool and mHostResolver.
+ // maybeInitHttpClient() must be called prior to reading either variable.
+ private volatile ConnectionPool mConnectionPool = null;
+ private volatile HostResolver mHostResolver = null;
private Object mLock = new Object();
// Default connection pool values. These are evaluated at startup, just
@@ -195,37 +200,34 @@ public class Network implements Parcelable {
return mNetworkBoundSocketFactory;
}
- // TODO: This creates an OkHttpClient with its own connection pool for
+ // TODO: This creates a connection pool and host resolver for
// every Network object, instead of one for every NetId. This is
// suboptimal, because an app could potentially have more than one
// Network object for the same NetId, causing increased memory footprint
// and performance penalties due to lack of connection reuse (connection
// setup time, congestion window growth time, etc.).
//
- // Instead, investigate only having one OkHttpClient for every NetId,
- // perhaps by using a static HashMap of NetIds to OkHttpClient objects. The
- // tricky part is deciding when to remove an OkHttpClient; a WeakHashMap
- // shouldn't be used because whether a Network is referenced doesn't
- // correlate with whether a new Network will be instantiated in the near
- // future with the same NetID. A good solution would involve purging empty
- // (or when all connections are timed out) ConnectionPools.
+ // Instead, investigate only having one connection pool and host resolver
+ // for every NetId, perhaps by using a static HashMap of NetIds to
+ // connection pools and host resolvers. The tricky part is deciding when
+ // to remove a map entry; a WeakHashMap shouldn't be used because whether
+ // a Network is referenced doesn't correlate with whether a new Network
+ // will be instantiated in the near future with the same NetID. A good
+ // solution would involve purging empty (or when all connections are timed
+ // out) ConnectionPools.
private void maybeInitHttpClient() {
- if (mOkHttpClient == null) {
- synchronized (mLock) {
- if (mOkHttpClient == null) {
- HostResolver hostResolver = new HostResolver() {
- @Override
- public InetAddress[] getAllByName(String host) throws UnknownHostException {
- return Network.this.getAllByName(host);
- }
- };
- ConnectionPool pool = new ConnectionPool(httpMaxConnections,
- httpKeepAliveDurationMs);
- mOkHttpClient = new OkHttpClient()
- .setSocketFactory(getSocketFactory())
- .setHostResolver(hostResolver)
- .setConnectionPool(pool);
- }
+ synchronized (mLock) {
+ if (mHostResolver == null) {
+ mHostResolver = new HostResolver() {
+ @Override
+ public InetAddress[] getAllByName(String host) throws UnknownHostException {
+ return Network.this.getAllByName(host);
+ }
+ };
+ }
+ if (mConnectionPool == null) {
+ mConnectionPool = new ConnectionPool(httpMaxConnections,
+ httpKeepAliveDurationMs);
}
}
}
@@ -242,13 +244,23 @@ public class Network implements Parcelable {
public URLConnection openConnection(URL url) throws IOException {
maybeInitHttpClient();
String protocol = url.getProtocol();
- URLStreamHandler handler = mOkHttpClient.createURLStreamHandler(protocol);
- if (handler == null) {
+ OkHttpClient client;
+ // TODO: HttpHandler creates OkHttpClients that share the default ResponseCache.
+ // Could this cause unexpected behavior?
+ // TODO: Should the network's proxy be specified?
+ if (protocol.equals("http")) {
+ client = HttpHandler.createHttpOkHttpClient(null /* proxy */);
+ } else if (protocol.equals("https")) {
+ client = HttpsHandler.createHttpsOkHttpClient(null /* proxy */);
+ } else {
// OkHttpClient only supports HTTP and HTTPS and returns a null URLStreamHandler if
// passed another protocol.
throw new MalformedURLException("Invalid URL or unrecognized protocol " + protocol);
}
- return new URL(url, "", handler).openConnection();
+ return client.setSocketFactory(getSocketFactory())
+ .setHostResolver(mHostResolver)
+ .setConnectionPool(mConnectionPool)
+ .open(url);
}
/**
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 8df9916deb06..80e5b91ecc0c 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -223,6 +223,9 @@ public abstract class NetworkAgent extends Handler {
* Called by the bearer code when it has a new score for this network.
*/
public void sendNetworkScore(int score) {
+ if (score < 0) {
+ throw new IllegalArgumentException("Score must be >= 0");
+ }
queueOrSendMessage(EVENT_NETWORK_SCORE_CHANGED, new Integer(score));
}
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index 050be40e4160..c8489937f057 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -62,7 +62,8 @@ import java.util.List;
* conflict with each other. The system takes several actions to address
* these issues. Here are some key points:
* <ul>
- * <li>User action is required to create a VPN connection.</li>
+ * <li>User action is required the first time an application creates a VPN
+ * connection.</li>
* <li>There can be only one VPN connection running at the same time. The
* existing interface is deactivated when a new one is created.</li>
* <li>A system-managed notification is shown during the lifetime of a
@@ -82,8 +83,8 @@ import java.util.List;
* other methods in this class, and the right can be revoked at any time.
* Here are the general steps to create a VPN connection:
* <ol>
- * <li>When the user press the button to connect, call {@link #prepare}
- * and launch the returned intent.</li>
+ * <li>When the user presses the button to connect, call {@link #prepare}
+ * and launch the returned intent, if non-null.</li>
* <li>When the application becomes prepared, start the service.</li>
* <li>Create a tunnel to the remote server and negotiate the network
* parameters for the VPN connection.</li>
@@ -130,7 +131,8 @@ public class VpnService extends Service {
/**
* Prepare to establish a VPN connection. This method returns {@code null}
- * if the VPN application is already prepared. Otherwise, it returns an
+ * if the VPN application is already prepared or if the user has previously
+ * consented to the VPN application. Otherwise, it returns an
* {@link Intent} to a system activity. The application should launch the
* activity using {@link Activity#startActivityForResult} to get itself
* prepared. The activity may pop up a dialog to require user action, and
@@ -144,6 +146,10 @@ public class VpnService extends Service {
* it becomes prepared again, subsequent calls to other methods in this
* class will fail.
*
+ * <p>The user may disable the VPN at any time while it is activated, in
+ * which case this method will return an intent the next time it is
+ * executed to obtain the user's consent again.
+ *
* @see #onRevoke
*/
public static Intent prepare(Context context) {
@@ -212,6 +218,8 @@ public class VpnService extends Service {
*
* @return {@code true} on success.
* @see Builder#addAddress
+ *
+ * @hide
*/
public boolean addAddress(InetAddress address, int prefixLength) {
check(address, prefixLength);
@@ -240,6 +248,8 @@ public class VpnService extends Service {
* @param prefixLength The prefix length of the address.
*
* @return {@code true} on success.
+ *
+ * @hide
*/
public boolean removeAddress(InetAddress address, int prefixLength) {
check(address, prefixLength);
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index 328662775996..b5295fb24f63 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -41,6 +41,7 @@ interface IUserManager {
int getUserSerialNumber(int userHandle);
int getUserHandle(int userSerialNumber);
Bundle getUserRestrictions(int userHandle);
+ boolean hasUserRestriction(in String restrictionKey, int userHandle);
void setUserRestrictions(in Bundle restrictions, int userHandle);
void setApplicationRestrictions(in String packageName, in Bundle restrictions,
int userHandle);
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index d1ad0ad41941..5230128fabbd 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -236,6 +236,7 @@ public final class Parcel {
private static final int EX_NULL_POINTER = -4;
private static final int EX_ILLEGAL_STATE = -5;
private static final int EX_NETWORK_MAIN_THREAD = -6;
+ private static final int EX_UNSUPPORTED_OPERATION = -7;
private static final int EX_HAS_REPLY_HEADER = -128; // special; see below
private static native int nativeDataSize(long nativePtr);
@@ -1427,6 +1428,8 @@ public final class Parcel {
code = EX_ILLEGAL_STATE;
} else if (e instanceof NetworkOnMainThreadException) {
code = EX_NETWORK_MAIN_THREAD;
+ } else if (e instanceof UnsupportedOperationException) {
+ code = EX_UNSUPPORTED_OPERATION;
}
writeInt(code);
StrictMode.clearGatheredViolations();
@@ -1545,6 +1548,8 @@ public final class Parcel {
throw new IllegalStateException(msg);
case EX_NETWORK_MAIN_THREAD:
throw new NetworkOnMainThreadException();
+ case EX_UNSUPPORTED_OPERATION:
+ throw new UnsupportedOperationException(msg);
}
throw new RuntimeException("Unknown exception code: " + code
+ " msg " + msg);
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 00e2e2207305..18b208255cb2 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -248,7 +248,7 @@ public final class PowerManager {
* {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor
* indicates that an object is not in close proximity.
*/
- public static final int WAIT_FOR_DISTANT_PROXIMITY = 1;
+ public static final int RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY = 1;
/**
* Brightness value for fully on.
@@ -961,8 +961,8 @@ public final class PowerManager {
* </p>
*
* @param flags Combination of flag values to modify the release behavior.
- * Currently only {@link #WAIT_FOR_DISTANT_PROXIMITY} is supported. Passing 0 is
- * equivalent to calling {@link #release()}.
+ * Currently only {@link #RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY} is supported.
+ * Passing 0 is equivalent to calling {@link #release()}.
*/
public void release(int flags) {
synchronized (mToken) {
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 33fda4a04729..c25278f19d9b 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -630,7 +630,13 @@ public class UserManager {
* @param userHandle the UserHandle of the user for whom to retrieve the restrictions.
*/
public boolean hasUserRestriction(String restrictionKey, UserHandle userHandle) {
- return getUserRestrictions(userHandle).getBoolean(restrictionKey, false);
+ try {
+ return mService.hasUserRestriction(restrictionKey,
+ userHandle.getIdentifier());
+ } catch (RemoteException re) {
+ Log.w(TAG, "Could not check user restrictions", re);
+ return false;
+ }
}
/**
@@ -992,6 +998,7 @@ public class UserManager {
* Returns a file descriptor for the user's photo. PNG data can be read from this file.
* @param userHandle the user whose photo we want to read.
* @return a {@link Bitmap} of the user's photo, or null if there's no photo.
+ * @see com.android.internal.util.UserIcons#getDefaultUserIcon for a default.
* @hide
*/
public Bitmap getUserIcon(int userHandle) {
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index a5e86d80d55f..c8d0fd50c2d3 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -33,7 +33,7 @@ import android.provider.ContactsContract.CommonDataKinds.Callable;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.DataUsageFeedback;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.PhoneAccountHandle;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 01fda47c2080..440b1ecbd9a7 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3150,6 +3150,11 @@ public final class Settings {
/** @hide */
public static boolean putStringForUser(ContentResolver resolver, String name, String value,
int userHandle) {
+ if (LOCATION_MODE.equals(name)) {
+ // HACK ALERT: temporary hack to work around b/10491283.
+ // TODO: once b/10491283 fixed, remove this hack
+ return setLocationModeForUser(resolver, Integer.parseInt(value), userHandle);
+ }
if (MOVED_TO_GLOBAL.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Global");
@@ -3265,11 +3270,6 @@ public final class Settings {
/** @hide */
public static boolean putIntForUser(ContentResolver cr, String name, int value,
int userHandle) {
- if (LOCATION_MODE.equals(name)) {
- // HACK ALERT: temporary hack to work around b/10491283.
- // TODO: once b/10491283 fixed, remove this hack
- return setLocationModeForUser(cr, value, userHandle);
- }
return putStringForUser(cr, name, Integer.toString(value), userHandle);
}
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index 7e04ae87bb4b..92647f05190f 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -29,7 +29,6 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.RemoteException;
-import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.Slog;
import android.view.ActionMode;
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index a4b6e925aef9..9be220e89618 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -46,7 +46,6 @@ import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.Set;
-import java.util.TreeSet;
/**
*
@@ -1567,10 +1566,10 @@ public class TextToSpeech {
@Override
public Set<Locale> run(ITextToSpeechService service) throws RemoteException {
List<Voice> voices = service.getVoices();
- if (voices != null) {
- return new TreeSet<Locale>();
+ if (voices == null) {
+ return new HashSet<Locale>();
}
- TreeSet<Locale> locales = new TreeSet<Locale>();
+ HashSet<Locale> locales = new HashSet<Locale>();
for (Voice voice : voices) {
locales.add(voice.getLocale());
}
@@ -1593,7 +1592,7 @@ public class TextToSpeech {
@Override
public Set<Voice> run(ITextToSpeechService service) throws RemoteException {
List<Voice> voices = service.getVoices();
- return (voices != null) ? new TreeSet<Voice>(voices) : new TreeSet<Voice>();
+ return (voices != null) ? new HashSet<Voice>(voices) : new HashSet<Voice>();
}
}, null, "getVoices");
}
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index 40bb6ec8c4d3..b677888852da 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -690,11 +690,18 @@ public abstract class Transition implements Cloneable {
for (int i = 0; i < startValuesListCount; ++i) {
TransitionValues start = startValuesList.get(i);
TransitionValues end = endValuesList.get(i);
- // Only bother trying to animate with valid values that differ between start/end
- boolean isInvalidStart = start != null && !isValidTarget(start.view);
- boolean isInvalidEnd = end != null && !isValidTarget(end.view);
- boolean isChanged = start != end && (start == null || !start.equals(end));
- if (isChanged && !isInvalidStart && !isInvalidEnd) {
+ if (start != null && !start.targetedTransitions.contains(this)) {
+ start = null;
+ }
+ if (end != null && !end.targetedTransitions.contains(this)) {
+ end = null;
+ }
+ if (start == null && end == null) {
+ continue;
+ }
+ // Only bother trying to animate with values that differ between start/end
+ boolean isChanged = start == null || end == null || areValuesChanged(start, end);
+ if (isChanged) {
if (DBG) {
View view = (end != null) ? end.view : start.view;
Log.d(LOG_TAG, " differing start/end values for view " + view);
@@ -1415,11 +1422,12 @@ public abstract class Transition implements Cloneable {
} else {
captureEndValues(values);
}
+ values.targetedTransitions.add(this);
capturePropagationValues(values);
if (start) {
- addViewValues(mStartValues, view, values, true);
+ addViewValues(mStartValues, view, values);
} else {
- addViewValues(mEndValues, view, values, true);
+ addViewValues(mEndValues, view, values);
}
}
}
@@ -1432,6 +1440,7 @@ public abstract class Transition implements Cloneable {
} else {
captureEndValues(values);
}
+ values.targetedTransitions.add(this);
capturePropagationValues(values);
if (start) {
mStartValues.viewValues.put(view, values);
@@ -1460,7 +1469,7 @@ public abstract class Transition implements Cloneable {
}
static void addViewValues(TransitionValuesMaps transitionValuesMaps,
- View view, TransitionValues transitionValues, boolean setTransientState) {
+ View view, TransitionValues transitionValues) {
transitionValuesMaps.viewValues.put(view, transitionValues);
int id = view.getId();
if (id >= 0) {
@@ -1489,15 +1498,11 @@ public abstract class Transition implements Cloneable {
// Duplicate item IDs: cannot match by item ID.
View alreadyMatched = transitionValuesMaps.itemIdValues.get(itemId);
if (alreadyMatched != null) {
- if (setTransientState) {
- alreadyMatched.setHasTransientState(false);
- }
+ alreadyMatched.setHasTransientState(false);
transitionValuesMaps.itemIdValues.put(itemId, null);
}
} else {
- if (setTransientState) {
- view.setHasTransientState(true);
- }
+ view.setHasTransientState(true);
transitionValuesMaps.itemIdValues.put(itemId, view);
}
}
@@ -1562,11 +1567,12 @@ public abstract class Transition implements Cloneable {
} else {
captureEndValues(values);
}
+ values.targetedTransitions.add(this);
capturePropagationValues(values);
if (start) {
- addViewValues(mStartValues, view, values, true);
+ addViewValues(mStartValues, view, values);
} else {
- addViewValues(mEndValues, view, values, true);
+ addViewValues(mEndValues, view, values);
}
}
if (view instanceof ViewGroup) {
@@ -1731,8 +1737,10 @@ public abstract class Transition implements Cloneable {
if (oldInfo != null && oldInfo.view != null && oldInfo.windowId == windowId) {
TransitionValues oldValues = oldInfo.values;
View oldView = oldInfo.view;
- TransitionValues newValues = getMatchedTransitionValues(oldView, true);
- boolean cancel = oldInfo.transition.areValuesChanged(oldValues, newValues);
+ TransitionValues startValues = getTransitionValues(oldView, true);
+ TransitionValues endValues = getMatchedTransitionValues(oldView, true);
+ boolean cancel = (startValues != null || endValues != null) &&
+ oldInfo.transition.areValuesChanged(oldValues, endValues);
if (cancel) {
if (anim.isRunning() || anim.isStarted()) {
if (DBG) {
@@ -1784,7 +1792,17 @@ public abstract class Transition implements Cloneable {
String key) {
Object oldValue = oldValues.values.get(key);
Object newValue = newValues.values.get(key);
- boolean changed = (oldValue != null && newValue != null && !oldValue.equals(newValue));
+ boolean changed;
+ if (oldValue == null && newValue == null) {
+ // both are null
+ changed = false;
+ } else if (oldValue == null || newValue == null) {
+ // one is null
+ changed = true;
+ } else {
+ // neither is null
+ changed = !oldValue.equals(newValue);
+ }
if (DBG && changed) {
Log.d(LOG_TAG, "Transition.playTransition: " +
"oldValue != newValue for " + key +
diff --git a/core/java/android/transition/TransitionSet.java b/core/java/android/transition/TransitionSet.java
index 56db674d5de5..09d2c69138be 100644
--- a/core/java/android/transition/TransitionSet.java
+++ b/core/java/android/transition/TransitionSet.java
@@ -388,42 +388,41 @@ public class TransitionSet extends Transition {
protected void createAnimators(ViewGroup sceneRoot, TransitionValuesMaps startValues,
TransitionValuesMaps endValues, ArrayList<TransitionValues> startValuesList,
ArrayList<TransitionValues> endValuesList) {
- startValues = removeExcludes(startValues);
- endValues = removeExcludes(endValues);
- for (Transition childTransition : mTransitions) {
+ long startDelay = getStartDelay();
+ int numTransitions = mTransitions.size();
+ for (int i = 0; i < numTransitions; i++) {
+ Transition childTransition = mTransitions.get(i);
+ // We only set the start delay on the first transition if we are playing
+ // the transitions sequentially.
+ if (startDelay > 0 && (mPlayTogether || i == 0)) {
+ long childStartDelay = childTransition.getStartDelay();
+ if (childStartDelay > 0) {
+ childTransition.setStartDelay(startDelay + childStartDelay);
+ } else {
+ childTransition.setStartDelay(startDelay);
+ }
+ }
childTransition.createAnimators(sceneRoot, startValues, endValues, startValuesList,
endValuesList);
}
}
- private TransitionValuesMaps removeExcludes(TransitionValuesMaps values) {
- if (mTargetIds.isEmpty() && mTargetIdExcludes == null && mTargetTypeExcludes == null
- && mTargetNames == null && mTargetTypes == null
- && mTargetExcludes == null && mTargetNameExcludes == null
- && mTargets.isEmpty()) {
- return values;
- }
- TransitionValuesMaps included = new TransitionValuesMaps();
- int numValues = values.viewValues.size();
- for (int i = 0; i < numValues; i++) {
- View view = values.viewValues.keyAt(i);
- if (isValidTarget(view)) {
- addViewValues(included, view, values.viewValues.valueAt(i), false);
- }
- }
- return included;
- }
-
/**
* @hide
*/
@Override
protected void runAnimators() {
+ if (mTransitions.isEmpty()) {
+ start();
+ end();
+ return;
+ }
setupStartEndListeners();
+ int numTransitions = mTransitions.size();
if (!mPlayTogether) {
// Setup sequence with listeners
// TODO: Need to add listeners in such a way that we can remove them later if canceled
- for (int i = 1; i < mTransitions.size(); ++i) {
+ for (int i = 1; i < numTransitions; ++i) {
Transition previousTransition = mTransitions.get(i - 1);
final Transition nextTransition = mTransitions.get(i);
previousTransition.addListener(new TransitionListenerAdapter() {
@@ -439,8 +438,8 @@ public class TransitionSet extends Transition {
firstTransition.runAnimators();
}
} else {
- for (Transition childTransition : mTransitions) {
- childTransition.runAnimators();
+ for (int i = 0; i < numTransitions; ++i) {
+ mTransitions.get(i).runAnimators();
}
}
}
@@ -451,6 +450,7 @@ public class TransitionSet extends Transition {
for (Transition childTransition : mTransitions) {
if (childTransition.isValidTarget(transitionValues.view)) {
childTransition.captureStartValues(transitionValues);
+ transitionValues.targetedTransitions.add(childTransition);
}
}
}
@@ -462,6 +462,7 @@ public class TransitionSet extends Transition {
for (Transition childTransition : mTransitions) {
if (childTransition.isValidTarget(transitionValues.view)) {
childTransition.captureEndValues(transitionValues);
+ transitionValues.targetedTransitions.add(childTransition);
}
}
}
diff --git a/core/java/android/transition/TransitionValues.java b/core/java/android/transition/TransitionValues.java
index 8989f89295f6..11f2962632b6 100644
--- a/core/java/android/transition/TransitionValues.java
+++ b/core/java/android/transition/TransitionValues.java
@@ -20,6 +20,7 @@ import android.util.ArrayMap;
import android.view.View;
import android.view.ViewGroup;
+import java.util.ArrayList;
import java.util.Map;
/**
@@ -52,6 +53,11 @@ public class TransitionValues {
*/
public final Map<String, Object> values = new ArrayMap<String, Object>();
+ /**
+ * The Transitions that targeted this view.
+ */
+ final ArrayList<Transition> targetedTransitions = new ArrayList<Transition>();
+
@Override
public boolean equals(Object other) {
if (other instanceof TransitionValues) {
diff --git a/core/java/android/transition/Visibility.java b/core/java/android/transition/Visibility.java
index d648ca627b9d..d87d0f99a0a9 100644
--- a/core/java/android/transition/Visibility.java
+++ b/core/java/android/transition/Visibility.java
@@ -277,6 +277,18 @@ public abstract class Visibility extends Transition {
if ((mMode & MODE_IN) != MODE_IN || endValues == null) {
return null;
}
+ if (startValues == null) {
+ VisibilityInfo parentVisibilityInfo = null;
+ View endParent = (View) endValues.view.getParent();
+ TransitionValues startParentValues = getMatchedTransitionValues(endParent,
+ false);
+ TransitionValues endParentValues = getTransitionValues(endParent, false);
+ parentVisibilityInfo =
+ getVisibilityChangeInfo(startParentValues, endParentValues);
+ if (parentVisibilityInfo.visibilityChange) {
+ return null;
+ }
+ }
return onAppear(sceneRoot, endValues.view, startValues, endValues);
}
diff --git a/core/java/android/util/SizeF.java b/core/java/android/util/SizeF.java
index ac4f18765a59..2edc4a7ff588 100644
--- a/core/java/android/util/SizeF.java
+++ b/core/java/android/util/SizeF.java
@@ -16,6 +16,7 @@
package android.util;
+import static com.android.internal.util.Preconditions.checkNotNull;
import static com.android.internal.util.Preconditions.checkArgumentFinite;
/**
@@ -95,6 +96,61 @@ public final class SizeF {
return mWidth + "x" + mHeight;
}
+ private static NumberFormatException invalidSizeF(String s) {
+ throw new NumberFormatException("Invalid SizeF: \"" + s + "\"");
+ }
+
+ /**
+ * Parses the specified string as a size value.
+ * <p>
+ * The ASCII characters {@code \}{@code u002a} ('*') and
+ * {@code \}{@code u0078} ('x') are recognized as separators between
+ * the width and height.</p>
+ * <p>
+ * For any {@code SizeF s}: {@code SizeF.parseSizeF(s.toString()).equals(s)}.
+ * However, the method also handles sizes expressed in the
+ * following forms:</p>
+ * <p>
+ * "<i>width</i>{@code x}<i>height</i>" or
+ * "<i>width</i>{@code *}<i>height</i>" {@code => new SizeF(width, height)},
+ * where <i>width</i> and <i>height</i> are string floats potentially
+ * containing a sign, such as "-10.3", "+7" or "5.2", but not containing
+ * an {@code 'x'} (such as a float in hexadecimal string format).</p>
+ *
+ * <pre>{@code
+ * SizeF.parseSizeF("3.2*+6").equals(new SizeF(3.2f, 6.0f)) == true
+ * SizeF.parseSizeF("-3x-6").equals(new SizeF(-3.0f, -6.0f)) == true
+ * SizeF.parseSizeF("4 by 3") => throws NumberFormatException
+ * }</pre>
+ *
+ * @param string the string representation of a size value.
+ * @return the size value represented by {@code string}.
+ *
+ * @throws NumberFormatException if {@code string} cannot be parsed
+ * as a size value.
+ * @throws NullPointerException if {@code string} was {@code null}
+ */
+ public static SizeF parseSizeF(String string)
+ throws NumberFormatException {
+ checkNotNull(string, "string must not be null");
+
+ int sep_ix = string.indexOf('*');
+ if (sep_ix < 0) {
+ sep_ix = string.indexOf('x');
+ }
+ if (sep_ix < 0) {
+ throw invalidSizeF(string);
+ }
+ try {
+ return new SizeF(Float.parseFloat(string.substring(0, sep_ix)),
+ Float.parseFloat(string.substring(sep_ix + 1)));
+ } catch (NumberFormatException e) {
+ throw invalidSizeF(string);
+ } catch (IllegalArgumentException e) {
+ throw invalidSizeF(string);
+ }
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index edb379884441..d23e1154b723 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -339,7 +339,8 @@ public abstract class HardwareRenderer {
* @param attachInfo AttachInfo tied to the specified view.
* @param callbacks Callbacks invoked when drawing happens.
*/
- abstract void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks);
+ abstract void draw(View view, View.AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
+ boolean isStartingWindow);
/**
* Creates a new hardware layer. A hardware layer built by calling this
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index 5d2822d895ae..3d1332c54018 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -16,6 +16,7 @@
package android.view;
+import android.graphics.Color;
import com.android.internal.R;
import android.content.Context;
@@ -267,7 +268,8 @@ public class ThreadedRenderer extends HardwareRenderer {
view.mRecreateDisplayList = false;
}
- private void updateRootDisplayList(View view, HardwareDrawCallbacks callbacks) {
+ private void updateRootDisplayList(View view, HardwareDrawCallbacks callbacks,
+ boolean isStartingWindow) {
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "getDisplayList");
updateViewTreeDisplayList(view);
@@ -279,6 +281,12 @@ public class ThreadedRenderer extends HardwareRenderer {
callbacks.onHardwarePreDraw(canvas);
canvas.insertReorderBarrier();
+ if (isStartingWindow) {
+ // Compensate for some situations in which a hw-accelerated surface
+ // will not be filled with anything by default; this is equivalent
+ // to the old behavior when the system process was not hw-accelerated
+ canvas.drawColor(Color.BLACK);
+ }
canvas.drawRenderNode(view.getDisplayList());
canvas.insertInorderBarrier();
@@ -298,7 +306,8 @@ public class ThreadedRenderer extends HardwareRenderer {
}
@Override
- void draw(View view, AttachInfo attachInfo, HardwareDrawCallbacks callbacks) {
+ void draw(View view, AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
+ boolean isStartingWindow) {
attachInfo.mIgnoreDirtyState = true;
long frameTimeNanos = mChoreographer.getFrameTimeNanos();
attachInfo.mDrawingTime = frameTimeNanos / TimeUtils.NANOS_PER_MS;
@@ -308,7 +317,7 @@ public class ThreadedRenderer extends HardwareRenderer {
recordDuration = System.nanoTime();
}
- updateRootDisplayList(view, callbacks);
+ updateRootDisplayList(view, callbacks, isStartingWindow);
if (mProfilingEnabled) {
recordDuration = System.nanoTime() - recordDuration;
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 82c54257c960..ac006672b74a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4299,6 +4299,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* </p>
*
* @param a the styled attributes set to initialize the fading edges from
+ *
+ * @removed
*/
protected void initializeFadingEdge(TypedArray a) {
// This method probably shouldn't have been included in the SDK to begin with.
@@ -4439,6 +4441,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* </p>
*
* @param a the styled attributes set to initialize the scrollbars from
+ *
+ * @removed
*/
protected void initializeScrollbars(TypedArray a) {
// It's not safe to use this method from apps. The parameter 'a' must have been obtained
@@ -6521,6 +6525,28 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
/**
+ * Compute insets that should be consumed by this view and the ones that should propagate
+ * to those under it.
+ *
+ * @param in Insets currently being processed by this View, likely received as a parameter
+ * to {@link #onApplyWindowInsets(WindowInsets)}.
+ * @param outLocalInsets A Rect that will receive the insets that should be consumed
+ * by this view
+ * @return Insets that should be passed along to views under this one
+ */
+ public WindowInsets computeSystemWindowInsets(WindowInsets in, Rect outLocalInsets) {
+ if ((mViewFlags & OPTIONAL_FITS_SYSTEM_WINDOWS) == 0
+ || mAttachInfo == null
+ || (mAttachInfo.mSystemUiVisibility & SYSTEM_UI_LAYOUT_FLAGS) == 0) {
+ outLocalInsets.set(in.getSystemWindowInsets());
+ return in.consumeSystemWindowInsets();
+ } else {
+ outLocalInsets.set(0, 0, 0, 0);
+ return in;
+ }
+ }
+
+ /**
* Sets whether or not this view should account for system screen decorations
* such as the status bar and inset its content; that is, controlling whether
* the default implementation of {@link #fitSystemWindows(Rect)} will be
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index a94f9732a4bd..12a49d518fc1 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -875,6 +875,11 @@ public class ViewDebug {
data[i + 1] = theme.resolveAttribute(attributeId, outValue, true) ?
outValue.coerceToString().toString() : nullString;
i += 2;
+
+ // attempt to replace reference data with its name
+ if (outValue.type == TypedValue.TYPE_REFERENCE) {
+ data[i - 1] = resources.getResourceName(outValue.resourceId);
+ }
} catch (Resources.NotFoundException e) {
// ignore resources we can't resolve
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 43ab4ef33b85..ae6e4e78ed43 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -711,17 +711,10 @@ public final class ViewRootImpl implements ViewParent,
// can be used by code on the system process to escape that and enable
// HW accelerated drawing. (This is basically for the lock screen.)
- final boolean fakeHwAccelerated = (attrs.privateFlags &
- WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED) != 0;
final boolean forceHwAccelerated = (attrs.privateFlags &
WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED) != 0;
- if (fakeHwAccelerated) {
- // This is exclusively for the preview windows the window manager
- // shows for launching applications, so they will look more like
- // the app being launched.
- mAttachInfo.mHardwareAccelerationRequested = true;
- } else if (!HardwareRenderer.sRendererDisabled
+ if (!HardwareRenderer.sRendererDisabled
|| (HardwareRenderer.sSystemRendererDisabled && forceHwAccelerated)) {
if (mAttachInfo.mHardwareRenderer != null) {
mAttachInfo.mHardwareRenderer.destroy();
@@ -2486,7 +2479,8 @@ public final class ViewRootImpl implements ViewParent,
dirty.setEmpty();
mBlockResizeBuffer = false;
- mAttachInfo.mHardwareRenderer.draw(mView, mAttachInfo, this);
+ mAttachInfo.mHardwareRenderer.draw(mView, mAttachInfo, this,
+ params.type == WindowManager.LayoutParams.TYPE_APPLICATION_STARTING);
} else {
// If we get here with a disabled & requested hardware renderer, something went
// wrong (an invalidate posted right before we destroyed the hardware surface
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index ebc683abe0b7..63ab7d252237 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -111,10 +111,19 @@ public abstract class Window {
public static final int FEATURE_CONTENT_TRANSITIONS = 12;
/**
+ * Enables Activities to run Activity Transitions either through sending or receiving
+ * ActivityOptions bundle created with
+ * {@link android.app.ActivityOptions#makeSceneTransitionAnimation(android.app.Activity,
+ * android.util.Pair[])} or {@link android.app.ActivityOptions#makeSceneTransitionAnimation(
+ * android.app.Activity, View, String)}.
+ */
+ public static final int FEATURE_ACTIVITY_TRANSITIONS = 13;
+
+ /**
* Max value used as a feature ID
* @hide
*/
- public static final int FEATURE_MAX = FEATURE_CONTENT_TRANSITIONS;
+ public static final int FEATURE_MAX = FEATURE_ACTIVITY_TRANSITIONS;
/** Flag for setting the progress bar's visibility to VISIBLE */
public static final int PROGRESS_VISIBILITY_ON = -1;
@@ -1459,7 +1468,7 @@ public abstract class Window {
* have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
* {@link android.transition.Visibility} as exiting is governed by changing visibility
* from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
- * remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * remain unaffected. Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param transition The Transition to use to move Views out of the scene when calling a
* new Activity.
@@ -1475,7 +1484,7 @@ public abstract class Window {
* visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null,
* the views will remain unaffected. If nothing is set, the default will be to use the same
* transition as {@link #setExitTransition(android.transition.Transition)}.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param transition The Transition to use to move Views into the scene when reentering from a
* previously-started Activity.
@@ -1489,7 +1498,7 @@ public abstract class Window {
* {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
* {@link android.transition.Visibility} as entering is governed by changing visibility from
* {@link View#INVISIBLE} to {@link View#VISIBLE}. If <code>transition</code> is null,
- * entering Views will remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * entering Views will remain unaffected. Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @return the Transition to use to move Views into the initial Scene.
* @attr ref android.R.styleable#Window_windowEnterTransition
@@ -1517,7 +1526,7 @@ public abstract class Window {
* have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
* {@link android.transition.Visibility} as exiting is governed by changing visibility
* from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
- * remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * remain unaffected. Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @return the Transition to use to move Views out of the scene when calling a
* new Activity.
@@ -1531,7 +1540,7 @@ public abstract class Window {
* or ViewGroups that have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions
* will extend {@link android.transition.Visibility} as exiting is governed by changing
* visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @return The Transition to use to move Views into the scene when reentering from a
* previously-started Activity.
@@ -1544,7 +1553,7 @@ public abstract class Window {
* Scene. Typical Transitions will affect size and location, such as
* {@link android.transition.ChangeBounds}. A null
* value will cause transferred shared elements to blink to the final position.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param transition The Transition to use for shared elements transferred into the content
* Scene.
@@ -1559,7 +1568,7 @@ public abstract class Window {
* value will cause transferred shared elements to blink to the final position.
* If no value is set, the default will be to use the same value as
* {@link #setSharedElementEnterTransition(android.transition.Transition)}.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param transition The Transition to use for shared elements transferred out of the content
* Scene.
@@ -1569,7 +1578,7 @@ public abstract class Window {
/**
* Returns the Transition that will be used for shared elements transferred into the content
- * Scene. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Scene. Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @return Transition to use for sharend elements transferred into the content Scene.
* @attr ref android.R.styleable#Window_windowSharedElementEnterTransition
@@ -1578,7 +1587,7 @@ public abstract class Window {
/**
* Returns the Transition that will be used for shared elements transferred back to a
- * calling Activity. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * calling Activity. Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @return Transition to use for sharend elements transferred into the content Scene.
* @attr ref android.R.styleable#Window_windowSharedElementReturnTransition
@@ -1590,7 +1599,7 @@ public abstract class Window {
* before the shared elements are transferred to the called Activity. If the shared elements
* must animate during the exit transition, this Transition should be used. Upon completion,
* the shared elements may be transferred to the started Activity.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param transition The Transition to use for shared elements in the launching Window
* prior to transferring to the launched Activity's Window.
@@ -1603,7 +1612,7 @@ public abstract class Window {
* Activity after it has returned the shared element to it start location. If no value
* is set, this will default to
* {@link #setSharedElementExitTransition(android.transition.Transition)}.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @param transition The Transition to use for shared elements in the launching Window
* after the shared element has returned to the Window.
@@ -1614,7 +1623,7 @@ public abstract class Window {
/**
* Returns the Transition to use for shared elements in the launching Window prior
* to transferring to the launched Activity's Window.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @return the Transition to use for shared elements in the launching Window prior
* to transferring to the launched Activity's Window.
@@ -1625,7 +1634,7 @@ public abstract class Window {
/**
* Returns the Transition that will be used for shared elements reentering from a started
* Activity after it has returned the shared element to it start location.
- * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ * Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}.
*
* @return the Transition that will be used for shared elements reentering from a started
* Activity after it has returned the shared element to it start location.
@@ -1703,7 +1712,7 @@ public abstract class Window {
* Returns the duration, in milliseconds, of the window background fade
* when transitioning into or away from an Activity when called with an Activity Transition.
* <p>When executing the enter transition, the background starts transparent
- * and fades in. This requires {@link #FEATURE_CONTENT_TRANSITIONS}. The default is
+ * and fades in. This requires {@link #FEATURE_ACTIVITY_TRANSITIONS}. The default is
* 300 milliseconds.</p>
*
* @return The duration of the window background fade to opaque during enter transition.
@@ -1716,7 +1725,7 @@ public abstract class Window {
* Sets the duration, in milliseconds, of the window background fade
* when transitioning into or away from an Activity when called with an Activity Transition.
* <p>When executing the enter transition, the background starts transparent
- * and fades in. This requires {@link #FEATURE_CONTENT_TRANSITIONS}. The default is
+ * and fades in. This requires {@link #FEATURE_ACTIVITY_TRANSITIONS}. The default is
* 300 milliseconds.</p>
*
* @param fadeDurationMillis The duration of the window background fade to or from opaque
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index 24c3c1a72ab0..2bfe3b42477d 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -341,6 +341,21 @@ public final class WindowInsets {
}
/**
+ * Returns a copy of this WindowInsets with selected system window insets replaced
+ * with new values.
+ *
+ * @param systemWindowInsets New system window insets. Each field is the inset in pixels
+ * for that edge
+ * @return A modified copy of this WindowInsets
+ */
+ public WindowInsets replaceSystemWindowInsets(Rect systemWindowInsets) {
+ final WindowInsets result = new WindowInsets(this);
+ result.mSystemWindowInsets = new Rect(systemWindowInsets);
+ result.mSystemWindowInsetsConsumed = !hasSystemWindowInsets();
+ return result;
+ }
+
+ /**
* @hide
*/
public WindowInsets consumeWindowDecorInsets() {
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 47ee52e25116..273ec9d08007 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1024,26 +1024,6 @@ public interface WindowManager extends ViewManager {
public int flags;
/**
- * If the window has requested hardware acceleration, but this is not
- * allowed in the process it is in, then still render it as if it is
- * hardware accelerated. This is used for the starting preview windows
- * in the system process, which don't need to have the overhead of
- * hardware acceleration (they are just a static rendering), but should
- * be rendered as such to match the actual window of the app even if it
- * is hardware accelerated.
- * Even if the window isn't hardware accelerated, still do its rendering
- * as if it was.
- * Like {@link #FLAG_HARDWARE_ACCELERATED} except for trusted system windows
- * that need hardware acceleration (e.g. LockScreen), where hardware acceleration
- * is generally disabled. This flag must be specified in addition to
- * {@link #FLAG_HARDWARE_ACCELERATED} to enable hardware acceleration for system
- * windows.
- *
- * @hide
- */
- public static final int PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED = 0x00000001;
-
- /**
* In the system process, we globally do not use hardware acceleration
* because there are many threads doing UI there and they conflict.
* If certain parts of the UI that really do want to use hardware
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 2ed125dc08f7..fec7550af66d 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -638,6 +638,11 @@ public interface WindowManagerPolicy {
public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs);
/**
+ * Return the window that is hiding the keyguard, if such a thing exists.
+ */
+ public WindowState getWinShowWhenLockedLw();
+
+ /**
* Called when the system would like to show a UI to indicate that an
* application is starting. You can use this to add a
* APPLICATION_STARTING_TYPE window with the given appToken to the window
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index 20adfe426ef2..ba5d6c2896ef 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -436,14 +436,6 @@ public class BaseInputConnection implements InputConnection {
}
/**
- * The default implementation does nothing.
- * @removed
- */
- public final boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
- return false;
- }
-
- /**
* The default implementation places the given text into the editable,
* replacing any existing composing text. The new text is marked as
* in a composing state with the composing style.
diff --git a/core/java/android/view/inputmethod/CursorAnchorInfo.java b/core/java/android/view/inputmethod/CursorAnchorInfo.java
index 600fffe4df8d..fd73432b42d3 100644
--- a/core/java/android/view/inputmethod/CursorAnchorInfo.java
+++ b/core/java/android/view/inputmethod/CursorAnchorInfo.java
@@ -120,38 +120,6 @@ public final class CursorAnchorInfo implements Parcelable {
*/
public static final int FLAG_IS_RTL = 0x04;
- /**
- * @removed
- */
- public static final int CHARACTER_RECT_TYPE_MASK = 0x0f;
- /**
- * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the editor did not specify any type of this
- * character. Editor authors should not use this flag.
- * @removed
- */
- public static final int CHARACTER_RECT_TYPE_UNSPECIFIED = 0;
- /**
- * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the character is entirely visible.
- * @removed
- */
- public static final int CHARACTER_RECT_TYPE_FULLY_VISIBLE = 1;
- /**
- * Type for {@link #CHARACTER_RECT_TYPE_MASK}: some area of the character is invisible.
- * @removed
- */
- public static final int CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE = 2;
- /**
- * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the character is entirely invisible.
- * @removed
- */
- public static final int CHARACTER_RECT_TYPE_INVISIBLE = 3;
- /**
- * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the editor gave up to calculate the rectangle
- * for this character. Input method authors should ignore the returned rectangle.
- * @removed
- */
- public static final int CHARACTER_RECT_TYPE_NOT_FEASIBLE = 4;
-
public CursorAnchorInfo(final Parcel source) {
mSelectionStart = source.readInt();
mSelectionEnd = source.readInt();
@@ -318,20 +286,6 @@ public final class CursorAnchorInfo implements Parcelable {
}
/**
- * @removed
- */
- public Builder setInsertionMarkerLocation(final float horizontalPosition,
- final float lineTop, final float lineBaseline, final float lineBottom,
- final boolean clipped){
- mInsertionMarkerHorizontal = horizontalPosition;
- mInsertionMarkerTop = lineTop;
- mInsertionMarkerBaseline = lineBaseline;
- mInsertionMarkerBottom = lineBottom;
- mInsertionMarkerFlags = clipped ? FLAG_HAS_INVISIBLE_REGION : 0;
- return this;
- }
-
- /**
* Sets the location of the text insertion point (zero width cursor) as a rectangle in
* local coordinates. Calling this can be skipped when there is no text insertion point;
* however if there is an insertion point, editors must call this method.
@@ -390,43 +344,6 @@ public final class CursorAnchorInfo implements Parcelable {
}
/**
- * Adds the bounding box of the character specified with the index.
- *
- * @param index index of the character in Java chars units. Must be specified in
- * ascending order across successive calls.
- * @param leadingEdgeX x coordinate of the leading edge of the character in local
- * coordinates, that is, left edge for LTR text and right edge for RTL text.
- * @param leadingEdgeY y coordinate of the leading edge of the character in local
- * coordinates.
- * @param trailingEdgeX x coordinate of the trailing edge of the character in local
- * coordinates, that is, right edge for LTR text and left edge for RTL text.
- * @param trailingEdgeY y coordinate of the trailing edge of the character in local
- * coordinates.
- * @param flags flags for this character rect. See {@link #FLAG_HAS_VISIBLE_REGION} for
- * example.
- * @throws IllegalArgumentException If the index is a negative value, or not greater than
- * all of the previously called indices.
- * @removed
- */
- public Builder addCharacterRect(final int index, final float leadingEdgeX,
- final float leadingEdgeY, final float trailingEdgeX, final float trailingEdgeY,
- final int flags) {
- final int newFlags;
- final float left;
- final float right;
- if (leadingEdgeX <= trailingEdgeX) {
- newFlags = flags;
- left = leadingEdgeX;
- right = trailingEdgeX;
- } else {
- newFlags = flags | FLAG_IS_RTL;
- left = trailingEdgeX;
- right = leadingEdgeX;
- }
- return addCharacterBounds(index, left, leadingEdgeY, right, trailingEdgeY, newFlags);
- }
-
- /**
* Sets the matrix that transforms local coordinates into screen coordinates.
* @param matrix transformation matrix from local coordinates into screen coordinates. null
* is interpreted as an identity matrix.
@@ -538,15 +455,6 @@ public final class CursorAnchorInfo implements Parcelable {
}
/**
- * Returns the visibility of the insertion marker.
- * @return {@code true} if the insertion marker is partially or entirely clipped.
- * @removed
- */
- public boolean isInsertionMarkerClipped() {
- return (mInsertionMarkerFlags & FLAG_HAS_VISIBLE_REGION) != 0;
- }
-
- /**
* Returns the horizontal start of the insertion marker, in the local coordinates that will
* be transformed with {@link #getMatrix()} when rendered on the screen.
* @return x coordinate that is compatible with {@link Layout#getPrimaryHorizontal(int)}.
@@ -602,25 +510,6 @@ public final class CursorAnchorInfo implements Parcelable {
}
/**
- * Returns a new instance of {@link RectF} that indicates the location of the character
- * specified with the index.
- * <p>
- * Note that coordinates are not necessarily contiguous or even monotonous, especially when
- * RTL text and LTR text are mixed.
- * </p>
- * @param index index of the character in a Java chars.
- * @return a new instance of {@link RectF} that represents the location of the character in
- * local coordinates. null if the character is invisible or the application did not provide
- * the location. Note that the {@code left} field can be greater than the {@code right} field
- * if the character is in RTL text. Returns {@code null} if no location information is
- * available.
- * @removed
- */
- public RectF getCharacterRect(final int index) {
- return getCharacterBounds(index);
- }
-
- /**
* Returns the flags associated with the character bounds specified with the index.
* @param index index of the character in a Java chars.
* @return {@code 0} if no flag is specified.
@@ -633,16 +522,6 @@ public final class CursorAnchorInfo implements Parcelable {
}
/**
- * Returns the flags associated with the character rect specified with the index.
- * @param index index of the character in a Java chars.
- * @return {@code 0} if no flag is specified.
- * @removed
- */
- public int getCharacterRectFlags(final int index) {
- return getCharacterBoundsFlags(index);
- }
-
- /**
* Returns a new instance of {@link android.graphics.Matrix} that indicates the transformation
* matrix that is to be applied other positional data in this class.
* @return a new instance (copy) of the transformation matrix.
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index 093fb2fbc098..c51d8a71e976 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -756,19 +756,4 @@ public interface InputConnection {
* {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)}.
*/
public boolean requestCursorUpdates(int cursorUpdateMode);
-
- /**
- * @removed
- */
- public static final int REQUEST_UPDATE_CURSOR_UPDATE_IMMEDIATE = 1 << 0;
-
- /**
- * @removed
- */
- public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 1 << 1;
-
- /**
- * @removed
- */
- public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode);
}
diff --git a/core/java/android/view/inputmethod/InputConnectionWrapper.java b/core/java/android/view/inputmethod/InputConnectionWrapper.java
index 87853deb98d3..231aa070672a 100644
--- a/core/java/android/view/inputmethod/InputConnectionWrapper.java
+++ b/core/java/android/view/inputmethod/InputConnectionWrapper.java
@@ -129,11 +129,4 @@ public class InputConnectionWrapper implements InputConnection {
public boolean requestCursorUpdates(int cursorUpdateMode) {
return mTarget.requestCursorUpdates(cursorUpdateMode);
}
-
- /**
- * @removed
- */
- public final boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
- return mTarget.requestCursorUpdates(cursorUpdateMode);
- }
}
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 547acfad61dd..46a7fd0f4c68 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -416,38 +416,6 @@ public class WebChromeClient {
}
/**
- * UploadHelper simplifies file upload operations by providing helper methods that
- * would handle most common file picker/media capture requests. The application
- * can use the helper to build an intent to start a file picker, and then parse
- * the result returned by the activity.
- *
- * How to use:
- * 1. Create a helper using {@link FileChooserParams#getUploadHelper}
- * 2. Build an intent using {@link UploadHelper#buildIntent}
- * 3. Fire the intent using {@link android.app.Activity#startActivityForResult}.
- * 4. Check for ActivityNotFoundException and take a user friendly action if thrown.
- * 5. Listen the result using {@link android.app.Activity#onActivityResult}
- * 6. Parse the result using {@link UploadHelper#parseResult}
- * 7. Send the result using filePathCallback of {@link WebChromeClient#onShowFileChooser}
- */
- public static abstract class UploadHelper {
- /**
- * Returns an intent that would start a file picker for file selection/media capture.
- */
- public abstract Intent buildIntent();
-
- /**
- * Parses the result returned by the file picker activity.
- *
- * @param resultCode the integer result code returned by the file picker activity.
- * @param data the intent returned by the file picker activity.
- * @return the Uris of selected file(s) or null if the resultCode indicates
- * activity canceled or any other error.
- */
- public abstract Uri[] parseResult(int resultCode, Intent data);
- }
-
- /**
* Parameters used in the {@link #onShowFileChooser} method.
*/
public static abstract class FileChooserParams {
@@ -464,11 +432,17 @@ public class WebChromeClient {
public static final int MODE_SAVE = 3;
/**
- * Returns a helper to simplify choosing and uploading files. The helper builds a default
- * intent that the application can send using startActivityForResult and processes the
- * results.
+ * Parse the result returned by the file picker activity. This method should be used with
+ * {@link #createIntent}. Refer to {@link #createIntent} for how to use it.
+ *
+ * @param resultCode the integer result code returned by the file picker activity.
+ * @param data the intent returned by the file picker activity.
+ * @return the Uris of selected file(s) or null if the resultCode indicates
+ * activity canceled or any other error.
*/
- public abstract UploadHelper getUploadHelper();
+ public static Uri[] parseResult(int resultCode, Intent data) {
+ return WebViewFactory.getProvider().getStatics().parseFileChooserResult(resultCode, data);
+ }
/**
* Returns file chooser mode.
@@ -500,7 +474,28 @@ public class WebChromeClient {
* The file name of a default selection if specified, or null.
*/
public abstract String getFilenameHint();
- };
+
+ /**
+ * Creates an intent that would start a file picker for file selection.
+ * The Intent supports choosing files from simple file sources available
+ * on the device. Some advanced sources (for example, live media capture)
+ * may not be supported and applications wishing to support these sources
+ * or more advanced file operations should build their own Intent.
+ *
+ * <pre>
+ * How to use:
+ * 1. Build an intent using {@link #createIntent}
+ * 2. Fire the intent using {@link android.app.Activity#startActivityForResult}.
+ * 3. Check for ActivityNotFoundException and take a user friendly action if thrown.
+ * 4. Listen the result using {@link android.app.Activity#onActivityResult}
+ * 5. Parse the result using {@link #parseResult} only if media capture was not requested.
+ * 6. Send the result using filePathCallback of {@link WebChromeClient#onShowFileChooser}
+ * </pre>
+ *
+ * @return an Intent that supports basic file chooser sources.
+ */
+ public abstract Intent createIntent();
+ }
/**
* Tell the client to open a file chooser.
diff --git a/core/java/android/webkit/WebResourceRequest.java b/core/java/android/webkit/WebResourceRequest.java
index b46ac9a54223..2185658de37a 100644
--- a/core/java/android/webkit/WebResourceRequest.java
+++ b/core/java/android/webkit/WebResourceRequest.java
@@ -41,21 +41,12 @@ public interface WebResourceRequest {
boolean isForMainFrame();
/**
- * Gets whether a gesture (such as a link click) was associated with the request.
- * <p>
- * <strong>IMPORTANT:</strong>
- * This should not be used to implement any form of security. It is possible for the content
- * to spoof this.
+ * Gets whether a gesture (such as a click) was associated with the request.
*
* @return whether a gesture was associated with the request.
*/
boolean hasGesture();
- /*
- * @removed
- */
- boolean hasUserGestureInsecure();
-
/**
* Gets the method associated with the request, for example "GET".
*
diff --git a/core/java/android/webkit/WebViewFactoryProvider.java b/core/java/android/webkit/WebViewFactoryProvider.java
index 20bb932ef52d..d37d217ae099 100644
--- a/core/java/android/webkit/WebViewFactoryProvider.java
+++ b/core/java/android/webkit/WebViewFactoryProvider.java
@@ -17,6 +17,8 @@
package android.webkit;
import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
/**
* This is the main entry-point into the WebView back end implementations, which the WebView
@@ -64,6 +66,12 @@ public interface WebViewFactoryProvider {
* {@link android.webkit.WebView#setSlowWholeDocumentDrawEnabled(boolean) }
*/
void enableSlowWholeDocumentDraw();
+
+ /**
+ * Implement the API method
+ * {@link android.webkit.WebChromeClient.FileChooserParams#parseResult(int, Intent)}
+ */
+ Uri[] parseFileChooserResult(int resultCode, Intent intent);
}
Statics getStatics();
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 94d52d506692..3859e4851e37 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -5721,14 +5721,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
public boolean requestCursorUpdates(int cursorUpdateMode) {
return getTarget().requestCursorUpdates(cursorUpdateMode);
}
-
- /**
- * @removed
- */
- @Override
- public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
- return getTarget().requestCursorUpdates(cursorUpdateMode);
- }
}
/**
diff --git a/core/java/android/widget/ActionMenuPresenter.java b/core/java/android/widget/ActionMenuPresenter.java
index ef8c006e1554..d77912440beb 100644
--- a/core/java/android/widget/ActionMenuPresenter.java
+++ b/core/java/android/widget/ActionMenuPresenter.java
@@ -19,6 +19,7 @@ package android.widget;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
+import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
@@ -582,6 +583,8 @@ public class ActionMenuPresenter extends BaseMenuPresenter
}
private class OverflowMenuButton extends ImageButton implements ActionMenuView.ActionMenuChildView {
+ private final float[] mTempPts = new float[2];
+
public OverflowMenuButton(Context context) {
super(context, null, com.android.internal.R.attr.actionOverflowButtonStyle);
@@ -649,20 +652,21 @@ public class ActionMenuPresenter extends BaseMenuPresenter
}
@Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
+ protected boolean setFrame(int l, int t, int r, int b) {
+ final boolean changed = super.setFrame(l, t, r, b);
// Set up the hotspot bounds to be centered on the image.
final Drawable d = getDrawable();
final Drawable bg = getBackground();
if (d != null && bg != null) {
- final Rect bounds = d.getBounds();
- final int height = bottom - top;
- final int offset = (height - bounds.width()) / 2;
- final int hotspotLeft = bounds.left - offset;
- final int hotspotRight = bounds.right + offset;
- bg.setHotspotBounds(hotspotLeft, 0, hotspotRight, height);
+ final float[] pts = mTempPts;
+ pts[0] = d.getBounds().centerX();
+ getImageMatrix().mapPoints(pts);
+ final int offset = (int) pts[0] - getWidth() / 2;
+ bg.setHotspotBounds(offset, 0, getWidth() + offset, getHeight());
}
+
+ return changed;
}
}
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 3f168e826b93..128a06c8469a 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -1860,9 +1860,8 @@ public class Editor {
}
final int originalLength = mTextView.getText().length();
- long minMax = mTextView.prepareSpacesAroundPaste(offset, offset, content);
- int min = TextUtils.unpackRangeStartFromLong(minMax);
- int max = TextUtils.unpackRangeEndFromLong(minMax);
+ int min = offset;
+ int max = offset;
Selection.setSelection((Spannable) mTextView.getText(), max);
mTextView.replaceText_internal(min, max, content);
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index 0289ccca9b48..dfdf606bf13c 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -262,7 +262,7 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
attrs, R.styleable.SearchView, defStyleAttr, defStyleRes);
final LayoutInflater inflater = (LayoutInflater) context.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
- final int layoutResId = a.getResourceId(R.styleable.SearchView_layout, 0);
+ final int layoutResId = a.getResourceId(R.styleable.SearchView_layout, R.layout.search_view);
inflater.inflate(layoutResId, this, true);
mQueryTextView = (SearchAutoComplete) findViewById(R.id.search_src_text);
@@ -288,7 +288,8 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
mSearchHintIcon.setImageDrawable(a.getDrawable(R.styleable.SearchView_searchIcon));
// Extract dropdown layout resource IDs for later use.
- mSuggestionRowLayout = a.getResourceId(R.styleable.SearchView_suggestionRowLayout, 0);
+ mSuggestionRowLayout = a.getResourceId(R.styleable.SearchView_suggestionRowLayout,
+ R.layout.search_dropdown_item_icons_2line);
mSuggestionCommitIconResId = a.getResourceId(R.styleable.SearchView_commitIcon, 0);
mSearchButton.setOnClickListener(mOnClickListener);
diff --git a/core/java/android/widget/SimpleMonthView.java b/core/java/android/widget/SimpleMonthView.java
index 27763eb1641a..a76241ed1a50 100644
--- a/core/java/android/widget/SimpleMonthView.java
+++ b/core/java/android/widget/SimpleMonthView.java
@@ -31,6 +31,7 @@ import android.text.format.DateFormat;
import android.text.format.DateUtils;
import android.text.format.Time;
import android.util.AttributeSet;
+import android.util.MathUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
@@ -300,7 +301,11 @@ class SimpleMonthView extends View {
}
private static boolean isValidDayOfWeek(int day) {
- return (day >= Time.SUNDAY && day <= Time.SATURDAY);
+ return day >= Calendar.SUNDAY && day <= Calendar.SATURDAY;
+ }
+
+ private static boolean isValidMonth(int month) {
+ return month >= Calendar.JANUARY && month <= Calendar.DECEMBER;
}
/**
@@ -312,8 +317,8 @@ class SimpleMonthView extends View {
* @param selectedDay the selected day of the month, or -1 for no selection.
* @param month the month.
* @param year the year.
- * @param weekStart which day the week should start on. {@link Time#SUNDAY} through
- * {@link Time#SATURDAY}.
+ * @param weekStart which day the week should start on. {@link Calendar#SUNDAY} through
+ * {@link Calendar#SATURDAY}.
* @param enabledDayStart the first enabled day.
* @param enabledDayEnd the last enabled day.
*/
@@ -325,7 +330,7 @@ class SimpleMonthView extends View {
mSelectedDay = selectedDay;
- if (month >= Calendar.JANUARY && month <= Calendar.DECEMBER) {
+ if (isValidMonth(month)) {
mMonth = month;
}
mYear = year;
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 80ea6ea0fe24..1509e80e3dd7 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -17,6 +17,7 @@
package android.widget;
import android.R;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.ClipData;
import android.content.ClipboardManager;
@@ -1976,23 +1977,34 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
- * Sets the Drawables (if any) to appear to the left of, above,
- * to the right of, and below the text. Use null if you do not
- * want a Drawable there. The Drawables must already have had
+ * Sets the Drawables (if any) to appear to the left of, above, to the
+ * right of, and below the text. Use {@code null} if you do not want a
+ * Drawable there. The Drawables must already have had
* {@link Drawable#setBounds} called.
+ * <p>
+ * Calling this method will overwrite any Drawables previously set using
+ * {@link #setCompoundDrawablesRelative} or related methods.
*
* @attr ref android.R.styleable#TextView_drawableLeft
* @attr ref android.R.styleable#TextView_drawableTop
* @attr ref android.R.styleable#TextView_drawableRight
* @attr ref android.R.styleable#TextView_drawableBottom
*/
- public void setCompoundDrawables(Drawable left, Drawable top,
- Drawable right, Drawable bottom) {
+ public void setCompoundDrawables(@Nullable Drawable left, @Nullable Drawable top,
+ @Nullable Drawable right, @Nullable Drawable bottom) {
Drawables dr = mDrawables;
- final boolean drawables = left != null || top != null
- || right != null || bottom != null;
+ // We're switching to absolute, discard relative.
+ if (dr != null) {
+ if (dr.mDrawableStart != null) dr.mDrawableStart.setCallback(null);
+ dr.mDrawableStart = null;
+ if (dr.mDrawableEnd != null) dr.mDrawableEnd.setCallback(null);
+ dr.mDrawableEnd = null;
+ dr.mDrawableSizeStart = dr.mDrawableHeightStart = 0;
+ dr.mDrawableSizeEnd = dr.mDrawableHeightEnd = 0;
+ }
+ final boolean drawables = left != null || top != null || right != null || bottom != null;
if (!drawables) {
// Clearing drawables... can we free the data structure?
if (dr != null) {
@@ -2101,10 +2113,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
- * Sets the Drawables (if any) to appear to the left of, above,
- * to the right of, and below the text. Use 0 if you do not
- * want a Drawable there. The Drawables' bounds will be set to
- * their intrinsic bounds.
+ * Sets the Drawables (if any) to appear to the left of, above, to the
+ * right of, and below the text. Use 0 if you do not want a Drawable there.
+ * The Drawables' bounds will be set to their intrinsic bounds.
+ * <p>
+ * Calling this method will overwrite any Drawables previously set using
+ * {@link #setCompoundDrawablesRelative} or related methods.
*
* @param left Resource identifier of the left Drawable.
* @param top Resource identifier of the top Drawable.
@@ -2126,18 +2140,21 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
- * Sets the Drawables (if any) to appear to the left of, above,
- * to the right of, and below the text. Use null if you do not
- * want a Drawable there. The Drawables' bounds will be set to
- * their intrinsic bounds.
+ * Sets the Drawables (if any) to appear to the left of, above, to the
+ * right of, and below the text. Use {@code null} if you do not want a
+ * Drawable there. The Drawables' bounds will be set to their intrinsic
+ * bounds.
+ * <p>
+ * Calling this method will overwrite any Drawables previously set using
+ * {@link #setCompoundDrawablesRelative} or related methods.
*
* @attr ref android.R.styleable#TextView_drawableLeft
* @attr ref android.R.styleable#TextView_drawableTop
* @attr ref android.R.styleable#TextView_drawableRight
* @attr ref android.R.styleable#TextView_drawableBottom
*/
- public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top,
- Drawable right, Drawable bottom) {
+ public void setCompoundDrawablesWithIntrinsicBounds(@Nullable Drawable left,
+ @Nullable Drawable top, @Nullable Drawable right, @Nullable Drawable bottom) {
if (left != null) {
left.setBounds(0, 0, left.getIntrinsicWidth(), left.getIntrinsicHeight());
@@ -2155,20 +2172,33 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
- * Sets the Drawables (if any) to appear to the start of, above,
- * to the end of, and below the text. Use null if you do not
- * want a Drawable there. The Drawables must already have had
- * {@link Drawable#setBounds} called.
+ * Sets the Drawables (if any) to appear to the start of, above, to the end
+ * of, and below the text. Use {@code null} if you do not want a Drawable
+ * there. The Drawables must already have had {@link Drawable#setBounds}
+ * called.
+ * <p>
+ * Calling this method will overwrite any Drawables previously set using
+ * {@link #setCompoundDrawables} or related methods.
*
* @attr ref android.R.styleable#TextView_drawableStart
* @attr ref android.R.styleable#TextView_drawableTop
* @attr ref android.R.styleable#TextView_drawableEnd
* @attr ref android.R.styleable#TextView_drawableBottom
*/
- public void setCompoundDrawablesRelative(Drawable start, Drawable top,
- Drawable end, Drawable bottom) {
+ public void setCompoundDrawablesRelative(@Nullable Drawable start, @Nullable Drawable top,
+ @Nullable Drawable end, @Nullable Drawable bottom) {
Drawables dr = mDrawables;
+ // We're switching to relative, discard absolute.
+ if (dr != null) {
+ if (dr.mDrawableLeft != null) dr.mDrawableLeft.setCallback(null);
+ dr.mDrawableLeft = dr.mDrawableLeftInitial = null;
+ if (dr.mDrawableRight != null) dr.mDrawableRight.setCallback(null);
+ dr.mDrawableRight = dr.mDrawableRightInitial = null;
+ dr.mDrawableSizeLeft = dr.mDrawableHeightLeft = 0;
+ dr.mDrawableSizeRight = dr.mDrawableHeightRight = 0;
+ }
+
final boolean drawables = start != null || top != null
|| end != null || bottom != null;
@@ -2274,10 +2304,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
- * Sets the Drawables (if any) to appear to the start of, above,
- * to the end of, and below the text. Use 0 if you do not
- * want a Drawable there. The Drawables' bounds will be set to
- * their intrinsic bounds.
+ * Sets the Drawables (if any) to appear to the start of, above, to the end
+ * of, and below the text. Use 0 if you do not want a Drawable there. The
+ * Drawables' bounds will be set to their intrinsic bounds.
+ * <p>
+ * Calling this method will overwrite any Drawables previously set using
+ * {@link #setCompoundDrawables} or related methods.
*
* @param start Resource identifier of the start Drawable.
* @param top Resource identifier of the top Drawable.
@@ -2301,18 +2333,20 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
- * Sets the Drawables (if any) to appear to the start of, above,
- * to the end of, and below the text. Use null if you do not
- * want a Drawable there. The Drawables' bounds will be set to
- * their intrinsic bounds.
+ * Sets the Drawables (if any) to appear to the start of, above, to the end
+ * of, and below the text. Use {@code null} if you do not want a Drawable
+ * there. The Drawables' bounds will be set to their intrinsic bounds.
+ * <p>
+ * Calling this method will overwrite any Drawables previously set using
+ * {@link #setCompoundDrawables} or related methods.
*
* @attr ref android.R.styleable#TextView_drawableStart
* @attr ref android.R.styleable#TextView_drawableTop
* @attr ref android.R.styleable#TextView_drawableEnd
* @attr ref android.R.styleable#TextView_drawableBottom
*/
- public void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable start, Drawable top,
- Drawable end, Drawable bottom) {
+ public void setCompoundDrawablesRelativeWithIntrinsicBounds(@Nullable Drawable start,
+ @Nullable Drawable top, @Nullable Drawable end, @Nullable Drawable bottom) {
if (start != null) {
start.setBounds(0, 0, start.getIntrinsicWidth(), start.getIntrinsicHeight());
@@ -2337,6 +2371,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_drawableRight
* @attr ref android.R.styleable#TextView_drawableBottom
*/
+ @NonNull
public Drawable[] getCompoundDrawables() {
final Drawables dr = mDrawables;
if (dr != null) {
@@ -2356,6 +2391,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_drawableEnd
* @attr ref android.R.styleable#TextView_drawableBottom
*/
+ @NonNull
public Drawable[] getCompoundDrawablesRelative() {
final Drawables dr = mDrawables;
if (dr != null) {
@@ -8142,6 +8178,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* Returns the TextView_textColor attribute from the TypedArray, if set, or
* the TextAppearance_textColor from the TextView_textAppearance attribute,
* if TextView_textColor was not set directly.
+ *
+ * @removed
*/
public static ColorStateList getTextColors(Context context, TypedArray attrs) {
// It's not safe to use this method from apps. The parameter 'attrs'
@@ -8169,6 +8207,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* AttributeSet, if set, or the default color from the
* TextAppearance_textColor from the TextView_textAppearance attribute, if
* TextView_textColor was not set directly.
+ *
+ * @removed
*/
public static int getTextColor(Context context, TypedArray attrs, int def) {
final ColorStateList colors = getTextColors(context, attrs);
@@ -8754,57 +8794,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
- * Prepare text so that there are not zero or two spaces at beginning and end of region defined
- * by [min, max] when replacing this region by paste.
- * Note that if there were two spaces (or more) at that position before, they are kept. We just
- * make sure we do not add an extra one from the paste content.
- */
- long prepareSpacesAroundPaste(int min, int max, CharSequence paste) {
- if (paste.length() > 0) {
- if (min > 0) {
- final char charBefore = mTransformed.charAt(min - 1);
- final char charAfter = paste.charAt(0);
-
- if (Character.isSpaceChar(charBefore) && Character.isSpaceChar(charAfter)) {
- // Two spaces at beginning of paste: remove one
- final int originalLength = mText.length();
- deleteText_internal(min - 1, min);
- // Due to filters, there is no guarantee that exactly one character was
- // removed: count instead.
- final int delta = mText.length() - originalLength;
- min += delta;
- max += delta;
- } else if (!Character.isSpaceChar(charBefore) && charBefore != '\n' &&
- !Character.isSpaceChar(charAfter) && charAfter != '\n') {
- // No space at beginning of paste: add one
- final int originalLength = mText.length();
- replaceText_internal(min, min, " ");
- // Taking possible filters into account as above.
- final int delta = mText.length() - originalLength;
- min += delta;
- max += delta;
- }
- }
-
- if (max < mText.length()) {
- final char charBefore = paste.charAt(paste.length() - 1);
- final char charAfter = mTransformed.charAt(max);
-
- if (Character.isSpaceChar(charBefore) && Character.isSpaceChar(charAfter)) {
- // Two spaces at end of paste: remove one
- deleteText_internal(max, max + 1);
- } else if (!Character.isSpaceChar(charBefore) && charBefore != '\n' &&
- !Character.isSpaceChar(charAfter) && charAfter != '\n') {
- // No space at end of paste: add one
- replaceText_internal(max, max, " ");
- }
- }
- }
-
- return TextUtils.packRangeInLong(min, max);
- }
-
- /**
* Paste clipboard content between min and max positions.
*/
private void paste(int min, int max) {
@@ -8817,9 +8806,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
CharSequence paste = clip.getItemAt(i).coerceToStyledText(getContext());
if (paste != null) {
if (!didFirst) {
- long minMax = prepareSpacesAroundPaste(min, max, paste);
- min = TextUtils.unpackRangeStartFromLong(minMax);
- max = TextUtils.unpackRangeEndFromLong(minMax);
Selection.setSelection((Spannable) mText, max);
((Editable) mText).replace(min, max, paste);
didFirst = true;
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index be28199b3636..1ce19ce05066 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -33,11 +33,11 @@ import android.view.Gravity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
+import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import com.android.internal.R;
-import com.android.internal.app.ToolbarActionBar;
import com.android.internal.view.menu.MenuBuilder;
import com.android.internal.view.menu.MenuItemImpl;
import com.android.internal.view.menu.MenuPresenter;
@@ -133,6 +133,8 @@ public class Toolbar extends ViewGroup {
private int mTitleTextColor;
private int mSubtitleTextColor;
+ private boolean mEatingTouch;
+
// Clear me after use.
private final ArrayList<View> mTempViews = new ArrayList<View>();
@@ -1007,8 +1009,15 @@ public class Toolbar extends ViewGroup {
}
private void addSystemView(View v) {
- final LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT,
- LayoutParams.WRAP_CONTENT);
+ final ViewGroup.LayoutParams vlp = v.getLayoutParams();
+ final LayoutParams lp;
+ if (vlp == null) {
+ lp = generateDefaultLayoutParams();
+ } else if (!checkLayoutParams(vlp)) {
+ lp = generateLayoutParams(vlp);
+ } else {
+ lp = (LayoutParams) vlp;
+ }
lp.mViewType = LayoutParams.SYSTEM;
addView(v, lp);
}
@@ -1055,6 +1064,32 @@ public class Toolbar extends ViewGroup {
removeCallbacks(mShowOverflowMenuRunnable);
}
+ @Override
+ public boolean onTouchEvent(MotionEvent ev) {
+ // Toolbars always eat touch events, but should still respect the touch event dispatch
+ // contract. If the normal View implementation doesn't want the events, we'll just silently
+ // eat the rest of the gesture without reporting the events to the default implementation
+ // since that's what it expects.
+
+ final int action = ev.getActionMasked();
+ if (action == MotionEvent.ACTION_DOWN) {
+ mEatingTouch = false;
+ }
+
+ if (!mEatingTouch) {
+ final boolean handled = super.onTouchEvent(ev);
+ if (action == MotionEvent.ACTION_DOWN && !handled) {
+ mEatingTouch = true;
+ }
+ }
+
+ if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
+ mEatingTouch = false;
+ }
+
+ return true;
+ }
+
/**
* @hide
*/
@@ -1280,27 +1315,36 @@ public class Toolbar extends ViewGroup {
final int[] collapsingMargins = mTempMargins;
collapsingMargins[0] = collapsingMargins[1] = 0;
+ // Align views within the minimum toolbar height, if set.
+ final int alignmentHeight = getMinimumHeight();
+
if (shouldLayout(mNavButtonView)) {
if (isRtl) {
- right = layoutChildRight(mNavButtonView, right, collapsingMargins);
+ right = layoutChildRight(mNavButtonView, right, collapsingMargins,
+ alignmentHeight);
} else {
- left = layoutChildLeft(mNavButtonView, left, collapsingMargins);
+ left = layoutChildLeft(mNavButtonView, left, collapsingMargins,
+ alignmentHeight);
}
}
if (shouldLayout(mCollapseButtonView)) {
if (isRtl) {
- right = layoutChildRight(mCollapseButtonView, right, collapsingMargins);
+ right = layoutChildRight(mCollapseButtonView, right, collapsingMargins,
+ alignmentHeight);
} else {
- left = layoutChildLeft(mCollapseButtonView, left, collapsingMargins);
+ left = layoutChildLeft(mCollapseButtonView, left, collapsingMargins,
+ alignmentHeight);
}
}
if (shouldLayout(mMenuView)) {
if (isRtl) {
- left = layoutChildLeft(mMenuView, left, collapsingMargins);
+ left = layoutChildLeft(mMenuView, left, collapsingMargins,
+ alignmentHeight);
} else {
- right = layoutChildRight(mMenuView, right, collapsingMargins);
+ right = layoutChildRight(mMenuView, right, collapsingMargins,
+ alignmentHeight);
}
}
@@ -1311,17 +1355,21 @@ public class Toolbar extends ViewGroup {
if (shouldLayout(mExpandedActionView)) {
if (isRtl) {
- right = layoutChildRight(mExpandedActionView, right, collapsingMargins);
+ right = layoutChildRight(mExpandedActionView, right, collapsingMargins,
+ alignmentHeight);
} else {
- left = layoutChildLeft(mExpandedActionView, left, collapsingMargins);
+ left = layoutChildLeft(mExpandedActionView, left, collapsingMargins,
+ alignmentHeight);
}
}
if (shouldLayout(mLogoView)) {
if (isRtl) {
- right = layoutChildRight(mLogoView, right, collapsingMargins);
+ right = layoutChildRight(mLogoView, right, collapsingMargins,
+ alignmentHeight);
} else {
- left = layoutChildLeft(mLogoView, left, collapsingMargins);
+ left = layoutChildLeft(mLogoView, left, collapsingMargins,
+ alignmentHeight);
}
}
@@ -1434,13 +1482,15 @@ public class Toolbar extends ViewGroup {
addCustomViewsWithGravity(mTempViews, Gravity.LEFT);
final int leftViewsCount = mTempViews.size();
for (int i = 0; i < leftViewsCount; i++) {
- left = layoutChildLeft(mTempViews.get(i), left, collapsingMargins);
+ left = layoutChildLeft(mTempViews.get(i), left, collapsingMargins,
+ alignmentHeight);
}
addCustomViewsWithGravity(mTempViews, Gravity.RIGHT);
final int rightViewsCount = mTempViews.size();
for (int i = 0; i < rightViewsCount; i++) {
- right = layoutChildRight(mTempViews.get(i), right, collapsingMargins);
+ right = layoutChildRight(mTempViews.get(i), right, collapsingMargins,
+ alignmentHeight);
}
// Centered views try to center with respect to the whole bar, but views pinned
@@ -1459,8 +1509,10 @@ public class Toolbar extends ViewGroup {
final int centerViewsCount = mTempViews.size();
for (int i = 0; i < centerViewsCount; i++) {
- centerLeft = layoutChildLeft(mTempViews.get(i), centerLeft, collapsingMargins);
+ centerLeft = layoutChildLeft(mTempViews.get(i), centerLeft, collapsingMargins,
+ alignmentHeight);
}
+
mTempViews.clear();
}
@@ -1483,46 +1535,49 @@ public class Toolbar extends ViewGroup {
return width;
}
- private int layoutChildLeft(View child, int left, int[] collapsingMargins) {
+ private int layoutChildLeft(View child, int left, int[] collapsingMargins,
+ int alignmentHeight) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
final int l = lp.leftMargin - collapsingMargins[0];
left += Math.max(0, l);
collapsingMargins[0] = Math.max(0, -l);
- final int top = getChildTop(child);
+ final int top = getChildTop(child, alignmentHeight);
final int childWidth = child.getMeasuredWidth();
child.layout(left, top, left + childWidth, top + child.getMeasuredHeight());
left += childWidth + lp.rightMargin;
return left;
}
- private int layoutChildRight(View child, int right, int[] collapsingMargins) {
+ private int layoutChildRight(View child, int right, int[] collapsingMargins,
+ int alignmentHeight) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
final int r = lp.rightMargin - collapsingMargins[1];
right -= Math.max(0, r);
collapsingMargins[1] = Math.max(0, -r);
- final int top = getChildTop(child);
+ final int top = getChildTop(child, alignmentHeight);
final int childWidth = child.getMeasuredWidth();
child.layout(right - childWidth, top, right, top + child.getMeasuredHeight());
right -= childWidth + lp.leftMargin;
return right;
}
- private int getChildTop(View child) {
+ private int getChildTop(View child, int alignmentHeight) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ final int childHeight = child.getMeasuredHeight();
+ final int alignmentOffset = alignmentHeight > 0 ? (childHeight - alignmentHeight) / 2 : 0;
switch (getChildVerticalGravity(lp.gravity)) {
case Gravity.TOP:
- return getPaddingTop();
+ return getPaddingTop() - alignmentOffset;
case Gravity.BOTTOM:
- return getHeight() - getPaddingBottom() -
- child.getMeasuredHeight() - lp.bottomMargin;
+ return getHeight() - getPaddingBottom() - childHeight
+ - lp.bottomMargin - alignmentOffset;
default:
case Gravity.CENTER_VERTICAL:
final int paddingTop = getPaddingTop();
final int paddingBottom = getPaddingBottom();
final int height = getHeight();
- final int childHeight = child.getMeasuredHeight();
final int space = height - paddingTop - paddingBottom;
int spaceAbove = (space - childHeight) / 2;
if (spaceAbove < lp.topMargin) {
diff --git a/core/java/com/android/internal/app/ToolbarActionBar.java b/core/java/com/android/internal/app/ToolbarActionBar.java
index 99c87eabf5a0..4410f2544624 100644
--- a/core/java/com/android/internal/app/ToolbarActionBar.java
+++ b/core/java/com/android/internal/app/ToolbarActionBar.java
@@ -22,7 +22,6 @@ import android.app.ActionBar;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
-import android.text.TextUtils;
import android.view.ActionMode;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -33,7 +32,6 @@ import android.view.Window;
import android.view.WindowCallbackWrapper;
import android.widget.SpinnerAdapter;
import android.widget.Toolbar;
-import com.android.internal.R;
import com.android.internal.view.menu.MenuBuilder;
import com.android.internal.view.menu.MenuPresenter;
import com.android.internal.widget.DecorToolbar;
@@ -48,8 +46,6 @@ public class ToolbarActionBar extends ActionBar {
private Window.Callback mWindowCallback;
private boolean mMenuCallbackSet;
- private CharSequence mHomeDescription;
-
private boolean mLastMenuVisibility;
private ArrayList<OnMenuVisibilityListener> mMenuVisibilityListeners =
new ArrayList<OnMenuVisibilityListener>();
@@ -76,8 +72,6 @@ public class ToolbarActionBar extends ActionBar {
mDecorToolbar.setWindowCallback(mWindowCallback);
toolbar.setOnMenuItemClickListener(mMenuClicker);
mDecorToolbar.setWindowTitle(title);
- mHomeDescription = mToolbar.getNavigationContentDescription();
- updateNavDescription();
}
public Window.Callback getWrappedWindowCallback() {
@@ -168,8 +162,7 @@ public class ToolbarActionBar extends ActionBar {
@Override
public void setHomeActionContentDescription(CharSequence description) {
- mToolbar.setNavigationContentDescription(description);
- mHomeDescription = description;
+ mDecorToolbar.setNavigationContentDescription(description);
}
@Override
@@ -179,8 +172,7 @@ public class ToolbarActionBar extends ActionBar {
@Override
public void setHomeActionContentDescription(int resId) {
- mToolbar.setNavigationContentDescription(resId);
- mHomeDescription = mToolbar.getNavigationContentDescription();
+ mDecorToolbar.setNavigationContentDescription(resId);
}
@Override
@@ -258,21 +250,7 @@ public class ToolbarActionBar extends ActionBar {
@Override
public void setDisplayOptions(@DisplayOptions int options, @DisplayOptions int mask) {
final int currentOptions = mDecorToolbar.getDisplayOptions();
- final int changed = (options ^ currentOptions) & mask;
mDecorToolbar.setDisplayOptions(options & mask | currentOptions & ~mask);
- if ((changed & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
- updateNavDescription();
- }
- }
-
- private void updateNavDescription() {
- if ((mDecorToolbar.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
- if (TextUtils.isEmpty(mHomeDescription)) {
- mToolbar.setNavigationContentDescription(R.string.action_bar_up_description);
- } else {
- mToolbar.setNavigationContentDescription(mHomeDescription);
- }
- }
}
@Override
diff --git a/core/java/com/android/internal/inputmethod/InputMethodUtils.java b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
index 6eb00995b1d8..2d067d517f69 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodUtils.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
@@ -44,6 +44,7 @@ import java.util.Locale;
public class InputMethodUtils {
public static final boolean DEBUG = false;
public static final int NOT_A_SUBTYPE_ID = -1;
+ public static final String SUBTYPE_MODE_ANY = null;
public static final String SUBTYPE_MODE_KEYBOARD = "keyboard";
public static final String SUBTYPE_MODE_VOICE = "voice";
private static final String TAG = "InputMethodUtils";
@@ -108,7 +109,7 @@ public class InputMethodUtils {
return containsSubtypeOf(imi, ENGLISH_LOCALE.getLanguage(), SUBTYPE_MODE_KEYBOARD);
}
- private static boolean isSystemAuxilialyImeThatHashAutomaticSubtype(InputMethodInfo imi) {
+ private static boolean isSystemAuxilialyImeThatHasAutomaticSubtype(InputMethodInfo imi) {
if (!isSystemIme(imi)) {
return false;
}
@@ -127,23 +128,38 @@ public class InputMethodUtils {
public static ArrayList<InputMethodInfo> getDefaultEnabledImes(
Context context, boolean isSystemReady, ArrayList<InputMethodInfo> imis) {
- final ArrayList<InputMethodInfo> retval = new ArrayList<InputMethodInfo>();
+ if (!isSystemReady) {
+ final ArrayList<InputMethodInfo> retval = new ArrayList<>();
+ for (int i = 0; i < imis.size(); ++i) {
+ final InputMethodInfo imi = imis.get(i);
+ if (isSystemImeThatHasEnglishKeyboardSubtype(imi)) {
+ retval.add(imi);
+ }
+ }
+ return retval;
+ }
+
+ final ArrayList<InputMethodInfo> retval = new ArrayList<>();
boolean auxilialyImeAdded = false;
for (int i = 0; i < imis.size(); ++i) {
final InputMethodInfo imi = imis.get(i);
- if (isDefaultEnabledIme(isSystemReady, imi, context)) {
+ // TODO: We should check isAsciiCapable instead of relying on
+ // isSystemImeThatHasEnglishKeyboardSubtype().
+ if (isValidSystemDefaultIme(isSystemReady, imi, context)
+ || isSystemImeThatHasEnglishKeyboardSubtype(imi)) {
retval.add(imi);
if (imi.isAuxiliaryIme()) {
auxilialyImeAdded = true;
}
}
}
+ // If one or more auxiliary input methods are available, OK to stop populating the list.
if (auxilialyImeAdded) {
return retval;
}
for (int i = 0; i < imis.size(); ++i) {
final InputMethodInfo imi = imis.get(i);
- if (isSystemAuxilialyImeThatHashAutomaticSubtype(imi)) {
+ if (isSystemAuxilialyImeThatHasAutomaticSubtype(imi)) {
retval.add(imi);
}
}
@@ -163,7 +179,7 @@ public class InputMethodUtils {
try {
if (imi.isDefault(context) && containsSubtypeOf(
imi, context.getResources().getConfiguration().locale.getLanguage(),
- null /* mode */)) {
+ SUBTYPE_MODE_ANY)) {
return true;
}
} catch (Resources.NotFoundException ex) {
@@ -175,22 +191,17 @@ public class InputMethodUtils {
return false;
}
- public static boolean isDefaultEnabledIme(
- boolean isSystemReady, InputMethodInfo imi, Context context) {
- return isValidSystemDefaultIme(isSystemReady, imi, context)
- || isSystemImeThatHasEnglishKeyboardSubtype(imi);
- }
-
public static boolean containsSubtypeOf(InputMethodInfo imi, String language, String mode) {
final int N = imi.getSubtypeCount();
for (int i = 0; i < N; ++i) {
- if (!imi.getSubtypeAt(i).getLocale().startsWith(language)) {
+ final InputMethodSubtype subtype = imi.getSubtypeAt(i);
+ if (!subtype.getLocale().startsWith(language)) {
continue;
}
- if(!TextUtils.isEmpty(mode) && !imi.getSubtypeAt(i).getMode().equalsIgnoreCase(mode)) {
- continue;
+ if (mode == SUBTYPE_MODE_ANY || TextUtils.isEmpty(mode) ||
+ mode.equalsIgnoreCase(subtype.getMode())) {
+ return true;
}
- return true;
}
return false;
}
@@ -217,27 +228,26 @@ public class InputMethodUtils {
return subtypes;
}
- public static InputMethodInfo getMostApplicableDefaultIME(
- List<InputMethodInfo> enabledImes) {
- if (enabledImes != null && enabledImes.size() > 0) {
- // We'd prefer to fall back on a system IME, since that is safer.
- int i = enabledImes.size();
- int firstFoundSystemIme = -1;
- while (i > 0) {
- i--;
- final InputMethodInfo imi = enabledImes.get(i);
- if (InputMethodUtils.isSystemImeThatHasEnglishKeyboardSubtype(imi)
- && !imi.isAuxiliaryIme()) {
- return imi;
- }
- if (firstFoundSystemIme < 0 && InputMethodUtils.isSystemIme(imi)
- && !imi.isAuxiliaryIme()) {
- firstFoundSystemIme = i;
- }
+ public static InputMethodInfo getMostApplicableDefaultIME(List<InputMethodInfo> enabledImes) {
+ if (enabledImes == null || enabledImes.isEmpty()) {
+ return null;
+ }
+ // We'd prefer to fall back on a system IME, since that is safer.
+ int i = enabledImes.size();
+ int firstFoundSystemIme = -1;
+ while (i > 0) {
+ i--;
+ final InputMethodInfo imi = enabledImes.get(i);
+ if (InputMethodUtils.isSystemImeThatHasEnglishKeyboardSubtype(imi)
+ && !imi.isAuxiliaryIme()) {
+ return imi;
+ }
+ if (firstFoundSystemIme < 0 && InputMethodUtils.isSystemIme(imi)
+ && !imi.isAuxiliaryIme()) {
+ firstFoundSystemIme = i;
}
- return enabledImes.get(Math.max(firstFoundSystemIme, 0));
}
- return null;
+ return enabledImes.get(Math.max(firstFoundSystemIme, 0));
}
public static boolean isValidSubtypeId(InputMethodInfo imi, int subtypeHashCode) {
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 45a9dde631af..81705be8478b 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -237,6 +237,9 @@ public final class BatteryStatsImpl extends BatteryStats {
String mStartPlatformVersion;
String mEndPlatformVersion;
+ long mLastRecordedClockTime;
+ long mLastRecordedClockRealtime;
+
long mUptime;
long mUptimeStart;
long mRealtime;
@@ -2271,6 +2274,8 @@ public final class BatteryStatsImpl extends BatteryStats {
if (dataSize == 0) {
// The history is currently empty; we need it to start with a time stamp.
cur.currentTime = System.currentTimeMillis();
+ mLastRecordedClockTime = cur.currentTime;
+ mLastRecordedClockRealtime = elapsedRealtimeMs;
addHistoryBufferLocked(elapsedRealtimeMs, uptimeMs, HistoryItem.CMD_RESET, cur);
}
addHistoryBufferLocked(elapsedRealtimeMs, uptimeMs, HistoryItem.CMD_UPDATE, cur);
@@ -2439,6 +2444,8 @@ public final class BatteryStatsImpl extends BatteryStats {
mNumHistoryTagChars = 0;
mHistoryBufferLastPos = -1;
mHistoryOverflow = false;
+ mLastRecordedClockTime = 0;
+ mLastRecordedClockRealtime = 0;
}
public void updateTimeBasesLocked(boolean unplugged, boolean screenOff, long uptime,
@@ -2498,6 +2505,18 @@ public final class BatteryStatsImpl extends BatteryStats {
final long currentTime = System.currentTimeMillis();
final long elapsedRealtime = SystemClock.elapsedRealtime();
final long uptime = SystemClock.uptimeMillis();
+ if (isStartClockTimeValid()) {
+ // Has the time changed sufficiently that it is really worth recording?
+ if (mLastRecordedClockTime != 0) {
+ long expectedClockTime = mLastRecordedClockTime
+ + (elapsedRealtime - mLastRecordedClockRealtime);
+ if (currentTime >= (expectedClockTime-500)
+ && currentTime <= (expectedClockTime+500)) {
+ // Not sufficiently changed, skip!
+ return;
+ }
+ }
+ }
recordCurrentTimeChangeLocked(currentTime, elapsedRealtime, uptime);
if (isStartClockTimeValid()) {
mStartClockTime = currentTime;
@@ -6821,6 +6840,8 @@ public final class BatteryStatsImpl extends BatteryStats {
boolean reset) {
mRecordingHistory = true;
mHistoryCur.currentTime = System.currentTimeMillis();
+ mLastRecordedClockTime = mHistoryCur.currentTime;
+ mLastRecordedClockRealtime = elapsedRealtimeMs;
addHistoryBufferLocked(elapsedRealtimeMs, uptimeMs,
reset ? HistoryItem.CMD_RESET : HistoryItem.CMD_CURRENT_TIME,
mHistoryCur);
@@ -6834,6 +6855,8 @@ public final class BatteryStatsImpl extends BatteryStats {
final long uptimeMs) {
if (mRecordingHistory) {
mHistoryCur.currentTime = currentTime;
+ mLastRecordedClockTime = currentTime;
+ mLastRecordedClockRealtime = elapsedRealtimeMs;
addHistoryBufferLocked(elapsedRealtimeMs, uptimeMs, HistoryItem.CMD_CURRENT_TIME,
mHistoryCur);
mHistoryCur.currentTime = 0;
diff --git a/core/java/com/android/internal/os/ProcessCpuTracker.java b/core/java/com/android/internal/os/ProcessCpuTracker.java
index e58d68fd1980..86f580d3461d 100644
--- a/core/java/com/android/internal/os/ProcessCpuTracker.java
+++ b/core/java/com/android/internal/os/ProcessCpuTracker.java
@@ -64,7 +64,9 @@ public class ProcessCpuTracker {
/** Stores user time and system time in 100ths of a second. */
private final long[] mProcessStatsData = new long[4];
- /** Stores user time and system time in 100ths of a second. */
+
+ /** Stores user time and system time in 100ths of a second. Used for
+ * public API to retrieve CPU use for a process. Must lock while in use. */
private final long[] mSinglePidStatsData = new long[4];
private static final int[] PROCESS_FULL_STATS_FORMAT = new int[] {
@@ -533,18 +535,20 @@ public class ProcessCpuTracker {
/**
* Returns the total time (in clock ticks, or 1/100 sec) spent executing in
- * both user and system code.
+ * both user and system code. Safe to call without lock held.
*/
public long getCpuTimeForPid(int pid) {
- final String statFile = "/proc/" + pid + "/stat";
- final long[] statsData = mSinglePidStatsData;
- if (Process.readProcFile(statFile, PROCESS_STATS_FORMAT,
- null, statsData, null)) {
- long time = statsData[PROCESS_STAT_UTIME]
- + statsData[PROCESS_STAT_STIME];
- return time;
+ synchronized (mSinglePidStatsData) {
+ final String statFile = "/proc/" + pid + "/stat";
+ final long[] statsData = mSinglePidStatsData;
+ if (Process.readProcFile(statFile, PROCESS_STATS_FORMAT,
+ null, statsData, null)) {
+ long time = statsData[PROCESS_STAT_UTIME]
+ + statsData[PROCESS_STAT_STIME];
+ return time;
+ }
+ return 0;
}
- return 0;
}
/**
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 0aee0e385d2a..40c9ed299498 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -254,12 +254,20 @@ public class ZygoteInit {
preloadClasses();
preloadResources();
preloadOpenGL();
+ preloadSharedLibraries();
// Ask the WebViewFactory to do any initialization that must run in the zygote process,
// for memory sharing purposes.
WebViewFactory.prepareWebViewInZygote();
Log.d(TAG, "end preload");
}
+ private static void preloadSharedLibraries() {
+ Log.i(TAG, "Preloading shared libraries...");
+ System.loadLibrary("android");
+ System.loadLibrary("compiler_rt");
+ System.loadLibrary("jnigraphics");
+ }
+
private static void preloadOpenGL() {
if (!SystemProperties.getBoolean(PROPERTY_DISABLE_OPENGL_PRELOADING, false)) {
EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
diff --git a/core/java/com/android/internal/util/ArrayUtils.java b/core/java/com/android/internal/util/ArrayUtils.java
index 3ed4d518e1e8..8e786da7cf7e 100644
--- a/core/java/com/android/internal/util/ArrayUtils.java
+++ b/core/java/com/android/internal/util/ArrayUtils.java
@@ -107,7 +107,7 @@ public class ArrayUtils
return (T[]) EmptyArray.OBJECT;
}
- int bucket = ((System.identityHashCode(kind) / 8) & 0x7FFFFFFF) % CACHE_SIZE;
+ int bucket = (kind.hashCode() & 0x7FFFFFFF) % CACHE_SIZE;
Object cache = sCache[bucket];
if (cache == null || cache.getClass().getComponentType() != kind) {
diff --git a/core/java/com/android/internal/util/UserIcons.java b/core/java/com/android/internal/util/UserIcons.java
new file mode 100644
index 000000000000..e1e9d5e18c05
--- /dev/null
+++ b/core/java/com/android/internal/util/UserIcons.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.util;
+
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.PorterDuff.Mode;
+import android.graphics.drawable.Drawable;
+import android.os.UserHandle;
+
+import com.android.internal.R;
+
+/**
+ * Helper class that generates default user icons.
+ */
+public class UserIcons {
+
+ private static final int[] USER_ICON_COLORS = {
+ R.color.user_icon_1,
+ R.color.user_icon_2,
+ R.color.user_icon_3,
+ R.color.user_icon_4,
+ R.color.user_icon_5,
+ R.color.user_icon_6,
+ R.color.user_icon_7,
+ R.color.user_icon_8
+ };
+
+ /**
+ * Converts a given drawable to a bitmap.
+ */
+ public static Bitmap convertToBitmap(Drawable icon) {
+ if (icon == null) {
+ return null;
+ }
+ Bitmap bitmap = Bitmap.createBitmap(icon.getIntrinsicWidth(), icon.getIntrinsicHeight(),
+ Bitmap.Config.ARGB_8888);
+ icon.draw(new Canvas(bitmap));
+ return bitmap;
+ }
+
+ /**
+ * Returns a default user icon for the given user.
+ *
+ * Note that for guest users, you should pass in {@code UserHandle.USER_NULL}.
+ * @param userId the user id or {@code UserHandle.USER_NULL} for a non-user specific icon
+ * @param light whether we want a light icon (suitable for a dark background)
+ */
+ public static Drawable getDefaultUserIcon(int userId, boolean light) {
+ int colorResId = light ? R.color.user_icon_default_white : R.color.user_icon_default_gray;
+ if (userId != UserHandle.USER_NULL) {
+ // Return colored icon instead
+ colorResId = USER_ICON_COLORS[userId % USER_ICON_COLORS.length];
+ }
+ Drawable icon = Resources.getSystem().getDrawable(R.drawable.ic_account_circle).mutate();
+ icon.setColorFilter(Resources.getSystem().getColor(colorResId), Mode.SRC_IN);
+ icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight());
+ return icon;
+ }
+}
diff --git a/core/java/com/android/internal/view/InputConnectionWrapper.java b/core/java/com/android/internal/view/InputConnectionWrapper.java
index 0c65ad17bb36..7dc927f744f6 100644
--- a/core/java/com/android/internal/view/InputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/InputConnectionWrapper.java
@@ -445,11 +445,4 @@ public class InputConnectionWrapper implements InputConnection {
}
return result;
}
-
- /**
- * @removed
- */
- public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
- return requestCursorUpdates(cursorUpdateMode);
- }
}
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java
index e53af691eb36..fb44e5876b6c 100644
--- a/core/java/com/android/internal/widget/ActionBarView.java
+++ b/core/java/com/android/internal/widget/ActionBarView.java
@@ -135,6 +135,7 @@ public class ActionBarView extends AbsActionBarView implements DecorToolbar {
private ExpandedActionViewMenuPresenter mExpandedMenuPresenter;
View mExpandedActionView;
+ private int mDefaultUpDescription = R.string.action_bar_up_description;
Window.Callback mWindowCallback;
@@ -187,7 +188,7 @@ public class ActionBarView extends AbsActionBarView implements DecorToolbar {
mExpandedHomeLayout.setShowUp(true);
mExpandedHomeLayout.setOnClickListener(mExpandedActionViewUpListener);
mExpandedHomeLayout.setContentDescription(getResources().getText(
- R.string.action_bar_up_description));
+ mDefaultUpDescription));
// This needs to highlight/be focusable on its own.
// TODO: Clean up the handoff between expanded/normal.
@@ -579,7 +580,7 @@ public class ActionBarView extends AbsActionBarView implements DecorToolbar {
homeDesc = mHomeDescription;
} else {
if ((mDisplayOptions & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
- homeDesc = mContext.getResources().getText(R.string.action_bar_up_description);
+ homeDesc = mContext.getResources().getText(mDefaultUpDescription);
} else {
homeDesc = mContext.getResources().getText(R.string.action_bar_home_description);
}
@@ -1330,6 +1331,15 @@ public class ActionBarView extends AbsActionBarView implements DecorToolbar {
updateHomeAccessibility(mUpGoerFive.isEnabled());
}
+ @Override
+ public void setDefaultNavigationContentDescription(int defaultNavigationContentDescription) {
+ if (mDefaultUpDescription == defaultNavigationContentDescription) {
+ return;
+ }
+ mDefaultUpDescription = defaultNavigationContentDescription;
+ updateHomeAccessibility(mUpGoerFive.isEnabled());
+ }
+
static class SavedState extends BaseSavedState {
int expandedMenuItemId;
boolean isOverflowOpen;
diff --git a/core/java/com/android/internal/widget/DecorToolbar.java b/core/java/com/android/internal/widget/DecorToolbar.java
index 5281045762ff..fee30153d95e 100644
--- a/core/java/com/android/internal/widget/DecorToolbar.java
+++ b/core/java/com/android/internal/widget/DecorToolbar.java
@@ -89,6 +89,7 @@ public interface DecorToolbar {
void setNavigationIcon(int resId);
void setNavigationContentDescription(CharSequence description);
void setNavigationContentDescription(int resId);
+ void setDefaultNavigationContentDescription(int defaultNavigationContentDescription);
void saveHierarchyState(SparseArray<Parcelable> toolbarStates);
void restoreHierarchyState(SparseArray<Parcelable> toolbarStates);
}
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index c84708e08806..f25cf9b0fb38 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -35,7 +35,7 @@ import android.os.UserHandle;
import android.os.storage.IMountService;
import android.os.storage.StorageManager;
import android.provider.Settings;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.IWindowManager;
@@ -1477,8 +1477,8 @@ public class LockPatternUtils {
return getTelecommManager().isInCall();
}
- private TelecommManager getTelecommManager() {
- return (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
+ private TelecomManager getTelecommManager() {
+ return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
}
private void finishBiometricWeak() {
diff --git a/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java b/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
index 250bbac1067e..8446e0623bbb 100644
--- a/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
+++ b/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
@@ -76,14 +76,21 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
private boolean mTitleSet;
private CharSequence mTitle;
private CharSequence mSubtitle;
+ private CharSequence mHomeDescription;
private Window.Callback mWindowCallback;
private boolean mMenuPrepared;
private ActionMenuPresenter mActionMenuPresenter;
private int mNavigationMode = ActionBar.NAVIGATION_MODE_STANDARD;
+ private int mDefaultNavigationContentDescription = 0;
public ToolbarWidgetWrapper(Toolbar toolbar, boolean style) {
+ this(toolbar, style, R.string.action_bar_up_description);
+ }
+
+ public ToolbarWidgetWrapper(Toolbar toolbar, boolean style,
+ int defaultNavigationContentDescription) {
mToolbar = toolbar;
mTitle = toolbar.getTitle();
@@ -166,10 +173,8 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
mDisplayOpts = detectDisplayOptions();
}
- if (TextUtils.isEmpty(mToolbar.getNavigationContentDescription())) {
- mToolbar.setNavigationContentDescription(
- getContext().getResources().getText(R.string.action_bar_up_description));
- }
+ setDefaultNavigationContentDescription(defaultNavigationContentDescription);
+ mHomeDescription = mToolbar.getNavigationContentDescription();
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
final ActionMenuItem mNavItem = new ActionMenuItem(mToolbar.getContext(),
@@ -183,6 +188,17 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
});
}
+ @Override
+ public void setDefaultNavigationContentDescription(int defaultNavigationContentDescription) {
+ if (defaultNavigationContentDescription == mDefaultNavigationContentDescription) {
+ return;
+ }
+ mDefaultNavigationContentDescription = defaultNavigationContentDescription;
+ if (TextUtils.isEmpty(mToolbar.getNavigationContentDescription())) {
+ setNavigationContentDescription(mDefaultNavigationContentDescription);
+ }
+ }
+
private int detectDisplayOptions() {
int opts = ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME |
ActionBar.DISPLAY_USE_LOGO;
@@ -395,6 +411,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
if ((changed & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
if ((newOpts & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
mToolbar.setNavigationIcon(mNavIcon);
+ updateHomeAccessibility();
} else {
mToolbar.setNavigationIcon(null);
}
@@ -602,12 +619,23 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
@Override
public void setNavigationContentDescription(CharSequence description) {
- mToolbar.setNavigationContentDescription(description);
+ mHomeDescription = description;
+ updateHomeAccessibility();
}
@Override
public void setNavigationContentDescription(int resId) {
- mToolbar.setNavigationContentDescription(resId);
+ setNavigationContentDescription(resId == 0 ? null : getContext().getString(resId));
+ }
+
+ private void updateHomeAccessibility() {
+ if ((mDisplayOpts & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
+ if (TextUtils.isEmpty(mHomeDescription)) {
+ mToolbar.setNavigationContentDescription(mDefaultNavigationContentDescription);
+ } else {
+ mToolbar.setNavigationContentDescription(mHomeDescription);
+ }
+ }
}
@Override
diff --git a/core/java/com/android/server/BootReceiver.java b/core/java/com/android/server/BootReceiver.java
index 724998570cb0..468d7f1f15a9 100644
--- a/core/java/com/android/server/BootReceiver.java
+++ b/core/java/com/android/server/BootReceiver.java
@@ -123,8 +123,15 @@ public class BootReceiver extends BroadcastReceiver {
}
if (SystemProperties.getLong("ro.runtime.firstboot", 0) == 0) {
- String now = Long.toString(System.currentTimeMillis());
- SystemProperties.set("ro.runtime.firstboot", now);
+ if ("encrypted".equals(SystemProperties.get("ro.crypto.state"))
+ && "trigger_restart_min_framework".equals(SystemProperties.get("vold.decrypt"))){
+ // Encrypted, first boot to get PIN/pattern/password so data is tmpfs
+ // Don't set ro.runtime.firstboot so that we will do this again
+ // when data is properly mounted
+ } else {
+ String now = Long.toString(System.currentTimeMillis());
+ SystemProperties.set("ro.runtime.firstboot", now);
+ }
if (db != null) db.addText("SYSTEM_BOOT", headers);
// Negative sizes mean to take the *tail* of the file (see FileUtils.readTextFile())
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index a63258c8e657..157310657c59 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -271,6 +271,7 @@ AndroidRuntime::~AndroidRuntime()
}
void AndroidRuntime::setArgv0(const char* argv0) {
+ memset(mArgBlockStart, 0, mArgBlockLength);
strlcpy(mArgBlockStart, argv0, mArgBlockLength);
}
@@ -345,28 +346,6 @@ static bool runtime_isSensitiveThread() {
return state && state->getStrictModePolicy() != 0;
}
-
-/**
- * Add VM arguments to the to-be-executed VM
- * Stops at first non '-' argument (also stops at an argument of '--')
- * Returns the number of args consumed
- */
-int AndroidRuntime::addVmArguments(int argc, const char* const argv[])
-{
- int i;
-
- for (i = 0; i<argc; i++) {
- if (argv[i][0] != '-') {
- return i;
- }
- if (argv[i][1] == '-' && argv[i][2] == 0) {
- return i+1;
- }
- addOption(argv[i]);
- }
- return i;
-}
-
static int hasDir(const char* dir)
{
struct stat s;
diff --git a/core/jni/android/graphics/Path.cpp b/core/jni/android/graphics/Path.cpp
index 6ef1d2c10597..9d3e74b6ba46 100644
--- a/core/jni/android/graphics/Path.cpp
+++ b/core/jni/android/graphics/Path.cpp
@@ -435,19 +435,32 @@ public:
std::vector<float> lengths;
float errorSquared = acceptableError * acceptableError;
- while ((verb = pathIter.next(points)) != SkPath::kDone_Verb) {
+ while ((verb = pathIter.next(points, false)) != SkPath::kDone_Verb) {
createVerbSegments(verb, points, segmentPoints, lengths, errorSquared);
}
if (segmentPoints.empty()) {
- return NULL;
+ int numVerbs = path->countVerbs();
+ if (numVerbs == 1) {
+ addMove(segmentPoints, lengths, path->getPoint(0));
+ } else {
+ // Invalid or empty path. Fall back to point(0,0)
+ addMove(segmentPoints, lengths, SkPoint());
+ }
+ }
+
+ float totalLength = lengths.back();
+ if (totalLength == 0) {
+ // Lone Move instructions should still be able to animate at the same value.
+ segmentPoints.push_back(segmentPoints.back());
+ lengths.push_back(1);
+ totalLength = 1;
}
size_t numPoints = segmentPoints.size();
size_t approximationArraySize = numPoints * 3;
float* approximation = new float[approximationArraySize];
- float totalLength = lengths.back();
int approximationIndex = 0;
for (size_t i = 0; i < numPoints; i++) {
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index 396f3ec7a176..4859ee6fb796 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -2051,6 +2051,8 @@ static JNINativeMethod gAssetManagerMethods[] = {
(void*) android_content_AssetManager_dumpTheme },
{ "applyStyle","(JIIJ[I[I[I)Z",
(void*) android_content_AssetManager_applyStyle },
+ { "resolveAttrs","(JII[I[I[I[I)Z",
+ (void*) android_content_AssetManager_resolveAttrs },
{ "retrieveAttributes","(J[I[I[I)Z",
(void*) android_content_AssetManager_retrieveAttributes },
{ "getArraySize","(I)I",
diff --git a/core/res/res/drawable-hdpi/ic_ab_back_mtrl_am_alpha.png b/core/res/res/drawable-hdpi/ic_ab_back_mtrl_am_alpha.png
deleted file mode 100644
index 6c36eae2f4ae..000000000000
--- a/core/res/res/drawable-hdpi/ic_ab_back_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_dialog_alert_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_dialog_alert_mtrl_alpha.png
deleted file mode 100644
index 95cfb32c9366..000000000000
--- a/core/res/res/drawable-hdpi/ic_dialog_alert_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_go_search_api_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_go_search_api_mtrl_alpha.png
deleted file mode 100644
index aa23c591e496..000000000000
--- a/core/res/res/drawable-hdpi/ic_go_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy_mtrl_am_alpha.png b/core/res/res/drawable-hdpi/ic_menu_copy_mtrl_am_alpha.png
deleted file mode 100644
index d6d1f2fcaba9..000000000000
--- a/core/res/res/drawable-hdpi/ic_menu_copy_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_menu_cut_mtrl_alpha.png
deleted file mode 100644
index ec8db6f6a3f7..000000000000
--- a/core/res/res/drawable-hdpi/ic_menu_cut_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_mtrl_alpha.png
deleted file mode 100644
index 1ba12950c81d..000000000000
--- a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste_mtrl_am_alpha.png b/core/res/res/drawable-hdpi/ic_menu_paste_mtrl_am_alpha.png
deleted file mode 100644
index bf4472209383..000000000000
--- a/core/res/res/drawable-hdpi/ic_menu_paste_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_selectall_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_menu_selectall_mtrl_alpha.png
deleted file mode 100644
index 853974182d64..000000000000
--- a/core/res/res/drawable-hdpi/ic_menu_selectall_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_share_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_menu_share_mtrl_alpha.png
deleted file mode 100644
index 0eaceddf1605..000000000000
--- a/core/res/res/drawable-hdpi/ic_menu_share_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_search_api_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_search_api_mtrl_alpha.png
deleted file mode 100644
index f7382d373da3..000000000000
--- a/core/res/res/drawable-hdpi/ic_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_voice_search_api_mtrl_alpha.png b/core/res/res/drawable-hdpi/ic_voice_search_api_mtrl_alpha.png
deleted file mode 100644
index 25b89355605a..000000000000
--- a/core/res/res/drawable-hdpi/ic_voice_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_divider_mtrl_alpha.9.png b/core/res/res/drawable-hdpi/list_divider_mtrl_alpha.9.png
index 77845df97040..2fa6d7e7691d 100644
--- a/core/res/res/drawable-hdpi/list_divider_mtrl_alpha.9.png
+++ b/core/res/res/drawable-hdpi/list_divider_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_ab_back_mtrl_am_alpha.png b/core/res/res/drawable-ldpi/ic_ab_back_mtrl_am_alpha.png
deleted file mode 100644
index 96e86b6751d1..000000000000
--- a/core/res/res/drawable-ldpi/ic_ab_back_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_alert_mtrl_alpha.png b/core/res/res/drawable-ldpi/ic_dialog_alert_mtrl_alpha.png
deleted file mode 100644
index f604e8b4dd48..000000000000
--- a/core/res/res/drawable-ldpi/ic_dialog_alert_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_copy_mtrl_am_alpha.png b/core/res/res/drawable-ldpi/ic_menu_copy_mtrl_am_alpha.png
deleted file mode 100644
index 565280b3a2c5..000000000000
--- a/core/res/res/drawable-ldpi/ic_menu_copy_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_cut_mtrl_alpha.png b/core/res/res/drawable-ldpi/ic_menu_cut_mtrl_alpha.png
deleted file mode 100644
index dbedece56a16..000000000000
--- a/core/res/res/drawable-ldpi/ic_menu_cut_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_moreoverflow_mtrl_alpha.png b/core/res/res/drawable-ldpi/ic_menu_moreoverflow_mtrl_alpha.png
deleted file mode 100644
index d47f81ec6ad7..000000000000
--- a/core/res/res/drawable-ldpi/ic_menu_moreoverflow_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_paste_mtrl_am_alpha.png b/core/res/res/drawable-ldpi/ic_menu_paste_mtrl_am_alpha.png
deleted file mode 100644
index 430141b13083..000000000000
--- a/core/res/res/drawable-ldpi/ic_menu_paste_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_selectall_mtrl_alpha.png b/core/res/res/drawable-ldpi/ic_menu_selectall_mtrl_alpha.png
deleted file mode 100644
index 7b520bc8a866..000000000000
--- a/core/res/res/drawable-ldpi/ic_menu_selectall_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_share_mtrl_alpha.png b/core/res/res/drawable-ldpi/ic_menu_share_mtrl_alpha.png
deleted file mode 100644
index db1e146991b4..000000000000
--- a/core/res/res/drawable-ldpi/ic_menu_share_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/list_divider_mtrl_alpha.9.png b/core/res/res/drawable-ldpi/list_divider_mtrl_alpha.9.png
index 77845df97040..941d0d7cc03a 100644
--- a/core/res/res/drawable-ldpi/list_divider_mtrl_alpha.9.png
+++ b/core/res/res/drawable-ldpi/list_divider_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_ab_back_mtrl_am_alpha.png b/core/res/res/drawable-mdpi/ic_ab_back_mtrl_am_alpha.png
deleted file mode 100644
index 667435189e05..000000000000
--- a/core/res/res/drawable-mdpi/ic_ab_back_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_dialog_alert_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_dialog_alert_mtrl_alpha.png
deleted file mode 100644
index 8a882f907b4a..000000000000
--- a/core/res/res/drawable-mdpi/ic_dialog_alert_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_go_search_api_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_go_search_api_mtrl_alpha.png
deleted file mode 100644
index b5f61765867d..000000000000
--- a/core/res/res/drawable-mdpi/ic_go_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy_mtrl_am_alpha.png b/core/res/res/drawable-mdpi/ic_menu_copy_mtrl_am_alpha.png
deleted file mode 100644
index 3fae32dc8b44..000000000000
--- a/core/res/res/drawable-mdpi/ic_menu_copy_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_menu_cut_mtrl_alpha.png
deleted file mode 100644
index 61ff6316ab9f..000000000000
--- a/core/res/res/drawable-mdpi/ic_menu_cut_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_mtrl_alpha.png
deleted file mode 100644
index 841509682598..000000000000
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste_mtrl_am_alpha.png b/core/res/res/drawable-mdpi/ic_menu_paste_mtrl_am_alpha.png
deleted file mode 100644
index 112c26887985..000000000000
--- a/core/res/res/drawable-mdpi/ic_menu_paste_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_selectall_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_menu_selectall_mtrl_alpha.png
deleted file mode 100644
index 64149563e80a..000000000000
--- a/core/res/res/drawable-mdpi/ic_menu_selectall_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_share_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_menu_share_mtrl_alpha.png
deleted file mode 100644
index e0d5ac4e5e66..000000000000
--- a/core/res/res/drawable-mdpi/ic_menu_share_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_search_api_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_search_api_mtrl_alpha.png
deleted file mode 100644
index 0fb57b2ea21f..000000000000
--- a/core/res/res/drawable-mdpi/ic_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_voice_search_api_mtrl_alpha.png b/core/res/res/drawable-mdpi/ic_voice_search_api_mtrl_alpha.png
deleted file mode 100644
index 3f1eee39e20c..000000000000
--- a/core/res/res/drawable-mdpi/ic_voice_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_divider_mtrl_alpha.9.png b/core/res/res/drawable-mdpi/list_divider_mtrl_alpha.9.png
index 77845df97040..070bdbfdbce6 100644
--- a/core/res/res/drawable-mdpi/list_divider_mtrl_alpha.9.png
+++ b/core/res/res/drawable-mdpi/list_divider_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_ab_back_mtrl_am_alpha.png b/core/res/res/drawable-xhdpi/ic_ab_back_mtrl_am_alpha.png
deleted file mode 100644
index 27bdcb79e3f2..000000000000
--- a/core/res/res/drawable-xhdpi/ic_ab_back_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_dialog_alert_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_dialog_alert_mtrl_alpha.png
deleted file mode 100644
index 2229bf311084..000000000000
--- a/core/res/res/drawable-xhdpi/ic_dialog_alert_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_go_search_api_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_go_search_api_mtrl_alpha.png
deleted file mode 100644
index bd80981c3c4b..000000000000
--- a/core/res/res/drawable-xhdpi/ic_go_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy_mtrl_am_alpha.png b/core/res/res/drawable-xhdpi/ic_menu_copy_mtrl_am_alpha.png
deleted file mode 100644
index b690d7c56f95..000000000000
--- a/core/res/res/drawable-xhdpi/ic_menu_copy_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_menu_cut_mtrl_alpha.png
deleted file mode 100644
index 10c206746af0..000000000000
--- a/core/res/res/drawable-xhdpi/ic_menu_cut_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_mtrl_alpha.png
deleted file mode 100644
index f91b718478ac..000000000000
--- a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste_mtrl_am_alpha.png b/core/res/res/drawable-xhdpi/ic_menu_paste_mtrl_am_alpha.png
deleted file mode 100644
index 4024627238cf..000000000000
--- a/core/res/res/drawable-xhdpi/ic_menu_paste_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_selectall_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_menu_selectall_mtrl_alpha.png
deleted file mode 100644
index f7c026181418..000000000000
--- a/core/res/res/drawable-xhdpi/ic_menu_selectall_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_share_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_menu_share_mtrl_alpha.png
deleted file mode 100644
index 7accf52ac310..000000000000
--- a/core/res/res/drawable-xhdpi/ic_menu_share_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_search_api_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_search_api_mtrl_alpha.png
deleted file mode 100644
index 05cfab7eef5d..000000000000
--- a/core/res/res/drawable-xhdpi/ic_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_voice_search_api_mtrl_alpha.png b/core/res/res/drawable-xhdpi/ic_voice_search_api_mtrl_alpha.png
deleted file mode 100644
index c1c23d04d905..000000000000
--- a/core/res/res/drawable-xhdpi/ic_voice_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/list_divider_mtrl_alpha.9.png b/core/res/res/drawable-xhdpi/list_divider_mtrl_alpha.9.png
index 77845df97040..0d2836d86824 100644
--- a/core/res/res/drawable-xhdpi/list_divider_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xhdpi/list_divider_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_ab_back_mtrl_am_alpha.png b/core/res/res/drawable-xxhdpi/ic_ab_back_mtrl_am_alpha.png
deleted file mode 100644
index c2d6a542cdc3..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_ab_back_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_dialog_alert_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_dialog_alert_mtrl_alpha.png
deleted file mode 100644
index 10e07562e95f..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_dialog_alert_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_go_search_api_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_go_search_api_mtrl_alpha.png
deleted file mode 100644
index 8e1ab5bbfb07..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_go_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_menu_copy_mtrl_am_alpha.png b/core/res/res/drawable-xxhdpi/ic_menu_copy_mtrl_am_alpha.png
deleted file mode 100644
index 7c3a58b29c87..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_menu_copy_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_menu_cut_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_menu_cut_mtrl_alpha.png
deleted file mode 100644
index 2200642f863a..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_menu_cut_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_mtrl_alpha.png
deleted file mode 100644
index ff1759b8f94a..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_menu_paste_mtrl_am_alpha.png b/core/res/res/drawable-xxhdpi/ic_menu_paste_mtrl_am_alpha.png
deleted file mode 100644
index 28c0ae0ee600..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_menu_paste_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_menu_selectall_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_menu_selectall_mtrl_alpha.png
deleted file mode 100644
index 6430d450ca95..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_menu_selectall_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_menu_share_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_menu_share_mtrl_alpha.png
deleted file mode 100644
index 66f7d1627b55..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_menu_share_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_search_api_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_search_api_mtrl_alpha.png
deleted file mode 100644
index 6f60bd3c2b7b..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_voice_search_api_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/ic_voice_search_api_mtrl_alpha.png
deleted file mode 100644
index d95f1d03c14e..000000000000
--- a/core/res/res/drawable-xxhdpi/ic_voice_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/list_divider_mtrl_alpha.9.png b/core/res/res/drawable-xxhdpi/list_divider_mtrl_alpha.9.png
index 0fafd1a049df..b8ac46d17e01 100644
--- a/core/res/res/drawable-xxhdpi/list_divider_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xxhdpi/list_divider_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxxhdpi/ic_ab_back_mtrl_am_alpha.png b/core/res/res/drawable-xxxhdpi/ic_ab_back_mtrl_am_alpha.png
deleted file mode 100644
index 70c204021088..000000000000
--- a/core/res/res/drawable-xxxhdpi/ic_ab_back_mtrl_am_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxxhdpi/ic_search_api_mtrl_alpha.png b/core/res/res/drawable-xxxhdpi/ic_search_api_mtrl_alpha.png
deleted file mode 100644
index c873e9b0c807..000000000000
--- a/core/res/res/drawable-xxxhdpi/ic_search_api_mtrl_alpha.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable/ic_ab_back_material.xml b/core/res/res/drawable/ic_ab_back_material.xml
index 37455d469fb9..72d798167154 100644
--- a/core/res/res/drawable/ic_ab_back_material.xml
+++ b/core/res/res/drawable/ic_ab_back_material.xml
@@ -1,20 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_ab_back_mtrl_am_alpha"
- android:autoMirrored="true"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:autoMirrored="true"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M20.000000,11.000000L7.800000,11.000000l5.600000,-5.600000L12.000000,4.000000l-8.000000,8.000000l8.000000,8.000000l1.400000,-1.400000L7.800000,13.000000L20.000000,13.000000L20.000000,11.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_account_circle.xml b/core/res/res/drawable/ic_account_circle.xml
index d8649e598e28..a8c5b8c6c3d7 100644
--- a/packages/SystemUI/res/drawable/ic_account_circle.xml
+++ b/core/res/res/drawable/ic_account_circle.xml
@@ -14,18 +14,11 @@ Copyright (C) 2014 The Android Open Source Project
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
-
- <group
- android:scaleX="1.2"
- android:scaleY="1.2"
- android:pivotX="12.0"
- android:pivotY="12.0">
+ android:width="48.0dp"
+ android:height="48.0dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
<path
- android:fillColor="#FFFFFFFF"
- android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,5.0c1.7,0.0 3.0,1.3 3.0,3.0c0.0,1.7 -1.3,3.0 -3.0,3.0c-1.7,0.0 -3.0,-1.3 -3.0,-3.0C9.0,6.3 10.3,5.0 12.0,5.0zM12.0,19.2c-2.5,0.0 -4.7,-1.3 -6.0,-3.2c0.0,-2.0 4.0,-3.1 6.0,-3.1c2.0,0.0 6.0,1.1 6.0,3.1C16.7,17.9 14.5,19.2 12.0,19.2z"/>
- </group>
+ android:pathData="M24,0C10.8,0 0,10.8 0,24s10.8,24 24,24s24,-10.8 24,-24S37.200001,0 24,0zM24,7.2c3.96,0 7.2,3.24 7.2,7.2s-3.24,7.2 -7.2,7.2s-7.2,-3.24 -7.2,-7.2S20.040001,7.2 24,7.2zM24,41.279999c-6,0 -11.28,-3.12 -14.4,-7.68c0.12,-4.8 9.6,-7.44 14.4,-7.44s14.28,2.64 14.4,7.44C35.279999,38.16 30,41.279999 24,41.279999z"
+ android:fillColor="#FFFFFFFF"/>
</vector>
diff --git a/core/res/res/drawable/ic_corp_icon_badge.xml b/core/res/res/drawable/ic_corp_icon_badge.xml
index 834ae68f57df..0021a8f1d9f7 100644
--- a/core/res/res/drawable/ic_corp_icon_badge.xml
+++ b/core/res/res/drawable/ic_corp_icon_badge.xml
@@ -20,11 +20,13 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportHeight="64.0">
<path
- android:fillColor="#33000000"
- android:pathData="M49.062,50.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"/>
+ android:fillColor="#FF000000"
+ android:pathData="M49.062,50.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"
+ android:fillAlpha="0.2"/>
<path
- android:fillColor="#33000000"
- android:pathData="M49.0,49.5m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"/>
+ android:fillColor="#FF000000"
+ android:pathData="M49.0,49.5m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"
+ android:fillAlpha="0.2"/>
<path
android:pathData="M49.0,49.0m-14.0,0.0a14.0,14.0 0.0,1.0 1.0,28.0 0.0a14.0,14.0 0.0,1.0 1.0,-28.0 0.0"
android:fillColor="#FF5722"/>
diff --git a/core/res/res/drawable/ic_dialog_alert_material.xml b/core/res/res/drawable/ic_dialog_alert_material.xml
index 41e1ab1d7d45..3bb4d2c70d05 100644
--- a/core/res/res/drawable/ic_dialog_alert_material.xml
+++ b/core/res/res/drawable/ic_dialog_alert_material.xml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_dialog_alert_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M1.000000,21.000000l22.000000,0.000000L12.000000,2.000000L1.000000,21.000000zM13.000000,18.000000l-2.000000,0.000000l0.000000,-2.000000l2.000000,0.000000L13.000000,18.000000zM13.000000,14.000000l-2.000000,0.000000l0.000000,-4.000000l2.000000,0.000000L13.000000,14.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_go_search_api_material.xml b/core/res/res/drawable/ic_go_search_api_material.xml
index 03f6cd5c9a28..21c7249fa119 100644
--- a/core/res/res/drawable/ic_go_search_api_material.xml
+++ b/core/res/res/drawable/ic_go_search_api_material.xml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_go_search_api_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M10.000000,6.000000l-1.400000,1.400000 4.599999,4.600000 -4.599999,4.600000 1.400000,1.400000 6.000000,-6.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_lock_bugreport.xml b/core/res/res/drawable/ic_lock_bugreport.xml
index 8540eee20a20..b0c32e010a3a 100644
--- a/core/res/res/drawable/ic_lock_bugreport.xml
+++ b/core/res/res/drawable/ic_lock_bugreport.xml
@@ -17,9 +17,9 @@ Copyright (C) 2014 The Android Open Source Project
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0">
-
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
<path
- android:fillColor="?attr/colorControlNormal"
+ android:fillColor="@color/white"
android:pathData="M20.0,8.0l-2.8,0.0c-0.5,-0.8 -1.1,-1.5 -1.8,-2.0L17.0,4.4L15.6,3.0l-2.2,2.2C13.0,5.1 12.5,5.0 12.0,5.0s-1.0,0.1 -1.4,0.2L8.4,3.0L7.0,4.4L8.6,6.0C7.9,6.5 7.3,7.2 6.8,8.0L4.0,8.0l0.0,2.0l2.1,0.0C6.0,10.3 6.0,10.7 6.0,11.0l0.0,1.0L4.0,12.0l0.0,2.0l2.0,0.0l0.0,1.0c0.0,0.3 0.0,0.7 0.1,1.0L4.0,16.0l0.0,2.0l2.8,0.0c1.0,1.8 3.0,3.0 5.2,3.0s4.2,-1.2 5.2,-3.0L20.0,18.0l0.0,-2.0l-2.1,0.0c0.1,-0.3 0.1,-0.7 0.1,-1.0l0.0,-1.0l2.0,0.0l0.0,-2.0l-2.0,0.0l0.0,-1.0c0.0,-0.3 0.0,-0.7 -0.1,-1.0L20.0,10.0L20.0,8.0zM14.0,16.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,16.0zM14.0,12.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,12.0z"/>
</vector>
diff --git a/core/res/res/drawable/ic_menu_copy_material.xml b/core/res/res/drawable/ic_menu_copy_material.xml
index 877b5ff14a3b..da3912bf5e5a 100644
--- a/core/res/res/drawable/ic_menu_copy_material.xml
+++ b/core/res/res/drawable/ic_menu_copy_material.xml
@@ -1,20 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_copy_mtrl_am_alpha"
- android:tint="?attr/colorControlNormal"
- android:autoMirrored="true" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:autoMirrored="true"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M16.000000,1.000000L4.000000,1.000000C2.900000,1.000000 2.000000,1.900000 2.000000,3.000000l0.000000,14.000000l2.000000,0.000000L4.000000,3.000000l12.000000,0.000000L16.000000,1.000000zM19.000000,5.000000L8.000000,5.000000C6.900000,5.000000 6.000000,5.900000 6.000000,7.000000l0.000000,14.000000c0.000000,1.100000 0.900000,2.000000 2.000000,2.000000l11.000000,0.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000L21.000000,7.000000C21.000000,5.900000 20.100000,5.000000 19.000000,5.000000zM19.000000,21.000000L8.000000,21.000000L8.000000,7.000000l11.000000,0.000000L19.000000,21.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_menu_cut_material.xml b/core/res/res/drawable/ic_menu_cut_material.xml
index ff8d6e610c70..54db72adcb0e 100644
--- a/core/res/res/drawable/ic_menu_cut_material.xml
+++ b/core/res/res/drawable/ic_menu_cut_material.xml
@@ -1,19 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_cut_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:autoMirrored="true"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M10.000000,6.000000c0.000000,-2.200000 -1.800000,-4.000000 -4.000000,-4.000000S2.000000,3.800000 2.000000,6.000000c0.000000,2.200000 1.800000,4.000000 4.000000,4.000000c0.600000,0.000000 1.100000,-0.100000 1.600000,-0.400000L10.000000,12.000000l-2.400000,2.400000C7.100000,14.100000 6.600000,14.000000 6.000000,14.000000c-2.200000,0.000000 -4.000000,1.800000 -4.000000,4.000000c0.000000,2.200000 1.800000,4.000000 4.000000,4.000000s4.000000,-1.800000 4.000000,-4.000000c0.000000,-0.600000 -0.100000,-1.100000 -0.400000,-1.600000L12.000000,14.000000l7.000000,7.000000l4.000000,0.000000L9.600000,7.600000C9.900000,7.100000 10.000000,6.600000 10.000000,6.000000zM6.000000,8.000000C4.900000,8.000000 4.000000,7.100000 4.000000,6.000000s0.900000,-2.000000 2.000000,-2.000000c1.100000,0.000000 2.000000,0.900000 2.000000,2.000000S7.100000,8.000000 6.000000,8.000000zM6.000000,20.000000c-1.100000,0.000000 -2.000000,-0.900000 -2.000000,-2.000000s0.900000,-2.000000 2.000000,-2.000000c1.100000,0.000000 2.000000,0.900000 2.000000,2.000000S7.100000,20.000000 6.000000,20.000000zM12.000000,11.500000c0.300000,0.000000 0.500000,0.200000 0.500000,0.500000c0.000000,0.300000 -0.200000,0.500000 -0.500000,0.500000c-0.300000,0.000000 -0.500000,-0.200000 -0.500000,-0.500000C11.500000,11.700000 11.700000,11.500000 12.000000,11.500000zM23.000000,3.000000l-4.000000,0.000000l-6.000000,6.000000l2.000000,2.000000L23.000000,3.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_menu_moreoverflow_material.xml b/core/res/res/drawable/ic_menu_moreoverflow_material.xml
index 16d4f0c080db..c1285700394c 100644
--- a/core/res/res/drawable/ic_menu_moreoverflow_material.xml
+++ b/core/res/res/drawable/ic_menu_moreoverflow_material.xml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_moreoverflow_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M12.000000,8.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000s-0.900000,-2.000000 -2.000000,-2.000000c-1.100000,0.000000 -2.000000,0.900000 -2.000000,2.000000S10.900000,8.000000 12.000000,8.000000zM12.000000,10.000000c-1.100000,0.000000 -2.000000,0.900000 -2.000000,2.000000s0.900000,2.000000 2.000000,2.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000S13.100000,10.000000 12.000000,10.000000zM12.000000,16.000000c-1.100000,0.000000 -2.000000,0.900000 -2.000000,2.000000s0.900000,2.000000 2.000000,2.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000S13.100000,16.000000 12.000000,16.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_menu_paste_material.xml b/core/res/res/drawable/ic_menu_paste_material.xml
index f7bbbf991e60..5f847cb2f908 100644
--- a/core/res/res/drawable/ic_menu_paste_material.xml
+++ b/core/res/res/drawable/ic_menu_paste_material.xml
@@ -1,20 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_paste_mtrl_am_alpha"
- android:tint="?attr/colorControlNormal"
- android:autoMirrored="true" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:autoMirrored="true"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M19.000000,2.000000l-4.200000,0.000000c-0.400000,-1.200000 -1.500000,-2.000000 -2.800000,-2.000000c-1.300000,0.000000 -2.400000,0.800000 -2.800000,2.000000L5.000000,2.000000C3.900000,2.000000 3.000000,2.900000 3.000000,4.000000l0.000000,16.000000c0.000000,1.100000 0.900000,2.000000 2.000000,2.000000l14.000000,0.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000L21.000000,4.000000C21.000000,2.900000 20.100000,2.000000 19.000000,2.000000zM12.000000,2.000000c0.600000,0.000000 1.000000,0.400000 1.000000,1.000000s-0.400000,1.000000 -1.000000,1.000000c-0.600000,0.000000 -1.000000,-0.400000 -1.000000,-1.000000S11.400000,2.000000 12.000000,2.000000zM19.000000,20.000000L5.000000,20.000000L5.000000,4.000000l2.000000,0.000000l0.000000,3.000000l10.000000,0.000000L17.000000,4.000000l2.000000,0.000000L19.000000,20.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_menu_selectall_material.xml b/core/res/res/drawable/ic_menu_selectall_material.xml
index a431dd593184..11e63fde6247 100644
--- a/core/res/res/drawable/ic_menu_selectall_material.xml
+++ b/core/res/res/drawable/ic_menu_selectall_material.xml
@@ -1,19 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_selectall_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:autoMirrored="true"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M3.000000,5.000000l2.000000,0.000000L5.000000,3.000000C3.900000,3.000000 3.000000,3.900000 3.000000,5.000000zM3.000000,13.000000l2.000000,0.000000l0.000000,-2.000000L3.000000,11.000000L3.000000,13.000000zM7.000000,21.000000l2.000000,0.000000l0.000000,-2.000000L7.000000,19.000000L7.000000,21.000000zM3.000000,9.000000l2.000000,0.000000L5.000000,7.000000L3.000000,7.000000L3.000000,9.000000zM13.000000,3.000000l-2.000000,0.000000l0.000000,2.000000l2.000000,0.000000L13.000000,3.000000zM19.000000,3.000000l0.000000,2.000000l2.000000,0.000000C21.000000,3.900000 20.100000,3.000000 19.000000,3.000000zM5.000000,21.000000l0.000000,-2.000000L3.000000,19.000000C3.000000,20.100000 3.900000,21.000000 5.000000,21.000000zM3.000000,17.000000l2.000000,0.000000l0.000000,-2.000000L3.000000,15.000000L3.000000,17.000000zM9.000000,3.000000L7.000000,3.000000l0.000000,2.000000l2.000000,0.000000L9.000000,3.000000zM11.000000,21.000000l2.000000,0.000000l0.000000,-2.000000l-2.000000,0.000000L11.000000,21.000000zM19.000000,13.000000l2.000000,0.000000l0.000000,-2.000000l-2.000000,0.000000L19.000000,13.000000zM19.000000,21.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000l-2.000000,0.000000L19.000000,21.000000zM19.000000,9.000000l2.000000,0.000000L21.000000,7.000000l-2.000000,0.000000L19.000000,9.000000zM19.000000,17.000000l2.000000,0.000000l0.000000,-2.000000l-2.000000,0.000000L19.000000,17.000000zM15.000000,21.000000l2.000000,0.000000l0.000000,-2.000000l-2.000000,0.000000L15.000000,21.000000zM15.000000,5.000000l2.000000,0.000000L17.000000,3.000000l-2.000000,0.000000L15.000000,5.000000zM7.000000,17.000000l10.000000,0.000000L17.000000,7.000000L7.000000,7.000000L7.000000,17.000000zM9.000000,9.000000l6.000000,0.000000l0.000000,6.000000L9.000000,15.000000L9.000000,9.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_menu_share_material.xml b/core/res/res/drawable/ic_menu_share_material.xml
index d9153afb67ab..b7c238f4bc98 100644
--- a/core/res/res/drawable/ic_menu_share_material.xml
+++ b/core/res/res/drawable/ic_menu_share_material.xml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_menu_share_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M18.000000,16.100000c-0.800000,0.000000 -1.500000,0.300000 -2.000000,0.800000l-7.100000,-4.200000C9.000000,12.500000 9.000000,12.200000 9.000000,12.000000s0.000000,-0.500000 -0.100000,-0.700000L16.000000,7.200000C16.500000,7.700000 17.200001,8.000000 18.000000,8.000000c1.700000,0.000000 3.000000,-1.300000 3.000000,-3.000000s-1.300000,-3.000000 -3.000000,-3.000000s-3.000000,1.300000 -3.000000,3.000000c0.000000,0.200000 0.000000,0.500000 0.100000,0.700000L8.000000,9.800000C7.500000,9.300000 6.800000,9.000000 6.000000,9.000000c-1.700000,0.000000 -2.900000,1.200000 -2.900000,2.900000s1.300000,3.000000 3.000000,3.000000c0.800000,0.000000 1.500000,-0.300000 2.000000,-0.800000l7.100000,4.200000c-0.100000,0.300000 -0.100000,0.500000 -0.100000,0.700000c0.000000,1.600000 1.300000,2.900000 2.900000,2.900000s2.900000,-1.300000 2.900000,-2.900000S19.600000,16.100000 18.000000,16.100000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_search_api_material.xml b/core/res/res/drawable/ic_search_api_material.xml
index bc18398bcec1..ac1aae3461b0 100644
--- a/core/res/res/drawable/ic_search_api_material.xml
+++ b/core/res/res/drawable/ic_search_api_material.xml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_search_api_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M15.500000,14.000000l-0.800000,0.000000l-0.300000,-0.300000c1.000000,-1.100000 1.600000,-2.600000 1.600000,-4.200000C16.000000,5.900000 13.100000,3.000000 9.500000,3.000000C5.900000,3.000000 3.000000,5.900000 3.000000,9.500000S5.900000,16.000000 9.500000,16.000000c1.600000,0.000000 3.100000,-0.600000 4.200000,-1.600000l0.300000,0.300000l0.000000,0.800000l5.000000,5.000000l1.500000,-1.500000L15.500000,14.000000zM9.500000,14.000000C7.000000,14.000000 5.000000,12.000000 5.000000,9.500000S7.000000,5.000000 9.500000,5.000000C12.000000,5.000000 14.000000,7.000000 14.000000,9.500000S12.000000,14.000000 9.500000,14.000000z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_voice_search_api_material.xml b/core/res/res/drawable/ic_voice_search_api_material.xml
index 05488fb34f85..8c1e803988d7 100644
--- a/core/res/res/drawable/ic_voice_search_api_material.xml
+++ b/core/res/res/drawable/ic_voice_search_api_material.xml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!--
+Copyright (C) 2014 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
+ 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
+ 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.
+ 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.
-->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/ic_voice_search_api_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:pathData="M12.000000,14.000000c1.700000,0.000000 3.000000,-1.300000 3.000000,-3.000000l0.000000,-6.000000c0.000000,-1.700000 -1.300000,-3.000000 -3.000000,-3.000000c-1.700000,0.000000 -3.000000,1.300000 -3.000000,3.000000l0.000000,6.000000C9.000000,12.700000 10.300000,14.000000 12.000000,14.000000zM17.299999,11.000000c0.000000,3.000000 -2.500000,5.100000 -5.300000,5.100000c-2.800000,0.000000 -5.300000,-2.100000 -5.300000,-5.100000L5.000000,11.000000c0.000000,3.400000 2.700000,6.200000 6.000000,6.700000L11.000000,21.000000l2.000000,0.000000l0.000000,-3.300000c3.300000,-0.500000 6.000000,-3.300000 6.000000,-6.700000L17.299999,11.000001z"
+ android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/list_divider_material.xml b/core/res/res/drawable/list_divider_material.xml
index bf249330932b..7ff212ac3657 100644
--- a/core/res/res/drawable/list_divider_material.xml
+++ b/core/res/res/drawable/list_divider_material.xml
@@ -16,4 +16,5 @@
<nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/list_divider_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
+ android:tint="?attr/colorForeground"
+ android:alpha="0.16" />
diff --git a/core/res/res/drawable/vector_drawable_progress_indeterminate_horizontal.xml b/core/res/res/drawable/vector_drawable_progress_indeterminate_horizontal.xml
index 7ceb7722c897..cd999d5d26d4 100644
--- a/core/res/res/drawable/vector_drawable_progress_indeterminate_horizontal.xml
+++ b/core/res/res/drawable/vector_drawable_progress_indeterminate_horizontal.xml
@@ -26,11 +26,11 @@
android:translateY="5" >
<group android:name="v21_pivot" >
<group
- android:name="rectangle_path_1_position"
- android:alpha="0.1" >
+ android:name="rectangle_path_1_position">
<path
android:name="rectangle_path_1"
android:fillColor="?attr/colorControlActivated"
+ android:fillAlpha="0.1"
android:pathData="M -180.0 -1.0 l 360 0 l 0 2 l -360 0 Z" />
</group>
<group
diff --git a/core/res/res/layout/action_mode_close_item_material.xml b/core/res/res/layout/action_mode_close_item_material.xml
index 8eb780b6ccb0..89a179785ef5 100644
--- a/core/res/res/layout/action_mode_close_item_material.xml
+++ b/core/res/res/layout/action_mode_close_item_material.xml
@@ -20,6 +20,7 @@
android:clickable="true"
android:paddingStart="8dip"
android:src="?android:attr/actionModeCloseDrawable"
+ android:contentDescription="@string/action_mode_done"
style="?android:attr/actionModeCloseButtonStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
diff --git a/core/res/res/layout/alert_dialog_material.xml b/core/res/res/layout/alert_dialog_material.xml
index be89e41df161..e5ef629aac6d 100644
--- a/core/res/res/layout/alert_dialog_material.xml
+++ b/core/res/res/layout/alert_dialog_material.xml
@@ -56,8 +56,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
- android:minHeight="64dp"
- android:paddingTop="@dimen/alert_dialog_padding_top_material">
+ android:minHeight="64dp">
<ScrollView android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -67,6 +66,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/alert_dialog_padding_material"
+ android:paddingTop="@dimen/alert_dialog_padding_top_material"
android:paddingEnd="@dimen/alert_dialog_padding_material" />
</ScrollView>
</LinearLayout>
diff --git a/core/res/res/layout/notification_template_part_line1.xml b/core/res/res/layout/notification_template_part_line1.xml
index 7de4089dfb55..78bc1ed2f09c 100644
--- a/core/res/res/layout/notification_template_part_line1.xml
+++ b/core/res/res/layout/notification_template_part_line1.xml
@@ -24,7 +24,7 @@
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.Material.Notification.Title"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
diff --git a/core/res/res/layout/preference_material.xml b/core/res/res/layout/preference_material.xml
index a1371490b0bb..39c979c5bc05 100644
--- a/core/res/res/layout/preference_material.xml
+++ b/core/res/res/layout/preference_material.xml
@@ -42,6 +42,7 @@
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:adjustViewBounds="true"
android:maxWidth="48dp"
android:maxHeight="48dp" />
</LinearLayout>
diff --git a/core/res/res/layout/simple_spinner_dropdown_item.xml b/core/res/res/layout/simple_spinner_dropdown_item.xml
index e2bd474dda9e..f276cfaa2a68 100644
--- a/core/res/res/layout/simple_spinner_dropdown_item.xml
+++ b/core/res/res/layout/simple_spinner_dropdown_item.xml
@@ -4,24 +4,23 @@
**
** Copyright 2008, 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
+** 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
+** 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
+** 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.
*/
-->
-<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
+<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="?android:attr/dropdownListPreferredItemHeight"
- android:ellipsize="marquee"
- android:textAlignment="inherit"/>
+ android:ellipsize="marquee"/>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 35ff766fe7d1..33560811afe0 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -183,9 +183,9 @@
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Tichý režim"</string>
<string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Zvuk je VYPNUTÝ."</string>
<string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Zvuk je zapnutý"</string>
- <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Režim V letadle"</string>
- <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Režim V letadle je ZAPNUTÝ"</string>
- <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Režim V letadle je VYPNUTÝ"</string>
+ <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Režim Letadlo"</string>
+ <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Režim Letadlo je ZAPNUTÝ"</string>
+ <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Režim Letadlo je VYPNUTÝ"</string>
<string name="global_action_settings" msgid="1756531602592545966">"Nastavení"</string>
<string name="global_action_lockdown" msgid="8751542514724332873">"Zamknout"</string>
<string name="status_bar_notification_info_overflow" msgid="5301981741705354993">"999+"</string>
@@ -280,10 +280,10 @@
<string name="permdesc_receiveSms" msgid="6424387754228766939">"Umožňuje aplikaci přijmout a zpracovat zprávy SMS. Znamená to, že aplikace může sledovat zprávy odeslané do vašeho zařízení nebo je smazat, aniž by se vám zobrazily."</string>
<string name="permlab_receiveMms" msgid="1821317344668257098">"příjem textových zpráv (MMS)"</string>
<string name="permdesc_receiveMms" msgid="533019437263212260">"Umožňuje aplikaci přijmout a zpracovat zprávy MMS. Znamená to, že aplikace může sledovat zprávy odeslané do vašeho zařízení nebo je smazat, aniž by se vám zobrazily."</string>
- <string name="permlab_receiveEmergencyBroadcast" msgid="1803477660846288089">"příjem nouzového vysílání"</string>
- <string name="permdesc_receiveEmergencyBroadcast" msgid="848524070262431974">"Umožňuje aplikaci přijmout a zpracovat zprávy tísňového vysílání. Toto oprávnění je dostupné pouze pro systémové aplikace."</string>
- <string name="permlab_readCellBroadcasts" msgid="1598328843619646166">"čtení zpráv informační služby"</string>
- <string name="permdesc_readCellBroadcasts" msgid="6361972776080458979">"Umožňuje aplikaci číst zprávy informační služby přijaté ve vašem zařízení. Upozornění informační služby jsou v některých oblastech odesílána za účelem varování před mimořádnými událostmi. Škodlivé aplikace mohou narušit výkon či provoz vašeho zařízení během přijímání zpráv informační služby."</string>
+ <string name="permlab_receiveEmergencyBroadcast" msgid="1803477660846288089">"příjem výstražných zpráv o výjimečné situaci"</string>
+ <string name="permdesc_receiveEmergencyBroadcast" msgid="848524070262431974">"Umožňuje aplikaci přijmout a zpracovat výstražné zprávy o výjimečných situacích. Toto oprávnění je dostupné pouze pro systémové aplikace."</string>
+ <string name="permlab_readCellBroadcasts" msgid="1598328843619646166">"čtení zpráv informačních služeb"</string>
+ <string name="permdesc_readCellBroadcasts" msgid="6361972776080458979">"Umožňuje aplikaci číst zprávy informačních služeb přijaté ve vašem zařízení. Výstražná upozornění informačních služeb jsou v některých oblastech odesílána za účelem varování před výjimečnými událostmi. Škodlivé aplikace mohou narušit výkon či provoz vašeho zařízení během přijímání zpráv informačních služeb."</string>
<string name="permlab_sendSms" msgid="5600830612147671529">"odesílaní zpráv SMS"</string>
<string name="permdesc_sendSms" msgid="7094729298204937667">"Umožňuje aplikaci odesílat zprávy SMS. Může to mít za následek účtování neočekávaných poplatků. Škodlivé aplikace vás mohou připravit o peníze odesíláním zpráv bez vašeho svolení."</string>
<string name="permlab_sendRespondViaMessageRequest" msgid="8713889105305943200">"odesílání událostí typu „odpovězte zprávou“"</string>
@@ -772,7 +772,7 @@
<item msgid="8901098336658710359">"Domů"</item>
<item msgid="869923650527136615">"Mobil"</item>
<item msgid="7897544654242874543">"Práce"</item>
- <item msgid="1103601433382158155">"Pracovní fax"</item>
+ <item msgid="1103601433382158155">"Fax práce"</item>
<item msgid="1735177144948329370">"Fax domů"</item>
<item msgid="603878674477207394">"Pager"</item>
<item msgid="1650824275177931637">"Ostatní"</item>
@@ -827,7 +827,7 @@
<string name="phoneTypeOtherFax" msgid="8587657145072446565">"Jiný fax"</string>
<string name="phoneTypeRadio" msgid="4093738079908667513">"Radiotelefon"</string>
<string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
- <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Telefon pro sluchově postižené (TTY/TDD)"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY/TDD"</string>
<string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Pracovní mobil"</string>
<string name="phoneTypeWorkPager" msgid="649938731231157056">"Pracovní pager"</string>
<string name="phoneTypeAssistant" msgid="5596772636128562884">"Asistent"</string>
@@ -1255,7 +1255,7 @@
<string name="volume_icon_description_media" msgid="4217311719665194215">"Hlasitost médií"</string>
<string name="volume_icon_description_notification" msgid="7044986546477282274">"Hlasitost oznámení"</string>
<string name="ringtone_default" msgid="3789758980357696936">"Výchozí vyzváněcí tón"</string>
- <string name="ringtone_default_with_actual" msgid="8129563480895990372">"Výchozí vyzváněcí tón (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
+ <string name="ringtone_default_with_actual" msgid="8129563480895990372">"Výchozí tón (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
<string name="ringtone_silent" msgid="7937634392408977062">"Žádné"</string>
<string name="ringtone_picker_title" msgid="3515143939175119094">"Vyzváněcí tóny"</string>
<string name="ringtone_unknown" msgid="5477919988701784788">"Neznámý vyzváněcí tón"</string>
@@ -1639,7 +1639,7 @@
<string name="accessibility_enabled" msgid="1381972048564547685">"Usnadnění přístupu je aktivováno."</string>
<string name="enable_accessibility_canceled" msgid="3833923257966635673">"Usnadnění zrušeno."</string>
<string name="user_switched" msgid="3768006783166984410">"Aktuální uživatel je <xliff:g id="NAME">%1$s</xliff:g>."</string>
- <string name="user_switching_message" msgid="2871009331809089783">"Přepínání na uživatele <xliff:g id="NAME">%1$s</xliff:g>…"</string>
+ <string name="user_switching_message" msgid="2871009331809089783">"Přepínání na účet <xliff:g id="NAME">%1$s</xliff:g>…"</string>
<string name="owner_name" msgid="2716755460376028154">"Vlastník"</string>
<string name="error_message_title" msgid="4510373083082500195">"Chyba"</string>
<string name="error_message_change_not_allowed" msgid="1347282344200417578">"Administrátor tuto změnu zakázal"</string>
@@ -1774,6 +1774,6 @@
<string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Před uvolněním požádat o kód PIN"</string>
<string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Před uvolněním požádat o bezpečnostní gesto"</string>
<string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Před uvolněním požádat o heslo"</string>
- <string name="battery_saver_description" msgid="2510530476513605742">"Za účelem zvýšení životnosti baterie režim úspory baterie sníží výkon vašeho zařízení a omezí vibrace a většinu dat na pozadí. E-mail, zprávy a další aplikace, které používají synchronizaci, nemusejí být aktualizovány, dokud je nespustíte.\n\nPři nabíjení zařízení se režim úspory baterie automaticky vypne."</string>
+ <string name="battery_saver_description" msgid="2510530476513605742">"Za účelem zvýšení životnosti baterie spořič baterie sníží výkon vašeho zařízení a omezí vibrace a většinu dat na pozadí. E-mail, zprávy a další aplikace, které používají synchronizaci, nemusejí být aktualizovány, dokud je nespustíte.\n\nPři nabíjení zařízení se spořič baterie automaticky vypne."</string>
<string name="downtime_condition_summary" msgid="8761776337475705749">"Dokud v <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> neskončí pozastavení"</string>
</resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 95125eb45c1c..2fa54dced3d8 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1241,7 +1241,7 @@
<string name="new_app_description" msgid="1932143598371537340">"Interrompi la vecchia applicazione senza salvare."</string>
<string name="sendText" msgid="5209874571959469142">"Scegli un\'azione per il testo"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Volume suoneria"</string>
- <string name="volume_music" msgid="5421651157138628171">"Volume app. multimediali"</string>
+ <string name="volume_music" msgid="5421651157138628171">"Volume contenuti multimediali"</string>
<string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"Riproduzione tramite Bluetooth"</string>
<string name="volume_music_hint_silent_ringtone_selected" msgid="8310739960973156272">"Suoneria silenziosa impostata"</string>
<string name="volume_call" msgid="3941680041282788711">"Volume chiamate"</string>
@@ -1764,7 +1764,7 @@
<string name="lock_to_app_toast" msgid="1230563865743799321">"Per sbloccare questa schermata, tocca e tieni premuto contemporaneamente Indietro e Recenti."</string>
<string name="lock_to_app_toast_accessible" msgid="3340628918851844044">"Per sbloccare questa schermata, tocca e tieni premuto Recenti."</string>
<string name="lock_to_app_toast_locked" msgid="8739004135132606329">"La schermata è bloccata. La tua organizzazione non ne consente lo sblocco."</string>
- <string name="lock_to_app_title" msgid="1682643873107812874">"Utilizzare blocco schermata?"</string>
+ <string name="lock_to_app_title" msgid="1682643873107812874">"Utilizzare il blocco su schermo?"</string>
<string name="lock_to_app_description" msgid="9076084599283282800">"Il blocco schermata fissa la visualizzazione su una stessa immagine.\n\nPer uscire, tocca e tieni premuto contemporaneamente Indietro e Recenti."</string>
<string name="lock_to_app_description_accessible" msgid="2132076937479670601">"Il blocco schermata fissa la visualizzazione su una stessa immagine.\n\nPer uscire, tocca e tieni premuto Recenti."</string>
<string name="lock_to_app_negative" msgid="2259143719362732728">"NO, GRAZIE"</string>
diff --git a/core/res/res/values-mcc234-mnc20/config.xml b/core/res/res/values-mcc234-mnc20/config.xml
index 1ed53dc2870c..619e517c148c 100644
--- a/core/res/res/values-mcc234-mnc20/config.xml
+++ b/core/res/res/values-mcc234-mnc20/config.xml
@@ -21,6 +21,22 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
+ <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+ <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ <item>1</item>
+ <item>4</item>
+ <item>7</item>
+ <item>9</item>
+ </integer-array>
+
+ <!-- String containing the apn value for tethering. May be overriden by secure settings
+ TETHER_DUN_APN. Value is a comma separated series of strings:
+ "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
+ note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
+ <string translatable="false" name="config_tether_apndata">3hotspot,3hotspot,,,,,,,,,234,20,0,DUN</string>
+
<!-- Configure mobile network MTU. Carrier specific value is set here.
-->
<integer name="config_mobile_mtu">1440</integer>
diff --git a/core/res/res/values-mcc235-mnc94/config.xml b/core/res/res/values-mcc235-mnc94/config.xml
index d602c9fa634c..723af3dfd845 100644
--- a/core/res/res/values-mcc235-mnc94/config.xml
+++ b/core/res/res/values-mcc235-mnc94/config.xml
@@ -21,6 +21,22 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
+ <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+ <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ <item>1</item>
+ <item>4</item>
+ <item>7</item>
+ <item>9</item>
+ </integer-array>
+
+ <!-- String containing the apn value for tethering. May be overriden by secure settings
+ TETHER_DUN_APN. Value is a comma separated series of strings:
+ "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
+ note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
+ <string translatable="false" name="config_tether_apndata">3hotspot,3hotspot,,,,,,,,,235,94,0,DUN</string>
+
<!-- Configure mobile network MTU. Carrier specific value is set here.
-->
<integer name="config_mobile_mtu">1440</integer>
diff --git a/core/res/res/values-mcc310-mnc120/config.xml b/core/res/res/values-mcc310-mnc120/config.xml
index 62001d904482..24e55b13135f 100644
--- a/core/res/res/values-mcc310-mnc120/config.xml
+++ b/core/res/res/values-mcc310-mnc120/config.xml
@@ -25,4 +25,6 @@
-->
<integer name="config_mobile_mtu">1422</integer>
+ <!-- Sprint need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">70</integer>
</resources>
diff --git a/core/res/res/values-mcc311-mnc220/config.xml b/core/res/res/values-mcc311-mnc220/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc220/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc221/config.xml b/core/res/res/values-mcc311-mnc221/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc221/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc222/config.xml b/core/res/res/values-mcc311-mnc222/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc222/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc223/config.xml b/core/res/res/values-mcc311-mnc223/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc223/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc224/config.xml b/core/res/res/values-mcc311-mnc224/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc224/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc225/config.xml b/core/res/res/values-mcc311-mnc225/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc225/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc226/config.xml b/core/res/res/values-mcc311-mnc226/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc226/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc227/config.xml b/core/res/res/values-mcc311-mnc227/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc227/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc228/config.xml b/core/res/res/values-mcc311-mnc228/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc228/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc229/config.xml b/core/res/res/values-mcc311-mnc229/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc229/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc490/config.xml b/core/res/res/values-mcc311-mnc490/config.xml
new file mode 100644
index 000000000000..defe78d89e06
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc490/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Sprint need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">70</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc580/config.xml b/core/res/res/values-mcc311-mnc580/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc580/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc581/config.xml b/core/res/res/values-mcc311-mnc581/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc581/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc582/config.xml b/core/res/res/values-mcc311-mnc582/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc582/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc583/config.xml b/core/res/res/values-mcc311-mnc583/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc583/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc584/config.xml b/core/res/res/values-mcc311-mnc584/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc584/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc585/config.xml b/core/res/res/values-mcc311-mnc585/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc585/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc586/config.xml b/core/res/res/values-mcc311-mnc586/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc586/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc587/config.xml b/core/res/res/values-mcc311-mnc587/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc587/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc588/config.xml b/core/res/res/values-mcc311-mnc588/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc588/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc589/config.xml b/core/res/res/values-mcc311-mnc589/config.xml
new file mode 100644
index 000000000000..811e9c73d2e1
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc589/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- USC need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">300</integer>
+</resources>
diff --git a/core/res/res/values-mcc311-mnc870/config.xml b/core/res/res/values-mcc311-mnc870/config.xml
new file mode 100644
index 000000000000..24e55b13135f
--- /dev/null
+++ b/core/res/res/values-mcc311-mnc870/config.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2013, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Configure mobile network MTU. Carrier specific value is set here.
+ -->
+ <integer name="config_mobile_mtu">1422</integer>
+
+ <!-- Sprint need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">70</integer>
+</resources>
diff --git a/core/res/res/values-mcc312-mnc530/config.xml b/core/res/res/values-mcc312-mnc530/config.xml
new file mode 100644
index 000000000000..24e55b13135f
--- /dev/null
+++ b/core/res/res/values-mcc312-mnc530/config.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2013, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Configure mobile network MTU. Carrier specific value is set here.
+ -->
+ <integer name="config_mobile_mtu">1422</integer>
+
+ <!-- Sprint need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">70</integer>
+</resources>
diff --git a/core/res/res/values-mcc425-mnc01/config.xml b/core/res/res/values-mcc425-mnc01/config.xml
deleted file mode 100644
index f4854da5ede8..000000000000
--- a/core/res/res/values-mcc425-mnc01/config.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, 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 my 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
- <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
- <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
- <integer-array translatable="false" name="config_tether_upstream_types">
- <item>1</item>
- <item>4</item>
- <item>7</item>
- <item>9</item>
- </integer-array>
-
- <!-- String containing the apn value for tethering. May be overriden by secure settings
- TETHER_DUN_APN. Value is a comma separated series of strings:
- "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
- note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
- <string translatable="false" name="config_tether_apndata">DUN,modem.orange.net.il,,,,,,,,,425,01,,DUN</string>
-
-</resources>
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index 83e1baa5c049..dc0b1abf2cd3 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -254,13 +254,13 @@
<string name="permgrouplab_storage" msgid="1971118770546336966">"သိုလှောင်မှုများ"</string>
<string name="permgroupdesc_storage" product="nosdcard" msgid="7442318502446874999">"USBအားချိတ်ဆက်ရန်"</string>
<string name="permgroupdesc_storage" product="default" msgid="9203302214915355774">"SDကတ်အားချိတ်ဆက်ရန်"</string>
- <string name="permgrouplab_accessibilityFeatures" msgid="7919025602283593907">"လွယ်ကူစွာ ရရှိနိုင်မှု ပေးသော စွမ်းရည်"</string>
+ <string name="permgrouplab_accessibilityFeatures" msgid="7919025602283593907">"အများသုံးစွဲနိုင်မှု စွမ်းရည်"</string>
<string name="permgroupdesc_accessibilityFeatures" msgid="4205196881678144335">"ကူညီပေးမှု နည်းပညာများမှ တောင်းဆိုနိုင်သော ထူးခြားချက်များ"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ဝင်းဒိုးမှာပါရှိသည်များကို ထုတ်ယူခြင်း"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"သင် အပြန်အလှန်လုပ်နေသော ဝင်းဒိုးမှာပါရှိသည်များကို သေချာစွာ ကြည့်ရှုစစ်ဆေးပါ"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"ထိတို့ခြင်းဖြင့် ရှာဖွေပေးနိုင်တာကို ဖွင့်လိုက်ပါ"</string>
<string name="capability_desc_canRequestTouchExploration" msgid="5800552516779249356">"ထိတွေ့လိုက်တဲ့ အရာများကို အသံနဲ့ ထုတ်ပြောမှာဖြစ်ပြီး ဖန်သားပြင်ပေါကနေ လက်နဲ့ ထပ်မံ ကြည့်ရှုနိုင်ပါတယ်"</string>
- <string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"ဝက်ဘ် လွယ်ကူစွာ အသုံးပြုနိုင်မှု စွမ်းရည် မြှင့်တင်ခြင်းကို ဖွင့်ရန်"</string>
+ <string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"ပိုမိုကောင်းမွန်သော ဝက်ဘ်အများသုံးစွဲနိုင်မှုကို ဖွင့်ရန်"</string>
<string name="capability_desc_canRequestEnhancedWebAccessibility" msgid="7881063961507511765">"အပလီကေးရှင်းကို ပိုမိုပြည့်စုံစေရန် စကရစ်များကို သွင်းနိုင်ပါတယ်"</string>
<string name="capability_title_canRequestFilterKeyEvents" msgid="2103440391902412174">"ရိုက်သောစာများကို သေချာစွာ စစ်ဆေးပါ"</string>
<string name="capability_desc_canRequestFilterKeyEvents" msgid="7463135292204152818">"အရေးကြီးသော ကိုယ်ရေးအချက်အလက်များဖြစ်တဲ့ ခရက်ဒစ်ကဒ်နံပါတ်များနှင့် စကားဝှက်များ ပါဝင်ပါတယ်."</string>
@@ -1188,7 +1188,7 @@
<string name="ok" msgid="5970060430562524910">"ကောင်းပြီ"</string>
<string name="cancel" msgid="6442560571259935130">"ပယ်ဖျက်ရန်"</string>
<string name="yes" msgid="5362982303337969312">"ကောင်းပြီ"</string>
- <string name="no" msgid="5141531044935541497">"ပယ်ဖျက်သည်"</string>
+ <string name="no" msgid="5141531044935541497">"နေတော့"</string>
<string name="dialog_alert_title" msgid="2049658708609043103">"သတိပြုရန်"</string>
<string name="loading" msgid="7933681260296021180">"တင်နေ…"</string>
<string name="capital_on" msgid="1544682755514494298">"ဖွင့်ရန်"</string>
@@ -1297,7 +1297,7 @@
<string name="sms_short_code_details" msgid="5873295990846059400"><b>"ဒါက သင့် မိုဘိုင်း အကောင့် အတွက် "</b>" ကုန်ကျမှု ရှိလာနိုင်သည်။"</string>
<string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"ဒါက သင့် မိုဘိုင်း အကောင့် အတွက် ကုန်ကျမှု ရှိလာနိုင်သည်။"</b></string>
<string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"ပို့ရန်"</string>
- <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"ပယ်ဖျက်သည်"</string>
+ <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"နေတော့"</string>
<string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ကျွန်ပ်၏ရွေးချယ်မှုကို မှတ်ထားရန်"</string>
<string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"နောင်တွင် ဆက်တင် &gt; အပလီကေးရှင်းများ မှပြောင်းနိုင်သည်"</string>
<string name="sms_short_code_confirm_always_allow" msgid="3241181154869493368">"အမြဲခွင့်ပြုရန်"</string>
@@ -1410,7 +1410,7 @@
<string name="ime_action_go" msgid="8320845651737369027">"သွားပါ"</string>
<string name="ime_action_search" msgid="658110271822807811">"ရှာဖွေခြင်း"</string>
<string name="ime_action_send" msgid="2316166556349314424">"ပို့ခြင်း"</string>
- <string name="ime_action_next" msgid="3138843904009813834">"အရှေ့သို့"</string>
+ <string name="ime_action_next" msgid="3138843904009813834">"ရှေ့သို့"</string>
<string name="ime_action_done" msgid="8971516117910934605">"ပြီးပါပြီ"</string>
<string name="ime_action_previous" msgid="1443550039250105948">"အနောက်သို့"</string>
<string name="ime_action_default" msgid="2840921885558045721">"လုပ်ဆောင်ချက်"</string>
@@ -1525,7 +1525,7 @@
<string name="action_menu_overflow_description" msgid="2295659037509008453">"ပိုမိုရွေးချယ်စရာများ"</string>
<string name="action_bar_home_description_format" msgid="7965984360903693903">"%1$s ၊ %2$s"</string>
<string name="action_bar_home_subtitle_description_format" msgid="6985546530471780727">"%1$s ၊ %2$s ၊ %3$s"</string>
- <string name="storage_internal" msgid="4891916833657929263">"စက်အတွင်းသိမ်းဆည်းရန်နေရာ"</string>
+ <string name="storage_internal" msgid="4891916833657929263">"စက်တွင်း သိုလှောင်ထားမှု"</string>
<string name="storage_sd_card" msgid="3282948861378286745">"SD ကဒ်"</string>
<string name="storage_usb" msgid="3017954059538517278">"USBဖြင့် သိမ်းဆည်း"</string>
<string name="extract_edit_menu_button" msgid="8940478730496610137">"ပြင်ဆင်ရန်"</string>
diff --git a/core/res/res/values-sw600dp/dimens_material.xml b/core/res/res/values-sw600dp/dimens_material.xml
new file mode 100644
index 000000000000..e0aac38ca73c
--- /dev/null
+++ b/core/res/res/values-sw600dp/dimens_material.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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>
+
+ <!-- Use the default title sizes on tablets. -->
+ <dimen name="text_size_title_material_toolbar">@dimen/text_size_title_material</dimen>
+ <!-- Use the default subtitle sizes on tablets. -->
+ <dimen name="text_size_subtitle_material_toolbar">@dimen/text_size_subhead_material</dimen>
+ <!-- Default height of an action bar. -->
+ <dimen name="action_bar_default_height_material">64dp</dimen>
+ <!-- Default padding of an action bar. -->
+ <dimen name="action_bar_default_padding_material">4dp</dimen>
+
+</resources>
diff --git a/core/res/res/values-sw720dp/styles.xml b/core/res/res/values-sw720dp/styles.xml
index fee1c24fe5dd..94ec0a612489 100644
--- a/core/res/res/values-sw720dp/styles.xml
+++ b/core/res/res/values-sw720dp/styles.xml
@@ -16,10 +16,9 @@
<resources>
<style name="PreferencePanel">
- <item name="android:layout_marginStart">@dimen/preference_screen_side_margin</item>
- <item name="android:layout_marginEnd">@dimen/preference_screen_side_margin</item>
- <item name="android:layout_marginTop">@dimen/preference_screen_top_margin</item>
- <item name="android:layout_marginBottom">@dimen/preference_screen_bottom_margin</item>
- <item name="android:background">?attr/detailsElementBackground</item>
+ <item name="layout_marginStart">@dimen/preference_screen_side_margin</item>
+ <item name="layout_marginEnd">@dimen/preference_screen_side_margin</item>
+ <item name="layout_marginTop">@dimen/preference_screen_top_margin</item>
+ <item name="layout_marginBottom">@dimen/preference_screen_bottom_margin</item>
</style>
</resources>
diff --git a/core/res/res/values-television/dimens.xml b/core/res/res/values-television/dimens.xml
index 69c3da5743f2..4c25225dd50c 100644
--- a/core/res/res/values-television/dimens.xml
+++ b/core/res/res/values-television/dimens.xml
@@ -17,7 +17,7 @@
<!-- Lighting and shadow properties -->
<dimen name="light_y">-400dp</dimen>
- <item type="dimen" format="float" name="ambient_shadow_alpha">0.06</item>
+ <item type="dimen" format="float" name="ambient_shadow_alpha">0.15</item>
<item type="dimen" format="float" name="spot_shadow_alpha">0.3</item>
</resources>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index f843d1fc15a1..a8b5d6d5fe29 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -397,30 +397,30 @@
<item>@drawable/expander_open_mtrl_alpha</item>
<item>@drawable/fastscroll_thumb_mtrl_alpha</item>
<item>@drawable/fastscroll_track_mtrl_alpha</item>
- <item>@drawable/ic_ab_back_mtrl_am_alpha</item>
+ <item>@drawable/ic_ab_back_material</item>
<item>@drawable/ic_cab_done_mtrl_alpha</item>
<item>@drawable/ic_clear_mtrl_alpha</item>
<item>@drawable/ic_commit_search_api_mtrl_alpha</item>
- <item>@drawable/ic_dialog_alert_mtrl_alpha</item>
+ <item>@drawable/ic_dialog_alert_material</item>
<item>@drawable/ic_find_next_mtrl_alpha</item>
<item>@drawable/ic_find_previous_mtrl_alpha</item>
- <item>@drawable/ic_go_search_api_mtrl_alpha</item>
+ <item>@drawable/ic_go_search_api_material</item>
<item>@drawable/ic_media_route_disabled_mtrl_alpha</item>
<item>@drawable/ic_media_route_off_mtrl_alpha</item>
<item>@drawable/ic_media_route_on_0_mtrl_alpha</item>
<item>@drawable/ic_media_route_on_1_mtrl_alpha</item>
<item>@drawable/ic_media_route_on_2_mtrl_alpha</item>
<item>@drawable/ic_media_route_on_mtrl_alpha</item>
- <item>@drawable/ic_menu_copy_mtrl_am_alpha</item>
- <item>@drawable/ic_menu_cut_mtrl_alpha</item>
+ <item>@drawable/ic_menu_copy_material</item>
+ <item>@drawable/ic_menu_cut_material</item>
<item>@drawable/ic_menu_find_mtrl_alpha</item>
- <item>@drawable/ic_menu_moreoverflow_mtrl_alpha</item>
- <item>@drawable/ic_menu_paste_mtrl_am_alpha</item>
+ <item>@drawable/ic_menu_moreoverflow_material</item>
+ <item>@drawable/ic_menu_paste_material</item>
<item>@drawable/ic_menu_search_mtrl_alpha</item>
- <item>@drawable/ic_menu_selectall_mtrl_alpha</item>
- <item>@drawable/ic_menu_share_mtrl_alpha</item>
- <item>@drawable/ic_search_api_mtrl_alpha</item>
- <item>@drawable/ic_voice_search_api_mtrl_alpha</item>
+ <item>@drawable/ic_menu_selectall_material</item>
+ <item>@drawable/ic_menu_share_material</item>
+ <item>@drawable/ic_search_api_material</item>
+ <item>@drawable/ic_voice_search_api_material</item>
<item>@drawable/list_divider_mtrl_alpha</item>
<item>@drawable/list_section_divider_mtrl_alpha</item>
<item>@drawable/popup_background_mtrl_mult</item>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index a00ed5d333cc..0e597d0c1a70 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -458,6 +458,10 @@
transitions between different window content. -->
<attr name="windowContentTransitionManager" format="reference" />
+ <!-- Flag indicating whether this window allows Activity Transitions.
+ Corresponds to {@link android.view.Window#FEATURE_ACTIVITY_TRANSITIONS}. -->
+ <attr name="windowActivityTransitions" format="boolean" />
+
<!-- Reference to a Transition XML resource defining the desired Transition
used to move Views into the initial Window's content Scene. Corresponds to
{@link android.view.Window#setEnterTransition(android.transition.Transition)}. -->
@@ -1792,6 +1796,7 @@
<attr name="windowTranslucentNavigation" />
<attr name="windowSwipeToDismiss" />
<attr name="windowContentTransitions" />
+ <attr name="windowActivityTransitions" />
<attr name="windowContentTransitionManager" />
<attr name="windowActionBarFullscreenDecorLayout" />
@@ -5266,11 +5271,16 @@
<attr name="viewportWidth" format="float"/>
<!-- The height of the canvas the drawing is on. -->
<attr name="viewportHeight" format="float"/>
+ <!-- The name of this vector drawable -->
+ <attr name="name" />
+ <!-- The opacity of the whole vector drawable, as a value between 0
+ (completely transparent) and 1 (completely opaque). -->
+ <attr name="alpha" />
</declare-styleable>
<!-- Defines the group used in VectorDrawables. -->
<declare-styleable name="VectorDrawableGroup">
- <!-- The Name of this group -->
+ <!-- The name of this group -->
<attr name="name" />
<!-- The amount to rotate the group -->
<attr name="rotation" />
@@ -5286,20 +5296,24 @@
<attr name="scaleX" />
<!-- The amount to scale the group on X coordinate -->
<attr name="scaleY" />
- <!-- The alpha of the group (0 is transparent and 1 is opaque) -->
- <attr name="alpha" />
</declare-styleable>
<!-- Defines the path used in VectorDrawables. -->
<declare-styleable name="VectorDrawablePath">
- <!-- The Name of this path -->
+ <!-- The name of this path -->
<attr name="name" />
<!-- The width a path stroke -->
<attr name="strokeWidth" format="float" />
<!-- The color to stroke the path if not defined implies no stroke-->
<attr name="strokeColor" format="color" />
+ <!-- The opacity of a path stroke, as a value between 0 (completely transparent)
+ and 1 (completely opaque) -->
+ <attr name="strokeAlpha" format="float" />
<!-- The color to fill the path if not defined implies no fill-->
<attr name="fillColor" format="color" />
+ <!-- The alpha of the path fill, as a value between 0 (completely transparent)
+ and 1 (completely opaque)-->
+ <attr name="fillAlpha" format="float" />
<!-- The specification of the operations that define the path -->
<attr name="pathData" format="string" />
<!-- The fraction of the path to trim from the start from 0 to 1 -->
@@ -7434,12 +7448,6 @@
<attr name="settingsActivity" />
</declare-styleable>
- <!-- @removed -->
- <attr name="__removed1" format="reference" />
-
- <!-- TODO: Spacer to be removed from here and public.xml -->
- <attr name="__removed2" format="reference" />
-
<!-- Attributes that can be used with <code>rating-system-definition</code> tags inside of the
XML resource that describes TV content rating of a {@link android.media.tv.TvInputService},
which is referenced from its
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index c42683b5bc02..5a7e168c536e 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -147,5 +147,16 @@
<color name="system_notification_accent_color">#ff607D8B</color>
<color name="battery_saver_mode_color">#fff4511e</color><!-- deep orange 600 -->
+ <!-- Default user icon colors -->
+ <color name="user_icon_1">#ffe91e63</color><!-- pink 500 -->
+ <color name="user_icon_2">#ff3f51b5</color><!-- indigo 500 -->
+ <color name="user_icon_3">#ff4285f4</color><!-- blue 500 -->
+ <color name="user_icon_4">#ff00bcd4</color><!-- teal 500 -->
+ <color name="user_icon_5">#ff0f9d58</color><!-- green 500 -->
+ <color name="user_icon_6">#ff8bc34a</color><!-- light green 500 -->
+ <color name="user_icon_7">#ffff9800</color><!-- orange 500 -->
+ <color name="user_icon_8">#ffff5722</color><!-- deep orange 500 -->
+ <color name="user_icon_default_gray">#ff9e9e9e</color><!-- gray 500 -->
+ <color name="user_icon_default_white">#ffffffff</color><!-- white -->
</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index b36387f72118..0e4f965429de 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -339,6 +339,22 @@
capability can provide power savings when wifi needs to be always kept on. -->
<bool translatable="false" name="config_wifi_background_scan_support">false</bool>
+ <!-- Boolean indicating we re-try re-associating once upon disconnection and RSSI is high failure -->
+ <bool translatable="true" name="config_wifi_enable_disconnection_debounce">true</bool>
+
+ <!-- Boolean indicating autojoin will prefer 5GHz and choose 5GHz BSSIDs -->
+ <bool translatable="true" name="config_wifi_enable_5GHz_preference">true</bool>
+
+ <!-- Integer specifying the basic autojoin parameters -->
+ <integer translatable="false" name="config_wifi_framework_5GHz_preference_boost_threshold">-65</integer>
+ <integer translatable="false" name="config_wifi_framework_5GHz_preference_boost_factor">5</integer>
+ <integer translatable="false" name="config_wifi_framework_current_association_hysteresis_high">16</integer>
+ <integer translatable="false" name="config_wifi_framework_current_association_hysteresis_low">10</integer>
+ <integer translatable="false" name="config_wifi_framework_5GHz_preference_penalty_threshold">-75</integer>
+ <integer translatable="false" name="config_wifi_framework_5GHz_preference_penalty_factor">2</integer>
+
+
+
<!-- Integer indicating wpa_supplicant scan interval in milliseconds -->
<integer translatable="false" name="config_wifi_supplicant_scan_interval">15000</integer>
@@ -351,9 +367,33 @@
point on the move. A value of 0 means no periodic scans will be used in the framework. -->
<integer translatable="false" name="config_wifi_framework_scan_interval">300000</integer>
- <!-- Integer indicating associated scan interval in milliseconds -->
+ <!-- Integer indicating associated partial scan interval in milliseconds -->
<integer translatable="false" name="config_wifi_framework_associated_scan_interval">10000</integer>
+ <!-- Integer indicating associated full scan backoff, representing a fraction: xx/8 -->
+ <integer translatable="false" name="config_wifi_framework_associated_full_scan_backoff">12</integer>
+
+ <!-- Integer indicating associated full scan max interval in milliseconds -->
+ <integer translatable="false" name="config_wifi_framework_associated_full_scan_max_interval">300000</integer>
+
+ <!-- Integer indicating associated full scan max total dwell time in milliseconds -->
+ <integer translatable="false" name="config_wifi_framework_associated_full_scan_max_total_dwell_time">500</integer>
+
+ <!-- Integer indicating associated full scan max num active channels -->
+ <integer translatable="false" name="config_wifi_framework_associated_partial_scan_max_num_active_channels">6</integer>
+
+ <!-- Integer indicating associated full scan max num passive channels -->
+ <integer translatable="false" name="config_wifi_framework_associated_partial_scan_max_num_passive_channels">3</integer>
+
+ <!-- Boolean indicating associated scan are allowed -->
+ <bool translatable="false" name="config_wifi_framework_enable_associated_autojoin_scan">true</bool>
+
+ <!-- Boolean indicating associated network selection is allowed -->
+ <bool translatable="false" name="config_wifi_framework_enable_associated_network_selection">true</bool>
+
+ <!-- Boolean indicating that wifi only link configuratios that have exact same credentials (i.e PSK) -->
+ <bool translatable="false" name="config_wifi_only_link_same_credential_configurations">true</bool>
+
<!-- Wifi driver stop delay, in milliseconds.
Default value is 2 minutes. -->
<integer translatable="false" name="config_wifi_driver_stop_delay">120000</integer>
@@ -1241,6 +1281,10 @@
Doze dreams will run whenever the power manager is in a dozing state. -->
<string name="config_dozeComponent"></string>
+ <!-- If true, the doze component is not started until after the screen has been
+ turned off and the screen off animation has been performed. -->
+ <bool name="config_dozeAfterScreenOff">false</bool>
+
<!-- Power Management: Specifies whether to decouple the auto-suspend state of the
device from the display on/off state.
@@ -1740,4 +1784,7 @@
(3) If the config_default_vm_number array has gid special item but it doesn't match the
current sim's gid, the last one without gid will be picked -->
<string-array translatable="false" name="config_default_vm_number" />
+
+ <!-- Sprint need a 70 ms delay for 3way call -->
+ <integer name="config_cdma_3waycall_flash_delay">0</integer>
</resources>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 77b451f4fca7..7a2bbc111bd0 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -412,7 +412,7 @@
<dimen name="light_y">-200dp</dimen>
<dimen name="light_z">800dp</dimen>
<dimen name="light_radius">800dp</dimen>
- <item type="dimen" format="float" name="ambient_shadow_alpha">0.06</item>
- <item type="dimen" format="float" name="spot_shadow_alpha">0.16</item>
+ <item type="dimen" format="float" name="ambient_shadow_alpha">0.047</item>
+ <item type="dimen" format="float" name="spot_shadow_alpha">0.098</item>
</resources>
diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml
index 275a5ec0ad56..2b49ba25208c 100644
--- a/core/res/res/values/dimens_material.xml
+++ b/core/res/res/values/dimens_material.xml
@@ -31,6 +31,7 @@
<!-- Bottom margin for action bar subtitles -->
<dimen name="action_bar_subtitle_bottom_margin_material">5dp</dimen>
+ <dimen name="action_button_min_width_overflow_material">36dp</dimen>
<dimen name="action_button_min_width_material">48dp</dimen>
<dimen name="action_button_min_height_material">48dp</dimen>
@@ -41,11 +42,11 @@
<dimen name="text_size_headline_material">24sp</dimen>
<dimen name="text_size_title_material">20sp</dimen>
<dimen name="text_size_subhead_material">16sp</dimen>
- <dimen name="text_size_title_material_toolbar">20dp</dimen>
- <dimen name="text_size_subtitle_material_toolbar">16dp</dimen>
+ <dimen name="text_size_title_material_toolbar">@dimen/text_size_title_material</dimen>
+ <dimen name="text_size_subtitle_material_toolbar">@dimen/text_size_subhead_material</dimen>
<dimen name="text_size_menu_material">16sp</dimen>
- <dimen name="text_size_body_2_material">14sp</dimen>
- <dimen name="text_size_body_1_material">14sp</dimen>
+ <dimen name="text_size_body_2_material">16sp</dimen>
+ <dimen name="text_size_body_1_material">16sp</dimen>
<dimen name="text_size_caption_material">12sp</dimen>
<dimen name="text_size_button_material">14sp</dimen>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 5b047f7b82ce..4bc1ff37414b 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2103,8 +2103,6 @@
=============================================================== -->
<eat-comment />
- <public-padding type="attr" name="l_resource_pad" end="0x1010410" />
-
<public type="attr" name="fastScrollStyle" />
<public type="attr" name="windowContentTransitions" />
<public type="attr" name="windowContentTransitionManager" />
@@ -2248,7 +2246,6 @@
<public type="attr" name="timePickerDialogTheme" />
<public type="attr" name="headerTimeTextAppearance" />
<public type="attr" name="headerAmPmTextAppearance" />
- <public type="attr" name="__removed2" />
<public type="attr" name="numbersTextColor" />
<public type="attr" name="numbersBackgroundColor" />
<public type="attr" name="numbersSelectorColor" />
@@ -2291,46 +2288,53 @@
<public type="attr" name="fragmentAllowEnterTransitionOverlap" />
<public type="attr" name="fragmentAllowReturnTransitionOverlap" />
<public type="attr" name="patternPathData" />
-
- <public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
-
- <public-padding type="id" name="l_resource_pad" end="0x01020040" />
+ <public type="attr" name="strokeAlpha" />
+ <public type="attr" name="fillAlpha" />
+ <public type="attr" name="windowActivityTransitions" />
<public type="id" name="mask" />
<public type="id" name="statusBarBackground" />
<public type="id" name="navigationBarBackground" />
- <public-padding type="style" name="l_resource_pad" end="0x01030200" />
-
<public type="style" name="Widget.FastScroll" />
<public type="style" name="Widget.StackView" />
<public type="style" name="Widget.Toolbar" />
<public type="style" name="Widget.Toolbar.Button.Navigation" />
- <public type="style" name="Widget.Holo.FastScroll" />
- <public type="style" name="Widget.Holo.StackView" />
-
- <public type="style" name="Widget.Holo.Light.Button.Borderless" />
- <public type="style" name="Widget.Holo.Light.FastScroll" />
- <public type="style" name="Widget.Holo.Light.StackView" />
-
<public type="style" name="Widget.DeviceDefault.FastScroll" />
<public type="style" name="Widget.DeviceDefault.StackView" />
-
<public type="style" name="Widget.DeviceDefault.Light.FastScroll" />
<public type="style" name="Widget.DeviceDefault.Light.StackView" />
<public type="style" name="TextAppearance.Material" />
+ <public type="style" name="TextAppearance.Material.Button" />
+ <public type="style" name="TextAppearance.Material.Body2" />
+ <public type="style" name="TextAppearance.Material.Body1" />
+ <public type="style" name="TextAppearance.Material.Caption" />
<public type="style" name="TextAppearance.Material.DialogWindowTitle" />
+ <public type="style" name="TextAppearance.Material.Display4" />
+ <public type="style" name="TextAppearance.Material.Display3" />
+ <public type="style" name="TextAppearance.Material.Display2" />
+ <public type="style" name="TextAppearance.Material.Display1" />
+ <public type="style" name="TextAppearance.Material.Headline" />
<public type="style" name="TextAppearance.Material.Inverse" />
<public type="style" name="TextAppearance.Material.Large" />
<public type="style" name="TextAppearance.Material.Large.Inverse" />
<public type="style" name="TextAppearance.Material.Medium" />
<public type="style" name="TextAppearance.Material.Medium.Inverse" />
+ <public type="style" name="TextAppearance.Material.Menu" />
+ <public type="style" name="TextAppearance.Material.Notification" />
+ <public type="style" name="TextAppearance.Material.Notification.Emphasis" />
+ <public type="style" name="TextAppearance.Material.Notification.Info" />
+ <public type="style" name="TextAppearance.Material.Notification.Line2" />
+ <public type="style" name="TextAppearance.Material.Notification.Time" />
+ <public type="style" name="TextAppearance.Material.Notification.Title" />
<public type="style" name="TextAppearance.Material.SearchResult.Subtitle" />
<public type="style" name="TextAppearance.Material.SearchResult.Title" />
<public type="style" name="TextAppearance.Material.Small" />
<public type="style" name="TextAppearance.Material.Small.Inverse" />
+ <public type="style" name="TextAppearance.Material.Subhead" />
+ <public type="style" name="TextAppearance.Material.Title" />
<public type="style" name="TextAppearance.Material.WindowTitle" />
<public type="style" name="TextAppearance.Material.Widget" />
@@ -2355,14 +2359,18 @@
<public type="style" name="TextAppearance.Material.Widget.TextView" />
<public type="style" name="TextAppearance.Material.Widget.TextView.PopupMenu" />
<public type="style" name="TextAppearance.Material.Widget.TextView.SpinnerItem" />
+ <public type="style" name="TextAppearance.Material.Widget.Toolbar.Subtitle" />
+ <public type="style" name="TextAppearance.Material.Widget.Toolbar.Title" />
<public type="style" name="Theme.DeviceDefault.Settings" />
<public type="style" name="Theme.Material" />
<public type="style" name="Theme.Material.Dialog" />
+ <public type="style" name="Theme.Material.Dialog.Alert" />
<public type="style" name="Theme.Material.Dialog.MinWidth" />
<public type="style" name="Theme.Material.Dialog.NoActionBar" />
<public type="style" name="Theme.Material.Dialog.NoActionBar.MinWidth" />
+ <public type="style" name="Theme.Material.Dialog.Presentation" />
<public type="style" name="Theme.Material.DialogWhenLarge" />
<public type="style" name="Theme.Material.DialogWhenLarge.NoActionBar" />
<public type="style" name="Theme.Material.InputMethod" />
@@ -2379,9 +2387,11 @@
<public type="style" name="Theme.Material.Light" />
<public type="style" name="Theme.Material.Light.DarkActionBar" />
<public type="style" name="Theme.Material.Light.Dialog" />
+ <public type="style" name="Theme.Material.Light.Dialog.Alert" />
<public type="style" name="Theme.Material.Light.Dialog.MinWidth" />
<public type="style" name="Theme.Material.Light.Dialog.NoActionBar" />
<public type="style" name="Theme.Material.Light.Dialog.NoActionBar.MinWidth" />
+ <public type="style" name="Theme.Material.Light.Dialog.Presentation" />
<public type="style" name="Theme.Material.Light.DialogWhenLarge" />
<public type="style" name="Theme.Material.Light.DialogWhenLarge.NoActionBar" />
<public type="style" name="Theme.Material.Light.NoActionBar" />
@@ -2411,6 +2421,7 @@
<public type="style" name="Widget.Material.AutoCompleteTextView" />
<public type="style" name="Widget.Material.Button" />
<public type="style" name="Widget.Material.Button.Borderless" />
+ <public type="style" name="Widget.Material.Button.Borderless.Colored" />
<public type="style" name="Widget.Material.Button.Borderless.Small" />
<public type="style" name="Widget.Material.Button.Inset" />
<public type="style" name="Widget.Material.Button.Small" />
@@ -2447,14 +2458,17 @@
<public type="style" name="Widget.Material.RatingBar.Indicator" />
<public type="style" name="Widget.Material.RatingBar.Small" />
<public type="style" name="Widget.Material.ScrollView" />
+ <public type="style" name="Widget.Material.SearchView" />
<public type="style" name="Widget.Material.SeekBar" />
<public type="style" name="Widget.Material.SegmentedButton" />
<public type="style" name="Widget.Material.StackView" />
<public type="style" name="Widget.Material.Spinner" />
+ <public type="style" name="Widget.Material.Spinner.Underlined" />
<public type="style" name="Widget.Material.Tab" />
<public type="style" name="Widget.Material.TabWidget" />
<public type="style" name="Widget.Material.TextView" />
<public type="style" name="Widget.Material.TextView.SpinnerItem" />
+ <public type="style" name="Widget.Material.TimePicker" />
<public type="style" name="Widget.Material.Toolbar" />
<public type="style" name="Widget.Material.Toolbar.Button.Navigation" />
<public type="style" name="Widget.Material.WebTextView" />
@@ -2473,6 +2487,7 @@
<public type="style" name="Widget.Material.Light.AutoCompleteTextView" />
<public type="style" name="Widget.Material.Light.Button" />
<public type="style" name="Widget.Material.Light.Button.Borderless" />
+ <public type="style" name="Widget.Material.Light.Button.Borderless.Colored" />
<public type="style" name="Widget.Material.Light.Button.Borderless.Small" />
<public type="style" name="Widget.Material.Light.Button.Inset" />
<public type="style" name="Widget.Material.Light.Button.Small" />
@@ -2484,6 +2499,7 @@
<public type="style" name="Widget.Material.Light.CompoundButton.CheckBox" />
<public type="style" name="Widget.Material.Light.CompoundButton.RadioButton" />
<public type="style" name="Widget.Material.Light.CompoundButton.Star" />
+ <public type="style" name="Widget.Material.Light.DatePicker" />
<public type="style" name="Widget.Material.Light.DropDownItem" />
<public type="style" name="Widget.Material.Light.DropDownItem.Spinner" />
<public type="style" name="Widget.Material.Light.EditText" />
@@ -2511,64 +2527,27 @@
<public type="style" name="Widget.Material.Light.RatingBar.Indicator" />
<public type="style" name="Widget.Material.Light.RatingBar.Small" />
<public type="style" name="Widget.Material.Light.ScrollView" />
+ <public type="style" name="Widget.Material.Light.SearchView" />
<public type="style" name="Widget.Material.Light.SeekBar" />
<public type="style" name="Widget.Material.Light.SegmentedButton" />
<public type="style" name="Widget.Material.Light.StackView" />
<public type="style" name="Widget.Material.Light.Spinner" />
+ <public type="style" name="Widget.Material.Light.Spinner.Underlined" />
<public type="style" name="Widget.Material.Light.Tab" />
<public type="style" name="Widget.Material.Light.TabWidget" />
<public type="style" name="Widget.Material.Light.TextView" />
<public type="style" name="Widget.Material.Light.TextView.SpinnerItem" />
+ <public type="style" name="Widget.Material.Light.TimePicker" />
<public type="style" name="Widget.Material.Light.WebTextView" />
<public type="style" name="Widget.Material.Light.WebView" />
- <public type="style" name="TextAppearance.Material.Display4" />
- <public type="style" name="TextAppearance.Material.Display3" />
- <public type="style" name="TextAppearance.Material.Display2" />
- <public type="style" name="TextAppearance.Material.Display1" />
- <public type="style" name="TextAppearance.Material.Headline" />
- <public type="style" name="TextAppearance.Material.Title" />
- <public type="style" name="TextAppearance.Material.Subhead" />
- <public type="style" name="TextAppearance.Material.Body2" />
- <public type="style" name="TextAppearance.Material.Body1" />
- <public type="style" name="TextAppearance.Material.Caption" />
- <public type="style" name="TextAppearance.Material.Menu" />
- <public type="style" name="TextAppearance.Material.Button" />
-
- <public type="style" name="Widget.Material.Button.Borderless.Colored" />
- <public type="style" name="Widget.Material.Light.Button.Borderless.Colored" />
-
+ <!-- @hide This really shouldn't be public; clients using it should use @* to ref it. -->
<public type="style" name="Theme.Leanback.FormWizard"/>
- <public type="style" name="__removed" />
- <public type="style" name="TextAppearance.Material.Notification" />
- <public type="style" name="TextAppearance.Material.Notification.Title" />
- <public type="style" name="TextAppearance.Material.Notification.Line2" />
- <public type="style" name="TextAppearance.Material.Notification.Info" />
- <public type="style" name="TextAppearance.Material.Notification.Time" />
- <public type="style" name="TextAppearance.Material.Notification.Emphasis" />
-
- <public type="style" name="Widget.Material.Spinner.Underlined" />
- <public type="style" name="Widget.Material.Light.Spinner.Underlined" />
-
- <public type="style" name="TextAppearance.Material.Widget.Toolbar.Title" />
- <public type="style" name="TextAppearance.Material.Widget.Toolbar.Subtitle" />
-
- <public type="style" name="Theme.Material.Dialog.Alert" />
- <public type="style" name="Theme.Material.Dialog.Presentation" />
- <public type="style" name="Theme.Material.Light.Dialog.Alert" />
- <public type="style" name="Theme.Material.Light.Dialog.Presentation" />
-
- <public-padding type="string" name="l_resource_pad" end="0x01040030" />
-
<public type="string" name="config_webSettingsDefaultTextEncoding" />
- <public-padding type="array" name="l_resource_pad" end="0x01070020" />
-
<public type="array" name="config_keySystemUuidMapping" />
- <public-padding type="interpolator" name="l_resource_pad" end="0x010c0010" />
-
<!-- An interpolator which accelerates fast but decelerates slowly. -->
<public type="interpolator" name="fast_out_slow_in" />
<!-- An interpolator which starts with a peak non-zero velocity and decelerates slowly. -->
diff --git a/core/res/res/values/removed.xml b/core/res/res/values/removed.xml
new file mode 100644
index 000000000000..8eaca29656b6
--- /dev/null
+++ b/core/res/res/values/removed.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<!-- Placeholder resources to be removed before release. -->
+<resources>
+ <style name="__removed1" />
+ <attr name="__removed2" />
+ <style name="__removed3" />
+ <style name="__removed4" />
+ <style name="__removed5" />
+ <style name="__removed6" />
+ <style name="__removed7" />
+</resources>
diff --git a/core/res/res/values/styles_leanback.xml b/core/res/res/values/styles_leanback.xml
index 7606c86c2d45..aaeaadd7418d 100644
--- a/core/res/res/values/styles_leanback.xml
+++ b/core/res/res/values/styles_leanback.xml
@@ -36,24 +36,28 @@
<!-- Setup and form wizard themes -->
<style name="TextAppearance.Leanback.FormWizard" parent="@style/TextAppearance.Material">
<item name="textSize">18sp</item>
+ <item name="lineSpacingExtra">24sp</item>
<item name="fontFamily">sans-serif-light</item>
<item name="textColor">?attr/textColorPrimary</item>
</style>
<style name="TextAppearance.Leanback.FormWizard.Small" parent="@style/TextAppearance.Material.Small">
- <item name="textSize">18sp</item>
+ <item name="textSize">14sp</item>
+ <item name="lineSpacingExtra">24sp</item>
<item name="fontFamily">sans-serif-light</item>
<item name="textColor">?attr/textColorPrimary</item>
</style>
<style name="TextAppearance.Leanback.FormWizard.Medium" parent="@style/TextAppearance.Material.Medium">
<item name="textSize">36sp</item>
+ <item name="lineSpacingExtra">40sp</item>
<item name="fontFamily">sans-serif-thin</item>
<item name="textColor">?attr/textColorPrimary</item>
</style>
<style name="TextAppearance.Leanback.FormWizard.Large" parent="@style/TextAppearance.Material.Large">
- <item name="textSize">56sp</item>
+ <item name="textSize">42sp</item>
+ <item name="lineSpacingExtra">48sp</item>
<item name="fontFamily">sans-serif-thin</item>
<item name="textColor">?attr/textColorPrimary</item>
</style>
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index 26c7d10732dc..e6e5cbb8e788 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -839,8 +839,8 @@ please see styles_device_defaults.xml.
<item name="gravity">center</item>
<item name="scaleType">center</item>
<item name="maxLines">2</item>
- <item name="paddingStart">0dp</item>
- <item name="paddingEnd">0dp</item>
+ <item name="paddingStart">12dp</item>
+ <item name="paddingEnd">12dp</item>
</style>
<style name="Widget.Material.ActionButton.CloseMode">
@@ -851,10 +851,10 @@ please see styles_device_defaults.xml.
<item name="src">@drawable/ic_menu_moreoverflow_material</item>
<item name="background">?attr/actionBarItemBackground</item>
<item name="contentDescription">@string/action_menu_overflow_description</item>
- <item name="minWidth">@dimen/action_button_min_width_material</item>
+ <item name="minWidth">@dimen/action_button_min_width_overflow_material</item>
<item name="minHeight">@dimen/action_button_min_height_material</item>
+ <item name="paddingStart">0dp</item>
<item name="paddingEnd">12dp</item>
- <item name="scaleType">center</item>
</style>
<style name="Widget.Material.ActionBar.TabView" parent="Widget.ActionBar.TabView">
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 556c07fd0322..e4ca36d6718d 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -294,7 +294,24 @@
<java-symbol type="bool" name="config_hasRecents" />
<java-symbol type="bool" name="config_windowShowCircularMask" />
<java-symbol type="bool" name="config_windowEnableCircularEmulatorDisplayOverlay" />
-
+ <java-symbol type="bool" name="config_wifi_framework_enable_associated_autojoin_scan" />
+ <java-symbol type="bool" name="config_wifi_framework_enable_associated_network_selection" />
+ <java-symbol type="bool" name="config_wifi_only_link_same_credential_configurations" />
+ <java-symbol type="bool" name="config_wifi_enable_disconnection_debounce" />
+ <java-symbol type="bool" name="config_wifi_enable_5GHz_preference" />
+ <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_threshold" />
+ <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_factor" />
+ <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" />
+ <java-symbol type="integer" name="config_wifi_framework_current_association_hysteresis_high" />
+ <java-symbol type="integer" name="config_wifi_framework_current_association_hysteresis_low" />
+ <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" />
+ <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_factor" />
+ <java-symbol type="integer" name="config_wifi_framework_associated_scan_interval" />
+ <java-symbol type="integer" name="config_wifi_framework_associated_full_scan_backoff" />
+ <java-symbol type="integer" name="config_wifi_framework_associated_full_scan_max_interval" />
+ <java-symbol type="integer" name="config_wifi_framework_associated_full_scan_max_total_dwell_time" />
+ <java-symbol type="integer" name="config_wifi_framework_associated_partial_scan_max_num_active_channels" />
+ <java-symbol type="integer" name="config_wifi_framework_associated_partial_scan_max_num_passive_channels" />
<java-symbol type="integer" name="config_bluetooth_max_advertisers" />
<java-symbol type="integer" name="config_bluetooth_max_scan_filters" />
<java-symbol type="integer" name="config_cursorWindowSize" />
@@ -313,7 +330,6 @@
<java-symbol type="integer" name="config_shortPressOnPowerBehavior" />
<java-symbol type="integer" name="config_toastDefaultGravity" />
<java-symbol type="integer" name="config_wifi_framework_scan_interval" />
- <java-symbol type="integer" name="config_wifi_framework_associated_scan_interval" />
<java-symbol type="integer" name="config_wifi_supplicant_scan_interval" />
<java-symbol type="integer" name="config_wifi_scan_interval_p2p_connected" />
<java-symbol type="integer" name="db_connection_pool_size" />
@@ -1168,6 +1184,18 @@
<java-symbol type="drawable" name="sim_dark_orange" />
<java-symbol type="drawable" name="sim_dark_purple" />
+ <java-symbol type="drawable" name="ic_account_circle" />
+ <java-symbol type="color" name="user_icon_1" />
+ <java-symbol type="color" name="user_icon_2" />
+ <java-symbol type="color" name="user_icon_3" />
+ <java-symbol type="color" name="user_icon_4" />
+ <java-symbol type="color" name="user_icon_5" />
+ <java-symbol type="color" name="user_icon_6" />
+ <java-symbol type="color" name="user_icon_7" />
+ <java-symbol type="color" name="user_icon_8" />
+ <java-symbol type="color" name="user_icon_default_gray" />
+ <java-symbol type="color" name="user_icon_default_white" />
+
<java-symbol type="layout" name="action_bar_home" />
<java-symbol type="layout" name="action_bar_title_item" />
<java-symbol type="layout" name="action_menu_item_layout" />
@@ -1508,6 +1536,7 @@
<java-symbol type="bool" name="config_useAttentionLight" />
<java-symbol type="bool" name="config_animateScreenLights" />
<java-symbol type="bool" name="config_automatic_brightness_available" />
+ <java-symbol type="bool" name="config_dozeAfterScreenOff" />
<java-symbol type="bool" name="config_enableActivityRecognitionHardwareOverlay" />
<java-symbol type="bool" name="config_enableFusedLocationOverlay" />
<java-symbol type="bool" name="config_enableHardwareFlpOverlay" />
@@ -2012,4 +2041,5 @@
<java-symbol type="attr" name="closeItemLayout" />
<java-symbol type="layout" name="resolver_different_item_header" />
<java-symbol type="array" name="config_default_vm_number" />
+ <java-symbol type="integer" name="config_cdma_3waycall_flash_delay"/>
</resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 48de5adf552c..d0097aacf7f3 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -192,6 +192,7 @@ please see themes_device_defaults.xml.
<item name="navigationBarColor">@color/black</item>
<item name="windowActionBarFullscreenDecorLayout">@layout/screen_action_bar</item>
<item name="windowContentTransitions">false</item>
+ <item name="windowActivityTransitions">false</item>
<!-- Define these here; ContextThemeWrappers around themes that define them should
always clear these values. -->
@@ -816,6 +817,7 @@ please see themes_device_defaults.xml.
<!-- Theme for the dialog shown when an app crashes or ANRs. -->
<style name="Theme.Dialog.AppError" parent="Theme.DeviceDefault.Light.Dialog.Alert">
<item name="windowContentTransitions">false</item>
+ <item name="windowActivityTransitions">false</item>
<item name="windowCloseOnTouchOutside">false</item>
</style>
@@ -827,6 +829,7 @@ please see themes_device_defaults.xml.
<item name="textColor">@color/secondary_text_nofocus</item>
<item name="windowCloseOnTouchOutside">false</item>
<item name="windowContentTransitions">false</item>
+ <item name="windowActivityTransitions">false</item>
</style>
<!-- Theme for a window that looks like a toast. -->
@@ -836,6 +839,7 @@ please see themes_device_defaults.xml.
<item name="backgroundDimEnabled">false</item>
<item name="windowCloseOnTouchOutside">false</item>
<item name="windowContentTransitions">false</item>
+ <item name="windowActivityTransitions">false</item>
</style>
</resources>
diff --git a/core/res/res/values/themes_leanback.xml b/core/res/res/values/themes_leanback.xml
index 720733f4eab0..82cf288f4629 100644
--- a/core/res/res/values/themes_leanback.xml
+++ b/core/res/res/values/themes_leanback.xml
@@ -76,6 +76,7 @@
<style name="Theme.Leanback.Dialog.AppError" parent="Theme.Leanback.Dialog">
<item name="windowContentTransitions">false</item>
+ <item name="windowActivityTransitions">false</item>
<item name="windowCloseOnTouchOutside">false</item>
</style>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 4aca02e1ab50..008e1700d215 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -157,7 +157,8 @@ please see themes_device_defaults.xml.
<item name="windowTitleStyle">@style/WindowTitle.Material</item>
<item name="windowTitleSize">@dimen/action_bar_default_height_material</item>
<item name="windowTitleBackgroundStyle">@style/WindowTitleBackground.Material</item>
- <item name="windowContentTransitions">true</item>
+ <item name="windowContentTransitions">false</item>
+ <item name="windowActivityTransitions">true</item>
<item name="windowAnimationStyle">@style/Animation.Material.Activity</item>
<item name="windowSoftInputMode">stateUnspecified|adjustUnspecified</item>
<item name="windowActionBar">true</item>
@@ -511,7 +512,8 @@ please see themes_device_defaults.xml.
<item name="windowEnterTransition">@transition/fade</item>
<item name="windowSharedElementEnterTransition">@transition/move</item>
<item name="windowSharedElementExitTransition">@transition/move</item>
- <item name="windowContentTransitions">true</item>
+ <item name="windowContentTransitions">false</item>
+ <item name="windowActivityTransitions">true</item>
<!-- Dialog attributes -->
<item name="dialogTheme">@style/Theme.Material.Light.Dialog</item>
@@ -1256,7 +1258,4 @@ please see themes_device_defaults.xml.
<item name="colorPrimaryDark">@color/material_blue_grey_950</item>
<item name="colorAccent">@color/material_deep_teal_500</item>
</style>
-
- <!-- TODO: Spacer to be removed from here and public.xml -->
- <style name="__removed" />
</resources>
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiAssociationTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiAssociationTestRunner.java
index 23544849c449..f4ea6f23b160 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiAssociationTestRunner.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiAssociationTestRunner.java
@@ -16,17 +16,12 @@
package com.android.connectivitymanagertest;
-import android.content.Context;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
import android.test.InstrumentationTestRunner;
import android.test.InstrumentationTestSuite;
-import android.util.Log;
import com.android.connectivitymanagertest.functional.WifiAssociationTest;
import junit.framework.TestSuite;
-import junit.framework.Assert;
/**
* Instrumentation Test Runner for wifi association test.
@@ -39,8 +34,6 @@ import junit.framework.Assert;
* -w com.android.connectivitymanagertest/.WifiAssociationTestRunner"
*/
public class WifiAssociationTestRunner extends InstrumentationTestRunner {
- private static final String TAG = "WifiAssociationTestRunner";
- public int mBand;
@Override
public TestSuite getAllTests() {
@@ -53,35 +46,4 @@ public class WifiAssociationTestRunner extends InstrumentationTestRunner {
public ClassLoader getLoader() {
return WifiAssociationTestRunner.class.getClassLoader();
}
-
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- String mFrequencyBand = icicle.getString("frequency-band");
- if (mFrequencyBand != null) {
- setFrequencyBand(mFrequencyBand);
- }
- }
-
- private void setFrequencyBand(String band) {
- WifiManager mWifiManager = (WifiManager)getContext().getSystemService(Context.WIFI_SERVICE);
- if (band.equals("2.4")) {
- Log.v(TAG, "set frequency band to 2.4");
- mBand = WifiManager.WIFI_FREQUENCY_BAND_2GHZ;
- } else if (band.equals("5.0")) {
- Log.v(TAG, "set frequency band to 5.0");
- mBand = WifiManager.WIFI_FREQUENCY_BAND_5GHZ;
- } else if (band.equals("auto")) {
- Log.v(TAG, "set frequency band to auto");
- mBand = WifiManager.WIFI_FREQUENCY_BAND_AUTO;
- } else {
- Assert.fail("invalid frequency band");
- }
- int currentFreq = mWifiManager.getFrequencyBand();
- if (mBand == currentFreq) {
- Log.v(TAG, "frequency band has been set");
- return;
- }
- mWifiManager.setFrequencyBand(mBand, true);
- }
}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java
index c2b80dc69eee..68f3179f96c1 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java
@@ -16,14 +16,13 @@
package com.android.connectivitymanagertest.functional;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo.State;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiConfiguration.AuthAlgorithm;
import android.net.wifi.WifiConfiguration.GroupCipher;
import android.net.wifi.WifiConfiguration.PairwiseCipher;
import android.net.wifi.WifiConfiguration.Protocol;
import android.net.wifi.WifiInfo;
+import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.test.suitebuilder.annotation.LargeTest;
@@ -39,13 +38,7 @@ import com.android.connectivitymanagertest.WifiConfigurationHelper;
* -w com.android.connectivitymanagertest/.WifiAssociationTestRunner"
*/
public class WifiAssociationTest extends ConnectivityManagerTestBase {
- private String mSsid = null;
- private String mPassword = null;
- private String mSecurityType = null;
- private String mFrequencyBand = null;
- private int mBand;
-
- enum SECURITY_TYPE {
+ private enum SecurityType {
OPEN, WEP64, WEP128, WPA_TKIP, WPA2_AES
}
@@ -53,86 +46,106 @@ public class WifiAssociationTest extends ConnectivityManagerTestBase {
super(WifiAssociationTest.class.getSimpleName());
}
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- WifiAssociationTestRunner runner = (WifiAssociationTestRunner)getInstrumentation();
+ /**
+ * Test that the wifi can associate with a given access point.
+ */
+ @LargeTest
+ public void testWifiAssociation() {
+ WifiAssociationTestRunner runner = (WifiAssociationTestRunner) getInstrumentation();
Bundle arguments = runner.getArguments();
- mSecurityType = arguments.getString("security-type");
- mSsid = arguments.getString("ssid");
- mPassword = arguments.getString("password");
- mFrequencyBand = arguments.getString("frequency-band");
- mBand = runner.mBand;
- assertNotNull("security type is empty", mSecurityType);
- assertNotNull("ssid is empty", mSsid);
- validateFrequencyBand();
-
- // enable wifi and verify wpa_supplicant is started
+
+ String ssid = arguments.getString("ssid");
+ assertNotNull("ssid is empty", ssid);
+
+ String securityTypeStr = arguments.getString("security-type");
+ assertNotNull("security-type is empty", securityTypeStr);
+ SecurityType securityType = SecurityType.valueOf(securityTypeStr);
+
+ String password = arguments.getString("password");
+
+ String freqStr = arguments.getString("frequency-band");
+ if (freqStr != null) {
+ setFrequencyBand(freqStr);
+ }
+
assertTrue("enable Wifi failed", enableWifi());
- assertTrue("wifi not connected", waitForNetworkState(
- ConnectivityManager.TYPE_WIFI, State.CONNECTED, LONG_TIMEOUT));
WifiInfo wi = mWifiManager.getConnectionInfo();
+ logv("%s", wi);
assertNotNull("no active wifi info", wi);
- assertTrue("failed to ping wpa_supplicant ", mWifiManager.pingSupplicant());
+
+ WifiConfiguration config = getConfig(ssid, securityType, password);
+
+ logv("Network config: %s", config.toString());
+ connectToWifi(config);
}
- private void validateFrequencyBand() {
- if (mFrequencyBand != null) {
- int currentFreq = mWifiManager.getFrequencyBand();
- logv("read frequency band: " + currentFreq);
- assertEquals("specified frequency band does not match operational band of WifiManager",
- currentFreq, mBand);
- }
+ /**
+ * Set the frequency band and verify that it has been set.
+ */
+ private void setFrequencyBand(String frequencyBandStr) {
+ int frequencyBand = -1;
+ if ("2.4".equals(frequencyBandStr)) {
+ frequencyBand = WifiManager.WIFI_FREQUENCY_BAND_2GHZ;
+ } else if ("5.0".equals(frequencyBandStr)) {
+ frequencyBand = WifiManager.WIFI_FREQUENCY_BAND_5GHZ;
+ } else if ("auto".equals(frequencyBandStr)) {
+ frequencyBand = WifiManager.WIFI_FREQUENCY_BAND_AUTO;
+ } else {
+ fail("Invalid frequency-band");
+ }
+ if (mWifiManager.getFrequencyBand() != frequencyBand) {
+ logv("Set frequency band to %s", frequencyBandStr);
+ mWifiManager.setFrequencyBand(frequencyBand, true);
+ }
+ assertEquals("Specified frequency band does not match operational band",
+ frequencyBand, mWifiManager.getFrequencyBand());
}
- @LargeTest
- public void testWifiAssociation() {
- assertNotNull("no test ssid", mSsid);
+ /**
+ * Get the {@link WifiConfiguration} based on ssid, security, and password.
+ */
+ private WifiConfiguration getConfig(String ssid, SecurityType securityType, String password) {
+ logv("Security type is %s", securityType.toString());
+
WifiConfiguration config = null;
- SECURITY_TYPE security = SECURITY_TYPE.valueOf(mSecurityType);
- logv("Security type is " + security.toString());
- switch (security) {
- // set network configurations
+ switch (securityType) {
case OPEN:
- config = WifiConfigurationHelper.createOpenConfig(mSsid);
+ config = WifiConfigurationHelper.createOpenConfig(ssid);
break;
case WEP64:
- assertNotNull("password is empty", mPassword);
+ assertNotNull("password is empty", password);
// always use hex pair for WEP-40
- assertTrue(WifiConfigurationHelper.isHex(mPassword, 10));
- config = WifiConfigurationHelper.createWepConfig(mSsid, mPassword);
+ assertTrue(WifiConfigurationHelper.isHex(password, 10));
+ config = WifiConfigurationHelper.createWepConfig(ssid, password);
config.allowedGroupCiphers.set(GroupCipher.WEP40);
break;
case WEP128:
- assertNotNull("password is empty", mPassword);
+ assertNotNull("password is empty", password);
// always use hex pair for WEP-104
- assertTrue(WifiConfigurationHelper.isHex(mPassword, 26));
- config = WifiConfigurationHelper.createWepConfig(mSsid, mPassword);
+ assertTrue(WifiConfigurationHelper.isHex(password, 26));
+ config = WifiConfigurationHelper.createWepConfig(ssid, password);
config.allowedGroupCiphers.set(GroupCipher.WEP104);
break;
case WPA_TKIP:
- assertNotNull("password is empty", mPassword);
- config = WifiConfigurationHelper.createPskConfig(mSsid, mPassword);
+ assertNotNull("password is empty", password);
+ config = WifiConfigurationHelper.createPskConfig(ssid, password);
config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
config.allowedProtocols.set(Protocol.WPA);
config.allowedPairwiseCiphers.set(PairwiseCipher.TKIP);
config.allowedGroupCiphers.set(GroupCipher.TKIP);
break;
case WPA2_AES:
- assertNotNull("password is empty", mPassword);
- config = WifiConfigurationHelper.createPskConfig(mSsid, mPassword);
+ assertNotNull("password is empty", password);
+ config = WifiConfigurationHelper.createPskConfig(ssid, password);
config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
config.allowedProtocols.set(Protocol.RSN);
config.allowedPairwiseCiphers.set(PairwiseCipher.CCMP);
config.allowedGroupCiphers.set(GroupCipher.CCMP);
break;
default:
- fail("Not a valid security type: " + mSecurityType);
+ fail("Not a valid security type: " + securityType);
break;
}
- logv("network config: %s", config.toString());
- connectToWifi(config);
- // verify that connection actually works
- assertTrue("no network connectivity at end of test", checkNetworkConnectivity());
+ return config;
}
}
diff --git a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
index 5958c3a6f759..d56c5a94ba18 100644
--- a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
+++ b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
@@ -16,8 +16,6 @@
package android.os;
-import com.android.internal.inputmethod.InputMethodUtils;
-
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.ResolveInfo;
@@ -28,78 +26,107 @@ import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype;
import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
+import com.android.internal.inputmethod.InputMethodUtils;
+
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
public class InputMethodTest extends InstrumentationTestCase {
private static final boolean IS_AUX = true;
private static final boolean IS_DEFAULT = true;
private static final boolean IS_AUTO = true;
+ private static final boolean IS_ASCII_CAPABLE = true;
+ private static final boolean IS_SYSTEM_READY = true;
private static final ArrayList<InputMethodSubtype> NO_SUBTYPE = null;
+ private static final Locale LOCALE_EN_US = new Locale("en", "US");
+ private static final Locale LOCALE_EN_GB = new Locale("en", "GB");
+ private static final Locale LOCALE_EN_IN = new Locale("en", "IN");
+ private static final Locale LOCALE_HI = new Locale("hi");
+ private static final Locale LOCALE_JA_JP = new Locale("ja", "JP");
+ private static final String SUBTYPE_MODE_KEYBOARD = "keyboard";
+ private static final String SUBTYPE_MODE_VOICE = "voice";
@SmallTest
- public void testDefaultEnabledImesWithDefaultVoiceIme() throws Exception {
- final Context context = getInstrumentation().getTargetContext();
- final ArrayList<InputMethodInfo> imis = new ArrayList<InputMethodInfo>();
- imis.add(createDefaultAutoDummyVoiceIme());
- imis.add(createNonDefaultAutoDummyVoiceIme0());
- imis.add(createNonDefaultAutoDummyVoiceIme1());
- imis.add(createNonDefaultDummyVoiceIme2());
- imis.add(createDefaultDummyEnUSKeyboardIme());
- imis.add(createNonDefaultDummyJaJPKeyboardIme());
- imis.add(createNonDefaultDummyJaJPKeyboardImeWithoutSubtypes());
- final ArrayList<InputMethodInfo> enabledImis = InputMethodUtils.getDefaultEnabledImes(
- context, true, imis);
- assertEquals(2, enabledImis.size());
- for (int i = 0; i < enabledImis.size(); ++i) {
- final InputMethodInfo imi = enabledImis.get(0);
- // "DummyDefaultAutoVoiceIme" and "DummyDefaultEnKeyboardIme"
- if (imi.getPackageName().equals("DummyDefaultAutoVoiceIme")
- || imi.getPackageName().equals("DummyDefaultEnKeyboardIme")) {
- continue;
- } else {
- fail("Invalid enabled subtype.");
- }
- }
+ public void testVoiceImes() throws Exception {
+ // locale: en_US
+ assertDefaultEnabledImes(getImesWithDefaultVoiceIme(), LOCALE_EN_US, !IS_SYSTEM_READY,
+ "DummyDefaultEnKeyboardIme");
+ assertDefaultEnabledImes(getImesWithoutDefaultVoiceIme(), LOCALE_EN_US, !IS_SYSTEM_READY,
+ "DummyDefaultEnKeyboardIme");
+ assertDefaultEnabledImes(getImesWithDefaultVoiceIme(), LOCALE_EN_US, IS_SYSTEM_READY,
+ "DummyDefaultAutoVoiceIme", "DummyDefaultEnKeyboardIme");
+ assertDefaultEnabledImes(getImesWithoutDefaultVoiceIme(), LOCALE_EN_US, IS_SYSTEM_READY,
+ "DummyNonDefaultAutoVoiceIme0", "DummyNonDefaultAutoVoiceIme1",
+ "DummyDefaultEnKeyboardIme");
+
+ // locale: en_GB
+ assertDefaultEnabledImes(getImesWithDefaultVoiceIme(), LOCALE_EN_GB, !IS_SYSTEM_READY,
+ "DummyDefaultEnKeyboardIme");
+ assertDefaultEnabledImes(getImesWithoutDefaultVoiceIme(), LOCALE_EN_GB, !IS_SYSTEM_READY,
+ "DummyDefaultEnKeyboardIme");
+ assertDefaultEnabledImes(getImesWithDefaultVoiceIme(), LOCALE_EN_GB, IS_SYSTEM_READY,
+ "DummyDefaultEnKeyboardIme", "DummyDefaultAutoVoiceIme");
+ assertDefaultEnabledImes(getImesWithoutDefaultVoiceIme(), LOCALE_EN_GB, IS_SYSTEM_READY,
+ "DummyNonDefaultAutoVoiceIme0", "DummyNonDefaultAutoVoiceIme1",
+ "DummyDefaultEnKeyboardIme");
+
+ // locale: ja_JP
+ assertDefaultEnabledImes(getImesWithDefaultVoiceIme(), LOCALE_JA_JP, !IS_SYSTEM_READY,
+ "DummyDefaultEnKeyboardIme");
+ assertDefaultEnabledImes(getImesWithoutDefaultVoiceIme(), LOCALE_JA_JP, !IS_SYSTEM_READY,
+ "DummyDefaultEnKeyboardIme");
+ assertDefaultEnabledImes(getImesWithDefaultVoiceIme(), LOCALE_JA_JP, IS_SYSTEM_READY,
+ "DummyNonDefaultAutoVoiceIme0", "DummyNonDefaultAutoVoiceIme1",
+ "DummyDefaultEnKeyboardIme", "DummyDefaultAutoVoiceIme");
+ assertDefaultEnabledImes(getImesWithoutDefaultVoiceIme(), LOCALE_JA_JP, IS_SYSTEM_READY,
+ "DummyNonDefaultAutoVoiceIme0", "DummyNonDefaultAutoVoiceIme1",
+ "DummyDefaultEnKeyboardIme");
}
@SmallTest
- public void testDefaultEnabledImesWithOutDefaultVoiceIme() throws Exception {
- final Context context = getInstrumentation().getTargetContext();
- final ArrayList<InputMethodInfo> imis = new ArrayList<InputMethodInfo>();
- imis.add(createNonDefaultAutoDummyVoiceIme0());
- imis.add(createNonDefaultAutoDummyVoiceIme1());
- imis.add(createNonDefaultDummyVoiceIme2());
- imis.add(createDefaultDummyEnUSKeyboardIme());
- imis.add(createNonDefaultDummyJaJPKeyboardIme());
- imis.add(createNonDefaultDummyJaJPKeyboardImeWithoutSubtypes());
- final ArrayList<InputMethodInfo> enabledImis = InputMethodUtils.getDefaultEnabledImes(
- context, true, imis);
- assertEquals(3, enabledImis.size());
- for (int i = 0; i < enabledImis.size(); ++i) {
- final InputMethodInfo imi = enabledImis.get(0);
- // "DummyNonDefaultAutoVoiceIme0", "DummyNonDefaultAutoVoiceIme1" and
- // "DummyDefaultEnKeyboardIme"
- if (imi.getPackageName().equals("DummyNonDefaultAutoVoiceIme0")
- || imi.getPackageName().equals("DummyNonDefaultAutoVoiceIme1")
- || imi.getPackageName().equals("DummyDefaultEnKeyboardIme")) {
- continue;
- } else {
- fail("Invalid enabled subtype.");
- }
- }
+ public void testKeyboardImes() throws Exception {
+ // locale: en_US
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_EN_US, !IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.latin", "com.android.apps.inputmethod.hindi");
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_EN_US, IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.voice", "com.android.apps.inputmethod.latin",
+ "com.android.apps.inputmethod.hindi");
+
+ // locale: en_GB
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_EN_GB, !IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.latin", "com.android.apps.inputmethod.hindi");
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_EN_GB, IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.voice", "com.android.apps.inputmethod.latin",
+ "com.android.apps.inputmethod.hindi");
+
+ // locale: en_IN
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_EN_IN, !IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.latin", "com.android.apps.inputmethod.hindi");
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_EN_IN, IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.voice", "com.android.apps.inputmethod.latin",
+ "com.android.apps.inputmethod.hindi");
+
+ // locale: hi
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_HI, !IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.latin", "com.android.apps.inputmethod.hindi");
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_HI, IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.voice", "com.android.apps.inputmethod.latin",
+ "com.android.apps.inputmethod.hindi");
+
+ // locale: ja_JP
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_JA_JP, !IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.latin", "com.android.apps.inputmethod.hindi");
+ assertDefaultEnabledImes(getSamplePreinstalledImes(), LOCALE_JA_JP, IS_SYSTEM_READY,
+ "com.android.apps.inputmethod.voice", "com.android.apps.inputmethod.latin",
+ "com.android.apps.inputmethod.hindi", "com.android.apps.inputmethod.japanese");
}
@SmallTest
public void testParcelable() throws Exception {
- final ArrayList<InputMethodInfo> originalList = new ArrayList<InputMethodInfo>();
- originalList.add(createNonDefaultAutoDummyVoiceIme0());
- originalList.add(createNonDefaultAutoDummyVoiceIme1());
- originalList.add(createNonDefaultDummyVoiceIme2());
- originalList.add(createDefaultDummyEnUSKeyboardIme());
- originalList.add(createNonDefaultDummyJaJPKeyboardIme());
- originalList.add(createNonDefaultDummyJaJPKeyboardImeWithoutSubtypes());
-
+ final ArrayList<InputMethodInfo> originalList = getSamplePreinstalledImes();
final List<InputMethodInfo> clonedList = cloneViaParcel(originalList);
assertNotNull(clonedList);
final List<InputMethodInfo> clonedClonedList = cloneViaParcel(clonedList);
@@ -114,6 +141,14 @@ public class InputMethodTest extends InstrumentationTestCase {
}
}
+ private void assertDefaultEnabledImes(final ArrayList<InputMethodInfo> preinstalledImes,
+ final Locale systemLocale, final boolean isSystemReady, String... imeNames) {
+ final Context context = getInstrumentation().getTargetContext();
+ assertEquals(new HashSet<String>(Arrays.asList(imeNames)),
+ getPackageNames(callGetDefaultEnabledImesUnderWithLocale(context,
+ isSystemReady, preinstalledImes, systemLocale)));
+ }
+
private static List<InputMethodInfo> cloneViaParcel(final List<InputMethodInfo> list) {
Parcel p = null;
try {
@@ -128,6 +163,27 @@ public class InputMethodTest extends InstrumentationTestCase {
}
}
+ private static ArrayList<InputMethodInfo> callGetDefaultEnabledImesUnderWithLocale(
+ final Context context, final boolean isSystemReady,
+ final ArrayList<InputMethodInfo> imis, final Locale locale) {
+ final Locale initialLocale = context.getResources().getConfiguration().locale;
+ try {
+ context.getResources().getConfiguration().setLocale(locale);
+ return InputMethodUtils.getDefaultEnabledImes(context, isSystemReady, imis);
+ } finally {
+ context.getResources().getConfiguration().setLocale(initialLocale);
+ }
+ }
+
+ private HashSet<String> getPackageNames(final ArrayList<InputMethodInfo> imis) {
+ final HashSet<String> packageNames = new HashSet<>();
+ for (final InputMethodInfo imi : imis) {
+ final String actualPackageName = imi.getPackageName();
+ packageNames.add(actualPackageName);
+ }
+ return packageNames;
+ }
+
private static void verifyEquality(InputMethodInfo expected, InputMethodInfo actual) {
assertEquals(expected, actual);
assertEquals(expected.getSubtypeCount(), actual.getSubtypeCount());
@@ -159,7 +215,8 @@ public class InputMethodTest extends InstrumentationTestCase {
}
private static InputMethodSubtype createDummyInputMethodSubtype(String locale, String mode,
- boolean isAuxiliary, boolean overridesImplicitlyEnabledSubtype) {
+ boolean isAuxiliary, boolean overridesImplicitlyEnabledSubtype,
+ boolean isAsciiCapable) {
return new InputMethodSubtypeBuilder()
.setSubtypeNameResId(0)
.setSubtypeIconResId(0)
@@ -168,59 +225,136 @@ public class InputMethodTest extends InstrumentationTestCase {
.setSubtypeExtraValue("")
.setIsAuxiliary(isAuxiliary)
.setOverridesImplicitlyEnabledSubtype(overridesImplicitlyEnabledSubtype)
+ .setIsAsciiCapable(isAsciiCapable)
.build();
}
- private static InputMethodInfo createDefaultAutoDummyVoiceIme() {
- final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
- subtypes.add(createDummyInputMethodSubtype("auto", "voice", IS_AUX, IS_AUTO));
- subtypes.add(createDummyInputMethodSubtype("en_US", "voice", IS_AUX, !IS_AUTO));
- return createDummyInputMethodInfo("DummyDefaultAutoVoiceIme", "dummy.voice0",
- "DummyVoice0", IS_AUX, IS_DEFAULT, subtypes);
+ private static ArrayList<InputMethodInfo> getImesWithDefaultVoiceIme() {
+ ArrayList<InputMethodInfo> preinstalledImes = new ArrayList<>();
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("auto", SUBTYPE_MODE_VOICE, IS_AUX, IS_AUTO,
+ !IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("en_US", SUBTYPE_MODE_VOICE, IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("DummyDefaultAutoVoiceIme",
+ "dummy.voice0", "DummyVoice0", IS_AUX, IS_DEFAULT, subtypes));
+ }
+ preinstalledImes.addAll(getImesWithoutDefaultVoiceIme());
+ return preinstalledImes;
}
- private static InputMethodInfo createNonDefaultAutoDummyVoiceIme0() {
- final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
- subtypes.add(createDummyInputMethodSubtype("auto", "voice", IS_AUX, IS_AUTO));
- subtypes.add(createDummyInputMethodSubtype("en_US", "voice", IS_AUX, !IS_AUTO));
- return createDummyInputMethodInfo("DummyNonDefaultAutoVoiceIme0", "dummy.voice1",
- "DummyVoice1", IS_AUX, !IS_DEFAULT, subtypes);
+ private static ArrayList<InputMethodInfo> getImesWithoutDefaultVoiceIme() {
+ ArrayList<InputMethodInfo> preinstalledImes = new ArrayList<>();
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("auto", SUBTYPE_MODE_VOICE, IS_AUX, IS_AUTO,
+ !IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("en_US", SUBTYPE_MODE_VOICE, IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("DummyNonDefaultAutoVoiceIme0",
+ "dummy.voice1", "DummyVoice1", IS_AUX, !IS_DEFAULT, subtypes));
+ }
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("auto", SUBTYPE_MODE_VOICE, IS_AUX, IS_AUTO,
+ !IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("en_US", SUBTYPE_MODE_VOICE, IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("DummyNonDefaultAutoVoiceIme1",
+ "dummy.voice2", "DummyVoice2", IS_AUX, !IS_DEFAULT, subtypes));
+ }
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("en_US", SUBTYPE_MODE_VOICE, IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("DummyNonDefaultVoiceIme2",
+ "dummy.voice3", "DummyVoice3", IS_AUX, !IS_DEFAULT, subtypes));
+ }
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("en_US", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("DummyDefaultEnKeyboardIme",
+ "dummy.keyboard0", "DummyKeyboard0", !IS_AUX, IS_DEFAULT, subtypes));
+ }
+ return preinstalledImes;
}
- private static InputMethodInfo createNonDefaultAutoDummyVoiceIme1() {
- final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
- subtypes.add(createDummyInputMethodSubtype("auto", "voice", IS_AUX, IS_AUTO));
- subtypes.add(createDummyInputMethodSubtype("en_US", "voice", IS_AUX, !IS_AUTO));
- return createDummyInputMethodInfo("DummyNonDefaultAutoVoiceIme1", "dummy.voice2",
- "DummyVoice2", IS_AUX, !IS_DEFAULT, subtypes);
- }
+ private static ArrayList<InputMethodInfo> getSamplePreinstalledImes() {
+ ArrayList<InputMethodInfo> preinstalledImes = new ArrayList<>();
- private static InputMethodInfo createNonDefaultDummyVoiceIme2() {
- final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
- subtypes.add(createDummyInputMethodSubtype("en_US", "voice", IS_AUX, !IS_AUTO));
- return createDummyInputMethodInfo("DummyNonDefaultVoiceIme2", "dummy.voice3",
- "DummyVoice3", IS_AUX, !IS_DEFAULT, subtypes);
- }
+ // a dummy Voice IME
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("", SUBTYPE_MODE_VOICE, IS_AUX,
+ IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("com.android.apps.inputmethod.voice",
+ "com.android.inputmethod.voice", "DummyVoiceIme", IS_AUX, IS_DEFAULT,
+ subtypes));
+ }
- private static InputMethodInfo createDefaultDummyEnUSKeyboardIme() {
- final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
- subtypes.add(createDummyInputMethodSubtype("en_US", "keyboard", !IS_AUX, !IS_AUTO));
- return createDummyInputMethodInfo("DummyDefaultEnKeyboardIme", "dummy.keyboard0",
- "DummyKeyboard0", !IS_AUX, IS_DEFAULT, subtypes);
- }
+ // a dummy Hindi IME
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ // TODO: This subtype should be marked as IS_ASCII_CAPABLE
+ subtypes.add(createDummyInputMethodSubtype("en_IN", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("hi", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("com.android.apps.inputmethod.hindi",
+ "com.android.inputmethod.hindi", "DummyHindiIme", !IS_AUX, IS_DEFAULT,
+ subtypes));
+ }
- private static InputMethodInfo createNonDefaultDummyJaJPKeyboardIme() {
- final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
- subtypes.add(createDummyInputMethodSubtype("ja_JP", "keyboard", !IS_AUX, !IS_AUTO));
- return createDummyInputMethodInfo("DummyNonDefaultJaJPKeyboardIme", "dummy.keyboard1",
- "DummyKeyboard1", !IS_AUX, !IS_DEFAULT, subtypes);
- }
+ // a dummy Pinyin IME
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("zh_CN", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("ccom.android.apps.inputmethod.pinyin",
+ "com.android.apps.inputmethod.pinyin", "DummyPinyinIme", !IS_AUX, IS_DEFAULT,
+ subtypes));
+ }
+
+ // a dummy Korian IME
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("ko", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("com.android.apps.inputmethod.korean",
+ "com.android.apps.inputmethod.korean", "DummyKorianIme", !IS_AUX, IS_DEFAULT,
+ subtypes));
+ }
+
+ // a dummy Latin IME
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("en_US", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("en_GB", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("en_IN", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("hi", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("com.android.apps.inputmethod.latin",
+ "com.android.apps.inputmethod.latin", "DummyLatinIme", !IS_AUX, IS_DEFAULT,
+ subtypes));
+ }
+
+ // a dummy Japanese IME
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
+ subtypes.add(createDummyInputMethodSubtype("ja", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ subtypes.add(createDummyInputMethodSubtype("emoji", SUBTYPE_MODE_KEYBOARD, !IS_AUX,
+ !IS_AUTO, !IS_ASCII_CAPABLE));
+ preinstalledImes.add(createDummyInputMethodInfo("com.android.apps.inputmethod.japanese",
+ "com.android.apps.inputmethod.japanese", "DummyJapaneseIme", !IS_AUX,
+ IS_DEFAULT, subtypes));
+ }
- // Although IMEs that have no subtype are considered to be deprecated, the Android framework
- // must still be able to handle such IMEs as well as IMEs that have at least one subtype.
- private static InputMethodInfo createNonDefaultDummyJaJPKeyboardImeWithoutSubtypes() {
- final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
- return createDummyInputMethodInfo("DummyNonDefaultJaJPKeyboardImeWithoutSubtypes",
- "dummy.keyboard2", "DummyKeyboard2", !IS_AUX, !IS_DEFAULT, NO_SUBTYPE);
+ return preinstalledImes;
}
}
diff --git a/docs/html/preview/tv/ui/recommendations.jd b/docs/html/preview/tv/ui/recommendations.jd
index 2c78064ea4cc..a2ff55ca8ea6 100644
--- a/docs/html/preview/tv/ui/recommendations.jd
+++ b/docs/html/preview/tv/ui/recommendations.jd
@@ -9,7 +9,6 @@ page.title=Making Recommendations
<li><a href="#service">Create a Recommendations Service</a></li>
<li><a href="#build">Build Recommendations</a></li>
<li><a href="#run-service">Run Recommendations Service</a></li>
- <li><a href="#DesignLandscapeLayouts">Design Landscape Layouts</a></li>
</ol>
</div>
diff --git a/docs/html/sdk/installing/studio.jd b/docs/html/sdk/installing/studio.jd
index ee14b1928b13..776e31247ea7 100644
--- a/docs/html/sdk/installing/studio.jd
+++ b/docs/html/sdk/installing/studio.jd
@@ -220,7 +220,7 @@ capabilities you expect from IntelliJ, Android Studio offers:</p>
<li>Lint tools to catch performance, usability, version compatibility, and other problems.</li>
<li>ProGuard and app-signing capabilities.</li>
<li>Built-in support for <a
- href="https://developers.google.com/cloud/devtools/android_studio_templates/"
+ href="https://developers.google.com/cloud/mobile"
class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud
Messaging and App Engine.
</ul>
diff --git a/docs/html/tools/building/index.jd b/docs/html/tools/building/index.jd
index c64942ff7d25..c1f301943ab8 100644
--- a/docs/html/tools/building/index.jd
+++ b/docs/html/tools/building/index.jd
@@ -79,3 +79,14 @@ page.title=Building and Running
running on a device.</li>
</ul>
+<p class="note"><b>Note:</b> Apps are limited to a 64K method reference limit. If your app reaches
+this limit, the build process outputs the following error message:
+
+<pre>Unable to execute dex: method ID not in [0, 0xffff]: 65536.</pre>
+
+To avoid this, you can
+<a href="http://android-developers.blogspot.com.es/2011/07/custom-class-loading-in-dalvik.html">load
+secondary dex files at runtime</a> and use
+<a href="http://developer.android.com/tools/help/proguard.html">ProGuard</a> to strip out unnecessary
+class references (Proguard only works when building in release mode).
+</p> \ No newline at end of file
diff --git a/docs/html/training/efficient-downloads/redundant_redundant.jd b/docs/html/training/efficient-downloads/redundant_redundant.jd
index 4bf9af9df50d..674298a050e0 100644
--- a/docs/html/training/efficient-downloads/redundant_redundant.jd
+++ b/docs/html/training/efficient-downloads/redundant_redundant.jd
@@ -30,8 +30,8 @@ next.link=connectivity_patterns.html
<p>The most fundamental way to reduce your downloads is to download only what you need. In terms of data, that means implementing REST APIs that allow you to specify query criteria that limit the returned data by using parameters such as the time of your last update.</p>
<p>Similarly, when downloading images, it's good practice to reduce the size of the images server-side, rather than downloading full-sized images that are reduced on the client.</p>
-
-<h2 id="LocalCache">Cache Files Locally</h2>
+
+<h2 id="LocalCache">Cache Files Locally</h2>
<p>Another important technique is to avoid downloading duplicate data. You can do this by aggressive caching. Always cache static resources, including on-demand downloads such as full size images, for as long as reasonably possible. On-demand resources should be stored separately to enable you to regularly flush your on-demand cache to manage its size.</p>
@@ -60,11 +60,11 @@ if (lastModified < lastUpdateTime) {
<p>Alternatively, you can use the managed / secure application cache. Note that this internal cache may be flushed when the system is running low on available storage.</p>
-<pre>Context.getCache();</pre>
+<pre>Context.getCacheDir();</pre>
<p>Files stored in either cache location will be erased when the application is uninstalled.</p>
-<h2 id="ResponseCache">Use the HttpURLConnection Response Cache</h2>
+<h2 id="ResponseCache">Use the HttpURLConnection Response Cache</h2>
<p>Android 4.0 added a response cache to {@code HttpURLConnection}. You can enable HTTP response caching on supported devices using reflection as follows:</p>
diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index 0927ffd548cf..f45c0cb1b724 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -250,11 +250,6 @@ public class Canvas {
public void insertInorderBarrier() {}
/**
- * @hide
- */
- public void initializeLight(float lightX, float lightY, float lightZ, float lightRadius) {}
-
- /**
* Return true if the device that the current layer draws into is opaque
* (i.e. does not support per-pixel alpha).
*
@@ -416,10 +411,10 @@ public class Canvas {
* @return value to pass to restoreToCount() to balance this save()
*/
public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint, @Saveflags int saveFlags) {
- return native_saveLayer(mNativeCanvasWrapper,
- bounds.left, bounds.top, bounds.right, bounds.bottom,
- paint != null ? paint.mNativePaint : 0,
- saveFlags);
+ if (bounds == null) {
+ bounds = new RectF(getClipBounds());
+ }
+ return saveLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, paint, saveFlags);
}
/**
@@ -462,17 +457,17 @@ public class Canvas {
* @param saveFlags see _SAVE_FLAG constants
* @return value to pass to restoreToCount() to balance this call
*/
- public int saveLayerAlpha(@NonNull RectF bounds, int alpha, @Saveflags int saveFlags) {
- alpha = Math.min(255, Math.max(0, alpha));
- return native_saveLayerAlpha(mNativeCanvasWrapper,
- bounds.left, bounds.top, bounds.right, bounds.bottom,
- alpha, saveFlags);
+ public int saveLayerAlpha(@Nullable RectF bounds, int alpha, @Saveflags int saveFlags) {
+ if (bounds == null) {
+ bounds = new RectF(getClipBounds());
+ }
+ return saveLayerAlpha(bounds.left, bounds.top, bounds.right, bounds.bottom, alpha, saveFlags);
}
/**
* Convenience for saveLayerAlpha(bounds, alpha, {@link #ALL_SAVE_FLAG})
*/
- public int saveLayerAlpha(@NonNull RectF bounds, int alpha) {
+ public int saveLayerAlpha(@Nullable RectF bounds, int alpha) {
return saveLayerAlpha(bounds, alpha, ALL_SAVE_FLAG);
}
@@ -481,6 +476,7 @@ public class Canvas {
*/
public int saveLayerAlpha(float left, float top, float right, float bottom, int alpha,
@Saveflags int saveFlags) {
+ alpha = Math.min(255, Math.max(0, alpha));
return native_saveLayerAlpha(mNativeCanvasWrapper, left, top, right, bottom,
alpha, saveFlags);
}
diff --git a/graphics/java/android/graphics/PorterDuffColorFilter.java b/graphics/java/android/graphics/PorterDuffColorFilter.java
index 705f5e6cf5be..ff768b787a52 100644
--- a/graphics/java/android/graphics/PorterDuffColorFilter.java
+++ b/graphics/java/android/graphics/PorterDuffColorFilter.java
@@ -99,5 +99,25 @@ public class PorterDuffColorFilter extends ColorFilter {
native_instance = native_CreatePorterDuffFilter(mColor, mMode.nativeInt);
}
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object == null || getClass() != object.getClass()) {
+ return false;
+ }
+ final PorterDuffColorFilter other = (PorterDuffColorFilter) object;
+ if (mColor != other.mColor || mMode != other.mMode) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 31 * mMode.hashCode() + mColor;
+ }
+
private static native long native_CreatePorterDuffFilter(int srcColor, int porterDuffMode);
}
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
index e5e2f1863988..49e8b9da5f89 100644
--- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
@@ -27,6 +27,7 @@ import android.graphics.ColorFilter;
import android.graphics.Outline;
import android.graphics.PorterDuff;
import android.graphics.Rect;
+import android.util.ArrayMap;
import android.util.AttributeSet;
import android.util.Log;
@@ -131,7 +132,9 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
private static final boolean DBG_ANIMATION_VECTOR_DRAWABLE = false;
- private final AnimatedVectorDrawableState mAnimatedVectorState;
+ private AnimatedVectorDrawableState mAnimatedVectorState;
+
+ private boolean mMutated;
public AnimatedVectorDrawable() {
mAnimatedVectorState = new AnimatedVectorDrawableState(
@@ -140,7 +143,6 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
private AnimatedVectorDrawable(AnimatedVectorDrawableState state, Resources res,
Theme theme) {
- // TODO: Correctly handle the constant state for AVD.
mAnimatedVectorState = new AnimatedVectorDrawableState(state);
if (theme != null && canApplyTheme()) {
applyTheme(theme);
@@ -148,8 +150,17 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
}
@Override
+ public Drawable mutate() {
+ if (!mMutated && super.mutate() == this) {
+ mAnimatedVectorState = new AnimatedVectorDrawableState(mAnimatedVectorState);
+ mMutated = true;
+ }
+ return this;
+ }
+
+ @Override
public ConstantState getConstantState() {
- return null;
+ return mAnimatedVectorState;
}
@Override
@@ -311,14 +322,31 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
int mChangingConfigurations;
VectorDrawable mVectorDrawable;
ArrayList<Animator> mAnimators;
+ ArrayMap<Animator, String> mTargetNameMap;
public AnimatedVectorDrawableState(AnimatedVectorDrawableState copy) {
if (copy != null) {
mChangingConfigurations = copy.mChangingConfigurations;
- // TODO: Make sure the constant state are handled correctly.
- mVectorDrawable = new VectorDrawable();
- mVectorDrawable.setAllowCaching(false);
- mAnimators = new ArrayList<Animator>();
+ if (copy.mVectorDrawable != null) {
+ mVectorDrawable = (VectorDrawable) copy.mVectorDrawable.getConstantState().newDrawable();
+ mVectorDrawable.mutate();
+ mVectorDrawable.setAllowCaching(false);
+ mVectorDrawable.setBounds(copy.mVectorDrawable.getBounds());
+ }
+ if (copy.mAnimators != null) {
+ final int numAnimators = copy.mAnimators.size();
+ mAnimators = new ArrayList<Animator>(numAnimators);
+ mTargetNameMap = new ArrayMap<Animator, String>(numAnimators);
+ for (int i = 0; i < numAnimators; ++i) {
+ Animator anim = copy.mAnimators.get(i);
+ Animator animClone = anim.clone();
+ String targetName = copy.mTargetNameMap.get(anim);
+ Object targetObject = mVectorDrawable.getTargetByName(targetName);
+ animClone.setTarget(targetObject);
+ mAnimators.add(animClone);
+ mTargetNameMap.put(animClone, targetName);
+ }
+ }
}
}
@@ -346,7 +374,12 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
private void setupAnimatorsForTarget(String name, Animator animator) {
Object target = mAnimatedVectorState.mVectorDrawable.getTargetByName(name);
animator.setTarget(target);
+ if (mAnimatedVectorState.mAnimators == null) {
+ mAnimatedVectorState.mAnimators = new ArrayList<Animator>();
+ mAnimatedVectorState.mTargetNameMap = new ArrayMap<Animator, String>();
+ }
mAnimatedVectorState.mAnimators.add(animator);
+ mAnimatedVectorState.mTargetNameMap.put(animator, name);
if (DBG_ANIMATION_VECTOR_DRAWABLE) {
Log.v(LOGTAG, "add animator for target " + name + " " + animator);
}
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index 715da7eb0bf1..cf6be486413b 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -867,7 +867,7 @@ public class BitmapDrawable extends Drawable {
int[] mThemeAttrs = null;
Bitmap mBitmap = null;
ColorStateList mTint = null;
- Mode mTintMode = Mode.SRC_IN;
+ Mode mTintMode = DEFAULT_TINT_MODE;
int mGravity = Gravity.FILL;
float mBaseAlpha = 1.0f;
Shader.TileMode mTileModeX = null;
diff --git a/graphics/java/android/graphics/drawable/ColorDrawable.java b/graphics/java/android/graphics/drawable/ColorDrawable.java
index 9e42a89687f8..33225ce36bff 100644
--- a/graphics/java/android/graphics/drawable/ColorDrawable.java
+++ b/graphics/java/android/graphics/drawable/ColorDrawable.java
@@ -261,8 +261,8 @@ public class ColorDrawable extends Drawable {
@ViewDebug.ExportedProperty
int mUseColor; // basecolor modulated by setAlpha()
int mChangingConfigurations;
- ColorStateList mTint;
- Mode mTintMode;
+ ColorStateList mTint = null;
+ Mode mTintMode = DEFAULT_TINT_MODE;
ColorState() {
// Empty constructor.
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 3cb5210874fb..43a9eaa17add 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -125,6 +125,8 @@ import java.util.Arrays;
public abstract class Drawable {
private static final Rect ZERO_BOUNDS_RECT = new Rect();
+ static final PorterDuff.Mode DEFAULT_TINT_MODE = PorterDuff.Mode.SRC_IN;
+
private int[] mStateSet = StateSet.WILD_CARD;
private int mLevel = 0;
private int mChangingConfigurations = 0;
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index 2c8611e794f6..cd6297b5284f 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -825,7 +825,7 @@ public class GradientDrawable extends Drawable {
@Override
public int getOpacity() {
- return (mAlpha == 255 && mGradientState.mOpaqueOverBounds) ?
+ return (mAlpha == 255 && mGradientState.mOpaqueOverBounds && isOpaqueForState()) ?
PixelFormat.OPAQUE : PixelFormat.TRANSLUCENT;
}
@@ -1414,12 +1414,25 @@ public class GradientDrawable extends Drawable {
return mGradientState;
}
+ private boolean isOpaqueForState() {
+ if (mGradientState.mStrokeWidth >= 0 && mStrokePaint != null
+ && !isOpaque(mStrokePaint.getColor())) {
+ return false;
+ }
+
+ if (!isOpaque(mFillPaint.getColor())) {
+ return false;
+ }
+
+ return true;
+ }
+
@Override
public void getOutline(Outline outline) {
final GradientState st = mGradientState;
final Rect bounds = getBounds();
// only report non-zero alpha if shape being drawn is opaque
- outline.setAlpha(st.mOpaqueOverShape ? (mAlpha / 255.0f) : 0.0f);
+ outline.setAlpha(st.mOpaqueOverShape && isOpaqueForState() ? (mAlpha / 255.0f) : 0.0f);
switch (st.mShape) {
case RECTANGLE:
@@ -1552,6 +1565,7 @@ public class GradientDrawable extends Drawable {
mUseLevel = state.mUseLevel;
mUseLevelForShape = state.mUseLevelForShape;
mOpaqueOverBounds = state.mOpaqueOverBounds;
+ mOpaqueOverShape = state.mOpaqueOverShape;
mThemeAttrs = state.mThemeAttrs;
mAttrSize = state.mAttrSize;
mAttrGradient = state.mAttrGradient;
@@ -1616,19 +1630,6 @@ public class GradientDrawable extends Drawable {
mOpaqueOverBounds = false;
mOpaqueOverShape = false;
- // First test opacity of all colors
- if (mStrokeWidth > 0) {
- if (mStrokeColorStateList != null) {
- if (!mStrokeColorStateList.isOpaque()) {
- return;
- }
- }
- }
-
- if (mColorStateList != null && !mColorStateList.isOpaque()) {
- return;
- }
-
if (mColors != null) {
for (int i = 0; i < mColors.length; i++) {
if (!isOpaque(mColors[i])) {
@@ -1637,6 +1638,11 @@ public class GradientDrawable extends Drawable {
}
}
+ // An unfilled shape is not opaque over bounds or shape
+ if (mColors == null && mColorStateList == null) {
+ return;
+ }
+
// Colors are opaque, so opaqueOverShape=true,
mOpaqueOverShape = true;
// and opaqueOverBounds=true if shape fills bounds
@@ -1645,10 +1651,6 @@ public class GradientDrawable extends Drawable {
&& mRadiusArray == null;
}
- private static boolean isOpaque(int color) {
- return ((color >> 24) & 0xff) == 0xff;
- }
-
public void setStroke(
int width, ColorStateList colorStateList, float dashWidth, float dashGap) {
mStrokeWidth = width;
@@ -1684,6 +1686,10 @@ public class GradientDrawable extends Drawable {
}
}
+ static boolean isOpaque(int color) {
+ return ((color >> 24) & 0xff) == 0xff;
+ }
+
/**
* Creates a new themed GradientDrawable based on the specified constant state.
* <p>
diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
index c185a9ee498a..6c62ccf59b7e 100644
--- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java
+++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
@@ -585,7 +585,7 @@ public class NinePatchDrawable extends Drawable {
int[] mThemeAttrs = null;
NinePatch mNinePatch = null;
ColorStateList mTint = null;
- Mode mTintMode = Mode.SRC_IN;
+ Mode mTintMode = DEFAULT_TINT_MODE;
Rect mPadding = null;
Insets mOpticalInsets = Insets.NONE;
float mBaseAlpha = 1.0f;
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java
index b05fb6130757..b13669b13816 100644
--- a/graphics/java/android/graphics/drawable/RippleDrawable.java
+++ b/graphics/java/android/graphics/drawable/RippleDrawable.java
@@ -156,6 +156,13 @@ public class RippleDrawable extends LayerDrawable {
private boolean mOverrideBounds;
/**
+ * Whether the next draw MUST draw something to canvas. Used to work around
+ * a bug in hardware invalidation following a render thread-accelerated
+ * animation.
+ */
+ private boolean mNeedsDraw;
+
+ /**
* Constructor used for drawable inflation.
*/
RippleDrawable() {
@@ -204,6 +211,8 @@ public class RippleDrawable extends LayerDrawable {
}
cancelExitingRipples();
+
+ mNeedsDraw = true;
invalidateSelf();
}
@@ -548,6 +557,8 @@ public class RippleDrawable extends LayerDrawable {
}
cancelExitingRipples();
+
+ mNeedsDraw = true;
invalidateSelf();
}
@@ -642,11 +653,12 @@ public class RippleDrawable extends LayerDrawable {
canvas.restoreToCount(rippleLayer);
}
- // If we failed to draw anything, at least draw a color so that
- // invalidation works correctly.
- if (contentLayer < 0 && backgroundLayer < 0 && rippleLayer < 0) {
+ // If we failed to draw anything and we just canceled animations, at
+ // least draw a color so that hardware invalidation works correctly.
+ if (contentLayer < 0 && backgroundLayer < 0 && rippleLayer < 0 && mNeedsDraw) {
canvas.drawColor(Color.TRANSPARENT);
}
+ mNeedsDraw = false;
canvas.restoreToCount(saveCount);
}
diff --git a/graphics/java/android/graphics/drawable/ShapeDrawable.java b/graphics/java/android/graphics/drawable/ShapeDrawable.java
index 6f18635ffb01..bd69d76867b5 100644
--- a/graphics/java/android/graphics/drawable/ShapeDrawable.java
+++ b/graphics/java/android/graphics/drawable/ShapeDrawable.java
@@ -515,8 +515,8 @@ public class ShapeDrawable extends Drawable {
int mChangingConfigurations;
Paint mPaint;
Shape mShape;
- ColorStateList mTint;
- Mode mTintMode = Mode.SRC_IN;
+ ColorStateList mTint = null;
+ Mode mTintMode = DEFAULT_TINT_MODE;
Rect mPadding;
int mIntrinsicWidth;
int mIntrinsicHeight;
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index a07ccc42bc85..bb6b1c9946e8 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -42,7 +42,6 @@ import com.android.internal.R;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlPullParserFactory;
import java.io.IOException;
import java.util.ArrayList;
@@ -104,8 +103,6 @@ import java.util.Stack;
* <dt><code>android:translateY</code></dt>
* <dd>The amount of translation on the Y coordinate.
* This is defined in the viewport space.</dd>
- * <dt><code>android:alpha</code></dt>
- * <dd>The amount of transparency.</dd>
* </dl></dd>
* </dl>
*
@@ -124,6 +121,10 @@ import java.util.Stack;
* <dd>Defines the color to draw the path outline (none if not present).</dd>
* <dt><code>android:strokeWidth</code></dt>
* <dd>The width a path stroke.</dd>
+ * <dt><code>android:strokeAlpha</code></dt>
+ * <dd>The opacity of a path stroke.</dd>
+ * <dt><code>android:fillAlpha</code></dt>
+ * <dd>The opacity to fill the path with.</dd>
* <dt><code>android:trimPathStart</code></dt>
* <dd>The fraction of the path to trim from the start, in the range from 0 to 1.</dd>
* <dt><code>android:trimPathEnd</code></dt>
@@ -193,6 +194,7 @@ public class VectorDrawable extends Drawable {
private VectorDrawableState mVectorState;
private PorterDuffColorFilter mTintFilter;
+ private ColorFilter mColorFilter;
private boolean mMutated;
@@ -214,7 +216,6 @@ public class VectorDrawable extends Drawable {
}
mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode);
- mVectorState.mVPathRenderer.setColorFilter(mTintFilter);
}
@Override
@@ -253,22 +254,27 @@ public class VectorDrawable extends Drawable {
canvas.scale(-1.0f, 1.0f);
}
+ // Color filters always override tint filters.
+ final ColorFilter colorFilter = mColorFilter == null ? mTintFilter : mColorFilter;
+
if (!mAllowCaching) {
- mVectorState.mVPathRenderer.draw(canvas, bounds.width(), bounds.height());
+ // AnimatedVectorDrawable
+ if (!mVectorState.hasTranslucentRoot()) {
+ mVectorState.mVPathRenderer.draw(
+ canvas, bounds.width(), bounds.height(), colorFilter);
+ } else {
+ mVectorState.createCachedBitmapIfNeeded(bounds);
+ mVectorState.updateCachedBitmap(bounds);
+ mVectorState.drawCachedBitmapWithRootAlpha(canvas, colorFilter);
+ }
} else {
- Bitmap bitmap = mVectorState.mCachedBitmap;
- if (bitmap == null || !mVectorState.canReuseCache(bounds.width(),
- bounds.height())) {
- bitmap = Bitmap.createBitmap(bounds.width(), bounds.height(),
- Bitmap.Config.ARGB_8888);
- Canvas tmpCanvas = new Canvas(bitmap);
- mVectorState.mVPathRenderer.draw(tmpCanvas, bounds.width(), bounds.height());
- mVectorState.mCachedBitmap = bitmap;
-
+ // Static Vector Drawable case.
+ mVectorState.createCachedBitmapIfNeeded(bounds);
+ if (!mVectorState.canReuseCache()) {
+ mVectorState.updateCachedBitmap(bounds);
mVectorState.updateCacheStates();
}
- // The bitmap's size is the same as the bounds.
- canvas.drawBitmap(bitmap, 0, 0, null);
+ mVectorState.drawCachedBitmapWithRootAlpha(canvas, colorFilter);
}
canvas.restoreToCount(saveCount);
@@ -289,18 +295,7 @@ public class VectorDrawable extends Drawable {
@Override
public void setColorFilter(ColorFilter colorFilter) {
- final VectorDrawableState state = mVectorState;
- if (colorFilter != null) {
- // Color filter overrides tint.
- mTintFilter = null;
- } else if (state.mTint != null && state.mTintMode != null) {
- // Restore the tint filter, if we need one.
- final int color = state.mTint.getColorForState(getState(), Color.TRANSPARENT);
- mTintFilter = new PorterDuffColorFilter(color, state.mTintMode);
- colorFilter = mTintFilter;
- }
-
- state.mVPathRenderer.setColorFilter(colorFilter);
+ mColorFilter = colorFilter;
invalidateSelf();
}
@@ -310,7 +305,6 @@ public class VectorDrawable extends Drawable {
if (state.mTint != tint) {
state.mTint = tint;
mTintFilter = updateTintFilter(mTintFilter, tint, state.mTintMode);
- state.mVPathRenderer.setColorFilter(mTintFilter);
invalidateSelf();
}
}
@@ -321,17 +315,22 @@ public class VectorDrawable extends Drawable {
if (state.mTintMode != tintMode) {
state.mTintMode = tintMode;
mTintFilter = updateTintFilter(mTintFilter, state.mTint, tintMode);
- state.mVPathRenderer.setColorFilter(mTintFilter);
invalidateSelf();
}
}
@Override
+ public boolean isStateful() {
+ return super.isStateful() || (mVectorState != null && mVectorState.mTint != null
+ && mVectorState.mTint.isStateful());
+ }
+
+ @Override
protected boolean onStateChange(int[] stateSet) {
final VectorDrawableState state = mVectorState;
if (state.mTint != null && state.mTintMode != null) {
mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode);
- mVectorState.mVPathRenderer.setColorFilter(mTintFilter);
+ invalidateSelf();
return true;
}
return false;
@@ -362,6 +361,20 @@ public class VectorDrawable extends Drawable {
super.applyTheme(t);
final VectorDrawableState state = mVectorState;
+ if (state != null && state.mThemeAttrs != null) {
+ final TypedArray a = t.resolveAttributes(state.mThemeAttrs, R.styleable.VectorDrawable);
+ try {
+ state.mCacheDirty = true;
+ updateStateFromTypedArray(a);
+ } catch (XmlPullParserException e) {
+ throw new RuntimeException(e);
+ } finally {
+ a.recycle();
+ }
+
+ mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode);
+ }
+
final VPathRenderer path = state.mVPathRenderer;
if (path != null && path.canApplyTheme()) {
path.applyTheme(t);
@@ -431,7 +444,7 @@ public class VectorDrawable extends Drawable {
final VPathRenderer pathRenderer = new VPathRenderer();
state.mVPathRenderer = pathRenderer;
- TypedArray a = obtainAttributes(res, theme, attrs, R.styleable.VectorDrawable);
+ final TypedArray a = obtainAttributes(res, theme, attrs, R.styleable.VectorDrawable);
updateStateFromTypedArray(a);
a.recycle();
@@ -439,7 +452,6 @@ public class VectorDrawable extends Drawable {
inflateInternal(res, parser, attrs, theme);
mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode);
- state.mVPathRenderer.setColorFilter(mTintFilter);
}
private void updateStateFromTypedArray(TypedArray a) throws XmlPullParserException {
@@ -490,6 +502,15 @@ public class VectorDrawable extends Drawable {
throw new XmlPullParserException(a.getPositionDescription() +
"<vector> tag requires height > 0");
}
+
+ final float alphaInFloat = a.getFloat(R.styleable.VectorDrawable_alpha,
+ pathRenderer.getAlpha());
+ pathRenderer.setAlpha(alphaInFloat);
+
+ pathRenderer.mRootName = a.getString(R.styleable.VectorDrawable_name);
+ if (pathRenderer.mRootName != null) {
+ pathRenderer.mVGTargetsMap.put(pathRenderer.mRootName, pathRenderer);
+ }
}
private void inflateInternal(Resources res, XmlPullParser parser, AttributeSet attrs,
@@ -611,8 +632,8 @@ public class VectorDrawable extends Drawable {
int[] mThemeAttrs;
int mChangingConfigurations;
VPathRenderer mVPathRenderer;
- ColorStateList mTint;
- Mode mTintMode;
+ ColorStateList mTint = null;
+ Mode mTintMode = DEFAULT_TINT_MODE;
boolean mAutoMirrored;
Bitmap mCachedBitmap;
@@ -623,27 +644,83 @@ public class VectorDrawable extends Drawable {
boolean mCachedAutoMirrored;
boolean mCacheDirty;
+ /** Temporary paint object used to draw cached bitmaps. */
+ Paint mTempPaint;
+
// Deep copy for mutate() or implicitly mutate.
public VectorDrawableState(VectorDrawableState copy) {
if (copy != null) {
mThemeAttrs = copy.mThemeAttrs;
mChangingConfigurations = copy.mChangingConfigurations;
mVPathRenderer = new VPathRenderer(copy.mVPathRenderer);
+ if (copy.mVPathRenderer.mFillPaint != null) {
+ mVPathRenderer.mFillPaint = new Paint(copy.mVPathRenderer.mFillPaint);
+ }
+ if (copy.mVPathRenderer.mStrokePaint != null) {
+ mVPathRenderer.mStrokePaint = new Paint(copy.mVPathRenderer.mStrokePaint);
+ }
mTint = copy.mTint;
mTintMode = copy.mTintMode;
mAutoMirrored = copy.mAutoMirrored;
}
}
- public boolean canReuseCache(int width, int height) {
+ public void drawCachedBitmapWithRootAlpha(Canvas canvas, ColorFilter filter) {
+ // The bitmap's size is the same as the bounds.
+ final Paint p = getPaint(filter);
+ canvas.drawBitmap(mCachedBitmap, 0, 0, p);
+ }
+
+ public boolean hasTranslucentRoot() {
+ return mVPathRenderer.getRootAlpha() < 255;
+ }
+
+ /**
+ * @return null when there is no need for alpha paint.
+ */
+ public Paint getPaint(ColorFilter filter) {
+ if (!hasTranslucentRoot() && filter == null) {
+ return null;
+ }
+
+ if (mTempPaint == null) {
+ mTempPaint = new Paint();
+ }
+ mTempPaint.setAlpha(mVPathRenderer.getRootAlpha());
+ mTempPaint.setColorFilter(filter);
+ return mTempPaint;
+ }
+
+ public void updateCachedBitmap(Rect bounds) {
+ mCachedBitmap.eraseColor(Color.TRANSPARENT);
+ Canvas tmpCanvas = new Canvas(mCachedBitmap);
+ mVPathRenderer.draw(tmpCanvas, bounds.width(), bounds.height(), null);
+ }
+
+ public void createCachedBitmapIfNeeded(Rect bounds) {
+ if (mCachedBitmap == null || !canReuseBitmap(bounds.width(),
+ bounds.height())) {
+ mCachedBitmap = Bitmap.createBitmap(bounds.width(), bounds.height(),
+ Bitmap.Config.ARGB_8888);
+ }
+
+ }
+
+ public boolean canReuseBitmap(int width, int height) {
+ if (width == mCachedBitmap.getWidth()
+ && height == mCachedBitmap.getHeight()) {
+ return true;
+ }
+ return false;
+ }
+
+ public boolean canReuseCache() {
if (!mCacheDirty
&& mCachedThemeAttrs == mThemeAttrs
&& mCachedTint == mTint
&& mCachedTintMode == mTintMode
&& mCachedAutoMirrored == mAutoMirrored
- && width == mCachedBitmap.getWidth()
- && height == mCachedBitmap.getHeight()
- && mCachedRootAlpha == mVPathRenderer.getRootAlpha()) {
+ && mCachedRootAlpha == mVPathRenderer.getRootAlpha()) {
return true;
}
return false;
@@ -660,6 +737,12 @@ public class VectorDrawable extends Drawable {
mCacheDirty = false;
}
+ @Override
+ public boolean canApplyTheme() {
+ return super.canApplyTheme() || mThemeAttrs != null
+ || (mVPathRenderer != null && mVPathRenderer.canApplyTheme());
+ }
+
public VectorDrawableState() {
mVPathRenderer = new VPathRenderer();
}
@@ -700,14 +783,13 @@ public class VectorDrawable extends Drawable {
*/
// Variables that only used temporarily inside the draw() call, so there
// is no need for deep copying.
- private final Path mPath = new Path();
- private final Path mRenderPath = new Path();
+ private final Path mPath;
+ private final Path mRenderPath;
private static final Matrix IDENTITY_MATRIX = new Matrix();
private final Matrix mFinalPathMatrix = new Matrix();
private Paint mStrokePaint;
private Paint mFillPaint;
- private ColorFilter mColorFilter;
private PathMeasure mPathMeasure;
/////////////////////////////////////////////////////
@@ -718,12 +800,15 @@ public class VectorDrawable extends Drawable {
float mBaseHeight = 0;
float mViewportWidth = 0;
float mViewportHeight = 0;
- private int mRootAlpha = 0xFF;
+ int mRootAlpha = 0xFF;
+ String mRootName = null;
final ArrayMap<String, Object> mVGTargetsMap = new ArrayMap<String, Object>();
public VPathRenderer() {
mRootGroup = new VGroup();
+ mPath = new Path();
+ mRenderPath = new Path();
}
public void setRootAlpha(int alpha) {
@@ -734,14 +819,31 @@ public class VectorDrawable extends Drawable {
return mRootAlpha;
}
+ // setAlpha() and getAlpha() are used mostly for animation purpose, since
+ // Animator like to use alpha from 0 to 1.
+ public void setAlpha(float alpha) {
+ setRootAlpha((int) (alpha * 255));
+ }
+
+ @SuppressWarnings("unused")
+ public float getAlpha() {
+ return getRootAlpha() / 255.0f;
+ }
+
public VPathRenderer(VPathRenderer copy) {
mRootGroup = new VGroup(copy.mRootGroup, mVGTargetsMap);
+ mPath = new Path(copy.mPath);
+ mRenderPath = new Path(copy.mRenderPath);
mBaseWidth = copy.mBaseWidth;
mBaseHeight = copy.mBaseHeight;
mViewportWidth = copy.mViewportWidth;
mViewportHeight = copy.mViewportHeight;
mChangingConfigurations = copy.mChangingConfigurations;
mRootAlpha = copy.mRootAlpha;
+ mRootName = copy.mRootName;
+ if (copy.mRootName != null) {
+ mVGTargetsMap.put(copy.mRootName, this);
+ }
}
public boolean canApplyTheme() {
@@ -798,21 +900,8 @@ public class VectorDrawable extends Drawable {
}
}
- public void setColorFilter(ColorFilter colorFilter) {
- mColorFilter = colorFilter;
-
- if (mFillPaint != null) {
- mFillPaint.setColorFilter(colorFilter);
- }
-
- if (mStrokePaint != null) {
- mStrokePaint.setColorFilter(colorFilter);
- }
-
- }
-
private void drawGroupTree(VGroup currentGroup, Matrix currentMatrix,
- float currentAlpha, Canvas canvas, int w, int h) {
+ Canvas canvas, int w, int h, ColorFilter filter) {
// Calculate current group's matrix by preConcat the parent's and
// and the current one on the top of the stack.
// Basically the Mfinal = Mviewport * M0 * M1 * M2;
@@ -821,31 +910,28 @@ public class VectorDrawable extends Drawable {
currentGroup.mStackedMatrix.preConcat(currentGroup.mLocalMatrix);
- float stackedAlpha = currentAlpha * currentGroup.mGroupAlpha;
-
// Draw the group tree in the same order as the XML file.
for (int i = 0; i < currentGroup.mChildren.size(); i++) {
Object child = currentGroup.mChildren.get(i);
if (child instanceof VGroup) {
VGroup childGroup = (VGroup) child;
drawGroupTree(childGroup, currentGroup.mStackedMatrix,
- stackedAlpha, canvas, w, h);
+ canvas, w, h, filter);
} else if (child instanceof VPath) {
VPath childPath = (VPath) child;
- drawPath(currentGroup, childPath, stackedAlpha, canvas, w, h);
+ drawPath(currentGroup, childPath, canvas, w, h, filter);
}
}
}
- public void draw(Canvas canvas, int w, int h) {
+ public void draw(Canvas canvas, int w, int h, ColorFilter filter) {
// Travese the tree in pre-order to draw.
- drawGroupTree(mRootGroup, IDENTITY_MATRIX, ((float) mRootAlpha) / 0xFF,
- canvas, w, h);
+ drawGroupTree(mRootGroup, IDENTITY_MATRIX, canvas, w, h, filter);
}
- private void drawPath(VGroup vGroup, VPath vPath, float stackedAlpha,
- Canvas canvas, int w, int h) {
- final float scaleX = w / mViewportWidth;
+ private void drawPath(VGroup vGroup, VPath vPath, Canvas canvas, int w, int h,
+ ColorFilter filter) {
+ final float scaleX = w / mViewportWidth;
final float scaleY = h / mViewportHeight;
final float minScale = Math.min(scaleX, scaleY);
@@ -888,18 +974,19 @@ public class VectorDrawable extends Drawable {
if (fullPath.mFillColor != Color.TRANSPARENT) {
if (mFillPaint == null) {
mFillPaint = new Paint();
- mFillPaint.setColorFilter(mColorFilter);
mFillPaint.setStyle(Paint.Style.FILL);
mFillPaint.setAntiAlias(true);
}
- mFillPaint.setColor(applyAlpha(fullPath.mFillColor, stackedAlpha));
- canvas.drawPath(mRenderPath, mFillPaint);
+
+ final Paint fillPaint = mFillPaint;
+ fillPaint.setColor(applyAlpha(fullPath.mFillColor, fullPath.mFillAlpha));
+ fillPaint.setColorFilter(filter);
+ canvas.drawPath(mRenderPath, fillPaint);
}
if (fullPath.mStrokeColor != Color.TRANSPARENT) {
if (mStrokePaint == null) {
mStrokePaint = new Paint();
- mStrokePaint.setColorFilter(mColorFilter);
mStrokePaint.setStyle(Paint.Style.STROKE);
mStrokePaint.setAntiAlias(true);
}
@@ -914,8 +1001,8 @@ public class VectorDrawable extends Drawable {
}
strokePaint.setStrokeMiter(fullPath.mStrokeMiterlimit);
-
- strokePaint.setColor(applyAlpha(fullPath.mStrokeColor, stackedAlpha));
+ strokePaint.setColor(applyAlpha(fullPath.mStrokeColor, fullPath.mStrokeAlpha));
+ strokePaint.setColorFilter(filter);
strokePaint.setStrokeWidth(fullPath.mStrokeWidth * minScale);
canvas.drawPath(mRenderPath, strokePaint);
}
@@ -939,7 +1026,6 @@ public class VectorDrawable extends Drawable {
private float mScaleY = 1;
private float mTranslateX = 0;
private float mTranslateY = 0;
- private float mGroupAlpha = 1;
// mLocalMatrix is updated based on the update of transformation information,
// either parsed from the XML or by animation.
@@ -956,7 +1042,6 @@ public class VectorDrawable extends Drawable {
mScaleY = copy.mScaleY;
mTranslateX = copy.mTranslateX;
mTranslateY = copy.mTranslateY;
- mGroupAlpha = copy.mGroupAlpha;
mThemeAttrs = copy.mThemeAttrs;
mGroupName = copy.mGroupName;
mChangingConfigurations = copy.mChangingConfigurations;
@@ -1000,10 +1085,6 @@ public class VectorDrawable extends Drawable {
return mLocalMatrix;
}
- public boolean canApplyTheme() {
- return mThemeAttrs != null;
- }
-
public void inflate(Resources res, AttributeSet attrs, Theme theme) {
final TypedArray a = obtainAttributes(res, theme, attrs,
R.styleable.VectorDrawableGroup);
@@ -1025,7 +1106,6 @@ public class VectorDrawable extends Drawable {
mScaleY = a.getFloat(R.styleable.VectorDrawableGroup_scaleY, mScaleY);
mTranslateX = a.getFloat(R.styleable.VectorDrawableGroup_translateX, mTranslateX);
mTranslateY = a.getFloat(R.styleable.VectorDrawableGroup_translateY, mTranslateY);
- mGroupAlpha = a.getFloat(R.styleable.VectorDrawableGroup_alpha, mGroupAlpha);
final String groupName = a.getString(R.styleable.VectorDrawableGroup_name);
if (groupName != null) {
@@ -1035,13 +1115,16 @@ public class VectorDrawable extends Drawable {
updateLocalMatrix();
}
+ public boolean canApplyTheme() {
+ return mThemeAttrs != null;
+ }
+
public void applyTheme(Theme t) {
if (mThemeAttrs == null) {
return;
}
- final TypedArray a = t.resolveAttributes(mThemeAttrs,
- R.styleable.VectorDrawableGroup);
+ final TypedArray a = t.resolveAttributes(mThemeAttrs, R.styleable.VectorDrawableGroup);
updateStateFromTypedArray(a);
a.recycle();
}
@@ -1147,18 +1230,6 @@ public class VectorDrawable extends Drawable {
updateLocalMatrix();
}
}
-
- @SuppressWarnings("unused")
- public float getAlpha() {
- return mGroupAlpha;
- }
-
- @SuppressWarnings("unused")
- public void setAlpha(float groupAlpha) {
- if (groupAlpha != mGroupAlpha) {
- mGroupAlpha = groupAlpha;
- }
- }
}
/**
@@ -1221,7 +1292,7 @@ public class VectorDrawable extends Drawable {
/**
* Clip path, which only has name and pathData.
*/
- private static class VClipPath extends VPath{
+ private static class VClipPath extends VPath {
public VClipPath() {
// Empty constructor.
}
@@ -1262,8 +1333,11 @@ public class VectorDrawable extends Drawable {
int mStrokeColor = Color.TRANSPARENT;
float mStrokeWidth = 0;
+
int mFillColor = Color.TRANSPARENT;
+ float mStrokeAlpha = 1.0f;
int mFillRule;
+ float mFillAlpha = 1.0f;
float mTrimPathStart = 0;
float mTrimPathEnd = 1;
float mTrimPathOffset = 0;
@@ -1282,8 +1356,10 @@ public class VectorDrawable extends Drawable {
mStrokeColor = copy.mStrokeColor;
mStrokeWidth = copy.mStrokeWidth;
+ mStrokeAlpha = copy.mStrokeAlpha;
mFillColor = copy.mFillColor;
mFillRule = copy.mFillRule;
+ mFillAlpha = copy.mFillAlpha;
mTrimPathStart = copy.mTrimPathStart;
mTrimPathEnd = copy.mTrimPathEnd;
mTrimPathOffset = copy.mTrimPathOffset;
@@ -1344,6 +1420,8 @@ public class VectorDrawable extends Drawable {
mFillColor = a.getColor(R.styleable.VectorDrawablePath_fillColor,
mFillColor);
+ mFillAlpha = a.getFloat(R.styleable.VectorDrawablePath_fillAlpha,
+ mFillAlpha);
mStrokeLineCap = getStrokeLineCap(a.getInt(
R.styleable.VectorDrawablePath_strokeLineCap, -1), mStrokeLineCap);
mStrokeLineJoin = getStrokeLineJoin(a.getInt(
@@ -1352,6 +1430,8 @@ public class VectorDrawable extends Drawable {
R.styleable.VectorDrawablePath_strokeMiterLimit, mStrokeMiterlimit);
mStrokeColor = a.getColor(R.styleable.VectorDrawablePath_strokeColor,
mStrokeColor);
+ mStrokeAlpha = a.getFloat(R.styleable.VectorDrawablePath_strokeAlpha,
+ mStrokeAlpha);
mStrokeWidth = a.getFloat(R.styleable.VectorDrawablePath_strokeWidth,
mStrokeWidth);
mTrimPathEnd = a.getFloat(R.styleable.VectorDrawablePath_trimPathEnd,
@@ -1368,8 +1448,7 @@ public class VectorDrawable extends Drawable {
return;
}
- final TypedArray a = t.resolveAttributes(mThemeAttrs,
- R.styleable.VectorDrawablePath);
+ final TypedArray a = t.resolveAttributes(mThemeAttrs, R.styleable.VectorDrawablePath);
updateStateFromTypedArray(a);
a.recycle();
}
@@ -1396,6 +1475,16 @@ public class VectorDrawable extends Drawable {
}
@SuppressWarnings("unused")
+ float getstrokeAlpha() {
+ return mStrokeAlpha;
+ }
+
+ @SuppressWarnings("unused")
+ void setstrokeAlpha(float strokeAlpha) {
+ mStrokeAlpha = strokeAlpha;
+ }
+
+ @SuppressWarnings("unused")
int getFill() {
return mFillColor;
}
@@ -1406,6 +1495,16 @@ public class VectorDrawable extends Drawable {
}
@SuppressWarnings("unused")
+ float getfillAlpha() {
+ return mFillAlpha;
+ }
+
+ @SuppressWarnings("unused")
+ void setfillAlpha(float fillAlpha) {
+ mFillAlpha = fillAlpha;
+ }
+
+ @SuppressWarnings("unused")
float getTrimPathStart() {
return mTrimPathStart;
}
diff --git a/include/android_runtime/AndroidRuntime.h b/include/android_runtime/AndroidRuntime.h
index 51e47e6e24d8..f3cfd97d58ee 100644
--- a/include/android_runtime/AndroidRuntime.h
+++ b/include/android_runtime/AndroidRuntime.h
@@ -45,6 +45,7 @@ public:
};
void setArgv0(const char* argv0);
+ void addOption(const char* optionString, void* extra_info = NULL);
/**
* Register a set of methods in the specified class.
@@ -63,8 +64,6 @@ public:
*/
static jclass findClass(JNIEnv* env, const char* className);
- int addVmArguments(int argc, const char* const argv[]);
-
void start(const char *classname, const Vector<String8>& options);
void exit(int code);
@@ -116,7 +115,6 @@ public:
private:
static int startReg(JNIEnv* env);
- void addOption(const char* optionString, void* extra_info = NULL);
bool parseRuntimeOption(const char* property,
char* buffer,
const char* runtimeArg,
diff --git a/keystore/java/android/security/IKeyChainService.aidl b/keystore/java/android/security/IKeyChainService.aidl
index a93891a42662..20c94c5946d7 100644
--- a/keystore/java/android/security/IKeyChainService.aidl
+++ b/keystore/java/android/security/IKeyChainService.aidl
@@ -31,6 +31,9 @@ interface IKeyChainService {
// APIs used by CertInstaller
void installCaCertificate(in byte[] caCertificate);
+ // APIs used by DevicePolicyManager
+ boolean installKeyPair(in byte[] privateKey, in byte[] userCert, String alias);
+
// APIs used by Settings
boolean deleteCaCertificate(String alias);
boolean reset();
diff --git a/libs/hwui/AmbientShadow.cpp b/libs/hwui/AmbientShadow.cpp
index 4873479fdf17..cb3a002b07d5 100644
--- a/libs/hwui/AmbientShadow.cpp
+++ b/libs/hwui/AmbientShadow.cpp
@@ -91,36 +91,13 @@ inline float getTransformedAlphaFromFactoredZ(float factoredZ) {
return getTransformedAlphaFromAlpha(getAlphaFromFactoredZ(factoredZ));
}
-inline int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
- float divisor) {
- // When there is no distance difference, there is no need for extra vertices.
- if (vector1.lengthSquared() == 0 || vector2.lengthSquared() == 0) {
- return 0;
- }
- // The formula is :
- // extraNumber = floor(acos(dot(n1, n2)) / (M_PI / EXTRA_VERTEX_PER_PI))
- // The value ranges for each step are:
- // dot( ) --- [-1, 1]
- // acos( ) --- [0, M_PI]
- // floor(...) --- [0, EXTRA_VERTEX_PER_PI]
- float dotProduct = vector1.dot(vector2);
- // TODO: Use look up table for the dotProduct to extraVerticesNumber
- // computation, if needed.
- float angle = acosf(dotProduct);
- return (int) floor(angle / divisor);
-}
-
-inline void checkOverflow(int used, int total, const char* bufferName) {
- LOG_ALWAYS_FATAL_IF(used > total, "Error: %s overflow!!! used %d, total %d",
- bufferName, used, total);
-}
-
inline int getEdgeExtraAndUpdateSpike(Vector2* currentSpike,
const Vector3& secondVertex, const Vector3& centroid) {
Vector2 secondSpike = {secondVertex.x - centroid.x, secondVertex.y - centroid.y};
secondSpike.normalize();
- int result = getExtraVertexNumber(secondSpike, *currentSpike, EDGE_RADIANS_DIVISOR);
+ int result = ShadowTessellator::getExtraVertexNumber(secondSpike, *currentSpike,
+ EDGE_RADIANS_DIVISOR);
*currentSpike = secondSpike;
return result;
}
@@ -231,8 +208,8 @@ void AmbientShadow::createAmbientShadow(bool isCasterOpaque,
Vector2 currentNormal = getNormalFromVertices(casterVertices, i,
(i + 1) % casterVertexCount);
- int extraVerticesNumber = getExtraVertexNumber(currentNormal, previousNormal,
- CORNER_RADIANS_DIVISOR);
+ int extraVerticesNumber = ShadowTessellator::getExtraVertexNumber(currentNormal,
+ previousNormal, CORNER_RADIANS_DIVISOR);
float expansionDist = innerVertex.z * heightFactor * geomFactor;
const int cornerSlicesNumber = extraVerticesNumber + 1; // Minimal as 1.
@@ -349,9 +326,9 @@ void AmbientShadow::createAmbientShadow(bool isCasterOpaque,
shadowVertexBuffer.updateVertexCount(vertexBufferIndex);
shadowVertexBuffer.updateIndexCount(indexBufferIndex);
- checkOverflow(vertexBufferIndex, totalVertexCount, "Vertex Buffer");
- checkOverflow(indexBufferIndex, totalIndexCount, "Index Buffer");
- checkOverflow(umbraIndex, totalUmbraCount, "Umbra Buffer");
+ ShadowTessellator::checkOverflow(vertexBufferIndex, totalVertexCount, "Vertex Buffer");
+ ShadowTessellator::checkOverflow(indexBufferIndex, totalIndexCount, "Index Buffer");
+ ShadowTessellator::checkOverflow(umbraIndex, totalUmbraCount, "Umbra Buffer");
#if DEBUG_SHADOW
for (int i = 0; i < vertexBufferIndex; i++) {
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index 4f3a57377b26..8bf2107b70bb 100644
--- a/libs/hwui/Animator.cpp
+++ b/libs/hwui/Animator.cpp
@@ -41,7 +41,8 @@ BaseRenderNodeAnimator::BaseRenderNodeAnimator(float finalValue)
, mHasStartValue(false)
, mStartTime(0)
, mDuration(300)
- , mStartDelay(0) {
+ , mStartDelay(0)
+ , mMayRunAsync(true) {
}
BaseRenderNodeAnimator::~BaseRenderNodeAnimator() {
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index f853d1faedea..9b0025f3b846 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -342,6 +342,7 @@ void Caches::clearGarbage() {
void Caches::deleteLayerDeferred(Layer* layer) {
Mutex::Autolock _l(mGarbageLock);
+ layer->state = Layer::kState_InGarbageList;
mLayerGarbage.push(layer);
}
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 91c4aee98d0d..b5089aa79ff3 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -30,7 +30,8 @@ namespace android {
namespace uirenderer {
Layer::Layer(Type layerType, RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight)
- : caches(Caches::getInstance())
+ : state(kState_Uncached)
+ , caches(Caches::getInstance())
, renderState(renderState)
, texture(caches)
, type(layerType) {
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 36a4ed11d2e8..a8e1c2671064 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -59,6 +59,17 @@ public:
kType_DisplayList,
};
+ // layer lifecycle, controlled from outside
+ enum State {
+ kState_Uncached = 0,
+ kState_InCache = 1,
+ kState_FailedToCache = 2,
+ kState_RemovedFromCache = 3,
+ kState_DeletedFromCache = 4,
+ kState_InGarbageList = 5,
+ };
+ State state; // public for logging/debugging purposes
+
Layer(Type type, RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight);
~Layer();
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp
index d49daf61bb8a..833f64bc96e7 100644
--- a/libs/hwui/LayerCache.cpp
+++ b/libs/hwui/LayerCache.cpp
@@ -83,6 +83,7 @@ void LayerCache::deleteLayer(Layer* layer) {
LAYER_LOGD("Destroying layer %dx%d, fbo %d", layer->getWidth(), layer->getHeight(),
layer->getFbo());
mSize -= layer->getWidth() * layer->getHeight() * 4;
+ layer->state = Layer::kState_DeletedFromCache;
Caches::getInstance().resourceCache.decrementRefcount(layer);
}
}
@@ -106,6 +107,7 @@ Layer* LayerCache::get(RenderState& renderState, const uint32_t width, const uin
mCache.removeAt(index);
layer = entry.mLayer;
+ layer->state = Layer::kState_RemovedFromCache;
mSize -= layer->getWidth() * layer->getHeight() * 4;
LAYER_LOGD("Reusing layer %dx%d", layer->getWidth(), layer->getHeight());
@@ -166,8 +168,11 @@ bool LayerCache::put(Layer* layer) {
mCache.add(entry);
mSize += size;
+ layer->state = Layer::kState_InCache;
return true;
}
+
+ layer->state = Layer::kState_FailedToCache;
return false;
}
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index dbd273d037d2..0415efa854bb 100755
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -54,10 +54,6 @@
namespace android {
namespace uirenderer {
-///////////////////////////////////////////////////////////////////////////////
-// Defines
-///////////////////////////////////////////////////////////////////////////////
-
static GLenum getFilter(const SkPaint* paint) {
if (!paint || paint->getFilterLevel() != SkPaint::kNone_FilterLevel) {
return GL_LINEAR;
@@ -1748,10 +1744,13 @@ void OpenGLRenderer::setupDrawProgram() {
glUniform4f(mCaches.currentProgram->getUniform("roundRectInnerRectLTRB"),
innerRect.left, innerRect.top,
innerRect.right, innerRect.bottom);
- glUniform1f(mCaches.currentProgram->getUniform("roundRectRadius"),
- state->radius);
glUniformMatrix4fv(mCaches.currentProgram->getUniform("roundRectInvTransform"),
1, GL_FALSE, &state->matrix.data[0]);
+
+ // add half pixel to round out integer rect space to cover pixel centers
+ float roundedOutRadius = state->radius + 0.5f;
+ glUniform1f(mCaches.currentProgram->getUniform("roundRectRadius"),
+ roundedOutRadius);
}
}
@@ -3044,21 +3043,35 @@ void OpenGLRenderer::resetPaintFilter() {
}
void OpenGLRenderer::setupPaintFilter(int clearBits, int setBits) {
+ // TODO: don't bother with boolean, it's redundant with clear/set bits
mDrawModifiers.mHasDrawFilter = true;
mDrawModifiers.mPaintFilterClearBits = clearBits & SkPaint::kAllFlags;
mDrawModifiers.mPaintFilterSetBits = setBits & SkPaint::kAllFlags;
}
const SkPaint* OpenGLRenderer::filterPaint(const SkPaint* paint) {
+ // TODO: use CompatFlagsDrawFilter here, and combine logic with android/graphics/DrawFilter.cpp
+ // to avoid clobbering 0x02 paint flag
+
+ // Equivalent to the Java Paint's FILTER_BITMAP_FLAG.
+ static const uint32_t sFilterBitmapFlag = 0x02;
+
if (CC_LIKELY(!mDrawModifiers.mHasDrawFilter || !paint)) {
return paint;
}
- uint32_t flags = paint->getFlags();
+ const uint32_t clearBits = mDrawModifiers.mPaintFilterClearBits;
+ const uint32_t setBits = mDrawModifiers.mPaintFilterSetBits;
+ const uint32_t flags = (paint->getFlags() & ~clearBits) | setBits;
mFilteredPaint = *paint;
- mFilteredPaint.setFlags((flags & ~mDrawModifiers.mPaintFilterClearBits) |
- mDrawModifiers.mPaintFilterSetBits);
+ mFilteredPaint.setFlags(flags);
+
+ // check if paint filter trying to override bitmap filter
+ if ((clearBits | setBits) & sFilterBitmapFlag) {
+ mFilteredPaint.setFilterLevel(flags & sFilterBitmapFlag
+ ? SkPaint::kLow_FilterLevel : SkPaint::kNone_FilterLevel);
+ }
return &mFilteredPaint;
}
diff --git a/libs/hwui/RenderState.cpp b/libs/hwui/RenderState.cpp
index ec8307f28d5b..86bd7dd00ccd 100644
--- a/libs/hwui/RenderState.cpp
+++ b/libs/hwui/RenderState.cpp
@@ -38,14 +38,18 @@ void RenderState::onGLContextCreated() {
}
void RenderState::onGLContextDestroyed() {
+/*
AutoMutex _lock(mLayerLock);
- if (CC_UNLIKELY(!mActiveLayers.empty())) {
+ size_t size = mActiveLayers.size();
+ if (CC_UNLIKELY(size != 0)) {
+ ALOGE("Crashing, have %d contexts and %d layers at context destruction. isempty %d",
+ mRegisteredContexts.size(), size, mActiveLayers.empty());
mCaches->dumpMemoryUsage();
for (std::set<renderthread::CanvasContext*>::iterator cit = mRegisteredContexts.begin();
cit != mRegisteredContexts.end(); cit++) {
renderthread::CanvasContext* context = *cit;
- ALOGD("Context: %p (root = %p)", context, context->mRootRenderNode.get());
- ALOGD(" Prefeteched layers: %zu", context->mPrefetechedLayers.size());
+ ALOGE("Context: %p (root = %p)", context, context->mRootRenderNode.get());
+ ALOGE(" Prefeteched layers: %zu", context->mPrefetechedLayers.size());
for (std::set<RenderNode*>::iterator pit = context->mPrefetechedLayers.begin();
pit != context->mPrefetechedLayers.end(); pit++) {
(*pit)->debugDumpLayers(" ");
@@ -53,14 +57,19 @@ void RenderState::onGLContextDestroyed() {
context->mRootRenderNode->debugDumpLayers(" ");
}
+
+ if (mActiveLayers.begin() == mActiveLayers.end()) {
+ ALOGE("set has become empty. wat.");
+ }
for (std::set<const Layer*>::iterator lit = mActiveLayers.begin();
lit != mActiveLayers.end(); lit++) {
const Layer* layer = *(lit);
- ALOGD("Layer %p, fbo %d, buildlayered %d",
- layer, layer->getFbo(), layer->wasBuildLayered);
+ ALOGE("Layer %p, state %d, texlayer %d, fbo %d, buildlayered %d",
+ layer, layer->state, layer->isTextureLayer(), layer->getFbo(), layer->wasBuildLayered);
}
- LOG_ALWAYS_FATAL("layers have survived gl context destruction");
+ LOG_ALWAYS_FATAL("%d layers have survived gl context destruction", size);
}
+*/
}
void RenderState::setViewport(GLsizei width, GLsizei height) {
diff --git a/libs/hwui/RenderState.h b/libs/hwui/RenderState.h
index 74bafcaeb420..cbe7cfc3db4e 100644
--- a/libs/hwui/RenderState.h
+++ b/libs/hwui/RenderState.h
@@ -53,12 +53,16 @@ public:
void debugOverdraw(bool enable, bool clear);
void registerLayer(const Layer* layer) {
+ /*
AutoMutex _lock(mLayerLock);
mActiveLayers.insert(layer);
+ */
}
void unregisterLayer(const Layer* layer) {
+ /*
AutoMutex _lock(mLayerLock);
mActiveLayers.erase(layer);
+ */
}
void registerCanvasContext(renderthread::CanvasContext* context) {
diff --git a/libs/hwui/ShadowTessellator.cpp b/libs/hwui/ShadowTessellator.cpp
index 6cff8155dcfd..35cc7a4fd69d 100644
--- a/libs/hwui/ShadowTessellator.cpp
+++ b/libs/hwui/ShadowTessellator.cpp
@@ -37,7 +37,7 @@ void ShadowTessellator::tessellateAmbientShadow(bool isCasterOpaque,
// A bunch of parameters to tweak the shadow.
// TODO: Allow some of these changable by debug settings or APIs.
- float heightFactor = 1.0f / 128;
+ float heightFactor = 1.0f / 86;
const float geomFactor = 64;
Caches& caches = Caches::getInstance();
@@ -252,5 +252,29 @@ void ShadowTessellator::reverseVertexArray(Vertex* polygon, int len) {
}
}
+int ShadowTessellator::getExtraVertexNumber(const Vector2& vector1,
+ const Vector2& vector2, float divisor) {
+ // When there is no distance difference, there is no need for extra vertices.
+ if (vector1.lengthSquared() == 0 || vector2.lengthSquared() == 0) {
+ return 0;
+ }
+ // The formula is :
+ // extraNumber = floor(acos(dot(n1, n2)) / (M_PI / EXTRA_VERTEX_PER_PI))
+ // The value ranges for each step are:
+ // dot( ) --- [-1, 1]
+ // acos( ) --- [0, M_PI]
+ // floor(...) --- [0, EXTRA_VERTEX_PER_PI]
+ float dotProduct = vector1.dot(vector2);
+ // TODO: Use look up table for the dotProduct to extraVerticesNumber
+ // computation, if needed.
+ float angle = acosf(dotProduct);
+ return (int) floor(angle / divisor);
+}
+
+void ShadowTessellator::checkOverflow(int used, int total, const char* bufferName) {
+ LOG_ALWAYS_FATAL_IF(used > total, "Error: %s overflow!!! used %d, total %d",
+ bufferName, used, total);
+}
+
}; // namespace uirenderer
}; // namespace android
diff --git a/libs/hwui/ShadowTessellator.h b/libs/hwui/ShadowTessellator.h
index 141dff65239a..8f19b5c481c7 100644
--- a/libs/hwui/ShadowTessellator.h
+++ b/libs/hwui/ShadowTessellator.h
@@ -101,6 +101,10 @@ public:
*/
static void reverseVertexArray(Vertex* polygon, int len);
+ static int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
+ float divisor);
+
+ static void checkOverflow(int used, int total, const char* bufferName);
}; // ShadowTessellator
}; // namespace uirenderer
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
index 2178cc7a5567..dbedf94a1a83 100644
--- a/libs/hwui/SpotShadow.cpp
+++ b/libs/hwui/SpotShadow.cpp
@@ -16,10 +16,34 @@
#define LOG_TAG "OpenGLRenderer"
-#define SHADOW_SHRINK_SCALE 0.1f
+// The highest z value can't be higher than (CASTER_Z_CAP_RATIO * light.z)
#define CASTER_Z_CAP_RATIO 0.95f
-#define FAKE_UMBRA_SIZE_RATIO 0.01f
-#define OCLLUDED_UMBRA_SHRINK_FACTOR 0.95f
+
+// When there is no umbra, then just fake the umbra using
+// centroid * (1 - FAKE_UMBRA_SIZE_RATIO) + outline * FAKE_UMBRA_SIZE_RATIO
+#define FAKE_UMBRA_SIZE_RATIO 0.05f
+
+// When the polygon is about 90 vertices, the penumbra + umbra can reach 270 rays.
+// That is consider pretty fine tessllated polygon so far.
+// This is just to prevent using too much some memory when edge slicing is not
+// needed any more.
+#define FINE_TESSELLATED_POLYGON_RAY_NUMBER 270
+/**
+ * Extra vertices for the corner for smoother corner.
+ * Only for outer loop.
+ * Note that we use such extra memory to avoid an extra loop.
+ */
+// For half circle, we could add EXTRA_VERTEX_PER_PI vertices.
+// Set to 1 if we don't want to have any.
+#define SPOT_EXTRA_CORNER_VERTEX_PER_PI 18
+
+// For the whole polygon, the sum of all the deltas b/t normals is 2 * M_PI,
+// therefore, the maximum number of extra vertices will be twice bigger.
+#define SPOT_MAX_EXTRA_CORNER_VERTEX_NUMBER (2 * SPOT_EXTRA_CORNER_VERTEX_PER_PI)
+
+// For each RADIANS_DIVISOR, we would allocate one more vertex b/t the normals.
+#define SPOT_CORNER_RADIANS_DIVISOR (M_PI / SPOT_EXTRA_CORNER_VERTEX_PER_PI)
+
#include <math.h>
#include <stdlib.h>
@@ -51,6 +75,24 @@ struct OutlineData {
};
/**
+ * For each vertex, we need to keep track of its angle, whether it is penumbra or
+ * umbra, and its corresponding vertex index.
+ */
+struct SpotShadow::VertexAngleData {
+ // The angle to the vertex from the centroid.
+ float mAngle;
+ // True is the vertex comes from penumbra, otherwise it comes from umbra.
+ bool mIsPenumbra;
+ // The index of the vertex described by this data.
+ int mVertexIndex;
+ void set(float angle, bool isPenumbra, int index) {
+ mAngle = angle;
+ mIsPenumbra = isPenumbra;
+ mVertexIndex = index;
+ }
+};
+
+/**
* Calculate the angle between and x and a y coordinate.
* The atan2 range from -PI to PI.
*/
@@ -407,8 +449,8 @@ bool SpotShadow::testPointInsidePolygon(const Vector2 testPoint,
double endX = poly[i].x;
double endY = poly[i].y;
- if (((endY > testy) != (startY > testy)) &&
- (testx < (startX - endX) * (testy - endY)
+ if (((endY > testy) != (startY > testy))
+ && (testx < (startX - endX) * (testy - endY)
/ (startY - endY) + endX)) {
c = !c;
}
@@ -508,138 +550,14 @@ void SpotShadow::computeLightPolygon(int points, const Vector3& lightCenter,
}
/**
-* Generate the shadow from a spot light.
-*
-* @param poly x,y,z vertexes of a convex polygon that occludes the light source
-* @param polyLength number of vertexes of the occluding polygon
-* @param lightCenter the center of the light
-* @param lightSize the radius of the light source
-* @param lightVertexCount the vertex counter for the light polygon
-* @param shadowTriangleStrip return an (x,y,alpha) triangle strip representing the shadow. Return
-* empty strip if error.
-*
-*/
-
-void SpotShadow::createSpotShadow_old(bool isCasterOpaque, const Vector3* poly,
- int polyLength, const Vector3& lightCenter, float lightSize,
- int lightVertexCount, VertexBuffer& retStrips) {
- Vector3 light[lightVertexCount * 3];
- computeLightPolygon(lightVertexCount, lightCenter, lightSize, light);
- computeSpotShadow_old(isCasterOpaque, light, lightVertexCount, lightCenter, poly,
- polyLength, retStrips);
-}
-
-/**
- * Generate the shadow spot light of shape lightPoly and a object poly
+ * From light center, project one vertex to the z=0 surface and get the outline.
*
- * @param lightPoly x,y,z vertex of a convex polygon that is the light source
- * @param lightPolyLength number of vertexes of the light source polygon
- * @param poly x,y,z vertexes of a convex polygon that occludes the light source
- * @param polyLength number of vertexes of the occluding polygon
- * @param shadowTriangleStrip return an (x,y,alpha) triangle strip representing the shadow. Return
- * empty strip if error.
+ * @param outline The result which is the outline position.
+ * @param lightCenter The center of light.
+ * @param polyVertex The input polygon's vertex.
+ *
+ * @return float The ratio of (polygon.z / light.z - polygon.z)
*/
-void SpotShadow::computeSpotShadow_old(bool isCasterOpaque, const Vector3* lightPoly,
- int lightPolyLength, const Vector3& lightCenter, const Vector3* poly, int polyLength,
- VertexBuffer& shadowTriangleStrip) {
- // Point clouds for all the shadowed vertices
- Vector2 shadowRegion[lightPolyLength * polyLength];
- // Shadow polygon from one point light.
- Vector2 outline[polyLength];
- Vector2 umbraMem[polyLength * lightPolyLength];
- Vector2* umbra = umbraMem;
-
- int umbraLength = 0;
-
- // Validate input, receiver is always at z = 0 plane.
- bool inputPolyPositionValid = true;
- for (int i = 0; i < polyLength; i++) {
- if (poly[i].z >= lightPoly[0].z) {
- inputPolyPositionValid = false;
- ALOGW("polygon above the light");
- break;
- }
- }
-
- // If the caster's position is invalid, don't draw anything.
- if (!inputPolyPositionValid) {
- return;
- }
-
- // Calculate the umbra polygon based on intersections of all outlines
- int k = 0;
- for (int j = 0; j < lightPolyLength; j++) {
- int m = 0;
- for (int i = 0; i < polyLength; i++) {
- // After validating the input, deltaZ is guaranteed to be positive.
- float deltaZ = lightPoly[j].z - poly[i].z;
- float ratioZ = lightPoly[j].z / deltaZ;
- float x = lightPoly[j].x - ratioZ * (lightPoly[j].x - poly[i].x);
- float y = lightPoly[j].y - ratioZ * (lightPoly[j].y - poly[i].y);
-
- Vector2 newPoint = {x, y};
- shadowRegion[k] = newPoint;
- outline[m] = newPoint;
-
- k++;
- m++;
- }
-
- // For the first light polygon's vertex, use the outline as the umbra.
- // Later on, use the intersection of the outline and existing umbra.
- if (umbraLength == 0) {
- for (int i = 0; i < polyLength; i++) {
- umbra[i] = outline[i];
- }
- umbraLength = polyLength;
- } else {
- int col = ((j * 255) / lightPolyLength);
- umbraLength = intersection(outline, polyLength, umbra, umbraLength);
- if (umbraLength == 0) {
- break;
- }
- }
- }
-
- // Generate the penumbra area using the hull of all shadow regions.
- int shadowRegionLength = k;
- Vector2 penumbra[k];
- int penumbraLength = hull(shadowRegion, shadowRegionLength, penumbra);
-
- Vector2 fakeUmbra[polyLength];
- if (umbraLength < 3) {
- // If there is no real umbra, make a fake one.
- for (int i = 0; i < polyLength; i++) {
- float deltaZ = lightCenter.z - poly[i].z;
- float ratioZ = lightCenter.z / deltaZ;
- float x = lightCenter.x - ratioZ * (lightCenter.x - poly[i].x);
- float y = lightCenter.y - ratioZ * (lightCenter.y - poly[i].y);
-
- fakeUmbra[i].x = x;
- fakeUmbra[i].y = y;
- }
-
- // Shrink the centroid's shadow by 10%.
- // TODO: Study the magic number of 10%.
- Vector2 shadowCentroid =
- ShadowTessellator::centroid2d(fakeUmbra, polyLength);
- for (int i = 0; i < polyLength; i++) {
- fakeUmbra[i] = shadowCentroid * (1.0f - SHADOW_SHRINK_SCALE) +
- fakeUmbra[i] * SHADOW_SHRINK_SCALE;
- }
-#if DEBUG_SHADOW
- ALOGD("No real umbra make a fake one, centroid2d = %f , %f",
- shadowCentroid.x, shadowCentroid.y);
-#endif
- // Set the fake umbra, whose size is the same as the original polygon.
- umbra = fakeUmbra;
- umbraLength = polyLength;
- }
-
- generateTriangleStrip(isCasterOpaque, 1.0, penumbra, penumbraLength, umbra,
- umbraLength, poly, polyLength, shadowTriangleStrip);
-}
-
float SpotShadow::projectCasterToOutline(Vector2& outline,
const Vector3& lightCenter, const Vector3& polyVertex) {
float lightToPolyZ = lightCenter.z - polyVertex.z;
@@ -673,6 +591,12 @@ void SpotShadow::createSpotShadow(bool isCasterOpaque, const Vector3& lightCente
ALOGW("Relative Light Z is not positive. No spot shadow!");
return;
}
+ if (CC_UNLIKELY(polyLength < 3)) {
+#if DEBUG_SHADOW
+ ALOGW("Invalid polygon length. No spot shadow!");
+#endif
+ return;
+ }
OutlineData outlineData[polyLength];
Vector2 outlineCentroid;
// Calculate the projected outline for each polygon's vertices from the light center.
@@ -713,16 +637,20 @@ void SpotShadow::createSpotShadow(bool isCasterOpaque, const Vector3& lightCente
projectCasterToOutline(outlineCentroid, lightCenter, polyCentroid);
int penumbraIndex = 0;
- int penumbraLength = polyLength * 3;
- Vector2 penumbra[penumbraLength];
+ // Then each polygon's vertex produce at minmal 2 penumbra vertices.
+ // Since the size can be dynamic here, we keep track of the size and update
+ // the real size at the end.
+ int allocatedPenumbraLength = 2 * polyLength + SPOT_MAX_EXTRA_CORNER_VERTEX_NUMBER;
+ Vector2 penumbra[allocatedPenumbraLength];
+ int totalExtraCornerSliceNumber = 0;
Vector2 umbra[polyLength];
- float distOutline = 0;
- float ratioVI = 0;
+ // When centroid is covered by all circles from outline, then we consider
+ // the umbra is invalid, and we will tune down the shadow strength.
bool hasValidUmbra = true;
- // We need the maxRatioVI to decrease the spot shadow strength accordingly.
- float maxRaitoVI = 1.0;
+ // We need the minimal of RaitoVI to decrease the spot shadow strength accordingly.
+ float minRaitoVI = FLT_MAX;
for (int i = 0; i < polyLength; i++) {
// Generate all the penumbra's vertices only using the (outline vertex + normal * radius)
@@ -748,21 +676,35 @@ void SpotShadow::createSpotShadow(bool isCasterOpaque, const Vector3& lightCente
// | |
// (V3)-----------------------------------(V2)
int preNormalIndex = (i + polyLength - 1) % polyLength;
- penumbra[penumbraIndex++] = outlineData[i].position +
- outlineData[preNormalIndex].normal * outlineData[i].radius;
- int currentNormalIndex = i;
- // (TODO) Depending on how roundness we want for each corner, we can subdivide
+ const Vector2& previousNormal = outlineData[preNormalIndex].normal;
+ const Vector2& currentNormal = outlineData[i].normal;
+
+ // Depending on how roundness we want for each corner, we can subdivide
// further here and/or introduce some heuristic to decide how much the
// subdivision should be.
- Vector2 avgNormal =
- (outlineData[preNormalIndex].normal + outlineData[currentNormalIndex].normal) / 2;
+ int currentExtraSliceNumber = ShadowTessellator::getExtraVertexNumber(
+ previousNormal, currentNormal, SPOT_CORNER_RADIANS_DIVISOR);
- penumbra[penumbraIndex++] = outlineData[i].position +
- avgNormal * outlineData[i].radius;
+ int currentCornerSliceNumber = 1 + currentExtraSliceNumber;
+ totalExtraCornerSliceNumber += currentExtraSliceNumber;
+#if DEBUG_SHADOW
+ ALOGD("currentExtraSliceNumber should be %d", currentExtraSliceNumber);
+ ALOGD("currentCornerSliceNumber should be %d", currentCornerSliceNumber);
+ ALOGD("totalCornerSliceNumber is %d", totalExtraCornerSliceNumber);
+#endif
+ if (CC_UNLIKELY(totalExtraCornerSliceNumber > SPOT_MAX_EXTRA_CORNER_VERTEX_NUMBER)) {
+ currentCornerSliceNumber = 1;
+ }
+ for (int k = 0; k <= currentCornerSliceNumber; k++) {
+ Vector2 avgNormal =
+ (previousNormal * (currentCornerSliceNumber - k) + currentNormal * k) /
+ currentCornerSliceNumber;
+ avgNormal.normalize();
+ penumbra[penumbraIndex++] = outlineData[i].position +
+ avgNormal * outlineData[i].radius;
+ }
- penumbra[penumbraIndex++] = outlineData[i].position +
- outlineData[currentNormalIndex].normal * outlineData[i].radius;
// Compute the umbra by the intersection from the outline's centroid!
//
@@ -783,53 +725,70 @@ void SpotShadow::createSpotShadow(bool isCasterOpaque, const Vector3& lightCente
// Now, ratioVI = VI / VC, ratioIC = IC / VC
// Then the intersetion point can be computed as Ixy = Vxy * ratioIC + Cxy * ratioVI;
//
- // When one of the outline circle cover the the outline centroid, (like I is
+ // When all of the outline circles cover the the outline centroid, (like I is
// on the other side of C), there is no real umbra any more, so we just fake
// a small area around the centroid as the umbra, and tune down the spot
// shadow's umbra strength to simulate the effect the whole shadow will
// become lighter in this case.
// The ratio can be simulated by using the inverse of maximum of ratioVI for
// all (V).
- distOutline = (outlineData[i].position - outlineCentroid).length();
+ float distOutline = (outlineData[i].position - outlineCentroid).length();
if (CC_UNLIKELY(distOutline == 0)) {
// If the outline has 0 area, then there is no spot shadow anyway.
ALOGW("Outline has 0 area, no spot shadow!");
return;
}
- ratioVI = outlineData[i].radius / distOutline;
- if (ratioVI >= 1.0) {
- maxRaitoVI = ratioVI;
- hasValidUmbra = false;
+
+ float ratioVI = outlineData[i].radius / distOutline;
+ minRaitoVI = MathUtils::min(minRaitoVI, ratioVI);
+ if (ratioVI >= (1 - FAKE_UMBRA_SIZE_RATIO)) {
+ ratioVI = (1 - FAKE_UMBRA_SIZE_RATIO);
}
// When we know we don't have valid umbra, don't bother to compute the
// values below. But we can't skip the loop yet since we want to know the
// maximum ratio.
- if (hasValidUmbra) {
- float ratioIC = (distOutline - outlineData[i].radius) / distOutline;
- umbra[i] = outlineData[i].position * ratioIC + outlineCentroid * ratioVI;
- }
+ float ratioIC = 1 - ratioVI;
+ umbra[i] = outlineData[i].position * ratioIC + outlineCentroid * ratioVI;
}
+ hasValidUmbra = (minRaitoVI <= 1.0);
float shadowStrengthScale = 1.0;
if (!hasValidUmbra) {
+#if DEBUG_SHADOW
ALOGW("The object is too close to the light or too small, no real umbra!");
+#endif
for (int i = 0; i < polyLength; i++) {
umbra[i] = outlineData[i].position * FAKE_UMBRA_SIZE_RATIO +
- outlineCentroid * (1 - FAKE_UMBRA_SIZE_RATIO);
+ outlineCentroid * (1 - FAKE_UMBRA_SIZE_RATIO);
}
- shadowStrengthScale = 1.0 / maxRaitoVI;
+ shadowStrengthScale = 1.0 / minRaitoVI;
}
+ int penumbraLength = penumbraIndex;
+ int umbraLength = polyLength;
+
#if DEBUG_SHADOW
+ ALOGD("penumbraLength is %d , allocatedPenumbraLength %d", penumbraLength, allocatedPenumbraLength);
dumpPolygon(poly, polyLength, "input poly");
- dumpPolygon(outline, polyLength, "outline");
dumpPolygon(penumbra, penumbraLength, "penumbra");
- dumpPolygon(umbra, polyLength, "umbra");
+ dumpPolygon(umbra, umbraLength, "umbra");
ALOGD("hasValidUmbra is %d and shadowStrengthScale is %f", hasValidUmbra, shadowStrengthScale);
#endif
- generateTriangleStrip(isCasterOpaque, shadowStrengthScale, penumbra,
- penumbraLength, umbra, polyLength, poly, polyLength, shadowTriangleStrip);
+ // The penumbra and umbra needs to be in convex shape to keep consistency
+ // and quality.
+ // Since we are still shooting rays to penumbra, it needs to be convex.
+ // Umbra can be represented as a fan from the centroid, but visually umbra
+ // looks nicer when it is convex.
+ Vector2 finalUmbra[umbraLength];
+ Vector2 finalPenumbra[penumbraLength];
+ int finalUmbraLength = hull(umbra, umbraLength, finalUmbra);
+ int finalPenumbraLength = hull(penumbra, penumbraLength, finalPenumbra);
+
+ generateTriangleStrip(isCasterOpaque, shadowStrengthScale, finalPenumbra,
+ finalPenumbraLength, finalUmbra, finalUmbraLength, poly, polyLength,
+ shadowTriangleStrip, outlineCentroid);
+
}
/**
@@ -891,7 +850,7 @@ bool convertPolyToRayDist(const Vector2* poly, int polyLength, const Vector2& po
lastVertex = &poly[polyIndex];
}
- return true;
+ return true;
}
int SpotShadow::calculateOccludedUmbra(const Vector2* umbra, int umbraLength,
@@ -910,129 +869,676 @@ int SpotShadow::calculateOccludedUmbra(const Vector2* umbra, int umbraLength,
}
/**
- * Generate a triangle strip given two convex polygons
+ * This is only for experimental purpose.
+ * After intersections are calculated, we could smooth the polygon if needed.
+ * So far, we don't think it is more appealing yet.
*
- * @param penumbra The outer polygon x,y vertexes
- * @param penumbraLength The number of vertexes in the outer polygon
- * @param umbra The inner outer polygon x,y vertexes
- * @param umbraLength The number of vertexes in the inner polygon
- * @param shadowTriangleStrip return an (x,y,alpha) triangle strip representing the shadow. Return
- * empty strip if error.
-**/
-void SpotShadow::generateTriangleStrip(bool isCasterOpaque, float shadowStrengthScale,
- const Vector2* penumbra, int penumbraLength, const Vector2* umbra, int umbraLength,
- const Vector3* poly, int polyLength, VertexBuffer& shadowTriangleStrip) {
- const int rays = SHADOW_RAY_COUNT;
- const int size = 2 * rays;
- const float step = M_PI * 2 / rays;
- // Centroid of the umbra.
- Vector2 centroid = ShadowTessellator::centroid2d(umbra, umbraLength);
+ * @param level The level of smoothness.
+ * @param rays The total number of rays.
+ * @param rayDist (In and Out) The distance for each ray.
+ *
+ */
+void SpotShadow::smoothPolygon(int level, int rays, float* rayDist) {
+ for (int k = 0; k < level; k++) {
+ for (int i = 0; i < rays; i++) {
+ float p1 = rayDist[(rays - 1 + i) % rays];
+ float p2 = rayDist[i];
+ float p3 = rayDist[(i + 1) % rays];
+ rayDist[i] = (p1 + p2 * 2 + p3) / 4;
+ }
+ }
+}
+
+/**
+ * Generate a array of the angleData for either umbra or penumbra vertices.
+ *
+ * This array will be merged and used to guide where to shoot the rays, in clockwise order.
+ *
+ * @param angleDataList The result array of angle data.
+ *
+ * @return int The maximum angle's index in the array.
+ */
+int SpotShadow::setupAngleList(VertexAngleData* angleDataList,
+ int polyLength, const Vector2* polygon, const Vector2& centroid,
+ bool isPenumbra, const char* name) {
+ float maxAngle = FLT_MIN;
+ int maxAngleIndex = 0;
+ for (int i = 0; i < polyLength; i++) {
+ float currentAngle = angle(polygon[i], centroid);
+ if (currentAngle > maxAngle) {
+ maxAngle = currentAngle;
+ maxAngleIndex = i;
+ }
+ angleDataList[i].set(currentAngle, isPenumbra, i);
#if DEBUG_SHADOW
- ALOGD("centroid2d = %f , %f", centroid.x, centroid.y);
+ ALOGD("%s AngleList i %d %f", name, i, currentAngle);
#endif
- // Intersection to the penumbra.
- float penumbraDistPerRay[rays];
- // Intersection to the umbra.
- float umbraDistPerRay[rays];
- // Intersection to the occluded umbra area.
- float occludedUmbraDistPerRay[rays];
+ }
+ return maxAngleIndex;
+}
- // convert CW polygons to ray distance encoding, aborting on conversion failure
- if (!convertPolyToRayDist(umbra, umbraLength, centroid, umbraDistPerRay)) return;
- if (!convertPolyToRayDist(penumbra, penumbraLength, centroid, penumbraDistPerRay)) return;
+/**
+ * Make sure the polygons are indeed in clockwise order.
+ *
+ * Possible reasons to return false: 1. The input polygon is not setup properly. 2. The hull
+ * algorithm is not able to generate it properly.
+ *
+ * Anyway, since the algorithm depends on the clockwise, when these kind of unexpected error
+ * situation is found, we need to detect it and early return without corrupting the memory.
+ *
+ * @return bool True if the angle list is actually from big to small.
+ */
+bool SpotShadow::checkClockwise(int indexOfMaxAngle, int listLength, VertexAngleData* angleList,
+ const char* name) {
+ int currentIndex = indexOfMaxAngle;
+#if DEBUG_SHADOW
+ ALOGD("max index %d", currentIndex);
+#endif
+ for (int i = 0; i < listLength - 1; i++) {
+ // TODO: Cache the last angle.
+ float currentAngle = angleList[currentIndex].mAngle;
+ float nextAngle = angleList[(currentIndex + 1) % listLength].mAngle;
+ if (currentAngle < nextAngle) {
+#if DEBUG_SHADOW
+ ALOGE("%s, is not CW, at index %d", name, currentIndex);
+#endif
+ return false;
+ }
+ currentIndex = (currentIndex + 1) % listLength;
+ }
+ return true;
+}
- bool hasOccludedUmbraArea = false;
- if (isCasterOpaque) {
- Vector2 occludedUmbra[polyLength + umbraLength];
- int occludedUmbraLength = calculateOccludedUmbra(umbra, umbraLength, poly, polyLength,
- occludedUmbra);
- // Make sure the centroid is inside the umbra, otherwise, fall back to the
- // approach as if there is no occluded umbra area.
- if (testPointInsidePolygon(centroid, occludedUmbra, occludedUmbraLength)) {
- hasOccludedUmbraArea = true;
- // Shrink the occluded umbra area to avoid pixel level artifacts.
- for (int i = 0; i < occludedUmbraLength; i ++) {
- occludedUmbra[i] = centroid + (occludedUmbra[i] - centroid) *
- OCLLUDED_UMBRA_SHRINK_FACTOR;
+/**
+ * Check the polygon is clockwise.
+ *
+ * @return bool True is the polygon is clockwise.
+ */
+bool SpotShadow::checkPolyClockwise(int polyAngleLength, int maxPolyAngleIndex,
+ const float* polyAngleList) {
+ bool isPolyCW = true;
+ // Starting from maxPolyAngleIndex , check around to make sure angle decrease.
+ for (int i = 0; i < polyAngleLength - 1; i++) {
+ float currentAngle = polyAngleList[(i + maxPolyAngleIndex) % polyAngleLength];
+ float nextAngle = polyAngleList[(i + maxPolyAngleIndex + 1) % polyAngleLength];
+ if (currentAngle < nextAngle) {
+ isPolyCW = false;
+ }
+ }
+ return isPolyCW;
+}
+
+/**
+ * Given the sorted array of all the vertices angle data, calculate for each
+ * vertices, the offset value to array element which represent the start edge
+ * of the polygon we need to shoot the ray at.
+ *
+ * TODO: Calculate this for umbra and penumbra in one loop using one single array.
+ *
+ * @param distances The result of the array distance counter.
+ */
+void SpotShadow::calculateDistanceCounter(bool needsOffsetToUmbra, int angleLength,
+ const VertexAngleData* allVerticesAngleData, int* distances) {
+
+ bool firstVertexIsPenumbra = allVerticesAngleData[0].mIsPenumbra;
+ // If we want distance to inner, then we just set to 0 when we see inner.
+ bool needsSearch = needsOffsetToUmbra ? firstVertexIsPenumbra : !firstVertexIsPenumbra;
+ int distanceCounter = 0;
+ if (needsSearch) {
+ int foundIndex = -1;
+ for (int i = (angleLength - 1); i >= 0; i--) {
+ bool currentIsOuter = allVerticesAngleData[i].mIsPenumbra;
+ // If we need distance to inner, then we need to find a inner vertex.
+ if (currentIsOuter != firstVertexIsPenumbra) {
+ foundIndex = i;
+ break;
+ }
+ }
+ LOG_ALWAYS_FATAL_IF(foundIndex == -1, "Wrong index found, means either"
+ " umbra or penumbra's length is 0");
+ distanceCounter = angleLength - foundIndex;
+ }
+#if DEBUG_SHADOW
+ ALOGD("distances[0] is %d", distanceCounter);
+#endif
+
+ distances[0] = distanceCounter; // means never see a target poly
+
+ for (int i = 1; i < angleLength; i++) {
+ bool firstVertexIsPenumbra = allVerticesAngleData[i].mIsPenumbra;
+ // When we needs for distance for each outer vertex to inner, then we
+ // increase the distance when seeing outer vertices. Otherwise, we clear
+ // to 0.
+ bool needsIncrement = needsOffsetToUmbra ? firstVertexIsPenumbra : !firstVertexIsPenumbra;
+ // If counter is not -1, that means we have seen an other polygon's vertex.
+ if (needsIncrement && distanceCounter != -1) {
+ distanceCounter++;
+ } else {
+ distanceCounter = 0;
+ }
+ distances[i] = distanceCounter;
+ }
+}
+
+/**
+ * Given umbra and penumbra angle data list, merge them by sorting the angle
+ * from the biggest to smallest.
+ *
+ * @param allVerticesAngleData The result array of merged angle data.
+ */
+void SpotShadow::mergeAngleList(int maxUmbraAngleIndex, int maxPenumbraAngleIndex,
+ const VertexAngleData* umbraAngleList, int umbraLength,
+ const VertexAngleData* penumbraAngleList, int penumbraLength,
+ VertexAngleData* allVerticesAngleData) {
+
+ int totalRayNumber = umbraLength + penumbraLength;
+ int umbraIndex = maxUmbraAngleIndex;
+ int penumbraIndex = maxPenumbraAngleIndex;
+
+ float currentUmbraAngle = umbraAngleList[umbraIndex].mAngle;
+ float currentPenumbraAngle = penumbraAngleList[penumbraIndex].mAngle;
+
+ // TODO: Clean this up using a while loop with 2 iterators.
+ for (int i = 0; i < totalRayNumber; i++) {
+ if (currentUmbraAngle > currentPenumbraAngle) {
+ allVerticesAngleData[i] = umbraAngleList[umbraIndex];
+ umbraIndex = (umbraIndex + 1) % umbraLength;
+
+ // If umbraIndex round back, that means we are running out of
+ // umbra vertices to merge, so just copy all the penumbra leftover.
+ // Otherwise, we update the currentUmbraAngle.
+ if (umbraIndex != maxUmbraAngleIndex) {
+ currentUmbraAngle = umbraAngleList[umbraIndex].mAngle;
+ } else {
+ for (int j = i + 1; j < totalRayNumber; j++) {
+ allVerticesAngleData[j] = penumbraAngleList[penumbraIndex];
+ penumbraIndex = (penumbraIndex + 1) % penumbraLength;
+ }
+ break;
}
- if (!convertPolyToRayDist(occludedUmbra, occludedUmbraLength, centroid,
- occludedUmbraDistPerRay)) {
- return;
+ } else {
+ allVerticesAngleData[i] = penumbraAngleList[penumbraIndex];
+ penumbraIndex = (penumbraIndex + 1) % penumbraLength;
+ // If penumbraIndex round back, that means we are running out of
+ // penumbra vertices to merge, so just copy all the umbra leftover.
+ // Otherwise, we update the currentPenumbraAngle.
+ if (penumbraIndex != maxPenumbraAngleIndex) {
+ currentPenumbraAngle = penumbraAngleList[penumbraIndex].mAngle;
+ } else {
+ for (int j = i + 1; j < totalRayNumber; j++) {
+ allVerticesAngleData[j] = umbraAngleList[umbraIndex];
+ umbraIndex = (umbraIndex + 1) % umbraLength;
+ }
+ break;
}
}
}
- AlphaVertex* shadowVertices =
- shadowTriangleStrip.alloc<AlphaVertex>(SHADOW_VERTEX_COUNT);
-
- // NOTE: Shadow alpha values are transformed when stored in alphavertices,
- // so that they can be consumed directly by gFS_Main_ApplyVertexAlphaShadowInterp
- float transformedMaxAlpha = M_PI * shadowStrengthScale;
-
- // Calculate the vertices (x, y, alpha) in the shadow area.
- AlphaVertex centroidXYA;
- AlphaVertex::set(&centroidXYA, centroid.x, centroid.y, transformedMaxAlpha);
- for (int rayIndex = 0; rayIndex < rays; rayIndex++) {
- float dx = cosf(step * rayIndex);
- float dy = sinf(step * rayIndex);
-
- // penumbra ring
- float penumbraDistance = penumbraDistPerRay[rayIndex];
- AlphaVertex::set(&shadowVertices[rayIndex],
- dx * penumbraDistance + centroid.x,
- dy * penumbraDistance + centroid.y, 0.0f);
-
- // umbra ring
- float umbraDistance = umbraDistPerRay[rayIndex];
- AlphaVertex::set(&shadowVertices[rays + rayIndex],
- dx * umbraDistance + centroid.x,
- dy * umbraDistance + centroid.y,
- transformedMaxAlpha);
-
- // occluded umbra ring
- if (hasOccludedUmbraArea) {
- float occludedUmbraDistance = occludedUmbraDistPerRay[rayIndex];
- AlphaVertex::set(&shadowVertices[2 * rays + rayIndex],
- dx * occludedUmbraDistance + centroid.x,
- dy * occludedUmbraDistance + centroid.y, transformedMaxAlpha);
+}
+
+#if DEBUG_SHADOW
+/**
+ * DEBUG ONLY: Verify all the offset compuation is correctly done by examining
+ * each vertex and its neighbor.
+ */
+static void verifyDistanceCounter(const VertexAngleData* allVerticesAngleData,
+ const int* distances, int angleLength, const char* name) {
+ int currentDistance = distances[0];
+ for (int i = 1; i < angleLength; i++) {
+ if (distances[i] != INT_MIN) {
+ if (!((currentDistance + 1) == distances[i]
+ || distances[i] == 0)) {
+ ALOGE("Wrong distance found at i %d name %s", i, name);
+ }
+ currentDistance = distances[i];
+ if (currentDistance != 0) {
+ bool currentOuter = allVerticesAngleData[i].mIsPenumbra;
+ for (int j = 1; j <= (currentDistance - 1); j++) {
+ bool neigborOuter =
+ allVerticesAngleData[(i + angleLength - j) % angleLength].mIsPenumbra;
+ if (neigborOuter != currentOuter) {
+ ALOGE("Wrong distance found at i %d name %s", i, name);
+ }
+ }
+ bool oppositeOuter =
+ allVerticesAngleData[(i + angleLength - currentDistance) % angleLength].mIsPenumbra;
+ if (oppositeOuter == currentOuter) {
+ ALOGE("Wrong distance found at i %d name %s", i, name);
+ }
+ }
+ }
+ }
+}
+
+/**
+ * DEBUG ONLY: Verify all the angle data compuated are is correctly done
+ */
+static void verifyAngleData(int totalRayNumber, const VertexAngleData* allVerticesAngleData,
+ const int* distancesToInner, const int* distancesToOuter,
+ const VertexAngleData* umbraAngleList, int maxUmbraAngleIndex, int umbraLength,
+ const VertexAngleData* penumbraAngleList, int maxPenumbraAngleIndex,
+ int penumbraLength) {
+ for (int i = 0; i < totalRayNumber; i++) {
+ ALOGD("currentAngleList i %d, angle %f, isInner %d, index %d distancesToInner"
+ " %d distancesToOuter %d", i, allVerticesAngleData[i].mAngle,
+ !allVerticesAngleData[i].mIsPenumbra,
+ allVerticesAngleData[i].mVertexIndex, distancesToInner[i], distancesToOuter[i]);
+ }
+
+ verifyDistanceCounter(allVerticesAngleData, distancesToInner, totalRayNumber, "distancesToInner");
+ verifyDistanceCounter(allVerticesAngleData, distancesToOuter, totalRayNumber, "distancesToOuter");
+
+ for (int i = 0; i < totalRayNumber; i++) {
+ if ((distancesToInner[i] * distancesToOuter[i]) != 0) {
+ ALOGE("distancesToInner wrong at index %d distancesToInner[i] %d,"
+ " distancesToOuter[i] %d", i, distancesToInner[i], distancesToOuter[i]);
+ }
+ }
+ int currentUmbraVertexIndex =
+ umbraAngleList[maxUmbraAngleIndex].mVertexIndex;
+ int currentPenumbraVertexIndex =
+ penumbraAngleList[maxPenumbraAngleIndex].mVertexIndex;
+ for (int i = 0; i < totalRayNumber; i++) {
+ if (allVerticesAngleData[i].mIsPenumbra == true) {
+ if (allVerticesAngleData[i].mVertexIndex != currentPenumbraVertexIndex) {
+ ALOGW("wrong penumbra indexing i %d allVerticesAngleData[i].mVertexIndex %d "
+ "currentpenumbraVertexIndex %d", i,
+ allVerticesAngleData[i].mVertexIndex, currentPenumbraVertexIndex);
+ }
+ currentPenumbraVertexIndex = (currentPenumbraVertexIndex + 1) % penumbraLength;
} else {
- // Put all vertices of the occluded umbra ring at the centroid.
- shadowVertices[2 * rays + rayIndex] = centroidXYA;
+ if (allVerticesAngleData[i].mVertexIndex != currentUmbraVertexIndex) {
+ ALOGW("wrong umbra indexing i %d allVerticesAngleData[i].mVertexIndex %d "
+ "currentUmbraVertexIndex %d", i,
+ allVerticesAngleData[i].mVertexIndex, currentUmbraVertexIndex);
+ }
+ currentUmbraVertexIndex = (currentUmbraVertexIndex + 1) % umbraLength;
+ }
+ }
+ for (int i = 0; i < totalRayNumber - 1; i++) {
+ float currentAngle = allVerticesAngleData[i].mAngle;
+ float nextAngle = allVerticesAngleData[(i + 1) % totalRayNumber].mAngle;
+ if (currentAngle < nextAngle) {
+ ALOGE("Unexpected angle values!, currentAngle nextAngle %f %f", currentAngle, nextAngle);
}
}
- shadowTriangleStrip.setMode(VertexBuffer::kTwoPolyRingShadow);
- shadowTriangleStrip.computeBounds<AlphaVertex>();
}
+#endif
/**
- * This is only for experimental purpose.
- * After intersections are calculated, we could smooth the polygon if needed.
- * So far, we don't think it is more appealing yet.
+ * In order to compute the occluded umbra, we need to setup the angle data list
+ * for the polygon data. Since we only store one poly vertex per polygon vertex,
+ * this array only needs to be a float array which are the angles for each vertex.
*
- * @param level The level of smoothness.
- * @param rays The total number of rays.
- * @param rayDist (In and Out) The distance for each ray.
+ * @param polyAngleList The result list
*
+ * @return int The index for the maximum angle in this array.
*/
-void SpotShadow::smoothPolygon(int level, int rays, float* rayDist) {
- for (int k = 0; k < level; k++) {
- for (int i = 0; i < rays; i++) {
- float p1 = rayDist[(rays - 1 + i) % rays];
- float p2 = rayDist[i];
- float p3 = rayDist[(i + 1) % rays];
- rayDist[i] = (p1 + p2 * 2 + p3) / 4;
+int SpotShadow::setupPolyAngleList(float* polyAngleList, int polyAngleLength,
+ const Vector2* poly2d, const Vector2& centroid) {
+ int maxPolyAngleIndex = -1;
+ float maxPolyAngle = -FLT_MAX;
+ for (int i = 0; i < polyAngleLength; i++) {
+ polyAngleList[i] = angle(poly2d[i], centroid);
+ if (polyAngleList[i] > maxPolyAngle) {
+ maxPolyAngle = polyAngleList[i];
+ maxPolyAngleIndex = i;
+ }
+ }
+ return maxPolyAngleIndex;
+}
+
+/**
+ * For umbra and penumbra, given the offset info and the current ray number,
+ * find the right edge index (the (starting vertex) for the ray to shoot at.
+ *
+ * @return int The index of the starting vertex of the edge.
+ */
+inline int SpotShadow::getEdgeStartIndex(const int* offsets, int rayIndex, int totalRayNumber,
+ const VertexAngleData* allVerticesAngleData) {
+ int tempOffset = offsets[rayIndex];
+ int targetRayIndex = (rayIndex - tempOffset + totalRayNumber) % totalRayNumber;
+ return allVerticesAngleData[targetRayIndex].mVertexIndex;
+}
+
+/**
+ * For the occluded umbra, given the array of angles, find the index of the
+ * starting vertex of the edge, for the ray to shoo at.
+ *
+ * TODO: Save the last result to shorten the search distance.
+ *
+ * @return int The index of the starting vertex of the edge.
+ */
+inline int SpotShadow::getPolyEdgeStartIndex(int maxPolyAngleIndex, int polyLength,
+ const float* polyAngleList, float rayAngle) {
+ int minPolyAngleIndex = (maxPolyAngleIndex + polyLength - 1) % polyLength;
+ int resultIndex = -1;
+ if (rayAngle > polyAngleList[maxPolyAngleIndex]
+ || rayAngle <= polyAngleList[minPolyAngleIndex]) {
+ resultIndex = minPolyAngleIndex;
+ } else {
+ for (int i = 0; i < polyLength - 1; i++) {
+ int currentIndex = (maxPolyAngleIndex + i) % polyLength;
+ int nextIndex = (maxPolyAngleIndex + i + 1) % polyLength;
+ if (rayAngle <= polyAngleList[currentIndex]
+ && rayAngle > polyAngleList[nextIndex]) {
+ resultIndex = currentIndex;
+ }
}
}
+ if (CC_UNLIKELY(resultIndex == -1)) {
+ // TODO: Add more error handling here.
+ ALOGE("Wrong index found, means no edge can't be found for rayAngle %f", rayAngle);
+ }
+ return resultIndex;
}
+/**
+ * Convert the incoming polygons into arrays of vertices, for each ray.
+ * Ray only shoots when there is one vertex either on penumbra on umbra.
+ *
+ * Finally, it will generate vertices per ray for umbra, penumbra and optionally
+ * occludedUmbra.
+ *
+ * Return true (success) when all vertices are generated
+ */
+int SpotShadow::convertPolysToVerticesPerRay(
+ bool hasOccludedUmbraArea, const Vector2* poly2d, int polyLength,
+ const Vector2* umbra, int umbraLength, const Vector2* penumbra,
+ int penumbraLength, const Vector2& centroid,
+ Vector2* umbraVerticesPerRay, Vector2* penumbraVerticesPerRay,
+ Vector2* occludedUmbraVerticesPerRay) {
+ int totalRayNumber = umbraLength + penumbraLength;
+
+ // For incoming umbra / penumbra polygons, we will build an intermediate data
+ // structure to help us sort all the vertices according to the vertices.
+ // Using this data structure, we can tell where (the angle) to shoot the ray,
+ // whether we shoot at penumbra edge or umbra edge, and which edge to shoot at.
+ //
+ // We first parse each vertices and generate a table of VertexAngleData.
+ // Based on that, we create 2 arrays telling us which edge to shoot at.
+ VertexAngleData allVerticesAngleData[totalRayNumber];
+ VertexAngleData umbraAngleList[umbraLength];
+ VertexAngleData penumbraAngleList[penumbraLength];
+
+ int polyAngleLength = hasOccludedUmbraArea ? polyLength : 0;
+ float polyAngleList[polyAngleLength];
+
+ const int maxUmbraAngleIndex =
+ setupAngleList(umbraAngleList, umbraLength, umbra, centroid, false, "umbra");
+ const int maxPenumbraAngleIndex =
+ setupAngleList(penumbraAngleList, penumbraLength, penumbra, centroid, true, "penumbra");
+ const int maxPolyAngleIndex = setupPolyAngleList(polyAngleList, polyAngleLength, poly2d, centroid);
+
+ // Check all the polygons here are CW.
+ bool isPolyCW = checkPolyClockwise(polyAngleLength, maxPolyAngleIndex, polyAngleList);
+ bool isUmbraCW = checkClockwise(maxUmbraAngleIndex, umbraLength,
+ umbraAngleList, "umbra");
+ bool isPenumbraCW = checkClockwise(maxPenumbraAngleIndex, penumbraLength,
+ penumbraAngleList, "penumbra");
+
+ if (!isUmbraCW || !isPenumbraCW || !isPolyCW) {
#if DEBUG_SHADOW
+ ALOGE("One polygon is not CW isUmbraCW %d isPenumbraCW %d isPolyCW %d",
+ isUmbraCW, isPenumbraCW, isPolyCW);
+#endif
+ return false;
+ }
-#define TEST_POINT_NUMBER 128
+ mergeAngleList(maxUmbraAngleIndex, maxPenumbraAngleIndex,
+ umbraAngleList, umbraLength, penumbraAngleList, penumbraLength,
+ allVerticesAngleData);
+
+ // Calculate the offset to the left most Inner vertex for each outerVertex.
+ // Then the offset to the left most Outer vertex for each innerVertex.
+ int offsetToInner[totalRayNumber];
+ int offsetToOuter[totalRayNumber];
+ calculateDistanceCounter(true, totalRayNumber, allVerticesAngleData, offsetToInner);
+ calculateDistanceCounter(false, totalRayNumber, allVerticesAngleData, offsetToOuter);
+
+ // Generate both umbraVerticesPerRay and penumbraVerticesPerRay
+ for (int i = 0; i < totalRayNumber; i++) {
+ float rayAngle = allVerticesAngleData[i].mAngle;
+ bool isUmbraVertex = !allVerticesAngleData[i].mIsPenumbra;
+
+ float dx = cosf(rayAngle);
+ float dy = sinf(rayAngle);
+ float distanceToIntersectUmbra = -1;
+
+ if (isUmbraVertex) {
+ // We can just copy umbra easily, and calculate the distance for the
+ // occluded umbra computation.
+ int startUmbraIndex = allVerticesAngleData[i].mVertexIndex;
+ umbraVerticesPerRay[i] = umbra[startUmbraIndex];
+ if (hasOccludedUmbraArea) {
+ distanceToIntersectUmbra = (umbraVerticesPerRay[i] - centroid).length();
+ }
+
+ //shoot ray to penumbra only
+ int startPenumbraIndex = getEdgeStartIndex(offsetToOuter, i, totalRayNumber,
+ allVerticesAngleData);
+ float distanceToIntersectPenumbra = rayIntersectPoints(centroid, dx, dy,
+ penumbra[startPenumbraIndex],
+ penumbra[(startPenumbraIndex + 1) % penumbraLength]);
+ if (distanceToIntersectPenumbra < 0) {
+#if DEBUG_SHADOW
+ ALOGW("convertPolyToRayDist for penumbra failed rayAngle %f dx %f dy %f",
+ rayAngle, dx, dy);
+#endif
+ distanceToIntersectPenumbra = 0;
+ }
+ penumbraVerticesPerRay[i].x = centroid.x + dx * distanceToIntersectPenumbra;
+ penumbraVerticesPerRay[i].y = centroid.y + dy * distanceToIntersectPenumbra;
+ } else {
+ // We can just copy the penumbra
+ int startPenumbraIndex = allVerticesAngleData[i].mVertexIndex;
+ penumbraVerticesPerRay[i] = penumbra[startPenumbraIndex];
+
+ // And shoot ray to umbra only
+ int startUmbraIndex = getEdgeStartIndex(offsetToInner, i, totalRayNumber,
+ allVerticesAngleData);
+
+ distanceToIntersectUmbra = rayIntersectPoints(centroid, dx, dy,
+ umbra[startUmbraIndex], umbra[(startUmbraIndex + 1) % umbraLength]);
+ if (distanceToIntersectUmbra < 0) {
+#if DEBUG_SHADOW
+ ALOGW("convertPolyToRayDist for umbra failed rayAngle %f dx %f dy %f",
+ rayAngle, dx, dy);
+#endif
+ distanceToIntersectUmbra = 0;
+ }
+ umbraVerticesPerRay[i].x = centroid.x + dx * distanceToIntersectUmbra;
+ umbraVerticesPerRay[i].y = centroid.y + dy * distanceToIntersectUmbra;
+ }
+
+ if (hasOccludedUmbraArea) {
+ // Shoot the same ray to the poly2d, and get the distance.
+ int startPolyIndex = getPolyEdgeStartIndex(maxPolyAngleIndex, polyLength,
+ polyAngleList, rayAngle);
+
+ float distanceToIntersectPoly = rayIntersectPoints(centroid, dx, dy,
+ poly2d[startPolyIndex], poly2d[(startPolyIndex + 1) % polyLength]);
+ if (distanceToIntersectPoly < 0) {
+ distanceToIntersectPoly = 0;
+ }
+ distanceToIntersectPoly = MathUtils::min(distanceToIntersectUmbra, distanceToIntersectPoly);
+ occludedUmbraVerticesPerRay[i].x = centroid.x + dx * distanceToIntersectPoly;
+ occludedUmbraVerticesPerRay[i].y = centroid.y + dy * distanceToIntersectPoly;
+ }
+ }
+
+#if DEBUG_SHADOW
+ verifyAngleData(totalRayNumber, allVerticesAngleData, offsetToInner,
+ offsetToOuter, umbraAngleList, maxUmbraAngleIndex, umbraLength,
+ penumbraAngleList, maxPenumbraAngleIndex, penumbraLength);
+#endif
+ return true; // success
+
+}
+
+/**
+ * Generate a triangle strip given two convex polygon
+**/
+void SpotShadow::generateTriangleStrip(bool isCasterOpaque, float shadowStrengthScale,
+ Vector2* penumbra, int penumbraLength, Vector2* umbra, int umbraLength,
+ const Vector3* poly, int polyLength, VertexBuffer& shadowTriangleStrip,
+ const Vector2& centroid) {
+
+ bool hasOccludedUmbraArea = false;
+ Vector2 poly2d[polyLength];
+ if (isCasterOpaque) {
+ for (int i = 0; i < polyLength; i++) {
+ poly2d[i].x = poly[i].x;
+ poly2d[i].y = poly[i].y;
+ }
+ // Make sure the centroid is inside the umbra, otherwise, fall back to the
+ // approach as if there is no occluded umbra area.
+ if (testPointInsidePolygon(centroid, poly2d, polyLength)) {
+ hasOccludedUmbraArea = true;
+ }
+ }
+
+ int totalRayNum = umbraLength + penumbraLength;
+ Vector2 umbraVertices[totalRayNum];
+ Vector2 penumbraVertices[totalRayNum];
+ Vector2 occludedUmbraVertices[totalRayNum];
+ bool convertSuccess = convertPolysToVerticesPerRay(hasOccludedUmbraArea, poly2d,
+ polyLength, umbra, umbraLength, penumbra, penumbraLength,
+ centroid, umbraVertices, penumbraVertices, occludedUmbraVertices);
+ if (!convertSuccess) {
+ return;
+ }
+
+ // Minimal value is 1, for each vertex show up once.
+ // The bigger this value is , the smoother the look is, but more memory
+ // is consumed.
+ // When the ray number is high, that means the polygon has been fine
+ // tessellated, we don't need this extra slice, just keep it as 1.
+ int sliceNumberPerEdge = (totalRayNum > FINE_TESSELLATED_POLYGON_RAY_NUMBER) ? 1 : 2;
+
+ // For each polygon, we at most add (totalRayNum * sliceNumberPerEdge) vertices.
+ int slicedVertexCountPerPolygon = totalRayNum * sliceNumberPerEdge;
+ int totalVertexCount = slicedVertexCountPerPolygon * 2 + totalRayNum;
+ int totalIndexCount = 2 * (slicedVertexCountPerPolygon * 2 + 2);
+ AlphaVertex* shadowVertices =
+ shadowTriangleStrip.alloc<AlphaVertex>(totalVertexCount);
+ uint16_t* indexBuffer =
+ shadowTriangleStrip.allocIndices<uint16_t>(totalIndexCount);
+
+ int indexBufferIndex = 0;
+ int vertexBufferIndex = 0;
+
+ uint16_t slicedUmbraVertexIndex[totalRayNum * sliceNumberPerEdge];
+ // Should be something like 0 0 0 1 1 1 2 3 3 3...
+ int rayNumberPerSlicedUmbra[totalRayNum * sliceNumberPerEdge];
+ int realUmbraVertexCount = 0;
+ for (int i = 0; i < totalRayNum; i++) {
+ Vector2 currentPenumbra = penumbraVertices[i];
+ Vector2 currentUmbra = umbraVertices[i];
+
+ Vector2 nextPenumbra = penumbraVertices[(i + 1) % totalRayNum];
+ Vector2 nextUmbra = umbraVertices[(i + 1) % totalRayNum];
+ // NextUmbra/Penumbra will be done in the next loop!!
+ for (int weight = 0; weight < sliceNumberPerEdge; weight++) {
+ const Vector2& slicedPenumbra = (currentPenumbra * (sliceNumberPerEdge - weight)
+ + nextPenumbra * weight) / sliceNumberPerEdge;
+
+ const Vector2& slicedUmbra = (currentUmbra * (sliceNumberPerEdge - weight)
+ + nextUmbra * weight) / sliceNumberPerEdge;
+
+ // In the vertex buffer, we fill the Penumbra first, then umbra.
+ indexBuffer[indexBufferIndex++] = vertexBufferIndex;
+ AlphaVertex::set(&shadowVertices[vertexBufferIndex++], slicedPenumbra.x,
+ slicedPenumbra.y, 0.0f);
+
+ // When we add umbra vertex, we need to remember its current ray number.
+ // And its own vertexBufferIndex. This is for occluded umbra usage.
+ indexBuffer[indexBufferIndex++] = vertexBufferIndex;
+ rayNumberPerSlicedUmbra[realUmbraVertexCount] = i;
+ slicedUmbraVertexIndex[realUmbraVertexCount] = vertexBufferIndex;
+ realUmbraVertexCount++;
+ AlphaVertex::set(&shadowVertices[vertexBufferIndex++], slicedUmbra.x,
+ slicedUmbra.y, M_PI);
+ }
+ }
+
+ indexBuffer[indexBufferIndex++] = 0;
+ //RealUmbraVertexIndex[0] must be 1, so we connect back well at the
+ //beginning of occluded area.
+ indexBuffer[indexBufferIndex++] = 1;
+
+ float occludedUmbraAlpha = M_PI;
+ if (hasOccludedUmbraArea) {
+ // Now the occludedUmbra area;
+ int currentRayNumber = -1;
+ int firstOccludedUmbraIndex = -1;
+ for (int i = 0; i < realUmbraVertexCount; i++) {
+ indexBuffer[indexBufferIndex++] = slicedUmbraVertexIndex[i];
+
+ // If the occludedUmbra vertex has not been added yet, then add it.
+ // Otherwise, just use the previously added occludedUmbra vertices.
+ if (rayNumberPerSlicedUmbra[i] != currentRayNumber) {
+ currentRayNumber++;
+ indexBuffer[indexBufferIndex++] = vertexBufferIndex;
+ // We need to remember the begining of the occludedUmbra vertices
+ // to close this loop.
+ if (currentRayNumber == 0) {
+ firstOccludedUmbraIndex = vertexBufferIndex;
+ }
+ AlphaVertex::set(&shadowVertices[vertexBufferIndex++],
+ occludedUmbraVertices[currentRayNumber].x,
+ occludedUmbraVertices[currentRayNumber].y,
+ occludedUmbraAlpha);
+ } else {
+ indexBuffer[indexBufferIndex++] = (vertexBufferIndex - 1);
+ }
+ }
+ // Close the loop here!
+ indexBuffer[indexBufferIndex++] = slicedUmbraVertexIndex[0];
+ indexBuffer[indexBufferIndex++] = firstOccludedUmbraIndex;
+ } else {
+ int lastCentroidIndex = vertexBufferIndex;
+ AlphaVertex::set(&shadowVertices[vertexBufferIndex++], centroid.x,
+ centroid.y, occludedUmbraAlpha);
+ for (int i = 0; i < realUmbraVertexCount; i++) {
+ indexBuffer[indexBufferIndex++] = slicedUmbraVertexIndex[i];
+ indexBuffer[indexBufferIndex++] = lastCentroidIndex;
+ }
+ // Close the loop here!
+ indexBuffer[indexBufferIndex++] = slicedUmbraVertexIndex[0];
+ indexBuffer[indexBufferIndex++] = lastCentroidIndex;
+ }
+
+#if DEBUG_SHADOW
+ ALOGD("allocated IB %d allocated VB is %d", totalIndexCount, totalVertexCount);
+ ALOGD("IB index %d VB index is %d", indexBufferIndex, vertexBufferIndex);
+ for (int i = 0; i < vertexBufferIndex; i++) {
+ ALOGD("vertexBuffer i %d, (%f, %f %f)", i, shadowVertices[i].x, shadowVertices[i].y,
+ shadowVertices[i].alpha);
+ }
+ for (int i = 0; i < indexBufferIndex; i++) {
+ ALOGD("indexBuffer i %d, indexBuffer[i] %d", i, indexBuffer[i]);
+ }
+#endif
+
+ // At the end, update the real index and vertex buffer size.
+ shadowTriangleStrip.updateVertexCount(vertexBufferIndex);
+ shadowTriangleStrip.updateIndexCount(indexBufferIndex);
+ ShadowTessellator::checkOverflow(vertexBufferIndex, totalVertexCount, "Spot Vertex Buffer");
+ ShadowTessellator::checkOverflow(indexBufferIndex, totalIndexCount, "Spot Index Buffer");
+
+ shadowTriangleStrip.setMode(VertexBuffer::kIndices);
+ shadowTriangleStrip.computeBounds<AlphaVertex>();
+}
+
+#if DEBUG_SHADOW
+
+#define TEST_POINT_NUMBER 128
/**
* Calculate the bounds for generating random test points.
*/
void SpotShadow::updateBound(const Vector2 inVector, Vector2& lowerBound,
- Vector2& upperBound ) {
+ Vector2& upperBound) {
if (inVector.x < lowerBound.x) {
lowerBound.x = inVector.x;
}
@@ -1127,14 +1633,14 @@ void SpotShadow::testIntersection(const Vector2* poly1, int poly1Length,
if (!testPointInsidePolygon(testPoint, poly1, poly1Length)) {
dumpPoly = true;
ALOGW("(Error Type 1): one point (%f, %f) in the intersection is"
- " not in the poly1",
+ " not in the poly1",
testPoint.x, testPoint.y);
}
if (!testPointInsidePolygon(testPoint, poly2, poly2Length)) {
dumpPoly = true;
ALOGW("(Error Type 1): one point (%f, %f) in the intersection is"
- " not in the poly2",
+ " not in the poly2",
testPoint.x, testPoint.y);
}
}
diff --git a/libs/hwui/SpotShadow.h b/libs/hwui/SpotShadow.h
index 355be8d8ece1..23fdca9d7fa9 100644
--- a/libs/hwui/SpotShadow.h
+++ b/libs/hwui/SpotShadow.h
@@ -26,22 +26,51 @@ namespace uirenderer {
class SpotShadow {
public:
- static void createSpotShadow_old(bool isCasterOpaque, const Vector3* poly,
- int polyLength, const Vector3& lightCenter, float lightSize,
- int lightVertexCount, VertexBuffer& retStrips);
static void createSpotShadow(bool isCasterOpaque, const Vector3& lightCenter,
float lightSize, const Vector3* poly, int polyLength,
const Vector3& polyCentroid, VertexBuffer& retstrips);
private:
+ struct VertexAngleData;
+
static float projectCasterToOutline(Vector2& outline,
const Vector3& lightCenter, const Vector3& polyVertex);
static int calculateOccludedUmbra(const Vector2* umbra, int umbraLength,
const Vector3* poly, int polyLength, Vector2* occludedUmbra);
- static void computeSpotShadow_old(bool isCasterOpaque, const Vector3* lightPoly,
- int lightPolyLength, const Vector3& lightCenter, const Vector3* poly,
- int polyLength, VertexBuffer& shadowTriangleStrip);
+ static int setupAngleList(VertexAngleData* angleDataList,
+ int polyLength, const Vector2* polygon, const Vector2& centroid,
+ bool isPenumbra, const char* name);
+
+ static int convertPolysToVerticesPerRay(
+ bool hasOccludedUmbraArea, const Vector2* poly2d, int polyLength,
+ const Vector2* umbra, int umbraLength, const Vector2* penumbra,
+ int penumbraLength, const Vector2& centroid,
+ Vector2* umbraVerticesPerRay, Vector2* penumbraVerticesPerRay,
+ Vector2* occludedUmbraVerticesPerRay);
+
+ static bool checkClockwise(int maxIndex, int listLength,
+ VertexAngleData* angleList, const char* name);
+
+ static void calculateDistanceCounter(bool needsOffsetToUmbra, int angleLength,
+ const VertexAngleData* allVerticesAngleData, int* distances);
+
+ static void mergeAngleList(int maxUmbraAngleIndex, int maxPenumbraAngleIndex,
+ const VertexAngleData* umbraAngleList, int umbraLength,
+ const VertexAngleData* penumbraAngleList, int penumbraLength,
+ VertexAngleData* allVerticesAngleData);
+
+ static int setupPolyAngleList(float* polyAngleList, int polyAngleLength,
+ const Vector2* poly2d, const Vector2& centroid);
+
+ static bool checkPolyClockwise(int polyAngleLength, int maxPolyAngleIndex,
+ const float* polyAngleList);
+
+ static int getEdgeStartIndex(const int* offsets, int rayIndex, int totalRayNumber,
+ const VertexAngleData* allVerticesAngleData);
+
+ static int getPolyEdgeStartIndex(int maxPolyAngleIndex, int polyLength,
+ const float* polyAngleList, float rayAngle);
static void computeLightPolygon(int points, const Vector3& lightCenter,
float size, Vector3* ret);
@@ -67,11 +96,10 @@ private:
double x3, double y3, double x4, double y4, Vector2& ret);
static void generateTriangleStrip(bool isCasterOpaque, float shadowStrengthScale,
- const Vector2* penumbra, int penumbraLength, const Vector2* umbra, int umbraLength,
- const Vector3* poly, int polyLength, VertexBuffer& retstrips);
+ Vector2* penumbra, int penumbraLength, Vector2* umbra, int umbraLength,
+ const Vector3* poly, int polyLength, VertexBuffer& retstrips, const Vector2& centroid);
#if DEBUG_SHADOW
- // Verification utility function.
static bool testConvex(const Vector2* polygon, int polygonLength,
const char* name);
static void testIntersection(const Vector2* poly1, int poly1Length,
diff --git a/libs/hwui/TessellationCache.cpp b/libs/hwui/TessellationCache.cpp
index 9e62f364809a..1e38f9e9e615 100644
--- a/libs/hwui/TessellationCache.cpp
+++ b/libs/hwui/TessellationCache.cpp
@@ -216,7 +216,7 @@ static void tessellateShadows(
// tessellate caster outline into a 2d polygon
Vector<Vertex> casterVertices2d;
- const float casterRefinementThresholdSquared = 20.0f; // TODO: experiment with this value
+ const float casterRefinementThresholdSquared = 4.0f;
PathTessellator::approximatePathOutlineVertices(*casterPerimeter,
casterRefinementThresholdSquared, casterVertices2d);
if (!ShadowTessellator::isClockwisePath(*casterPerimeter)) {
diff --git a/libs/hwui/VertexBuffer.h b/libs/hwui/VertexBuffer.h
index 966fa4e7c674..8c3a272bb389 100644
--- a/libs/hwui/VertexBuffer.h
+++ b/libs/hwui/VertexBuffer.h
@@ -133,7 +133,7 @@ public:
mIndexCount = MathUtils::min(newCount, mAllocatedIndexCount);
}
void updateVertexCount(unsigned int newCount) {
- newCount = MathUtils::min(newCount, mAllocatedVertexCount);
+ mVertexCount = MathUtils::min(newCount, mAllocatedVertexCount);
}
Mode getMode() const { return mMode; }
diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
index e0901d076ee9..f0a207248006 100644
--- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
+++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
@@ -34,6 +34,7 @@ import android.os.Bundle;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.SystemProperties;
+import android.provider.Settings;
import android.util.Log;
import com.android.internal.R;
@@ -110,6 +111,9 @@ public class GpsNetInitiatedHandler {
// Set to true if the phone is having emergency call.
private volatile boolean mIsInEmergency;
+ // If Location function is enabled.
+ private volatile boolean mIsLocationEnabled = false;
+
private final INetInitiatedListener mNetInitiatedListener;
// Set to true if string from HAL is encoded as Hex, e.g., "3F0039"
@@ -132,7 +136,7 @@ public class GpsNetInitiatedHandler {
};
public static class GpsNiResponse {
- /* User reponse, one of the values in GpsUserResponseType */
+ /* User response, one of the values in GpsUserResponseType */
int userResponse;
/* Optional extra data to pass with the user response */
Bundle extras;
@@ -154,8 +158,11 @@ public class GpsNetInitiatedHandler {
Emergency call back mode will be checked by reading system properties
when necessary: SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)
*/
- mIsInEmergency |= PhoneNumberUtils.isEmergencyNumber(phoneNumber);
- if (DEBUG) Log.v(TAG, "ACTION_NEW_OUTGOING_CALL - " + mIsInEmergency);
+ setInEmergency(PhoneNumberUtils.isEmergencyNumber(phoneNumber));
+ if (DEBUG) Log.v(TAG, "ACTION_NEW_OUTGOING_CALL - " + getInEmergency());
+ } else if (action.equals(LocationManager.MODE_CHANGED_ACTION)) {
+ updateLocationMode();
+ if (DEBUG) Log.d(TAG, "location enabled :" + getLocationEnabled());
}
}
};
@@ -179,8 +186,9 @@ public class GpsNetInitiatedHandler {
mNetInitiatedListener = netInitiatedListener;
}
- mIsSuplEsEnabled = isSuplEsEnabled;
+ setSuplEsEnabled(isSuplEsEnabled);
mLocationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
+ updateLocationMode();
mTelephonyManager =
(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
@@ -190,7 +198,7 @@ public class GpsNetInitiatedHandler {
if (DEBUG) Log.d(TAG, "onCallStateChanged(): state is "+ state);
// listening for emergency call ends
if (state == TelephonyManager.CALL_STATE_IDLE) {
- mIsInEmergency = false;
+ setInEmergency(false);
}
}
};
@@ -198,27 +206,65 @@ public class GpsNetInitiatedHandler {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_NEW_OUTGOING_CALL);
+ intentFilter.addAction(LocationManager.MODE_CHANGED_ACTION);
mContext.registerReceiver(mBroadcastReciever, intentFilter);
}
- public void setSuplEsEnablement(boolean isEnabled)
- {
+ public void setSuplEsEnabled(boolean isEnabled) {
mIsSuplEsEnabled = isEnabled;
}
+ public boolean getSuplEsEnabled() {
+ return mIsSuplEsEnabled;
+ }
+
+ /**
+ * Updates Location enabler based on location setting.
+ */
+ public void updateLocationMode() {
+ mIsLocationEnabled = mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
+ }
+
+ /**
+ * Checks if user agreed to use location.
+ */
+ public boolean getLocationEnabled() {
+ return mIsLocationEnabled;
+ }
+
+ // Note: Currently, there are two mechanisms involved to determine if a
+ // phone is in emergency mode:
+ // 1. If the user is making an emergency call, this is provided by activly
+ // monitoring the outgoing phone number;
+ // 2. If the device is in a emergency callback state, this is provided by
+ // system properties.
+ // If either one of above exists, the phone is considered in an emergency
+ // mode. Because of this complexity, we need to be careful about how to set
+ // and clear the emergency state.
+ public void setInEmergency(boolean isInEmergency) {
+ mIsInEmergency = isInEmergency;
+ }
+
+ public boolean getInEmergency() {
+ boolean isInEmergencyCallback = Boolean.parseBoolean(
+ SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
+ return mIsInEmergency || isInEmergencyCallback;
+ }
+
+
// Handles NI events from HAL
- public void handleNiNotification(GpsNiNotification notif)
- {
+ public void handleNiNotification(GpsNiNotification notif) {
if (DEBUG) Log.d(TAG, "in handleNiNotification () :"
+ " notificationId: " + notif.notificationId
+ " requestorId: " + notif.requestorId
+ " text: " + notif.text
- + " mIsSuplEsEnabled" + mIsSuplEsEnabled);
+ + " mIsSuplEsEnabled" + getSuplEsEnabled()
+ + " mIsLocationEnabled" + getLocationEnabled());
- if (mIsSuplEsEnabled == false) {
- handleNi(notif);
- } else {
+ if (getSuplEsEnabled()) {
handleNiInEs(notif);
+ } else {
+ handleNi(notif);
}
//////////////////////////////////////////////////////////////////////////
@@ -240,9 +286,18 @@ public class GpsNetInitiatedHandler {
+ " needNotify: " + notif.needNotify
+ " needVerify: " + notif.needVerify
+ " privacyOverride: " + notif.privacyOverride
- + " mPopupImmediately: " + mPopupImmediately);
+ + " mPopupImmediately: " + mPopupImmediately
+ + " mInEmergency: " + getInEmergency());
- // legacy behaviour
+ if (getLocationEnabled() && !getInEmergency()) {
+ // Location is currently disabled, ignore all NI requests.
+ try {
+ mNetInitiatedListener.sendNiResponse(notif.notificationId,
+ GPS_NI_RESPONSE_IGNORE);
+ } catch (RemoteException e) {
+ Log.e(TAG, "RemoteException in sendNiResponse");
+ }
+ }
if (notif.needNotify) {
// If NI does not need verify or the dialog is not requested
// to pop up immediately, the dialog box will not pop up.
@@ -274,9 +329,6 @@ public class GpsNetInitiatedHandler {
+ " notificationId: " + notif.notificationId);
// UE is in emergency mode when in emergency call mode or in emergency call back mode
- boolean isUEInEmergencyMode = mIsInEmergency ||
- Boolean.parseBoolean(SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
-
/*
1. When SUPL ES bit is off and UE is not in emergency mode:
Call handleNi() to do legacy behaviour.
@@ -288,7 +340,7 @@ public class GpsNetInitiatedHandler {
Ignore the emergency SUPL INIT.
*/
boolean isNiTypeES = (notif.niType == GPS_NI_TYPE_EMERGENCY_SUPL);
- if (isNiTypeES != isUEInEmergencyMode) {
+ if (isNiTypeES != getInEmergency()) {
try {
mNetInitiatedListener.sendNiResponse(notif.notificationId,
GPS_NI_RESPONSE_IGNORE);
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java
index d7ede343fa76..56fa546e3704 100644
--- a/media/java/android/media/AudioAttributes.java
+++ b/media/java/android/media/AudioAttributes.java
@@ -33,7 +33,35 @@ import java.util.Set;
/**
* A class to encapsulate a collection of attributes describing information about an audio
- * player or recorder.
+ * stream.
+ * <p><code>AudioAttributes</code> supersede the notion of stream types (see for instance
+ * {@link AudioManager#STREAM_MUSIC} or {@link AudioManager#STREAM_ALARM}) for defining the
+ * behavior of audio playback. Attributes allow an application to specify more information than is
+ * conveyed in a stream type by allowing the application to define:
+ * <ul>
+ * <li>usage: "why" you are playing a sound, what is this sound used for. This is achieved with
+ * the "usage" information. Examples of usage are {@link #USAGE_MEDIA} and {@link #USAGE_ALARM}.
+ * These two examples are the closest to stream types, but more detailed use cases are
+ * available. Usage information is more expressive than a stream type, and allows certain
+ * platforms or routing policies to use this information for more refined volume or routing
+ * decisions. Usage is the most important information to supply in <code>AudioAttributes</code>
+ * and it is recommended to build any instance with this information supplied, see
+ * {@link AudioAttributes.Builder} for exceptions.</li>
+ * <li>content type: "what" you are playing. The content type expresses the general category of
+ * the content. This information is optional. But in case it is known (for instance
+ * {@link #CONTENT_TYPE_MOVIE} for a movie streaming service or {@link #CONTENT_TYPE_MUSIC} for
+ * a music playback application) this information might be used by the audio framework to
+ * selectively configure some audio post-processing blocks.</li>
+ * <li>flags: "how" is playback to be affected, see the flag definitions for the specific playback
+ * behaviors they control. </li>
+ * </ul>
+ * <p><code>AudioAttributes</code> are used for example in one of the {@link AudioTrack}
+ * constructors (see {@link AudioTrack#AudioTrack(AudioAttributes, AudioFormat, int, int, int)}),
+ * to configure a {@link MediaPlayer}
+ * (see {@link MediaPlayer#setAudioAttributes(AudioAttributes)} or a
+ * {@link android.app.Notification} (see {@link android.app.Notification#audioAttributes}). An
+ * <code>AudioAttributes</code> instance is built through its builder,
+ * {@link AudioAttributes.Builder}.
*/
public final class AudioAttributes implements Parcelable {
private final static String TAG = "AudioAttributes";
@@ -237,6 +265,22 @@ public final class AudioAttributes implements Parcelable {
/**
* Builder class for {@link AudioAttributes} objects.
+ * <p> Here is an example where <code>Builder</code> is used to define the
+ * {@link AudioAttributes} to be used by a new <code>AudioTrack</code> instance:
+ *
+ * <pre class="prettyprint">
+ * AudioTrack myTrack = new AudioTrack(
+ * new AudioAttributes.Builder()
+ * .setUsage(AudioAttributes.USAGE_MEDIA)
+ * .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC)
+ * .build(),
+ * myFormat, myBuffSize, AudioTrack.MODE_STREAM, mySession);
+ * </pre>
+ *
+ * <p>By default all types of information (usage, content type, flags) conveyed by an
+ * <code>AudioAttributes</code> instance are set to "unknown". Unknown information will be
+ * interpreted as a default value that is dependent on the context of use, for instance a
+ * {@link MediaPlayer} will use a default usage of {@link AudioAttributes#USAGE_MEDIA}.
*/
public static class Builder {
private int mUsage = USAGE_UNKNOWN;
@@ -247,6 +291,11 @@ public final class AudioAttributes implements Parcelable {
/**
* Constructs a new Builder with the defaults.
+ * By default, usage and content type are respectively {@link AudioAttributes#USAGE_UNKNOWN}
+ * and {@link AudioAttributes#CONTENT_TYPE_UNKNOWN}, and flags are 0. It is recommended to
+ * configure the usage (with {@link #setUsage(int)}) or deriving attributes from a legacy
+ * stream type (with {@link #setLegacyStreamType(int)}) before calling {@link #build()}
+ * to override any default playback behavior in terms of routing and volume management.
*/
public Builder() {
}
@@ -373,7 +422,9 @@ public final class AudioAttributes implements Parcelable {
}
/**
- * Adds attributes inferred from the legacy stream types.
+ * Sets attributes as inferred from the legacy stream types.
+ * Use this method when building an {@link AudioAttributes} instance to initialize some of
+ * the attributes by information derived from a legacy stream type.
* @param streamType one of {@link AudioManager#STREAM_VOICE_CALL},
* {@link AudioManager#STREAM_SYSTEM}, {@link AudioManager#STREAM_RING},
* {@link AudioManager#STREAM_MUSIC}, {@link AudioManager#STREAM_ALARM},
@@ -432,7 +483,6 @@ public final class AudioAttributes implements Parcelable {
/**
* @hide
- * CANDIDATE FOR PUBLIC API
* Sets the capture preset.
* Use this audio attributes configuration method when building an {@link AudioRecord}
* instance with {@link AudioRecord#AudioRecord(AudioAttributes, AudioFormat, int)}.
diff --git a/media/java/android/media/AudioDevice.java b/media/java/android/media/AudioDevice.java
index e078354ddcc5..df4d60d13765 100644
--- a/media/java/android/media/AudioDevice.java
+++ b/media/java/android/media/AudioDevice.java
@@ -20,90 +20,91 @@ import android.util.SparseIntArray;
/**
* Class to provide information about the audio devices.
+ * @hide
*/
public class AudioDevice {
/**
* A device type associated with an unknown or uninitialized device.
*/
- public static final int DEVICE_TYPE_UNKNOWN = 0;
+ public static final int TYPE_UNKNOWN = 0;
/**
* A device type describing the attached earphone speaker.
*/
- public static final int DEVICE_TYPE_BUILTIN_EARPIECE = 1;
+ public static final int TYPE_BUILTIN_EARPIECE = 1;
/**
* A device type describing the speaker system (i.e. a mono speaker or stereo speakers) built
* in a device.
*/
- public static final int DEVICE_TYPE_BUILTIN_SPEAKER = 2;
+ public static final int TYPE_BUILTIN_SPEAKER = 2;
/**
* A device type describing a headset, which is the combination of a headphones and microphone.
*/
- public static final int DEVICE_TYPE_WIRED_HEADSET = 3;
+ public static final int TYPE_WIRED_HEADSET = 3;
/**
* A device type describing a pair of wired headphones .
*/
- public static final int DEVICE_TYPE_WIRED_HEADPHONES = 4;
+ public static final int TYPE_WIRED_HEADPHONES = 4;
/**
* A device type describing an analog line-level connection.
*/
- public static final int DEVICE_TYPE_LINE_ANALOG = 5;
+ public static final int TYPE_LINE_ANALOG = 5;
/**
* A device type describing a digital line connection (e.g. SPDIF).
*/
- public static final int DEVICE_TYPE_LINE_DIGITAL = 6;
+ public static final int TYPE_LINE_DIGITAL = 6;
/**
* A device type describing a Bluetooth device typically used for telephony .
*/
- public static final int DEVICE_TYPE_BLUETOOTH_SCO = 7;
+ public static final int TYPE_BLUETOOTH_SCO = 7;
/**
* A device type describing a Bluetooth device supporting the A2DP profile.
*/
- public static final int DEVICE_TYPE_BLUETOOTH_A2DP = 8;
+ public static final int TYPE_BLUETOOTH_A2DP = 8;
/**
* A device type describing an HDMI connection .
*/
- public static final int DEVICE_TYPE_HDMI = 9;
+ public static final int TYPE_HDMI = 9;
/**
* A device type describing the Audio Return Channel of an HDMI connection.
*/
- public static final int DEVICE_TYPE_HDMI_ARC = 10;
+ public static final int TYPE_HDMI_ARC = 10;
/**
* A device type describing a USB audio device.
*/
- public static final int DEVICE_TYPE_USB_DEVICE = 11;
+ public static final int TYPE_USB_DEVICE = 11;
/**
* A device type describing a USB audio device in accessory mode.
*/
- public static final int DEVICE_TYPE_USB_ACCESSORY = 12;
+ public static final int TYPE_USB_ACCESSORY = 12;
/**
* A device type describing the audio device associated with a dock.
*/
- public static final int DEVICE_TYPE_DOCK = 13;
+ public static final int TYPE_DOCK = 13;
/**
* A device type associated with the transmission of audio signals over FM.
*/
- public static final int DEVICE_TYPE_FM = 14;
+ public static final int TYPE_FM = 14;
/**
* A device type describing the microphone(s) built in a device.
*/
- public static final int DEVICE_TYPE_BUILTIN_MIC = 15;
+ public static final int TYPE_BUILTIN_MIC = 15;
/**
* A device type for accessing the audio content transmitted over FM.
*/
- public static final int DEVICE_TYPE_FM_TUNER = 16;
+ public static final int TYPE_FM_TUNER = 16;
/**
* A device type for accessing the audio content transmitted over the TV tuner system.
*/
- public static final int DEVICE_TYPE_TV_TUNER = 17;
+ public static final int TYPE_TV_TUNER = 17;
/**
* A device type describing the transmission of audio signals over the telephony network.
*/
- public static final int DEVICE_TYPE_TELEPHONY = 18;
+ public static final int TYPE_TELEPHONY = 18;
/**
* A device type describing the auxiliary line-level connectors.
*/
- public static final int DEVICE_TYPE_AUX_LINE = 19;
+ public static final int TYPE_AUX_LINE = 19;
AudioDevicePortConfig mConfig;
@@ -135,7 +136,7 @@ public class AudioDevice {
* @return
*/
public int getDeviceType() {
- return INT_TO_EXT_DEVICE_MAPPING.get(mConfig.port().type(), DEVICE_TYPE_UNKNOWN);
+ return INT_TO_EXT_DEVICE_MAPPING.get(mConfig.port().type(), TYPE_UNKNOWN);
}
/**
@@ -154,7 +155,7 @@ public class AudioDevice {
/** @hide */
public static int convertInternalDeviceToDeviceType(int intDevice) {
- return INT_TO_EXT_DEVICE_MAPPING.get(intDevice, DEVICE_TYPE_UNKNOWN);
+ return INT_TO_EXT_DEVICE_MAPPING.get(intDevice, TYPE_UNKNOWN);
}
private static final SparseIntArray INT_TO_EXT_DEVICE_MAPPING;
@@ -163,43 +164,43 @@ public class AudioDevice {
static {
INT_TO_EXT_DEVICE_MAPPING = new SparseIntArray();
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, DEVICE_TYPE_BUILTIN_EARPIECE);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER, DEVICE_TYPE_BUILTIN_SPEAKER);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADSET, DEVICE_TYPE_WIRED_HEADSET);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, DEVICE_TYPE_WIRED_HEADPHONES);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, DEVICE_TYPE_BLUETOOTH_SCO);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET, DEVICE_TYPE_BLUETOOTH_SCO);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT, DEVICE_TYPE_BLUETOOTH_SCO);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, DEVICE_TYPE_BLUETOOTH_A2DP);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, DEVICE_TYPE_BLUETOOTH_A2DP);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, DEVICE_TYPE_BLUETOOTH_A2DP);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI, DEVICE_TYPE_HDMI);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, DEVICE_TYPE_DOCK);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, DEVICE_TYPE_DOCK);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_ACCESSORY, DEVICE_TYPE_USB_ACCESSORY);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_DEVICE, DEVICE_TYPE_USB_DEVICE);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_TELEPHONY_TX, DEVICE_TYPE_TELEPHONY);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_LINE, DEVICE_TYPE_LINE_ANALOG);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_ARC, DEVICE_TYPE_HDMI_ARC);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPDIF, DEVICE_TYPE_LINE_DIGITAL);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_FM, DEVICE_TYPE_FM);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_AUX_LINE, DEVICE_TYPE_AUX_LINE);
-
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUILTIN_MIC, DEVICE_TYPE_BUILTIN_MIC);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET, DEVICE_TYPE_BLUETOOTH_SCO);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_WIRED_HEADSET, DEVICE_TYPE_WIRED_HEADSET);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI, DEVICE_TYPE_HDMI);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TELEPHONY_RX, DEVICE_TYPE_TELEPHONY);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BACK_MIC, DEVICE_TYPE_BUILTIN_MIC);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET, DEVICE_TYPE_DOCK);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_DGTL_DOCK_HEADSET, DEVICE_TYPE_DOCK);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_ACCESSORY, DEVICE_TYPE_USB_ACCESSORY);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_DEVICE, DEVICE_TYPE_USB_DEVICE);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_FM_TUNER, DEVICE_TYPE_FM_TUNER);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TV_TUNER, DEVICE_TYPE_TV_TUNER);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_LINE, DEVICE_TYPE_LINE_ANALOG);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_SPDIF, DEVICE_TYPE_LINE_DIGITAL);
- INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, DEVICE_TYPE_BLUETOOTH_A2DP);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, TYPE_BUILTIN_EARPIECE);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER, TYPE_BUILTIN_SPEAKER);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADSET, TYPE_WIRED_HEADSET);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, TYPE_WIRED_HEADPHONES);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, TYPE_BLUETOOTH_SCO);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT, TYPE_BLUETOOTH_SCO);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, TYPE_BLUETOOTH_A2DP);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, TYPE_BLUETOOTH_A2DP);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI, TYPE_HDMI);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, TYPE_DOCK);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, TYPE_DOCK);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_ACCESSORY, TYPE_USB_ACCESSORY);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_DEVICE, TYPE_USB_DEVICE);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_TELEPHONY_TX, TYPE_TELEPHONY);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_LINE, TYPE_LINE_ANALOG);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_ARC, TYPE_HDMI_ARC);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPDIF, TYPE_LINE_DIGITAL);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_FM, TYPE_FM);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_AUX_LINE, TYPE_AUX_LINE);
+
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUILTIN_MIC, TYPE_BUILTIN_MIC);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_WIRED_HEADSET, TYPE_WIRED_HEADSET);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI, TYPE_HDMI);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TELEPHONY_RX, TYPE_TELEPHONY);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BACK_MIC, TYPE_BUILTIN_MIC);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET, TYPE_DOCK);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_DGTL_DOCK_HEADSET, TYPE_DOCK);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_ACCESSORY, TYPE_USB_ACCESSORY);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_DEVICE, TYPE_USB_DEVICE);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_FM_TUNER, TYPE_FM_TUNER);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TV_TUNER, TYPE_TV_TUNER);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_LINE, TYPE_LINE_ANALOG);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_SPDIF, TYPE_LINE_DIGITAL);
+ INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP);
// not covered here, legacy
//AudioSystem.DEVICE_OUT_REMOTE_SUBMIX
@@ -207,25 +208,25 @@ public class AudioDevice {
// privileges mapping to output device
EXT_TO_INT_DEVICE_MAPPING = new SparseIntArray();
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BUILTIN_EARPIECE, AudioSystem.DEVICE_OUT_EARPIECE);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BUILTIN_SPEAKER, AudioSystem.DEVICE_OUT_SPEAKER);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_WIRED_HEADSET, AudioSystem.DEVICE_OUT_WIRED_HEADSET);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_WIRED_HEADPHONES, AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_LINE_ANALOG, AudioSystem.DEVICE_OUT_LINE);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_LINE_DIGITAL, AudioSystem.DEVICE_OUT_SPDIF);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_OUT_BLUETOOTH_SCO);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_HDMI, AudioSystem.DEVICE_OUT_HDMI);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_HDMI_ARC, AudioSystem.DEVICE_OUT_HDMI_ARC);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_USB_DEVICE, AudioSystem.DEVICE_OUT_USB_DEVICE);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_USB_ACCESSORY, AudioSystem.DEVICE_OUT_USB_ACCESSORY);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_DOCK, AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_FM, AudioSystem.DEVICE_OUT_FM);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_TELEPHONY, AudioSystem.DEVICE_OUT_TELEPHONY_TX);
- EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_AUX_LINE, AudioSystem.DEVICE_OUT_AUX_LINE);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_EARPIECE, AudioSystem.DEVICE_OUT_EARPIECE);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_SPEAKER, AudioSystem.DEVICE_OUT_SPEAKER);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADSET, AudioSystem.DEVICE_OUT_WIRED_HEADSET);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADPHONES, AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_ANALOG, AudioSystem.DEVICE_OUT_LINE);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_DIGITAL, AudioSystem.DEVICE_OUT_SPDIF);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_OUT_BLUETOOTH_SCO);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI, AudioSystem.DEVICE_OUT_HDMI);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI_ARC, AudioSystem.DEVICE_OUT_HDMI_ARC);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_DEVICE, AudioSystem.DEVICE_OUT_USB_DEVICE);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_ACCESSORY, AudioSystem.DEVICE_OUT_USB_ACCESSORY);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_DOCK, AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM, AudioSystem.DEVICE_OUT_FM);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_TELEPHONY, AudioSystem.DEVICE_OUT_TELEPHONY_TX);
+ EXT_TO_INT_DEVICE_MAPPING.put(TYPE_AUX_LINE, AudioSystem.DEVICE_OUT_AUX_LINE);
}
}
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index d93d81bfee71..58ed4f808779 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -320,15 +320,26 @@ public class AudioFormat {
/**
* Builder class for {@link AudioFormat} objects.
+ * Use this class to configure and create an AudioFormat instance. By setting format
+ * characteristics such as audio encoding, channel mask or sample rate, you indicate which
+ * of those are to vary from the default behavior on this device wherever this audio format
+ * is used.
+ * <p>{@link AudioFormat} is for instance used in
+ * {@link AudioTrack#AudioTrack(AudioAttributes, AudioFormat, int, int, int)}. In this
+ * constructor, every format characteristic set on the <code>Builder</code> (e.g. with
+ * {@link #setSampleRate(int)}) will alter the default values used by an
+ * <code>AudioTrack</code>. In this case for audio playback with <code>AudioTrack</code>, the
+ * sample rate set in the <code>Builder</code> would override the platform output sample rate
+ * which would otherwise be selected by default.
*/
public static class Builder {
- private int mEncoding = ENCODING_PCM_16BIT;
+ private int mEncoding = ENCODING_INVALID;
private int mSampleRate = 0;
private int mChannelMask = CHANNEL_INVALID;
private int mPropertySetMask = AUDIO_FORMAT_HAS_PROPERTY_NONE;
/**
- * Constructs a new Builder with the defaults format values.
+ * Constructs a new Builder with none of the format characteristics set.
*/
public Builder() {
}
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 6da3c0b59ffd..559c247f7bef 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -19,6 +19,7 @@ package android.media;
import android.Manifest;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.SystemApi;
import android.app.PendingIntent;
import android.bluetooth.BluetoothDevice;
import android.content.ComponentName;
@@ -3158,6 +3159,21 @@ public class AudioManager {
}
/**
+ * Returns true if Hdmi Cec system audio mode is supported.
+ *
+ * @hide
+ */
+ @SystemApi
+ public boolean isHdmiSystemAudioSupported() {
+ try {
+ return getService().isHdmiSystemAudioSupported();
+ } catch (RemoteException e) {
+ Log.w(TAG, "Error querying system audio mode", e);
+ return false;
+ }
+ }
+
+ /**
* Return codes for listAudioPorts(), createAudioPatch() ...
*/
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index cd4f31e2860c..86c4d028974b 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -25,7 +25,6 @@ import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.AppOpsManager;
import android.app.KeyguardManager;
-import android.app.PendingIntent;
import android.bluetooth.BluetoothA2dp;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
@@ -68,7 +67,7 @@ import android.os.UserHandle;
import android.os.Vibrator;
import android.provider.Settings;
import android.provider.Settings.System;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.text.TextUtils;
import android.util.Log;
import android.util.MathUtils;
@@ -76,6 +75,7 @@ import android.util.Slog;
import android.view.KeyEvent;
import android.view.Surface;
import android.view.WindowManager;
+import android.view.accessibility.AccessibilityManager;
import com.android.internal.telephony.ITelephony;
import com.android.internal.util.XmlUtils;
@@ -451,11 +451,6 @@ public class AudioService extends IAudioService.Stub {
private Looper mSoundPoolLooper = null;
// volume applied to sound played with playSoundEffect()
private static int sSoundEffectVolumeDb;
- // getActiveStreamType() will return:
- // - STREAM_NOTIFICATION on tablets during this period after a notification stopped
- // - STREAM_MUSIC on phones during this period after music or talkback/voice search prompt
- // stopped
- private static final int DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS = 5000;
// previous volume adjustment direction received by checkForRingerModeChange()
private int mPrevVolDirection = AudioManager.ADJUST_SAME;
// Keyguard manager proxy
@@ -683,6 +678,8 @@ public class AudioService extends IAudioService.Stub {
0,
null,
SAFE_VOLUME_CONFIGURE_TIMEOUT_MS);
+
+ StreamOverride.init(mContext);
}
private void createAudioSystemThread() {
@@ -2941,9 +2938,9 @@ public class AudioService extends IAudioService.Stub {
private boolean isInCommunication() {
boolean IsInCall = false;
- TelecommManager telecommManager =
- (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
- IsInCall = telecommManager.isInCall();
+ TelecomManager telecomManager =
+ (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
+ IsInCall = telecomManager.isInCall();
return (IsInCall || getMode() == AudioManager.MODE_IN_COMMUNICATION);
}
@@ -2972,7 +2969,7 @@ public class AudioService extends IAudioService.Stub {
return AudioSystem.STREAM_VOICE_CALL;
}
} else if (suggestedStreamType == AudioManager.USE_DEFAULT_STREAM_TYPE) {
- if (isAfMusicActiveRecently(DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS)) {
+ if (isAfMusicActiveRecently(StreamOverride.sDelayMs)) {
if (DEBUG_VOL)
Log.v(TAG, "getActiveStreamType: Forcing STREAM_MUSIC stream active");
return AudioSystem.STREAM_MUSIC;
@@ -3004,13 +3001,13 @@ public class AudioService extends IAudioService.Stub {
return AudioSystem.STREAM_VOICE_CALL;
}
} else if (AudioSystem.isStreamActive(AudioSystem.STREAM_NOTIFICATION,
- DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS) ||
+ StreamOverride.sDelayMs) ||
AudioSystem.isStreamActive(AudioSystem.STREAM_RING,
- DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS)) {
+ StreamOverride.sDelayMs)) {
if (DEBUG_VOL) Log.v(TAG, "getActiveStreamType: Forcing STREAM_NOTIFICATION");
return AudioSystem.STREAM_NOTIFICATION;
} else if (suggestedStreamType == AudioManager.USE_DEFAULT_STREAM_TYPE) {
- if (isAfMusicActiveRecently(DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS)) {
+ if (isAfMusicActiveRecently(StreamOverride.sDelayMs)) {
if (DEBUG_VOL) Log.v(TAG, "getActiveStreamType: forcing STREAM_MUSIC");
return AudioSystem.STREAM_MUSIC;
} else {
@@ -5105,6 +5102,52 @@ public class AudioService extends IAudioService.Stub {
return device;
}
+ @Override
+ public boolean isHdmiSystemAudioSupported() {
+ return mHdmiSystemAudioSupported;
+ }
+
+ //==========================================================================================
+ // Accessibility: taking touch exploration into account for selecting the default
+ // stream override timeout when adjusting volume
+ //==========================================================================================
+ private static class StreamOverride
+ implements AccessibilityManager.TouchExplorationStateChangeListener {
+
+ // AudioService.getActiveStreamType() will return:
+ // - STREAM_NOTIFICATION on tablets during this period after a notification stopped
+ // - STREAM_MUSIC on phones during this period after music or talkback/voice search prompt
+ // stopped
+ private static final int DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS = 5000;
+ private static final int TOUCH_EXPLORE_STREAM_TYPE_OVERRIDE_DELAY_MS = 1000;
+
+ static int sDelayMs;
+
+ static void init(Context ctxt) {
+ AccessibilityManager accessibilityManager =
+ (AccessibilityManager) ctxt.getSystemService(Context.ACCESSIBILITY_SERVICE);
+ updateDefaultStreamOverrideDelay(
+ accessibilityManager.isTouchExplorationEnabled());
+ accessibilityManager.addTouchExplorationStateChangeListener(
+ new StreamOverride());
+ }
+
+ @Override
+ public void onTouchExplorationStateChanged(boolean enabled) {
+ updateDefaultStreamOverrideDelay(enabled);
+ }
+
+ private static void updateDefaultStreamOverrideDelay(boolean touchExploreEnabled) {
+ if (touchExploreEnabled) {
+ sDelayMs = TOUCH_EXPLORE_STREAM_TYPE_OVERRIDE_DELAY_MS;
+ } else {
+ sDelayMs = DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS;
+ }
+ if (DEBUG_VOL) Log.d(TAG, "Touch exploration enabled=" + touchExploreEnabled
+ + " stream override delay is now " + sDelayMs + " ms");
+ }
+ }
+
//==========================================================================================
// Camera shutter sound policy.
// config_camera_sound_forced configuration option in config.xml defines if the camera shutter
diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl
index 6477055fa305..75fc03cd8689 100644
--- a/media/java/android/media/IAudioService.aidl
+++ b/media/java/android/media/IAudioService.aidl
@@ -201,6 +201,8 @@ interface IAudioService {
int setHdmiSystemAudioSupported(boolean on);
- boolean registerAudioPolicy(in AudioPolicyConfig policyConfig, IBinder cb);
+ boolean isHdmiSystemAudioSupported();
+
+ boolean registerAudioPolicy(in AudioPolicyConfig policyConfig, IBinder cb);
oneway void unregisterAudioPolicyAsync(in IBinder cb);
}
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index 1c7c9ea8c4b5..b4fef36d3494 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -1756,7 +1756,7 @@ final public class MediaCodec {
if (cropRect != null) {
cropRect.offset(-xOffset, -yOffset);
}
- setCropRect(cropRect);
+ super.setCropRect(cropRect);
// save offsets and info
mXOffset = xOffset;
diff --git a/media/java/android/media/audiofx/Virtualizer.java b/media/java/android/media/audiofx/Virtualizer.java
index b314c02b7870..be5adc8d7653 100644
--- a/media/java/android/media/audiofx/Virtualizer.java
+++ b/media/java/android/media/audiofx/Virtualizer.java
@@ -16,11 +16,14 @@
package android.media.audiofx;
+import android.annotation.IntDef;
import android.media.AudioDevice;
import android.media.AudioFormat;
import android.media.audiofx.AudioEffect;
import android.util.Log;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.StringTokenizer;
@@ -248,14 +251,114 @@ public class Virtualizer extends AudioEffect {
}
/**
- * Checks if the combination of a channel mask and device type is supported by this virtualizer.
+ * A virtualization mode indicating virtualization processing is not active.
+ * See {@link #getVirtualizationMode()} as one of the possible return value.
+ */
+ public static final int VIRTUALIZATION_MODE_OFF = 0;
+
+ /**
+ * A virtualization mode used to indicate the virtualizer effect must stop forcing the
+ * processing to a particular mode in {@link #forceVirtualizationMode(int)}.
+ */
+ public static final int VIRTUALIZATION_MODE_AUTO = 1;
+ /**
+ * A virtualization mode typically used over headphones.
+ * Binaural virtualization describes an audio processing configuration for virtualization
+ * where the left and right channels are respectively reaching the left and right ear of the
+ * user, without also feeding the opposite ear (as is the case when listening over speakers).
+ * <p>Such a mode is therefore meant to be used when audio is playing over stereo wired
+ * headphones or headsets, but also stereo headphones through a wireless A2DP Bluetooth link.
+ * <p>See {@link #canVirtualize(int, int)} to verify this mode is supported by this Virtualizer.
+ */
+ public final static int VIRTUALIZATION_MODE_BINAURAL = 2;
+
+ /**
+ * A virtualization mode typically used over speakers.
+ * Transaural virtualization describes an audio processing configuration that differs from
+ * binaural (as described in {@link #VIRTUALIZATION_MODE_BINAURAL} in that cross-talk is
+ * present, i.e. audio played from the left channel also reaches the right ear of the user,
+ * and vice-versa.
+ * <p>When supported, such a mode is therefore meant to be used when audio is playing over the
+ * built-in stereo speakers of a device, if they are featured.
+ * <p>See {@link #canVirtualize(int, int)} to verify this mode is supported by this Virtualizer.
+ */
+ public final static int VIRTUALIZATION_MODE_TRANSAURAL = 3;
+
+ /** @hide */
+ @IntDef( {
+ VIRTUALIZATION_MODE_BINAURAL,
+ VIRTUALIZATION_MODE_TRANSAURAL
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface VirtualizationMode {}
+
+ /** @hide */
+ @IntDef( {
+ VIRTUALIZATION_MODE_AUTO,
+ VIRTUALIZATION_MODE_BINAURAL,
+ VIRTUALIZATION_MODE_TRANSAURAL
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ForceVirtualizationMode {}
+
+ private static int getDeviceForModeQuery(@VirtualizationMode int virtualizationMode)
+ throws IllegalArgumentException {
+ switch (virtualizationMode) {
+ case VIRTUALIZATION_MODE_BINAURAL:
+ return AudioDevice.TYPE_WIRED_HEADPHONES;
+ case VIRTUALIZATION_MODE_TRANSAURAL:
+ return AudioDevice.TYPE_BUILTIN_SPEAKER;
+ default:
+ throw (new IllegalArgumentException(
+ "Virtualizer: illegal virtualization mode " + virtualizationMode));
+ }
+ }
+
+ private static int getDeviceForModeForce(@ForceVirtualizationMode int virtualizationMode)
+ throws IllegalArgumentException {
+ if (virtualizationMode == VIRTUALIZATION_MODE_AUTO) {
+ return AudioDevice.TYPE_UNKNOWN;
+ } else {
+ return getDeviceForModeQuery(virtualizationMode);
+ }
+ }
+
+ private static int deviceToMode(int deviceType) {
+ switch (deviceType) {
+ case AudioDevice.TYPE_WIRED_HEADSET:
+ case AudioDevice.TYPE_WIRED_HEADPHONES:
+ case AudioDevice.TYPE_BLUETOOTH_SCO:
+ case AudioDevice.TYPE_BUILTIN_EARPIECE:
+ return VIRTUALIZATION_MODE_BINAURAL;
+ case AudioDevice.TYPE_BUILTIN_SPEAKER:
+ case AudioDevice.TYPE_LINE_ANALOG:
+ case AudioDevice.TYPE_LINE_DIGITAL:
+ case AudioDevice.TYPE_BLUETOOTH_A2DP:
+ case AudioDevice.TYPE_HDMI:
+ case AudioDevice.TYPE_HDMI_ARC:
+ case AudioDevice.TYPE_USB_DEVICE:
+ case AudioDevice.TYPE_USB_ACCESSORY:
+ case AudioDevice.TYPE_DOCK:
+ case AudioDevice.TYPE_FM:
+ case AudioDevice.TYPE_AUX_LINE:
+ return VIRTUALIZATION_MODE_TRANSAURAL;
+ case AudioDevice.TYPE_UNKNOWN:
+ default:
+ return VIRTUALIZATION_MODE_OFF;
+ }
+ }
+
+ /**
+ * Checks if the combination of a channel mask and virtualization mode is supported by this
+ * virtualizer.
* Some virtualizer implementations may only support binaural processing (i.e. only support
- * headphone output), some may support transaural processing (i.e. for speaker output) for the
+ * headphone output, see {@link #VIRTUALIZATION_MODE_BINAURAL}), some may support transaural
+ * processing (i.e. for speaker output, see {@link #VIRTUALIZATION_MODE_TRANSAURAL}) for the
* built-in speakers. Use this method to query the virtualizer implementation capabilities.
* @param inputChannelMask the channel mask of the content to virtualize.
- * @param deviceType the device type for which virtualization processing is to be performed.
- * Valid values are the device types defined in {@link AudioDevice}.
- * @return true if the combination of channel mask and output device type is supported, false
+ * @param virtualizationMode the mode for which virtualization processing is to be performed,
+ * one of {@link #VIRTUALIZATION_MODE_BINAURAL}, {@link #VIRTUALIZATION_MODE_TRANSAURAL}.
+ * @return true if the combination of channel mask and virtualization mode is supported, false
* otherwise.
* <br>An indication that a certain channel mask is not supported doesn't necessarily mean
* you cannot play content with that channel mask, it more likely implies the content will
@@ -268,22 +371,22 @@ public class Virtualizer extends AudioEffect {
* @throws IllegalArgumentException
* @throws UnsupportedOperationException
*/
- public boolean canVirtualize(int inputChannelMask, int deviceType)
+ public boolean canVirtualize(int inputChannelMask, @VirtualizationMode int virtualizationMode)
throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
- return getAnglesInt(inputChannelMask, deviceType, null);
+ return getAnglesInt(inputChannelMask, getDeviceForModeQuery(virtualizationMode), null);
}
/**
* Queries the virtual speaker angles (azimuth and elevation) for a combination of a channel
- * mask and device type.
- * If the virtualization configuration (mask and device) is supported (see
+ * mask and virtualization mode.
+ * If the virtualization configuration (mask and mode) is supported (see
* {@link #canVirtualize(int, int)}, the array angles will contain upon return the
* definition of each virtual speaker and its azimuth and elevation angles relative to the
* listener.
* <br>Note that in some virtualizer implementations, the angles may be strength-dependent.
* @param inputChannelMask the channel mask of the content to virtualize.
- * @param deviceType the device type for which virtualization processing is to be performed.
- * Valid values are the device types defined in {@link AudioDevice}.
+ * @param virtualizationMode the mode for which virtualization processing is to be performed,
+ * one of {@link #VIRTUALIZATION_MODE_BINAURAL}, {@link #VIRTUALIZATION_MODE_TRANSAURAL}.
* @param angles a non-null array whose length is 3 times the number of channels in the channel
* mask.
* If the method indicates the configuration is supported, the array will contain upon return
@@ -297,37 +400,39 @@ public class Virtualizer extends AudioEffect {
* <li>the element at index <code>3*i+2</code> contains its corresponding elevation angle
* where +90 is directly above the listener, 0 is the horizontal plane, and -90 is
* directly below the listener.</li>
- * @return true if the combination of channel mask and output device type is supported, false
+ * @return true if the combination of channel mask and virtualization mode is supported, false
* otherwise.
* @throws IllegalStateException
* @throws IllegalArgumentException
* @throws UnsupportedOperationException
*/
- public boolean getSpeakerAngles(int inputChannelMask, int deviceType, int[] angles)
+ public boolean getSpeakerAngles(int inputChannelMask,
+ @VirtualizationMode int virtualizationMode, int[] angles)
throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
if (angles == null) {
throw (new IllegalArgumentException(
"Virtualizer: illegal null channel / angle array"));
}
- return getAnglesInt(inputChannelMask, deviceType, angles);
+ return getAnglesInt(inputChannelMask, getDeviceForModeQuery(virtualizationMode), angles);
}
/**
- * Forces the virtualizer effect to use the processing mode used for the given device type.
+ * Forces the virtualizer effect to use the given processing mode.
* The effect must be enabled for the forced mode to be applied.
- * @param deviceType one of the device types defined in {@link AudioDevice}.
- * Use {@link AudioDevice#DEVICE_TYPE_UNKNOWN} to return to the non-forced mode.
- * @return true if the processing mode for the device type is supported, and it is successfully
- * set, or forcing was successfully disabled with {@link AudioDevice#DEVICE_TYPE_UNKNOWN},
- * false otherwise.
+ * @param virtualizationMode one of {@link #VIRTUALIZATION_MODE_BINAURAL},
+ * {@link #VIRTUALIZATION_MODE_TRANSAURAL} to force a particular processing mode, or
+ * {@value #VIRTUALIZATION_MODE_AUTO} to stop forcing a mode.
+ * @return true if the processing mode is supported, and it is successfully set, or
+ * forcing was successfully disabled, false otherwise.
* @throws IllegalStateException
* @throws IllegalArgumentException
* @throws UnsupportedOperationException
*/
- public boolean forceVirtualizationMode(int deviceType)
+ public boolean forceVirtualizationMode(@ForceVirtualizationMode int virtualizationMode)
throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
// convert Java device type to internal representation
+ int deviceType = getDeviceForModeForce(virtualizationMode);
int internalDevice = AudioDevice.convertDeviceTypeToInternalDevice(deviceType);
int status = setParameter(PARAM_FORCE_VIRTUALIZATION_MODE, internalDevice);
@@ -335,8 +440,8 @@ public class Virtualizer extends AudioEffect {
if (status >= 0) {
return true;
} else if (status == AudioEffect.ERROR_BAD_VALUE) {
- // a BAD_VALUE return from setParameter indicates the mode can't be forced to that
- // of this device, don't throw an exception, just return false
+ // a BAD_VALUE return from setParameter indicates the mode can't be forced
+ // don't throw an exception, just return false
return false;
} else {
// something wrong may have happened
@@ -349,31 +454,25 @@ public class Virtualizer extends AudioEffect {
}
/**
- * Return the device type which reflects the virtualization mode being used, if any.
- * @return a device type (as defined in {@link AudioDevice}) which reflects the virtualization
- * mode being used.
- * If virtualization is not active, the device type will be
- * {@link AudioDevice#DEVICE_TYPE_UNKNOWN}. Virtualization may not be active either because
- * the effect is not enabled or because the current output device is not compatible with
- * this virtualization implementation.
- * <p>Note that the return value may differ from a device type successfully set with
- * {@link #forceVirtualizationMode(int)} as the implementation
- * may use a single mode for multiple devices. An example of this is with
- * {@link AudioDevice#DEVICE_TYPE_WIRED_HEADSET} that would typically be handled
- * like {@link AudioDevice#DEVICE_TYPE_WIRED_HEADPHONES} from a virtualization
- * standpoint.
+ * Return the virtualization mode being used, if any.
+ * @return the virtualization mode being used.
+ * If virtualization is not active, the virtualization mode will be
+ * {@link #VIRTUALIZATION_MODE_OFF}. Otherwise the value will be
+ * {@link #VIRTUALIZATION_MODE_BINAURAL} or {@link #VIRTUALIZATION_MODE_TRANSAURAL}.
+ * Virtualization may not be active either because the effect is not enabled or
+ * because the current output device is not compatible with this virtualization
+ * implementation.
* @throws IllegalStateException
- * @throws IllegalArgumentException
* @throws UnsupportedOperationException
*/
public int getVirtualizationMode()
- throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+ throws IllegalStateException, UnsupportedOperationException {
int[] value = new int[1];
int status = getParameter(PARAM_VIRTUALIZATION_MODE, value);
if (status >= 0) {
- return AudioDevice.convertInternalDeviceToDeviceType(value[0]);
+ return deviceToMode(AudioDevice.convertInternalDeviceToDeviceType(value[0]));
} else if (status == AudioEffect.ERROR_BAD_VALUE) {
- return AudioDevice.DEVICE_TYPE_UNKNOWN;
+ return VIRTUALIZATION_MODE_OFF;
} else {
// something wrong may have happened
checkStatus(status);
@@ -381,7 +480,7 @@ public class Virtualizer extends AudioEffect {
// unexpected virtualizer behavior
Log.e(TAG, "unexpected status code " + status
+ " after getParameter(PARAM_VIRTUALIZATION_MODE)");
- return AudioDevice.DEVICE_TYPE_UNKNOWN;
+ return VIRTUALIZATION_MODE_OFF;
}
/**
diff --git a/media/java/android/media/projection/IMediaProjection.aidl b/media/java/android/media/projection/IMediaProjection.aidl
index 3d25aa6ff4c8..19fc0521d7aa 100644
--- a/media/java/android/media/projection/IMediaProjection.aidl
+++ b/media/java/android/media/projection/IMediaProjection.aidl
@@ -26,6 +26,6 @@ interface IMediaProjection {
boolean canProjectVideo();
boolean canProjectSecureVideo();
int applyVirtualDisplayFlags(int flags);
- void addCallback(IMediaProjectionCallback callback);
- void removeCallback(IMediaProjectionCallback callback);
+ void registerCallback(IMediaProjectionCallback callback);
+ void unregisterCallback(IMediaProjectionCallback callback);
}
diff --git a/media/java/android/media/projection/MediaProjection.java b/media/java/android/media/projection/MediaProjection.java
index 3a74d9394862..e6dadf91d85b 100644
--- a/media/java/android/media/projection/MediaProjection.java
+++ b/media/java/android/media/projection/MediaProjection.java
@@ -40,7 +40,7 @@ import java.util.Map;
*
* <p>
* A screen capture session can be started through {@link
- * MediaProjectionManager#getScreenCaptureIntent}. This grants the ability to
+ * MediaProjectionManager#createScreenCaptureIntent}. This grants the ability to
* capture screen contents, but not system audio.
* </p>
*/
@@ -70,9 +70,9 @@ public final class MediaProjection {
* @param handler The handler on which the callback should be invoked, or
* null if the callback should be invoked on the calling thread's looper.
*
- * @see #removeCallback
+ * @see #unregisterCallback
*/
- public void addCallback(Callback callback, Handler handler) {
+ public void registerCallback(Callback callback, Handler handler) {
if (callback == null) {
throw new IllegalArgumentException("callback should not be null");
}
@@ -83,9 +83,9 @@ public final class MediaProjection {
*
* @param callback The callback to unregister.
*
- * @see #addCallback
+ * @see #registerCallback
*/
- public void removeCallback(Callback callback) {
+ public void unregisterCallback(Callback callback) {
if (callback == null) {
throw new IllegalArgumentException("callback should not be null");
}
diff --git a/media/java/android/media/projection/MediaProjectionManager.java b/media/java/android/media/projection/MediaProjectionManager.java
index 50d66c64734d..a1cfc3555b86 100644
--- a/media/java/android/media/projection/MediaProjectionManager.java
+++ b/media/java/android/media/projection/MediaProjectionManager.java
@@ -75,7 +75,7 @@ public final class MediaProjectionManager {
* the user whether to allow screen capture. The result of this
* activity should be passed to getMediaProjection.
*/
- public Intent getScreenCaptureIntent() {
+ public Intent createScreenCaptureIntent() {
Intent i = new Intent();
i.setClassName("com.android.systemui",
"com.android.systemui.media.MediaProjectionPermissionActivity");
diff --git a/media/java/android/media/tv/ITvInputManagerCallback.aidl b/media/java/android/media/tv/ITvInputManagerCallback.aidl
index 50a7636c0992..67926807b156 100644
--- a/media/java/android/media/tv/ITvInputManagerCallback.aidl
+++ b/media/java/android/media/tv/ITvInputManagerCallback.aidl
@@ -24,4 +24,5 @@ oneway interface ITvInputManagerCallback {
void onInputStateChanged(in String inputId, int state);
void onInputAdded(in String inputId);
void onInputRemoved(in String inputId);
+ void onInputUpdated(in String inputId);
}
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index 704e4a12fd1d..54ebc6aad10c 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -120,7 +120,9 @@ public final class TvInputInfo implements Parcelable {
// Attributes from XML meta data.
private String mSetupActivity;
private String mSettingsActivity;
+
private int mType = TYPE_TUNER;
+ private HdmiDeviceInfo mHdmiDeviceInfo;
private String mLabel;
private Uri mIconUri;
private boolean mIsConnectedToHdmiSwitch;
@@ -159,7 +161,7 @@ public final class TvInputInfo implements Parcelable {
* ResolveInfo, and HdmiDeviceInfo.
*
* @param service The ResolveInfo returned from the package manager about this TV input service.
- * @param deviceInfo The HdmiDeviceInfo for a HDMI CEC logical device.
+ * @param hdmiDeviceInfo The HdmiDeviceInfo for a HDMI CEC logical device.
* @param parentId The ID of this TV input's parent input. {@code null} if none exists.
* @param iconUri The {@link android.net.Uri} to load the icon image. See
* {@link android.content.ContentResolver#openInputStream}. If it is {@code null},
@@ -170,12 +172,14 @@ public final class TvInputInfo implements Parcelable {
*/
@SystemApi
public static TvInputInfo createTvInputInfo(Context context, ResolveInfo service,
- HdmiDeviceInfo deviceInfo, String parentId, String label, Uri iconUri)
+ HdmiDeviceInfo hdmiDeviceInfo, String parentId, String label, Uri iconUri)
throws XmlPullParserException, IOException {
- boolean isConnectedToHdmiSwitch = (deviceInfo.getPhysicalAddress() & 0x0FFF) != 0;
- return createTvInputInfo(context, service, generateInputIdForHdmiDevice(
+ boolean isConnectedToHdmiSwitch = (hdmiDeviceInfo.getPhysicalAddress() & 0x0FFF) != 0;
+ TvInputInfo input = createTvInputInfo(context, service, generateInputIdForHdmiDevice(
new ComponentName(service.serviceInfo.packageName, service.serviceInfo.name),
- deviceInfo), parentId, TYPE_HDMI, label, iconUri, isConnectedToHdmiSwitch);
+ hdmiDeviceInfo), parentId, TYPE_HDMI, label, iconUri, isConnectedToHdmiSwitch);
+ input.mHdmiDeviceInfo = hdmiDeviceInfo;
+ return input;
}
/**
@@ -345,15 +349,27 @@ public final class TvInputInfo implements Parcelable {
}
/**
- * Returns the type of this TV input service.
+ * Returns the type of this TV input.
*/
public int getType() {
return mType;
}
/**
- * Returns {@code true} if this TV input is pass-though which does not have any real channels
- * in TvProvider. {@code false} otherwise.
+ * Returns the HDMI device information of this TV input.
+ * @hide
+ */
+ @SystemApi
+ public HdmiDeviceInfo getHdmiDeviceInfo() {
+ if (mType == TYPE_HDMI) {
+ return mHdmiDeviceInfo;
+ }
+ return null;
+ }
+
+ /**
+ * Returns {@code true} if this TV input is pass-though which does not have any real channels in
+ * TvProvider. {@code false} otherwise.
*
* @see TvContract#buildChannelUriForPassthroughInput(String)
*/
@@ -480,6 +496,7 @@ public final class TvInputInfo implements Parcelable {
dest.writeString(mSetupActivity);
dest.writeString(mSettingsActivity);
dest.writeInt(mType);
+ dest.writeParcelable(mHdmiDeviceInfo, flags);
dest.writeParcelable(mIconUri, flags);
dest.writeString(mLabel);
dest.writeByte(mIsConnectedToHdmiSwitch ? (byte) 1 : 0);
@@ -552,6 +569,7 @@ public final class TvInputInfo implements Parcelable {
mSetupActivity = in.readString();
mSettingsActivity = in.readString();
mType = in.readInt();
+ mHdmiDeviceInfo = in.readParcelable(null);
mIconUri = in.readParcelable(null);
mLabel = in.readString();
mIsConnectedToHdmiSwitch = in.readByte() == 1 ? true : false;
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index d2deb66e0033..78714d202649 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -477,6 +477,18 @@ public final class TvInputManager {
*/
public void onInputRemoved(String inputId) {
}
+
+ /**
+ * This is called when a TV input is updated. The update of TV input happens when it is
+ * reinstalled or the media on which the newer version of TV input exists is
+ * available/unavailable.
+ *
+ * @param inputId The id of the TV input.
+ * @hide
+ */
+ @SystemApi
+ public void onInputUpdated(String inputId) {
+ }
}
private static final class TvInputCallbackRecord {
@@ -518,6 +530,15 @@ public final class TvInputManager {
}
});
}
+
+ public void postInputUpdated(final String inputId) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ mCallback.onInputUpdated(inputId);
+ }
+ });
+ }
}
/**
@@ -707,9 +728,20 @@ public final class TvInputManager {
}
}
}
+
+ @Override
+ public void onInputUpdated(String inputId) {
+ synchronized (mLock) {
+ for (TvInputCallbackRecord record : mCallbackRecords) {
+ record.postInputUpdated(inputId);
+ }
+ }
+ }
};
try {
- mService.registerCallback(mManagerCallback, mUserId);
+ if (mService != null) {
+ mService.registerCallback(mManagerCallback, mUserId);
+ }
} catch (RemoteException e) {
Log.e(TAG, "mService.registerCallback failed: " + e);
}
diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java
index 317d47213d33..4f8facbbd502 100644
--- a/media/java/android/media/tv/TvInputService.java
+++ b/media/java/android/media/tv/TvInputService.java
@@ -66,8 +66,7 @@ import java.util.Set;
* </p>
*/
public abstract class TvInputService extends Service {
- // STOPSHIP: Turn debugging off.
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final String TAG = "TvInputService";
/**
diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java
index 4171e6d3e841..0949b1af9dc8 100644
--- a/media/java/android/media/tv/TvView.java
+++ b/media/java/android/media/tv/TvView.java
@@ -57,8 +57,7 @@ import java.util.List;
*/
public class TvView extends ViewGroup {
private static final String TAG = "TvView";
- // STOPSHIP: Turn debugging off.
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final int VIDEO_SIZE_VALUE_UNKNOWN = 0;
@@ -312,7 +311,9 @@ public class TvView extends ViewGroup {
// is newly assigned for every createSession request and compared with
// MySessionCreateCallback.this.
mSessionCallback = new MySessionCallback(inputId, channelUri, params);
- mTvInputManager.createSession(inputId, mSessionCallback, mHandler);
+ if (mTvInputManager != null) {
+ mTvInputManager.createSession(inputId, mSessionCallback, mHandler);
+ }
}
}
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
index be37aa8317e7..c9cefbd4429a 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -705,11 +705,12 @@ command_Exit:
}
static jobjectArray
-android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
+android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz __unused)
{
effect_descriptor_t desc;
char str[EFFECT_STRING_LEN_MAX];
- uint32_t numEffects = 0;
+ uint32_t totalEffectsCount = 0;
+ uint32_t returnedEffectsCount = 0;
uint32_t i = 0;
jstring jdescType;
jstring jdescUuid;
@@ -717,19 +718,20 @@ android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
jstring jdescName;
jstring jdescImplementor;
jobject jdesc;
+ jobjectArray ret;
- if (AudioEffect::queryNumberEffects(&numEffects) != NO_ERROR) {
+ if (AudioEffect::queryNumberEffects(&totalEffectsCount) != NO_ERROR) {
return NULL;
}
- jobjectArray ret = env->NewObjectArray(numEffects, fields.clazzDesc, NULL);
- if (ret == NULL) {
- return ret;
+ jobjectArray temp = env->NewObjectArray(totalEffectsCount, fields.clazzDesc, NULL);
+ if (temp == NULL) {
+ return temp;
}
- ALOGV("queryEffects() numEffects: %d", numEffects);
+ ALOGV("queryEffects() totalEffectsCount: %d", totalEffectsCount);
- for (i = 0; i < numEffects; i++) {
+ for (i = 0; i < totalEffectsCount; i++) {
if (AudioEffect::queryEffect(i, &desc) != NO_ERROR) {
goto queryEffects_failure;
}
@@ -770,15 +772,26 @@ android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
goto queryEffects_failure;
}
- env->SetObjectArrayElement(ret, i, jdesc);
+ env->SetObjectArrayElement(temp, returnedEffectsCount++, jdesc);
}
+ if (returnedEffectsCount == 0) {
+ goto queryEffects_failure;
+ }
+ ret = env->NewObjectArray(returnedEffectsCount, fields.clazzDesc, NULL);
+ if (ret == NULL) {
+ goto queryEffects_failure;
+ }
+ for (i = 0; i < returnedEffectsCount; i++) {
+ env->SetObjectArrayElement(ret, i, env->GetObjectArrayElement(temp, i));
+ }
+ env->DeleteLocalRef(temp);
return ret;
queryEffects_failure:
- if (ret != NULL) {
- env->DeleteLocalRef(ret);
+ if (temp != NULL) {
+ env->DeleteLocalRef(temp);
}
return NULL;
@@ -787,7 +800,8 @@ queryEffects_failure:
static jobjectArray
-android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz, jint audioSession)
+android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz __unused,
+ jint audioSession)
{
// kDefaultNumEffects is a "reasonable" value ensuring that only one query will be enough on
// most devices to get all active audio pre processing on a given session.
@@ -895,7 +909,7 @@ int register_android_media_AudioEffect(JNIEnv *env)
return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
}
-jint JNI_OnLoad(JavaVM* vm, void* reserved)
+jint JNI_OnLoad(JavaVM* vm, void* reserved __unused)
{
JNIEnv* env = NULL;
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_breadcrumb_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_breadcrumb_arrow_am_alpha.png
new file mode 100644
index 000000000000..84573f604efa
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_breadcrumb_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_accept_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_accept_alpha.png
new file mode 100644
index 000000000000..986d3fbcc6e8
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_accept_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_cancel_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_cancel_alpha.png
new file mode 100644
index 000000000000..ce443f914cd4
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_cancel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_select_item_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_select_item_alpha.png
new file mode 100644
index 000000000000..a54e0ea3d773
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_cab_select_item_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_alert_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_alert_alpha.png
new file mode 100644
index 000000000000..6e657161cd4a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_alert_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_info_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_info_alpha.png
new file mode 100644
index 000000000000..35bd56eeb1a5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_dialog_info_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_album_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_album_alpha.png
new file mode 100644
index 000000000000..64aa50bd945d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_album_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_apk_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_apk_alpha.png
new file mode 100644
index 000000000000..7cbcb8b57e4b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_apk_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_audio_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_audio_alpha.png
new file mode 100644
index 000000000000..d6d79ec47984
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_audio_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_certificate_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_certificate_alpha.png
new file mode 100644
index 000000000000..ca129289f408
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_certificate_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_codes_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_codes_alpha.png
new file mode 100644
index 000000000000..c4afa37bc362
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_codes_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_compressed_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_compressed_alpha.png
new file mode 100644
index 000000000000..0b0aa040736c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_compressed_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_contact_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_contact_am_alpha.png
new file mode 100644
index 000000000000..ebd0535a884d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_contact_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_event_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_event_am_alpha.png
new file mode 100644
index 000000000000..29cdbb7ad7df
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_event_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_excel_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_excel_alpha.png
new file mode 100644
index 000000000000..ca349b659fe5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_excel_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_folder_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_folder_alpha.png
new file mode 100644
index 000000000000..02249d2058da
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_font_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_font_alpha.png
new file mode 100644
index 000000000000..469b911bc1ee
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_font_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_generic_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_generic_am_alpha.png
new file mode 100644
index 000000000000..ef479c3c897e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_generic_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_image_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_image_alpha.png
new file mode 100644
index 000000000000..3168d6f78e95
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_image_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_pdf_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_pdf_alpha.png
new file mode 100644
index 000000000000..9bb4d66d9493
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_pdf_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_powerpoint_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_powerpoint_alpha.png
new file mode 100644
index 000000000000..88ba9ad5daff
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_powerpoint_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_presentation_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_presentation_alpha.png
new file mode 100644
index 000000000000..5fe18da00879
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_presentation_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_spreadsheet_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_spreadsheet_am_alpha.png
new file mode 100644
index 000000000000..1d05f6f58ad0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_spreadsheet_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_text_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_text_am_alpha.png
new file mode 100644
index 000000000000..c2308fe0253f
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_text_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_video_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_video_am_alpha.png
new file mode 100644
index 000000000000..9a173bef611d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_video_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_word_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_word_alpha.png
new file mode 100644
index 000000000000..a564f5a76db0
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_doc_word_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_folder_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_folder_alpha.png
new file mode 100644
index 000000000000..c0c27a29e3f3
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_grid_folder_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_grid_folder_alpha.png
new file mode 100644
index 000000000000..ca6be0e91437
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_grid_folder_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_hamburger_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_hamburger_alpha.png
new file mode 100644
index 000000000000..13b20c6a13af
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_hamburger_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_copy_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_copy_alpha.png
new file mode 100644
index 000000000000..2dcf03efa27d
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_copy_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_delete_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_delete_alpha.png
new file mode 100644
index 000000000000..07a78ed506a7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_delete_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_disconnect_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_disconnect_am_alpha.png
new file mode 100644
index 000000000000..d7eb04f2795c
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_disconnect_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_new_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_new_folder_am_alpha.png
new file mode 100644
index 000000000000..879bf45f3e8e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_new_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_overflow_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_overflow_alpha.png
new file mode 100644
index 000000000000..2cd413742328
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_overflow_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_rename_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_rename_am_alpha.png
new file mode 100644
index 000000000000..268049e8756a
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_rename_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_search_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_search_alpha.png
new file mode 100644
index 000000000000..78fc61d91218
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_search_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_settings_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_settings_alpha.png
new file mode 100644
index 000000000000..36e8e68bdf2b
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_settings_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_share_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_share_alpha.png
new file mode 100644
index 000000000000..68831f379ab7
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_share_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_sortby_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_sortby_am_alpha.png
new file mode 100644
index 000000000000..827a92ce20c2
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_sortby_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_undo_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_undo_am_alpha.png
new file mode 100644
index 000000000000..0f12b7dbb1f2
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_undo_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_grid_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_grid_alpha.png
new file mode 100644
index 000000000000..df1bac10abcd
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_grid_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_list_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_list_alpha.png
new file mode 100644
index 000000000000..942037422fb6
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_menu_view_list_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_open_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_open_am_alpha.png
new file mode 100644
index 000000000000..0394c5c5fa78
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_open_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_popout_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_popout_am_alpha.png
new file mode 100644
index 000000000000..325d374c7de5
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_popout_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_download_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_download_alpha.png
new file mode 100644
index 000000000000..87a5210f3104
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_download_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_folder_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_folder_am_alpha.png
new file mode 100644
index 000000000000..bb41a91f076e
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_folder_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_recent_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_recent_alpha.png
new file mode 100644
index 000000000000..baa723d60184
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_recent_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_sdcard_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_sdcard_alpha.png
new file mode 100644
index 000000000000..39c737fcf8de
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_sdcard_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_usb_light_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_usb_light_alpha.png
new file mode 100644
index 000000000000..88973e0e3762
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_root_usb_light_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/res/drawable-xxxhdpi/ic_subdirectory_arrow_am_alpha.png b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_subdirectory_arrow_am_alpha.png
new file mode 100644
index 000000000000..8fddb85f2f02
--- /dev/null
+++ b/packages/DocumentsUI/res/drawable-xxxhdpi/ic_subdirectory_arrow_am_alpha.png
Binary files differ
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
index f81690a365a7..d72db1dccfcf 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
@@ -116,9 +116,6 @@ public class RootsCache {
* Gather roots from storage providers belonging to given package name.
*/
public void updatePackageAsync(String packageName) {
- // Need at least first load, since we're going to be using previously
- // cached values for non-matching packages.
- waitForFirstLoad();
new UpdateTask(packageName).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
@@ -183,6 +180,12 @@ public class RootsCache {
protected Void doInBackground(Void... params) {
final long start = SystemClock.elapsedRealtime();
+ if (mFilterPackage != null) {
+ // Need at least first load, since we're going to be using
+ // previously cached values for non-matching packages.
+ waitForFirstLoad();
+ }
+
mTaskRoots.put(mRecentsRoot.authority, mRecentsRoot);
final ContentResolver resolver = mContext.getContentResolver();
diff --git a/packages/Keyguard/res/drawable-hdpi/kg_bouncer_bg_white.9.png b/packages/Keyguard/res/drawable-hdpi/kg_bouncer_bg_white.9.png
deleted file mode 100644
index cfd5db357dc4..000000000000
--- a/packages/Keyguard/res/drawable-hdpi/kg_bouncer_bg_white.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/kg_bouncer_bg_white.9.png b/packages/Keyguard/res/drawable-mdpi/kg_bouncer_bg_white.9.png
deleted file mode 100644
index e3cb6db09736..000000000000
--- a/packages/Keyguard/res/drawable-mdpi/kg_bouncer_bg_white.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_bouncer_bg_white.9.png b/packages/Keyguard/res/drawable-xhdpi/kg_bouncer_bg_white.9.png
deleted file mode 100644
index b9e30e20a952..000000000000
--- a/packages/Keyguard/res/drawable-xhdpi/kg_bouncer_bg_white.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml b/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml
index 8c8ec7a1762d..0c85dab082ea 100644
--- a/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml
@@ -36,7 +36,6 @@
<FrameLayout
android:id="@+id/keyguard_bouncer_frame"
- android:background="@drawable/kg_bouncer_bg_white"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
diff --git a/packages/Keyguard/res/layout/keyguard_password_view.xml b/packages/Keyguard/res/layout/keyguard_password_view.xml
index 9e886f2e9e0b..b7d5d305b61a 100644
--- a/packages/Keyguard/res/layout/keyguard_password_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_password_view.xml
@@ -42,7 +42,6 @@
<!-- Password entry field -->
<FrameLayout
android:id="@+id/keyguard_bouncer_frame"
- android:background="@drawable/kg_bouncer_bg_white"
android:layout_height="wrap_content"
android:layout_width="280dp"
android:layout_gravity="center_horizontal"
diff --git a/packages/Keyguard/res/layout/keyguard_pattern_view.xml b/packages/Keyguard/res/layout/keyguard_pattern_view.xml
index a1264651135a..bd585b590990 100644
--- a/packages/Keyguard/res/layout/keyguard_pattern_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_pattern_view.xml
@@ -49,7 +49,6 @@
<FrameLayout
android:id="@+id/keyguard_bouncer_frame"
- android:background="@drawable/kg_bouncer_bg_white"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
diff --git a/packages/Keyguard/res/layout/keyguard_pin_view.xml b/packages/Keyguard/res/layout/keyguard_pin_view.xml
index a33f95bd5663..4cbdddee74d9 100644
--- a/packages/Keyguard/res/layout/keyguard_pin_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_pin_view.xml
@@ -40,7 +40,7 @@
android:layout_weight="1"
android:layoutDirection="ltr"
>
- <RelativeLayout
+ <com.android.keyguard.AlphaOptimizedRelativeLayout
android:id="@+id/row0"
android:layout_width="match_parent"
android:layout_height="0dp"
@@ -79,7 +79,7 @@
android:layout_alignParentBottom="true"
android:background="#28FFFFFF"
/>
- </RelativeLayout>
+ </com.android.keyguard.AlphaOptimizedRelativeLayout>
<LinearLayout
android:id="@+id/row1"
android:layout_width="match_parent"
@@ -196,7 +196,7 @@
androidprv:textView="@+id/pinEntry"
androidprv:digit="0"
/>
- <ImageButton
+ <com.android.keyguard.AlphaOptimizedImageButton
android:id="@+id/key_enter"
android:layout_width="0px"
android:layout_height="match_parent"
diff --git a/packages/Keyguard/res/layout/keyguard_selector_view.xml b/packages/Keyguard/res/layout/keyguard_selector_view.xml
index d3064edfb07b..53303636ba50 100644
--- a/packages/Keyguard/res/layout/keyguard_selector_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_selector_view.xml
@@ -48,8 +48,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:background="@drawable/kg_bouncer_bg_white"/>
+ android:layout_marginRight="16dp"/>
<include layout="@layout/keyguard_glow_pad_container" />
diff --git a/packages/Keyguard/res/values-h650dp/dimens.xml b/packages/Keyguard/res/values-h650dp/dimens.xml
new file mode 100644
index 000000000000..48643268a9bd
--- /dev/null
+++ b/packages/Keyguard/res/values-h650dp/dimens.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2014 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>
+ <dimen name="widget_big_font_size">112dp</dimen>
+</resources> \ No newline at end of file
diff --git a/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedImageButton.java b/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedImageButton.java
new file mode 100644
index 000000000000..eda790f3015d
--- /dev/null
+++ b/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedImageButton.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.keyguard;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.ImageButton;
+import android.widget.RelativeLayout;
+
+/**
+ * A frame layout which does not have overlapping renderings commands and therefore does not need a
+ * layer when alpha is changed.
+ */
+public class AlphaOptimizedImageButton extends ImageButton {
+
+ public AlphaOptimizedImageButton(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public boolean hasOverlappingRendering() {
+ return false;
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AlphaOptimizedLinearLayout.java b/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedLinearLayout.java
index 9f4c3a90ea23..36da6f1297cf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/AlphaOptimizedLinearLayout.java
+++ b/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedLinearLayout.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.systemui.statusbar;
+package com.android.keyguard;
import android.content.Context;
import android.util.AttributeSet;
diff --git a/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java b/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java
new file mode 100644
index 000000000000..200b1162655e
--- /dev/null
+++ b/packages/Keyguard/src/com/android/keyguard/AlphaOptimizedRelativeLayout.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.keyguard;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.RelativeLayout;
+
+/**
+ * A frame layout which does not have overlapping renderings commands and therefore does not need a
+ * layer when alpha is changed.
+ */
+public class AlphaOptimizedRelativeLayout extends RelativeLayout {
+
+ public AlphaOptimizedRelativeLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public boolean hasOverlappingRendering() {
+ return false;
+ }
+}
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyCarrierArea.java b/packages/Keyguard/src/com/android/keyguard/EmergencyCarrierArea.java
index a592db91a31d..0a89d9b15e26 100644
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyCarrierArea.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyCarrierArea.java
@@ -17,13 +17,11 @@
package com.android.keyguard;
import android.content.Context;
-import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
-import android.widget.LinearLayout;
-public class EmergencyCarrierArea extends LinearLayout {
+public class EmergencyCarrierArea extends AlphaOptimizedLinearLayout {
private CarrierText mCarrierText;
private EmergencyButton mEmergencyButton;
diff --git a/packages/PrintSpooler/AndroidManifest.xml b/packages/PrintSpooler/AndroidManifest.xml
index adff59669187..c7cf61ae5559 100644
--- a/packages/PrintSpooler/AndroidManifest.xml
+++ b/packages/PrintSpooler/AndroidManifest.xml
@@ -55,7 +55,8 @@
<service
android:name=".renderer.PdfManipulationService"
- android:isolatedProcess="true">
+ android:isolatedProcess="true"
+ android:process=":renderer">
</service>
<activity
diff --git a/packages/PrintSpooler/res/layout/preview_page.xml b/packages/PrintSpooler/res/layout/preview_page.xml
index df9848b37ebd..edce28965001 100644
--- a/packages/PrintSpooler/res/layout/preview_page.xml
+++ b/packages/PrintSpooler/res/layout/preview_page.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.printspooler.widget.PreviewPageFrame xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/preview_page"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -33,7 +33,8 @@
android:layout_width="fill_parent"
android:layout_height="@dimen/preview_page_footer_height"
android:background="@color/material_grey_500"
- android:orientation="horizontal">
+ android:orientation="horizontal"
+ android:duplicateParentState="true">
<TextView
android:id="@+id/page_number"
@@ -51,9 +52,10 @@
android:layout_marginRight="8dip"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
- android:background="@drawable/page_selector_background">
+ android:background="@drawable/page_selector_background"
+ android:duplicateParentState="true">
</ImageView>
</RelativeLayout>
-</LinearLayout>
+</com.android.printspooler.widget.PreviewPageFrame>
diff --git a/packages/PrintSpooler/res/layout/print_activity.xml b/packages/PrintSpooler/res/layout/print_activity.xml
index 30b9629249db..6b8aa47b2fd6 100644
--- a/packages/PrintSpooler/res/layout/print_activity.xml
+++ b/packages/PrintSpooler/res/layout/print_activity.xml
@@ -98,7 +98,7 @@
android:id="@+id/print_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginEnd="16dip"
+ android:layout_marginStart="16dip"
android:elevation="@dimen/preview_controls_elevation"
android:background="@drawable/print_button">
</ImageButton>
diff --git a/packages/PrintSpooler/res/layout/print_activity_controls.xml b/packages/PrintSpooler/res/layout/print_activity_controls.xml
index c2a0da974830..0bf64aa4db3a 100644
--- a/packages/PrintSpooler/res/layout/print_activity_controls.xml
+++ b/packages/PrintSpooler/res/layout/print_activity_controls.xml
@@ -55,15 +55,16 @@
android:text="@string/label_copies">
</TextView>
- <EditText
+ <com.android.printspooler.widget.CustomErrorEditText
android:id="@+id/copies_edittext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="8dip"
style="?android:attr/editTextStyle"
android:singleLine="true"
android:ellipsize="end"
android:inputType="numberDecimal">
- </EditText>
+ </com.android.printspooler.widget.CustomErrorEditText>
</LinearLayout>
@@ -89,7 +90,8 @@
<Spinner
android:id="@+id/paper_size_spinner"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dip">
</Spinner>
</LinearLayout>
@@ -116,7 +118,8 @@
<Spinner
android:id="@+id/color_spinner"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dip">
</Spinner>
</LinearLayout>
@@ -143,7 +146,8 @@
<Spinner
android:id="@+id/orientation_spinner"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dip">
</Spinner>
</LinearLayout>
@@ -170,7 +174,8 @@
<Spinner
android:id="@+id/range_options_spinner"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dip">
</Spinner>
</LinearLayout>
@@ -197,16 +202,17 @@
android:visibility="visible">
</TextView>
- <EditText
+ <com.android.printspooler.widget.CustomErrorEditText
android:id="@+id/page_range_edittext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|fill_horizontal"
+ android:layout_marginStart="8dip"
android:singleLine="true"
android:ellipsize="end"
android:visibility="visible"
android:inputType="textNoSuggestions">
- </EditText>
+ </com.android.printspooler.widget.CustomErrorEditText>
</LinearLayout>
@@ -239,7 +245,7 @@
android:id="@+id/expand_collapse_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="4dip"
+ android:layout_marginTop="0dip"
android:layout_marginBottom="4dip"
android:layout_gravity="center"
android:background="@drawable/ic_expand_more">
diff --git a/packages/PrintSpooler/res/values/strings.xml b/packages/PrintSpooler/res/values/strings.xml
index 27e1d519f8eb..ab633eaf259e 100644
--- a/packages/PrintSpooler/res/values/strings.xml
+++ b/packages/PrintSpooler/res/values/strings.xml
@@ -76,10 +76,36 @@
<!-- Title for the print dialog announced to the user for accessibility. Not shown in the UI. [CHAR LIMIT=none] -->
<string name="print_dialog">Print dialog</string>
- <!-- Template for the message that shows the current page out of the total number of pages -->
+ <!-- Template for the message that shows the current page out of the total number of pages [CHAR LIMIT=none] -->
<string name="current_page_template"><xliff:g id="current_page">%1$d</xliff:g>
/<xliff:g id="page_count">%2$d</xliff:g></string>
+ <!-- Description of the current page - spoken to the user [CHAR LIMIT=none] -->
+ <string name="page_description_template">Page <xliff:g id="current_page" example="1">%1$d</xliff:g>
+ of <xliff:g id="page_count" example="100">%2$d</xliff:g></string>
+
+ <!-- Template for the message to announce the print options summary - spoken to the user. [CHAR LIMIT=none] -->
+ <string name="summary_template">Summary, copies <xliff:g id="copies" example="1">%1$s</xliff:g>,
+ paper size <xliff:g id="paper_size" example="A4">%2$s</xliff:g></string>
+
+ <!-- Description for the handle to expand all print options - spoken to the user. [CHAR LIMIT=none] -->
+ <string name="expand_handle">Expand handle</string>
+
+ <!-- Description for the handle to collapse all print options - spoken to the user. [CHAR LIMIT=none] -->
+ <string name="collapse_handle">Collapse handle</string>
+
+ <!-- Description for the print button - spoken to the user. [CHAR LIMIT=none] -->
+ <string name="print_button">Print</string>
+
+ <!-- Description for the save to PDF button - spoken to the user. [CHAR LIMIT=none] -->
+ <string name="savetopdf_button">Save to PDF</string>
+
+ <!-- Message to announce print options are expanded - spoken to the user. [CHAR LIMIT=none] -->
+ <string name="print_options_expanded">Print options expanded</string>
+
+ <!-- Message to announce print options are collapsed - spoken to the user. [CHAR LIMIT=none] -->
+ <string name="print_options_collapsed">Print options collapsed</string>
+
<!-- Select printer activity -->
<!-- Title for the share action bar menu item. [CHAR LIMIT=20] -->
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
index 1d8261b43ec0..14c41dadb0ba 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
@@ -345,7 +345,7 @@ public final class PageContentRepository {
Iterator<Map.Entry<Integer, RenderedPage>> iterator =
mRenderedPages.entrySet().iterator();
while (iterator.hasNext()) {
- iterator.next().getValue().recycle();
+ iterator.next();
iterator.remove();
}
}
@@ -425,10 +425,6 @@ public final class PageContentRepository {
return content.getBitmap().getByteCount();
}
- public void recycle() {
- content.getBitmap().recycle();
- }
-
public void erase() {
content.getBitmap().eraseColor(Color.WHITE);
}
@@ -738,7 +734,6 @@ public final class PageContentRepository {
+ " with different size.");
}
mPageContentCache.removeRenderedPage(mPageIndex);
- mRenderedPage.recycle();
mRenderedPage = null;
}
@@ -762,7 +757,6 @@ public final class PageContentRepository {
Log.i(LOG_TAG, "Recycling bitmap for page: " + mPageIndex
+ " with different size.");
}
- renderedPage.recycle();
continue;
}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerProvider.java b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerProvider.java
index 06723c33814d..8537d6c98deb 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerProvider.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerProvider.java
@@ -20,7 +20,9 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
+import android.os.Debug;
import android.os.IBinder;
+import android.util.Log;
public class PrintSpoolerProvider implements ServiceConnection {
private final Context mContext;
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
index 1e7a011394e0..c53fcadde4e7 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
@@ -74,7 +74,7 @@ public final class RemotePrintDocument {
private final Looper mLooper;
private final IPrintDocumentAdapter mPrintDocumentAdapter;
- private final DocumentObserver mDocumentObserver;
+ private final RemoteAdapterDeathObserver mAdapterDeathObserver;
private final UpdateResultCallbacks mUpdateCallbacks;
@@ -107,11 +107,13 @@ public final class RemotePrintDocument {
mDocumentInfo.info.getPageCount());
}
// Notify we are done.
+ mState = STATE_UPDATED;
notifyUpdateCompleted();
}
}
} else {
// We always notify after a write.
+ mState = STATE_UPDATED;
notifyUpdateCompleted();
}
runPendingCommand();
@@ -135,7 +137,7 @@ public final class RemotePrintDocument {
private final DeathRecipient mDeathRecipient = new DeathRecipient() {
@Override
public void binderDied() {
- finish();
+ notifyPrintingAppDied();
}
};
@@ -144,8 +146,8 @@ public final class RemotePrintDocument {
private AsyncCommand mCurrentCommand;
private AsyncCommand mNextCommand;
- public interface DocumentObserver {
- public void onDestroy();
+ public interface RemoteAdapterDeathObserver {
+ public void onDied();
}
public interface UpdateResultCallbacks {
@@ -155,12 +157,12 @@ public final class RemotePrintDocument {
}
public RemotePrintDocument(Context context, IPrintDocumentAdapter adapter,
- MutexFileProvider fileProvider, DocumentObserver destroyListener,
+ MutexFileProvider fileProvider, RemoteAdapterDeathObserver deathObserver,
UpdateResultCallbacks callbacks) {
mPrintDocumentAdapter = adapter;
mLooper = context.getMainLooper();
mContext = context;
- mDocumentObserver = destroyListener;
+ mAdapterDeathObserver = deathObserver;
mDocumentInfo = new RemotePrintDocumentInfo();
mDocumentInfo.fileProvider = fileProvider;
mUpdateCallbacks = callbacks;
@@ -180,7 +182,6 @@ public final class RemotePrintDocument {
} catch (RemoteException re) {
Log.e(LOG_TAG, "Error calling start()", re);
mState = STATE_FAILED;
- mDocumentObserver.onDestroy();
}
}
@@ -269,7 +270,6 @@ public final class RemotePrintDocument {
} catch (RemoteException re) {
Log.e(LOG_TAG, "Error calling finish()", re);
mState = STATE_FAILED;
- mDocumentObserver.onDestroy();
}
}
@@ -302,7 +302,6 @@ public final class RemotePrintDocument {
mState = STATE_DESTROYED;
disconnectFromRemoteDocument();
- mDocumentObserver.onDestroy();
}
public boolean isUpdating() {
@@ -1109,6 +1108,15 @@ public final class RemotePrintDocument {
}
}
+ private void notifyPrintingAppDied() {
+ new Handler(mLooper).post(new Runnable() {
+ @Override
+ public void run() {
+ mAdapterDeathObserver.onDied();
+ }
+ });
+ }
+
private static final class PrintDocumentAdapterObserver
extends IPrintDocumentAdapterObserver.Stub {
private final WeakReference<RemotePrintDocument> mWeakDocument;
@@ -1121,12 +1129,7 @@ public final class RemotePrintDocument {
public void onDestroy() {
final RemotePrintDocument document = mWeakDocument.get();
if (document != null) {
- new Handler(document.mLooper).post(new Runnable() {
- @Override
- public void run() {
- document.mDocumentObserver.onDestroy();
- }
- });
+ document.notifyPrintingAppDied();
}
}
}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java
index ce0b9b603f55..faaf0aee4b8d 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java
@@ -41,6 +41,7 @@ import com.android.printspooler.model.PageContentRepository;
import com.android.printspooler.model.PageContentRepository.PageContentProvider;
import com.android.printspooler.util.PageRangeUtils;
import com.android.printspooler.widget.PageContentView;
+import com.android.printspooler.widget.PreviewPageFrame;
import dalvik.system.CloseGuard;
import java.util.ArrayList;
@@ -94,12 +95,6 @@ public final class PageAdapter extends Adapter implements
private int mDocumentPageCount = PrintDocumentInfo.PAGE_COUNT_UNKNOWN;
private int mSelectedPageCount;
- private float mSelectedPageElevation;
- private float mSelectedPageAlpha;
-
- private float mUnselectedPageElevation;
- private float mUnselectedPageAlpha;
-
private int mPreviewPageMargin;
private int mPreviewPageMinWidth;
private int mPreviewListPadding;
@@ -134,16 +129,6 @@ public final class PageAdapter extends Adapter implements
Context.LAYOUT_INFLATER_SERVICE);
mPageContentRepository = new PageContentRepository(context, this);
- mSelectedPageElevation = mContext.getResources().getDimension(
- R.dimen.selected_page_elevation);
- mSelectedPageAlpha = mContext.getResources().getFraction(
- R.fraction.page_selected_alpha, 1, 1);
-
- mUnselectedPageElevation = mContext.getResources().getDimension(
- R.dimen.unselected_page_elevation);
- mUnselectedPageAlpha = mContext.getResources().getFraction(
- R.fraction.page_unselected_alpha, 1, 1);
-
mPreviewPageMargin = mContext.getResources().getDimensionPixelSize(
R.dimen.preview_page_margin);
@@ -179,6 +164,7 @@ public final class PageAdapter extends Adapter implements
public void onOrientationChanged() {
mColumnCount = mContext.getResources().getInteger(
R.integer.preview_page_per_row_count);
+ notifyDataSetChanged();
}
public boolean isOpened() {
@@ -296,7 +282,7 @@ public final class PageAdapter extends Adapter implements
MyViewHolder myHolder = (MyViewHolder) holder;
- View page = holder.itemView;
+ PreviewPageFrame page = (PreviewPageFrame) holder.itemView;
page.setOnClickListener(mPageClickListener);
page.setTag(holder);
@@ -340,20 +326,15 @@ public final class PageAdapter extends Adapter implements
}
content.init(provider, mEmptyState, mMediaSize, mMinMargins);
- View pageSelector = page.findViewById(R.id.page_selector);
- pageSelector.setTag(myHolder);
- pageSelector.setOnClickListener(mPageClickListener);
-
if (mConfirmedPagesInDocument.indexOfKey(pageInDocument) >= 0) {
- pageSelector.setSelected(true);
- page.setTranslationZ(mSelectedPageElevation);
- page.setAlpha(mSelectedPageAlpha);
+ page.setSelected(true, false);
} else {
- pageSelector.setSelected(false);
- page.setTranslationZ(mUnselectedPageElevation);
- page.setAlpha(mUnselectedPageAlpha);
+ page.setSelected(false, false);
}
+ page.setContentDescription(mContext.getString(R.string.page_description_template,
+ pageInDocument + 1, mDocumentPageCount));
+
TextView pageNumberView = (TextView) page.findViewById(R.id.page_number);
String text = mContext.getString(R.string.current_page_template,
pageInDocument + 1, mDocumentPageCount);
@@ -442,7 +423,8 @@ public final class PageAdapter extends Adapter implements
* mPreviewPageMargin);
final int verticalPadding;
- if (mPageContentHeight + mFooterHeight + mPreviewListPadding > availableHeight) {
+ if (mPageContentHeight + mFooterHeight + mPreviewListPadding
+ + 2 * mPreviewPageMargin > availableHeight) {
verticalPadding = Math.max(0,
(availableHeight - mPageContentHeight - mFooterHeight) / 2
- mPreviewPageMargin);
@@ -792,24 +774,20 @@ public final class PageAdapter extends Adapter implements
private final class PageClickListener implements OnClickListener {
@Override
- public void onClick(View page) {
+ public void onClick(View view) {
+ PreviewPageFrame page = (PreviewPageFrame) view;
MyViewHolder holder = (MyViewHolder) page.getTag();
final int pageInAdapter = holder.mPageInAdapter;
final int pageInDocument = computePageIndexInDocument(pageInAdapter);
- View pageSelector = page.findViewById(R.id.page_selector);
if (mConfirmedPagesInDocument.indexOfKey(pageInDocument) < 0) {
mConfirmedPagesInDocument.put(pageInDocument, null);
- pageSelector.setSelected(true);
- page.animate().translationZ(mSelectedPageElevation)
- .alpha(mSelectedPageAlpha);
+ page.setSelected(true, true);
} else {
if (mConfirmedPagesInDocument.size() <= 1) {
return;
}
mConfirmedPagesInDocument.remove(pageInDocument);
- pageSelector.setSelected(false);
- page.animate().translationZ(mUnselectedPageElevation)
- .alpha(mUnselectedPageAlpha);
+ page.setSelected(false, true);
}
}
}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
index c517f2d9b225..dc2d5b1f2acd 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
@@ -61,6 +61,7 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
@@ -191,6 +192,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
private PrintContentView mOptionsContent;
+ private View mSummaryContainer;
private TextView mSummaryCopies;
private TextView mSummaryPaperSize;
@@ -219,8 +221,6 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setState(STATE_CONFIGURING);
-
Bundle extras = getIntent().getExtras();
mPrintJob = extras.getParcelable(PrintManager.EXTRA_PRINT_JOB);
@@ -284,11 +284,14 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
mFileProvider);
mPrintedDocument = new RemotePrintDocument(PrintActivity.this,
IPrintDocumentAdapter.Stub.asInterface(documentAdapter),
- mFileProvider, new RemotePrintDocument.DocumentObserver() {
+ mFileProvider, new RemotePrintDocument.RemoteAdapterDeathObserver() {
@Override
- public void onDestroy() {
+ public void onDied() {
+ if (isFinishing()) {
+ return;
+ }
setState(STATE_PRINT_CANCELED);
- finish();
+ doFinish();
}
}, PrintActivity.this);
mProgressMessageController = new ProgressMessageController(
@@ -311,13 +314,17 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
@Override
public void onPause() {
+ PrintSpoolerService spooler = mSpoolerProvider.getSpooler();
+
if (mState == STATE_INITIALIZING) {
+ if (isFinishing()) {
+ spooler.setPrintJobState(mPrintJob.getId(), PrintJobInfo.STATE_CANCELED, null);
+ }
super.onPause();
return;
}
if (isFinishing()) {
- PrintSpoolerService spooler = mSpoolerProvider.getSpooler();
spooler.updatePrintJobUserConfigurableOptionsNoPersistence(mPrintJob);
switch (mState) {
@@ -338,13 +345,6 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
spooler.setPrintJobState(mPrintJob.getId(), PrintJobInfo.STATE_CANCELED, null);
} break;
}
-
- mProgressMessageController.cancel();
- mPrinterRegistry.setTrackedPrinter(null);
- mPrintPreviewController.destroy();
- mSpoolerProvider.destroy();
- mPrintedDocument.finish();
- mPrintedDocument.destroy();
}
mPrinterAvailabilityDetector.cancel();
@@ -364,7 +364,13 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (mState == STATE_INITIALIZING) {
- return super.onKeyUp(keyCode, event);
+ doFinish();
+ return true;
+ }
+
+ if (mState == STATE_PRINT_CANCELED ||mState == STATE_PRINT_CONFIRMED
+ || mState == STATE_PRINT_COMPLETED) {
+ return true;
}
if (keyCode == KeyEvent.KEYCODE_BACK
@@ -421,7 +427,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
} break;
case STATE_PRINT_CANCELED: {
- finish();
+ doFinish();
} break;
}
}
@@ -458,7 +464,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
} break;
case STATE_PRINT_CANCELED: {
- finish();
+ doFinish();
} break;
default: {
@@ -591,7 +597,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
mDestinationSpinner.post(new Runnable() {
@Override
public void run() {
- finish();
+ doFinish();
}
});
}
@@ -953,7 +959,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
if (mPrintedDocument.isUpdating()) {
mPrintedDocument.cancel();
}
- finish();
+ doFinish();
}
private void confirmPrint() {
@@ -983,6 +989,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
private void bindUi() {
// Summary
+ mSummaryContainer = findViewById(R.id.summary_content);
mSummaryCopies = (TextView) findViewById(R.id.copies_count_summary);
mSummaryPaperSize = (TextView) findViewById(R.id.paper_size_summary);
@@ -1081,15 +1088,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
void updateOptionsUi() {
// Always update the summary.
- if (!TextUtils.isEmpty(mCopiesEditText.getText())) {
- mSummaryCopies.setText(mCopiesEditText.getText());
- }
-
- final int selectedMediaIndex = mMediaSizeSpinner.getSelectedItemPosition();
- if (selectedMediaIndex >= 0) {
- SpinnerItem<MediaSize> mediaItem = mMediaSizeSpinnerAdapter.getItem(selectedMediaIndex);
- mSummaryPaperSize.setText(mediaItem.label);
- }
+ updateSummary();
if (mState == STATE_PRINT_CONFIRMED
|| mState == STATE_PRINT_COMPLETED
@@ -1330,8 +1329,10 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
// Print
if (mDestinationSpinnerAdapter.getPdfPrinter() != mCurrentPrinter) {
mPrintButton.setImageResource(com.android.internal.R.drawable.ic_print);
+ mPrintButton.setContentDescription(getString(R.string.print_button));
} else {
mPrintButton.setImageResource(R.drawable.ic_menu_savetopdf);
+ mPrintButton.setContentDescription(getString(R.string.savetopdf_button));
}
if ((mRangeOptionsSpinner.getSelectedItemPosition() == 1
&& (TextUtils.isEmpty(mPageRangeEditText.getText()) || hasErrors()))
@@ -1357,6 +1358,28 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
}
}
+ private void updateSummary() {
+ CharSequence copiesText = null;
+ CharSequence mediaSizeText = null;
+
+ if (!TextUtils.isEmpty(mCopiesEditText.getText())) {
+ copiesText = mCopiesEditText.getText();
+ mSummaryCopies.setText(copiesText);
+ }
+
+ final int selectedMediaIndex = mMediaSizeSpinner.getSelectedItemPosition();
+ if (selectedMediaIndex >= 0) {
+ SpinnerItem<MediaSize> mediaItem = mMediaSizeSpinnerAdapter.getItem(selectedMediaIndex);
+ mediaSizeText = mediaItem.label;
+ mSummaryPaperSize.setText(mediaSizeText);
+ }
+
+ if (!TextUtils.isEmpty(copiesText) && !TextUtils.isEmpty(mediaSizeText)) {
+ String summaryText = getString(R.string.summary_template, copiesText, mediaSizeText);
+ mSummaryContainer.setContentDescription(summaryText);
+ }
+ }
+
private void updatePageRangeOptions(int pageCount) {
ArrayAdapter<SpinnerItem<Integer>> rangeOptionsSpinnerAdapter =
(ArrayAdapter) mRangeOptionsSpinner.getAdapter();
@@ -1513,11 +1536,23 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
if (writeToUri != null) {
mPrintedDocument.writeContent(getContentResolver(), writeToUri);
}
- finish();
+ doFinish();
}
}).shred();
}
+ private void doFinish() {
+ if (mState != STATE_INITIALIZING) {
+ mProgressMessageController.cancel();
+ mPrinterRegistry.setTrackedPrinter(null);
+ mPrintPreviewController.destroy();
+ mSpoolerProvider.destroy();
+ mPrintedDocument.finish();
+ mPrintedDocument.destroy();
+ }
+ finish();
+ }
+
private final class SpinnerItem<T> {
final T value;
final CharSequence label;
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java
index a3d7f01e6d7a..cbc568ae1e11 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java
@@ -68,23 +68,40 @@ public class PrinterRegistry {
}
public void addHistoricalPrinter(PrinterInfo printer) {
- getPrinterProvider().addHistoricalPrinter(printer);
+ FusedPrintersProvider provider = getPrinterProvider();
+ if (provider != null) {
+ getPrinterProvider().addHistoricalPrinter(printer);
+ }
}
public void forgetFavoritePrinter(PrinterId printerId) {
- getPrinterProvider().forgetFavoritePrinter(printerId);
+ FusedPrintersProvider provider = getPrinterProvider();
+ if (provider != null) {
+ provider.forgetFavoritePrinter(printerId);
+ }
}
public boolean isFavoritePrinter(PrinterId printerId) {
- return getPrinterProvider().isFavoritePrinter(printerId);
+ FusedPrintersProvider provider = getPrinterProvider();
+ if (provider != null) {
+ return provider.isFavoritePrinter(printerId);
+ }
+ return false;
}
public void setTrackedPrinter(PrinterId printerId) {
- getPrinterProvider().setTrackedPrinter(printerId);
+ FusedPrintersProvider provider = getPrinterProvider();
+ if (provider != null) {
+ provider.setTrackedPrinter(printerId);
+ }
}
public boolean areHistoricalPrintersLoaded() {
- return getPrinterProvider().areHistoricalPrintersLoaded();
+ FusedPrintersProvider provider = getPrinterProvider();
+ if (provider != null) {
+ return getPrinterProvider().areHistoricalPrintersLoaded();
+ }
+ return false;
}
private FusedPrintersProvider getPrinterProvider() {
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/CustomErrorEditText.java b/packages/PrintSpooler/src/com/android/printspooler/widget/CustomErrorEditText.java
new file mode 100644
index 000000000000..b2aa008d8353
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/CustomErrorEditText.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.printspooler.widget;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.widget.EditText;
+
+/**
+ * EditText that shows an error without a popup.
+ */
+public final class CustomErrorEditText extends EditText {
+ private CharSequence mError;
+
+ public CustomErrorEditText(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public CharSequence getError() {
+ return mError;
+ }
+
+ @Override
+ public void setError(CharSequence error, Drawable icon) {
+ setCompoundDrawables(null, null, icon, null);
+ mError = error;
+ }
+} \ No newline at end of file
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
index e2ae758c46e6..100011738c47 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
@@ -35,6 +35,7 @@ import com.android.printspooler.model.PageContentRepository.PageContentProvider;
*/
public class PageContentView extends View
implements PageContentRepository.OnPageContentAvailableCallback {
+
private PageContentProvider mProvider;
private MediaSize mMediaSize;
@@ -45,16 +46,12 @@ public class PageContentView extends View
private boolean mContentRequested;
- private boolean mNeedsLayout;
-
public PageContentView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- mNeedsLayout = false;
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
requestPageContentIfNeeded();
}
@@ -90,7 +87,6 @@ public class PageContentView extends View
mEmptyState = emptyState;
mContentRequested = false;
- mNeedsLayout = mNeedsLayout || mediaSizeChanged || marginsChanged;
// If there is no provider we want immediately to switch to
// the empty state, so pages with no content appear blank.
@@ -103,7 +99,7 @@ public class PageContentView extends View
private void requestPageContentIfNeeded() {
if (getWidth() > 0 && getHeight() > 0 && !mContentRequested
- && mProvider != null && !mNeedsLayout) {
+ && mProvider != null) {
mContentRequested = true;
mProvider.getPageContent(new RenderSpec(getWidth(), getHeight(),
mMediaSize, mMinMargins), this);
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PreviewPageFrame.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PreviewPageFrame.java
new file mode 100644
index 000000000000..feb03161c471
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PreviewPageFrame.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.printspooler.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.CompoundButton;
+import android.widget.LinearLayout;
+import com.android.printspooler.R;
+
+/**
+ * This class represents the frame of page in the print preview list
+ * that contains the page and a footer.
+ */
+public final class PreviewPageFrame extends LinearLayout {
+ private final float mSelectedElevation;
+ private final float mNotSelectedElevation;
+
+ private final float mSelectedPageAlpha;
+ private final float mNotSelectedAlpha;
+
+ public PreviewPageFrame(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mSelectedElevation = mContext.getResources().getDimension(
+ R.dimen.selected_page_elevation);
+ mNotSelectedElevation = mContext.getResources().getDimension(
+ R.dimen.unselected_page_elevation);
+ mSelectedPageAlpha = mContext.getResources().getFraction(
+ R.fraction.page_selected_alpha, 1, 1);
+ mNotSelectedAlpha = mContext.getResources().getFraction(
+ R.fraction.page_unselected_alpha, 1, 1);
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ event.setClassName(CompoundButton.class.getName());
+ event.setChecked(isSelected());
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setClassName(CompoundButton.class.getName());
+ info.setSelected(false);
+ info.setCheckable(true);
+ info.setChecked(isSelected());
+ }
+
+ public void setSelected(boolean selected, boolean animate) {
+ if (isSelected() == selected) {
+ return;
+ }
+ setSelected(selected);
+ if (selected) {
+ if (animate) {
+ animate().translationZ(mSelectedElevation)
+ .alpha(mSelectedPageAlpha);
+ } else {
+ setTranslationZ(mSelectedElevation);
+ setAlpha(mSelectedPageAlpha);
+ }
+ } else {
+ if (animate) {
+ animate().translationZ(mNotSelectedElevation)
+ .alpha(mNotSelectedAlpha);
+ } else {
+ setTranslationZ(mNotSelectedElevation);
+ setAlpha(mNotSelectedAlpha);
+ }
+ }
+ }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
index c84b06a09ca5..bfcd334fcae0 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
@@ -283,8 +283,13 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis
mDynamicContent.layout(left, dynContentTop, right, dynContentBottom);
MarginLayoutParams params = (MarginLayoutParams) mPrintButton.getLayoutParams();
- final int rightMargin = params.rightMargin;
- final int printButtonLeft = right - mPrintButton.getMeasuredWidth() - rightMargin;
+
+ final int printButtonLeft;
+ if (getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) {
+ printButtonLeft = right - mPrintButton.getMeasuredWidth() - params.getMarginStart();
+ } else {
+ printButtonLeft = left + params.getMarginStart();
+ }
final int printButtonTop = dynContentBottom - mPrintButton.getMeasuredHeight() / 2;
final int printButtonRight = printButtonLeft + mPrintButton.getMeasuredWidth();
final int printButtonBottom = printButtonTop + mPrintButton.getMeasuredHeight();
@@ -336,6 +341,9 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis
if (mOptionsStateChangeListener != null) {
mOptionsStateChangeListener.onOptionsOpened();
}
+ mExpandCollapseHandle.setContentDescription(
+ mContext.getString(R.string.collapse_handle));
+ announceForAccessibility(mContext.getString(R.string.print_options_expanded));
mSummaryContent.setVisibility(View.GONE);
mEmbeddedContentScrim.setOnClickListener(this);
mExpandCollapseIcon.setBackgroundResource(R.drawable.ic_expand_less);
@@ -347,6 +355,9 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis
if (mOptionsStateChangeListener != null) {
mOptionsStateChangeListener.onOptionsClosed();
}
+ mExpandCollapseHandle.setContentDescription(
+ mContext.getString(R.string.expand_handle));
+ announceForAccessibility(mContext.getString(R.string.print_options_collapsed));
if (mMoreOptionsButton.getVisibility() != View.GONE) {
mMoreOptionsButton.setVisibility(View.INVISIBLE);
}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java
index 71f4aa71d9c2..7a80a8bd426e 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java
@@ -89,7 +89,7 @@ public final class PrintOptionsLayout extends ViewGroup {
columnWidth - childParams.getMarginStart() - childParams.getMarginEnd(),
MeasureSpec.EXACTLY);
} else {
- childWidthMeasureSpec = getChildMeasureSpec(heightMeasureSpec,
+ childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec,
getPaddingStart() + getPaddingEnd() + width, childParams.width);
}
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index a3bed4f8ad3d..934ed38a26b6 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -193,9 +193,12 @@
<!-- Default for Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED, 1==on -->
<integer name="def_heads_up_enabled">1</integer>
- <!-- Default for Settings.Global.DEVICE_NAME $1=BRAND $2=MODEL-->
+ <!-- Default for Settings.Global.DEVICE_NAME $1=MANUFACTURER $2=MODEL-->
<string name="def_device_name">%1$s %2$s</string>
+ <!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
+ <string name="def_device_name_simple">%1$s</string>
+
<!-- Default for Settings.Secure.WAKE_GESTURE_ENABLED -->
<bool name="def_wake_gesture_enabled">true</bool>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 6d089708cfb9..873257c1ece0 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -70,7 +70,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
- private static final int DATABASE_VERSION = 111;
+ private static final int DATABASE_VERSION = 112;
private Context mContext;
private int mUserHandle;
@@ -1788,6 +1788,29 @@ public class DatabaseHelper extends SQLiteOpenHelper {
upgradeVersion = 111;
}
+ if (upgradeVersion < 112) {
+ if (mUserHandle == UserHandle.USER_OWNER) {
+ // When device name was added, we went with Manufacturer + Model, device name should
+ // actually be Model only.
+ // Update device name to Model if it wasn't modified by user.
+ db.beginTransaction();
+ SQLiteStatement stmt = null;
+ try {
+ stmt = db.compileStatement("UPDATE global SET value = ? "
+ + " WHERE name = ? AND value = ?");
+ stmt.bindString(1, getDefaultDeviceName()); // new default device name
+ stmt.bindString(2, Settings.Global.DEVICE_NAME);
+ stmt.bindString(3, getOldDefaultDeviceName()); // old default device name
+ stmt.execute();
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ if (stmt != null) stmt.close();
+ }
+ }
+ upgradeVersion = 112;
+ }
+
// *** Remember to update DATABASE_VERSION above!
if (upgradeVersion != currentVersion) {
@@ -2585,8 +2608,12 @@ public class DatabaseHelper extends SQLiteOpenHelper {
return defaultValue;
}
+ private String getOldDefaultDeviceName() {
+ return mContext.getResources().getString(R.string.def_device_name,
+ Build.MANUFACTURER, Build.MODEL);
+ }
+
private String getDefaultDeviceName() {
- return mContext.getResources().getString(R.string.def_device_name, Build.MANUFACTURER,
- Build.MODEL);
+ return mContext.getResources().getString(R.string.def_device_name_simple, Build.MODEL);
}
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 4ef21897ef6e..30ccd2c13650 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -789,8 +789,15 @@ public class SettingsProvider extends ContentProvider {
Slog.v(TAG, "putting to additional user "
+ mManagedProfiles.get(i).id);
}
- insertForUser(Settings.Secure.CONTENT_URI, values,
- mManagedProfiles.get(i).id);
+ try {
+ insertForUser(Settings.Secure.CONTENT_URI, values,
+ mManagedProfiles.get(i).id);
+ } catch (SecurityException e) {
+ // Temporary fix, see b/17450158
+ Slog.w(TAG, "Cannot clone request '" + request + "' with value '"
+ + newValue + "' to managed profile (id "
+ + mManagedProfiles.get(i).id + ")", e);
+ }
}
} finally {
Binder.restoreCallingIdentity(token);
diff --git a/packages/SystemUI/res/drawable/ic_account_circle_qs.xml b/packages/SystemUI/res/drawable/ic_account_circle_qs.xml
deleted file mode 100644
index d10a96d25e1d..000000000000
--- a/packages/SystemUI/res/drawable/ic_account_circle_qs.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- ~ Copyright (C) 2014 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
- -->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
-
- <group
- android:scaleX="1.2"
- android:scaleY="1.2"
- android:pivotX="12.0"
- android:pivotY="12.0">
- <path
- android:fillColor="@color/qs_user_detail_icon_muted"
- android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,5.0c1.7,0.0 3.0,1.3 3.0,3.0c0.0,1.7 -1.3,3.0 -3.0,3.0c-1.7,0.0 -3.0,-1.3 -3.0,-3.0C9.0,6.3 10.3,5.0 12.0,5.0zM12.0,19.2c-2.5,0.0 -4.7,-1.3 -6.0,-3.2c0.0,-2.0 4.0,-3.1 6.0,-3.1c2.0,0.0 6.0,1.1 6.0,3.1C16.7,17.9 14.5,19.2 12.0,19.2z"/>
- </group>
-</vector>
diff --git a/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml b/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
index b5983bb8cd95..c2733fb0aff2 100644
--- a/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
+++ b/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
@@ -59,7 +59,6 @@
android:src="@drawable/ic_sysbar_back"
systemui:keyCode="4"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_back"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
@@ -69,7 +68,6 @@
systemui:keyCode="3"
systemui:keyRepeat="true"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_home"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
@@ -77,7 +75,6 @@
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_recent"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_recent"
/>
<Space
@@ -98,7 +95,6 @@
systemui:keyCode="82"
android:visibility="invisible"
android:contentDescription="@string/accessibility_menu"
- android:background="@drawable/ripple_drawable"
/>
<com.android.systemui.statusbar.policy.KeyButtonView
android:id="@+id/ime_switcher"
@@ -108,8 +104,7 @@
android:scaleType="centerInside"
android:src="@drawable/ic_ime_switcher_default"
android:visibility="invisible"
- android:contentDescription="@string/accessibility_ime_switch_button"
- android:background="@drawable/ripple_drawable" />
+ android:contentDescription="@string/accessibility_ime_switch_button" />
</FrameLayout>
</LinearLayout>
@@ -205,7 +200,6 @@
android:src="@drawable/ic_sysbar_back"
systemui:keyCode="4"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_back"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
@@ -215,7 +209,6 @@
systemui:keyCode="3"
systemui:keyRepeat="true"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_home"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
@@ -223,7 +216,6 @@
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_recent"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_recent"
/>
<Space
@@ -243,9 +235,7 @@
android:src="@drawable/ic_sysbar_menu"
systemui:keyCode="82"
android:visibility="invisible"
- android:contentDescription="@string/accessibility_menu"
- android:background="@drawable/ripple_drawable"
- />
+ android:contentDescription="@string/accessibility_menu" />
<com.android.systemui.statusbar.policy.KeyButtonView
android:id="@+id/ime_switcher"
android:layout_width="@dimen/navigation_extra_key_width"
@@ -254,8 +244,7 @@
android:src="@drawable/ic_ime_switcher_default"
android:visibility="invisible"
android:contentDescription="@string/accessibility_ime_switch_button"
- android:scaleType="centerInside"
- android:background="@drawable/ripple_drawable" />
+ android:scaleType="centerInside" />
</FrameLayout>
</LinearLayout>
diff --git a/packages/SystemUI/res/layout/keyguard_user_switcher.xml b/packages/SystemUI/res/layout/keyguard_user_switcher.xml
index 7c918c2fa7e7..3730bbe1ee56 100644
--- a/packages/SystemUI/res/layout/keyguard_user_switcher.xml
+++ b/packages/SystemUI/res/layout/keyguard_user_switcher.xml
@@ -14,7 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<com.android.systemui.statusbar.AlphaOptimizedLinearLayout
+<com.android.keyguard.AlphaOptimizedLinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyguard_user_switcher"
android:orientation="vertical"
@@ -23,4 +23,4 @@
android:gravity="end"
android:visibility="gone"
android:paddingTop="4dp">
-</com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
+</com.android.keyguard.AlphaOptimizedLinearLayout>
diff --git a/packages/SystemUI/res/layout/navigation_bar.xml b/packages/SystemUI/res/layout/navigation_bar.xml
index a165940616ba..16027d96f0c0 100644
--- a/packages/SystemUI/res/layout/navigation_bar.xml
+++ b/packages/SystemUI/res/layout/navigation_bar.xml
@@ -55,7 +55,6 @@
systemui:keyCode="4"
android:layout_weight="0"
android:scaleType="center"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_back"
/>
<View
@@ -71,7 +70,6 @@
systemui:keyCode="3"
systemui:keyRepeat="false"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_home"
/>
<View
@@ -85,7 +83,6 @@
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_recent"
android:layout_weight="0"
- android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_recent"
/>
<FrameLayout
@@ -99,7 +96,6 @@
android:contentDescription="@string/accessibility_menu"
android:src="@drawable/ic_sysbar_menu"
android:visibility="invisible"
- android:background="@drawable/ripple_drawable"
systemui:keyCode="82" />
<com.android.systemui.statusbar.policy.KeyButtonView
@@ -109,8 +105,7 @@
android:contentDescription="@string/accessibility_ime_switch_button"
android:scaleType="centerInside"
android:src="@drawable/ic_ime_switcher_default"
- android:visibility="invisible"
- android:background="@drawable/ripple_drawable" />
+ android:visibility="invisible" />
</FrameLayout>
</LinearLayout>
@@ -202,8 +197,7 @@
android:contentDescription="@string/accessibility_ime_switch_button"
android:scaleType="centerInside"
android:src="@drawable/ic_ime_switcher_default"
- android:visibility="invisible"
- android:background="@drawable/ripple_drawable" />
+ android:visibility="invisible" />
<com.android.systemui.statusbar.policy.KeyButtonView
android:id="@+id/menu"
@@ -212,7 +206,6 @@
android:contentDescription="@string/accessibility_menu"
android:src="@drawable/ic_sysbar_menu_land"
android:visibility="invisible"
- android:background="@drawable/ripple_drawable"
systemui:keyCode="82" />
</FrameLayout>
@@ -222,7 +215,6 @@
android:src="@drawable/ic_sysbar_recent_land"
android:layout_weight="0"
android:contentDescription="@string/accessibility_recent"
- android:background="@drawable/ripple_drawable"
/>
<View
android:layout_height="match_parent"
@@ -238,7 +230,6 @@
systemui:keyRepeat="false"
android:layout_weight="0"
android:contentDescription="@string/accessibility_home"
- android:background="@drawable/ripple_drawable"
/>
<View
android:layout_height="match_parent"
@@ -254,7 +245,6 @@
systemui:keyCode="4"
android:layout_weight="0"
android:contentDescription="@string/accessibility_back"
- android:background="@drawable/ripple_drawable"
/>
<View
android:layout_height="40dp"
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index 0d414f979fe3..245c128632a3 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -57,7 +57,7 @@
>
<!-- The alpha of this area is both controlled from PhoneStatusBarTransitions and
PhoneStatusBar (DISABLE_NOTIFICATION_ICONS), so we need two views here. -->
- <com.android.systemui.statusbar.AlphaOptimizedLinearLayout
+ <com.android.keyguard.AlphaOptimizedLinearLayout
android:id="@+id/notification_icon_area_inner"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -74,10 +74,10 @@
android:layout_alignParentStart="true"
android:gravity="center_vertical"
android:orientation="horizontal"/>
- </com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
+ </com.android.keyguard.AlphaOptimizedLinearLayout>
</com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
- <com.android.systemui.statusbar.AlphaOptimizedLinearLayout android:id="@+id/system_icon_area"
+ <com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/system_icon_area"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
@@ -94,7 +94,7 @@
android:paddingStart="7dp"
android:gravity="center_vertical|start"
/>
- </com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
+ </com.android.keyguard.AlphaOptimizedLinearLayout>
</LinearLayout>
<ViewStub
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index 34e062c062dd..7ea91454d175 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -44,7 +44,7 @@
android:scaleType="centerInside"/>
</com.android.systemui.statusbar.phone.MultiUserSwitch>
- <ImageButton android:id="@+id/settings_button"
+ <com.android.keyguard.AlphaOptimizedImageButton android:id="@+id/settings_button"
style="@android:style/Widget.Material.Button.Borderless"
android:layout_toStartOf="@id/multi_user_switch"
android:layout_width="48dp"
diff --git a/packages/SystemUI/res/layout/system_icons.xml b/packages/SystemUI/res/layout/system_icons.xml
index 8f25d9996b16..21386ef98054 100644
--- a/packages/SystemUI/res/layout/system_icons.xml
+++ b/packages/SystemUI/res/layout/system_icons.xml
@@ -20,7 +20,7 @@
android:layout_height="match_parent"
android:gravity="center_vertical">
- <com.android.systemui.statusbar.AlphaOptimizedLinearLayout android:id="@+id/statusIcons"
+ <com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/statusIcons"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 215d0f19c91e..a3a3f036b37b 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Ligging deur GPS gestel"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Liggingversoeke aktief"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Verwyder alle kennisgewings."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Instellings"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Die skerm sal outomaties draai."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skerm is in landskapsoriëntasie gesluit."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skerm is in portretoriëntasie gesluit."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Alles"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Laai tans (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> tot vol)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Wissel gebruiker"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Wissel gebruiker, huidige gebruiker <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Wys profiel"</string>
<string name="user_add_user" msgid="5110251524486079492">"Voeg gebruiker by"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nuwe gebruiker"</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 23f91361ef67..f3ea08991532 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"በ GPS የተዘጋጀ ሥፍራ"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"የአካባቢ ጥያቄዎች ነቅተዋል"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"ሁሉንም ማሳወቂያዎች አጽዳ"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"ቅንብሮች"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"ማያ ገጽ በራስ ሰር ይዞራል።"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ማያ ገጽ በወርድ ገፅ አቀማመጥ ተቆልፏል።"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ማያ ገጽ በቁም ገፅ አቀማመጥ ተቆልፏል።"</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"ሁሉም"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"ሃይል በመሙላት ላይ (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> እስከሚሞላ ድረስ)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"ተጠቃሚ ቀይር"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"መገለጫ አሳይ"</string>
<string name="user_add_user" msgid="5110251524486079492">"ተጠቃሚ አክል"</string>
<string name="user_new_user_name" msgid="426540612051178753">"አዲስ ተጠቃሚ"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 6416006bd538..9bfb0359c5a5 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"‏تم تعيين الموقع بواسطة GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"طلبات الموقع نشطة"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"محو جميع الإشعارات."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"الإعدادات"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"سيتم تدوير الشاشة تلقائيًا."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"تم تأمين الشاشة في الاتجاه الأفقي."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"تم تأمين الشاشة في الاتجاه العمودي."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"الكل"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"جارٍ الشحن (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> حتى الامتلاء)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"تبديل المستخدم"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"تبديل المستخدم، المستخدم الحالي <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"عرض الملف الشخصي"</string>
<string name="user_add_user" msgid="5110251524486079492">"إضافة مستخدم"</string>
<string name="user_new_user_name" msgid="426540612051178753">"مستخدم جديد"</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index ee27bb2c83c6..e2f29050ff05 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Местоположението е зададено от GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Активни заявки за местоположение"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Изчистване на всички известия."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Настройки"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екранът ще се завърта автоматично."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екранът е заключен в хоризонтална ориентация."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екранът е заключен във вертикална ориентация."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Всички"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Зарежда се (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> до пълно зареждане)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Превключване между потребителите"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Показване на потребителския профил"</string>
<string name="user_add_user" msgid="5110251524486079492">"Добавяне на потребител"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Нов потребител"</string>
diff --git a/packages/SystemUI/res/values-bn-rBD/strings.xml b/packages/SystemUI/res/values-bn-rBD/strings.xml
index 812b19c61c22..8e87c94fd589 100644
--- a/packages/SystemUI/res/values-bn-rBD/strings.xml
+++ b/packages/SystemUI/res/values-bn-rBD/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS এর দ্বারা সেট করা অবস্থান"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"অবস্থান অনুরোধ সক্রিয় রয়েছে"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"সমস্ত বিজ্ঞপ্তি সাফ করুন৷"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"সেটিংস"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"স্ক্রীন স্বয়ংক্রিয়ভাবে ঘুরে যাবে৷"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ভূদৃশ্য সজ্জাতে স্ক্রীন লক করা আছে৷"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"প্রতিকৃতি সজ্জাতে স্ক্রীন লক করা আছে৷"</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"সমস্ত"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"চার্জ হচ্ছে (পূর্ণ হতে <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> সময় বাকি)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"ব্যবহারকারী পাল্টে দিন"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"ব্যবহারকারী পাল্টান, বর্তমান ব্যবহারকারী <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"প্রোফাইল দেখান"</string>
<string name="user_add_user" msgid="5110251524486079492">"ব্যবহারকারী জুড়ুন"</string>
<string name="user_new_user_name" msgid="426540612051178753">"নতুন ব্যবহারকারী"</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index ee20ce983858..1399cd75a8b1 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"S\'ha establert la ubicació per GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Sol·licituds d\'ubicació actives"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Esborra totes les notificacions."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Configuració"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girarà automàticament."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"La pantalla està bloquejada en orientació horitzontal."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla està bloquejada en orientació vertical."</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Totes"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Carregant (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> per completar la càrrega)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Canvia d\'usuari"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Canvia l\'usuari. Usuari actual: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Mostra el perfil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Afegeix un usuari"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Usuari nou"</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 89911adb4815..00ee3e1c0f04 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -44,7 +44,7 @@
<string name="battery_saver_start_action" msgid="5576697451677486320">"Zapnout úsporu baterie"</string>
<string name="status_bar_settings_settings_button" msgid="3023889916699270224">"Nastavení"</string>
<string name="status_bar_settings_wifi_button" msgid="1733928151698311923">"Wi-Fi"</string>
- <string name="status_bar_settings_airplane" msgid="4879879698500955300">"Režim V letadle"</string>
+ <string name="status_bar_settings_airplane" msgid="4879879698500955300">"Režim Letadlo"</string>
<string name="status_bar_settings_auto_rotation" msgid="3790482541357798421">"Autom. otočení obrazovky"</string>
<string name="status_bar_settings_mute_label" msgid="554682549917429396">"ZTLUM."</string>
<string name="status_bar_settings_auto_brightness_label" msgid="511453614962324674">"AUTOM."</string>
@@ -144,8 +144,8 @@
<string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string>
<string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string>
<string name="accessibility_no_sim" msgid="8274017118472455155">"Žádná SIM karta."</string>
- <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Tethering přes Bluetooth."</string>
- <string name="accessibility_airplane_mode" msgid="834748999790763092">"Režim V letadle."</string>
+ <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Sdílené připojení přes Bluetooth."</string>
+ <string name="accessibility_airplane_mode" msgid="834748999790763092">"Režim Letadlo."</string>
<!-- String.format failed for translation -->
<!-- no translation found for accessibility_battery_level (7451474187113371965) -->
<skip />
@@ -174,10 +174,10 @@
<string name="accessibility_quick_settings_wifi_changed_on" msgid="6440117170789528622">"Připojení Wi-Fi je zapnuto."</string>
<string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Mobil: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string>
<string name="accessibility_quick_settings_battery" msgid="1480931583381408972">"Baterie: <xliff:g id="STATE">%s</xliff:g>."</string>
- <string name="accessibility_quick_settings_airplane_off" msgid="7786329360056634412">"Režim V letadle je vypnutý."</string>
- <string name="accessibility_quick_settings_airplane_on" msgid="6406141469157599296">"Režim V letadle je zapnutý."</string>
- <string name="accessibility_quick_settings_airplane_changed_off" msgid="66846307818850664">"Režim V letadle je vypnutý."</string>
- <string name="accessibility_quick_settings_airplane_changed_on" msgid="8983005603505087728">"Režim V letadle je zapnutý."</string>
+ <string name="accessibility_quick_settings_airplane_off" msgid="7786329360056634412">"Režim Letadlo je vypnutý."</string>
+ <string name="accessibility_quick_settings_airplane_on" msgid="6406141469157599296">"Režim Letadlo je zapnutý."</string>
+ <string name="accessibility_quick_settings_airplane_changed_off" msgid="66846307818850664">"Režim Letadlo je vypnutý."</string>
+ <string name="accessibility_quick_settings_airplane_changed_on" msgid="8983005603505087728">"Režim Letadlo je zapnutý."</string>
<string name="accessibility_quick_settings_bluetooth_off" msgid="2133631372372064339">"Rozhraní Bluetooth je vypnuto."</string>
<string name="accessibility_quick_settings_bluetooth_on" msgid="7681999166216621838">"Rozhraní Bluetooth je zapnuto."</string>
<string name="accessibility_quick_settings_bluetooth_connecting" msgid="6953242966685343855">"Probíhá připojování rozhraní Bluetooth."</string>
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Poloha nastavena pomocí systému GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aktivní žádosti o polohu"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazat všechna oznámení."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Nastavení"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka se automaticky otočí."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Obrazovka je uzamčena v orientaci na šířku."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Obrazovka je uzamčena v orientaci na výšku."</string>
@@ -224,7 +227,7 @@
<string name="dessert_case" msgid="1295161776223959221">"Pult se sladkostmi"</string>
<string name="start_dreams" msgid="7219575858348719790">"Spořič obrazovky"</string>
<string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
- <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Režim V letadle"</string>
+ <string name="quick_settings_airplane_mode_label" msgid="5510520633448831350">"Režim Letadlo"</string>
<string name="quick_settings_battery_charging_label" msgid="490074774465309209">"Nabíjení, <xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="quick_settings_battery_charged_label" msgid="8865413079414246081">"Nabito"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Vše"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Nabíjení (plně nabito za <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Přepnout uživatele"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Přepnout uživatele, aktuální uživatel: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Zobrazit profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Přidat uživatele"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nový uživatel"</string>
@@ -324,7 +328,7 @@
<item quantity="other" msgid="6924190729213550991">"Na %d min"</item>
</plurals>
<plurals name="zen_mode_duration_hours">
- <item quantity="one" msgid="3480040795582254384">"Na jednu hodinu"</item>
+ <item quantity="one" msgid="3480040795582254384">"Na 1 h"</item>
<item quantity="other" msgid="5408537517529822157">"Na %d h"</item>
</plurals>
<string name="battery_saver_notification_title" msgid="237918726750955859">"Režim Úspora baterie je zapnutý."</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index a4b36ed11e70..50866d7d75a1 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Placeringen er angivet ved hjælp af GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aktive placeringsanmodninger"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Ryd alle underretninger."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Indstillinger"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skærmen roterer automatisk."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skærmen er nu låst i liggende retning."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skærmen er nu låst i stående retning."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Alle"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Opladning (fuldt opladet om <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Skift bruger"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Vis profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Tilføj bruger"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Ny bruger"</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 4675c8f725ed..b9e39e1b1c86 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Standort durch GPS festgelegt"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Standortanfragen aktiv"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Alle Benachrichtigungen löschen"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Einstellungen"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Bildschirm wird automatisch gedreht."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Bildschirm bleibt im Querformat."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Bildschirm bleibt im Hochformat."</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Alle"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Wird aufgeladen (voll in <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Nutzer wechseln"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Nutzer wechseln. Aktueller Nutzer: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Profil öffnen"</string>
<string name="user_add_user" msgid="5110251524486079492">"Nutzer hinzufügen"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Neuer Nutzer"</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 02f0ca0e65f5..56c41a2030a3 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Ρύθμιση τοποθεσίας με GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Τα αιτήματα τοποθεσίας έχουν ενεργοποιηθεί"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Εκκαθάριση όλων των ειδοποιήσεων."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Ρυθμίσεις"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Θα γίνεται αυτόματη περιστροφή της οθόνης."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Η οθόνη έχει κλειδωθεί σε οριζόντιο προσανατολισμό."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Η οθόνη έχει κλειδωθεί σε κατακόρυφο προσανατολισμό."</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Όλα"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Φόρτιση (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> για πλήρη φόρτιση)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Εναλλαγή χρήστη"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Εναλλαγή χρήστη, τρέχων χρήστης <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Εμφάνιση προφίλ"</string>
<string name="user_add_user" msgid="5110251524486079492">"Προσθήκη χρήστη"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Νέος χρήστης"</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index ffbdcb9d90f9..a4abdca07736 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -212,7 +212,8 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Location set by GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Location requests active"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Clear all notifications."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Settings"</string>
+ <string name="status_bar_notification_inspect_item_title" msgid="5668348142410115323">"Notification settings"</string>
+ <string name="status_bar_notification_app_settings_title" msgid="5525260160341558869">"<xliff:g id="APP_NAME">%s</xliff:g> settings"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Screen will rotate automatically."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Screen is locked in landscape orientation."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Screen is locked in portrait orientation."</string>
@@ -304,6 +305,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"All"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Charging (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> until full)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Switch user"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Switch user, current user <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Show profile"</string>
<string name="user_add_user" msgid="5110251524486079492">"Add user"</string>
<string name="user_new_user_name" msgid="426540612051178753">"New user"</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index ffbdcb9d90f9..a4abdca07736 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -212,7 +212,8 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Location set by GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Location requests active"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Clear all notifications."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Settings"</string>
+ <string name="status_bar_notification_inspect_item_title" msgid="5668348142410115323">"Notification settings"</string>
+ <string name="status_bar_notification_app_settings_title" msgid="5525260160341558869">"<xliff:g id="APP_NAME">%s</xliff:g> settings"</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Screen will rotate automatically."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Screen is locked in landscape orientation."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Screen is locked in portrait orientation."</string>
@@ -304,6 +305,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"All"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Charging (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> until full)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Switch user"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Switch user, current user <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Show profile"</string>
<string name="user_add_user" msgid="5110251524486079492">"Add user"</string>
<string name="user_new_user_name" msgid="426540612051178753">"New user"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 9b1f2afeb032..8a717718a084 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"La ubicación se estableció por GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Solicitudes de ubicación activas"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Eliminar todas las notificaciones"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Configuración"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girará automáticamente."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"La pantalla está bloqueada en modo horizontal."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla está bloqueada en modo vertical."</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Todo"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Cargando (faltan <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> para completar)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Cambiar usuario"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Mostrar perfil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Agregar usuario"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Usuario nuevo"</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 03fde101d248..c3feb3ae8b1b 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Ubicación definida por GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Solicitudes de ubicación activas"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Borrar todas las notificaciones"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Ajustes"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girará automáticamente."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"La pantalla está bloqueada en modo horizontal."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla está bloqueada en modo vertical."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Todo"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Cargando (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> hasta completar)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Cambiar de usuario"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Cambiar de usuario (usuario actual <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Mostrar perfil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Añadir usuario"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nuevo usuario"</string>
diff --git a/packages/SystemUI/res/values-et-rEE/strings.xml b/packages/SystemUI/res/values-et-rEE/strings.xml
index 951757a42375..94e67fad928d 100644
--- a/packages/SystemUI/res/values-et-rEE/strings.xml
+++ b/packages/SystemUI/res/values-et-rEE/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS-i määratud asukoht"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Asukoha taotlused on aktiivsed"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Kustuta kõik teatised."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Seaded"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekraani pööramine toimub automaatselt."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekraan on lukustatud horisontaalsuunas."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekraan on lukustatud vertikaalsuunas."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Kõik"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Laadimine (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>, kuni seade on täis)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Kasutaja vahetamine"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Kasutaja vahetamine, praegune kasutaja: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Kuva profiil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Kasutaja lisamine"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Uus kasutaja"</string>
diff --git a/packages/SystemUI/res/values-eu-rES/strings.xml b/packages/SystemUI/res/values-eu-rES/strings.xml
index 5226b9c87c90..7ff92975ba81 100644
--- a/packages/SystemUI/res/values-eu-rES/strings.xml
+++ b/packages/SystemUI/res/values-eu-rES/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Kokapena GPS bidez ezarri da"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aplikazioen kokapen-eskaerak aktibo daude"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Garbitu jakinarazpen guztiak."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Ezarpenak"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Pantaila automatikoki biratuko da."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Pantaila horizontalki blokeatuta dago."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Pantaila bertikalki blokeatuta dago."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Guztiak"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Kargatzen (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> guztiz kargatu arte)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Aldatu erabiltzailea"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Aldatu erabiltzailez. <xliff:g id="CURRENT_USER_NAME">%s</xliff:g> da saioa hasita duena."</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Erakutsi profila"</string>
<string name="user_add_user" msgid="5110251524486079492">"Gehitu erabiltzailea"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Erabiltzaile berria"</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 9f63781fe8f7..4cc5882a6c10 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"‏مکان تنظیم شده توسط GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"درخواست‌های موقعیت مکانی فعال است"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"پاک کردن تمام اعلان‌ها"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"تنظیمات"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"صفحه به صورت خودکار می‌چرخد."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"صفحه اکنون در جهت افقی قفل است."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"صفحه اکنون در جهت عمودی قفل است."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"همه"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"در حال شارژ (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> تا شارژ کامل)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"تغییر کاربر"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"تعویض کاربر، کاربر کنونی <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"نمایش نمایه"</string>
<string name="user_add_user" msgid="5110251524486079492">"افزودن کاربر"</string>
<string name="user_new_user_name" msgid="426540612051178753">"کاربر جدید"</string>
@@ -328,7 +332,7 @@
<string name="battery_saver_notification_title" msgid="237918726750955859">"ذخیره کننده باتری روشن است."</string>
<string name="battery_saver_notification_text" msgid="820318788126672692">"عملکرد و اطلاعات پس‌زمینه را کاهش می‌دهد"</string>
<string name="battery_saver_notification_action_text" msgid="109158658238110382">"خاموش کردن ذخیره‌کننده باتری"</string>
- <string name="battery_level_template" msgid="1609636980292580020">"<xliff:g id="LEVEL">%d</xliff:g>٪٪"</string>
+ <string name="battery_level_template" msgid="1609636980292580020">"<xliff:g id="LEVEL">%d</xliff:g>%%"</string>
<string name="notification_hidden_text" msgid="1135169301897151909">"محتواها پنهان هستند"</string>
<string name="media_projection_dialog_text" msgid="3071431025448218928">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> شروع به ضبط هر چیزی می‌کند که در صفحه‌نمایش شما نمایش داده می‌شود."</string>
<string name="media_projection_remember_text" msgid="3103510882172746752">"دوباره نشان داده نشود"</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index e2dd843b7078..0b29e490852f 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Sijainti määritetty GPS:n avulla"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Sijaintipyynnöt aktiiviset"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Tyhjennä kaikki ilmoitukset."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Asetukset"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ruutu kääntyy automaattisesti."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ruutu on lukittu vaakasuuntaan."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ruutu on lukittu pystysuuntaan."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Kaikki"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Ladataan (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> kunnes täynnä)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Vaihda käyttäjää"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Näytä profiili"</string>
<string name="user_add_user" msgid="5110251524486079492">"Lisää käyttäjä"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Uusi käyttäjä"</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index 71f042db4289..71477272ddd1 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Position définie par GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Demandes de localisation actives"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Supprimer toutes les notifications"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Paramètres"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"L\'écran pivote automatiquement."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"L\'écran est verrouillé en mode paysage."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"L\'écran est verrouillé en mode portrait."</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Tous"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Charge en cours... (chargée à 100 % dans <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Changer d\'utilisateur"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Afficher le profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Ajouter un utilisateur"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nouvel utilisateur"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index a85b2094680e..1020c2733ff2 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Position définie par GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Demandes de localisation actives"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Supprimer toutes les notifications"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Paramètres"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"L\'écran pivote automatiquement."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"L\'écran est verrouillé en mode paysage."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"L\'écran est verrouillé en mode portrait."</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Toutes"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Charge en cours… (chargé à 100 %% dans <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Changer d\'utilisateur"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Changer d\'utilisateur (utilisateur actuel : <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Afficher le profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Ajouter un utilisateur"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nouvel utilisateur"</string>
diff --git a/packages/SystemUI/res/values-gl-rES/strings.xml b/packages/SystemUI/res/values-gl-rES/strings.xml
index 3d7f2a17ae9b..ad4816089dcf 100644
--- a/packages/SystemUI/res/values-gl-rES/strings.xml
+++ b/packages/SystemUI/res/values-gl-rES/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Localización establecida polo GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Solicitudes de localización activas"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Eliminar todas as notificacións."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Configuración"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A pantalla xirará automaticamente."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"A pantalla está bloqueada en orientación horizontal."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A pantalla está bloqueada en orientación vertical."</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Sempre"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Cargando (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> para finalizar a carga)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Cambiar usuario"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Mostrar perfil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Engadir usuario"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Novo usuario"</string>
diff --git a/packages/SystemUI/res/values-h650dp/config.xml b/packages/SystemUI/res/values-h650dp/config.xml
new file mode 100644
index 000000000000..ee641b4b6edd
--- /dev/null
+++ b/packages/SystemUI/res/values-h650dp/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2014 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>
+ <!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow
+ card. -->
+ <integer name="keyguard_max_notification_count">5</integer>
+</resources>
+
diff --git a/packages/SystemUI/res/values-h650dp/dimens.xml b/packages/SystemUI/res/values-h650dp/dimens.xml
new file mode 100644
index 000000000000..fbfca4671554
--- /dev/null
+++ b/packages/SystemUI/res/values-h650dp/dimens.xml
@@ -0,0 +1,23 @@
+<!--
+ ~ Copyright (C) 2014 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>
+ <dimen name="keyguard_clock_notifications_margin_min">32dp</dimen>
+ <dimen name="keyguard_clock_notifications_margin_max">36dp</dimen>
+
+ <fraction name="keyguard_clock_y_fraction_max">32.5%</fraction>
+ <fraction name="keyguard_clock_y_fraction_min">18.5%</fraction>
+</resources> \ No newline at end of file
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 99c5153d3fb6..a1df1e0d9839 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS द्वारा सेट किया गया स्‍थान"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"स्थान अनुरोध सक्रिय"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"सभी सूचनाएं साफ़ करें."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"सेटिंग"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"स्‍क्रीन स्‍वचालित रूप से घूमेगी."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"स्‍क्रीन लैंडस्केप अभिविन्यास में लॉक है."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"स्‍क्रीन पोर्ट्रेट अभिविन्‍यास में लॉक है."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"सभी"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"चार्ज हो रहा है (पूर्ण होने में <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> शेष)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"उपयोगकर्ता स्विच करें"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"उपयोगकर्ता स्विच करें, वर्तमान उपयोगकर्ता <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"प्रोफ़ाइल दिखाएं"</string>
<string name="user_add_user" msgid="5110251524486079492">"उपयोगकर्ता जोड़ें"</string>
<string name="user_new_user_name" msgid="426540612051178753">"नया उपयोगकर्ता"</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index a35fed5b9fb6..247bcec6d9ed 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokaciju utvrdio GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Zahtjevi za lokaciju aktivni su"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Brisanje svih obavijesti."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Postavke"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Zaslon će se automatski zakrenuti."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Zaslon je zaključan u pejzažnoj orijentaciji."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Zaslon je zaključan u portretnoj orijentaciji."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Sve"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Punjenje (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> do napunjenosti)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Promjena korisnika"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Prikaz profila"</string>
<string name="user_add_user" msgid="5110251524486079492">"Dodavanje korisnika"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Novi korisnik"</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 450775479ea4..42dc82dc134e 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"A GPS beállította a helyet"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aktív helylekérések"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Minden értesítés törlése"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Beállítások"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A képernyő automatikusan forogni fog."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"A képernyő zárolva van fekvő tájolásban."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A képernyő zárolva van álló tájolásban."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Összes"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Töltés (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> a teljes töltöttségig)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Felhasználóváltás"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Felhasználóváltás (a jelenlegi felhasználó: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Profil megjelenítése"</string>
<string name="user_add_user" msgid="5110251524486079492">"Felhasználó hozzáadása"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Új felhasználó"</string>
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy-rAM/strings.xml
index af20b983c953..1a96a432da3e 100644
--- a/packages/SystemUI/res/values-hy-rAM/strings.xml
+++ b/packages/SystemUI/res/values-hy-rAM/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Տեղադրությունը կարգավորվել է GPS-ի կողմից"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Տեղադրության հարցումներն ակտիվ են"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Մաքրել բոլոր ծանուցումները:"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Կարգավորումներ"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Էկրանը ինքնուրույն կպտտվի:"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Էկրանը կողպված է հորիզոնական դիրքավորման մեջ:"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Էկրանը կողպված է ուղղաձիգ դիրքավորմամբ:"</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Բոլորը"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Լիցքավորում (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> մինչև լրիվ լիցքավորումը)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Անջատել օգտվողին"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Ցույց տալ դիտարկումը"</string>
<string name="user_add_user" msgid="5110251524486079492">"Ավելացնել օգտվող"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Նոր օգտվող"</string>
@@ -336,10 +341,10 @@
<string name="media_projection_action_text" msgid="8470872969457985954">"Մեկնարկել հիմա"</string>
<string name="empty_shade_text" msgid="708135716272867002">"Ծանուցումներ չկան"</string>
<string name="device_owned_footer" msgid="3802752663326030053">"Սարքը կարող է վերահսկվել"</string>
- <string name="profile_owned_footer" msgid="8021888108553696069">"Պրոֆիլը կարող է մշտադիտարկվել"</string>
+ <string name="profile_owned_footer" msgid="8021888108553696069">"Պրոֆիլը կարող է վերահսկվել"</string>
<string name="vpn_footer" msgid="2388611096129106812">"Ցանցը կարող է վերահսկվել"</string>
<string name="monitoring_title_device_owned" msgid="7121079311903859610">"Սարքի մշտադիտարկում"</string>
- <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Պրոֆիլի մշտադիտարկում"</string>
+ <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Պրոֆիլի վերահսկում"</string>
<string name="monitoring_title" msgid="169206259253048106">"Ցանցի մշտադիտարկում"</string>
<string name="disable_vpn" msgid="4435534311510272506">"Անջատել VPN-ը"</string>
<string name="disconnect_vpn" msgid="1324915059568548655">"Անջատել VPN-ը"</string>
@@ -348,15 +353,15 @@
<string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Դուք միացած եք VPN-ին («<xliff:g id="APPLICATION">%1$s</xliff:g>»):\n\nՁեզ VPN ծառայություն մատուցողը կարող է վերահսկել ձեր սարքի և ցանցի գործունեությունը, այդ թվում` նամակները, ծրագրերը և վստահելի կայքերը:"</string>
<string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Այս սարքը կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:\n\n Բացի այդ, դուք «<xliff:g id="APPLICATION">%2$s</xliff:g>» ծրագրին թույլատրել եք ստեղծել VPN կապ: Այդ ծրագիրը նույնպես կարող է վերահսկել ձեր ցանցային գործունեությունը:"</string>
<string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Այս սարքը կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:\n\nԲացի այդ, դուք միացած եք VPN-ին («<xliff:g id="APPLICATION">%2$s</xliff:g>»): Ձեզ VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
- <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը:\n\nԼրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:"</string>
- <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը:\n\nՀավելյալ տեղեկությունների համար դիմեք ադմինիստրատորին:"</string>
- <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև «<xliff:g id="APPLICATION">%2$s</xliff:g>» ծրագրին թույլատրել եք ստեղծել VPN: Այն նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
- <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:\n\nԴուք նաև միացած եք VPN-ին («<xliff:g id="APPLICATION">%2$s</xliff:g>»): VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
- <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև «<xliff:g id="APPLICATION">%3$s</xliff:g>»-ին թույլատրել եք ստեղծել VPN: Այն նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
- <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը: Այլ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև միացած եք VPN-ին («<xliff:g id="APPLICATION">%3$s</xliff:g>»): VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+ <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, հավելվածները և վստահելի կայքերը:\n\nԼրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:"</string>
+ <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր սարքի և ցանցի գործունեությունը՝ նամակները, հավելվածները և վստահելի կայքերը:\n\nՀավելյալ տեղեկությունների համար դիմեք ադմինիստրատորին:"</string>
+ <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, հավելվածները և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև «<xliff:g id="APPLICATION">%2$s</xliff:g>» հավելվածին թույլատրել եք ստեղծել VPN: Այն նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+ <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, հավելվածները և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:\n\nԴուք նաև միացած եք VPN-ին («<xliff:g id="APPLICATION">%2$s</xliff:g>»): VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+ <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, հավելվածները և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև «<xliff:g id="APPLICATION">%3$s</xliff:g>»-ին թույլատրել եք ստեղծել VPN: Այն նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+ <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, հավելվածները և վստահելի կայքերը: Այլ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև միացած եք VPN-ին («<xliff:g id="APPLICATION">%3$s</xliff:g>»): VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
<string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Սարքը կմնա արգելափակված՝ մինչև ձեռքով չբացեք"</string>
- <string name="hidden_notifications_title" msgid="7139628534207443290">"Ստանալ ծանուցումներն ավելի արագ"</string>
- <string name="hidden_notifications_text" msgid="2326409389088668981">"Տեսեք դրանք՝ մինչև ապակողպելը"</string>
+ <string name="hidden_notifications_title" msgid="7139628534207443290">"Ավելի արագ ստացեք ծանուցումները"</string>
+ <string name="hidden_notifications_text" msgid="2326409389088668981">"Տեսեք դրանք մինչև ապակողպելը"</string>
<string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ոչ, շնորհակալություն"</string>
<string name="hidden_notifications_setup" msgid="41079514801976810">"Կարգավորել"</string>
<string name="muted_by" msgid="6147073845094180001">"Համրեցվել է <xliff:g id="THIRD_PARTY">%1$s</xliff:g>-ի կողմից"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 6c3502ba8515..910b500e2c9f 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasi yang disetel oleh GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Permintaan lokasi aktif"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Menghapus semua pemberitahuan."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Setelan"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Layar akan diputar secara otomatis."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Layar dikunci dalam orientasi lanskap."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Layar dikunci dalam orientasi potret."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Semua"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Mengisi daya (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> hingga penuh)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Beralih pengguna"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Ganti pengguna, pengguna saat ini <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Tampilkan profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Tambahkan pengguna"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Pengguna baru"</string>
diff --git a/packages/SystemUI/res/values-is-rIS/strings.xml b/packages/SystemUI/res/values-is-rIS/strings.xml
index f98be455c45a..73931dbfbf99 100644
--- a/packages/SystemUI/res/values-is-rIS/strings.xml
+++ b/packages/SystemUI/res/values-is-rIS/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Staðsetning valin með GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Staðsetningarbeiðnir virkar"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Hreinsa allar tilkynningar."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Stillingar"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skjárinn snýst sjálfkrafa."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skjárinn er læstur í langsniði."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skjárinn er læstur í skammsniði."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Allar"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Í hleðslu (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> fram að fullri hleðslu)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Skipta um notanda"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Skipta um notanda; núverandi notandi <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Sýna snið"</string>
<string name="user_add_user" msgid="5110251524486079492">"Bæta notanda við"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nýr notandi"</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 39dc3eeb8ebb..f1f3c9735ad7 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Posizione stabilita dal GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Richieste di accesso alla posizione attive"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Cancella tutte le notifiche."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Impostazioni"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Lo schermo ruoterà automaticamente."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Lo schermo è bloccato in orientamento orizzontale."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Lo schermo è bloccato in orientamento verticale."</string>
@@ -268,7 +271,7 @@
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifiche"</string>
- <string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Flashlight"</string>
+ <string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Torcia"</string>
<string name="quick_settings_cellular_detail_title" msgid="8575062783675171695">"Rete dati"</string>
<string name="quick_settings_cellular_detail_data_usage" msgid="1964260360259312002">"Utilizzo dati"</string>
<string name="quick_settings_cellular_detail_remaining_data" msgid="722715415543541249">"Dati rimanenti"</string>
@@ -300,18 +303,19 @@
<string name="keyguard_unlock" msgid="8043466894212841998">"Scorri verso l\'alto per sbloccare"</string>
<string name="phone_hint" msgid="3101468054914424646">"Scorri verso destra per accedere al telefono"</string>
<string name="camera_hint" msgid="5241441720959174226">"Scorri verso sinistra per accedere alla fotocamera"</string>
- <string name="zen_mode_forever" msgid="4316804956488785559">"In modo indefinito"</string>
- <string name="interruption_level_none" msgid="3831278883136066646">"Nessuno"</string>
+ <string name="zen_mode_forever" msgid="4316804956488785559">"Sempre"</string>
+ <string name="interruption_level_none" msgid="3831278883136066646">"Nessuna"</string>
<string name="interruption_level_priority" msgid="6517366750688942030">"Priorità"</string>
- <string name="interruption_level_all" msgid="1330581184930945764">"Tutti"</string>
+ <string name="interruption_level_all" msgid="1330581184930945764">"Tutte"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"In carica (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> al termine)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Cambio utente"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Cambia utente, utente corrente <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Mostra profilo"</string>
<string name="user_add_user" msgid="5110251524486079492">"Aggiungi utente"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nuovo utente"</string>
<string name="guest_nickname" msgid="8059989128963789678">"Ospite"</string>
<string name="guest_new_guest" msgid="600537543078847803">"Aggiungi ospite"</string>
- <string name="guest_exit_guest" msgid="7187359342030096885">"Rimuovi invitato"</string>
+ <string name="guest_exit_guest" msgid="7187359342030096885">"Rimuovi ospite"</string>
<string name="guest_exit_guest_dialog_title" msgid="8480693520521766688">"Rimuovere l\'ospite?"</string>
<string name="guest_exit_guest_dialog_message" msgid="4155503224769676625">"Tutte le app e i dati di questa sessione verranno eliminati."</string>
<string name="guest_exit_guest_dialog_remove" msgid="7402231963862520531">"Rimuovi"</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 74d1bcf9c349..5582418ab000 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"‏מיקום מוגדר על ידי GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"בקשות מיקום פעילות"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"נקה את כל ההתראות."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"הגדרות"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"המסך יסתובב באופן אוטומטי."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"המסך נעול כעת לרוחב."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"המסך נעול כעת לאורך."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"הכל"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"טוען (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> עד לסיום)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"החלפת משתמש"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"החלף משתמש. המשתמש הנוכחי הוא <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"הצג פרופיל"</string>
<string name="user_add_user" msgid="5110251524486079492">"הוסף משתמש"</string>
<string name="user_new_user_name" msgid="426540612051178753">"משתמש חדש"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index f1aa72c234a9..0493b28dc746 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPSにより現在地が設定されました"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"現在地リクエストがアクティブ"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"通知をすべて消去。"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"設定"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"画面は自動的に回転します。"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"画面は横向きにロックされています。"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"画面は縦向きにロックされています。"</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"すべて"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"充電中(フル充電まで<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"ユーザーを切り替える"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"プロフィールを表示"</string>
<string name="user_add_user" msgid="5110251524486079492">"ユーザーを追加"</string>
<string name="user_new_user_name" msgid="426540612051178753">"新しいユーザー"</string>
diff --git a/packages/SystemUI/res/values-ka-rGE/strings.xml b/packages/SystemUI/res/values-ka-rGE/strings.xml
index e7b272bcc575..e73c13e68d90 100644
--- a/packages/SystemUI/res/values-ka-rGE/strings.xml
+++ b/packages/SystemUI/res/values-ka-rGE/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS-ით დადგენილი მდებარეობა"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"მდებარეობის მოთხოვნები აქტიურია"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"ყველა შეტყობინების წაშლა"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"პარამეტრები"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"ეკრანი შეტრიალდება ავტომატურად."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ეკრანი დაბლოკილია თარაზულ ორიენტაციაში"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ეკრანი დაბლოკილია პორტრეტის ორიენტაციაში."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"ყველა"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"(<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>-ის შეცვლა დასრულებამდე)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"მომხმარებლის გადართვა"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"პროფილის ჩვენება"</string>
<string name="user_add_user" msgid="5110251524486079492">"მომხმარებლის დამატება"</string>
<string name="user_new_user_name" msgid="426540612051178753">"ახალი მომხმარებელი"</string>
@@ -350,10 +355,10 @@
<string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ამ მოწყობილობის მმართველი არის:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით თქვენს ადმინისტრატორს.\n\nასევე, თქვენ დაკავშირებული ხართ VPN-თან („<xliff:g id="APPLICATION">%2$s</xliff:g>“). თქვენს VPN სერვისის პროვაიდერს ასევე შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი."</string>
<string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების.\n\nდამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს."</string>
<string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვენი პროფილის მმართველია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების.\n\nდამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს."</string>
- <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს.\n\nასევე, თქვენ მიანიჭეთ „<xliff:g id="APPLICATION">%2$s</xliff:g>“-ს VPN კავშირის დაყენება. ამ აპს ასევე შეუძლია ქსელის მონიტორინგი."</string>
- <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით თქვენს ადმინისტრატორს.\n\nასევე, თქვენ დაკავშირებული ხართ VPN-თან („<xliff:g id="APPLICATION">%2$s</xliff:g>“). თქვენს VPN სერვისის მომწოდებელს ასევე შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი."</string>
- <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვენი პროფილის მმართველია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს.\n\nასევე, თქვენ მიანიჭეთ „<xliff:g id="APPLICATION">%3$s</xliff:g>“-ს VPN კავშირის დაყენება. ამ აპს ასევე შეუძლია ქსელის მონიტორინგი."</string>
- <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვენი პროფილის მმართველია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს.\n\nასევე, თქვენ დაკავშირებული ხართ VPN-თან („<xliff:g id="APPLICATION">%3$s</xliff:g>“). თქვენს VPN სერვისის მომწოდებელს ასევე შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი."</string>
+ <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს.\n\nასევე, თქვენ მიანიჭეთ „<xliff:g id="APPLICATION">%2$s</xliff:g>“-ს VPN კავშირის დაყენება. ამ აპს ასევე შეუძლია ქსელის მონიტორ."</string>
+ <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინ.-ს შეუძლია თქვენი ქსელის აქტივობის მონიტორ., მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების. დამატ. ინფორმ.-თვის, დაუკავშირდით თქვენს ადმინ.-ს.\n\nასევე, თქვ. დაკავშ.-ლი ხართ VPN-თან („<xliff:g id="APPLICATION">%2$s</xliff:g>“). თქვენს VPN სერვისის მომწოდებელს ასევე შეუძლია თქვ. ქსელის აქტივობის მონიტორ."</string>
+ <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვ. პროფილის მმართველია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვენს ადმინ.-ს შეუძლია თქვ. მოწყ.-ისა და ქსელის აქტივობის მონიტ., მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმ.-თვის, დაუკავშირდით ადმინ.-ს.\n\nასევე, თქვენ მიანიჭეთ „<xliff:g id="APPLICATION">%3$s</xliff:g>“-ს VPN კავშირის დაყენება. ამ აპს ასევე შეუძლია ქსელის მონიტ."</string>
+ <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ამ მოწყ.-ის მმართ.-ია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვ. პროფ-ის მმართ-ია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვ. ადმინ.-ს შეუძლია თქვ. მოწყ.-ისა და ქსელის აქტივ.-ის მონიტ., მ. შ. ელფოსტის, აპების და უსაფრთხო საიტების. დამატებ. ინფორმ.-თვის, დაუკავშირდით ადმინ.-ს.\n\nასევე, თქვ. დაკავშირ. ხართ VPN-თან („<xliff:g id="APPLICATION">%3$s</xliff:g>“). თქვ. VPN სრვს-ის მომწ.-ს ასევე შეუძლია თქვ. ქსელის აქტ.-ის მონიტორ.."</string>
<string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"მოწყობილობის დარჩება ჩაკეტილი, სანამ ხელით არ გახსნით"</string>
<string name="hidden_notifications_title" msgid="7139628534207443290">"შეტყობინებების უფრო სწრაფად მიღება"</string>
<string name="hidden_notifications_text" msgid="2326409389088668981">"იხილეთ განბლოკვამდე"</string>
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings.xml b/packages/SystemUI/res/values-kk-rKZ/strings.xml
index e7e711971157..561596bff5f5 100644
--- a/packages/SystemUI/res/values-kk-rKZ/strings.xml
+++ b/packages/SystemUI/res/values-kk-rKZ/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Аймақ GPS арқылы орнатылған"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Аймақ өтініштері қосылған"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Барлық хабарларды жойыңыз."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Параметрлер"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран автоматты түрде бұрылады."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Экран ландшафт бағытында бекітілген."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Экран портрет бағытында бекітілген."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Барлығы"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Зарядталуда (толғанша <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Пайдаланушыны ауыстыру"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Профильді көрсету"</string>
<string name="user_add_user" msgid="5110251524486079492">"Пайдаланушы қосу"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Жаңа пайдаланушы"</string>
diff --git a/packages/SystemUI/res/values-km-rKH/strings.xml b/packages/SystemUI/res/values-km-rKH/strings.xml
index 61d4289a31a2..8555163e386f 100644
--- a/packages/SystemUI/res/values-km-rKH/strings.xml
+++ b/packages/SystemUI/res/values-km-rKH/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"ទីតាំង​​​​​កំណត់​ដោយ GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"សំណើ​ទីតាំង​សកម្ម"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"សម្អាត​ការ​ជូន​ដំណឹង​ទាំងអស់។"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"ការកំណត់"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"នឹង​បង្វិល​អេក្រង់​ស្វ័យ​ប្រវត្តិ។"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"អេក្រង់​ជាប់​សោ​ក្នុង​ទិស​ផ្ដេក។"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"បា​ន​ចាក់​សោ​អេក្រង់​​ក្នុង​ទិស​បញ្ឈរ។"</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"ទាំងអស់"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"កំពុង​បញ្ចូល​ថ្ម (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> ទើប​ពេញ)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"ប្ដូរ​អ្នក​ប្រើ"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"ប្ដូរ​អ្នកប្រើ ​អ្នកប្រើ​បច្ចុប្បន្ន <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"បង្ហាញ​ប្រវត្តិរូប"</string>
<string name="user_add_user" msgid="5110251524486079492">"បន្ថែម​អ្នកប្រើ"</string>
<string name="user_new_user_name" msgid="426540612051178753">"អ្នកប្រើ​ថ្មី"</string>
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index f7b21c732aec..b2d70638bfe4 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"ಸ್ಥಾನವನ್ನು GPS ಮೂಲಕ ಹೊಂದಿಸಲಾಗಿದೆ"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"ಸ್ಥಾನ ವಿನಂತಿಗಳು ಸಕ್ರಿಯವಾಗಿವೆ"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"ಎಲ್ಲಾ ಅಧಿಸೂಚನೆಗಳನ್ನು ತೆರವುಗೊಳಿಸು."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"ಪರದೆಯು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ತಿರುಗುತ್ತದೆ."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ಪರದೆಯನ್ನು ಲ್ಯಾಂಡ್‌ಸ್ಕೇಪ್ ಓರಿಯಂಟೇಶನ್‍ನಲ್ಲಿ ಲಾಕ್ ಮಾಡಲಾಗಿದೆ."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ಪರದೆಯನ್ನು ಪೋಟ್ರೇಟ್ ಓರಿಯಂಟೇಶನ್‍ನಲ್ಲಿ ಲಾಕ್ ಮಾಡಲಾಗಿದೆ."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"ಎಲ್ಲ"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"ಚಾರ್ಜ್ ಆಗುತ್ತಿದೆ ( ಪೂರ್ತಿ ಆಗುವವರೆಗೆ <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"ಬಳಕೆದಾರರನ್ನು ಬದಲಿಸಿ"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"ಬಳಕೆದಾರರನ್ನು ಬದಲಿಸಿ, ಪ್ರಸ್ತುತ ಬಳಕೆದಾರ <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"ಪ್ರೊಫೈಲ್‌ ತೋರಿಸು"</string>
<string name="user_add_user" msgid="5110251524486079492">"ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿ"</string>
<string name="user_new_user_name" msgid="426540612051178753">"ಹೊಸ ಬಳಕೆದಾರರು"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index e73cbdefed7a..aa8c46594161 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS에서 위치 설정"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"위치 요청 있음"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"모든 알림 지우기"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"설정"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"화면이 자동으로 회전됩니다."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"화면이 가로 방향으로 잠겨 있습니다."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"화면이 세로 방향으로 잠겨 있습니다."</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"모두 수신"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"충전 중(<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> 후 충전 완료)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"사용자 전환"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"사용자 전환, 현재 사용자 <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"프로필 표시"</string>
<string name="user_add_user" msgid="5110251524486079492">"사용자 추가"</string>
<string name="user_new_user_name" msgid="426540612051178753">"새 사용자"</string>
diff --git a/packages/SystemUI/res/values-ky-rKG/strings.xml b/packages/SystemUI/res/values-ky-rKG/strings.xml
index a96c88af47c9..ccd706e860a3 100644
--- a/packages/SystemUI/res/values-ky-rKG/strings.xml
+++ b/packages/SystemUI/res/values-ky-rKG/strings.xml
@@ -238,7 +238,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS боюнча аныкталган жайгашуу"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Жайгаштыруу талаптары иштелүүдө"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Бардык эскертмелерди тазалоо."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Жөндөөлөр"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран автоматтык түрдө бурулат."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Экран туурасынан турган бойдон бекитилген."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Экран тикесинен турган бойдон бекитилген."</string>
@@ -330,6 +333,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Бардыгы"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Кубатталууда (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> толгонго чейин)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Колдонуучуну которуу"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Профилди көрсөтүү"</string>
<string name="user_add_user" msgid="5110251524486079492">"Колдонуучу кошуу"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Жаңы колдонуучу"</string>
diff --git a/packages/SystemUI/res/values-land/dimens.xml b/packages/SystemUI/res/values-land/dimens.xml
index 9b772bdbd0d1..a9e7735ea660 100644
--- a/packages/SystemUI/res/values-land/dimens.xml
+++ b/packages/SystemUI/res/values-land/dimens.xml
@@ -39,7 +39,7 @@
<dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen>
<!-- The side padding for the task stack as a percentage of the width. -->
- <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.2229</item>
+ <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.26</item>
<!-- Standard notification width + gravity -->
<dimen name="notification_panel_width">@dimen/standard_notification_panel_width</dimen>
diff --git a/packages/SystemUI/res/values-lo-rLA/strings.xml b/packages/SystemUI/res/values-lo-rLA/strings.xml
index 468f71706561..224b11f123e1 100644
--- a/packages/SystemUI/res/values-lo-rLA/strings.xml
+++ b/packages/SystemUI/res/values-lo-rLA/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"ສະຖານທີ່ກຳນົດໂດຍ GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"ການຮ້ອງຂໍສະຖານທີ່ທີ່ເຮັດວຽກຢູ່"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"ລຶບການແຈ້ງເຕືອນທັງໝົດ."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"ການ​ຕັ້ງ​ຄ່າ"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"ໜ້າຈໍຈະໝຸນໂດຍອັດຕະໂນມັດ."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ໜ້າຈໍຖືກລັອກໃນລວງນອນ."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ໜ້າຈໍຖືກລັອກຢູ່ໃນໂໝດແນວຕັ້ງ."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"ທັງໝົດ"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"ກຳ​ລັງ​ສາກ​ໄຟ (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> ກວ່າ​ຈ​ະ​ເຕັມ)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"ສະ​ລັບ​ຜູ່ໃຊ້"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"​ສະ​ແດງ​ໂປຣ​ໄຟລ໌"</string>
<string name="user_add_user" msgid="5110251524486079492">"ເພີ່ມຜູ່ໃຊ້"</string>
<string name="user_new_user_name" msgid="426540612051178753">"ຜູ່ໃຊ້ໃໝ່"</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 866c8dd1ecbd..f571a4c4a0a0 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS nustatyta vieta"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Vietovės užklausos aktyvios"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Išvalyti visus pranešimus."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Nustatymai"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekranas bus sukamas automatiškai."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Užrakintas ekranas yra horizontalios orientacijos."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Užrakintas ekranas yra vertikalios orientacijos."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Visi"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Kraunama (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> iki visiško įkrovimo)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Perjungti naudotoją"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Perjungti naudotoją, dabartinis naudotojas <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Rodyti profilį"</string>
<string name="user_add_user" msgid="5110251524486079492">"Naudotojo pridėjimas"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Naujas naudotojas"</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 0e166b7c1ea7..f309d24b8683 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS iestatītā atrašanās vieta"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aktīvi atrašanās vietu pieprasījumi"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Notīrīt visus paziņojumus"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Iestatījumi"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekrāns tiks pagriezts automātiski."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekrāns tagad ir bloķēts ainavas orientācijā."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekrāns tagad ir bloķēts portreta orientācijā."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Visi"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Notiek uzlāde (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> līdz pilnīgai uzlādei)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Mainīt lietotāju"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Pārslēgt lietotāju; pašreizējais lietotājs: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Parādīt profilu"</string>
<string name="user_add_user" msgid="5110251524486079492">"Lietotāja pievienošana"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Jauns lietotājs"</string>
diff --git a/packages/SystemUI/res/values-mk-rMK/strings.xml b/packages/SystemUI/res/values-mk-rMK/strings.xml
index b6b5396f232c..90be4ad823d3 100644
--- a/packages/SystemUI/res/values-mk-rMK/strings.xml
+++ b/packages/SystemUI/res/values-mk-rMK/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Локацијата е поставена со ГПС"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Активни барања за локација"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Исчисти ги сите известувања."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Поставки"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екранот ќе ротира автоматски."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екранот е заклучен во ориентација на пејзаж."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екранот е заклучен во ориентација на портрет."</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Сѐ"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Се полни (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> додека не се наполни)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Промени го корисникот"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Промени го корисникот, тековен корисник <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Прикажи го профилот"</string>
<string name="user_add_user" msgid="5110251524486079492">"Додај корисник"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Нов корисник"</string>
diff --git a/packages/SystemUI/res/values-ml-rIN/strings.xml b/packages/SystemUI/res/values-ml-rIN/strings.xml
index 293b028eb54a..742c943e8b03 100644
--- a/packages/SystemUI/res/values-ml-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ml-rIN/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"ലൊക്കേഷൻ സജ്ജീകരിച്ചത് GPS ആണ്"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"ലൊക്കേഷൻ അഭ്യർത്ഥനകൾ സജീവമാണ്"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"എല്ലാ വിവരങ്ങളും മായ്‌ക്കുക."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"ക്രമീകരണങ്ങൾ"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"സ്‌ക്രീൻ യാന്ത്രികമായി തിരിയും."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"സ്‌ക്രീൻ ലാൻഡ്‌സ്‌കേപ്പ് ഓറിയന്റേഷനിൽ ലോക്കുചെയ്‌തു."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"സ്‌ക്രീൻ പോർട്രെയ്‌റ്റ് ഓറിയന്റേഷനിൽ ലോക്കുചെയ്‌തു."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"എല്ലാം"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"ചാർജ്ജുചെയ്യുന്നു (പൂർണ്ണമാകുന്നതിന്, <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"ഉപയോക്താവ് മാറുക"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"ഉപയോക്താവിനെ മാറ്റുക, <xliff:g id="CURRENT_USER_NAME">%s</xliff:g> എന്നയാളാണ് നിലവിലുള്ള ഉപയോക്താവ്"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"പ്രൊഫൈൽ കാണിക്കുക"</string>
<string name="user_add_user" msgid="5110251524486079492">"ഉപയോക്താവിനെ ചേര്‍ക്കുക"</string>
<string name="user_new_user_name" msgid="426540612051178753">"പുതിയ ഉപയോക്താവ്"</string>
diff --git a/packages/SystemUI/res/values-mn-rMN/strings.xml b/packages/SystemUI/res/values-mn-rMN/strings.xml
index c5cf310d0944..40e5dcdc33d4 100644
--- a/packages/SystemUI/res/values-mn-rMN/strings.xml
+++ b/packages/SystemUI/res/values-mn-rMN/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS байршил"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Байршлын хүсэлтүүд идэвхтэй"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Бүх мэдэгдлийг цэвэрлэх."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Тохиргоо"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Дэлгэц автоматаар эргэнэ."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Дэлгэц хэвтээ чиглэлд түгжигдсэн."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Дэлгэц босоо чиглэлээр түгжигдсэн."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Бүгд"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Цэнэглэж байна (дүүргэхэд <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Хэрэглэгчийг сэлгэх"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Хэрэглэгчийг сэлгэх, одоогийн хэрэглэгч <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Профайлыг харуулах"</string>
<string name="user_add_user" msgid="5110251524486079492">"Хэрэглэгч нэмэх"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Шинэ хэрэглэгч"</string>
diff --git a/packages/SystemUI/res/values-mr-rIN/strings.xml b/packages/SystemUI/res/values-mr-rIN/strings.xml
index f6c6f8a61c6a..4e31db0973ea 100644
--- a/packages/SystemUI/res/values-mr-rIN/strings.xml
+++ b/packages/SystemUI/res/values-mr-rIN/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS द्वारे स्थान सेट केले"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"स्थान विनंत्या सक्रिय"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"सर्व सूचना साफ करा."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"सेटिंग्ज"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"स्क्रीन स्वयंचलितपणे फिरेल."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"भूदृश्य अभिमुखतेमध्ये स्क्रीन लॉक केली आहे."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"पोर्ट्रेट अभिमुखतेमध्ये स्क्रीन लॉक केली आहे."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"सर्व"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"(<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> पूर्ण होईपर्यंत) चार्ज होत आहे"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"वापरकर्ता स्विच करा"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"वापरकर्ता स्विच करा, वर्तमान वापरकर्ता <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"प्रोफाईल दर्शवा"</string>
<string name="user_add_user" msgid="5110251524486079492">"वापरकर्ता जोडा"</string>
<string name="user_new_user_name" msgid="426540612051178753">"नवीन वापरकर्ता"</string>
diff --git a/packages/SystemUI/res/values-ms-rMY/strings.xml b/packages/SystemUI/res/values-ms-rMY/strings.xml
index 0c0efb3e0c5f..fb6e04daf560 100644
--- a/packages/SystemUI/res/values-ms-rMY/strings.xml
+++ b/packages/SystemUI/res/values-ms-rMY/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasi ditetapkan oleh GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Permintaan lokasi aktif"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Padamkan semua pemberitahuan."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Tetapan"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skrin akan berputar secara automatik."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skrin dikunci dalam orientasi landskap."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skrin dikunci dalam orientasi potret."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Semua"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Mengecas (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> sehingga penuh)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Tukar pengguna"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Tunjuk profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Tambah pengguna"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Pengguna baharu"</string>
@@ -357,7 +362,7 @@
<string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Peranti akan kekal terkunci sehingga anda membuka kunci secara manual"</string>
<string name="hidden_notifications_title" msgid="7139628534207443290">"Dapatkan pemberitahuan lebih cepat"</string>
<string name="hidden_notifications_text" msgid="2326409389088668981">"Lihat sebelum anda membuka kunci"</string>
- <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Tidak, terima kasih"</string>
+ <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Tidak"</string>
<string name="hidden_notifications_setup" msgid="41079514801976810">"Sediakan"</string>
<string name="muted_by" msgid="6147073845094180001">"Diredam oleh <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
</resources>
diff --git a/packages/SystemUI/res/values-my-rMM/strings.xml b/packages/SystemUI/res/values-my-rMM/strings.xml
index 5ac9d27eff9c..c22db959c996 100644
--- a/packages/SystemUI/res/values-my-rMM/strings.xml
+++ b/packages/SystemUI/res/values-my-rMM/strings.xml
@@ -210,7 +210,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPSမှတည်နေရာကိုအတည်ပြုသည်"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"တည်နေရာပြ တောင်းဆိုချက်များ အသက်ဝင်ရန်"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"သတိပေးချက်အားလုံးအား ဖယ်ရှားခြင်း။"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"ဆက်တင်များ"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"ဖန်သားပြင်ပေါ်မှာ ပြသမှုက အလိုအလျောက် လှည့်သွားပါမည်"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ဖန်သားပြင် အနေအထားက အလျားလိုက်အဖြစ် ပုံသေ လုပ်ထားပါသည်"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ဖန်သားပြင် အနေအထားက ဒေါင်လိုက်အဖြစ် ပုံသေ လုပ်ထားပါသည်"</string>
@@ -302,6 +305,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"အားလုံး"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"(<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> အပြည့် အထိ) အားသွင်းနေ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"အသုံးပြုသူကို ပြောင်းလဲရန်"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"အသုံးပြုသူကို ပြောင်းရန်၊ လက်ရှိ အသုံးပြုသူ <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"ပရိုဖိုင်ကို ပြရန်"</string>
<string name="user_add_user" msgid="5110251524486079492">"သုံးသူ ထပ်ထည့်ရန်"</string>
<string name="user_new_user_name" msgid="426540612051178753">"အသုံးပြုသူ အသစ်"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 440fef3fc076..dbbd216ac7f7 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Posisjon angitt av GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aktive stedsforespørsler"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Fjern alle varslinger."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Innstillinger"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skjermen roterer automatisk."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skjermen er låst i liggende retning."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skjermen er låst i stående retning."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Alle"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Lader (fulladet om <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Bytt bruker"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Bytt bruker, gjeldende bruker er <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Vis profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Legg til brukere"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Ny bruker"</string>
diff --git a/packages/SystemUI/res/values-ne-rNP/strings.xml b/packages/SystemUI/res/values-ne-rNP/strings.xml
index df555a6d7540..248df045763c 100644
--- a/packages/SystemUI/res/values-ne-rNP/strings.xml
+++ b/packages/SystemUI/res/values-ne-rNP/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS द्वारा स्थान सेट गरिएको"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"स्थान अनुरोधहरू सक्रिय"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"सबै सूचनाहरू हटाउनुहोस्।"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"सेटिङ्हरू"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"स्क्रिन स्वतः घुम्ने छ।"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"स्क्रिनलाई ल्यान्डस्केप अवस्थामा बन्द गरिएको छ।"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"स्क्रिन पोर्टेट अभिमूखमा लक गरिएको छ।"</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"सबै"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"चार्ज हुँदै (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> पूर्ण भएसम्म)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"प्रयोगकर्ता फेर्नुहोस्"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"प्रयोगकर्ता, हालको प्रयोगकर्ता <xliff:g id="CURRENT_USER_NAME">%s</xliff:g> मा स्विच गर्नुहोस्"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"प्रोफाइल देखाउनुहोस्"</string>
<string name="user_add_user" msgid="5110251524486079492">"प्रयोगकर्ता थप्नुहोस्"</string>
<string name="user_new_user_name" msgid="426540612051178753">"नयाँ प्रयोगकर्ता"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 4d5307c95f3b..6802420b44b8 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Locatie bepaald met GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Locatieverzoeken actief"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Alle meldingen wissen."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Instellingen"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Scherm wordt automatisch geroteerd."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Het scherm is nu vergrendeld in liggende stand."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Het scherm is nu vergrendeld in staande stand."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Alle"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Opladen (vol over <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Gebruiker wijzigen"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Schakelen tussen gebruikers, huidige gebruiker <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Profiel weergeven"</string>
<string name="user_add_user" msgid="5110251524486079492">"Gebruiker toevoegen"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nieuwe gebruiker"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 51fe32127875..0d482ab36ab9 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokalizacja z GPSa"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Prośby o lokalizację są aktywne"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Usuń wszystkie powiadomienia."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Ustawienia"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran zostanie obrócony automatycznie."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekran jest zablokowany w orientacji poziomej."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekran jest zablokowany w orientacji pionowej."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Wszystkie"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Ładuje się (pełne naładowanie za <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Przełącz użytkownika"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Przełącz użytkownika. Bieżący użytkownik: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Pokaż profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Dodaj użytkownika"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nowy użytkownik"</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 88ce23a4bb88..a37c8324e577 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Localização definida por GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Pedidos de localização ativos"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Limpar todas as notificações."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Definições"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"O ecrã será rodado automaticamente."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"O ecrã está bloqueado na orientação horizontal."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"O ecrã está bloqueado na orientação vertical."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Tudo"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"A carregar (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> até à carga máxima)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Mudar utilizador"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Mudar de utilizador; o utilizador atual é <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Mostrar perfil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Adicionar utilizador"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Novo utilizador"</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 418064011131..da43300fbbf8 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Local definido por GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Solicitações de localização ativas"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Limpar todas as notificações."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Configurações"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A tela girará automaticamente."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"A tela está bloqueada na orientação paisagem."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A tela está bloqueada na orientação retrato."</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Tudo"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Carregando (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> até concluir)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Trocar usuário"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Mostrar perfil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Adicionar usuário"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Novo usuário"</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 8995c15b32fc..d4bebb388958 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Locaţie setată prin GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Solicitări locație active"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Ștergeţi toate notificările."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Setări"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ecranul se va roti în mod automat."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ecranul este blocat în orientarea de tip peisaj."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ecranul este blocat în orientarea de tip portret."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Toate"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Se încarcă (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> până la finalizare)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Comutați între utilizatori"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Afișați profilul"</string>
<string name="user_add_user" msgid="5110251524486079492">"Adăugați un utilizator"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Utilizator nou"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 84cfff490eed..337319a7fd69 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Координаты по GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Есть активные запросы на определение местоположения"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Удалить все уведомления"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Настройки"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран будет поворачиваться автоматически."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Выбрана только альбомная ориентация экрана."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Выбрана только книжная ориентация экрана."</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Все"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Зарядка батареи (осталось <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Сменить пользователя."</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Показать профиль."</string>
<string name="user_add_user" msgid="5110251524486079492">"Добавить пользователя"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Новый пользователь"</string>
diff --git a/packages/SystemUI/res/values-si-rLK/strings.xml b/packages/SystemUI/res/values-si-rLK/strings.xml
index 321ecb9f998b..6b41dbe7f009 100644
--- a/packages/SystemUI/res/values-si-rLK/strings.xml
+++ b/packages/SystemUI/res/values-si-rLK/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS මඟින් ස්ථානය සකසා ඇත"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"පිහිටීම් ඉල්ලීම් සක්‍රියයි"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"සියලු දැනුම්දීම් හිස් කරන්න."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"සැකසීම්"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"තිරය ස්වයංක්‍රීයව කරකැවේ."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"තිරය තිරස් දිශානතියෙහි අගුළු දමා ඇත."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"තිරය සිරස් දිශානතිය තුළ අගුළු වැටී ඇත."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"සියලු"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"ආරෝපණය වෙමින් (සම්පුර්ණ වන තෙක් <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"පරිශීලක මාරුව"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"පැතිකඩ පෙන්වන්න"</string>
<string name="user_add_user" msgid="5110251524486079492">"පරිශීලකයෙක් එක් කරන්න"</string>
<string name="user_new_user_name" msgid="426540612051178753">"නව පරිශීලකයා"</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index da1bb4c408d3..2ebfe42e7642 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Poloha nastavená pomocou GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Žiadosti o polohu sú aktívne"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazať všetky upozornenia."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Nastavenia"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka sa automaticky otočí."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Obrazovka je uzamknutá v orientácii na šírku."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Obrazovka je uzamknutá v orientácii na výšku."</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Všetky"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Nabíja sa (úplné nabitie o <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Prepnutie používateľa"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Zobraziť profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Pridať používateľa"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nový používateľ"</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 5b0442a48b53..06a4b3536fff 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokacija nastavljena z GPS-om"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aktivne zahteve za lokacijo"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Izbriši vsa obvestila."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Nastavitve"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Zaslon se bo samodejno zasukal."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Zaslon je zaklenjen v ležeči usmerjenosti."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Zaslon je zaklenjen v pokončni usmerjenosti."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Vse"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Polnjenje (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> do napolnjenosti)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Preklop med uporabniki"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Preklop med uporabniki, trenutni uporabnik <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Prikaz profila"</string>
<string name="user_add_user" msgid="5110251524486079492">"Dodajanje uporabnika"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Nov uporabnik"</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 4552926974ae..4d509d58e75a 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Локацију је подесио GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Има активних захтева за локацију"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Обриши сва обавештења."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Подешавања"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран ће се аутоматски ротирати."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екран је закључан у хоризонталном положају."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екран је закључан у вертикалном положају."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Све"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Пуњење (пун је за <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Замени корисника"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Прикажи профил"</string>
<string name="user_add_user" msgid="5110251524486079492">"Додај корисника"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Нови корисник"</string>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index f99c4eff3019..48a8445645ac 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Platsen har identifierats av GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Det finns aktiva platsbegäranden"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Ta bort alla meddelanden."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Inställningar"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skärmen roteras automatiskt."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Bildskärmens riktning är nu låst i liggande format."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Bildskärmens riktning är nu låst i stående format."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Alla"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Laddar (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> tills batteriet är fulladdat)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Byt användare"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Byt användare. Aktuell användare: <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Visa profil"</string>
<string name="user_add_user" msgid="5110251524486079492">"Lägg till användare"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Ny användare"</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index c0b1b123426b..a76edc110837 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -210,7 +210,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Mahali pamewekwa na GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Maombi ya eneo yanatumika"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Futa arifa zote."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Mipangilio"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skrini itazunguka kiotomatiki."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skrini imefungwa sasa katika uelekezo wa mandhari."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skrini imefungwa katika uelekeo wa picha."</string>
@@ -302,6 +305,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Zote"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Inachaji (Imebakisha <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> ijae)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Badili mtumiaji"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Onyesha wasifu"</string>
<string name="user_add_user" msgid="5110251524486079492">"Ongeza mtumiaji"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Mtumiaji mpya"</string>
@@ -355,7 +360,7 @@
<string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Kifaa kitaendelea kuwa katika hali ya kufungwa hadi utakapokifungua mwenyewe"</string>
<string name="hidden_notifications_title" msgid="7139628534207443290">"Pata arifa kwa haraka"</string>
<string name="hidden_notifications_text" msgid="2326409389088668981">"Zitazame kabla hujafungua"</string>
- <string name="hidden_notifications_cancel" msgid="3690709735122344913">"La, asante"</string>
+ <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Hapana, asante"</string>
<string name="hidden_notifications_setup" msgid="41079514801976810">"Sanidi"</string>
<string name="muted_by" msgid="6147073845094180001">"Sauti imezimwa na <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ta-rIN/strings.xml b/packages/SystemUI/res/values-ta-rIN/strings.xml
index 52700cc30d29..0d92c1b27511 100644
--- a/packages/SystemUI/res/values-ta-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ta-rIN/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS அமைத்த இருப்பிடம்"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"இருப்பிடக் கோரிக்கைகள் இயக்கப்பட்டன"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"எல்லா அறிவிப்புகளையும் அழி."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"அமைப்பு"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"திரை தானாகச் சுழலும்."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"நிலத்தோற்ற திசையமைப்பில் திரைப் பூட்டப்பட்டுள்ளது."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"உருவப்பட திசையமைப்பில் திசை பூட்டப்பட்டுள்ளது."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"எல்லாம்"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"சார்ஜாகிறது (முழு சார்ஜிற்கு <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> ஆகும்)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"பயனரை மாற்று"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"பயனரை மாற்று, தற்போதைய பயனர் <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"சுயவிவரத்தைக் காட்டு"</string>
<string name="user_add_user" msgid="5110251524486079492">"பயனரைச் சேர்"</string>
<string name="user_new_user_name" msgid="426540612051178753">"புதியவர்"</string>
diff --git a/packages/SystemUI/res/values-te-rIN/strings.xml b/packages/SystemUI/res/values-te-rIN/strings.xml
index 3740172a042c..f498ba03b431 100644
--- a/packages/SystemUI/res/values-te-rIN/strings.xml
+++ b/packages/SystemUI/res/values-te-rIN/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"స్థానం GPS ద్వారా సెట్ చేయబడింది"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"స్థాన అభ్యర్థనలు సక్రియంగా ఉన్నాయి"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"అన్ని నోటిఫికేషన్‌లను క్లియర్ చేయండి."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"సెట్టింగ్‌లు"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"స్క్రీన్ స్వయంచాలకంగా తిప్పబడుతుంది."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"స్క్రీన్ ల్యాండ్‌స్కేప్ దృగ్విన్యాసంలో లాక్ చేయబడుతుంది."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"స్క్రీన్ పోర్ట్రెయిట్ దృగ్విన్యాసంలో లాక్ చేయబడుతుంది."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"అన్నిటికీ"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"ఛార్జ్ అవుతోంది (పూర్తిగా నిండటానికి <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"వినియోగదారుని మార్చు"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"వినియోగదారుని మార్చు, ప్రస్తుత వినియోగదారు <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"ప్రొఫైల్‌ని చూపు"</string>
<string name="user_add_user" msgid="5110251524486079492">"వినియోగదారుని జోడించండి"</string>
<string name="user_new_user_name" msgid="426540612051178753">"కొత్త వినియోగదారు"</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 59579bc07507..d1c2ecdcbb2b 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"ตำแหน่งที่กำหนดโดย GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"คำขอตำแหน่งที่มีการใช้งาน"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"ล้างการแจ้งเตือนทั้งหมด"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"การตั้งค่า"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"หน้าจอจะหมุนโดยอัตโนมัติ"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ขณะนี้หน้าจอถูกล็อกให้วางในแนวนอน"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ขณะนี้หน้าจอถูกล็อกให้วางในแนวตั้ง"</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"ทั้งหมด"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"กำลังชาร์จ (อีก <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> เต็ม)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"สลับผู้ใช้"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"แสดงโปรไฟล์"</string>
<string name="user_add_user" msgid="5110251524486079492">"เพิ่มผู้ใช้"</string>
<string name="user_new_user_name" msgid="426540612051178753">"ผู้ใช้ใหม่"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index a421a84d2e05..aa2992fbf20a 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasyong itinatakda ng GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Aktibo ang mga kahilingan ng lokasyon"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"I-clear ang lahat ng notification."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Mga Setting"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Awtomatikong iikot ang screen."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Naka-lock ang screen sa pahigang oryentasyon."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Naka-lock ang screen sa patayong oryentasyon."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Lahat"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Nagtsa-charge (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> hanggang mapuno)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Magpalit ng user"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Ipakita ang profile"</string>
<string name="user_add_user" msgid="5110251524486079492">"Magdagdag ng user"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Bagong user"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 0c0149c9f8da..0dc8c61c26c1 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Konum GPS ile belirlendi"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Konum bilgisi istekleri etkin"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Tüm bildirimleri temizle"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Ayarlar"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran otomatik olarak dönecektir."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekran yatay yönde kilitlendi."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekran dikey yönde kilitlendi."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Tümü"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Şarj oluyor (tamamen dolmasına <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> kaldı)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Kullanıcı değiştirme"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Profili göster"</string>
<string name="user_add_user" msgid="5110251524486079492">"Kullanıcı ekle"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Yeni kullanıcı"</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 162a280562cf..6e371a46132e 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Місцезнаходження встановлено за допомогою GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Запити про місцезнаходження активні"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Очистити всі сповіщення."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Налаштування"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран обертатиметься автоматично."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екран заблоковано в альбомній орієнтації."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екран заблоковано в книжковій орієнтації."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Усі"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Заряджання (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> до повного зарядження)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Змінити користувача"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Змінити користувача, поточний користувач – <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Показати профіль"</string>
<string name="user_add_user" msgid="5110251524486079492">"Додати користувача"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Новий користувач"</string>
diff --git a/packages/SystemUI/res/values-ur-rPK/strings.xml b/packages/SystemUI/res/values-ur-rPK/strings.xml
index 708607cb5e49..ec3096b2f166 100644
--- a/packages/SystemUI/res/values-ur-rPK/strings.xml
+++ b/packages/SystemUI/res/values-ur-rPK/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"‏مقام متعین کیا گیا بذریعہ GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"مقام کی درخواستیں فعال ہیں"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"سبھی اطلاعات صاف کریں۔"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"ترتیبات"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"اسکرین خود بخود گردش کرے گی۔"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"اسکرین لینڈ اسکیپ سمت بندی میں مقفل ہے۔"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"اسکرین پورٹریٹ سمت بندی میں مقفل ہے۔"</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"سبھی"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"چارج ہو رہا ہے (مکمل ہونے تک <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> باقی ہیں)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"صارف سوئچ کریں"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"صارف کو سوئچ کریں، موجودہ صارف <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"پروفائل دکھائیں"</string>
<string name="user_add_user" msgid="5110251524486079492">"صارف کو شامل کریں"</string>
<string name="user_new_user_name" msgid="426540612051178753">"نیا صارف"</string>
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings.xml b/packages/SystemUI/res/values-uz-rUZ/strings.xml
index 7776269867bf..c0dd8b71bde3 100644
--- a/packages/SystemUI/res/values-uz-rUZ/strings.xml
+++ b/packages/SystemUI/res/values-uz-rUZ/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS yordamida manzilni o‘rnatish"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Joylashuv so‘rovlari yoniq"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Barcha eslatmalarni tozalash."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Sozlamalar"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran avtomatik ravishda aylanadi."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekran eniga holatida qulflandi."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekran bo‘yiga holatida qulflandi."</string>
@@ -304,6 +307,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Barchasi"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Quvvat olmoqda (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>da to‘ladi)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Foydalanuvchini almashtirish"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Profilni ko‘rsatish"</string>
<string name="user_add_user" msgid="5110251524486079492">"Foydalanuvchi qo‘shish"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Yangi foydalanuvchi"</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 80fdc463db0c..2488556114d0 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Vị trí đặt bởi GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Yêu cầu về thông tin vị trí đang hoạt động"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Xóa tất cả thông báo."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Cài đặt"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Màn hình sẽ xoay tự động."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Màn hình hiện bị khóa theo hướng ngang."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Màn hình hiện bị khóa theo hướng dọc."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Tất cả"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Đang sạc (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> cho đến khi đầy)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Chuyển đổi người dùng"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Chuyển người dùng, người dùng hiện tại <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Hiển thị hồ sơ"</string>
<string name="user_add_user" msgid="5110251524486079492">"Thêm người dùng"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Người dùng mới"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 06cebb319dfa..4ca0e8f2383c 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"已通过GPS确定位置"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"应用发出了有效位置信息请求"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"清除所有通知。"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"设置"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"屏幕会自动旋转。"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"屏幕锁定为横向模式。"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"屏幕锁定为纵向模式。"</string>
@@ -306,6 +309,8 @@
<string name="interruption_level_all" msgid="1330581184930945764">"全部"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"正在充电(还需<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>充满)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"切换用户"</string>
+ <!-- no translation found for accessibility_multi_user_switch_switcher_with_current (8434880595284601601) -->
+ <skip />
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"显示个人资料"</string>
<string name="user_add_user" msgid="5110251524486079492">"添加用户"</string>
<string name="user_new_user_name" msgid="426540612051178753">"新用户"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 9b0bde14faab..3a53017a172b 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS 已定位"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"位置要求啟動中"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"清除所有通知。"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"設定"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"螢幕會自動旋轉。"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"螢幕已鎖定為橫向模式。"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"螢幕已鎖定為垂直模式。"</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"全部"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"充電中 (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>後完成充電)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"切換使用者"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"切換使用者,目前使用者是<xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"顯示個人檔案"</string>
<string name="user_add_user" msgid="5110251524486079492">"新增使用者"</string>
<string name="user_new_user_name" msgid="426540612051178753">"新使用者"</string>
@@ -357,7 +361,7 @@
<string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"這部裝置的管理機構:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的個人檔案的管理機構:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網絡活動,包括電郵、應用程式及安全網站。如需瞭解詳情,請聯絡您的管理員。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%3$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網絡活動。"</string>
<string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"這部裝置的管理機構:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的個人檔案的管理機構:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網絡活動,包括電郵、應用程式及安全網站。如需瞭解詳情,請聯絡您的管理員。\n\n同時,由於您的裝置已與 VPN (「<xliff:g id="APPLICATION">%3$s</xliff:g>」) 連線,因此您的 VPN 服務供應商也能監控您的網絡活動。"</string>
<string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"裝置將保持上鎖,直到您手動解鎖"</string>
- <string name="hidden_notifications_title" msgid="7139628534207443290">"快速取得通知"</string>
+ <string name="hidden_notifications_title" msgid="7139628534207443290">"更快取得通知"</string>
<string name="hidden_notifications_text" msgid="2326409389088668981">"解鎖前顯示"</string>
<string name="hidden_notifications_cancel" msgid="3690709735122344913">"不用了,謝謝"</string>
<string name="hidden_notifications_setup" msgid="41079514801976810">"設定"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index d57845baf474..8840b2ced7c1 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -214,7 +214,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"GPS 已定位"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"有位置資訊要求"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"清除所有通知。"</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"設定"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"螢幕會自動旋轉。"</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"螢幕已鎖定為橫向模式。"</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"螢幕已鎖定為垂直模式。"</string>
@@ -306,6 +309,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"全部"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"充電中 (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>後充飽)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"切換使用者"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"切換使用者,目前使用者是<xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"顯示設定檔"</string>
<string name="user_add_user" msgid="5110251524486079492">"新增使用者"</string>
<string name="user_new_user_name" msgid="426540612051178753">"新使用者"</string>
@@ -350,12 +354,12 @@
<string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"您已連線至 VPN (「<xliff:g id="APPLICATION">%1$s</xliff:g>」)。\n\n您的 VPN 服務供應商可以監控您的裝置和網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。"</string>
<string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"這個裝置由下列網域管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>。\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%2$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
<string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"這個裝置由下列網域管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>。\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%2$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</string>
- <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的裝置和網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。\n\n如需詳細資訊,請與您的管理員聯絡。"</string>
- <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。\n\n如需詳細資訊,請與您的管理員聯絡。"</string>
- <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%2$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
- <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%2$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</string>
- <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%3$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
- <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由以下機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%3$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</string>
+ <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的裝置和網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。\n\n如需詳細資訊,請洽您的管理員。"</string>
+ <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。\n\n如需詳細資訊,請洽您的管理員。"</string>
+ <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請洽您的管理員。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%2$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
+ <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請洽您的管理員。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%2$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</string>
+ <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請洽您的管理員。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%3$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
+ <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由以下機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請洽您的管理員。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%3$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</string>
<string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"在您手動解鎖前,裝置將保持鎖定狀態"</string>
<string name="hidden_notifications_title" msgid="7139628534207443290">"更快取得通知"</string>
<string name="hidden_notifications_text" msgid="2326409389088668981">"解鎖前顯示"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index edf51a150a83..abb684112fac 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -212,7 +212,10 @@
<string name="gps_notification_found_text" msgid="4619274244146446464">"Indawo ihlelwe i-GPS"</string>
<string name="accessibility_location_active" msgid="2427290146138169014">"Izicelo zendawo ziyasebenza"</string>
<string name="accessibility_clear_all" msgid="5235938559247164925">"Susa zonke izaziso."</string>
- <string name="status_bar_notification_inspect_item_title" msgid="5386295743469882227">"Izilungiselelo"</string>
+ <!-- no translation found for status_bar_notification_inspect_item_title (5668348142410115323) -->
+ <skip />
+ <!-- no translation found for status_bar_notification_app_settings_title (5525260160341558869) -->
+ <skip />
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Isikrini sizophenduka ngokuzenzakalela."</string>
<string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Isikrini sikhiyelwe ngomumo we-landscape."</string>
<string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Isikrini sikhiyelwe ngomumo we-portrait."</string>
@@ -304,6 +307,7 @@
<string name="interruption_level_all" msgid="1330581184930945764">"Konke"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"Iyashaja (<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> ize igcwale)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"Shintsha umsebenzisi"</string>
+ <string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"Shintsha umsebenzisi, umsebenzisi wamanje ngu-<xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
<string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"Bonisa iphrofayela"</string>
<string name="user_add_user" msgid="5110251524486079492">"Engeza umsebenzisi"</string>
<string name="user_new_user_name" msgid="426540612051178753">"Umsebenzisi omusha"</string>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 5a1c3188296f..cc77aaa28578 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -188,14 +188,21 @@
<!-- Doze: should the pickup sensor be used as a pulse signal? -->
<bool name="doze_pulse_on_pick_up">false</bool>
- <!-- Doze: maximum brightness to use when pulsing -->
- <integer name="doze_pulse_brightness">40</integer>
+ <!-- Doze: period of time between pulses (start of pulse) when following the notification light
+ Format: <under_ms>:<period_ms>,...,<default_ms> -->
+ <string name="doze_pulse_period_function">60000:10000,300000:30000,1800000:60000,0</string>
- <!-- Doze: number of pulses when doing multiple pulses in quick succession -->
- <integer name="doze_multipulse_count">3</integer>
+ <!-- Doze: pulse parameter - how long does it take to fade in? -->
+ <integer name="doze_pulse_duration_in">1000</integer>
- <!-- Doze: interval between pulses when following the notification light -->
- <integer name="doze_notification_pulse_interval">30000</integer>
+ <!-- Doze: pulse parameter - once faded in, how long does it stay visible? -->
+ <integer name="doze_pulse_duration_visible">3000</integer>
+
+ <!-- Doze: pulse parameter - how long does it take to fade out? -->
+ <integer name="doze_pulse_duration_out">1000</integer>
+
+ <!-- Doze: pulse parameter - how long to wait before pulsing (if not starting immediately) -->
+ <integer name="doze_pulse_delay">1000</integer>
<!-- Doze: alpha to apply to small icons when dozing -->
<integer name="doze_small_icon_alpha">222</integer><!-- 87% of 0xff -->
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
index d17e26384ae2..0aa7f3525e0a 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
@@ -16,9 +16,6 @@
package com.android.systemui.doze;
-import static android.os.PowerManager.BRIGHTNESS_OFF;
-import static android.os.PowerManager.BRIGHTNESS_ON;
-
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
@@ -37,11 +34,11 @@ import android.os.SystemProperties;
import android.os.Vibrator;
import android.service.dreams.DreamService;
import android.util.Log;
-import android.util.MathUtils;
import android.view.Display;
import com.android.systemui.R;
import com.android.systemui.SystemUIApplication;
+import com.android.systemui.statusbar.phone.DozeParameters;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -54,11 +51,11 @@ public class DozeService extends DreamService {
private static final String ACTION_BASE = "com.android.systemui.doze";
private static final String PULSE_ACTION = ACTION_BASE + ".pulse";
private static final String NOTIFICATION_PULSE_ACTION = ACTION_BASE + ".notification_pulse";
- private static final String EXTRA_PULSES = "pulses";
private final String mTag = String.format(TAG + ".%08x", hashCode());
private final Context mContext = this;
private final Handler mHandler = new Handler();
+ private final DozeParameters mDozeParameters = new DozeParameters(mContext);
private Host mHost;
private SensorManager mSensors;
@@ -67,16 +64,14 @@ public class DozeService extends DreamService {
private PowerManager mPowerManager;
private PowerManager.WakeLock mWakeLock;
private AlarmManager mAlarmManager;
- private int mMaxBrightness;
private boolean mDreaming;
private boolean mBroadcastReceiverRegistered;
private boolean mDisplayStateSupported;
private int mDisplayStateWhenOn;
private boolean mNotificationLightOn;
private PendingIntent mNotificationPulseIntent;
- private int mMultipulseCount;
- private int mNotificationPulseInterval;
private boolean mPowerSaveActive;
+ private long mNotificationPulseTime;
public DozeService() {
if (DEBUG) Log.d(mTag, "new DozeService()");
@@ -91,12 +86,11 @@ public class DozeService extends DreamService {
pw.print(" mBroadcastReceiverRegistered: "); pw.println(mBroadcastReceiverRegistered);
pw.print(" mSigMotionSensor: "); pw.println(mSigMotionSensor);
pw.print(" mPickupSensor:"); pw.println(mPickupSensor);
- pw.print(" mMaxBrightness: "); pw.println(mMaxBrightness);
pw.print(" mDisplayStateSupported: "); pw.println(mDisplayStateSupported);
pw.print(" mNotificationLightOn: "); pw.println(mNotificationLightOn);
- pw.print(" mMultipulseCount: "); pw.println(mMultipulseCount);
- pw.print(" mNotificationPulseInterval: "); pw.println(mNotificationPulseInterval);
pw.print(" mPowerSaveActive: "); pw.println(mPowerSaveActive);
+ pw.print(" mNotificationPulseTime: "); pw.println(mNotificationPulseTime);
+ mDozeParameters.dump(pw);
}
@Override
@@ -123,17 +117,11 @@ public class DozeService extends DreamService {
final Resources res = mContext.getResources();
mDisplayStateSupported = SystemProperties.getBoolean("doze.display.supported",
res.getBoolean(R.bool.doze_display_state_supported));
- mMaxBrightness = MathUtils.constrain(res.getInteger(R.integer.doze_pulse_brightness),
- BRIGHTNESS_OFF, BRIGHTNESS_ON);
mNotificationPulseIntent = PendingIntent.getBroadcast(mContext, 0,
new Intent(NOTIFICATION_PULSE_ACTION).setPackage(getPackageName()),
- PendingIntent.FLAG_CANCEL_CURRENT);
- mMultipulseCount = SystemProperties.getInt("doze.multipulses",
- res.getInteger(R.integer.doze_multipulse_count));
- mNotificationPulseInterval = SystemProperties.getInt("doze.notification.pulse",
- res.getInteger(R.integer.doze_notification_pulse_interval));
+ PendingIntent.FLAG_UPDATE_CURRENT);
mDisplayStateWhenOn = mDisplayStateSupported ? Display.STATE_DOZE : Display.STATE_ON;
- setDozeScreenState(mDisplayStateWhenOn);
+ mDisplayOff.run();
}
@Override
@@ -159,9 +147,9 @@ public class DozeService extends DreamService {
public void stayAwake(long millis) {
if (mDreaming && millis > 0) {
+ if (DEBUG) Log.d(mTag, "stayAwake millis=" + millis);
mWakeLock.acquire(millis);
setDozeScreenState(mDisplayStateWhenOn);
- setDozeScreenBrightness(mMaxBrightness);
rescheduleOff(millis);
}
}
@@ -172,16 +160,6 @@ public class DozeService extends DreamService {
mHandler.postDelayed(mDisplayOff, millis);
}
- public void startDozing() {
- if (DEBUG) Log.d(mTag, "startDozing mDreaming=" + mDreaming);
- if (!mDreaming) {
- Log.w(mTag, "Not dozing, no longer dreaming");
- return;
- }
-
- super.startDozing();
- }
-
@Override
public void onDreamingStopped() {
if (DEBUG) Log.d(mTag, "onDreamingStopped isDozing=" + isDozing());
@@ -192,24 +170,8 @@ public class DozeService extends DreamService {
mWakeLock.release();
}
listenForPulseSignals(false);
- stopDozing();
- dozingStopped();
- }
-
- @Override
- public void onDetachedFromWindow() {
- if (DEBUG) Log.d(mTag, "onDetachedFromWindow");
- super.onDetachedFromWindow();
-
- dozingStopped();
- }
-
- @Override
- public void onDestroy() {
- if (DEBUG) Log.d(mTag, "onDestroy");
- super.onDestroy();
-
dozingStopped();
+ mHandler.removeCallbacks(mDisplayOff);
}
private void requestDoze() {
@@ -218,21 +180,9 @@ public class DozeService extends DreamService {
}
}
- private void requestMultipulse() {
- requestPulse(mMultipulseCount);
- }
-
- private void requestPulse() {
- requestPulse(1);
- }
-
- private void requestPulse(int pulses) {
- requestPulse(pulses, true /*delayed*/);
- }
-
- private void requestPulse(int pulses, boolean delayed) {
+ private void requestPulse(boolean delayed) {
if (mHost != null) {
- mHost.requestPulse(pulses, delayed, this);
+ mHost.requestPulse(delayed, this);
}
}
@@ -281,9 +231,14 @@ public class DozeService extends DreamService {
private void rescheduleNotificationPulse() {
mAlarmManager.cancel(mNotificationPulseIntent);
if (mNotificationLightOn) {
- final long time = System.currentTimeMillis() + mNotificationPulseInterval;
- if (DEBUG) Log.d(TAG, "Scheduling pulse for " + new Date(time));
- mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, time, mNotificationPulseIntent);
+ final long now = System.currentTimeMillis();
+ final long age = now - mNotificationPulseTime;
+ final long period = mDozeParameters.getPulsePeriod(age);
+ final long time = now + period;
+ if (period > 0) {
+ if (DEBUG) Log.d(TAG, "Scheduling pulse in " + period + " for " + new Date(time));
+ mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, time, mNotificationPulseIntent);
+ }
}
}
@@ -305,7 +260,6 @@ public class DozeService extends DreamService {
public void run() {
if (DEBUG) Log.d(TAG, "Display off");
setDozeScreenState(Display.STATE_OFF);
- setDozeScreenBrightness(PowerManager.BRIGHTNESS_DEFAULT);
}
};
@@ -314,11 +268,11 @@ public class DozeService extends DreamService {
public void onReceive(Context context, Intent intent) {
if (PULSE_ACTION.equals(intent.getAction())) {
if (DEBUG) Log.d(mTag, "Received pulse intent");
- requestPulse(intent.getIntExtra(EXTRA_PULSES, mMultipulseCount));
+ requestPulse(false /*delayed*/);
}
if (NOTIFICATION_PULSE_ACTION.equals(intent.getAction())) {
if (DEBUG) Log.d(mTag, "Received notification pulse intent");
- requestPulse();
+ requestPulse(true /*delayed*/);
rescheduleNotificationPulse();
}
}
@@ -334,7 +288,8 @@ public class DozeService extends DreamService {
@Override
public void onBuzzBeepBlinked() {
if (DEBUG) Log.d(mTag, "onBuzzBeepBlinked");
- requestMultipulse();
+ mNotificationPulseTime = System.currentTimeMillis();
+ requestPulse(true /*delayed*/);
}
@Override
@@ -342,6 +297,10 @@ public class DozeService extends DreamService {
if (DEBUG) Log.d(mTag, "onNotificationLight on=" + on);
if (mNotificationLightOn == on) return;
mNotificationLightOn = on;
+ if (mNotificationLightOn) {
+ mNotificationPulseTime = System.currentTimeMillis();
+ requestPulse(true /*delayed*/);
+ }
rescheduleNotificationPulse();
}
@@ -358,7 +317,7 @@ public class DozeService extends DreamService {
void addCallback(Callback callback);
void removeCallback(Callback callback);
void requestDoze(DozeService dozeService);
- void requestPulse(int pulses, boolean delayed, DozeService dozeService);
+ void requestPulse(boolean delayed, DozeService dozeService);
void dozingStopped(DozeService dozeService);
boolean isPowerSaveActive();
@@ -409,7 +368,7 @@ public class DozeService extends DreamService {
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION).build());
}
}
- requestPulse(1, false /*delayed*/);
+ requestPulse(false /*delayed*/);
setListening(true); // reregister, this sensor only fires once
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index ed5c126aa652..2a2caa054210 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -347,8 +347,8 @@ public class RecentsConfiguration {
Rect searchBarBounds = new Rect();
getSearchBarBounds(windowWidth, windowHeight, topInset, searchBarBounds);
if (isLandscape && hasTransposedSearchBar) {
- // In landscape, the search bar appears on the left
- taskStackBounds.set(searchBarBounds.right, topInset, windowWidth - rightInset, windowHeight);
+ // In landscape, the search bar appears on the left, but we overlay it on top
+ taskStackBounds.set(0, topInset, windowWidth - rightInset, windowHeight);
} else {
// In portrait, the search bar appears on the top (which already has the inset)
taskStackBounds.set(0, searchBarBounds.bottom, windowWidth, windowHeight);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index bbd0a0d6f215..11b7b8b57be3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -179,6 +179,12 @@ public class SystemServicesProxy {
ActivityManager.RECENT_IGNORE_UNAVAILABLE |
ActivityManager.RECENT_INCLUDE_PROFILES |
ActivityManager.RECENT_WITH_EXCLUDED, userId);
+
+ // Break early if we can't get a valid set of tasks
+ if (tasks == null) {
+ return new ArrayList<ActivityManager.RecentTaskInfo>();
+ }
+
boolean isFirstValidTask = true;
Iterator<ActivityManager.RecentTaskInfo> iter = tasks.iterator();
while (iter.hasNext()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 907a13fde2df..ce3739c2f921 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -92,6 +92,7 @@ import com.android.systemui.SwipeHelper;
import com.android.systemui.SystemUI;
import com.android.systemui.statusbar.NotificationData.Entry;
import com.android.systemui.statusbar.phone.KeyguardTouchDelegate;
+import com.android.systemui.statusbar.phone.PhoneStatusBar;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.policy.HeadsUpNotificationView;
import com.android.systemui.statusbar.policy.PreviewInflater;
@@ -288,6 +289,10 @@ public abstract class BaseStatusBar extends SystemUI implements
// close the shade if it was open
if (handled) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from mOnClickHandler after keyguard"
+ + "dismiss");
+ }
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
visibilityChanged(false);
}
@@ -334,6 +339,9 @@ public abstract class BaseStatusBar extends SystemUI implements
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING, 0);
if (BANNER_ACTION_SETUP.equals(action)) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Animating collapse because of BANNER_ACTION_SETUP");
+ }
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
mContext.startActivity(new Intent(Settings.ACTION_APP_NOTIFICATION_REDACTION)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
@@ -759,6 +767,10 @@ public abstract class BaseStatusBar extends SystemUI implements
}
}
});
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from startNotificationGutsIntent after keyguard"
+ + "dismiss");
+ }
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
return true;
}
@@ -857,6 +869,10 @@ public abstract class BaseStatusBar extends SystemUI implements
// Assume we are a status_bar_notification_row
final NotificationGuts guts = (NotificationGuts) v.findViewById(
R.id.notification_guts);
+ if (guts == null) {
+ // This view has no guts. Examples are the more card or the dismiss all view
+ return false;
+ }
// Already showing?
if (guts.getVisibility() == View.VISIBLE) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 2ad68592d7a7..9196dc89c6c3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -406,7 +406,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
target.animate().cancel();
source.animate()
.alpha(0f)
- .withLayer()
.setStartDelay(delay)
.setDuration(duration)
.withEndAction(new Runnable() {
@@ -417,7 +416,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
});
target.animate()
.alpha(1f)
- .withLayer()
.setStartDelay(delay)
.setDuration(duration);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index e31eb7c9bd08..502490f82aea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -243,6 +243,14 @@ public class NotificationContentView extends FrameLayout {
}
}
+ @Override
+ public boolean hasOverlappingRendering() {
+
+ // This is not really true, but good enough when fading from the contracted to the expanded
+ // layout, and saves us some layers.
+ return false;
+ }
+
private static Paint createInvertPaint() {
final Paint p = new Paint();
final float[] invert = {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 18ef024083a2..b71c9bfc8f60 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -257,7 +257,7 @@ public class SignalClusterView
(mMobileVisible ? "VISIBLE" : "GONE"),
mMobileStrengthId, mMobileTypeId));
- mMobileType.setVisibility(!mWifiVisible || mRoaming ? View.VISIBLE : View.GONE);
+ mMobileType.setVisibility((mRoaming || mMobileTypeId != 0) ? View.VISIBLE : View.GONE);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
new file mode 100644
index 000000000000..e14ef12937bf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.systemui.statusbar.phone;
+
+import android.content.Context;
+import android.os.SystemProperties;
+import android.text.TextUtils;
+import android.util.Log;
+import android.util.MathUtils;
+
+import com.android.systemui.R;
+
+import java.io.PrintWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class DozeParameters {
+ private static final String TAG = "DozeParameters";
+
+ private static final int MAX_DURATION = 10 * 1000;
+
+ private final Context mContext;
+
+ private StepFunction mPulsePeriodFunction;
+
+ public DozeParameters(Context context) {
+ mContext = context;
+ }
+
+ public void dump(PrintWriter pw) {
+ pw.println(" DozeParameters:");
+ pw.print(" getPulseDuration(): "); pw.println(getPulseDuration());
+ pw.print(" getPulseInDuration(): "); pw.println(getPulseInDuration());
+ pw.print(" getPulseInVisibleDuration(): "); pw.println(getPulseVisibleDuration());
+ pw.print(" getPulseOutDuration(): "); pw.println(getPulseOutDuration());
+ pw.print(" getPulseStartDelay(): "); pw.println(getPulseStartDelay());
+ pw.print(" getPulsePeriodFunction(): "); pw.println(getPulsePeriodFunction());
+ }
+
+ public int getPulseDuration() {
+ return getPulseInDuration() + getPulseVisibleDuration() + getPulseOutDuration();
+ }
+
+ public int getPulseInDuration() {
+ return getInt("doze.pulse.duration.in", R.integer.doze_pulse_duration_in);
+ }
+
+ public int getPulseVisibleDuration() {
+ return getInt("doze.pulse.duration.visible", R.integer.doze_pulse_duration_visible);
+ }
+
+ public int getPulseOutDuration() {
+ return getInt("doze.pulse.duration.out", R.integer.doze_pulse_duration_out);
+ }
+
+ public int getPulseStartDelay() {
+ return getInt("doze.pulse.delay", R.integer.doze_pulse_delay);
+ }
+
+ public long getPulsePeriod(long age) {
+ final String spec = getPulsePeriodFunction();
+ if (mPulsePeriodFunction == null || !mPulsePeriodFunction.mSpec.equals(spec)) {
+ mPulsePeriodFunction = StepFunction.parse(spec);
+ }
+ return mPulsePeriodFunction != null ? mPulsePeriodFunction.evaluate(age) : 0;
+ }
+
+ private String getPulsePeriodFunction() {
+ return getString("doze.pulse.period.function", R.string.doze_pulse_period_function);
+ }
+
+ private int getInt(String propName, int resId) {
+ int value = SystemProperties.getInt(propName, mContext.getResources().getInteger(resId));
+ return MathUtils.constrain(value, 0, MAX_DURATION);
+ }
+
+ private String getString(String propName, int resId) {
+ return SystemProperties.get(propName, mContext.getString(resId));
+ }
+
+ private static class StepFunction {
+ private static final Pattern PATTERN = Pattern.compile("(\\d+?)(:(\\d+?))?", 0);
+
+ private String mSpec;
+ private long[] mSteps;
+ private long[] mValues;
+ private long mDefault;
+
+ public static StepFunction parse(String spec) {
+ if (TextUtils.isEmpty(spec)) return null;
+ try {
+ final StepFunction rt = new StepFunction();
+ rt.mSpec = spec;
+ final String[] tokens = spec.split(",");
+ rt.mSteps = new long[tokens.length - 1];
+ rt.mValues = new long[tokens.length - 1];
+ for (int i = 0; i < tokens.length - 1; i++) {
+ final Matcher m = PATTERN.matcher(tokens[i]);
+ if (!m.matches()) throw new IllegalArgumentException("Bad token: " + tokens[i]);
+ rt.mSteps[i] = Long.parseLong(m.group(1));
+ rt.mValues[i] = Long.parseLong(m.group(3));
+ }
+ rt.mDefault = Long.parseLong(tokens[tokens.length - 1]);
+ return rt;
+ } catch (RuntimeException e) {
+ Log.w(TAG, "Error parsing spec: " + spec, e);
+ return null;
+ }
+ }
+
+ public long evaluate(long x) {
+ for (int i = 0; i < mSteps.length; i++) {
+ if (x < mSteps[i]) return mValues[i];
+ }
+ return mDefault;
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index e84ca526f5e7..e323dd615989 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -30,7 +30,7 @@ import android.os.Bundle;
import android.os.RemoteException;
import android.os.UserHandle;
import android.provider.MediaStore;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
@@ -128,6 +128,9 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
public boolean performAccessibilityAction(View host, int action, Bundle args) {
if (action == ACTION_CLICK) {
if (host == mLockIcon) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from lock icon accessibility click");
+ }
mPhoneStatusBar.animateCollapsePanels(
CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
return true;
@@ -328,7 +331,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
}
public void launchPhone() {
- final TelecommManager tm = TelecommManager.from(mContext);
+ final TelecomManager tm = TelecomManager.from(mContext);
if (tm.isInCall()) {
AsyncTask.execute(new Runnable() {
@Override
@@ -373,7 +376,8 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
return;
}
// TODO: Real icon for facelock.
- int iconRes = mUnlockMethodCache.isFaceUnlockRunning() ? R.drawable.ic_account_circle
+ int iconRes = mUnlockMethodCache.isFaceUnlockRunning()
+ ? com.android.internal.R.drawable.ic_account_circle
: mUnlockMethodCache.isMethodInsecure() ? R.drawable.ic_lock_open_24dp
: R.drawable.ic_lock_24dp;
mLockIcon.setImageResource(iconRes);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index fc737bee5e44..70b6952b1300 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -17,14 +17,10 @@
package com.android.systemui.statusbar.phone;
import android.content.Context;
-import android.os.SystemClock;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.view.animation.AnimationUtils;
-import android.view.animation.Interpolator;
-import android.view.animation.LinearInterpolator;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardViewBase;
@@ -33,7 +29,7 @@ import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.keyguard.KeyguardViewMediator;
import static com.android.keyguard.KeyguardHostView.OnDismissAction;
-import static com.android.keyguard.KeyguardSecurityModel.*;
+import static com.android.keyguard.KeyguardSecurityModel.SecurityMode;
/**
* A class which manages the bouncer on the lockscreen.
@@ -62,6 +58,10 @@ public class KeyguardBouncer {
public void show() {
ensureView();
if (mRoot.getVisibility() == View.VISIBLE) {
+
+ // show() updates the current security method. This is needed in case we are already
+ // showing and the current security method changed.
+ mKeyguardView.show();
return;
}
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 9585e1779e4d..c04ca83300cd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -276,6 +276,7 @@ public class NotificationPanelView extends PanelView implements
// Calculate quick setting heights.
mQsMinExpansionHeight = mKeyguardShowing ? 0 : mHeader.getCollapsedHeight() + mQsPeekHeight;
mQsMaxExpansionHeight = mHeader.getExpandedHeight() + mQsContainer.getHeight();
+ positionClockAndNotifications();
if (mQsExpanded) {
if (mQsFullyExpanded) {
mQsExpansionHeight = mQsMaxExpansionHeight;
@@ -283,7 +284,6 @@ public class NotificationPanelView extends PanelView implements
}
} else {
setQsExpansion(mQsMinExpansionHeight + mLastOverscroll);
- positionClockAndNotifications();
mNotificationStackScroller.setStackHeight(getExpandedHeight());
updateHeader();
}
@@ -631,9 +631,10 @@ public class NotificationPanelView extends PanelView implements
}
private boolean isInQsArea(float x, float y) {
- return mStatusBarState != StatusBarState.SHADE
- || y <= mNotificationStackScroller.getBottomMostNotificationBottom()
- || y <= mQsContainer.getY() + mQsContainer.getHeight();
+ return mStatusBarState != StatusBarState.SHADE ||
+ (x >= mScrollView.getLeft() && x <= mScrollView.getRight()) &&
+ (y <= mNotificationStackScroller.getBottomMostNotificationBottom()
+ || y <= mQsContainer.getY() + mQsContainer.getHeight());
}
private void handleQsDown(MotionEvent event) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
index f74d2f4baf70..ccafbd1e034b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
@@ -140,6 +140,9 @@ public class PanelBar extends FrameLayout {
mPanelHolder.setSelectedPanel(mTouchingPanel);
for (PanelView pv : mPanels) {
if (pv != panel) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing because opening another panel");
+ }
pv.collapse(false /* delayed */);
}
}
@@ -191,9 +194,15 @@ public class PanelBar extends FrameLayout {
boolean waiting = false;
for (PanelView pv : mPanels) {
if (animate && !pv.isFullyCollapsed()) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Animating collapse, delayed");
+ }
pv.collapse(true /* delayed */);
waiting = true;
} else {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing without animation");
+ }
pv.resetViews();
pv.setExpandedFraction(0); // just in case
pv.setVisibility(View.GONE);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 2f21781edb22..873d528c8fe4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -86,6 +86,7 @@ public abstract class PanelView extends FrameLayout {
private String mViewName;
private float mInitialTouchY;
private float mInitialTouchX;
+ private boolean mTouchDisabled;
private Interpolator mLinearOutSlowInInterpolator;
private Interpolator mFastOutSlowInInterpolator;
@@ -134,6 +135,9 @@ public abstract class PanelView extends FrameLayout {
}
private void runPeekAnimation() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Starting peek animation");
+ }
mPeekHeight = getPeekHeight();
if (DEBUG) logf("peek to height=%.1f", mPeekHeight);
if (mHeightAnimator != null) {
@@ -154,9 +158,15 @@ public abstract class PanelView extends FrameLayout {
public void onAnimationEnd(Animator animation) {
mPeekAnimator = null;
if (mCollapseAfterPeek && !mCancelled) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Peek animation finished, posting collapse");
+ }
postOnAnimation(new Runnable() {
@Override
public void run() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Peek animation finished, collapsing");
+ }
collapse(false /* delayed */);
}
});
@@ -198,9 +208,13 @@ public abstract class PanelView extends FrameLayout {
event.offsetLocation(-deltaX, -deltaY);
}
+ public void setTouchDisabled(boolean disabled) {
+ mTouchDisabled = disabled;
+ }
+
@Override
public boolean onTouchEvent(MotionEvent event) {
- if (mInstantExpanding) {
+ if (mInstantExpanding || mTouchDisabled) {
return false;
}
@@ -330,6 +344,9 @@ public abstract class PanelView extends FrameLayout {
}
boolean expand = flingExpands(vel, vectorVel);
onTrackingStopped(expand);
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Flinging: expand=" + expand);
+ }
fling(vel, expand);
mUpdateFlingOnLayout = expand && mPanelClosedOnDown && !mHasLayoutedSinceDown;
if (mUpdateFlingOnLayout) {
@@ -510,6 +527,9 @@ public abstract class PanelView extends FrameLayout {
notifyExpandingFinished();
return;
}
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Executing fling: expand=" + expand + " vel=" + vel);
+ }
mOverExpandedBeforeFling = getOverExpansionAmount() > 0f;
ValueAnimator animator = createHeightAnimator(target);
if (expand) {
@@ -691,18 +711,29 @@ public abstract class PanelView extends FrameLayout {
mClosing = true;
notifyExpandingStarted();
if (delayed) {
- postDelayed(new Runnable() {
- @Override
- public void run() {
- fling(0, false /* expand */);
- }
- }, 120);
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Posting collapse runnable, will be run in 120ms");
+ }
+ postDelayed(mFlingCollapseRunnable, 120);
} else {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Animating collapsing now");
+ }
fling(0, false /* expand */);
}
}
}
+ private final Runnable mFlingCollapseRunnable = new Runnable() {
+ @Override
+ public void run() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Executing collapse runnable, animating collapsing now");
+ }
+ fling(0, false /* expand */);
+ }
+ };
+
public void expand() {
if (DEBUG) logf("expand: " + this);
if (isFullyCollapsed()) {
@@ -727,8 +758,15 @@ public abstract class PanelView extends FrameLayout {
}
public void instantExpand() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Before instant expanding"
+ + " mTracking=" + mTracking
+ + " mExpanding=" + mExpanding);
+ }
mInstantExpanding = true;
+ mUpdateFlingOnLayout = false;
abortAnimations();
+ cancelPeek();
if (mTracking) {
onTrackingStopped(true /* expands */); // The panel is expanded after this call.
}
@@ -745,6 +783,11 @@ public abstract class PanelView extends FrameLayout {
public void onGlobalLayout() {
if (mStatusBar.getStatusBarWindow().getHeight()
!= mStatusBar.getStatusBarHeight()) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Now instant expanding after layout"
+ + " mTracking=" + mTracking
+ + " mExpanding=" + mExpanding);
+ }
getViewTreeObserver().removeOnGlobalLayoutListener(this);
setExpandedFraction(1f);
mInstantExpanding = false;
@@ -761,6 +804,8 @@ public abstract class PanelView extends FrameLayout {
if (mHeightAnimator != null) {
mHeightAnimator.cancel();
}
+ removeCallbacks(mPostCollapseRunnable);
+ removeCallbacks(mFlingCollapseRunnable);
}
protected void startUnlockHintAnimation() {
@@ -889,6 +934,9 @@ public abstract class PanelView extends FrameLayout {
private final Runnable mPostCollapseRunnable = new Runnable() {
@Override
public void run() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing after middle clicked");
+ }
collapse(false /* delayed */);
}
};
@@ -901,6 +949,9 @@ public abstract class PanelView extends FrameLayout {
mStatusBar.goToKeyguard();
return true;
case StatusBarState.SHADE:
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Middle clicked in shade state, posting collapsing runnable");
+ }
// This gets called in the middle of the touch handling, where the state is still
// that we are tracking the panel. Collapse the panel after this is done.
@@ -915,7 +966,7 @@ public abstract class PanelView extends FrameLayout {
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println(String.format("[PanelView(%s): expandedHeight=%f maxPanelHeight=%d closing=%s"
- + " tracking=%s justPeeked=%s peekAnim=%s%s timeAnim=%s%s"
+ + " tracking=%s justPeeked=%s peekAnim=%s%s timeAnim=%s%s touchDisabled=%s"
+ "]",
this.getClass().getSimpleName(),
getExpandedHeight(),
@@ -924,7 +975,8 @@ public abstract class PanelView extends FrameLayout {
mTracking?"T":"f",
mJustPeeked?"T":"f",
mPeekAnimator, ((mPeekAnimator!=null && mPeekAnimator.isStarted())?" (started)":""),
- mHeightAnimator, ((mHeightAnimator !=null && mHeightAnimator.isStarted())?" (started)":"")
+ mHeightAnimator, ((mHeightAnimator !=null && mHeightAnimator.isStarted())?" (started)":""),
+ mTouchDisabled?"T":"f"
));
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 5d4c83114e9b..e6db2c8c2f66 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -177,6 +177,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
public static final boolean DEBUG_GESTURES = false;
public static final boolean DEBUG_MEDIA = false;
public static final boolean DEBUG_MEDIA_FAKE_ARTWORK = false;
+ public static final boolean DEBUG_EMPTY_KEYGUARD = true;
public static final boolean DEBUG_WINDOW_STATE = false;
@@ -403,6 +404,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
private int mNavigationBarMode;
private Boolean mScreenOn;
+ // The second field is a bit different from the first one because it only listens to screen on/
+ // screen of events from Keyguard. We need this so we don't have a race condition with the
+ // broadcast. In the future, we should remove the first field altogether and rename the second
+ // field.
+ private boolean mScreenOnFromKeyguard;
+
private ViewMediatorCallback mKeyguardViewMediatorCallback;
private ScrimController mScrimController;
@@ -2238,6 +2245,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mStatusBarWindowManager.setStatusBarFocusable(false);
mStatusBarWindow.cancelExpandHelper();
+ if (DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from animateCollapsePanels:"
+ + " force=" + force
+ + " mState=" + mState);
+ }
mStatusBarView.collapseAllPanels(true);
}
}
@@ -2325,6 +2337,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
public void animateCollapseQuickSettings() {
+ if (DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from animateCollapseQuickSettings");
+ }
mStatusBarView.collapseAllPanels(true);
}
@@ -2337,6 +2352,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
// Ensure the panel is fully collapsed (just in case; bug 6765842, 7260868)
+ if (DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from makeExpandedInvisible");
+ }
mStatusBarView.collapseAllPanels(/*animate=*/ false);
// reset things to their proper state
@@ -2430,6 +2448,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mStatusBarWindowState = state;
if (DEBUG_WINDOW_STATE) Log.d(TAG, "Status bar " + windowStateToString(state));
if (!showing) {
+ if (DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from setWindowState");
+ }
mStatusBarView.collapseAllPanels(false);
}
}
@@ -2987,6 +3008,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
});
if (dismissShade) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel startActivityDismissKeyguard after keyguard"
+ + "dismiss");
+ }
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
}
return true;
@@ -3447,6 +3472,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
public void showKeyguard() {
setBarState(StatusBarState.KEYGUARD);
updateKeyguardState(false /* goingToFullShade */, false /* fromShadeLocked */);
+ if (!mScreenOnFromKeyguard) {
+
+ // If the screen is off already, we need to disable touch events because these might
+ // collapse the panel after we expanded it, and thus we would end up with a blank
+ // Keyguard.
+ mNotificationPanel.setTouchDisabled(true);
+ }
instantExpandNotificationsPanel();
mLeaveOpenOnKeyguardHide = false;
if (mDraggedDownRow != null) {
@@ -3654,6 +3686,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
public boolean onSpacePressed() {
if (mScreenOn != null && mScreenOn
&& (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED)) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing panel from onSpacePressed");
+ }
animateCollapsePanels(0 /* flags */, true /* force */);
return true;
}
@@ -3848,12 +3883,15 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
public void onScreenTurnedOff() {
+ mScreenOnFromKeyguard = false;
mStackScroller.setAnimationsEnabled(false);
}
public void onScreenTurnedOn() {
+ mScreenOnFromKeyguard = true;
mStackScroller.setAnimationsEnabled(true);
mNotificationPanel.onScreenTurnedOn();
+ mNotificationPanel.setTouchDisabled(false);
}
/**
@@ -3949,7 +3987,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
public void wakeUpIfDozing(long time) {
- if (mDozeServiceHost != null && mDozeServiceHost.isDozing()) {
+ if (mDozeServiceHost != null && mDozeServiceHost.isDozing()
+ && mScrimController.isPulsing()) {
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
pm.wakeUp(time);
}
@@ -4040,22 +4079,20 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
@Override
public void requestDoze(DozeService dozeService) {
if (dozeService == null) return;
- dozeService.stayAwake(PROCESSING_TIME);
mHandler.obtainMessage(H.REQUEST_DOZE, dozeService).sendToTarget();
}
@Override
- public void requestPulse(int pulses, boolean delayed, DozeService dozeService) {
+ public void requestPulse(boolean delayed, DozeService dozeService) {
if (dozeService == null) return;
dozeService.stayAwake(PROCESSING_TIME);
- mHandler.obtainMessage(H.REQUEST_PULSE, pulses, delayed ? 1 : 0, dozeService)
+ mHandler.obtainMessage(H.REQUEST_PULSE, delayed ? 1 : 0, 0, dozeService)
.sendToTarget();
}
@Override
public void dozingStopped(DozeService dozeService) {
if (dozeService == null) return;
- dozeService.stayAwake(PROCESSING_TIME);
mHandler.obtainMessage(H.DOZING_STOPPED, dozeService).sendToTarget();
}
@@ -4073,9 +4110,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mCurrentDozeService.startDozing();
}
- private void handleRequestPulse(int pulses, boolean delayed, DozeService dozeService) {
+ private void handleRequestPulse(boolean delayed, DozeService dozeService) {
if (!dozeService.equals(mCurrentDozeService)) return;
- final long stayAwake = mScrimController.pulse(pulses, delayed);
+ final long stayAwake = mScrimController.pulse(delayed);
mCurrentDozeService.stayAwake(stayAwake);
}
@@ -4099,7 +4136,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
if (msg.what == REQUEST_DOZE) {
handleRequestDoze((DozeService) msg.obj);
} else if (msg.what == REQUEST_PULSE) {
- handleRequestPulse(msg.arg1, msg.arg2 != 0, (DozeService) msg.obj);
+ handleRequestPulse(msg.arg1 != 0, (DozeService) msg.obj);
} else if (msg.what == DOZING_STOPPED) {
handleDozingStopped((DozeService) msg.obj);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 237b78272b47..600621752321 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -27,7 +27,7 @@ import android.media.AudioManager;
import android.os.Handler;
import android.os.UserHandle;
import android.provider.Settings.Global;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.util.Log;
import com.android.internal.telephony.IccCardConstants;
@@ -93,7 +93,7 @@ public class PhoneStatusBarPolicy {
else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) {
updateSimState(intent);
}
- else if (action.equals(TelecommManager.ACTION_CURRENT_TTY_MODE_CHANGED)) {
+ else if (action.equals(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED)) {
updateTTY(intent);
}
else if (action.equals(Intent.ACTION_USER_SWITCHED)) {
@@ -115,7 +115,7 @@ public class PhoneStatusBarPolicy {
filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
- filter.addAction(TelecommManager.ACTION_CURRENT_TTY_MODE_CHANGED);
+ filter.addAction(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED);
filter.addAction(Intent.ACTION_USER_SWITCHED);
mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
@@ -279,9 +279,9 @@ public class PhoneStatusBarPolicy {
}
private final void updateTTY(Intent intent) {
- int currentTtyMode = intent.getIntExtra(TelecommManager.EXTRA_CURRENT_TTY_MODE,
- TelecommManager.TTY_MODE_OFF);
- boolean enabled = currentTtyMode != TelecommManager.TTY_MODE_OFF;
+ int currentTtyMode = intent.getIntExtra(TelecomManager.EXTRA_CURRENT_TTY_MODE,
+ TelecomManager.TTY_MODE_OFF);
+ boolean enabled = currentTtyMode != TelecomManager.TTY_MODE_OFF;
if (DEBUG) Log.v(TAG, "updateTTY: enabled: " + enabled);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index be48df766c10..57e5755dff53 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -19,6 +19,7 @@ package com.android.systemui.statusbar.phone;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
+import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.util.Log;
@@ -36,7 +37,7 @@ import com.android.systemui.R;
*/
public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
private static final String TAG = "ScrimController";
- private static final boolean DEBUG = false;
+ private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
public static final long ANIMATION_DURATION = 220;
@@ -46,17 +47,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
private static final float SCRIM_IN_FRONT_ALPHA = 0.75f;
private static final int TAG_KEY_ANIM = R.id.scrim;
- private static final long PULSE_IN_ANIMATION_DURATION = 1000;
- private static final long PULSE_VISIBLE_DURATION = 3000;
- private static final long PULSE_OUT_ANIMATION_DURATION = 1000;
- private static final long PULSE_INVISIBLE_DURATION = 1000;
- private static final long PULSE_DURATION = PULSE_IN_ANIMATION_DURATION
- + PULSE_VISIBLE_DURATION + PULSE_OUT_ANIMATION_DURATION + PULSE_INVISIBLE_DURATION;
- private static final long PRE_PULSE_DELAY = 1000;
-
private final View mScrimBehind;
private final View mScrimInFront;
private final UnlockMethodCache mUnlockMethodCache;
+ private final DozeParameters mDozeParameters;
private boolean mKeyguardShowing;
private float mFraction;
@@ -72,16 +66,18 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
private Runnable mOnAnimationFinished;
private boolean mAnimationStarted;
private boolean mDozing;
- private int mPulsesRemaining;
+ private long mPulseEndTime;
private final Interpolator mInterpolator = new DecelerateInterpolator();
private final Interpolator mLinearOutSlowInInterpolator;
public ScrimController(View scrimBehind, View scrimInFront) {
mScrimBehind = scrimBehind;
mScrimInFront = scrimInFront;
- mUnlockMethodCache = UnlockMethodCache.getInstance(scrimBehind.getContext());
- mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(scrimBehind.getContext(),
+ final Context context = scrimBehind.getContext();
+ mUnlockMethodCache = UnlockMethodCache.getInstance(context);
+ mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
android.R.interpolator.linear_out_slow_in);
+ mDozeParameters = new DozeParameters(context);
}
public void setKeyguardShowing(boolean showing) {
@@ -137,19 +133,28 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
scheduleUpdate();
}
- /** When dozing, fade screen contents in and out a few times using the front scrim. */
- public long pulse(int pulses, boolean delayed) {
+ /** When dozing, fade screen contents in and out using the front scrim. */
+ public long pulse(boolean delayed) {
if (!mDozing) return 0;
- mPulsesRemaining = Math.max(pulses, mPulsesRemaining);
- final long delay = delayed ? PRE_PULSE_DELAY : 0;
+ final long now = System.currentTimeMillis();
+ if (DEBUG) Log.d(TAG, "pulse delayed=" + delayed + " mPulseEndTime=" + mPulseEndTime
+ + " now=" + now);
+ if (mPulseEndTime != 0 && mPulseEndTime > now) return mPulseEndTime - now;
+ final long delay = delayed ? mDozeParameters.getPulseStartDelay() : 0;
mScrimInFront.postDelayed(mPulseIn, delay);
- return delay + mPulsesRemaining * PULSE_DURATION;
+ mPulseEndTime = now + delay + mDozeParameters.getPulseDuration();
+ return mPulseEndTime - now;
+ }
+
+ public boolean isPulsing() {
+ return mDozing && mPulseEndTime != 0;
}
private void cancelPulsing() {
- mPulsesRemaining = 0;
+ if (DEBUG) Log.d(TAG, "Cancel pulsing");
mScrimInFront.removeCallbacks(mPulseIn);
mScrimInFront.removeCallbacks(mPulseOut);
+ mPulseEndTime = 0;
}
private void scheduleUpdate() {
@@ -302,11 +307,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
private final Runnable mPulseIn = new Runnable() {
@Override
public void run() {
- if (DEBUG) Log.d(TAG, "Pulse in, mDozing=" + mDozing
- + " mPulsesRemaining=" + mPulsesRemaining);
- if (!mDozing || mPulsesRemaining == 0) return;
- mPulsesRemaining--;
- mDurationOverride = PULSE_IN_ANIMATION_DURATION;
+ if (DEBUG) Log.d(TAG, "Pulse in, mDozing=" + mDozing);
+ if (!mDozing) return;
+ mDurationOverride = mDozeParameters.getPulseInDuration();
mAnimationDelay = 0;
mAnimateChange = true;
mOnAnimationFinished = mPulseInFinished;
@@ -319,7 +322,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
public void run() {
if (DEBUG) Log.d(TAG, "Pulse in finished, mDozing=" + mDozing);
if (!mDozing) return;
- mScrimInFront.postDelayed(mPulseOut, PULSE_VISIBLE_DURATION);
+ mScrimInFront.postDelayed(mPulseOut, mDozeParameters.getPulseVisibleDuration());
}
};
@@ -328,7 +331,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
public void run() {
if (DEBUG) Log.d(TAG, "Pulse out, mDozing=" + mDozing);
if (!mDozing) return;
- mDurationOverride = PULSE_OUT_ANIMATION_DURATION;
+ mDurationOverride = mDozeParameters.getPulseOutDuration();
mAnimationDelay = 0;
mAnimateChange = true;
mOnAnimationFinished = mPulseOutFinished;
@@ -339,10 +342,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener {
private final Runnable mPulseOutFinished = new Runnable() {
@Override
public void run() {
- if (DEBUG) Log.d(TAG, "Pulse out finished, mPulsesRemaining=" + mPulsesRemaining);
- if (mPulsesRemaining > 0) {
- mScrimInFront.postDelayed(mPulseIn, PULSE_INVISIBLE_DURATION);
- }
+ if (DEBUG) Log.d(TAG, "Pulse out finished");
+ mPulseEndTime = 0;
}
};
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index a5217ab9337f..42cfd39d7a2a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -100,6 +100,11 @@ public class StatusBarWindowView extends FrameLayout {
if (!down) {
return mService.onSpacePressed();
}
+ case KeyEvent.KEYCODE_VOLUME_DOWN:
+ case KeyEvent.KEYCODE_VOLUME_UP:
+ if (down) {
+ mService.wakeUpIfDozing(event.getEventTime());
+ }
}
if (mService.interceptMediaKey(event)) {
return true;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index 16c0e66f2dc5..b814b61ce656 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -17,11 +17,15 @@
package com.android.systemui.statusbar.policy;
import android.animation.Animator;
+import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
+import android.animation.TimeInterpolator;
import android.app.ActivityManager;
import android.content.Context;
import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.RectF;
import android.hardware.input.InputManager;
import android.media.AudioManager;
import android.os.Bundle;
@@ -34,10 +38,12 @@ import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.SoundEffectConstants;
+import android.view.View;
import android.view.ViewConfiguration;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ImageView;
+import java.lang.Math;
import com.android.systemui.R;
@@ -50,15 +56,21 @@ public class KeyButtonView extends ImageView {
// TODO: Get rid of this
public static final float DEFAULT_QUIESCENT_ALPHA = 1f;
+ public static final float MAX_ALPHA = 0.15f;
+ public static final float GLOW_MAX_SCALE_FACTOR = 1.5f;
private long mDownTime;
private int mCode;
private int mTouchSlop;
+ private float mGlowAlpha = 0f;
+ private float mGlowScale = 1f;
private float mDrawingAlpha = 1f;
private float mQuiescentAlpha = DEFAULT_QUIESCENT_ALPHA;
private boolean mSupportsLongpress = true;
+ private AnimatorSet mPressedAnim;
private Animator mAnimateToQuiescent = new ObjectAnimator();
- private Drawable mBackground;
+ private Paint mRipplePaint;
+ private final TimeInterpolator mInterpolator = (TimeInterpolator) new LogInterpolator();
private AudioManager mAudioManager;
private final Runnable mCheckLongPress = new Runnable() {
@@ -90,11 +102,6 @@ public class KeyButtonView extends ImageView {
mSupportsLongpress = a.getBoolean(R.styleable.KeyButtonView_keyRepeat, true);
- Drawable d = getBackground();
- if (d != null) {
- mBackground = d.mutate();
- setBackground(mBackground);
- }
setDrawingAlpha(mQuiescentAlpha);
@@ -134,13 +141,45 @@ public class KeyButtonView extends ImageView {
return super.performAccessibilityAction(action, arguments);
}
+ private Paint getRipplePaint() {
+ if (mRipplePaint == null) {
+ mRipplePaint = new Paint();
+ mRipplePaint.setAntiAlias(true);
+ mRipplePaint.setColor(0xffffffff);
+ }
+ return mRipplePaint;
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ final Paint p = getRipplePaint();
+ p.setAlpha((int)(MAX_ALPHA * mDrawingAlpha * mGlowAlpha * 255));
+
+ final float w = getWidth();
+ final float h = getHeight();
+ final boolean horizontal = w > h;
+ final float diameter = (horizontal ? w : h) * mGlowScale;
+ final float radius = diameter * .5f;
+ final float cx = w * .5f;
+ final float cy = h * .5f;
+ final float rx = horizontal ? radius : cx;
+ final float ry = horizontal ? cy : radius;
+ final float corner = horizontal ? cy : cx;
+
+ canvas.drawRoundRect(cx - rx, cy - ry,
+ cx + rx, cy + ry,
+ corner, corner, p);
+
+ super.onDraw(canvas);
+ }
+
public void setQuiescentAlpha(float alpha, boolean animate) {
mAnimateToQuiescent.cancel();
alpha = Math.min(Math.max(alpha, 0), 1);
if (alpha == mQuiescentAlpha && alpha == mDrawingAlpha) return;
mQuiescentAlpha = alpha;
if (DEBUG) Log.d(TAG, "New quiescent alpha = " + mQuiescentAlpha);
- if (mBackground != null && animate) {
+ if (animate) {
mAnimateToQuiescent = animateToQuiescent();
mAnimateToQuiescent.start();
} else {
@@ -162,32 +201,77 @@ public class KeyButtonView extends ImageView {
public void setDrawingAlpha(float x) {
setImageAlpha((int) (x * 255));
- if (mBackground != null) {
- mBackground.setAlpha((int)(x * 255));
- }
mDrawingAlpha = x;
}
- public void setPressed(boolean pressed) {
- if (mBackground != null) {
- if (pressed != isPressed()) {
- if (pressed) {
- setDrawingAlpha(1f);
- } else {
- mAnimateToQuiescent.cancel();
- mAnimateToQuiescent = animateToQuiescent();
- mAnimateToQuiescent.setDuration(500);
- mAnimateToQuiescent.start();
- }
- }
+ public float getGlowAlpha() {
+ return mGlowAlpha;
+ }
+
+ public void setGlowAlpha(float x) {
+ mGlowAlpha = x;
+ invalidate();
+ }
+
+ public float getGlowScale() {
+ return mGlowScale;
+ }
+
+ public void setGlowScale(float x) {
+ mGlowScale = x;
+ final float w = getWidth();
+ final float h = getHeight();
+ if (GLOW_MAX_SCALE_FACTOR <= 1.0f) {
+ // this only works if we know the glow will never leave our bounds
+ invalidate();
+ } else {
+ final float rx = (w * (GLOW_MAX_SCALE_FACTOR - 1.0f)) / 2.0f + 1.0f;
+ final float ry = (h * (GLOW_MAX_SCALE_FACTOR - 1.0f)) / 2.0f + 1.0f;
+ com.android.systemui.SwipeHelper.invalidateGlobalRegion(
+ this,
+ new RectF(getLeft() - rx,
+ getTop() - ry,
+ getRight() + rx,
+ getBottom() + ry));
+
+ // also invalidate our immediate parent to help avoid situations where nearby glows
+ // interfere
+ ((View)getParent()).invalidate();
}
- super.setPressed(pressed);
}
- private void setHotspot(float x, float y) {
- if (mBackground != null) {
- mBackground.setHotspot(x, y);
+ public void setPressed(boolean pressed) {
+ if (pressed != isPressed()) {
+ if (mPressedAnim != null && mPressedAnim.isRunning()) {
+ mPressedAnim.cancel();
+ }
+ final AnimatorSet as = mPressedAnim = new AnimatorSet();
+ final ObjectAnimator scaleAnimator = ObjectAnimator.ofFloat(this,
+ "glowScale", GLOW_MAX_SCALE_FACTOR);
+ scaleAnimator.setInterpolator(mInterpolator);
+ if (pressed) {
+ mGlowScale = 0f;
+ if (mGlowAlpha < mQuiescentAlpha)
+ mGlowAlpha = mQuiescentAlpha;
+ setDrawingAlpha(1f);
+ as.playTogether(
+ ObjectAnimator.ofFloat(this, "glowAlpha", 1f),
+ scaleAnimator
+ );
+ as.setDuration(500);
+ } else {
+ mAnimateToQuiescent.cancel();
+ mAnimateToQuiescent = animateToQuiescent();
+ as.playTogether(
+ ObjectAnimator.ofFloat(this, "glowAlpha", mGlowAlpha, mGlowAlpha * .2f, 0f),
+ scaleAnimator,
+ mAnimateToQuiescent
+ );
+ as.setDuration(500);
+ }
+ as.start();
}
+ super.setPressed(pressed);
}
public boolean onTouchEvent(MotionEvent ev) {
@@ -209,7 +293,6 @@ public class KeyButtonView extends ImageView {
removeCallbacks(mCheckLongPress);
postDelayed(mCheckLongPress, ViewConfiguration.getLongPressTimeout());
}
- setHotspot(ev.getX(), ev.getY());
break;
case MotionEvent.ACTION_MOVE:
x = (int)ev.getX();
@@ -218,7 +301,6 @@ public class KeyButtonView extends ImageView {
&& x < getWidth() + mTouchSlop
&& y >= -mTouchSlop
&& y < getHeight() + mTouchSlop);
- setHotspot(ev.getX(), ev.getY());
break;
case MotionEvent.ACTION_CANCEL:
setPressed(false);
@@ -272,6 +354,17 @@ public class KeyButtonView extends ImageView {
InputManager.getInstance().injectInputEvent(ev,
InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
}
+
+ /**
+ * Interpolator with a smooth log deceleration
+ */
+ private static final class LogInterpolator implements TimeInterpolator {
+ @Override
+ public float getInterpolation(float input) {
+ return 1 - (float) Math.pow(400, -input * 1.4);
+ }
+ }
+
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 508808961e6a..79d769a6a37d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -128,6 +128,8 @@ public class NetworkControllerImpl extends BroadcastReceiver
private boolean mConnected = false;
private int mConnectedNetworkType = ConnectivityManager.TYPE_NONE;
private String mConnectedNetworkTypeName;
+ private int mLastConnectedNetworkType = ConnectivityManager.TYPE_NONE;
+
private int mInetCondition = 0;
private int mLastInetCondition = 0;
private static final int INET_CONDITION_THRESHOLD = 50;
@@ -221,7 +223,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
filter.addAction(TelephonyIntents.SPN_STRINGS_UPDATED_ACTION);
- filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+ filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION_IMMEDIATE);
filter.addAction(ConnectivityManager.INET_CONDITION_ACTION);
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
@@ -337,7 +339,9 @@ public class NetworkControllerImpl extends BroadcastReceiver
@Override
public DataUsageInfo getDataUsageInfo() {
final DataUsageInfo info = mMobileDataController.getDataUsageInfo();
- info.carrier = mNetworkName;
+ if (info != null) {
+ info.carrier = mNetworkName;
+ }
return info;
}
@@ -460,7 +464,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
intent.getBooleanExtra(TelephonyIntents.EXTRA_SHOW_PLMN, false),
intent.getStringExtra(TelephonyIntents.EXTRA_PLMN));
refreshViews();
- } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) ||
+ } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION_IMMEDIATE) ||
action.equals(ConnectivityManager.INET_CONDITION_ACTION)) {
updateConnectivity(intent);
refreshViews();
@@ -667,21 +671,28 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
}
+ private int inetConditionForNetwork(int networkType) {
+ return (mInetCondition == 1 && mConnectedNetworkType == networkType) ? 1 : 0;
+ }
+
private final void updateDataNetType() {
+ int inetCondition;
+ mDataTypeIconId = mQSDataTypeIconId = 0;
if (mIsWimaxEnabled && mWimaxConnected) {
// wimax is a special 4g network not handled by telephony
- mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
+ inetCondition = inetConditionForNetwork(ConnectivityManager.TYPE_WIMAX);
+ mDataIconList = TelephonyIcons.DATA_4G[inetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_4g;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_4G[mInetCondition];
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_4G[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_4g);
} else {
+ inetCondition = inetConditionForNetwork(ConnectivityManager.TYPE_MOBILE);
+ final boolean showDataTypeIcon = (inetCondition > 0);
switch (mDataNetType) {
case TelephonyManager.NETWORK_TYPE_UNKNOWN:
if (!mShowAtLeastThreeGees) {
- mDataIconList = TelephonyIcons.DATA_G[mInetCondition];
- mDataTypeIconId = 0;
- mQSDataTypeIconId = 0;
+ mDataIconList = TelephonyIcons.DATA_G[inetCondition];
mContentDescriptionDataType = "";
break;
} else {
@@ -689,9 +700,10 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
case TelephonyManager.NETWORK_TYPE_EDGE:
if (!mShowAtLeastThreeGees) {
- mDataIconList = TelephonyIcons.DATA_E[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_e;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_E[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_E[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_e : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_E[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_edge);
break;
@@ -699,9 +711,10 @@ public class NetworkControllerImpl extends BroadcastReceiver
// fall through
}
case TelephonyManager.NETWORK_TYPE_UMTS:
- mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_3g;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_3G[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_3g : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
break;
@@ -710,15 +723,17 @@ public class NetworkControllerImpl extends BroadcastReceiver
case TelephonyManager.NETWORK_TYPE_HSPA:
case TelephonyManager.NETWORK_TYPE_HSPAP:
if (mHspaDataDistinguishable) {
- mDataIconList = TelephonyIcons.DATA_H[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_h;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_H[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_H[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_h : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_H[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3_5g);
} else {
- mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_3g;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_3G[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_3g : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
}
@@ -726,9 +741,10 @@ public class NetworkControllerImpl extends BroadcastReceiver
case TelephonyManager.NETWORK_TYPE_CDMA:
if (!mShowAtLeastThreeGees) {
// display 1xRTT for IS95A/B
- mDataIconList = TelephonyIcons.DATA_1X[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_1x;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_1X[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_1X[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_1x : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_1X[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_cdma);
break;
@@ -737,9 +753,10 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
case TelephonyManager.NETWORK_TYPE_1xRTT:
if (!mShowAtLeastThreeGees) {
- mDataIconList = TelephonyIcons.DATA_1X[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_1x;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_1X[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_1X[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_1x : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_1X[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_cdma);
break;
@@ -750,39 +767,43 @@ public class NetworkControllerImpl extends BroadcastReceiver
case TelephonyManager.NETWORK_TYPE_EVDO_A:
case TelephonyManager.NETWORK_TYPE_EVDO_B:
case TelephonyManager.NETWORK_TYPE_EHRPD:
- mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_3g;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_3G[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_3g : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
break;
case TelephonyManager.NETWORK_TYPE_LTE:
boolean show4GforLTE = mContext.getResources().getBoolean(R.bool.config_show4GForLTE);
if (show4GforLTE) {
- mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_4g;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_4G[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_4G[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_4g : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_4G[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_4g);
} else {
- mDataIconList = TelephonyIcons.DATA_LTE[mInetCondition];
- mDataTypeIconId = TelephonyIcons.ICON_LTE;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_LTE[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_LTE[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ? TelephonyIcons.ICON_LTE : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_LTE[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_lte);
}
break;
default:
if (!mShowAtLeastThreeGees) {
- mDataIconList = TelephonyIcons.DATA_G[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_g;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_G[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_G[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_g : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_G[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_gprs);
} else {
- mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
- mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_3g;
- mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[mInetCondition];
+ mDataIconList = TelephonyIcons.DATA_3G[inetCondition];
+ mDataTypeIconId = showDataTypeIcon ?
+ R.drawable.stat_sys_data_fully_connected_3g : 0;
+ mQSDataTypeIconId = TelephonyIcons.QS_DATA_3G[inetCondition];
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
}
@@ -965,9 +986,10 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
private void updateWifiIcons() {
+ int inetCondition = inetConditionForNetwork(ConnectivityManager.TYPE_WIFI);
if (mWifiConnected) {
- mWifiIconId = WifiIcons.WIFI_SIGNAL_STRENGTH[mInetCondition][mWifiLevel];
- mQSWifiIconId = WifiIcons.QS_WIFI_SIGNAL_STRENGTH[mInetCondition][mWifiLevel];
+ mWifiIconId = WifiIcons.WIFI_SIGNAL_STRENGTH[inetCondition][mWifiLevel];
+ mQSWifiIconId = WifiIcons.QS_WIFI_SIGNAL_STRENGTH[inetCondition][mWifiLevel];
mContentDescriptionWifi = mContext.getString(
AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH[mWifiLevel]);
} else {
@@ -1026,10 +1048,11 @@ public class NetworkControllerImpl extends BroadcastReceiver
private void updateWimaxIcons() {
if (mIsWimaxEnabled) {
if (mWimaxConnected) {
+ int inetCondition = inetConditionForNetwork(ConnectivityManager.TYPE_WIMAX);
if (mWimaxIdle)
mWimaxIconId = WimaxIcons.WIMAX_IDLE;
else
- mWimaxIconId = WimaxIcons.WIMAX_SIGNAL_STRENGTH[mInetCondition][mWimaxSignal];
+ mWimaxIconId = WimaxIcons.WIMAX_SIGNAL_STRENGTH[inetCondition][mWimaxSignal];
mContentDescriptionWimax = mContext.getString(
AccessibilityContentDescriptions.WIMAX_CONNECTION_STRENGTH[mWimaxSignal]);
} else {
@@ -1206,6 +1229,8 @@ public class NetworkControllerImpl extends BroadcastReceiver
mContentDescriptionCombinedSignal = mHasMobileDataFeature
? mContentDescriptionDataType : mContentDescriptionWifi;
+ int inetCondition = inetConditionForNetwork(ConnectivityManager.TYPE_MOBILE);
+
mDataTypeIconId = 0;
mQSDataTypeIconId = 0;
if (isCdma()) {
@@ -1264,7 +1289,8 @@ public class NetworkControllerImpl extends BroadcastReceiver
|| mLastWimaxIconId != mWimaxIconId
|| mLastDataTypeIconId != mDataTypeIconId
|| mLastAirplaneMode != mAirplaneMode
- || mLastLocale != mLocale)
+ || mLastLocale != mLocale
+ || mLastConnectedNetworkType != mConnectedNetworkType)
{
// NB: the mLast*s will be updated later
for (SignalCluster cluster : mSignalClusters) {
@@ -1299,6 +1325,10 @@ public class NetworkControllerImpl extends BroadcastReceiver
mLastInetCondition = mInetCondition;
}
+ if (mLastConnectedNetworkType != mConnectedNetworkType) {
+ mLastConnectedNetworkType = mConnectedNetworkType;
+ }
+
// the wimax icon on phones
if (mLastWimaxIconId != mWimaxIconId) {
mLastWimaxIconId = mWimaxIconId;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java
index 8cbe27280dda..d50e39fcbb1c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.policy;
import android.app.ActivityManagerNative;
-import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -26,33 +25,21 @@ import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
import android.database.Cursor;
import android.graphics.Bitmap;
-import android.graphics.BitmapShader;
-import android.graphics.Canvas;
-import android.graphics.Matrix;
-import android.graphics.Paint;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffXfermode;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
-import android.hardware.display.DisplayManager;
import android.os.AsyncTask;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.ContactsContract;
-import android.security.KeyChain;
import android.util.Log;
import android.util.Pair;
-import com.android.internal.view.RotationPolicy;
import com.android.systemui.BitmapHelper;
import com.android.systemui.R;
+import com.android.internal.util.UserIcons;
import java.util.ArrayList;
-import java.util.concurrent.CopyOnWriteArrayList;
public final class UserInfoController {
@@ -142,6 +129,7 @@ public final class UserInfoController {
throw new RuntimeException(e);
}
final int userId = userInfo.id;
+ final boolean isGuest = userInfo.isGuest();
final String userName = userInfo.name;
final int avatarSize
= mContext.getResources().getDimensionPixelSize(R.dimen.max_avatar_size);
@@ -161,7 +149,8 @@ public final class UserInfoController {
avatar = new BitmapDrawable(mContext.getResources(),
BitmapHelper.createCircularClip(rawAvatar, avatarSize, avatarSize));
} else {
- avatar = mContext.getResources().getDrawable(R.drawable.ic_account_circle);
+ avatar = UserIcons.getDefaultUserIcon(isGuest? UserHandle.USER_NULL : userId,
+ /* light= */ true);
mUseDefaultAvatar = true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index d02826ffdaa8..e8f35fd77bf9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -16,13 +16,6 @@
package com.android.systemui.statusbar.policy;
-import com.android.systemui.BitmapHelper;
-import com.android.systemui.GuestResumeSessionReceiver;
-import com.android.systemui.R;
-import com.android.systemui.qs.QSTile;
-import com.android.systemui.qs.tiles.UserDetailView;
-import com.android.systemui.statusbar.phone.SystemUIDialog;
-
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.Dialog;
@@ -45,9 +38,16 @@ import android.util.Log;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
-import android.view.WindowManagerGlobal;
import android.widget.BaseAdapter;
+import com.android.internal.util.UserIcons;
+import com.android.systemui.BitmapHelper;
+import com.android.systemui.GuestResumeSessionReceiver;
+import com.android.systemui.R;
+import com.android.systemui.qs.QSTile;
+import com.android.systemui.qs.tiles.UserDetailView;
+import com.android.systemui.statusbar.phone.SystemUIDialog;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
@@ -425,7 +425,8 @@ public class UserSwitcherController {
if (item.isAddUser) {
return context.getDrawable(R.drawable.ic_add_circle_qs);
}
- return context.getDrawable(R.drawable.ic_account_circle_qs);
+ return UserIcons.getDefaultUserIcon(item.isGuest ? UserHandle.USER_NULL : item.info.id,
+ /* light= */ true);
}
}
@@ -565,6 +566,9 @@ public class UserSwitcherController {
dismiss();
int id = mUserManager.createUser(
mContext.getString(R.string.user_new_user_name), 0 /* flags */).id;
+ Bitmap icon = UserIcons.convertToBitmap(UserIcons.getDefaultUserIcon(
+ id, /* light= */ false));
+ mUserManager.setUserIcon(id, icon);
switchToUserId(id);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
index ece82a1cc8d4..a69390ef0f89 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
@@ -166,7 +166,7 @@ public class StackStateAnimator {
boolean hasDelays = mAnimationFilter.hasDelays;
boolean isDelayRelevant = yTranslationChanging || zTranslationChanging || scaleChanging ||
alphaChanging || heightChanging || topInsetChanging;
- boolean noAnimation = wasAdded && !mAnimationFilter.hasGoToFullShadeEvent;
+ boolean noAnimation = wasAdded;
long delay = 0;
long duration = mCurrentLength;
if (hasDelays && isDelayRelevant || wasAdded) {
@@ -184,7 +184,7 @@ public class StackStateAnimator {
// start translationY animation
if (yTranslationChanging) {
- if (noAnimation) {
+ if (noAnimation && !mAnimationFilter.hasGoToFullShadeEvent) {
child.setTranslationY(viewState.yTranslation);
} else {
startYTranslationAnimation(child, viewState, duration, delay);
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index cce30c7fecc7..92171c1c4d12 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -124,6 +124,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
private static final int CUSTOM_TITLE_COMPATIBLE_FEATURES = DEFAULT_FEATURES |
(1 << FEATURE_CUSTOM_TITLE) |
(1 << FEATURE_CONTENT_TRANSITIONS) |
+ (1 << FEATURE_ACTIVITY_TRANSITIONS) |
(1 << FEATURE_ACTION_MODE_OVERLAY);
private static final Transition USE_DEFAULT_TRANSITION = new TransitionSet();
@@ -149,6 +150,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
// mDecor itself, or a child of mDecor where the contents go.
private ViewGroup mContentParent;
+ private ViewGroup mContentRoot;
+
SurfaceHolder.Callback2 mTakeSurfaceCallback;
InputQueue.Callback mTakeInputQueueCallback;
@@ -2153,6 +2156,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
private int mLastTopInset = 0;
private int mLastBottomInset = 0;
+ private int mLastRightInset = 0;
private int mLastSystemUiVisibility = 0;
@@ -2731,7 +2735,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
mFrameOffsets.set(insets.getSystemWindowInsets());
- updateColorViews(insets);
+ insets = updateColorViews(insets);
insets = updateStatusGuard(insets);
updateNavigationGuard(insets);
if (getForeground() != null) {
@@ -2748,8 +2752,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
private WindowInsets updateColorViews(WindowInsets insets) {
if (!mIsFloating && ActivityManager.isHighEndGfx()) {
if (insets != null) {
- mLastTopInset = insets.getStableInsetTop();
- mLastBottomInset = insets.getStableInsetBottom();
+ mLastTopInset = Math.min(insets.getStableInsetTop(),
+ insets.getSystemWindowInsetTop());
+ mLastBottomInset = Math.min(insets.getStableInsetBottom(),
+ insets.getSystemWindowInsetBottom());
+ mLastRightInset = Math.min(insets.getStableInsetRight(),
+ insets.getSystemWindowInsetRight());
}
mStatusColorView = updateColorViewInt(mStatusColorView,
SYSTEM_UI_FLAG_FULLSCREEN, FLAG_TRANSLUCENT_STATUS,
@@ -2764,8 +2772,39 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
com.android.internal.R.id.navigationBarBackground,
false /* hiddenByWindowFlag */);
}
+
+ WindowManager.LayoutParams attrs = getAttributes();
+ int sysUiVisibility = attrs.systemUiVisibility | attrs.subtreeSystemUiVisibility;
+
+ // When we expand the window with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, we still need
+ // to ensure that the rest of the view hierarchy doesn't notice it, unless they've
+ // explicitly asked for it.
+
+ boolean consumingNavBar =
+ (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
+ && (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
+ && (mLastSystemUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0;
+
+ int consumedRight = consumingNavBar ? mLastRightInset : 0;
+ int consumedBottom = consumingNavBar ? mLastBottomInset : 0;
+
+ if (mContentRoot != null
+ && mContentRoot.getLayoutParams() instanceof MarginLayoutParams) {
+ MarginLayoutParams lp = (MarginLayoutParams) mContentRoot.getLayoutParams();
+ if (lp.rightMargin != consumedRight || lp.bottomMargin != consumedBottom) {
+ lp.rightMargin = consumedRight;
+ lp.bottomMargin = consumedBottom;
+ mContentRoot.setLayoutParams(lp);
+ }
+ }
+
if (insets != null) {
- insets = insets.consumeStableInsets();
+ insets = insets.consumeStableInsets().replaceSystemWindowInsets(
+ insets.getSystemWindowInsetLeft(),
+ insets.getSystemWindowInsetTop(),
+ insets.getSystemWindowInsetRight() - consumedRight,
+ insets.getSystemWindowInsetBottom() - consumedBottom
+ );
}
return insets;
}
@@ -3207,6 +3246,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
if (a.getBoolean(R.styleable.Window_windowContentTransitions, false)) {
requestFeature(FEATURE_CONTENT_TRANSITIONS);
}
+ if (a.getBoolean(R.styleable.Window_windowActivityTransitions, false)) {
+ requestFeature(FEATURE_ACTIVITY_TRANSITIONS);
+ }
final WindowManager windowService = (WindowManager) getContext().getSystemService(
Context.WINDOW_SERVICE);
@@ -3377,6 +3419,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
View in = mLayoutInflater.inflate(layoutResource, null);
decor.addView(in, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+ mContentRoot = (ViewGroup) in;
ViewGroup contentParent = (ViewGroup)findViewById(ID_ANDROID_CONTENT);
if (contentParent == null) {
@@ -3516,7 +3559,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
// Only inflate or create a new TransitionManager if the caller hasn't
// already set a custom one.
- if (hasFeature(FEATURE_CONTENT_TRANSITIONS)) {
+ if (hasFeature(FEATURE_ACTIVITY_TRANSITIONS)) {
if (mTransitionManager == null) {
final int transitionRes = getWindowStyle().getResourceId(
R.styleable.Window_windowContentTransitionManager,
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 16bb00bbf7d3..02adef473cbb 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -46,11 +46,7 @@ import android.media.AudioManager;
import android.media.IAudioService;
import android.media.Ringtone;
import android.media.RingtoneManager;
-import android.media.session.MediaController;
-import android.media.session.MediaSession;
import android.media.session.MediaSessionLegacyHelper;
-import android.media.session.MediaSessionManager;
-import android.media.session.PlaybackState;
import android.os.Bundle;
import android.os.FactoryTest;
import android.os.Handler;
@@ -72,7 +68,7 @@ import android.service.dreams.DreamManagerInternal;
import android.service.dreams.DreamService;
import android.service.dreams.IDreamManager;
import android.speech.RecognizerIntent;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
@@ -101,7 +97,6 @@ import android.view.WindowManagerInternal;
import android.view.WindowManagerPolicy;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
-import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
@@ -120,9 +115,7 @@ import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
-import java.util.ArrayList;
import java.util.HashSet;
-import java.util.List;
import static android.view.WindowManager.LayoutParams.*;
import static android.view.WindowManagerPolicy.WindowManagerFuncs.LID_ABSENT;
@@ -231,6 +224,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
KeyEvent.KEYCODE_CALCULATOR, Intent.CATEGORY_APP_CALCULATOR);
}
+ /** Amount of time (in milliseconds) to wait for windows drawn before powering on. */
+ static final int WAITING_FOR_DRAWN_TIMEOUT = 1000;
+
/**
* Lock protecting internal state. Must not call out into window
* manager with lock held. (This lock will be acquired in places
@@ -439,6 +435,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
WindowState mTopFullscreenOpaqueWindowState;
HashSet<IApplicationToken> mAppsToBeHidden = new HashSet<IApplicationToken>();
+ HashSet<IApplicationToken> mAppsThatDismissKeyguard = new HashSet<IApplicationToken>();
boolean mTopIsFullscreen;
boolean mForceStatusBar;
boolean mForceStatusBarFromKeyguard;
@@ -1520,8 +1517,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (ActivityManager.isHighEndGfx()
&& (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) {
- attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE
- | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ attrs.subtreeSystemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
}
}
@@ -1758,6 +1754,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
}
+ @Override
+ public WindowState getWinShowWhenLockedLw() {
+ return mWinShowWhenLocked;
+ }
+
/** {@inheritDoc} */
@Override
public View addStartingWindow(IBinder appToken, String packageName, int theme,
@@ -1826,8 +1827,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
params.packageName = packageName;
params.windowAnimations = win.getWindowStyle().getResourceId(
com.android.internal.R.styleable.Window_windowAnimationStyle, 0);
- params.privateFlags |=
- WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
if (!compatInfo.supportsScreen()) {
@@ -2128,8 +2127,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
ServiceManager.checkService(DreamService.DREAM_SERVICE));
}
- TelecommManager getTelecommService() {
- return (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
+ TelecomManager getTelecommService() {
+ return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
}
static IAudioService getAudioService() {
@@ -2218,8 +2217,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// If an incoming call is ringing, HOME is totally disabled.
// (The user is already on the InCallUI at this point,
// and his ONLY options are to answer or reject the call.)
- TelecommManager telecommManager = getTelecommService();
- if (telecommManager != null && telecommManager.isRinging()) {
+ TelecomManager telecomManager = getTelecommService();
+ if (telecomManager != null && telecomManager.isRinging()) {
Log.i(TAG, "Ignoring HOME; there's a ringing incoming call.");
return -1;
}
@@ -3753,6 +3752,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
public void beginPostLayoutPolicyLw(int displayWidth, int displayHeight) {
mTopFullscreenOpaqueWindowState = null;
mAppsToBeHidden.clear();
+ mAppsThatDismissKeyguard.clear();
mForceStatusBar = false;
mForceStatusBarFromKeyguard = false;
mForcingShowNavBar = false;
@@ -3793,7 +3793,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mShowingLockscreen = true;
}
boolean appWindow = attrs.type >= FIRST_APPLICATION_WINDOW
- && attrs.type <= LAST_APPLICATION_WINDOW;
+ && attrs.type < FIRST_SYSTEM_WINDOW;
if (attrs.type == TYPE_DREAM) {
// If the lockscreen was showing when the dream started then wait
// for the dream to draw before hiding the lockscreen.
@@ -3808,38 +3808,44 @@ public class PhoneWindowManager implements WindowManagerPolicy {
final boolean dismissKeyguard = (fl & FLAG_DISMISS_KEYGUARD) != 0;
final boolean secureKeyguard = isKeyguardSecure();
if (appWindow) {
- if (showWhenLocked || (dismissKeyguard && !secureKeyguard)) {
+ final IApplicationToken appToken = win.getAppToken();
+ if (showWhenLocked) {
// Remove any previous windows with the same appToken.
- mAppsToBeHidden.remove(win.getAppToken());
- if (mAppsToBeHidden.isEmpty() && showWhenLocked &&
- isKeyguardSecureIncludingHidden()) {
+ mAppsToBeHidden.remove(appToken);
+ mAppsThatDismissKeyguard.remove(appToken);
+ if (mAppsToBeHidden.isEmpty() && isKeyguardSecureIncludingHidden()) {
mWinShowWhenLocked = win;
mHideLockScreen = true;
mForceStatusBarFromKeyguard = false;
}
+ } else if (dismissKeyguard) {
+ if (secureKeyguard) {
+ mAppsToBeHidden.add(appToken);
+ } else {
+ mAppsToBeHidden.remove(appToken);
+ }
+ mAppsThatDismissKeyguard.add(appToken);
} else {
- mAppsToBeHidden.add(win.getAppToken());
+ mAppsToBeHidden.add(appToken);
}
if (attrs.x == 0 && attrs.y == 0
&& attrs.width == WindowManager.LayoutParams.MATCH_PARENT
&& attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
if (DEBUG_LAYOUT) Slog.v(TAG, "Fullscreen window: " + win);
mTopFullscreenOpaqueWindowState = win;
- if (mAppsToBeHidden.isEmpty()) {
- if (showWhenLocked) {
- if (DEBUG_LAYOUT) Slog.v(TAG,
- "Setting mHideLockScreen to true by win " + win);
- mHideLockScreen = true;
- mForceStatusBarFromKeyguard = false;
- }
- if (dismissKeyguard && mDismissKeyguard == DISMISS_KEYGUARD_NONE) {
- if (DEBUG_LAYOUT) Slog.v(TAG,
- "Setting mDismissKeyguard true by win " + win);
- mDismissKeyguard = mWinDismissingKeyguard == win ?
- DISMISS_KEYGUARD_CONTINUE : DISMISS_KEYGUARD_START;
- mWinDismissingKeyguard = win;
- mForceStatusBarFromKeyguard = mShowingLockscreen && secureKeyguard;
- }
+ if (!mAppsThatDismissKeyguard.isEmpty() &&
+ mDismissKeyguard == DISMISS_KEYGUARD_NONE) {
+ if (DEBUG_LAYOUT) Slog.v(TAG,
+ "Setting mDismissKeyguard true by win " + win);
+ mDismissKeyguard = mWinDismissingKeyguard == win ?
+ DISMISS_KEYGUARD_CONTINUE : DISMISS_KEYGUARD_START;
+ mWinDismissingKeyguard = win;
+ mForceStatusBarFromKeyguard = mShowingLockscreen && secureKeyguard;
+ } else if (mAppsToBeHidden.isEmpty() && showWhenLocked) {
+ if (DEBUG_LAYOUT) Slog.v(TAG,
+ "Setting mHideLockScreen to true by win " + win);
+ mHideLockScreen = true;
+ mForceStatusBarFromKeyguard = false;
}
if ((fl & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
mAllowLockscreenWhenOn = true;
@@ -4312,9 +4318,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
}
if (down) {
- TelecommManager telecommManager = getTelecommService();
- if (telecommManager != null) {
- if (telecommManager.isRinging()) {
+ TelecomManager telecomManager = getTelecommService();
+ if (telecomManager != null) {
+ if (telecomManager.isRinging()) {
// If an incoming call is ringing, either VOLUME key means
// "silence ringer". We handle these keys here, rather than
// in the InCallScreen, to make sure we'll respond to them
@@ -4326,14 +4332,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// Silence the ringer. (It's safe to call this
// even if the ringer has already been silenced.)
- telecommManager.silenceRinger();
+ telecomManager.silenceRinger();
// And *don't* pass this key thru to the current activity
// (which is probably the InCallScreen.)
result &= ~ACTION_PASS_TO_USER;
break;
}
- if (telecommManager.isInCall()
+ if (telecomManager.isInCall()
&& (result & ACTION_PASS_TO_USER) == 0) {
// If we are in call but we decided not to pass the key to
// the application, just pass it to the session service.
@@ -4359,10 +4365,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case KeyEvent.KEYCODE_ENDCALL: {
result &= ~ACTION_PASS_TO_USER;
if (down) {
- TelecommManager telecommManager = getTelecommService();
+ TelecomManager telecomManager = getTelecommService();
boolean hungUp = false;
- if (telecommManager != null) {
- hungUp = telecommManager.endCall();
+ if (telecomManager != null) {
+ hungUp = telecomManager.endCall();
}
interceptPowerKeyDown(!interactive || hungUp);
} else {
@@ -4399,19 +4405,19 @@ public class PhoneWindowManager implements WindowManagerPolicy {
interceptScreenshotChord();
}
- TelecommManager telecommManager = getTelecommService();
+ TelecomManager telecomManager = getTelecommService();
boolean hungUp = false;
- if (telecommManager != null) {
- if (telecommManager.isRinging()) {
+ if (telecomManager != null) {
+ if (telecomManager.isRinging()) {
// Pressing Power while there's a ringing incoming
// call should silence the ringer.
- telecommManager.silenceRinger();
+ telecomManager.silenceRinger();
} else if ((mIncallPowerBehavior
& Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP) != 0
- && telecommManager.isInCall() && interactive) {
+ && telecomManager.isInCall() && interactive) {
// Otherwise, if "Power button ends call" is enabled,
// the Power button will hang up any current active call.
- hungUp = telecommManager.endCall();
+ hungUp = telecomManager.endCall();
}
}
interceptPowerKeyDown(!interactive || hungUp
@@ -4449,9 +4455,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case KeyEvent.KEYCODE_MEDIA_PAUSE:
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
if (down) {
- TelecommManager telecommManager = getTelecommService();
- if (telecommManager != null) {
- if (telecommManager.isInCall()) {
+ TelecomManager telecomManager = getTelecommService();
+ if (telecomManager != null) {
+ if (telecomManager.isInCall()) {
// Suppress PLAY/PAUSE toggle when phone is ringing or in-call
// to avoid music playback.
break;
@@ -4484,12 +4490,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case KeyEvent.KEYCODE_CALL: {
if (down) {
- TelecommManager telecommManager = getTelecommService();
- if (telecommManager != null) {
- if (telecommManager.isRinging()) {
+ TelecomManager telecomManager = getTelecommService();
+ if (telecomManager != null) {
+ if (telecomManager.isRinging()) {
Log.i(TAG, "interceptKeyBeforeQueueing:"
+ " CALL key-down while ringing: Answer the call!");
- telecommManager.acceptRingingCall();
+ telecomManager.acceptRingingCall();
// And *don't* pass this key thru to the current activity
// (which is presumably the InCallScreen.)
@@ -4768,7 +4774,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (DEBUG_WAKEUP) Slog.d(TAG, "null mKeyguardDelegate: setting mKeyguardDrawComplete.");
mKeyguardDrawComplete = true;
}
- mWindowManagerInternal.waitForAllWindowsDrawn(mWindowManagerDrawCallback, 500);
+ mWindowManagerInternal.waitForAllWindowsDrawn(mWindowManagerDrawCallback,
+ WAITING_FOR_DRAWN_TIMEOUT);
}
// Called on the mHandler thread.
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 083aa9beb399..f6e2e67a8269 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -1234,6 +1234,7 @@ public class BackupManagerService extends IBackupManager.Stub {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
+ filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
filter.addDataScheme("package");
mContext.registerReceiver(mBroadcastReceiver, filter);
// Register for events related to sdcard installation.
@@ -1688,11 +1689,12 @@ public class BackupManagerService extends IBackupManager.Stub {
String action = intent.getAction();
boolean replacing = false;
boolean added = false;
- boolean rebind = false;
+ boolean changed = false;
Bundle extras = intent.getExtras();
String pkgList[] = null;
if (Intent.ACTION_PACKAGE_ADDED.equals(action) ||
- Intent.ACTION_PACKAGE_REMOVED.equals(action)) {
+ Intent.ACTION_PACKAGE_REMOVED.equals(action) ||
+ Intent.ACTION_PACKAGE_CHANGED.equals(action)) {
Uri uri = intent.getData();
if (uri == null) {
return;
@@ -1701,7 +1703,43 @@ public class BackupManagerService extends IBackupManager.Stub {
if (pkgName != null) {
pkgList = new String[] { pkgName };
}
- rebind = added = Intent.ACTION_PACKAGE_ADDED.equals(action);
+ changed = Intent.ACTION_PACKAGE_CHANGED.equals(action);
+
+ // At package-changed we only care about looking at new transport states
+ if (changed) {
+ try {
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "Package " + pkgName + " changed; rechecking");
+ }
+ // unbind existing possibly-stale connections to that package's transports
+ synchronized (mTransports) {
+ TransportConnection conn = mTransportConnections.get(pkgName);
+ if (conn != null) {
+ final ServiceInfo svc = conn.mTransport;
+ ComponentName svcName =
+ new ComponentName(svc.packageName, svc.name);
+ String flatName = svcName.flattenToShortString();
+ Slog.i(TAG, "Unbinding " + svcName);
+
+ mContext.unbindService(conn);
+ mTransportConnections.remove(pkgName);
+ mTransports.remove(mTransportNames.get(flatName));
+ mTransportNames.remove(flatName);
+ }
+ }
+ // and then (re)bind as appropriate
+ PackageInfo app = mPackageManager.getPackageInfo(pkgName, 0);
+ checkForTransportAndBind(app);
+ } catch (NameNotFoundException e) {
+ // Nope, can't find it - just ignore
+ if (MORE_DEBUG) {
+ Slog.w(TAG, "Can't find changed package " + pkgName);
+ }
+ }
+ return; // nothing more to do in the PACKAGE_CHANGED case
+ }
+
+ added = Intent.ACTION_PACKAGE_ADDED.equals(action);
replacing = extras.getBoolean(Intent.EXTRA_REPLACING, false);
} else if (Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action)) {
added = true;
@@ -1737,17 +1775,15 @@ public class BackupManagerService extends IBackupManager.Stub {
// Transport maintenance: rebind to known existing transports that have
// just been updated; and bind to any newly-installed transport services.
- if (rebind) {
- synchronized (mTransportConnections) {
- final TransportConnection conn = mTransportConnections.get(packageName);
- if (conn != null) {
- if (DEBUG) {
- Slog.i(TAG, "Transport package changed; rebinding");
- }
- bindTransport(conn.mTransport);
- } else {
- checkForTransportAndBind(app);
+ synchronized (mTransports) {
+ final TransportConnection conn = mTransportConnections.get(packageName);
+ if (conn != null) {
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "Transport package changed; rebinding");
}
+ bindTransport(conn.mTransport);
+ } else {
+ checkForTransportAndBind(app);
}
}
@@ -1840,7 +1876,7 @@ public class BackupManagerService extends IBackupManager.Stub {
intent.setComponent(svcName);
TransportConnection connection;
- synchronized (mTransportConnections) {
+ synchronized (mTransports) {
connection = mTransportConnections.get(transport.packageName);
if (null == connection) {
connection = new TransportConnection(transport);
@@ -8462,31 +8498,24 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
return list;
}
- // Select which transport to use for the next backup operation. If the given
- // name is not one of the available transports, no action is taken and the method
- // returns null.
+ // Select which transport to use for the next backup operation.
public String selectBackupTransport(String transport) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"selectBackupTransport");
synchronized (mTransports) {
- String prevTransport = null;
- if (mTransports.get(transport) != null) {
- final long oldId = Binder.clearCallingIdentity();
- try {
- prevTransport = mCurrentTransport;
- mCurrentTransport = transport;
- Settings.Secure.putString(mContext.getContentResolver(),
- Settings.Secure.BACKUP_TRANSPORT, transport);
- } finally {
- Binder.restoreCallingIdentity(oldId);
- }
+ final long oldId = Binder.clearCallingIdentity();
+ try {
+ String prevTransport = mCurrentTransport;
+ mCurrentTransport = transport;
+ Settings.Secure.putString(mContext.getContentResolver(),
+ Settings.Secure.BACKUP_TRANSPORT, transport);
Slog.v(TAG, "selectBackupTransport() set " + mCurrentTransport
+ " returning " + prevTransport);
- } else {
- Slog.w(TAG, "Attempt to select unavailable transport " + transport);
+ return prevTransport;
+ } finally {
+ Binder.restoreCallingIdentity(oldId);
}
- return prevTransport;
}
}
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index e9419ad02489..77163855581d 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -127,6 +127,7 @@ class AlarmManagerService extends SystemService {
long mLastAlarmDeliveryTime;
long mStartCurrentDelayTime;
long mNextNonWakeupDeliveryTime;
+ int mNumTimeChanged;
private final SparseArray<AlarmManager.AlarmClockInfo> mNextAlarmClockForUser =
new SparseArray<>();
@@ -821,6 +822,7 @@ class AlarmManagerService extends SystemService {
pw.print(" = "); pw.println(sdf.format(new Date(nextNonWakeupRTC)));
pw.print("Next wakeup: "); TimeUtils.formatDuration(mNextWakeup, nowELAPSED, pw);
pw.print(" = "); pw.println(sdf.format(new Date(nextWakeupRTC)));
+ pw.print("Num time change events: "); pw.println(mNumTimeChanged);
if (mAlarmBatches.size() > 0) {
pw.println();
@@ -1535,7 +1537,7 @@ class AlarmManagerService extends SystemService {
for (int i=0; i<triggerList.size(); i++) {
Alarm alarm = triggerList.get(i);
try {
- if (localLOGV) Slog.v(TAG, "sending alarm " + alarm);
+ Slog.v(TAG, "sending alarm " + alarm);
alarm.operation.send(getContext(), 0,
mBackgroundIntent.putExtra(
Intent.EXTRA_ALARM_COUNT, alarm.count),
@@ -1619,6 +1621,9 @@ class AlarmManagerService extends SystemService {
removeImpl(mTimeTickSender);
rebatchAllAlarms();
mClockReceiver.scheduleTimeTickEvent();
+ synchronized (mLock) {
+ mNumTimeChanged++;
+ }
Intent intent = new Intent(Intent.ACTION_TIME_CHANGED);
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
| Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index ef6e07c12933..c3465d1d62c4 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.java
@@ -631,7 +631,7 @@ public class AppOpsService extends IAppOpsService.Stub {
@Override
public int checkPackage(int uid, String packageName) {
synchronized (this) {
- if (getOpsLocked(uid, packageName, true) != null) {
+ if (getOpsRawLocked(uid, packageName, true) != null) {
return AppOpsManager.MODE_ALLOWED;
} else {
return AppOpsManager.MODE_ERRORED;
@@ -769,6 +769,15 @@ public class AppOpsService extends IAppOpsService.Stub {
}
private Ops getOpsLocked(int uid, String packageName, boolean edit) {
+ if (uid == 0) {
+ packageName = "root";
+ } else if (uid == Process.SHELL_UID) {
+ packageName = "com.android.shell";
+ }
+ return getOpsRawLocked(uid, packageName, edit);
+ }
+
+ private Ops getOpsRawLocked(int uid, String packageName, boolean edit) {
HashMap<String, Ops> pkgOps = mUidOps.get(uid);
if (pkgOps == null) {
if (!edit) {
@@ -777,11 +786,6 @@ public class AppOpsService extends IAppOpsService.Stub {
pkgOps = new HashMap<String, Ops>();
mUidOps.put(uid, pkgOps);
}
- if (uid == 0) {
- packageName = "root";
- } else if (uid == Process.SHELL_UID) {
- packageName = "com.android.shell";
- }
Ops ops = pkgOps.get(packageName);
if (ops == null) {
if (!edit) {
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 3062a9209ebe..55d8c09da02a 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -251,7 +251,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
private Context mContext;
private int mNetworkPreference;
- private int mActiveDefaultNetwork = -1;
+ private int mActiveDefaultNetwork = TYPE_NONE;
// 0 is full bad, 100 is full good
private int mDefaultInetConditionPublished = 0;
@@ -886,15 +886,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return getNetworkInfo(mActiveDefaultNetwork, uid);
}
- // only called when the default request is satisfied
- private void updateActiveDefaultNetwork(NetworkAgentInfo nai) {
- if (nai != null) {
- mActiveDefaultNetwork = nai.networkInfo.getType();
- } else {
- mActiveDefaultNetwork = TYPE_NONE;
- }
- }
-
/**
* Find the first Provisioning network.
*
@@ -1794,6 +1785,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
private boolean isLiveNetworkAgent(NetworkAgentInfo nai, String msg) {
+ if (nai.network == null) return false;
final NetworkAgentInfo officialNai;
synchronized (mNetworkForNetId) {
officialNai = mNetworkForNetId.get(nai.network.netId);
@@ -1933,10 +1925,16 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
break;
}
- case NetworkMonitor.EVENT_NETWORK_VALIDATED: {
+ case NetworkMonitor.EVENT_NETWORK_TESTED: {
NetworkAgentInfo nai = (NetworkAgentInfo)msg.obj;
if (isLiveNetworkAgent(nai, "EVENT_NETWORK_VALIDATED")) {
- handleConnectionValidated(nai);
+ boolean valid = (msg.arg1 == NetworkMonitor.NETWORK_TEST_RESULT_VALID);
+ if (valid) {
+ if (DBG) log("Validated " + nai.name());
+ nai.validated = true;
+ rematchNetworkAndRequests(nai);
+ }
+ updateInetCondition(nai, valid);
}
break;
}
@@ -2057,7 +2055,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
if (nri.isRequest == false) continue;
NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
ac.sendMessage(android.net.NetworkFactory.CMD_REQUEST_NETWORK,
- (nai != null ? nai.currentScore : 0), 0, nri.request);
+ (nai != null ? nai.getCurrentScore() : 0), 0, nri.request);
}
} else {
loge("Error connecting NetworkFactory");
@@ -2136,7 +2134,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
request.networkCapabilities.satisfiedByNetworkCapabilities(
existing.networkCapabilities) &&
(alternative == null ||
- alternative.currentScore < existing.currentScore)) {
+ alternative.getCurrentScore() < existing.getCurrentScore())) {
alternative = existing;
}
}
@@ -2169,8 +2167,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
for (NetworkAgentInfo network : mNetworkAgentInfos.values()) {
if (DBG) log("handleRegisterNetworkRequest checking " + network.name());
if (newCap.satisfiedByNetworkCapabilities(network.networkCapabilities)) {
- if (DBG) log("apparently satisfied. currentScore=" + network.currentScore);
- if ((bestNetwork == null) || bestNetwork.currentScore < network.currentScore) {
+ if (DBG) log("apparently satisfied. currentScore=" + network.getCurrentScore());
+ if ((bestNetwork == null) ||
+ bestNetwork.getCurrentScore() < network.getCurrentScore()) {
if (!nri.isRequest) {
// Not setting bestNetwork here as a listening NetworkRequest may be
// satisfied by multiple Networks. Instead the request is added to
@@ -2194,7 +2193,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
bestNetwork.addRequest(nri.request);
mNetworkForRequestId.put(nri.request.requestId, bestNetwork);
notifyNetworkCallback(bestNetwork, nri);
- score = bestNetwork.currentScore;
+ score = bestNetwork.getCurrentScore();
if (nri.request.legacyType != TYPE_NONE) {
mLegacyTypeTracker.add(nri.request.legacyType, bestNetwork);
}
@@ -4516,19 +4515,34 @@ public class ConnectivityService extends IConnectivityManager.Stub {
updateTcpBufferSizes(newNetwork);
}
- private void handleConnectionValidated(NetworkAgentInfo newNetwork) {
- if (newNetwork == null) {
- loge("Unknown NetworkAgentInfo in handleConnectionValidated");
- return;
- }
- if (newNetwork.validated) return;
- newNetwork.validated = true;
+ // Handles a network appearing or improving its score.
+ //
+ // - Evaluates all current NetworkRequests that can be
+ // satisfied by newNetwork, and reassigns to newNetwork
+ // any such requests for which newNetwork is the best.
+ //
+ // - Tears down any Networks that as a result are no longer
+ // needed. A network is needed if it is the best network for
+ // one or more NetworkRequests, or if it is a VPN.
+ //
+ // - Tears down newNetwork if it is validated but turns out to be
+ // unneeded. Does not tear down newNetwork if it is
+ // unvalidated, because future validation may improve
+ // newNetwork's score enough that it is needed.
+ //
+ // NOTE: This function only adds NetworkRequests that "newNetwork" could satisfy,
+ // it does not remove NetworkRequests that other Networks could better satisfy.
+ // If you need to handle decreases in score, use {@link rematchAllNetworksAndRequests}.
+ // This function should be used when possible instead of {@code rematchAllNetworksAndRequests}
+ // as it performs better by a factor of the number of Networks.
+ private void rematchNetworkAndRequests(NetworkAgentInfo newNetwork) {
boolean keep = newNetwork.isVPN();
boolean isNewDefault = false;
- if (DBG) log("handleConnectionValidated for "+newNetwork.name());
- // check if any NetworkRequest wants this NetworkAgent
+ if (DBG) log("rematching " + newNetwork.name());
+ // Find and migrate to this Network any NetworkRequests for
+ // which this network is now the best.
ArrayList<NetworkAgentInfo> affectedNetworks = new ArrayList<NetworkAgentInfo>();
- if (VDBG) log(" new Network has: " + newNetwork.networkCapabilities);
+ if (VDBG) log(" network has: " + newNetwork.networkCapabilities);
for (NetworkRequestInfo nri : mNetworkRequests.values()) {
NetworkAgentInfo currentNetwork = mNetworkForRequestId.get(nri.request.requestId);
if (newNetwork == currentNetwork) {
@@ -4543,18 +4557,21 @@ public class ConnectivityService extends IConnectivityManager.Stub {
if (nri.request.networkCapabilities.satisfiedByNetworkCapabilities(
newNetwork.networkCapabilities)) {
if (!nri.isRequest) {
+ // This is not a request, it's a callback listener.
+ // Add it to newNetwork regardless of score.
newNetwork.addRequest(nri.request);
continue;
}
+
// next check if it's better than any current network we're using for
// this request
if (VDBG) {
log("currentScore = " +
- (currentNetwork != null ? currentNetwork.currentScore : 0) +
- ", newScore = " + newNetwork.currentScore);
+ (currentNetwork != null ? currentNetwork.getCurrentScore() : 0) +
+ ", newScore = " + newNetwork.getCurrentScore());
}
if (currentNetwork == null ||
- currentNetwork.currentScore < newNetwork.currentScore) {
+ currentNetwork.getCurrentScore() < newNetwork.getCurrentScore()) {
if (currentNetwork != null) {
if (DBG) log(" accepting network in place of " + currentNetwork.name());
currentNetwork.networkRequests.remove(nri.request.requestId);
@@ -4569,13 +4586,16 @@ public class ConnectivityService extends IConnectivityManager.Stub {
mLegacyTypeTracker.add(nri.request.legacyType, newNetwork);
}
keep = true;
+ // Tell NetworkFactories about the new score, so they can stop
+ // trying to connect if they know they cannot match it.
// TODO - this could get expensive if we have alot of requests for this
// network. Think about if there is a way to reduce this. Push
// netid->request mapping to each factory?
- sendUpdatedScoreToFactories(nri.request, newNetwork.currentScore);
+ sendUpdatedScoreToFactories(nri.request, newNetwork.getCurrentScore());
if (mDefaultRequest.requestId == nri.request.requestId) {
isNewDefault = true;
- updateActiveDefaultNetwork(newNetwork);
+ // TODO: Remove following line. It's redundant with makeDefault call.
+ mActiveDefaultNetwork = newNetwork.networkInfo.getType();
if (newNetwork.linkProperties != null) {
updateTcpBufferSizes(newNetwork);
setDefaultDnsSystemProperties(
@@ -4591,12 +4611,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
mLegacyTypeTracker.remove(currentNetwork.networkInfo.getType(),
currentNetwork);
}
- mDefaultInetConditionPublished = 100;
+ mDefaultInetConditionPublished = newNetwork.validated ? 100 : 0;
mLegacyTypeTracker.add(newNetwork.networkInfo.getType(), newNetwork);
}
}
}
}
+ // Linger any networks that are no longer needed.
for (NetworkAgentInfo nai : affectedNetworks) {
boolean teardown = !nai.isVPN();
for (int i = 0; i < nai.networkRequests.size() && teardown; i++) {
@@ -4624,6 +4645,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
if (keep) {
if (isNewDefault) {
+ // Notify system services that this network is up.
makeDefault(newNetwork);
synchronized (ConnectivityService.this) {
// have a new default network, release the transition wakelock in
@@ -4640,6 +4662,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
// Notify battery stats service about this network, both the normal
// interface and any stacked links.
+ // TODO: Avoid redoing this; this must only be done once when a network comes online.
try {
final IBatteryStats bs = BatteryStatsService.getService();
final int type = newNetwork.networkInfo.getType();
@@ -4655,7 +4678,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
notifyNetworkCallbacks(newNetwork, ConnectivityManager.CALLBACK_AVAILABLE);
- } else {
+ } else if (newNetwork.validated) {
+ // Only tear down validated networks here. Leave unvalidated to either become
+ // validated (and get evaluated against peers, one losing here) or
+ // NetworkMonitor reports a bad network and we tear it down then.
+ // TODO: Could teardown unvalidated networks when their NetworkCapabilities
+ // satisfy no NetworkRequests.
if (DBG && newNetwork.networkRequests.size() != 0) {
loge("tearing down network with live requests:");
for (int i=0; i < newNetwork.networkRequests.size(); i++) {
@@ -4667,6 +4695,46 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
+ // Attempt to rematch all Networks with NetworkRequests. This may result in Networks
+ // being disconnected.
+ // If only one Network's score or capabilities have been modified since the last time
+ // this function was called, pass this Network in via the "changed" arugment, otherwise
+ // pass null.
+ // If only one Network has been changed but its NetworkCapabilities have not changed,
+ // pass in the Network's score (from getCurrentScore()) prior to the change via
+ // "oldScore", otherwise pass changed.getCurrentScore() or 0 if "changed" is null.
+ private void rematchAllNetworksAndRequests(NetworkAgentInfo changed, int oldScore) {
+ // TODO: This may get slow. The "changed" parameter is provided for future optimization
+ // to avoid the slowness. It is not simply enough to process just "changed", for
+ // example in the case where "changed"'s score decreases and another network should begin
+ // satifying a NetworkRequest that "changed" currently satisfies.
+
+ // Optimization: Only reprocess "changed" if its score improved. This is safe because it
+ // can only add more NetworkRequests satisfied by "changed", and this is exactly what
+ // rematchNetworkAndRequests() handles.
+ if (changed != null && oldScore < changed.getCurrentScore()) {
+ rematchNetworkAndRequests(changed);
+ } else {
+ for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
+ rematchNetworkAndRequests(nai);
+ }
+ }
+ }
+
+ private void updateInetCondition(NetworkAgentInfo nai, boolean valid) {
+ // Don't bother updating until we've graduated to validated at least once.
+ if (!nai.validated) return;
+ // For now only update icons for default connection.
+ // TODO: Update WiFi and cellular icons separately. b/17237507
+ if (!isDefaultNetwork(nai)) return;
+
+ int newInetCondition = valid ? 100 : 0;
+ // Don't repeat publish.
+ if (newInetCondition == mDefaultInetConditionPublished) return;
+
+ mDefaultInetConditionPublished = newInetCondition;
+ sendInetConditionBroadcast(nai.networkInfo);
+ }
private void updateNetworkInfo(NetworkAgentInfo networkAgent, NetworkInfo newInfo) {
NetworkInfo.State state = newInfo.getState();
@@ -4721,12 +4789,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
// TODO: support proxy per network.
}
- // Make default network if we have no default. Any network is better than no network.
+ // Consider network even though it is not yet validated.
+ // TODO: All the if-statement conditions can be removed now that validation only confers
+ // a score increase.
if (mNetworkForRequestId.get(mDefaultRequest.requestId) == null &&
networkAgent.isVPN() == false &&
mDefaultRequest.networkCapabilities.satisfiedByNetworkCapabilities(
networkAgent.networkCapabilities)) {
- makeDefault(networkAgent);
+ rematchNetworkAndRequests(networkAgent);
}
} else if (state == NetworkInfo.State.DISCONNECTED ||
state == NetworkInfo.State.SUSPENDED) {
@@ -4746,24 +4816,17 @@ public class ConnectivityService extends IConnectivityManager.Stub {
private void updateNetworkScore(NetworkAgentInfo nai, int score) {
if (DBG) log("updateNetworkScore for " + nai.name() + " to " + score);
+ if (score < 0) {
+ loge("updateNetworkScore for " + nai.name() + " got a negative score (" + score +
+ "). Bumping score to min of 0");
+ score = 0;
+ }
+
+ final int oldScore = nai.getCurrentScore();
+ nai.setCurrentScore(score);
+
+ if (nai.created) rematchAllNetworksAndRequests(nai, oldScore);
- nai.currentScore = score;
-
- // TODO - This will not do the right thing if this network is lowering
- // its score and has requests that can be served by other
- // currently-active networks, or if the network is increasing its
- // score and other networks have requests that can be better served
- // by this network.
- //
- // Really we want to see if any of our requests migrate to other
- // active/lingered networks and if any other requests migrate to us (depending
- // on increasing/decreasing currentScore. That's a bit of work and probably our
- // score checking/network allocation code needs to be modularized so we can understand
- // (see handleConnectionValided for an example).
- //
- // As a first order approx, lets just advertise the new score to factories. If
- // somebody can beat it they will nominate a network and our normal net replacement
- // code will fire.
for (int i = 0; i < nai.networkRequests.size(); i++) {
NetworkRequest nr = nai.networkRequests.valueAt(i);
// Don't send listening requests to factories. b/17393458
diff --git a/services/core/java/com/android/server/MmsServiceBroker.java b/services/core/java/com/android/server/MmsServiceBroker.java
index b452a380703f..0fb80c92f00f 100644
--- a/services/core/java/com/android/server/MmsServiceBroker.java
+++ b/services/core/java/com/android/server/MmsServiceBroker.java
@@ -219,15 +219,16 @@ public class MmsServiceBroker extends SystemService {
}
@Override
- public void updateMmsSendStatus(int messageRef, boolean success) throws RemoteException {
+ public void updateMmsSendStatus(int messageRef, byte[] pdu, int status)
+ throws RemoteException {
enforceCarrierPrivilege();
- getServiceGuarded().updateMmsSendStatus(messageRef, success);
+ getServiceGuarded().updateMmsSendStatus(messageRef, pdu, status);
}
@Override
- public void updateMmsDownloadStatus(int messageRef, byte[] pdu) throws RemoteException {
+ public void updateMmsDownloadStatus(int messageRef, int status) throws RemoteException {
enforceCarrierPrivilege();
- getServiceGuarded().updateMmsDownloadStatus(messageRef, pdu);
+ getServiceGuarded().updateMmsDownloadStatus(messageRef, status);
}
@Override
diff --git a/services/core/java/com/android/server/NsdService.java b/services/core/java/com/android/server/NsdService.java
index cb1748d30c63..39aa972bab4b 100644
--- a/services/core/java/com/android/server/NsdService.java
+++ b/services/core/java/com/android/server/NsdService.java
@@ -716,8 +716,9 @@ public class NsdService extends INsdManager.Stub {
for (String key : txtRecords.keySet()) {
try {
// TODO: Send encoded TXT record as bytes once NDC/netd supports binary data.
+ byte[] recordValue = txtRecords.get(key);
cmd.appendArg(String.format(Locale.US, "%s=%s", key,
- new String(txtRecords.get(key), "UTF_8")));
+ recordValue != null ? new String(recordValue, "UTF_8") : ""));
} catch (UnsupportedEncodingException e) {
Slog.e(TAG, "Failed to encode txtRecord " + e);
}
diff --git a/services/core/java/com/android/server/PersistentDataBlockService.java b/services/core/java/com/android/server/PersistentDataBlockService.java
index 2896f601c627..6f378fd42a89 100644
--- a/services/core/java/com/android/server/PersistentDataBlockService.java
+++ b/services/core/java/com/android/server/PersistentDataBlockService.java
@@ -17,6 +17,7 @@
package com.android.server;
import android.Manifest;
+import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Binder;
@@ -26,7 +27,9 @@ import android.os.SystemProperties;
import android.os.UserHandle;
import android.service.persistentdata.IPersistentDataBlockService;
import android.util.Slog;
+
import com.android.internal.R;
+
import libcore.io.IoUtils;
import java.io.DataInputStream;
@@ -241,6 +244,10 @@ public class PersistentDataBlockService extends SystemService {
@Override
public void setOemUnlockEnabled(boolean enabled) {
+ // do not allow monkey to flip the flag
+ if (ActivityManager.isUserAMonkey()) {
+ return;
+ }
enforceOemUnlockPermission();
FileOutputStream outputStream;
try {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index a9a47327ead6..6ac56122548d 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -180,6 +180,7 @@ import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UpdateLock;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings;
import android.text.format.DateUtils;
import android.text.format.Time;
@@ -412,7 +413,7 @@ public final class ActivityManagerService extends ActivityManagerNative
* List of intents that were used to start the most recent tasks.
*/
ArrayList<TaskRecord> mRecentTasks;
- ArraySet<TaskRecord> mTmpRecents = new ArraySet<TaskRecord>();
+ ArrayList<TaskRecord> mTmpRecents = new ArrayList<TaskRecord>();
/**
* For addAppTask: cached of the last activity component that was added.
@@ -888,6 +889,8 @@ public final class ActivityManagerService extends ActivityManagerNative
boolean mProcessesReady = false;
boolean mSystemReady = false;
boolean mBooting = false;
+ boolean mCallFinishBooting = false;
+ boolean mBootAnimationComplete = false;
boolean mWaitingUpdate = false;
boolean mDidUpdate = false;
boolean mOnBattery = false;
@@ -934,6 +937,13 @@ public final class ActivityManagerService extends ActivityManagerNative
private boolean mRunningVoice = false;
/**
+ * Set while the keyguard is waiting for an activity to draw.
+ * In this state, if we are sleeping, we allow Activities to launch
+ * so that they can draw before Keyguard dismisses itself.
+ */
+ private boolean mKeyguardWaitingForDraw = false;
+
+ /**
* State of external calls telling us if the device is asleep.
*/
private boolean mWentToSleep = false;
@@ -1075,13 +1085,16 @@ public final class ActivityManagerService extends ActivityManagerNative
/**
* Runtime CPU use collection thread. This object's lock is used to
- * protect all related state.
+ * perform synchronization with the thread (notifying it to run).
*/
final Thread mProcessCpuThread;
/**
- * Used to collect process stats when showing not responding dialog.
- * Protected by mProcessCpuThread.
+ * Used to collect per-process CPU use for ANRs, battery stats, etc.
+ * Must acquire this object's lock when accessing it.
+ * NOTE: this lock will be held while doing long operations (trawling
+ * through all processes in /proc), so it should never be acquired by
+ * any critical paths such as when holding the main activity manager lock.
*/
final ProcessCpuTracker mProcessCpuTracker = new ProcessCpuTracker(
MONITOR_THREAD_CPU_USAGE);
@@ -1595,7 +1608,7 @@ public final class ActivityManagerService extends ActivityManagerNative
infoMap.put(mi.pid, mi);
}
updateCpuStatsNow();
- synchronized (mProcessCpuThread) {
+ synchronized (mProcessCpuTracker) {
final int N = mProcessCpuTracker.countStats();
for (int i=0; i<N; i++) {
ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(i);
@@ -1894,7 +1907,7 @@ public final class ActivityManagerService extends ActivityManagerNative
if (memInfo != null) {
updateCpuStatsNow();
long nativeTotalPss = 0;
- synchronized (mProcessCpuThread) {
+ synchronized (mProcessCpuTracker) {
final int N = mProcessCpuTracker.countStats();
for (int j=0; j<N; j++) {
ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(j);
@@ -1912,7 +1925,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}
memInfo.readMemInfo();
- synchronized (this) {
+ synchronized (ActivityManagerService.this) {
if (DEBUG_PSS) Slog.d(TAG, "Collected native and kernel memory in "
+ (SystemClock.uptimeMillis()-start) + "ms");
mProcessStats.addSysMemUsageLocked(memInfo.getCachedSizeKb(),
@@ -2183,7 +2196,7 @@ public final class ActivityManagerService extends ActivityManagerNative
return;
}
- synchronized (mActivityManagerService.mProcessCpuThread) {
+ synchronized (mActivityManagerService.mProcessCpuTracker) {
pw.print(mActivityManagerService.mProcessCpuTracker.printCurrentLoad());
pw.print(mActivityManagerService.mProcessCpuTracker.printCurrentState(
SystemClock.uptimeMillis()));
@@ -2379,7 +2392,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
void updateCpuStatsNow() {
- synchronized (mProcessCpuThread) {
+ synchronized (mProcessCpuTracker) {
mProcessCpuMutexFree.set(false);
final long now = SystemClock.uptimeMillis();
boolean haveNewCpuStats = false;
@@ -3364,6 +3377,16 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}
+ void enforceShellRestriction(String restriction, int userHandle) {
+ if (Binder.getCallingUid() == Process.SHELL_UID) {
+ if (userHandle < 0
+ || mUserManager.hasUserRestriction(restriction, userHandle)) {
+ throw new SecurityException("Shell does not have permission to access user "
+ + userHandle);
+ }
+ }
+ }
+
@Override
public int getFrontActivityScreenCompatMode() {
enforceNotIsolatedCaller("getFrontActivityScreenCompatMode");
@@ -3841,6 +3864,86 @@ public final class ActivityManagerService extends ActivityManagerNative
mTaskPersister.wakeup(null, true);
}
+ // Sort by taskId
+ private Comparator<TaskRecord> mTaskRecordComparator = new Comparator<TaskRecord>() {
+ @Override
+ public int compare(TaskRecord lhs, TaskRecord rhs) {
+ return rhs.taskId - lhs.taskId;
+ }
+ };
+
+ // Extract the affiliates of the chain containing mRecentTasks[start].
+ private int processNextAffiliateChain(int start) {
+ final TaskRecord startTask = mRecentTasks.get(start);
+ final int affiliateId = startTask.mAffiliatedTaskId;
+
+ // Quick identification of isolated tasks. I.e. those not launched behind.
+ if (startTask.taskId == affiliateId && startTask.mPrevAffiliate == null &&
+ startTask.mNextAffiliate == null) {
+ // There is still a slim chance that there are other tasks that point to this task
+ // and that the chain is so messed up that this task no longer points to them but
+ // the gain of this optimization outweighs the risk.
+ startTask.inRecents = true;
+ return start + 1;
+ }
+
+ // Remove all tasks that are affiliated to affiliateId and put them in mTmpRecents.
+ mTmpRecents.clear();
+ for (int i = mRecentTasks.size() - 1; i >= start; --i) {
+ final TaskRecord task = mRecentTasks.get(i);
+ if (task.mAffiliatedTaskId == affiliateId) {
+ mRecentTasks.remove(i);
+ mTmpRecents.add(task);
+ }
+ }
+
+ // Sort them all by taskId. That is the order they were create in and that order will
+ // always be correct.
+ Collections.sort(mTmpRecents, mTaskRecordComparator);
+
+ // Go through and fix up the linked list.
+ // The first one is the end of the chain and has no next.
+ final TaskRecord first = mTmpRecents.get(0);
+ first.inRecents = true;
+ if (first.mNextAffiliate != null) {
+ Slog.w(TAG, "Link error 1 first.next=" + first.mNextAffiliate);
+ first.setNextAffiliate(null);
+ mTaskPersister.wakeup(first, false);
+ }
+ // Everything in the middle is doubly linked from next to prev.
+ final int tmpSize = mTmpRecents.size();
+ for (int i = 0; i < tmpSize - 1; ++i) {
+ final TaskRecord next = mTmpRecents.get(i);
+ final TaskRecord prev = mTmpRecents.get(i + 1);
+ if (next.mPrevAffiliate != prev) {
+ Slog.w(TAG, "Link error 2 next=" + next + " prev=" + next.mPrevAffiliate +
+ " setting prev=" + prev);
+ next.setPrevAffiliate(prev);
+ mTaskPersister.wakeup(next, false);
+ }
+ if (prev.mNextAffiliate != next) {
+ Slog.w(TAG, "Link error 3 prev=" + prev + " next=" + prev.mNextAffiliate +
+ " setting next=" + next);
+ prev.setNextAffiliate(next);
+ mTaskPersister.wakeup(prev, false);
+ }
+ prev.inRecents = true;
+ }
+ // The last one is the beginning of the list and has no prev.
+ final TaskRecord last = mTmpRecents.get(tmpSize - 1);
+ if (last.mPrevAffiliate != null) {
+ Slog.w(TAG, "Link error 4 last.prev=" + last.mPrevAffiliate);
+ last.setPrevAffiliate(null);
+ mTaskPersister.wakeup(last, false);
+ }
+
+ // Insert the group back into mRecentTasks at start.
+ mRecentTasks.addAll(start, mTmpRecents);
+
+ // Let the caller know where we left off.
+ return start + tmpSize;
+ }
+
/**
* Update the recent tasks lists: make sure tasks should still be here (their
* applications / activities still exist), update their availability, fixup ordering
@@ -3953,51 +4056,9 @@ public final class ActivityManagerService extends ActivityManagerNative
}
// Verify the affiliate chain for each task.
- for (int i = 0; i < N; ) {
- TaskRecord task = mRecentTasks.remove(i);
- if (mTmpRecents.contains(task)) {
- continue;
- }
- int affiliatedTaskId = task.mAffiliatedTaskId;
- while (true) {
- TaskRecord next = task.mNextAffiliate;
- if (next == null) {
- break;
- }
- if (next.mAffiliatedTaskId != affiliatedTaskId) {
- Slog.e(TAG, "Error in Recents: next.affiliatedTaskId=" +
- next.mAffiliatedTaskId + " affiliatedTaskId=" + affiliatedTaskId);
- task.setNextAffiliate(null);
- if (next.mPrevAffiliate == task) {
- next.setPrevAffiliate(null);
- }
- break;
- }
- if (next.mPrevAffiliate != task) {
- Slog.e(TAG, "Error in Recents chain prev.mNextAffiliate=" +
- next.mPrevAffiliate + " task=" + task);
- next.setPrevAffiliate(null);
- task.setNextAffiliate(null);
- break;
- }
- if (!mRecentTasks.contains(next)) {
- Slog.e(TAG, "Error in Recents: next=" + next + " not in mRecentTasks");
- task.setNextAffiliate(null);
- // We know that next.mPrevAffiliate is always task, from above, so clear
- // its previous affiliate.
- next.setPrevAffiliate(null);
- break;
- }
- task = next;
- }
- // task is now the end of the list
- do {
- mRecentTasks.remove(task);
- mRecentTasks.add(i++, task);
- mTmpRecents.add(task);
- task.inRecents = true;
- } while ((task = task.mPrevAffiliate) != null);
+ for (int i = 0; i < N; i = processNextAffiliateChain(i)) {
}
+
mTmpRecents.clear();
// mRecentTasks is now in sorted, affiliated order.
}
@@ -5074,7 +5135,7 @@ public final class ActivityManagerService extends ActivityManagerNative
String cpuInfo = null;
if (MONITOR_CPU_USAGE) {
updateCpuStatsNow();
- synchronized (mProcessCpuThread) {
+ synchronized (mProcessCpuTracker) {
cpuInfo = mProcessCpuTracker.printCurrentState(anrTime);
}
info.append(processCpuTracker.printCurrentLoad());
@@ -6188,6 +6249,7 @@ public final class ActivityManagerService extends ActivityManagerNative
synchronized (this) {
if (DEBUG_LOCKSCREEN) logLockScreen("");
mWindowManager.keyguardWaitingForActivityDrawn();
+ mKeyguardWaitingForDraw = true;
}
} finally {
Binder.restoreCallingIdentity(token);
@@ -6195,6 +6257,14 @@ public final class ActivityManagerService extends ActivityManagerNative
}
final void finishBooting() {
+ synchronized (this) {
+ if (!mBootAnimationComplete) {
+ mCallFinishBooting = true;
+ return;
+ }
+ mCallFinishBooting = false;
+ }
+
// Register receivers to handle package update events
mPackageMonitor.register(mContext, Looper.getMainLooper(), false);
@@ -6253,6 +6323,18 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}
+ @Override
+ public void bootAnimationComplete() {
+ final boolean callFinishBooting;
+ synchronized (this) {
+ callFinishBooting = mCallFinishBooting;
+ mBootAnimationComplete = true;
+ }
+ if (callFinishBooting) {
+ finishBooting();
+ }
+ }
+
final void ensureBootCompleted() {
boolean booting;
boolean enableScreen;
@@ -7446,12 +7528,33 @@ public final class ActivityManagerService extends ActivityManagerNative
// Does the caller have this permission on the URI?
if (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) {
- // Right now, if you are not the original owner of the permission,
- // you are not allowed to revoke it.
- //if (!checkUriPermissionLocked(uri, callingUid, modeFlags)) {
- throw new SecurityException("Uid " + callingUid
- + " does not have permission to uri " + grantUri);
- //}
+ // Have they don't have direct access to the URI, then revoke any URI
+ // permissions that have been granted to them.
+ final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(callingUid);
+ if (perms != null) {
+ boolean persistChanged = false;
+ for (Iterator<UriPermission> it = perms.values().iterator(); it.hasNext();) {
+ final UriPermission perm = it.next();
+ if (perm.uri.sourceUserId == grantUri.sourceUserId
+ && perm.uri.uri.isPathPrefixMatch(grantUri.uri)) {
+ if (DEBUG_URI_PERMISSION)
+ Slog.v(TAG,
+ "Revoking " + perm.targetUid + " permission to " + perm.uri);
+ persistChanged |= perm.revokeModes(
+ modeFlags | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
+ if (perm.modeFlags == 0) {
+ it.remove();
+ }
+ }
+ }
+ if (perms.isEmpty()) {
+ mGrantedUriPermissions.remove(callingUid);
+ }
+ if (persistChanged) {
+ schedulePersistUriGrants();
+ }
+ }
+ return;
}
boolean persistChanged = false;
@@ -9665,14 +9768,9 @@ public final class ActivityManagerService extends ActivityManagerNative
long ident = 0;
boolean clearedIdentity = false;
userId = unsafeConvertIncomingUser(userId);
- if (UserHandle.getUserId(callingUid) != userId) {
- if (checkComponentPermission(INTERACT_ACROSS_USERS, callingPid,
- callingUid, -1, true) == PackageManager.PERMISSION_GRANTED
- || checkComponentPermission(INTERACT_ACROSS_USERS_FULL, callingPid,
- callingUid, -1, true) == PackageManager.PERMISSION_GRANTED) {
- clearedIdentity = true;
- ident = Binder.clearCallingIdentity();
- }
+ if (canClearIdentity(callingPid, callingUid, userId)) {
+ clearedIdentity = true;
+ ident = Binder.clearCallingIdentity();
}
ContentProviderHolder holder = null;
try {
@@ -9700,6 +9798,19 @@ public final class ActivityManagerService extends ActivityManagerNative
return null;
}
+ private boolean canClearIdentity(int callingPid, int callingUid, int userId) {
+ if (UserHandle.getUserId(callingUid) == userId) {
+ return true;
+ }
+ if (checkComponentPermission(INTERACT_ACROSS_USERS, callingPid,
+ callingUid, -1, true) == PackageManager.PERMISSION_GRANTED
+ || checkComponentPermission(INTERACT_ACROSS_USERS_FULL, callingPid,
+ callingUid, -1, true) == PackageManager.PERMISSION_GRANTED) {
+ return true;
+ }
+ return false;
+ }
+
// =========================================================
// GLOBAL MANAGEMENT
// =========================================================
@@ -9832,11 +9943,11 @@ public final class ActivityManagerService extends ActivityManagerNative
// Actually is sleeping or shutting down or whatever else in the future
// is an inactive state.
public boolean isSleepingOrShuttingDown() {
- return mSleeping || mShuttingDown;
+ return isSleeping() || mShuttingDown;
}
public boolean isSleeping() {
- return mSleeping;
+ return mSleeping && !mKeyguardWaitingForDraw;
}
void goingToSleep() {
@@ -9858,6 +9969,7 @@ public final class ActivityManagerService extends ActivityManagerNative
if (mWentToSleep && !mRunningVoice) {
if (!mSleeping) {
mSleeping = true;
+ mKeyguardWaitingForDraw = false;
mStackSupervisor.goingToSleepLocked();
// Initialize the wake times of all processes.
@@ -9967,6 +10079,7 @@ public final class ActivityManagerService extends ActivityManagerNative
try {
if (DEBUG_LOCKSCREEN) logLockScreen(" shown=" + shown);
mLockScreenShown = shown;
+ mKeyguardWaitingForDraw = false;
comeOutOfSleepIfNeededLocked();
} finally {
Binder.restoreCallingIdentity(ident);
@@ -13700,7 +13813,7 @@ public final class ActivityManagerService extends ActivityManagerNative
findPid = Integer.parseInt(args[opti]);
} catch (NumberFormatException e) {
}
- synchronized (mProcessCpuThread) {
+ synchronized (mProcessCpuTracker) {
final int N = mProcessCpuTracker.countStats();
for (int i=0; i<N; i++) {
ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(i);
@@ -13862,7 +13975,7 @@ public final class ActivityManagerService extends ActivityManagerNative
// If we are showing aggregations, also look for native processes to
// include so that our aggregations are more accurate.
updateCpuStatsNow();
- synchronized (mProcessCpuThread) {
+ synchronized (mProcessCpuTracker) {
final int N = mProcessCpuTracker.countStats();
for (int i=0; i<N; i++) {
ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(i);
@@ -14548,6 +14661,14 @@ public final class ActivityManagerService extends ActivityManagerNative
throw new IllegalArgumentException(
"Call does not support special user #" + targetUserId);
}
+ // Check shell permission
+ if (callingUid == Process.SHELL_UID && targetUserId >= UserHandle.USER_OWNER) {
+ if (mUserManager.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES,
+ targetUserId)) {
+ throw new SecurityException("Shell does not have permission to access user "
+ + targetUserId + "\n " + Debug.getCallers(3));
+ }
+ }
return targetUserId;
}
@@ -14572,13 +14693,10 @@ public final class ActivityManagerService extends ActivityManagerNative
}
} else if ("system".equals(componentProcessName)) {
result = true;
- } else if (UserHandle.isSameApp(aInfo.uid, Process.PHONE_UID)
- && (flags & ServiceInfo.FLAG_SINGLE_USER) != 0) {
- // Phone app is allowed to export singleuser providers.
- result = true;
- } else {
- // App with pre-defined UID, check if it's a persistent app
- result = (aInfo.flags & ApplicationInfo.FLAG_PERSISTENT) != 0;
+ } else if ((flags & ServiceInfo.FLAG_SINGLE_USER) != 0) {
+ // Phone app and persistent apps are allowed to export singleuser providers.
+ result = UserHandle.isSameApp(aInfo.uid, Process.PHONE_UID)
+ || (aInfo.flags & ApplicationInfo.FLAG_PERSISTENT) != 0;
}
if (DEBUG_MU) {
Slog.v(TAG, "isSingleton(" + componentProcessName + ", " + aInfo
@@ -14606,6 +14724,7 @@ public final class ActivityManagerService extends ActivityManagerNative
Intent service, String resolvedType,
IServiceConnection connection, int flags, int userId) {
enforceNotIsolatedCaller("bindService");
+
// Refuse possible leaked file descriptors
if (service != null && service.hasFileDescriptors() == true) {
throw new IllegalArgumentException("File descriptors passed in Intent");
@@ -15040,12 +15159,18 @@ public final class ActivityManagerService extends ActivityManagerNative
}
private List<ResolveInfo> collectReceiverComponents(Intent intent, String resolvedType,
- int[] users) {
+ int callingUid, int[] users) {
List<ResolveInfo> receivers = null;
try {
HashSet<ComponentName> singleUserReceivers = null;
boolean scannedFirstReceivers = false;
for (int user : users) {
+ // Skip users that have Shell restrictions
+ if (callingUid == Process.SHELL_UID
+ && getUserManagerLocked().hasUserRestriction(
+ UserManager.DISALLOW_DEBUGGING_FEATURES, user)) {
+ continue;
+ }
List<ResolveInfo> newReceivers = AppGlobals.getPackageManager()
.queryIntentReceivers(intent, resolvedType, STOCK_PM_FLAGS, user);
if (user != 0 && newReceivers != null) {
@@ -15134,7 +15259,6 @@ public final class ActivityManagerService extends ActivityManagerNative
// Make sure that the user who is receiving this broadcast is started.
// If not, we will just skip it.
-
if (userId != UserHandle.USER_ALL && mStartedUsers.get(userId) == null) {
if (callingUid != Process.SYSTEM_UID || (intent.getFlags()
& Intent.FLAG_RECEIVER_BOOT_UPGRADE) == 0) {
@@ -15399,11 +15523,30 @@ public final class ActivityManagerService extends ActivityManagerNative
// Need to resolve the intent to interested receivers...
if ((intent.getFlags()&Intent.FLAG_RECEIVER_REGISTERED_ONLY)
== 0) {
- receivers = collectReceiverComponents(intent, resolvedType, users);
+ receivers = collectReceiverComponents(intent, resolvedType, callingUid, users);
}
if (intent.getComponent() == null) {
- registeredReceivers = mReceiverResolver.queryIntent(intent,
- resolvedType, false, userId);
+ if (userId == UserHandle.USER_ALL && callingUid == Process.SHELL_UID) {
+ // Query one target user at a time, excluding shell-restricted users
+ UserManagerService ums = getUserManagerLocked();
+ for (int i = 0; i < users.length; i++) {
+ if (ums.hasUserRestriction(
+ UserManager.DISALLOW_DEBUGGING_FEATURES, users[i])) {
+ continue;
+ }
+ List<BroadcastFilter> registeredReceiversForUser =
+ mReceiverResolver.queryIntent(intent,
+ resolvedType, false, users[i]);
+ if (registeredReceivers == null) {
+ registeredReceivers = registeredReceiversForUser;
+ } else if (registeredReceiversForUser != null) {
+ registeredReceivers.addAll(registeredReceiversForUser);
+ }
+ }
+ } else {
+ registeredReceivers = mReceiverResolver.queryIntent(intent,
+ resolvedType, false, userId);
+ }
}
final boolean replacePending =
@@ -15565,7 +15708,7 @@ public final class ActivityManagerService extends ActivityManagerNative
enforceNotIsolatedCaller("broadcastIntent");
synchronized(this) {
intent = verifyBroadcastLocked(intent);
-
+
final ProcessRecord callerApp = getRecordForAppLocked(caller);
final int callingPid = Binder.getCallingPid();
final int callingUid = Binder.getCallingUid();
@@ -17973,6 +18116,7 @@ public final class ActivityManagerService extends ActivityManagerNative
@Override
public boolean switchUser(final int userId) {
+ enforceShellRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, userId);
String userName;
synchronized (this) {
UserInfo userInfo = getUserManagerLocked().getUserInfo(userId);
@@ -18414,6 +18558,7 @@ public final class ActivityManagerService extends ActivityManagerNative
if (userId <= 0) {
throw new IllegalArgumentException("Can't stop primary user " + userId);
}
+ enforceShellRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, userId);
synchronized (this) {
return stopUserLocked(userId, callback);
}
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index bcf3b17d1085..d71f94e14393 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1042,11 +1042,8 @@ final class ActivityStack {
if (prev.app != null && prev.cpuTimeAtResume > 0
&& mService.mBatteryStatsService.isOnBattery()) {
- long diff;
- synchronized (mService.mProcessCpuThread) {
- diff = mService.mProcessCpuTracker.getCpuTimeForPid(prev.app.pid)
- - prev.cpuTimeAtResume;
- }
+ long diff = mService.mProcessCpuTracker.getCpuTimeForPid(prev.app.pid)
+ - prev.cpuTimeAtResume;
if (diff > 0) {
BatteryStatsImpl bsi = mService.mBatteryStatsService.getActiveStatistics();
synchronized (bsi) {
@@ -1097,9 +1094,7 @@ final class ActivityStack {
// TODO: To be more accurate, the mark should be before the onCreate,
// not after the onResume. But for subsequent starts, onResume is fine.
if (next.app != null) {
- synchronized (mService.mProcessCpuThread) {
- next.cpuTimeAtResume = mService.mProcessCpuTracker.getCpuTimeForPid(next.app.pid);
- }
+ next.cpuTimeAtResume = mService.mProcessCpuTracker.getCpuTimeForPid(next.app.pid);
} else {
next.cpuTimeAtResume = 0; // Couldn't get the cpu time of process
}
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index 1287dceda9ab..80d0510043ea 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -21,6 +21,7 @@ import java.io.OutputStream;
import java.nio.ByteBuffer;
import android.app.ActivityManager;
+import android.os.Build;
import android.os.SystemClock;
import com.android.internal.util.MemInfoReader;
import com.android.server.wm.WindowManagerService;
@@ -230,21 +231,31 @@ final class ProcessList {
Slog.i("XXXXXX", "minfree_adj=" + minfree_adj + " minfree_abs=" + minfree_abs);
}
+ final boolean is64bit = Build.SUPPORTED_64_BIT_ABIS.length > 0;
+
for (int i=0; i<mOomAdj.length; i++) {
int low = mOomMinFreeLow[i];
int high = mOomMinFreeHigh[i];
mOomMinFree[i] = (int)(low + ((high-low)*scale));
+ if (is64bit) {
+ // On 64 bit devices, we consume more baseline RAM, because 64 bit is cool!
+ // To avoid being all pagey and stuff, scale up the memory levels to
+ // give us some breathing room.
+ mOomMinFree[i] = (3*mOomMinFree[i])/2;
+ }
}
if (minfree_abs >= 0) {
for (int i=0; i<mOomAdj.length; i++) {
- mOomMinFree[i] = (int)((float)minfree_abs * mOomMinFree[i] / mOomMinFree[mOomAdj.length - 1]);
+ mOomMinFree[i] = (int)((float)minfree_abs * mOomMinFree[i]
+ / mOomMinFree[mOomAdj.length - 1]);
}
}
if (minfree_adj != 0) {
for (int i=0; i<mOomAdj.length; i++) {
- mOomMinFree[i] += (int)((float)minfree_adj * mOomMinFree[i] / mOomMinFree[mOomAdj.length - 1]);
+ mOomMinFree[i] += (int)((float)minfree_adj * mOomMinFree[i]
+ / mOomMinFree[mOomAdj.length - 1]);
if (mOomMinFree[i] < 0) {
mOomMinFree[i] = 0;
}
diff --git a/services/core/java/com/android/server/am/TaskPersister.java b/services/core/java/com/android/server/am/TaskPersister.java
index 3cc406b419da..b21af48c4d3b 100644
--- a/services/core/java/com/android/server/am/TaskPersister.java
+++ b/services/core/java/com/android/server/am/TaskPersister.java
@@ -347,6 +347,10 @@ public class TaskPersister {
private static void removeObsoleteFiles(ArraySet<Integer> persistentTaskIds, File[] files) {
if (DEBUG) Slog.d(TAG, "removeObsoleteFile: persistentTaskIds=" + persistentTaskIds +
" files=" + files);
+ if (files == null) {
+ Slog.e(TAG, "File error accessing recents directory (too many files open?).");
+ return;
+ }
for (int fileNdx = 0; fileNdx < files.length; ++fileNdx) {
File file = files[fileNdx];
String filename = file.getName();
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index bba786dc5d9b..957d70589ac0 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -43,12 +43,16 @@ public class NetworkAgentInfo {
public Network network;
public LinkProperties linkProperties;
public NetworkCapabilities networkCapabilities;
- public int currentScore;
public final NetworkMonitor networkMonitor;
public final NetworkMisc networkMisc;
public boolean created;
public boolean validated;
+ // This represents the last score received from the NetworkAgent.
+ private int currentScore;
+ // Penalty applied to scores of Networks that have not been validated.
+ private static final int UNVALIDATED_SCORE_PENALTY = 40;
+
// The list of NetworkRequests being satisfied by this Network.
public final SparseArray<NetworkRequest> networkRequests = new SparseArray<NetworkRequest>();
public final ArrayList<NetworkRequest> networkLingered = new ArrayList<NetworkRequest>();
@@ -80,11 +84,33 @@ public class NetworkAgentInfo {
return networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN);
}
+ // Get the current score for this Network. This may be modified from what the
+ // NetworkAgent sent, as it has modifiers applied to it.
+ public int getCurrentScore() {
+ // TODO: We may want to refactor this into a NetworkScore class that takes a base score from
+ // the NetworkAgent and signals from the NetworkAgent and uses those signals to modify the
+ // score. The NetworkScore class would provide a nice place to centralize score constants
+ // so they are not scattered about the transports.
+
+ int score = currentScore;
+
+ if (!validated) score -= UNVALIDATED_SCORE_PENALTY;
+
+ if (score < 0) score = 0;
+
+ return score;
+ }
+
+ public void setCurrentScore(int newScore) {
+ currentScore = newScore;
+ }
+
public String toString() {
return "NetworkAgentInfo{ ni{" + networkInfo + "} network{" +
network + "} lp{" +
linkProperties + "} nc{" +
- networkCapabilities + "} Score{" + currentScore + "} }";
+ networkCapabilities + "} Score{" + getCurrentScore() + "} " +
+ "validated{" + validated + "} created{" + created + "} }";
}
public String name() {
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index 96872a7ee1c1..9e3320568919 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -95,6 +95,18 @@ public class NetworkMonitor extends StateMachine {
"android.net.netmon.captive_portal_logged_in";
private static final String LOGGED_IN_RESULT = "result";
+ // After a network has been tested this result can be sent with EVENT_NETWORK_TESTED.
+ // The network should be used as a default internet connection. It was found to be:
+ // 1. a functioning network providing internet access, or
+ // 2. a captive portal and the user decided to use it as is.
+ public static final int NETWORK_TEST_RESULT_VALID = 0;
+ // After a network has been tested this result can be sent with EVENT_NETWORK_TESTED.
+ // The network should not be used as a default internet connection. It was found to be:
+ // 1. a captive portal and the user is prompted to sign-in, or
+ // 2. a captive portal and the user did not want to use it, or
+ // 3. a broken network (e.g. DNS failed, connect failed, HTTP request failed).
+ public static final int NETWORK_TEST_RESULT_INVALID = 1;
+
private static final int BASE = Protocol.BASE_NETWORK_MONITOR;
/**
@@ -104,10 +116,11 @@ public class NetworkMonitor extends StateMachine {
public static final int CMD_NETWORK_CONNECTED = BASE + 1;
/**
- * Inform ConnectivityService that the network is validated.
+ * Inform ConnectivityService that the network has been tested.
* obj = NetworkAgentInfo
+ * arg1 = One of the NETWORK_TESTED_RESULT_* constants.
*/
- public static final int EVENT_NETWORK_VALIDATED = BASE + 2;
+ public static final int EVENT_NETWORK_TESTED = BASE + 2;
/**
* Inform NetworkMonitor to linger a network. The Monitor should
@@ -216,6 +229,9 @@ public class NetworkMonitor extends StateMachine {
private String mServer;
private boolean mIsCaptivePortalCheckEnabled = false;
+ // Set if the user explicitly selected "Do not use this network" in captive portal sign-in app.
+ private boolean mUserDoesNotWant = false;
+
public boolean systemReady = false;
private State mDefaultState = new DefaultState();
@@ -290,9 +306,23 @@ public class NetworkMonitor extends StateMachine {
private class OfflineState extends State {
@Override
+ public void enter() {
+ mConnectivityServiceHandler.sendMessage(obtainMessage(EVENT_NETWORK_TESTED,
+ NETWORK_TEST_RESULT_INVALID, 0, mNetworkAgentInfo));
+ }
+
+ @Override
public boolean processMessage(Message message) {
if (DBG) log(getName() + message.toString());
- return NOT_HANDLED;
+ switch (message.what) {
+ case CMD_FORCE_REEVALUATION:
+ // If the user has indicated they explicitly do not want to use this network,
+ // don't allow a reevaluation as this will be pointless and could result in
+ // the user being annoyed with repeated unwanted notifications.
+ return mUserDoesNotWant ? HANDLED : NOT_HANDLED;
+ default:
+ return NOT_HANDLED;
+ }
}
}
@@ -300,8 +330,8 @@ public class NetworkMonitor extends StateMachine {
@Override
public void enter() {
if (DBG) log("Validated");
- mConnectivityServiceHandler.sendMessage(
- obtainMessage(EVENT_NETWORK_VALIDATED, mNetworkAgentInfo));
+ mConnectivityServiceHandler.sendMessage(obtainMessage(EVENT_NETWORK_TESTED,
+ NETWORK_TEST_RESULT_VALID, 0, mNetworkAgentInfo));
}
@Override
@@ -393,6 +423,8 @@ public class NetworkMonitor extends StateMachine {
@Override
public void enter() {
+ mConnectivityServiceHandler.sendMessage(obtainMessage(EVENT_NETWORK_TESTED,
+ NETWORK_TEST_RESULT_INVALID, 0, mNetworkAgentInfo));
// Wait for user to select sign-in notifcation.
mUserRespondedBroadcastReceiver = new UserRespondedBroadcastReceiver(
++mUserPromptedToken);
@@ -477,6 +509,7 @@ public class NetworkMonitor extends StateMachine {
if (message.arg1 != mCaptivePortalLoggedInToken)
return HANDLED;
if (message.arg2 == 0) {
+ mUserDoesNotWant = true;
// TODO: Should teardown network.
transitionTo(mOfflineState);
} else {
@@ -544,6 +577,12 @@ public class NetworkMonitor extends StateMachine {
mConnectivityServiceHandler.sendMessage(
obtainMessage(EVENT_NETWORK_LINGER_COMPLETE, mNetworkAgentInfo));
return HANDLED;
+ case CMD_FORCE_REEVALUATION:
+ // Ignore reevaluation attempts when lingering. A reevaluation could result
+ // in a transition to the validated state which would abort the linger
+ // timeout. Lingering is the result of score assessment; validity is
+ // irrelevant.
+ return HANDLED;
default:
return NOT_HANDLED;
}
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index f6beb9ae50b6..9292d459b02a 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -16,6 +16,7 @@
package com.android.server.content;
+import android.Manifest;
import android.accounts.Account;
import android.accounts.AccountAndUser;
import android.accounts.AccountManager;
@@ -478,7 +479,7 @@ public class SyncManager {
mContext.registerReceiverAsUser(mAccountsUpdatedReceiver,
UserHandle.ALL,
new IntentFilter(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION),
- null, null);
+ Manifest.permission.ACCOUNT_MANAGER, null);
}
// Pick a random second in a day to seed all periodic syncs
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 8c342dd8954e..b4009ca462fa 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -497,9 +497,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// We might override this below based on other factors.
int state;
int brightness = PowerManager.BRIGHTNESS_DEFAULT;
+ boolean performScreenOffTransition = false;
switch (mPowerRequest.policy) {
case DisplayPowerRequest.POLICY_OFF:
state = Display.STATE_OFF;
+ performScreenOffTransition = true;
break;
case DisplayPowerRequest.POLICY_DOZE:
if (mPowerRequest.dozeScreenState != Display.STATE_UNKNOWN) {
@@ -515,6 +517,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
state = Display.STATE_ON;
break;
}
+ assert(state != Display.STATE_UNKNOWN);
// Apply the proximity sensor.
if (mProximitySensor != null) {
@@ -691,7 +694,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// Wait for previous on animation to complete beforehand.
unblockScreenOn();
if (!mColorFadeOnAnimator.isStarted()) {
- if (mPowerRequest.policy == DisplayPowerRequest.POLICY_OFF) {
+ if (performScreenOffTransition) {
// Perform screen off animation.
if (!mColorFadeOffAnimator.isStarted()) {
if (mPowerState.getColorFadeLevel() == 0.0f) {
@@ -934,8 +937,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
pw.println(" mScreenBrightnessDarkConfig=" + mScreenBrightnessDarkConfig);
pw.println(" mScreenBrightnessRangeMinimum=" + mScreenBrightnessRangeMinimum);
pw.println(" mScreenBrightnessRangeMaximum=" + mScreenBrightnessRangeMaximum);
- pw.println(" mUseSoftwareAutoBrightnessConfig="
- + mUseSoftwareAutoBrightnessConfig);
+ pw.println(" mUseSoftwareAutoBrightnessConfig=" + mUseSoftwareAutoBrightnessConfig);
+ pw.println(" mColorFadeFadesConfig=" + mColorFadeFadesConfig);
mHandler.runWithScissors(new Runnable() {
@Override
diff --git a/services/core/java/com/android/server/display/VirtualDisplayAdapter.java b/services/core/java/com/android/server/display/VirtualDisplayAdapter.java
index f6399a329a90..a6a9a8972f5d 100644
--- a/services/core/java/com/android/server/display/VirtualDisplayAdapter.java
+++ b/services/core/java/com/android/server/display/VirtualDisplayAdapter.java
@@ -69,7 +69,7 @@ final class VirtualDisplayAdapter extends DisplayAdapter {
try {
if (projection != null) {
- projection.addCallback(new MediaProjectionCallback(appToken));
+ projection.registerCallback(new MediaProjectionCallback(appToken));
}
appToken.linkToDeath(device, 0);
} catch (RemoteException ex) {
diff --git a/services/core/java/com/android/server/hdmi/Constants.java b/services/core/java/com/android/server/hdmi/Constants.java
index 6ce235b7badd..b0a3a6601df9 100644
--- a/services/core/java/com/android/server/hdmi/Constants.java
+++ b/services/core/java/com/android/server/hdmi/Constants.java
@@ -212,8 +212,13 @@ final class Constants {
// in config.xml to allow customization.
static final int IRT_MS = 300;
- static final String PROPERTY_PREFERRED_ADDRESS_PLAYBACK = "hdmi_cec.prefaddr.playback";
- static final String PROPERTY_PREFERRED_ADDRESS_TV = "hdmi_cec.prefaddr.tv";
+ static final String PROPERTY_PREFERRED_ADDRESS_PLAYBACK = "persist.sys.hdmi.addr.playback";
+ static final String PROPERTY_PREFERRED_ADDRESS_TV = "persist.sys.hdmi.addr.tv";
+
+ // Property name for the local device configurations.
+ // TODO(OEM): OEM should provide this property, and the value is the comma separated integer
+ // values which denotes the device type in HDMI Spec 1.4.
+ static final String PROPERTY_DEVICE_TYPE = "ro.hdmi.device_type";
static final int RECORDING_TYPE_DIGITAL_RF = 1;
static final int RECORDING_TYPE_ANALOGUE_RF = 2;
@@ -250,42 +255,5 @@ final class Constants {
static final int DISABLED = 0;
static final int ENABLED = 1;
- // Property name for the local device configurations.
- // TODO(OEM): OEM should provide this property, and the value is the comma separated integer
- // values which denotes the device type in HDMI Spec 1.4.
- static final String PROPERTY_DEVICE_TYPE = "ro.hdmi.device_type";
-
- // --------------------------------------------------
- // MHL sub command message types.
- static final int MHL_MSG_MSGE = 0x02;
- static final int MHL_MSG_RCP = 0x10;
- static final int MHL_MSG_RCPK = 0x11;
- static final int MHL_MSG_RCPE = 0x12;
- static final int MHL_MSG_RAP = 0x20;
- static final int MHL_MSG_RAPK = 0x21;
-
- // MHL RAP messages.
- static final int MHL_RAP_ACTION_POLL = 0x00;
- static final int MHL_RAP_ACTION_CONTENT_ON = 0x10;
- static final int MHL_RAP_ACTION_CONTENT_OFF = 0x11;
-
- // MHL RAPK messages.
- static final int MHL_RAPK_NO_ERROR = 0x00;
- static final int MHL_RAPK_UNRECOGNIZED_ACTION = 0x01;
- static final int MHL_RAPK_UNSUPPORTED_ACTION = 0x02;
- static final int MHL_RAPK_RESPONDER_BUSY = 0x03;
-
- static final int MHL_INVALID_ADOPTER_ID = -1;
- static final int MHL_INVALID_DEVICE_ID = -1;
-
- static final int MHL_CBUS_MODE_OCBUS = 1;
- static final int MHL_CBUS_MODE_ECBUS_S = 2;
- static final int MHL_CBUS_MODE_ECBUS_D = 3;
-
- // MHL RCPE messages
- static final int MHL_RCPE_NO_ERROR = 0x00;
- static final int MHL_RCPE_INEFFECTIVE_KEYCODE = 0x01;
- static final int MHL_RCPE_RESPONDER_BUSY = 0x02;
-
private Constants() { /* cannot be instantiated */ }
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index c5a6dbd788b7..0e8788a7fa56 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -32,6 +32,7 @@ import com.android.server.hdmi.HdmiControlService.DevicePollingCallback;
import libcore.util.EmptyArray;
import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
/**
@@ -367,7 +368,8 @@ final class HdmiCecController {
// Extract polling candidates. No need to poll against local devices.
List<Integer> pollingCandidates = pickPollCandidates(pickStrategy);
- runDevicePolling(sourceAddress, pollingCandidates, retryCount, callback);
+ ArrayList<Integer> allocated = new ArrayList<>();
+ runDevicePolling(sourceAddress, pollingCandidates, retryCount, callback, allocated);
}
/**
@@ -395,7 +397,7 @@ final class HdmiCecController {
}
int iterationStrategy = pickStrategy & Constants.POLL_ITERATION_STRATEGY_MASK;
- ArrayList<Integer> pollingCandidates = new ArrayList<>();
+ LinkedList<Integer> pollingCandidates = new LinkedList<>();
switch (iterationStrategy) {
case Constants.POLL_ITERATION_IN_ORDER:
for (int i = Constants.ADDR_TV; i <= Constants.ADDR_SPECIFIC_USE; ++i) {
@@ -430,26 +432,32 @@ final class HdmiCecController {
@ServiceThreadOnly
private void runDevicePolling(final int sourceAddress,
final List<Integer> candidates, final int retryCount,
- final DevicePollingCallback callback) {
+ final DevicePollingCallback callback, final List<Integer> allocated) {
assertRunOnServiceThread();
+ if (candidates.isEmpty()) {
+ if (callback != null) {
+ HdmiLogger.debug("[P]:AllocatedAddress=%s", allocated.toString());
+ callback.onPollingFinished(allocated);
+ }
+ return;
+ }
+
+ final Integer candidate = candidates.remove(0);
+ // Proceed polling action for the next address once polling action for the
+ // previous address is done.
runOnIoThread(new Runnable() {
@Override
public void run() {
- final ArrayList<Integer> allocated = new ArrayList<>();
- for (Integer address : candidates) {
- if (sendPollMessage(sourceAddress, address, retryCount)) {
- allocated.add(address);
- }
- }
- HdmiLogger.debug("[P]:Allocated Address=" + allocated);
- if (callback != null) {
- runOnServiceThread(new Runnable() {
- @Override
- public void run() {
- callback.onPollingFinished(allocated);
- }
- });
+ if (sendPollMessage(sourceAddress, candidate, retryCount)) {
+ allocated.add(candidate);
}
+ runOnServiceThread(new Runnable() {
+ @Override
+ public void run() {
+ runDevicePolling(sourceAddress, candidates, retryCount, callback,
+ allocated);
+ }
+ });
}
});
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
index c00c5d009f09..41ac589ff5b8 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
@@ -263,7 +263,9 @@ abstract class HdmiCecLocalDevice {
case Constants.MESSAGE_GIVE_DEVICE_POWER_STATUS:
return handleGiveDevicePowerStatus(message);
case Constants.MESSAGE_MENU_REQUEST:
- return handleGiveDeviceMenuStatus(message);
+ return handleMenuRequest(message);
+ case Constants.MESSAGE_MENU_STATUS:
+ return handleMenuStatus(message);
case Constants.MESSAGE_VENDOR_COMMAND:
return handleVendorCommand(message);
case Constants.MESSAGE_VENDOR_COMMAND_WITH_ID:
@@ -503,16 +505,24 @@ abstract class HdmiCecLocalDevice {
return true;
}
- protected boolean handleGiveDeviceMenuStatus(HdmiCecMessage message) {
+ protected boolean handleMenuRequest(HdmiCecMessage message) {
// Always report menu active to receive Remote Control.
mService.sendCecCommand(HdmiCecMessageBuilder.buildReportMenuStatus(
mAddress, message.getSource(), Constants.MENU_STATE_ACTIVATED));
return true;
}
+ protected boolean handleMenuStatus(HdmiCecMessage message) {
+ return false;
+ }
+
protected boolean handleVendorCommand(HdmiCecMessage message) {
- mService.invokeVendorCommandListeners(mDeviceType, message.getSource(),
- message.getParams(), false);
+ if (!mService.invokeVendorCommandListeners(mDeviceType, message.getSource(),
+ message.getParams(), false)) {
+ // Vendor command listener may not have been registered yet. Respond with
+ // <Feature Abort> [NOT_IN_CORRECT_MODE] so that the sender can try again later.
+ mService.maySendFeatureAbortCommand(message, Constants.ABORT_NOT_IN_CORRECT_MODE);
+ }
return true;
}
@@ -520,7 +530,10 @@ abstract class HdmiCecLocalDevice {
byte[] params = message.getParams();
int vendorId = HdmiUtils.threeBytesToInt(params);
if (vendorId == mService.getVendorId()) {
- mService.invokeVendorCommandListeners(mDeviceType, message.getSource(), params, true);
+ if (!mService.invokeVendorCommandListeners(mDeviceType, message.getSource(), params,
+ true)) {
+ mService.maySendFeatureAbortCommand(message, Constants.ABORT_NOT_IN_CORRECT_MODE);
+ }
} else if (message.getDestination() != Constants.ADDR_BROADCAST &&
message.getSource() != Constants.ADDR_UNREGISTERED) {
Slog.v(TAG, "Wrong direct vendor command. Replying with <Feature Abort>");
@@ -531,6 +544,10 @@ abstract class HdmiCecLocalDevice {
return true;
}
+ protected void sendStandby(int deviceId) {
+ // Do nothing.
+ }
+
protected boolean handleSetOsdName(HdmiCecMessage message) {
// The default behavior of <Set Osd Name> is doing nothing.
return true;
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 58ccbdb91a6e..9033c38fb7da 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -1646,6 +1646,22 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
}
@Override
+ protected boolean handleMenuStatus(HdmiCecMessage message) {
+ // Do nothing and just return true not to prevent from responding <Feature Abort>.
+ return true;
+ }
+
+ @Override
+ protected void sendStandby(int deviceId) {
+ HdmiDeviceInfo targetDevice = mDeviceInfos.get(deviceId);
+ if (targetDevice == null) {
+ return;
+ }
+ int targetAddress = targetDevice.getLogicalAddress();
+ mService.sendCecCommand(HdmiCecMessageBuilder.buildStandby(mAddress, targetAddress));
+ }
+
+ @Override
protected void dump(final IndentingPrintWriter pw) {
super.dump(pw);
pw.println("mArcEstablished: " + mArcEstablished);
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
index 0b3d9fb5df68..d7039895c12e 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
@@ -25,6 +25,11 @@ import android.util.SparseArray;
public final class HdmiCecMessageValidator {
private static final String TAG = "HdmiCecMessageValidator";
+ static final int OK = 0;
+ static final int ERROR_SOURCE = 1;
+ static final int ERROR_DESTINATION = 2;
+ static final int ERROR_PARAMETER = 3;
+
private final HdmiControlService mService;
interface ParameterValidator {
@@ -140,7 +145,9 @@ public final class HdmiCecMessageValidator {
addValidationInfo(Constants.MESSAGE_SET_OSD_STRING, maxLengthValidator, DEST_DIRECT);
addValidationInfo(Constants.MESSAGE_SET_OSD_NAME, maxLengthValidator, DEST_DIRECT);
- // TODO: Handle messages for the Device Menu Control.
+ // Messages for the Device Menu Control.
+ addValidationInfo(Constants.MESSAGE_MENU_REQUEST, oneByteValidator, DEST_DIRECT);
+ addValidationInfo(Constants.MESSAGE_MENU_STATUS, oneByteValidator, DEST_DIRECT);
// Messages for the Remote Control Passthrough.
// TODO: Parse the first parameter and determine if it can have the next parameter.
@@ -178,39 +185,39 @@ public final class HdmiCecMessageValidator {
mValidationInfo.append(opcode, new ValidationInfo(validator, addrType));
}
- boolean isValid(HdmiCecMessage message) {
+ int isValid(HdmiCecMessage message) {
int opcode = message.getOpcode();
ValidationInfo info = mValidationInfo.get(opcode);
if (info == null) {
HdmiLogger.warning("No validation information for the message: " + message);
- return true;
+ return OK;
}
// Check the source field.
if (message.getSource() == Constants.ADDR_UNREGISTERED &&
(info.addressType & SRC_UNREGISTERED) == 0) {
HdmiLogger.warning("Unexpected source: " + message);
- return false;
+ return ERROR_SOURCE;
}
// Check the destination field.
if (message.getDestination() == Constants.ADDR_BROADCAST) {
if ((info.addressType & DEST_BROADCAST) == 0) {
HdmiLogger.warning("Unexpected broadcast message: " + message);
- return false;
+ return ERROR_DESTINATION;
}
} else { // Direct addressing.
if ((info.addressType & DEST_DIRECT) == 0) {
HdmiLogger.warning("Unexpected direct message: " + message);
- return false;
+ return ERROR_DESTINATION;
}
}
// Check the parameter type.
if (!info.parameterValidator.isValid(message.getParams())) {
HdmiLogger.warning("Unexpected parameters: " + message);
- return false;
+ return ERROR_PARAMETER;
}
- return true;
+ return OK;
}
private static class FixedLengthValidator implements ParameterValidator {
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index 5cd7c01f429c..96823e17809b 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -43,7 +43,7 @@ import android.hardware.hdmi.IHdmiControlService;
import android.hardware.hdmi.IHdmiDeviceEventListener;
import android.hardware.hdmi.IHdmiHotplugEventListener;
import android.hardware.hdmi.IHdmiInputChangeListener;
-import android.hardware.hdmi.IHdmiMhlScratchpadCommandListener;
+import android.hardware.hdmi.IHdmiMhlVendorCommandListener;
import android.hardware.hdmi.IHdmiRecordListener;
import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener;
import android.hardware.hdmi.IHdmiVendorCommandListener;
@@ -247,10 +247,10 @@ public final class HdmiControlService extends SystemService {
@GuardedBy("mLock")
private boolean mMhlInputChangeEnabled;
- // List of records for MHL Scratchpad command listener to handle the caller killed in action.
+ // List of records for MHL Vendor command listener to handle the caller killed in action.
@GuardedBy("mLock")
- private final ArrayList<HdmiMhlScratchpadCommandListenerRecord>
- mScratchpadCommandListenerRecords = new ArrayList<>();
+ private final ArrayList<HdmiMhlVendorCommandListenerRecord>
+ mMhlVendorCommandListenerRecords = new ArrayList<>();
@GuardedBy("mLock")
private List<HdmiDeviceInfo> mMhlDevices;
@@ -651,7 +651,7 @@ public final class HdmiControlService extends SystemService {
@ServiceThreadOnly
void sendCecCommand(HdmiCecMessage command, @Nullable SendMessageCallback callback) {
assertRunOnServiceThread();
- if (mMessageValidator.isValid(command)) {
+ if (mMessageValidator.isValid(command) == HdmiCecMessageValidator.OK) {
mCecController.sendCommand(command, callback);
} else {
HdmiLogger.error("Invalid message type:" + command);
@@ -682,8 +682,13 @@ public final class HdmiControlService extends SystemService {
@ServiceThreadOnly
boolean handleCecCommand(HdmiCecMessage message) {
assertRunOnServiceThread();
- if (!mMessageValidator.isValid(message)) {
- return false;
+ int errorCode = mMessageValidator.isValid(message);
+ if (errorCode != HdmiCecMessageValidator.OK) {
+ // We'll not response on the messages with the invalid source or destination.
+ if (errorCode == HdmiCecMessageValidator.ERROR_PARAMETER) {
+ maySendFeatureAbortCommand(message, Constants.ABORT_INVALID_OPERAND);
+ }
+ return true;
}
return dispatchMessageToLocalDevice(message);
}
@@ -814,45 +819,21 @@ public final class HdmiControlService extends SystemService {
}
@ServiceThreadOnly
- void sendMhlSubcommand(int portId, HdmiMhlSubcommand command) {
- assertRunOnServiceThread();
- sendMhlSubcommand(portId, command, null);
- }
-
- @ServiceThreadOnly
- void sendMhlSubcommand(int portId, HdmiMhlSubcommand command, SendMessageCallback callback) {
- assertRunOnServiceThread();
- mMhlController.sendSubcommand(portId, command, callback);
- }
-
- @ServiceThreadOnly
- boolean handleMhlSubcommand(int portId, HdmiMhlSubcommand message) {
- assertRunOnServiceThread();
-
- HdmiMhlLocalDevice device = mMhlController.getLocalDevice(portId);
- if (device != null) {
- return device.handleSubcommand(message);
- }
- Slog.w(TAG, "No mhl device exists[portId:" + portId + ", message:" + message);
- return false;
- }
-
- @ServiceThreadOnly
void handleMhlHotplugEvent(int portId, boolean connected) {
assertRunOnServiceThread();
if (connected) {
- HdmiMhlLocalDevice newDevice = new HdmiMhlLocalDevice(this, portId);
- HdmiMhlLocalDevice oldDevice = mMhlController.addLocalDevice(newDevice);
+ HdmiMhlLocalDeviceStub newDevice = new HdmiMhlLocalDeviceStub(this, portId);
+ HdmiMhlLocalDeviceStub oldDevice = mMhlController.addLocalDevice(newDevice);
if (oldDevice != null) {
oldDevice.onDeviceRemoved();
Slog.i(TAG, "Old device of port " + portId + " is removed");
}
} else {
- HdmiMhlLocalDevice device = mMhlController.removeLocalDevice(portId);
+ HdmiMhlLocalDeviceStub device = mMhlController.removeLocalDevice(portId);
if (device != null) {
device.onDeviceRemoved();
- // There is no explicit event for device removal unlike capability register event
- // used for device addition . Hence we remove the device on hotplug event.
+ // There is no explicit event for device removal.
+ // Hence we remove the device on hotplug event.
HdmiDeviceInfo deviceInfo = device.getInfo();
if (deviceInfo != null) {
invokeDeviceEventListeners(deviceInfo, DEVICE_EVENT_REMOVE_DEVICE);
@@ -866,40 +847,40 @@ public final class HdmiControlService extends SystemService {
}
@ServiceThreadOnly
- void handleMhlCbusModeChanged(int portId, int cbusmode) {
+ void handleMhlBusModeChanged(int portId, int busmode) {
assertRunOnServiceThread();
- HdmiMhlLocalDevice device = mMhlController.getLocalDevice(portId);
+ HdmiMhlLocalDeviceStub device = mMhlController.getLocalDevice(portId);
if (device != null) {
- device.setCbusMode(cbusmode);
+ device.setBusMode(busmode);
} else {
- Slog.w(TAG, "No mhl device exists for cbus mode change[portId:" + portId +
- ", cbusmode:" + cbusmode + "]");
+ Slog.w(TAG, "No mhl device exists for bus mode change[portId:" + portId +
+ ", busmode:" + busmode + "]");
}
}
@ServiceThreadOnly
- void handleMhlVbusOvercurrent(int portId, boolean on) {
+ void handleMhlBusOvercurrent(int portId, boolean on) {
assertRunOnServiceThread();
- HdmiMhlLocalDevice device = mMhlController.getLocalDevice(portId);
+ HdmiMhlLocalDeviceStub device = mMhlController.getLocalDevice(portId);
if (device != null) {
- device.onVbusOvercurrentDetected(on);
+ device.onBusOvercurrentDetected(on);
} else {
- Slog.w(TAG, "No mhl device exists for vbus overcurrent event[portId:" + portId + "]");
+ Slog.w(TAG, "No mhl device exists for bus overcurrent event[portId:" + portId + "]");
}
}
@ServiceThreadOnly
- void handleMhlCapabilityRegisterChanged(int portId, int adopterId, int deviceId) {
+ void handleMhlDeviceStatusChanged(int portId, int adopterId, int deviceId) {
assertRunOnServiceThread();
- HdmiMhlLocalDevice device = mMhlController.getLocalDevice(portId);
+ HdmiMhlLocalDeviceStub device = mMhlController.getLocalDevice(portId);
- // Hotplug event should already have been called before capability register change event.
+ // Hotplug event should already have been called before device status change event.
if (device != null) {
- device.setCapabilityRegister(adopterId, deviceId);
+ device.setDeviceStatusChange(adopterId, deviceId);
invokeDeviceEventListeners(device.getInfo(), DEVICE_EVENT_ADD_DEVICE);
updateSafeMhlInput();
} else {
- Slog.w(TAG, "No mhl device exists for capability register change event[portId:"
+ Slog.w(TAG, "No mhl device exists for device status event[portId:"
+ portId + ", adopterId:" + adopterId + ", deviceId:" + deviceId + "]");
}
}
@@ -908,9 +889,9 @@ public final class HdmiControlService extends SystemService {
private void updateSafeMhlInput() {
assertRunOnServiceThread();
List<HdmiDeviceInfo> inputs = Collections.emptyList();
- SparseArray<HdmiMhlLocalDevice> devices = mMhlController.getAllLocalDevices();
+ SparseArray<HdmiMhlLocalDeviceStub> devices = mMhlController.getAllLocalDevices();
for (int i = 0; i < devices.size(); ++i) {
- HdmiMhlLocalDevice device = devices.valueAt(i);
+ HdmiMhlLocalDeviceStub device = devices.valueAt(i);
HdmiDeviceInfo info = device.getInfo();
if (info != null) {
if (inputs.isEmpty()) {
@@ -928,16 +909,16 @@ public final class HdmiControlService extends SystemService {
return mMhlDevices;
}
- private class HdmiMhlScratchpadCommandListenerRecord implements IBinder.DeathRecipient {
- private final IHdmiMhlScratchpadCommandListener mListener;
+ private class HdmiMhlVendorCommandListenerRecord implements IBinder.DeathRecipient {
+ private final IHdmiMhlVendorCommandListener mListener;
- public HdmiMhlScratchpadCommandListenerRecord(IHdmiMhlScratchpadCommandListener listener) {
+ public HdmiMhlVendorCommandListenerRecord(IHdmiMhlVendorCommandListener listener) {
mListener = listener;
}
@Override
public void binderDied() {
- mScratchpadCommandListenerRecords.remove(this);
+ mMhlVendorCommandListenerRecords.remove(this);
}
}
@@ -1072,7 +1053,7 @@ public final class HdmiControlService extends SystemService {
invokeCallback(callback, HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE);
return;
}
- HdmiMhlLocalDevice device = mMhlController.getLocalDeviceById(deviceId);
+ HdmiMhlLocalDeviceStub device = mMhlController.getLocalDeviceById(deviceId);
if (device != null) {
if (device.getPortId() == tv.getActivePortId()) {
invokeCallback(callback, HdmiControlManager.RESULT_SUCCESS);
@@ -1117,7 +1098,7 @@ public final class HdmiControlService extends SystemService {
runOnServiceThread(new Runnable() {
@Override
public void run() {
- HdmiMhlLocalDevice device = mMhlController.getLocalDevice(mActivePortId);
+ HdmiMhlLocalDeviceStub device = mMhlController.getLocalDevice(mActivePortId);
if (device != null) {
device.sendKeyEvent(keyCode, isPressed);
return;
@@ -1340,6 +1321,22 @@ public final class HdmiControlService extends SystemService {
}
@Override
+ public void sendStandby(final int deviceType, final int deviceId) {
+ enforceAccessPermission();
+ runOnServiceThread(new Runnable() {
+ @Override
+ public void run() {
+ HdmiCecLocalDevice device = mCecController.getLocalDevice(deviceType);
+ if (device == null) {
+ Slog.w(TAG, "Local device not available");
+ return;
+ }
+ device.sendStandby(deviceId);
+ }
+ });
+ }
+
+ @Override
public void setHdmiRecordListener(IHdmiRecordListener listener) {
HdmiControlService.this.setHdmiRecordListener(listener);
}
@@ -1403,7 +1400,7 @@ public final class HdmiControlService extends SystemService {
}
@Override
- public void sendScratchpadCommand(final int portId, final int offset, final int length,
+ public void sendMhlVendorCommand(final int portId, final int offset, final int length,
final byte[] data) {
enforceAccessPermission();
runOnServiceThread(new Runnable() {
@@ -1413,21 +1410,21 @@ public final class HdmiControlService extends SystemService {
Slog.w(TAG, "Hdmi control is disabled.");
return ;
}
- HdmiMhlLocalDevice device = mMhlController.getLocalDevice(portId);
+ HdmiMhlLocalDeviceStub device = mMhlController.getLocalDevice(portId);
if (device == null) {
Slog.w(TAG, "Invalid port id:" + portId);
return;
}
- mMhlController.sendScratchpadCommand(portId, offset, length, data);
+ mMhlController.sendVendorCommand(portId, offset, length, data);
}
});
}
@Override
- public void addHdmiMhlScratchpadCommandListener(
- IHdmiMhlScratchpadCommandListener listener) {
+ public void addHdmiMhlVendorCommandListener(
+ IHdmiMhlVendorCommandListener listener) {
enforceAccessPermission();
- HdmiControlService.this.addHdmiMhlScratchpadCommandListener(listener);
+ HdmiControlService.this.addHdmiMhlVendorCommandListener(listener);
}
@Override
@@ -1864,9 +1861,12 @@ public final class HdmiControlService extends SystemService {
}
}
- void invokeVendorCommandListeners(int deviceType, int srcAddress, byte[] params,
+ boolean invokeVendorCommandListeners(int deviceType, int srcAddress, byte[] params,
boolean hasVendorId) {
synchronized (mLock) {
+ if (mVendorCommandListenerRecords.isEmpty()) {
+ return false;
+ }
for (VendorCommandListenerRecord record : mVendorCommandListenerRecords) {
if (record.mDeviceType != deviceType) {
continue;
@@ -1877,12 +1877,13 @@ public final class HdmiControlService extends SystemService {
Slog.e(TAG, "Failed to notify vendor command reception", e);
}
}
+ return true;
}
}
- private void addHdmiMhlScratchpadCommandListener(IHdmiMhlScratchpadCommandListener listener) {
- HdmiMhlScratchpadCommandListenerRecord record =
- new HdmiMhlScratchpadCommandListenerRecord(listener);
+ private void addHdmiMhlVendorCommandListener(IHdmiMhlVendorCommandListener listener) {
+ HdmiMhlVendorCommandListenerRecord record =
+ new HdmiMhlVendorCommandListenerRecord(listener);
try {
listener.asBinder().linkToDeath(record, 0);
} catch (RemoteException e) {
@@ -1891,18 +1892,17 @@ public final class HdmiControlService extends SystemService {
}
synchronized (mLock) {
- mScratchpadCommandListenerRecords.add(record);
+ mMhlVendorCommandListenerRecords.add(record);
}
}
- void invokeScratchpadCommandListeners(int portId, int offest, int length, byte[] data) {
+ void invokeMhlVendorCommandListeners(int portId, int offest, int length, byte[] data) {
synchronized (mLock) {
- for (HdmiMhlScratchpadCommandListenerRecord record :
- mScratchpadCommandListenerRecords) {
+ for (HdmiMhlVendorCommandListenerRecord record : mMhlVendorCommandListenerRecords) {
try {
record.mListener.onReceived(portId, offest, length, data);
} catch (RemoteException e) {
- Slog.e(TAG, "Failed to notify scratchpad command", e);
+ Slog.e(TAG, "Failed to notify MHL vendor command", e);
}
}
}
@@ -2001,7 +2001,7 @@ public final class HdmiControlService extends SystemService {
// the last port to go back to when turnoff command is received. Note that the last port
// may not be the MHL-enabled one. In this case the device info to be passed to
// input change listener should be the one describing the corresponding HDMI port.
- HdmiMhlLocalDevice device = mMhlController.getLocalDevice(portId);
+ HdmiMhlLocalDeviceStub device = mMhlController.getLocalDevice(portId);
HdmiDeviceInfo info = (device != null && device.getInfo() != null)
? device.getInfo()
: mPortDeviceMap.get(portId);
diff --git a/services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java b/services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java
index c27cf18034c8..708aee6b4c84 100644
--- a/services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java
+++ b/services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java
@@ -29,7 +29,7 @@ import com.android.server.hdmi.HdmiControlService.SendMessageCallback;
*/
final class HdmiMhlControllerStub {
- private static final SparseArray<HdmiMhlLocalDevice> mLocalDevices = new SparseArray<>();
+ private static final SparseArray<HdmiMhlLocalDeviceStub> mLocalDevices = new SparseArray<>();
private static final HdmiPortInfo[] EMPTY_PORT_INFO = new HdmiPortInfo[0];
private static final int INVALID_MHL_VERSION = 0;
private static final int NO_SUPPORTED_FEATURES = 0;
@@ -53,60 +53,49 @@ final class HdmiMhlControllerStub {
}
/**
- * Return {@link HdmiMhlLocalDevice} matched with the given port id.
+ * Return {@link HdmiMhlLocalDeviceStub} matched with the given port id.
*
* @return null if has no matched port id
*/
- HdmiMhlLocalDevice getLocalDevice(int portId) {
+ HdmiMhlLocalDeviceStub getLocalDevice(int portId) {
return null;
}
/**
- * Return {@link HdmiMhlLocalDevice} matched with the given device id.
+ * Return {@link HdmiMhlLocalDeviceStub} matched with the given device id.
*
* @return null if has no matched id
*/
- HdmiMhlLocalDevice getLocalDeviceById(int deviceId) {
+ HdmiMhlLocalDeviceStub getLocalDeviceById(int deviceId) {
return null;
}
- SparseArray<HdmiMhlLocalDevice> getAllLocalDevices() {
+ SparseArray<HdmiMhlLocalDeviceStub> getAllLocalDevices() {
return mLocalDevices;
}
/**
- * Remove a {@link HdmiMhlLocalDevice} matched with the given port id.
+ * Remove a {@link HdmiMhlLocalDeviceStub} matched with the given port id.
*
- * @return removed {@link HdmiMhlLocalDevice}. Return null if no matched port id.
+ * @return removed {@link HdmiMhlLocalDeviceStub}. Return null if no matched port id.
*/
- HdmiMhlLocalDevice removeLocalDevice(int portId) {
+ HdmiMhlLocalDeviceStub removeLocalDevice(int portId) {
return null;
}
/**
- * Add a new {@link HdmiMhlLocalDevice}.
+ * Add a new {@link HdmiMhlLocalDeviceStub}.
*
- * @return old {@link HdmiMhlLocalDevice} having same port id
+ * @return old {@link HdmiMhlLocalDeviceStub} having same port id
*/
- HdmiMhlLocalDevice addLocalDevice(HdmiMhlLocalDevice device) {
+ HdmiMhlLocalDeviceStub addLocalDevice(HdmiMhlLocalDeviceStub device) {
return null;
}
void clearAllLocalDevices() {
}
- /**
- * Send MHL MSC-Subcommand to the device connected to the given port.
- */
- void sendSubcommand(int portId, HdmiMhlSubcommand command) {
- }
-
- void sendSubcommand(final int portId, final HdmiMhlSubcommand command,
- SendMessageCallback callback) {
- }
-
-
- void sendScratchpadCommand(int portId, int offset, int length, byte[] data) {
+ void sendVendorCommand(int portId, int offset, int length, byte[] data) {
}
void setOption(int flag, int value) {
diff --git a/services/core/java/com/android/server/hdmi/HdmiMhlLocalDeviceStub.java b/services/core/java/com/android/server/hdmi/HdmiMhlLocalDeviceStub.java
new file mode 100644
index 000000000000..53a7c5c2e5dc
--- /dev/null
+++ b/services/core/java/com/android/server/hdmi/HdmiMhlLocalDeviceStub.java
@@ -0,0 +1,46 @@
+package com.android.server.hdmi;
+
+import android.hardware.hdmi.HdmiDeviceInfo;
+import android.hardware.hdmi.IHdmiControlCallback;
+
+/**
+ * Stub class that models a logical mhl device hosted in this system.
+ */
+final class HdmiMhlLocalDeviceStub {
+
+ private static final HdmiDeviceInfo INFO = new HdmiDeviceInfo(
+ Constants.INVALID_PHYSICAL_ADDRESS, Constants.INVALID_PORT_ID, -1, -1);
+ private final HdmiControlService mService;
+ private final int mPortId;
+
+ protected HdmiMhlLocalDeviceStub(HdmiControlService service, int portId) {
+ mService = service;
+ mPortId = portId;
+ }
+
+ void onDeviceRemoved() {
+ }
+
+ HdmiDeviceInfo getInfo() {
+ return INFO;
+ }
+
+ void setBusMode(int cbusmode) {
+ }
+
+ void onBusOvercurrentDetected(boolean on) {
+ }
+
+ void setDeviceStatusChange(int adopterId, int deviceId) {
+ }
+
+ int getPortId() {
+ return mPortId;
+ }
+
+ void turnOn(IHdmiControlCallback callback) {
+ }
+
+ void sendKeyEvent(int keycode, boolean isPressed) {
+ }
+}
diff --git a/services/core/java/com/android/server/hdmi/MhlConstants.java b/services/core/java/com/android/server/hdmi/MhlConstants.java
new file mode 100644
index 000000000000..fe479f3dfb37
--- /dev/null
+++ b/services/core/java/com/android/server/hdmi/MhlConstants.java
@@ -0,0 +1,40 @@
+package com.android.server.hdmi;
+
+/**
+ * Defines constants related to MHL protocol internal implementation.
+ */
+final class MhlConstants {
+ // --------------------------------------------------
+ // MHL sub command message types.
+ static final int MSG_MSGE = 0x02;
+ static final int MSG_RCP = 0x10;
+ static final int MSG_RCPK = 0x11;
+ static final int MSG_RCPE = 0x12;
+ static final int MSG_RAP = 0x20;
+ static final int MSG_RAPK = 0x21;
+
+ // MHL RAP messages.
+ static final int RAP_ACTION_POLL = 0x00;
+ static final int RAP_ACTION_CONTENT_ON = 0x10;
+ static final int RAP_ACTION_CONTENT_OFF = 0x11;
+
+ // MHL RAPK messages.
+ static final int RAPK_NO_ERROR = 0x00;
+ static final int RAPK_UNRECOGNIZED_ACTION = 0x01;
+ static final int RAPK_UNSUPPORTED_ACTION = 0x02;
+ static final int RAPK_RESPONDER_BUSY = 0x03;
+
+ static final int INVALID_ADOPTER_ID = -1;
+ static final int INVALID_DEVICE_ID = -1;
+
+ static final int CBUS_MODE_OCBUS = 1;
+ static final int CBUS_MODE_ECBUS_S = 2;
+ static final int CBUS_MODE_ECBUS_D = 3;
+
+ // MHL RCPE messages
+ static final int RCPE_NO_ERROR = 0x00;
+ static final int RCPE_INEFFECTIVE_KEYCODE = 0x01;
+ static final int RCPE_RESPONDER_BUSY = 0x02;
+
+ private MhlConstants() { /* cannot be instantiated */ }
+}
diff --git a/services/core/java/com/android/server/job/JobServiceContext.java b/services/core/java/com/android/server/job/JobServiceContext.java
index 344c57b3b93c..9df21a2f17e0 100644
--- a/services/core/java/com/android/server/job/JobServiceContext.java
+++ b/services/core/java/com/android/server/job/JobServiceContext.java
@@ -153,7 +153,8 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
}
mRunningJob = job;
- mParams = new JobParameters(job.getJobId(), job.getExtras(), this);
+ mParams = new JobParameters(this, job.getJobId(), job.getExtras(),
+ !job.isConstraintsSatisfied());
mExecutionStartTimeElapsed = SystemClock.elapsedRealtime();
mVerb = VERB_BINDING;
@@ -169,6 +170,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
mRunningJob = null;
mParams = null;
mExecutionStartTimeElapsed = 0L;
+ removeOpTimeOut();
return false;
}
try {
@@ -298,7 +300,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
public void handleMessage(Message message) {
switch (message.what) {
case MSG_SERVICE_BOUND:
- removeMessages(MSG_TIMEOUT);
+ removeOpTimeOut();
handleServiceBoundH();
break;
case MSG_CALLBACK:
@@ -306,7 +308,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
Slog.d(TAG, "MSG_CALLBACK of : " + mRunningJob + " v:" +
(mVerb >= 0 ? VERB_STRINGS[mVerb] : "[invalid]"));
}
- removeMessages(MSG_TIMEOUT);
+ removeOpTimeOut();
if (mVerb == VERB_STARTING) {
final boolean workOngoing = message.arg2 == 1;
@@ -497,7 +499,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
* VERB_STOPPING.
*/
private void sendStopMessageH() {
- mCallbackHandler.removeMessages(MSG_TIMEOUT);
+ removeOpTimeOut();
if (mVerb != VERB_EXECUTING) {
Slog.e(TAG, "Sending onStopJob for a job that isn't started. " + mRunningJob);
closeAndCleanupJobH(false /* reschedule */);
@@ -539,7 +541,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
service = null;
mAvailable = true;
}
- removeMessages(MSG_TIMEOUT);
+ removeOpTimeOut();
removeMessages(MSG_CALLBACK);
removeMessages(MSG_SERVICE_BOUND);
removeMessages(MSG_CANCEL);
@@ -554,7 +556,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
* on with life.
*/
private void scheduleOpTimeOut() {
- mCallbackHandler.removeMessages(MSG_TIMEOUT);
+ removeOpTimeOut();
final long timeoutMillis = (mVerb == VERB_EXECUTING) ?
EXECUTING_TIMESLICE_MILLIS : OP_TIMEOUT_MILLIS;
@@ -567,4 +569,9 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
mCallbackHandler.sendMessageDelayed(m, timeoutMillis);
mTimeoutElapsed = SystemClock.elapsedRealtime() + timeoutMillis;
}
+
+
+ private void removeOpTimeOut() {
+ mCallbackHandler.removeMessages(MSG_TIMEOUT);
+ }
}
diff --git a/services/core/java/com/android/server/job/controllers/JobStatus.java b/services/core/java/com/android/server/job/controllers/JobStatus.java
index f56272132b12..e3c55b62b8a5 100644
--- a/services/core/java/com/android/server/job/controllers/JobStatus.java
+++ b/services/core/java/com/android/server/job/controllers/JobStatus.java
@@ -195,16 +195,23 @@ public class JobStatus {
}
/**
- * @return Whether or not this job is ready to run, based on its requirements.
+ * @return Whether or not this job is ready to run, based on its requirements. This is true if
+ * the constraints are satisfied <strong>or</strong> the deadline on the job has expired.
*/
public synchronized boolean isReady() {
+ return isConstraintsSatisfied()
+ || (hasDeadlineConstraint() && deadlineConstraintSatisfied.get());
+ }
+
+ /**
+ * @return Whether the constraints set on this job are satisfied.
+ */
+ public synchronized boolean isConstraintsSatisfied() {
return (!hasChargingConstraint() || chargingConstraintSatisfied.get())
&& (!hasTimingDelayConstraint() || timeDelayConstraintSatisfied.get())
&& (!hasConnectivityConstraint() || connectivityConstraintSatisfied.get())
&& (!hasUnmeteredConstraint() || unmeteredConstraintSatisfied.get())
- && (!hasIdleConstraint() || idleConstraintSatisfied.get())
- // Also ready if the deadline has expired - special case.
- || (hasDeadlineConstraint() && deadlineConstraintSatisfied.get());
+ && (!hasIdleConstraint() || idleConstraintSatisfied.get());
}
public boolean matches(int uid, int jobId) {
diff --git a/services/core/java/com/android/server/location/GpsLocationProvider.java b/services/core/java/com/android/server/location/GpsLocationProvider.java
index 11818d83871a..df846a848d91 100644
--- a/services/core/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/core/java/com/android/server/location/GpsLocationProvider.java
@@ -494,7 +494,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
Log.d(TAG, "SIM STATE is ready, SIM MCC/MNC is " + mccMnc);
synchronized (mLock) {
reloadGpsProperties(context, mProperties);
- mNIHandler.setSuplEsEnablement(mSuplEsEnabled);
+ mNIHandler.setSuplEsEnabled(mSuplEsEnabled);
}
}
}
@@ -590,6 +590,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
com.android.internal.R.array.config_gpsParameters);
for (String item : configValues) {
Log.d(TAG, "GpsParamsResource: " + item);
+ // We need to support "KEY =", but not "=VALUE".
String[] split = item.split("=");
if (split.length == 2) {
properties.setProperty(split[0].trim().toUpperCase(), split[1]);
diff --git a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
index 8ec9b25495eb..8a1f3ad5479c 100644
--- a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
+++ b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
@@ -389,7 +389,7 @@ public final class MediaProjectionManagerService extends SystemService
throw new IllegalStateException(
"Cannot start already started MediaProjection");
}
- addCallback(callback);
+ registerCallback(callback);
try {
mToken = callback.asBinder();
mDeathEater = new IBinder.DeathRecipient() {
@@ -424,7 +424,7 @@ public final class MediaProjectionManagerService extends SystemService
}
@Override
- public void addCallback(IMediaProjectionCallback callback) {
+ public void registerCallback(IMediaProjectionCallback callback) {
if (callback == null) {
throw new IllegalArgumentException("callback must not be null");
}
@@ -432,7 +432,7 @@ public final class MediaProjectionManagerService extends SystemService
}
@Override
- public void removeCallback(IMediaProjectionCallback callback) {
+ public void unregisterCallback(IMediaProjectionCallback callback) {
if (callback == null) {
throw new IllegalArgumentException("callback must not be null");
}
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 9e5fa412a543..cf194165b0af 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -433,14 +433,12 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
// listen for configured wifi networks to be removed
final IntentFilter wifiConfigFilter = new IntentFilter(CONFIGURED_NETWORKS_CHANGED_ACTION);
- mContext.registerReceiver(
- mWifiConfigReceiver, wifiConfigFilter, CONNECTIVITY_INTERNAL, mHandler);
+ mContext.registerReceiver(mWifiConfigReceiver, wifiConfigFilter, null, mHandler);
// listen for wifi state changes to catch metered hint
final IntentFilter wifiStateFilter = new IntentFilter(
WifiManager.NETWORK_STATE_CHANGED_ACTION);
- mContext.registerReceiver(
- mWifiStateReceiver, wifiStateFilter, CONNECTIVITY_INTERNAL, mHandler);
+ mContext.registerReceiver(mWifiStateReceiver, wifiStateFilter, null, mHandler);
}
diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java
index f995deeb8d8e..b5aa4d83fd0e 100644
--- a/services/core/java/com/android/server/net/NetworkStatsService.java
+++ b/services/core/java/com/android/server/net/NetworkStatsService.java
@@ -318,7 +318,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
// watch for tethering changes
final IntentFilter tetherFilter = new IntentFilter(ACTION_TETHER_STATE_CHANGED);
- mContext.registerReceiver(mTetherReceiver, tetherFilter, CONNECTIVITY_INTERNAL, mHandler);
+ mContext.registerReceiver(mTetherReceiver, tetherFilter, null, mHandler);
// listen for periodic polling events
final IntentFilter pollFilter = new IntentFilter(ACTION_NETWORK_STATS_POLL);
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index f647037e14d7..13fbf6c8312b 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -87,6 +87,10 @@ abstract public class ManagedServices {
// Just the packages from mEnabledServicesForCurrentProfiles
private ArraySet<String> mEnabledServicesPackageNames = new ArraySet<String>();
+ // Kept to de-dupe user change events (experienced after boot, when we receive a settings and a
+ // user change).
+ private int[] mLastSeenProfileIds;
+
public ManagedServices(Context context, Handler handler, Object mutex,
UserProfiles userProfiles) {
mContext = context;
@@ -159,6 +163,15 @@ abstract public class ManagedServices {
}
}
+ public void onUserSwitched() {
+ if (DEBUG) Slog.d(TAG, "onUserSwitched");
+ if (Arrays.equals(mLastSeenProfileIds, mUserProfiles.getCurrentProfileIds())) {
+ if (DEBUG) Slog.d(TAG, "Current profile IDs didn't change, skipping rebindServices().");
+ return;
+ }
+ rebindServices();
+ }
+
public ManagedServiceInfo checkServiceTokenLocked(IInterface service) {
checkNotNull(service);
final IBinder token = service.asBinder();
@@ -321,6 +334,8 @@ abstract public class ManagedServices {
registerService(component, userIds[i]);
}
}
+
+ mLastSeenProfileIds = mUserProfiles.getCurrentProfileIds();
}
/**
@@ -523,6 +538,8 @@ abstract public class ManagedServices {
private void update(Uri uri) {
if (uri == null || mSecureSettingsUri.equals(uri)) {
+ if (DEBUG) Slog.d(TAG, "Setting changed: mSecureSettingsUri=" + mSecureSettingsUri +
+ " / uri=" + uri);
rebindServices();
}
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index c09eff8fb7eb..14587e63ace6 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -718,6 +718,9 @@ public class NotificationManagerService extends SystemService {
// reload per-user settings
mSettingsObserver.update(null);
mUserProfiles.updateCache(context);
+ // Refresh managed services
+ mConditionProviders.onUserSwitched();
+ mListeners.onUserSwitched();
} else if (action.equals(Intent.ACTION_USER_ADDED)) {
mUserProfiles.updateCache(context);
}
@@ -1236,17 +1239,16 @@ public class NotificationManagerService extends SystemService {
final int N = keys.length;
for (int i = 0; i < N; i++) {
NotificationRecord r = mNotificationsByKey.get(keys[i]);
+ if (r == null) continue;
final int userId = r.sbn.getUserId();
if (userId != info.userid && userId != UserHandle.USER_ALL &&
!mUserProfiles.isCurrentProfile(userId)) {
throw new SecurityException("Disallowed call from listener: "
+ info.service);
}
- if (r != null) {
- cancelNotificationFromListenerLocked(info, callingUid, callingPid,
- r.sbn.getPackageName(), r.sbn.getTag(), r.sbn.getId(),
- userId);
- }
+ cancelNotificationFromListenerLocked(info, callingUid, callingPid,
+ r.sbn.getPackageName(), r.sbn.getTag(), r.sbn.getId(),
+ userId);
}
} else {
cancelAllLocked(callingUid, callingPid, info.userid,
@@ -1472,14 +1474,7 @@ public class NotificationManagerService extends SystemService {
@Override
public boolean matchesCallFilter(Bundle extras) {
enforceSystemOrSystemUI("INotificationManager.matchesCallFilter");
- return matchesCallFilterAsUser(extras, Binder.getCallingUid());
- }
-
- @Override
- public boolean matchesCallFilterAsUser(Bundle extras, int userId) {
- enforceSystemOrSystemUI("INotificationManager.matchesCallFilter");
- UserHandle userHandle = new UserHandle(userId);
- return mZenModeHelper.matchesCallFilter(userHandle, extras,
+ return mZenModeHelper.matchesCallFilter(UserHandle.getCallingUserHandle(), extras,
mRankingHelper.findExtractor(ValidateNotificationPeople.class));
}
};
diff --git a/services/core/java/com/android/server/notification/ValidateNotificationPeople.java b/services/core/java/com/android/server/notification/ValidateNotificationPeople.java
index f266916d3646..1c1a034492b3 100644
--- a/services/core/java/com/android/server/notification/ValidateNotificationPeople.java
+++ b/services/core/java/com/android/server/notification/ValidateNotificationPeople.java
@@ -19,9 +19,11 @@ package com.android.server.notification;
import android.app.Notification;
import android.content.Context;
import android.content.pm.PackageManager;
+import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
+import android.os.Handler;
import android.os.UserHandle;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
@@ -75,6 +77,9 @@ public class ValidateNotificationPeople implements NotificationSignalExtractor {
// maps raw person handle to resolved person object
private LruCache<String, LookupResult> mPeopleCache;
private Map<Integer, Context> mUserToContextMap;
+ private Handler mHandler;
+ private ContentObserver mObserver;
+ private int mEvictionCount;
public void initialize(Context context) {
if (DEBUG) Slog.d(TAG, "Initializing " + getClass().getSimpleName() + ".");
@@ -83,6 +88,22 @@ public class ValidateNotificationPeople implements NotificationSignalExtractor {
mPeopleCache = new LruCache<String, LookupResult>(PEOPLE_CACHE_SIZE);
mEnabled = ENABLE_PEOPLE_VALIDATOR && 1 == Settings.Global.getInt(
mBaseContext.getContentResolver(), SETTING_ENABLE_PEOPLE_VALIDATOR, 1);
+ if (mEnabled) {
+ mHandler = new Handler();
+ mObserver = new ContentObserver(mHandler) {
+ @Override
+ public void onChange(boolean selfChange, Uri uri, int userId) {
+ super.onChange(selfChange, uri, userId);
+ if (DEBUG || mEvictionCount % 100 == 0) {
+ if (INFO) Slog.i(TAG, "mEvictionCount: " + mEvictionCount);
+ }
+ mPeopleCache.evictAll();
+ mEvictionCount++;
+ }
+ };
+ mBaseContext.getContentResolver().registerContentObserver(Contacts.CONTENT_URI, true,
+ mObserver, UserHandle.USER_ALL);
+ }
}
public RankingReconsideration process(NotificationRecord record) {
@@ -112,6 +133,7 @@ public class ValidateNotificationPeople implements NotificationSignalExtractor {
}
public float getContactAffinity(UserHandle userHandle, Bundle extras) {
+ if (DEBUG) Slog.d(TAG, "checking affinity for " + userHandle);
if (extras == null) return NONE;
final String key = Long.toString(System.nanoTime());
final float[] affinityOut = new float[1];
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 41d7fa8f6551..479af894fc89 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -40,7 +40,7 @@ import android.provider.Settings.Global;
import android.provider.Settings.Secure;
import android.service.notification.NotificationListenerService;
import android.service.notification.ZenModeConfig;
-import android.telecomm.TelecommManager;
+import android.telecom.TelecomManager;
import android.util.Log;
import android.util.Slog;
@@ -346,8 +346,8 @@ public class ZenModeHelper {
private boolean isDefaultPhoneApp(String pkg) {
if (mDefaultPhoneApp == null) {
- final TelecommManager telecomm =
- (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
+ final TelecomManager telecomm =
+ (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
mDefaultPhoneApp = telecomm != null ? telecomm.getDefaultPhoneApp() : null;
if (DEBUG) Slog.d(TAG, "Default phone app: " + mDefaultPhoneApp);
}
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index 496c136f9131..c106546ec460 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -16,9 +16,6 @@
package com.android.server.pm;
-import static android.content.pm.PackageManager.INSTALL_ALL_USERS;
-import static android.content.pm.PackageManager.INSTALL_FROM_ADB;
-import static android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING;
import static com.android.internal.util.XmlUtils.readBitmapAttribute;
import static com.android.internal.util.XmlUtils.readBooleanAttribute;
import static com.android.internal.util.XmlUtils.readIntAttribute;
@@ -105,7 +102,7 @@ import java.util.Random;
public class PackageInstallerService extends IPackageInstaller.Stub {
private static final String TAG = "PackageInstaller";
- private static final boolean LOGD = true;
+ private static final boolean LOGD = false;
// TODO: remove outstanding sessions when installer package goes away
// TODO: notify listeners in other users when package has been installed there
@@ -117,6 +114,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
private static final String ATTR_SESSION_ID = "sessionId";
private static final String ATTR_USER_ID = "userId";
private static final String ATTR_INSTALLER_PACKAGE_NAME = "installerPackageName";
+ private static final String ATTR_INSTALLER_UID = "installerUid";
private static final String ATTR_CREATED_MILLIS = "createdMillis";
private static final String ATTR_SESSION_STAGE_DIR = "sessionStageDir";
private static final String ATTR_SESSION_STAGE_CID = "sessionStageCid";
@@ -146,6 +144,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
private final File mStagingDir;
private final HandlerThread mInstallThread;
+ private final Handler mInstallHandler;
private final Callbacks mCallbacks;
@@ -190,6 +189,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
mInstallThread = new HandlerThread(TAG);
mInstallThread.start();
+ mInstallHandler = new Handler(mInstallThread.getLooper());
+
mCallbacks = new Callbacks(mInstallThread.getLooper());
mSessionsFile = new AtomicFile(
@@ -336,6 +337,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
final int sessionId = readIntAttribute(in, ATTR_SESSION_ID);
final int userId = readIntAttribute(in, ATTR_USER_ID);
final String installerPackageName = readStringAttribute(in, ATTR_INSTALLER_PACKAGE_NAME);
+ final int installerUid = readIntAttribute(in, ATTR_INSTALLER_UID,
+ mPm.getPackageUid(installerPackageName, userId));
final long createdMillis = readLongAttribute(in, ATTR_CREATED_MILLIS);
final String stageDirRaw = readStringAttribute(in, ATTR_SESSION_STAGE_DIR);
final File stageDir = (stageDirRaw != null) ? new File(stageDirRaw) : null;
@@ -357,8 +360,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
params.abiOverride = readStringAttribute(in, ATTR_ABI_OVERRIDE);
return new PackageInstallerSession(mInternalCallback, mContext, mPm,
- mInstallThread.getLooper(), sessionId, userId, installerPackageName, params,
- createdMillis, stageDir, stageCid, prepared, sealed);
+ mInstallThread.getLooper(), sessionId, userId, installerPackageName, installerUid,
+ params, createdMillis, stageDir, stageCid, prepared, sealed);
}
private void writeSessionsLocked() {
@@ -398,6 +401,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
writeIntAttribute(out, ATTR_USER_ID, session.userId);
writeStringAttribute(out, ATTR_INSTALLER_PACKAGE_NAME,
session.installerPackageName);
+ writeIntAttribute(out, ATTR_INSTALLER_UID, session.installerUid);
writeLongAttribute(out, ATTR_CREATED_MILLIS, session.createdMillis);
if (session.stageDir != null) {
writeStringAttribute(out, ATTR_SESSION_STAGE_DIR,
@@ -446,26 +450,21 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
private int createSessionInternal(SessionParams params, String installerPackageName, int userId)
throws IOException {
final int callingUid = Binder.getCallingUid();
- mPm.enforceCrossUserPermission(callingUid, userId, true, "createSession");
+ mPm.enforceCrossUserPermission(callingUid, userId, true, true, "createSession");
- if (mPm.isUserRestricted(UserHandle.getUserId(callingUid),
- UserManager.DISALLOW_INSTALL_APPS)) {
+ if (mPm.isUserRestricted(userId, UserManager.DISALLOW_INSTALL_APPS)) {
throw new SecurityException("User restriction prevents installing");
}
- // TODO: double check all possible install flags
-
if ((callingUid == Process.SHELL_UID) || (callingUid == Process.ROOT_UID)) {
- installerPackageName = "com.android.shell";
-
- params.installFlags |= INSTALL_FROM_ADB;
+ params.installFlags |= PackageManager.INSTALL_FROM_ADB;
} else {
mAppOps.checkPackage(callingUid, installerPackageName);
- params.installFlags &= ~INSTALL_FROM_ADB;
- params.installFlags &= ~INSTALL_ALL_USERS;
- params.installFlags |= INSTALL_REPLACE_EXISTING;
+ params.installFlags &= ~PackageManager.INSTALL_FROM_ADB;
+ params.installFlags &= ~PackageManager.INSTALL_ALL_USERS;
+ params.installFlags |= PackageManager.INSTALL_REPLACE_EXISTING;
}
// Defensively resize giant app icons
@@ -532,8 +531,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
}
session = new PackageInstallerSession(mInternalCallback, mContext, mPm,
- mInstallThread.getLooper(), sessionId, userId, installerPackageName, params,
- createdMillis, stageDir, stageCid, false, false);
+ mInstallThread.getLooper(), sessionId, userId, installerPackageName, callingUid,
+ params, createdMillis, stageDir, stageCid, false, false);
mSessions.put(sessionId, session);
}
@@ -654,7 +653,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
@Override
public List<SessionInfo> getAllSessions(int userId) {
- mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "getAllSessions");
+ mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, false, "getAllSessions");
final List<SessionInfo> result = new ArrayList<>();
synchronized (mSessions) {
@@ -670,7 +669,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
@Override
public List<SessionInfo> getMySessions(String installerPackageName, int userId) {
- mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "getMySessions");
+ mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, false, "getMySessions");
mAppOps.checkPackage(Binder.getCallingUid(), installerPackageName);
final List<SessionInfo> result = new ArrayList<>();
@@ -688,7 +687,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
@Override
public void uninstall(String packageName, int flags, IntentSender statusReceiver, int userId) {
- mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "uninstall");
+ mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, true, "uninstall");
final PackageDeleteObserverAdapter adapter = new PackageDeleteObserverAdapter(mContext,
statusReceiver, packageName);
@@ -717,7 +716,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
@Override
public void registerCallback(IPackageInstallerCallback callback, int userId) {
- mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "registerCallback");
+ mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, false, "registerCallback");
mCallbacks.register(callback, userId);
}
@@ -965,13 +964,19 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
mCallbacks.notifySessionProgressChanged(session.sessionId, session.userId, progress);
}
- public void onSessionFinished(PackageInstallerSession session, boolean success) {
+ public void onSessionFinished(final PackageInstallerSession session, boolean success) {
mCallbacks.notifySessionFinished(session.sessionId, session.userId, success);
- synchronized (mSessions) {
- mSessions.remove(session.sessionId);
- mHistoricalSessions.put(session.sessionId, session);
- }
- writeSessionsAsync();
+
+ mInstallHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ synchronized (mSessions) {
+ mSessions.remove(session.sessionId);
+ mHistoricalSessions.put(session.sessionId, session);
+ writeSessionsLocked();
+ }
+ }
+ });
}
public void onSessionPrepared(PackageInstallerSession session) {
@@ -980,11 +985,13 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
writeSessionsAsync();
}
- public void onSessionSealed(PackageInstallerSession session) {
+ public void onSessionSealedBlocking(PackageInstallerSession session) {
// It's very important that we block until we've recorded the
// session as being sealed, since we never want to allow mutation
// after sealing.
- writeSessionsLocked();
+ synchronized (mSessions) {
+ writeSessionsLocked();
+ }
}
}
}
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index 06f550dabd89..fb0e35752f35 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -96,6 +96,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
final int sessionId;
final int userId;
final String installerPackageName;
+ final int installerUid;
final SessionParams params;
final long createdMillis;
@@ -103,9 +104,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
final File stageDir;
final String stageCid;
- /** Note that UID is not persisted; it's always derived at runtime. */
- final int installerUid;
-
private final AtomicInteger mActiveCount = new AtomicInteger();
private final Object mLock = new Object();
@@ -186,7 +184,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
public PackageInstallerSession(PackageInstallerService.InternalCallback callback,
Context context, PackageManagerService pm, Looper looper, int sessionId, int userId,
- String installerPackageName, SessionParams params, long createdMillis,
+ String installerPackageName, int installerUid, SessionParams params, long createdMillis,
File stageDir, String stageCid, boolean prepared, boolean sealed) {
mCallback = callback;
mContext = context;
@@ -196,6 +194,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
this.sessionId = sessionId;
this.userId = userId;
this.installerPackageName = installerPackageName;
+ this.installerUid = installerUid;
this.params = params;
this.createdMillis = createdMillis;
this.stageDir = stageDir;
@@ -209,11 +208,8 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
mPrepared = prepared;
mSealed = sealed;
- // Always derived at runtime
- installerUid = mPm.getPackageUid(installerPackageName, userId);
-
- if (mPm.checkPermission(android.Manifest.permission.INSTALL_PACKAGES,
- installerPackageName) == PackageManager.PERMISSION_GRANTED) {
+ if ((mPm.checkUidPermission(android.Manifest.permission.INSTALL_PACKAGES, installerUid)
+ == PackageManager.PERMISSION_GRANTED) || (installerUid == Process.ROOT_UID)) {
mPermissionsAccepted = true;
} else {
mPermissionsAccepted = false;
@@ -414,7 +410,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
public void commit(IntentSender statusReceiver) {
Preconditions.checkNotNull(statusReceiver);
+ final boolean wasSealed;
synchronized (mLock) {
+ wasSealed = mSealed;
if (!mSealed) {
// Verify that all writers are hands-off
for (FileBridge bridge : mBridges) {
@@ -422,17 +420,20 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
throw new SecurityException("Files still open");
}
}
-
- // Persist the fact that we've sealed ourselves to prevent
- // mutations of any hard links we create.
mSealed = true;
- mCallback.onSessionSealed(this);
}
+
+ // Client staging is fully done at this point
+ mClientProgress = 1f;
+ computeProgressLocked(true);
}
- // Client staging is fully done at this point
- mClientProgress = 1f;
- computeProgressLocked(true);
+ if (!wasSealed) {
+ // Persist the fact that we've sealed ourselves to prevent
+ // mutations of any hard links we create. We do this without holding
+ // the session lock, since otherwise it's a lock inversion.
+ mCallback.onSessionSealedBlocking(this);
+ }
// This ongoing commit should keep session active, even though client
// will probably close their end.
@@ -537,8 +538,15 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
}
};
- mPm.installStage(mPackageName, stageDir, stageCid, localObserver,
- params, installerPackageName, installerUid, new UserHandle(userId));
+ final UserHandle user;
+ if ((params.installFlags & PackageManager.INSTALL_ALL_USERS) != 0) {
+ user = UserHandle.ALL;
+ } else {
+ user = new UserHandle(userId);
+ }
+
+ mPm.installStage(mPackageName, stageDir, stageCid, localObserver, params,
+ installerPackageName, installerUid, user);
}
/**
@@ -764,8 +772,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
private static void extractNativeLibraries(File packageDir, String abiOverride)
throws PackageManagerException {
- if (LOGD) Slog.v(TAG, "extractNativeLibraries()");
-
// Always start from a clean slate
final File libDir = new File(packageDir, NativeLibraryHelper.LIB_DIR_NAME);
NativeLibraryHelper.removeNativeBinariesFromDirLI(libDir, true);
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index d821fc18d4c1..0d276695007a 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -138,6 +138,7 @@ import android.os.Bundle;
import android.os.Environment;
import android.os.Environment.UserEnvironment;
import android.os.storage.StorageManager;
+import android.os.Debug;
import android.os.FileUtils;
import android.os.Handler;
import android.os.IBinder;
@@ -1792,19 +1793,17 @@ public class PackageManagerService extends IPackageManager.Stub {
void cleanupInstallFailedPackage(PackageSetting ps) {
Slog.i(TAG, "Cleaning up incompletely installed app: " + ps.name);
removeDataDirsLI(ps.name);
-
- // TODO: try cleaning up codePath directory contents first, since it
- // might be a cluster
-
if (ps.codePath != null) {
- if (!ps.codePath.delete()) {
- Slog.w(TAG, "Unable to remove old code file: " + ps.codePath);
+ if (ps.codePath.isDirectory()) {
+ FileUtils.deleteContents(ps.codePath);
}
+ ps.codePath.delete();
}
- if (ps.resourcePath != null) {
- if (!ps.resourcePath.delete() && !ps.resourcePath.equals(ps.codePath)) {
- Slog.w(TAG, "Unable to remove old code file: " + ps.resourcePath);
+ if (ps.resourcePath != null && !ps.resourcePath.equals(ps.codePath)) {
+ if (ps.resourcePath.isDirectory()) {
+ FileUtils.deleteContents(ps.resourcePath);
}
+ ps.resourcePath.delete();
}
mSettings.removePackageLPw(ps.name);
}
@@ -1845,7 +1844,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public boolean isPackageAvailable(String packageName, int userId) {
if (!sUserManager.exists(userId)) return false;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "is package available");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "is package available");
synchronized (mPackages) {
PackageParser.Package p = mPackages.get(packageName);
if (p != null) {
@@ -1864,7 +1863,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public PackageInfo getPackageInfo(String packageName, int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "get package info");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get package info");
// reader
synchronized (mPackages) {
PackageParser.Package p = mPackages.get(packageName);
@@ -1909,7 +1908,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public int getPackageUid(String packageName, int userId) {
if (!sUserManager.exists(userId)) return -1;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "get package uid");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get package uid");
// reader
synchronized (mPackages) {
PackageParser.Package p = mPackages.get(packageName);
@@ -2059,7 +2058,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public ApplicationInfo getApplicationInfo(String packageName, int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "get application info");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get application info");
// writer
synchronized (mPackages) {
PackageParser.Package p = mPackages.get(packageName);
@@ -2150,7 +2149,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public ActivityInfo getActivityInfo(ComponentName component, int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "get activity info");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get activity info");
synchronized (mPackages) {
PackageParser.Activity a = mActivities.mActivities.get(component);
@@ -2189,7 +2188,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public ActivityInfo getReceiverInfo(ComponentName component, int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "get receiver info");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get receiver info");
synchronized (mPackages) {
PackageParser.Activity a = mReceivers.mActivities.get(component);
if (DEBUG_PACKAGE_INFO) Log.v(
@@ -2207,7 +2206,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public ServiceInfo getServiceInfo(ComponentName component, int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "get service info");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get service info");
synchronized (mPackages) {
PackageParser.Service s = mServices.mServices.get(component);
if (DEBUG_PACKAGE_INFO) Log.v(
@@ -2225,7 +2224,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public ProviderInfo getProviderInfo(ComponentName component, int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "get provider info");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get provider info");
synchronized (mPackages) {
PackageParser.Provider p = mProviders.mProviders.get(component);
if (DEBUG_PACKAGE_INFO) Log.v(
@@ -2329,13 +2328,17 @@ public class PackageManagerService extends IPackageManager.Stub {
/**
* Checks if the request is from the system or an app that has INTERACT_ACROSS_USERS
* or INTERACT_ACROSS_USERS_FULL permissions, if the userid is not for the caller.
+ * @param checkShell TODO(yamasani):
* @param message the message to log on security exception
*/
void enforceCrossUserPermission(int callingUid, int userId, boolean requireFullPermission,
- String message) {
+ boolean checkShell, String message) {
if (userId < 0) {
throw new IllegalArgumentException("Invalid userId " + userId);
}
+ if (checkShell) {
+ enforceShellRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, callingUid, userId);
+ }
if (userId == UserHandle.getUserId(callingUid)) return;
if (callingUid != Process.SYSTEM_UID && callingUid != 0) {
if (requireFullPermission) {
@@ -2353,6 +2356,19 @@ public class PackageManagerService extends IPackageManager.Stub {
}
}
+ void enforceShellRestriction(String restriction, int callingUid, int userHandle) {
+ if (callingUid == Process.SHELL_UID) {
+ if (userHandle >= 0
+ && sUserManager.hasUserRestriction(restriction, userHandle)) {
+ throw new SecurityException("Shell does not have permission to access user "
+ + userHandle);
+ } else if (userHandle < 0) {
+ Slog.e(TAG, "Unable to check shell permission for user " + userHandle + "\n\t"
+ + Debug.getCallers(3));
+ }
+ }
+ }
+
private BasePermission findPermissionTreeLP(String permName) {
for(BasePermission bp : mSettings.mPermissionTrees.values()) {
if (permName.startsWith(bp.name) &&
@@ -2876,7 +2892,7 @@ public class PackageManagerService extends IPackageManager.Stub {
public ResolveInfo resolveIntent(Intent intent, String resolvedType,
int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "resolve intent");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "resolve intent");
List<ResolveInfo> query = queryIntentActivities(intent, resolvedType, flags, userId);
return chooseBestActivity(intent, resolvedType, flags, query, userId);
}
@@ -3183,24 +3199,6 @@ public class PackageManagerService extends IPackageManager.Stub {
if (matches.get(i).getTargetUserId() == targetUserId) return true;
}
}
- ArrayList<String> packageNames = null;
- SparseArray<ArrayList<String>> fromSource =
- mSettings.mCrossProfilePackageInfo.get(sourceUserId);
- if (fromSource != null) {
- packageNames = fromSource.get(targetUserId);
- if (packageNames != null) {
- // We need the package name, so we try to resolve with the loosest flags possible
- List<ResolveInfo> resolveInfos = mActivities.queryIntent(intent, resolvedType,
- PackageManager.GET_UNINSTALLED_PACKAGES, targetUserId);
- int count = resolveInfos.size();
- for (int i = 0; i < count; i++) {
- ResolveInfo resolveInfo = resolveInfos.get(i);
- if (packageNames.contains(resolveInfo.activityInfo.packageName)) {
- return true;
- }
- }
- }
- }
return false;
}
@@ -3217,7 +3215,7 @@ public class PackageManagerService extends IPackageManager.Stub {
public List<ResolveInfo> queryIntentActivities(Intent intent,
String resolvedType, int flags, int userId) {
if (!sUserManager.exists(userId)) return Collections.emptyList();
- enforceCrossUserPermission(Binder.getCallingUid(), userId, false, "query intent activities");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "query intent activities");
ComponentName comp = intent.getComponent();
if (comp == null) {
if (intent.getSelector() != null) {
@@ -3241,20 +3239,10 @@ public class PackageManagerService extends IPackageManager.Stub {
synchronized (mPackages) {
final String pkgName = intent.getPackage();
if (pkgName == null) {
- ResolveInfo resolveInfo = null;
-
- // Check if the intent needs to be forwarded to another user for this package
- ArrayList<ResolveInfo> crossProfileResult =
- queryIntentActivitiesCrossProfilePackage(
- intent, resolvedType, flags, userId);
- if (!crossProfileResult.isEmpty()) {
- // Skip the current profile
- return crossProfileResult;
- }
List<CrossProfileIntentFilter> matchingFilters =
getMatchingCrossProfileIntentFilters(intent, resolvedType, userId);
// Check for results that need to skip the current profile.
- resolveInfo = querySkipCurrentProfileIntents(matchingFilters, intent,
+ ResolveInfo resolveInfo = querySkipCurrentProfileIntents(matchingFilters, intent,
resolvedType, flags, userId);
if (resolveInfo != null) {
List<ResolveInfo> result = new ArrayList<ResolveInfo>(1);
@@ -3276,13 +3264,6 @@ public class PackageManagerService extends IPackageManager.Stub {
}
final PackageParser.Package pkg = mPackages.get(pkgName);
if (pkg != null) {
- ArrayList<ResolveInfo> crossProfileResult =
- queryIntentActivitiesCrossProfilePackage(
- intent, resolvedType, flags, userId, pkg, pkgName);
- if (!crossProfileResult.isEmpty()) {
- // Skip the current profile
- return crossProfileResult;
- }
return mActivities.queryIntentForPackage(intent, resolvedType, flags,
pkg.activities, userId);
}
@@ -3311,56 +3292,6 @@ public class PackageManagerService extends IPackageManager.Stub {
return null;
}
- private ArrayList<ResolveInfo> queryIntentActivitiesCrossProfilePackage(
- Intent intent, String resolvedType, int flags, int userId) {
- ArrayList<ResolveInfo> matchingResolveInfos = new ArrayList<ResolveInfo>();
- SparseArray<ArrayList<String>> sourceForwardingInfo =
- mSettings.mCrossProfilePackageInfo.get(userId);
- if (sourceForwardingInfo != null) {
- int NI = sourceForwardingInfo.size();
- for (int i = 0; i < NI; i++) {
- int targetUserId = sourceForwardingInfo.keyAt(i);
- ArrayList<String> packageNames = sourceForwardingInfo.valueAt(i);
- List<ResolveInfo> resolveInfos = mActivities.queryIntent(
- intent, resolvedType, flags, targetUserId);
- int NJ = resolveInfos.size();
- for (int j = 0; j < NJ; j++) {
- ResolveInfo resolveInfo = resolveInfos.get(j);
- if (packageNames.contains(resolveInfo.activityInfo.packageName)) {
- matchingResolveInfos.add(createForwardingResolveInfo(
- resolveInfo.filter, userId, targetUserId));
- }
- }
- }
- }
- return matchingResolveInfos;
- }
-
- private ArrayList<ResolveInfo> queryIntentActivitiesCrossProfilePackage(
- Intent intent, String resolvedType, int flags, int userId, PackageParser.Package pkg,
- String packageName) {
- ArrayList<ResolveInfo> matchingResolveInfos = new ArrayList<ResolveInfo>();
- SparseArray<ArrayList<String>> sourceForwardingInfo =
- mSettings.mCrossProfilePackageInfo.get(userId);
- if (sourceForwardingInfo != null) {
- int NI = sourceForwardingInfo.size();
- for (int i = 0; i < NI; i++) {
- int targetUserId = sourceForwardingInfo.keyAt(i);
- if (sourceForwardingInfo.valueAt(i).contains(packageName)) {
- List<ResolveInfo> resolveInfos = mActivities.queryIntentForPackage(
- intent, resolvedType, flags, pkg.activities, targetUserId);
- int NJ = resolveInfos.size();
- for (int j = 0; j < NJ; j++) {
- ResolveInfo resolveInfo = resolveInfos.get(j);
- matchingResolveInfos.add(createForwardingResolveInfo(
- resolveInfo.filter, userId, targetUserId));
- }
- }
- }
- }
- return matchingResolveInfos;
- }
-
// Return matching ResolveInfo if any for skip current profile intent filters.
private ResolveInfo queryCrossProfileIntents(
List<CrossProfileIntentFilter> matchingFilters, Intent intent, String resolvedType,
@@ -3431,7 +3362,7 @@ public class PackageManagerService extends IPackageManager.Stub {
String resolvedType, int flags, int userId) {
if (!sUserManager.exists(userId)) return Collections.emptyList();
enforceCrossUserPermission(Binder.getCallingUid(), userId, false,
- "query intent activity options");
+ false, "query intent activity options");
final String resultsAction = intent.getAction();
List<ResolveInfo> results = queryIntentActivities(intent, resolvedType, flags
@@ -3727,7 +3658,7 @@ public class PackageManagerService extends IPackageManager.Stub {
public ParceledListSlice<PackageInfo> getInstalledPackages(int flags, int userId) {
final boolean listUninstalled = (flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0;
- enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "get installed packages");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, true, false, "get installed packages");
// writer
synchronized (mPackages) {
@@ -5025,6 +4956,21 @@ public class PackageManagerService extends IPackageManager.Stub {
private PackageParser.Package scanPackageLI(PackageParser.Package pkg, int parseFlags,
int scanFlags, long currentTime, UserHandle user) throws PackageManagerException {
+ boolean success = false;
+ try {
+ final PackageParser.Package res = scanPackageDirtyLI(pkg, parseFlags, scanFlags,
+ currentTime, user);
+ success = true;
+ return res;
+ } finally {
+ if (!success && (scanFlags & SCAN_DELETE_DATA_ON_FAILURES) != 0) {
+ removeDataDirsLI(pkg.packageName);
+ }
+ }
+ }
+
+ private PackageParser.Package scanPackageDirtyLI(PackageParser.Package pkg, int parseFlags,
+ int scanFlags, long currentTime, UserHandle user) throws PackageManagerException {
final File scanFile = new File(pkg.codePath);
if (pkg.applicationInfo.getCodePath() == null ||
pkg.applicationInfo.getResourcePath() == null) {
@@ -5331,7 +5277,8 @@ public class PackageManagerService extends IPackageManager.Stub {
File dataPath;
if (mPlatformPackage == pkg) {
// The system package is special.
- dataPath = new File (Environment.getDataDirectory(), "system");
+ dataPath = new File(Environment.getDataDirectory(), "system");
+
pkg.applicationInfo.dataDir = dataPath.getPath();
} else {
@@ -5339,7 +5286,6 @@ public class PackageManagerService extends IPackageManager.Stub {
dataPath = getDataPathForPackage(pkg.packageName, 0);
boolean uidError = false;
-
if (dataPath.exists()) {
int currentUid = 0;
try {
@@ -5666,13 +5612,9 @@ public class PackageManagerService extends IPackageManager.Stub {
pkg, forceDex, (scanFlags & SCAN_DEFER_DEX) != 0);
}
- if ((scanFlags&SCAN_NO_DEX) == 0) {
- if (performDexOptLI(pkg, null /* instruction sets */, forceDex, (scanFlags&SCAN_DEFER_DEX) != 0, false)
- == DEX_OPT_FAILED) {
- if ((scanFlags & SCAN_DELETE_DATA_ON_FAILURES) != 0) {
- removeDataDirsLI(pkg.packageName);
- }
-
+ if ((scanFlags & SCAN_NO_DEX) == 0) {
+ if (performDexOptLI(pkg, null /* instruction sets */, forceDex,
+ (scanFlags & SCAN_DEFER_DEX) != 0, false) == DEX_OPT_FAILED) {
throw new PackageManagerException(INSTALL_FAILED_DEXOPT, "scanPackageLI");
}
}
@@ -5743,16 +5685,11 @@ public class PackageManagerService extends IPackageManager.Stub {
// if these fail, we should abort the install since installing the library will
// result in some apps being broken.
if (clientLibPkgs != null) {
- if ((scanFlags&SCAN_NO_DEX) == 0) {
- for (int i=0; i<clientLibPkgs.size(); i++) {
+ if ((scanFlags & SCAN_NO_DEX) == 0) {
+ for (int i = 0; i < clientLibPkgs.size(); i++) {
PackageParser.Package clientPkg = clientLibPkgs.get(i);
- if (performDexOptLI(clientPkg, null /* instruction sets */,
- forceDex, (scanFlags&SCAN_DEFER_DEX) != 0, false)
- == DEX_OPT_FAILED) {
- if ((scanFlags & SCAN_DELETE_DATA_ON_FAILURES) != 0) {
- removeDataDirsLI(pkg.packageName);
- }
-
+ if (performDexOptLI(clientPkg, null /* instruction sets */, forceDex,
+ (scanFlags & SCAN_DEFER_DEX) != 0, false) == DEX_OPT_FAILED) {
throw new PackageManagerException(INSTALL_FAILED_DEXOPT,
"scanPackageLI failed to dexopt clientLibPkgs");
}
@@ -7735,17 +7672,12 @@ public class PackageManagerService extends IPackageManager.Stub {
public void installPackageAsUser(String originPath, IPackageInstallObserver2 observer,
int installFlags, String installerPackageName, VerificationParams verificationParams,
String packageAbiOverride, int userId) {
- mContext.enforceCallingOrSelfPermission(android.Manifest.permission.INSTALL_PACKAGES,
- null);
- if (UserHandle.getCallingUserId() != userId) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.INTERACT_ACROSS_USERS_FULL,
- "installPackage " + userId);
- }
+ mContext.enforceCallingOrSelfPermission(android.Manifest.permission.INSTALL_PACKAGES, null);
- final File originFile = new File(originPath);
- final int uid = Binder.getCallingUid();
- if (isUserRestricted(UserHandle.getUserId(uid), UserManager.DISALLOW_INSTALL_APPS)) {
+ final int callingUid = Binder.getCallingUid();
+ enforceCrossUserPermission(callingUid, userId, true, true, "installPackageAsUser");
+
+ if (isUserRestricted(userId, UserManager.DISALLOW_INSTALL_APPS)) {
try {
if (observer != null) {
observer.onPackageInstalled("", INSTALL_FAILED_USER_RESTRICTED, null, null);
@@ -7755,6 +7687,17 @@ public class PackageManagerService extends IPackageManager.Stub {
return;
}
+ if ((callingUid == Process.SHELL_UID) || (callingUid == Process.ROOT_UID)) {
+ installFlags |= PackageManager.INSTALL_FROM_ADB;
+
+ } else {
+ // Caller holds INSTALL_PACKAGES permission, so we're less strict
+ // about installerPackageName.
+
+ installFlags &= ~PackageManager.INSTALL_FROM_ADB;
+ installFlags &= ~PackageManager.INSTALL_ALL_USERS;
+ }
+
UserHandle user;
if ((installFlags & PackageManager.INSTALL_ALL_USERS) != 0) {
user = UserHandle.ALL;
@@ -7762,22 +7705,13 @@ public class PackageManagerService extends IPackageManager.Stub {
user = new UserHandle(userId);
}
- final int filteredInstallFlags;
- if (uid == Process.SHELL_UID || uid == 0) {
- if (DEBUG_INSTALL) {
- Slog.v(TAG, "Install from ADB");
- }
- filteredInstallFlags = installFlags | PackageManager.INSTALL_FROM_ADB;
- } else {
- filteredInstallFlags = installFlags & ~PackageManager.INSTALL_FROM_ADB;
- }
-
- verificationParams.setInstallerUid(uid);
+ verificationParams.setInstallerUid(callingUid);
+ final File originFile = new File(originPath);
final OriginInfo origin = OriginInfo.fromUntrustedFile(originFile);
final Message msg = mHandler.obtainMessage(INIT_COPY);
- msg.obj = new InstallParams(origin, observer, filteredInstallFlags,
+ msg.obj = new InstallParams(origin, observer, installFlags,
installerPackageName, verificationParams, user, packageAbiOverride);
mHandler.sendMessage(msg);
}
@@ -7833,11 +7767,8 @@ public class PackageManagerService extends IPackageManager.Stub {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USERS, null);
PackageSetting pkgSetting;
final int uid = Binder.getCallingUid();
- if (UserHandle.getUserId(uid) != userId) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.INTERACT_ACROSS_USERS_FULL,
- "setApplicationHiddenSetting for user " + userId);
- }
+ enforceCrossUserPermission(uid, userId, true, true,
+ "setApplicationHiddenSetting for user " + userId);
if (hidden && isPackageDeviceAdmin(packageName, userId)) {
Slog.w(TAG, "Not hiding package " + packageName + ": has active device admin");
@@ -7896,7 +7827,7 @@ public class PackageManagerService extends IPackageManager.Stub {
public boolean getApplicationHiddenSettingAsUser(String packageName, int userId) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USERS, null);
enforceCrossUserPermission(Binder.getCallingUid(), userId, true,
- "getApplicationHidden for user " + userId);
+ false, "getApplicationHidden for user " + userId);
PackageSetting pkgSetting;
long callingId = Binder.clearCallingIdentity();
try {
@@ -7922,7 +7853,8 @@ public class PackageManagerService extends IPackageManager.Stub {
null);
PackageSetting pkgSetting;
final int uid = Binder.getCallingUid();
- enforceCrossUserPermission(uid, userId, true, "installExistingPackage for user " + userId);
+ enforceCrossUserPermission(uid, userId, true, true, "installExistingPackage for user "
+ + userId);
if (isUserRestricted(userId, UserManager.DISALLOW_INSTALL_APPS)) {
return PackageManager.INSTALL_FAILED_USER_RESTRICTED;
}
@@ -11046,7 +10978,7 @@ public class PackageManagerService extends IPackageManager.Stub {
final IPackageDataObserver observer, final int userId) {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.CLEAR_APP_USER_DATA, null);
- enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "clear application data");
+ enforceCrossUserPermission(Binder.getCallingUid(), userId, true, false, "clear application data");
// Queue up an async operation since the package deletion may take a little while.
mHandler.post(new Runnable() {
public void run() {
@@ -11080,45 +11012,40 @@ public class PackageManagerService extends IPackageManager.Stub {
Slog.w(TAG, "Attempt to delete null packageName.");
return false;
}
+
+ // Try finding details about the requested package
PackageParser.Package pkg;
- boolean dataOnly = false;
- final int appId;
synchronized (mPackages) {
pkg = mPackages.get(packageName);
if (pkg == null) {
- dataOnly = true;
- PackageSetting ps = mSettings.mPackages.get(packageName);
- if ((ps == null) || (ps.pkg == null)) {
- Slog.w(TAG, "Package named '" + packageName + "' doesn't exist.");
- return false;
- }
- pkg = ps.pkg;
- }
- if (!dataOnly) {
- // need to check this only for fully installed applications
- if (pkg == null) {
- Slog.w(TAG, "Package named '" + packageName + "' doesn't exist.");
- return false;
- }
- final ApplicationInfo applicationInfo = pkg.applicationInfo;
- if (applicationInfo == null) {
- Slog.w(TAG, "Package " + packageName + " has no applicationInfo.");
- return false;
+ final PackageSetting ps = mSettings.mPackages.get(packageName);
+ if (ps != null) {
+ pkg = ps.pkg;
}
}
- if (pkg != null && pkg.applicationInfo != null) {
- appId = pkg.applicationInfo.uid;
- } else {
- appId = -1;
- }
}
+
+ if (pkg == null) {
+ Slog.w(TAG, "Package named '" + packageName + "' doesn't exist.");
+ }
+
+ // Always delete data directories for package, even if we found no other
+ // record of app. This helps users recover from UID mismatches without
+ // resorting to a full data wipe.
int retCode = mInstaller.clearUserData(packageName, userId);
if (retCode < 0) {
- Slog.w(TAG, "Couldn't remove cache files for package: "
- + packageName);
+ Slog.w(TAG, "Couldn't remove cache files for package: " + packageName);
+ return false;
+ }
+
+ if (pkg == null) {
return false;
}
- removeKeystoreDataIfNeeded(userId, appId);
+
+ if (pkg != null && pkg.applicationInfo != null) {
+ final int appId = pkg.applicationInfo.uid;
+ removeKeystoreDataIfNeeded(userId, appId);
+ }
// Create a native library symlink only if we have native libraries
// and if the native libraries are 32 bit libraries. We do not provide
@@ -11346,7 +11273,7 @@ public class PackageManagerService extends IPackageManager.Stub {
String opname) {
// writer
int callingUid = Binder.getCallingUid();
- enforceCrossUserPermission(callingUid, userId, true, "add preferred activity");
+ enforceCrossUserPermission(callingUid, userId, true, false, "add preferred activity");
if (filter.countActions() == 0) {
Slog.w(TAG, "Cannot set a preferred activity with no filter actions");
return;
@@ -11391,7 +11318,7 @@ public class PackageManagerService extends IPackageManager.Stub {
}
final int callingUid = Binder.getCallingUid();
- enforceCrossUserPermission(callingUid, userId, true, "replace preferred activity");
+ enforceCrossUserPermission(callingUid, userId, true, false, "replace preferred activity");
synchronized (mPackages) {
if (mContext.checkCallingOrSelfPermission(
android.Manifest.permission.SET_PREFERRED_APPLICATIONS)
@@ -11532,6 +11459,7 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public void resetPreferredActivities(int userId) {
+ /* TODO: Actually use userId. Why is it being passed in? */
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.SET_PREFERRED_APPLICATIONS, null);
// writer
@@ -11646,6 +11574,7 @@ public class PackageManagerService extends IPackageManager.Stub {
android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
int callingUid = Binder.getCallingUid();
enforceOwnerRights(ownerPackage, ownerUserId, callingUid);
+ enforceShellRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, callingUid, sourceUserId);
if (intentFilter.countActions() == 0) {
Slog.w(TAG, "Cannot set a crossProfile intent filter with no filter actions");
return;
@@ -11659,30 +11588,13 @@ public class PackageManagerService extends IPackageManager.Stub {
}
@Override
- public void addCrossProfileIntentsForPackage(String packageName,
- int sourceUserId, int targetUserId) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
- mSettings.addCrossProfilePackage(packageName, sourceUserId, targetUserId);
- mSettings.writePackageRestrictionsLPr(sourceUserId);
- }
-
- @Override
- public void removeCrossProfileIntentsForPackage(String packageName,
- int sourceUserId, int targetUserId) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
- mSettings.removeCrossProfilePackage(packageName, sourceUserId, targetUserId);
- mSettings.writePackageRestrictionsLPr(sourceUserId);
- }
-
- @Override
public void clearCrossProfileIntentFilters(int sourceUserId, String ownerPackage,
int ownerUserId) {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
int callingUid = Binder.getCallingUid();
enforceOwnerRights(ownerPackage, ownerUserId, callingUid);
+ enforceShellRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, callingUid, sourceUserId);
int callingUserId = UserHandle.getUserId(callingUid);
synchronized (mPackages) {
CrossProfileIntentResolver resolver =
@@ -11777,7 +11689,7 @@ public class PackageManagerService extends IPackageManager.Stub {
final int uid = Binder.getCallingUid();
final int permission = mContext.checkCallingOrSelfPermission(
android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE);
- enforceCrossUserPermission(uid, userId, false, "set enabled");
+ enforceCrossUserPermission(uid, userId, false, true, "set enabled");
final boolean allowedByPermission = (permission == PackageManager.PERMISSION_GRANTED);
boolean sendNow = false;
boolean isApp = (className == null);
@@ -11911,7 +11823,7 @@ public class PackageManagerService extends IPackageManager.Stub {
final int permission = mContext.checkCallingOrSelfPermission(
android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE);
final boolean allowedByPermission = (permission == PackageManager.PERMISSION_GRANTED);
- enforceCrossUserPermission(uid, userId, true, "stop package");
+ enforceCrossUserPermission(uid, userId, true, true, "stop package");
// writer
synchronized (mPackages) {
if (mSettings.setPackageStoppedStateLPw(packageName, stopped, allowedByPermission,
@@ -11933,7 +11845,7 @@ public class PackageManagerService extends IPackageManager.Stub {
public int getApplicationEnabledSetting(String packageName, int userId) {
if (!sUserManager.exists(userId)) return COMPONENT_ENABLED_STATE_DISABLED;
int uid = Binder.getCallingUid();
- enforceCrossUserPermission(uid, userId, false, "get enabled");
+ enforceCrossUserPermission(uid, userId, false, false, "get enabled");
// reader
synchronized (mPackages) {
return mSettings.getApplicationEnabledSettingLPr(packageName, userId);
@@ -11944,7 +11856,7 @@ public class PackageManagerService extends IPackageManager.Stub {
public int getComponentEnabledSetting(ComponentName componentName, int userId) {
if (!sUserManager.exists(userId)) return COMPONENT_ENABLED_STATE_DISABLED;
int uid = Binder.getCallingUid();
- enforceCrossUserPermission(uid, userId, false, "get component enabled");
+ enforceCrossUserPermission(uid, userId, false, false, "get component enabled");
// reader
synchronized (mPackages) {
return mSettings.getComponentEnabledSettingLPr(componentName, userId);
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index c1caeac94479..0dadee7f1fc4 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -138,10 +138,6 @@ final class Settings {
"persistent-preferred-activities";
static final String TAG_CROSS_PROFILE_INTENT_FILTERS =
"crossProfile-intent-filters";
- private static final String TAG_CROSS_PROFILE_PACKAGE_INFO = "cross-profile-package-info";
- private static final String CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID = "target-user-id";
- private static final String CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME = "package-name";
- private static final String CROSS_PROFILE_PACKAGE_INFO_ATTR_PACKAGE_NAME = "value";
private static final String ATTR_NAME = "name";
private static final String ATTR_USER = "user";
@@ -249,23 +245,15 @@ final class Settings {
*/
private final ArrayList<PendingPackage> mPendingPackages = new ArrayList<PendingPackage>();
- private final Context mContext;
-
private final File mSystemDir;
public final KeySetManagerService mKeySetManagerService = new KeySetManagerService(mPackages);
- // A mapping of (sourceUserId, targetUserId, packageNames) for forwarding the intents of a
- // package.
- final SparseArray<SparseArray<ArrayList<String>>>
- mCrossProfilePackageInfo = new SparseArray<SparseArray<ArrayList<String>>>();
-
Settings(Context context) {
this(context, Environment.getDataDirectory());
}
Settings(Context context, File dataDir) {
- mContext = context;
mSystemDir = new File(dataDir, "system");
mSystemDir.mkdirs();
FileUtils.setPermissions(mSystemDir.toString(),
@@ -282,47 +270,6 @@ final class Settings {
mBackupStoppedPackagesFilename = new File(mSystemDir, "packages-stopped-backup.xml");
}
- public void addCrossProfilePackage(
- String packageName, int sourceUserId, int targetUserId) {
- synchronized(mCrossProfilePackageInfo) {
- SparseArray<ArrayList<String>> sourceForwardingInfo =
- mCrossProfilePackageInfo.get(sourceUserId);
- if (sourceForwardingInfo == null) {
- sourceForwardingInfo = new SparseArray<ArrayList<String>>();
- mCrossProfilePackageInfo.put(sourceUserId, sourceForwardingInfo);
- }
- ArrayList<String> packageNames = sourceForwardingInfo.get(targetUserId);
- if (packageNames == null) {
- packageNames = new ArrayList<String>();
- sourceForwardingInfo.put(targetUserId, packageNames);
- }
- if (!packageNames.contains(packageName)) {
- packageNames.add(packageName);
- }
- }
- }
-
- public void removeCrossProfilePackage(
- String packageName, int sourceUserId, int targetUserId) {
- synchronized(mCrossProfilePackageInfo) {
- SparseArray<ArrayList<String>> sourceForwardingInfo =
- mCrossProfilePackageInfo.get(sourceUserId);
- if (sourceForwardingInfo == null) {
- return;
- }
- ArrayList<String> packageNames = sourceForwardingInfo.get(targetUserId);
- if (packageNames != null && packageNames.contains(packageName)) {
- packageNames.remove(packageName);
- if (packageNames.isEmpty()) {
- sourceForwardingInfo.remove(targetUserId);
- if (sourceForwardingInfo.size() == 0) {
- mCrossProfilePackageInfo.remove(sourceUserId);
- }
- }
- }
- }
- }
-
PackageSetting getPackageLPw(PackageParser.Package pkg, PackageSetting origPackage,
String realName, SharedUserSetting sharedUser, File codePath, File resourcePath,
String legacyNativeLibraryPathString, String primaryCpuAbi, String secondaryCpuAbi,
@@ -517,6 +464,7 @@ final class Settings {
int vc, int pkgFlags, UserHandle installUser, boolean add,
boolean allowInstall) {
PackageSetting p = mPackages.get(name);
+ UserManagerService userManager = UserManagerService.getInstance();
if (p != null) {
p.primaryCpuAbiString = primaryCpuAbiString;
p.secondaryCpuAbiString = secondaryCpuAbiString;
@@ -594,6 +542,7 @@ final class Settings {
Slog.i(PackageManagerService.TAG, "Stopping package " + name, e);
}
List<UserInfo> users = getAllUsers();
+ final int installUserId = installUser != null ? installUser.getIdentifier() : 0;
if (users != null && allowInstall) {
for (UserInfo user : users) {
// By default we consider this app to be installed
@@ -603,8 +552,9 @@ final class Settings {
// asked to install for all users, or this is the
// user we are installing for.
final boolean installed = installUser == null
- || installUser.getIdentifier() == UserHandle.USER_ALL
- || installUser.getIdentifier() == user.id;
+ || (installUserId == UserHandle.USER_ALL
+ && !isAdbInstallDisallowed(userManager, user.id))
+ || installUserId == user.id;
p.setUserState(user.id, COMPONENT_ENABLED_STATE_DEFAULT,
installed,
true, // stopped,
@@ -670,7 +620,8 @@ final class Settings {
List<UserInfo> users = getAllUsers();
if (users != null) {
for (UserInfo user : users) {
- if (installUser.getIdentifier() == UserHandle.USER_ALL
+ if ((installUser.getIdentifier() == UserHandle.USER_ALL
+ && !isAdbInstallDisallowed(userManager, user.id))
|| installUser.getIdentifier() == user.id) {
boolean installed = p.getInstalled(user.id);
if (!installed) {
@@ -685,6 +636,11 @@ final class Settings {
return p;
}
+ boolean isAdbInstallDisallowed(UserManagerService userManager, int userId) {
+ return userManager.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES,
+ userId);
+ }
+
void insertPackageSettingLPw(PackageSetting p, PackageParser.Package pkg) {
p.pkg = pkg;
// pkg.mSetEnabled = p.getEnabled(userId);
@@ -1068,68 +1024,6 @@ final class Settings {
}
}
- private void readCrossProfilePackageInfoLPw(XmlPullParser parser, int userId)
- throws XmlPullParserException, IOException {
- int outerDepth = parser.getDepth();
- int type;
- while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
- && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
- if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
- continue;
- }
- String tagName = parser.getName();
- if (tagName.equals(TAG_ITEM)) {
- String targetUserIdString = parser.getAttributeValue(null,
- CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID);
- if (targetUserIdString == null) {
- String msg = "Missing element under " + TAG +": "
- + CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID + " at " +
- parser.getPositionDescription();
- PackageManagerService.reportSettingsProblem(Log.WARN, msg);
- continue;
- }
- int targetUserId = Integer.parseInt(targetUserIdString);
- readCrossProfilePackageInfoForTargetLPw(parser, userId, targetUserId);
- } else {
- String msg = "Unknown element under " + TAG_CROSS_PROFILE_PACKAGE_INFO + ": " +
- parser.getName();
- PackageManagerService.reportSettingsProblem(Log.WARN, msg);
- XmlUtils.skipCurrentTag(parser);
- }
- }
- }
-
- private void readCrossProfilePackageInfoForTargetLPw(
- XmlPullParser parser, int sourceUserId, int targetUserId)
- throws XmlPullParserException, IOException {
- int outerDepth = parser.getDepth();
- int type;
- while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
- && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
- if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
- continue;
- }
- String tagName = parser.getName();
- if (tagName.equals(CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME)) {
- String packageName = parser.getAttributeValue(
- null, CROSS_PROFILE_PACKAGE_INFO_ATTR_PACKAGE_NAME);
- if (packageName == null) {
- String msg = "Missing element under " + TAG +": "
- + CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME + " at " +
- parser.getPositionDescription();
- PackageManagerService.reportSettingsProblem(Log.WARN, msg);
- continue;
- }
- addCrossProfilePackage(packageName, sourceUserId, targetUserId);
- } else {
- String msg = "Unknown element under " + TAG_ITEM + ": " +
- parser.getName();
- PackageManagerService.reportSettingsProblem(Log.WARN, msg);
- XmlUtils.skipCurrentTag(parser);
- }
- }
- }
-
void readPackageRestrictionsLPr(int userId) {
if (DEBUG_MU) {
Log.i(TAG, "Reading package restrictions for user=" + userId);
@@ -1271,8 +1165,6 @@ final class Settings {
readPersistentPreferredActivitiesLPw(parser, userId);
} else if (tagName.equals(TAG_CROSS_PROFILE_INTENT_FILTERS)) {
readCrossProfileIntentFiltersLPw(parser, userId);
- } else if (tagName.equals(TAG_CROSS_PROFILE_PACKAGE_INFO)){
- readCrossProfilePackageInfoLPw(parser, userId);
} else {
Slog.w(PackageManagerService.TAG, "Unknown element under <stopped-packages>: "
+ parser.getName());
@@ -1364,32 +1256,6 @@ final class Settings {
serializer.endTag(null, TAG_CROSS_PROFILE_INTENT_FILTERS);
}
- void writeCrossProfilePackageInfoLPr(XmlSerializer serializer, int userId)
- throws IllegalArgumentException, IllegalStateException, IOException {
- SparseArray<ArrayList<String>> sourceForwardingInfo = mCrossProfilePackageInfo.get(userId);
- if (sourceForwardingInfo == null) {
- return;
- }
- serializer.startTag(null, TAG_CROSS_PROFILE_PACKAGE_INFO);
- int NI = sourceForwardingInfo.size();
- for (int i = 0; i < NI; i++) {
- int targetUserId = sourceForwardingInfo.keyAt(i);
- ArrayList<String> packageNames = sourceForwardingInfo.valueAt(i);
- serializer.startTag(null, TAG_ITEM);
- serializer.attribute(null, CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID,
- Integer.toString(targetUserId));
- int NJ = packageNames.size();
- for (int j = 0; j < NJ; j++) {
- serializer.startTag(null, CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME);
- serializer.attribute(null, CROSS_PROFILE_PACKAGE_INFO_ATTR_PACKAGE_NAME,
- packageNames.get(j));
- serializer.endTag(null, CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME);
- }
- serializer.endTag(null, TAG_ITEM);
- }
- serializer.endTag(null, TAG_CROSS_PROFILE_PACKAGE_INFO);
- }
-
void writePackageRestrictionsLPr(int userId) {
if (DEBUG_MU) {
Log.i(TAG, "Writing package restrictions for user=" + userId);
@@ -1494,8 +1360,6 @@ final class Settings {
writeCrossProfileIntentFiltersLPr(serializer, userId);
- writeCrossProfilePackageInfoLPr(serializer, userId);
-
serializer.endTag(null, TAG_PACKAGE_RESTRICTIONS);
serializer.endDocument();
@@ -3180,7 +3044,6 @@ final class Settings {
file = getUserPackagesStateBackupFile(userId);
file.delete();
removeCrossProfileIntentFiltersLPw(userId);
- removeCrossProfilePackagesLPw(userId);
}
void removeCrossProfileIntentFiltersLPw(int userId) {
@@ -3211,27 +3074,6 @@ final class Settings {
}
}
- public void removeCrossProfilePackagesLPw(int userId) {
- synchronized(mCrossProfilePackageInfo) {
- // userId is the source user
- if (mCrossProfilePackageInfo.get(userId) != null) {
- mCrossProfilePackageInfo.remove(userId);
- writePackageRestrictionsLPr(userId);
- }
- // userId is the target user
- int count = mCrossProfilePackageInfo.size();
- for (int i = 0; i < count; i++) {
- int sourceUserId = mCrossProfilePackageInfo.keyAt(i);
- SparseArray<ArrayList<String>> sourceForwardingInfo =
- mCrossProfilePackageInfo.valueAt(i);
- if (sourceForwardingInfo.get(userId) != null) {
- sourceForwardingInfo.remove(userId);
- writePackageRestrictionsLPr(sourceUserId);
- }
- }
- }
- }
-
// This should be called (at least) whenever an application is removed
private void setFirstAvailableUid(int uid) {
if (uid > mFirstAvailableUid) {
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index d032d29b4b45..26e0db3f8c40 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -33,6 +33,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Binder;
import android.os.Bundle;
+import android.os.Debug;
import android.os.Environment;
import android.os.FileUtils;
import android.os.Handler;
@@ -480,6 +481,14 @@ public class UserManagerService extends IUserManager.Stub {
}
@Override
+ public boolean hasUserRestriction(String restrictionKey, int userId) {
+ synchronized (mPackagesLock) {
+ Bundle restrictions = mUserRestrictions.get(userId);
+ return restrictions != null ? restrictions.getBoolean(restrictionKey) : false;
+ }
+ }
+
+ @Override
public Bundle getUserRestrictions(int userId) {
// checkManageUsersPermission("getUserRestrictions");
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 5f97a009d523..eeebe044b8d4 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -20,8 +20,8 @@ import com.android.internal.app.IAppOpsService;
import com.android.internal.app.IBatteryStats;
import com.android.internal.os.BackgroundThread;
import com.android.server.EventLogTags;
-import com.android.server.LocalServices;
import com.android.server.ServiceThread;
+import com.android.server.SystemService;
import com.android.server.am.BatteryStatsService;
import com.android.server.lights.Light;
import com.android.server.lights.LightsManager;
@@ -55,7 +55,6 @@ import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
-import android.os.SystemService;
import android.os.Trace;
import android.os.UserHandle;
import android.os.WorkSource;
@@ -78,7 +77,7 @@ import libcore.util.Objects;
* The power manager service is responsible for coordinating power management
* functions on the device.
*/
-public final class PowerManagerService extends com.android.server.SystemService
+public final class PowerManagerService extends SystemService
implements Watchdog.Monitor {
private static final String TAG = "PowerManagerService";
@@ -91,8 +90,6 @@ public final class PowerManagerService extends com.android.server.SystemService
private static final int MSG_SANDMAN = 2;
// Message: Sent when the screen on blocker is released.
private static final int MSG_SCREEN_ON_BLOCKER_RELEASED = 3;
- // Message: Sent to poll whether the boot animation has terminated.
- private static final int MSG_CHECK_IF_BOOT_ANIMATION_FINISHED = 4;
// Dirty bit: mWakeLocks changed
private static final int DIRTY_WAKE_LOCKS = 1 << 0;
@@ -154,12 +151,6 @@ public final class PowerManagerService extends com.android.server.SystemService
// provider populates the actual default value (R.integer.def_screen_off_timeout).
private static final int DEFAULT_SCREEN_OFF_TIMEOUT = 15 * 1000;
- // The name of the boot animation service in init.rc.
- private static final String BOOT_ANIMATION_SERVICE = "bootanim";
-
- // Poll interval in milliseconds for watching boot animation finished.
- private static final int BOOT_ANIMATION_POLL_INTERVAL = 200;
-
// Power hints defined in hardware/libhardware/include/hardware/power.h.
private static final int POWER_HINT_INTERACTION = 2;
private static final int POWER_HINT_LOW_POWER = 5;
@@ -337,6 +328,9 @@ public final class PowerManagerService extends com.android.server.SystemService
// True if dreams should be activated on dock.
private boolean mDreamsActivateOnDockSetting;
+ // True if doze should not be started until after the screen off transition.
+ private boolean mDozeAfterScreenOffConfig;
+
// The minimum screen off timeout, in milliseconds.
private int mMinimumScreenOffTimeoutConfig;
@@ -478,14 +472,15 @@ public final class PowerManagerService extends com.android.server.SystemService
@Override
public void onBootPhase(int phase) {
- if (phase == PHASE_BOOT_COMPLETED) {
- // This is our early signal that the system thinks it has finished booting.
- // However, the boot animation may still be running for a few more seconds
- // since it is ultimately in charge of when it terminates.
- // Defer transitioning into the boot completed state until the animation exits.
- // We do this so that the screen does not start to dim prematurely before
- // the user has actually had a chance to interact with the device.
- startWatchingForBootAnimationFinished();
+ synchronized (mLock) {
+ if (phase == PHASE_BOOT_COMPLETED) {
+ final long now = SystemClock.uptimeMillis();
+ mBootCompleted = true;
+ mDirty |= DIRTY_BOOT_COMPLETED;
+ userActivityNoUpdateLocked(
+ now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID);
+ updatePowerStateLocked();
+ }
}
}
@@ -610,6 +605,8 @@ public final class PowerManagerService extends com.android.server.SystemService
com.android.internal.R.integer.config_dreamsBatteryLevelMinimumWhenNotPowered);
mDreamsBatteryLevelDrainCutoffConfig = resources.getInteger(
com.android.internal.R.integer.config_dreamsBatteryLevelDrainCutoff);
+ mDozeAfterScreenOffConfig = resources.getBoolean(
+ com.android.internal.R.bool.config_dozeAfterScreenOff);
mMinimumScreenOffTimeoutConfig = resources.getInteger(
com.android.internal.R.integer.config_minimumScreenOffTimeout);
mMaximumScreenDimDurationConfig = resources.getInteger(
@@ -821,7 +818,7 @@ public final class PowerManagerService extends com.android.server.SystemService
+ " [" + wakeLock.mTag + "], flags=0x" + Integer.toHexString(flags));
}
- if ((flags & PowerManager.WAIT_FOR_DISTANT_PROXIMITY) != 0) {
+ if ((flags & PowerManager.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY) != 0) {
mRequestWaitForNegativeProximity = true;
}
@@ -1249,16 +1246,18 @@ public final class PowerManagerService extends com.android.server.SystemService
}
}
- // Phase 2: Update dreams and display power state.
- updateDreamLocked(dirtyPhase2);
- updateDisplayPowerStateLocked(dirtyPhase2);
+ // Phase 2: Update display power state.
+ boolean displayBecameReady = updateDisplayPowerStateLocked(dirtyPhase2);
+
+ // Phase 3: Update dream state (depends on display ready signal).
+ updateDreamLocked(dirtyPhase2, displayBecameReady);
- // Phase 3: Send notifications, if needed.
+ // Phase 4: Send notifications, if needed.
if (mDisplayReady) {
finishInteractiveStateChangeLocked();
}
- // Phase 4: Update suspend blocker.
+ // Phase 5: Update suspend blocker.
// Because we might release the last suspend blocker here, we need to make sure
// we finished everything else first!
updateSuspendBlockerLocked();
@@ -1610,7 +1609,7 @@ public final class PowerManagerService extends com.android.server.SystemService
/**
* Determines whether to post a message to the sandman to update the dream state.
*/
- private void updateDreamLocked(int dirty) {
+ private void updateDreamLocked(int dirty, boolean displayBecameReady) {
if ((dirty & (DIRTY_WAKEFULNESS
| DIRTY_USER_ACTIVITY
| DIRTY_WAKE_LOCKS
@@ -1619,8 +1618,10 @@ public final class PowerManagerService extends com.android.server.SystemService
| DIRTY_IS_POWERED
| DIRTY_STAY_ON
| DIRTY_PROXIMITY_POSITIVE
- | DIRTY_BATTERY_STATE)) != 0) {
- scheduleSandmanLocked();
+ | DIRTY_BATTERY_STATE)) != 0 || displayBecameReady) {
+ if (mDisplayReady) {
+ scheduleSandmanLocked();
+ }
}
}
@@ -1647,7 +1648,7 @@ public final class PowerManagerService extends com.android.server.SystemService
synchronized (mLock) {
mSandmanScheduled = false;
wakefulness = mWakefulness;
- if (mSandmanSummoned) {
+ if (mSandmanSummoned && mDisplayReady) {
startDreaming = ((wakefulness == WAKEFULNESS_DREAMING && canDreamLocked())
|| wakefulness == WAKEFULNESS_DOZING);
mSandmanSummoned = false;
@@ -1779,8 +1780,11 @@ public final class PowerManagerService extends com.android.server.SystemService
* has been updated so we come back here to double-check and finish up.
*
* This function recalculates the display power state each time.
+ *
+ * @return True if the display became ready.
*/
- private void updateDisplayPowerStateLocked(int dirty) {
+ private boolean updateDisplayPowerStateLocked(int dirty) {
+ final boolean oldDisplayReady = mDisplayReady;
if ((dirty & (DIRTY_WAKE_LOCKS | DIRTY_USER_ACTIVITY | DIRTY_WAKEFULNESS
| DIRTY_ACTUAL_DISPLAY_POWER_STATE_UPDATED | DIRTY_BOOT_COMPLETED
| DIRTY_SETTINGS | DIRTY_SCREEN_ON_BLOCKER_RELEASED)) != 0) {
@@ -1846,6 +1850,7 @@ public final class PowerManagerService extends com.android.server.SystemService
+ ", mBootCompleted=" + mBootCompleted);
}
}
+ return mDisplayReady && !oldDisplayReady;
}
private static boolean isValidBrightness(int value) {
@@ -1862,8 +1867,15 @@ public final class PowerManagerService extends com.android.server.SystemService
return DisplayPowerRequest.POLICY_OFF;
}
- if ((mWakeLockSummary & WAKE_LOCK_DOZE) != 0) {
- return DisplayPowerRequest.POLICY_DOZE;
+ if (mWakefulness == WAKEFULNESS_DOZING) {
+ if ((mWakeLockSummary & WAKE_LOCK_DOZE) != 0) {
+ return DisplayPowerRequest.POLICY_DOZE;
+ }
+ if (mDozeAfterScreenOffConfig) {
+ return DisplayPowerRequest.POLICY_OFF;
+ }
+ // Fall through and preserve the current screen policy if not configured to
+ // doze after screen off. This causes the screen off transition to be skipped.
}
if ((mWakeLockSummary & WAKE_LOCK_SCREEN_BRIGHT) != 0
@@ -2076,38 +2088,6 @@ public final class PowerManagerService extends com.android.server.SystemService
updatePowerStateLocked();
}
- private void startWatchingForBootAnimationFinished() {
- mHandler.sendEmptyMessage(MSG_CHECK_IF_BOOT_ANIMATION_FINISHED);
- }
-
- private void checkIfBootAnimationFinished() {
- if (DEBUG) {
- Slog.d(TAG, "Check if boot animation finished...");
- }
-
- if (SystemService.isRunning(BOOT_ANIMATION_SERVICE)) {
- mHandler.sendEmptyMessageDelayed(MSG_CHECK_IF_BOOT_ANIMATION_FINISHED,
- BOOT_ANIMATION_POLL_INTERVAL);
- return;
- }
-
- synchronized (mLock) {
- if (!mBootCompleted) {
- Slog.i(TAG, "Boot animation finished.");
- handleBootCompletedLocked();
- }
- }
- }
-
- private void handleBootCompletedLocked() {
- final long now = SystemClock.uptimeMillis();
- mBootCompleted = true;
- mDirty |= DIRTY_BOOT_COMPLETED;
- userActivityNoUpdateLocked(
- now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID);
- updatePowerStateLocked();
- }
-
private void shutdownOrRebootInternal(final boolean shutdown, final boolean confirm,
final String reason, boolean wait) {
if (mHandler == null || !mSystemReady) {
@@ -2365,6 +2345,7 @@ public final class PowerManagerService extends com.android.server.SystemService
pw.println(" mDreamsEnabledSetting=" + mDreamsEnabledSetting);
pw.println(" mDreamsActivateOnSleepSetting=" + mDreamsActivateOnSleepSetting);
pw.println(" mDreamsActivateOnDockSetting=" + mDreamsActivateOnDockSetting);
+ pw.println(" mDozeAfterScreenOffConfig=" + mDozeAfterScreenOffConfig);
pw.println(" mLowPowerModeSetting=" + mLowPowerModeSetting);
pw.println(" mAutoLowPowerModeEnabled=" + mAutoLowPowerModeEnabled);
pw.println(" mAutoLowPowerModeSnoozing=" + mAutoLowPowerModeSnoozing);
@@ -2528,9 +2509,6 @@ public final class PowerManagerService extends com.android.server.SystemService
case MSG_SCREEN_ON_BLOCKER_RELEASED:
handleScreenOnBlockerReleased();
break;
- case MSG_CHECK_IF_BOOT_ANIMATION_FINISHED:
- checkIfBootAnimationFinished();
- break;
}
}
}
diff --git a/services/core/java/com/android/server/tv/TvInputHal.java b/services/core/java/com/android/server/tv/TvInputHal.java
index c7d95aa41f02..558ffb5e3ddd 100644
--- a/services/core/java/com/android/server/tv/TvInputHal.java
+++ b/services/core/java/com/android/server/tv/TvInputHal.java
@@ -32,8 +32,7 @@ import java.util.Queue;
* Provides access to the low-level TV input hardware abstraction layer.
*/
final class TvInputHal implements Handler.Callback {
- // STOPSHIP: Turn debugging off
- private final static boolean DEBUG = true;
+ private final static boolean DEBUG = false;
private final static String TAG = TvInputHal.class.getSimpleName();
public final static int SUCCESS = 0;
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index 3380f710988a..5bfc8347d34b 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -85,6 +85,7 @@ import java.io.FileDescriptor;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -94,8 +95,7 @@ import java.util.Set;
/** This class provides a system service that manages television inputs. */
public final class TvInputManagerService extends SystemService {
- // STOPSHIP: Turn debugging off.
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final String TAG = "TvInputManagerService";
private final Context mContext;
@@ -139,7 +139,7 @@ public final class TvInputManagerService extends SystemService {
registerBroadcastReceivers();
} else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
synchronized (mLock) {
- buildTvInputListLocked(mCurrentUserId);
+ buildTvInputListLocked(mCurrentUserId, null);
buildTvContentRatingSystemListLocked(mCurrentUserId);
}
}
@@ -148,19 +148,64 @@ public final class TvInputManagerService extends SystemService {
private void registerBroadcastReceivers() {
PackageMonitor monitor = new PackageMonitor() {
+ private void buildTvInputList(String[] packages) {
+ synchronized (mLock) {
+ buildTvInputListLocked(getChangingUserId(), packages);
+ buildTvContentRatingSystemListLocked(getChangingUserId());
+ }
+ }
+
+ @Override
+ public void onPackageUpdateFinished(String packageName, int uid) {
+ if (DEBUG) Slog.d(TAG, "onPackageUpdateFinished(packageName=" + packageName + ")");
+ // This callback is invoked when the TV input is reinstalled.
+ // In this case, isReplacing() always returns true.
+ buildTvInputList(new String[] { packageName });
+ }
+
+ @Override
+ public void onPackagesAvailable(String[] packages) {
+ if (DEBUG) {
+ Slog.d(TAG, "onPackagesAvailable(packages=" + Arrays.toString(packages) + ")");
+ }
+ // This callback is invoked when the media on which some packages exist become
+ // available.
+ if (isReplacing()) {
+ buildTvInputList(packages);
+ }
+ }
+
+ @Override
+ public void onPackagesUnavailable(String[] packages) {
+ // This callback is invoked when the media on which some packages exist become
+ // unavailable.
+ if (DEBUG) {
+ Slog.d(TAG, "onPackagesUnavailable(packages=" + Arrays.toString(packages)
+ + ")");
+ }
+ if (isReplacing()) {
+ buildTvInputList(packages);
+ }
+ }
+
@Override
public void onSomePackagesChanged() {
+ // TODO: Use finer-grained methods(e.g. onPackageAdded, onPackageRemoved) to manage
+ // the TV inputs.
if (DEBUG) Slog.d(TAG, "onSomePackagesChanged()");
- synchronized (mLock) {
- buildTvInputListLocked(mCurrentUserId);
- buildTvContentRatingSystemListLocked(mCurrentUserId);
+ if (isReplacing()) {
+ if (DEBUG) Slog.d(TAG, "Skipped building TV input list due to replacing");
+ // When the package is updated, buildTvInputListLocked is called in other
+ // methods instead.
+ return;
}
+ buildTvInputList(null);
}
@Override
public void onPackageRemoved(String packageName, int uid) {
synchronized (mLock) {
- UserState userState = getUserStateLocked(mCurrentUserId);
+ UserState userState = getUserStateLocked(getChangingUserId());
if (!userState.packageSet.contains(packageName)) {
// Not a TV input package.
return;
@@ -218,13 +263,11 @@ public final class TvInputManagerService extends SystemService {
component.getPackageName()) == PackageManager.PERMISSION_GRANTED;
}
- private void buildTvInputListLocked(int userId) {
+ private void buildTvInputListLocked(int userId, String[] updatedPackages) {
UserState userState = getUserStateLocked(userId);
userState.packageSet.clear();
- if (DEBUG) {
- Slog.d(TAG, "buildTvInputList");
- }
+ if (DEBUG) Slog.d(TAG, "buildTvInputList");
PackageManager pm = mContext.getPackageManager();
List<ResolveInfo> services = pm.queryIntentServices(
new Intent(TvInputService.SERVICE_INTERFACE),
@@ -278,6 +321,15 @@ public final class TvInputManagerService extends SystemService {
for (String inputId : inputMap.keySet()) {
if (!userState.inputMap.containsKey(inputId)) {
notifyInputAddedLocked(userState, inputId);
+ } else if (updatedPackages != null) {
+ // Notify the package updates
+ TvInputState inputState = inputMap.get(inputId);
+ for (String updatedPackage : updatedPackages) {
+ if (inputState.info.getComponent().getPackageName().equals(updatedPackage)) {
+ notifyInputUpdatedLocked(userState, inputId);
+ break;
+ }
+ }
}
}
@@ -337,7 +389,7 @@ public final class TvInputManagerService extends SystemService {
userState = new UserState(mContext, userId);
}
mUserStates.put(userId, userState);
- buildTvInputListLocked(userId);
+ buildTvInputListLocked(userId, null);
buildTvContentRatingSystemListLocked(userId);
}
}
@@ -649,6 +701,19 @@ public final class TvInputManagerService extends SystemService {
}
}
+ private void notifyInputUpdatedLocked(UserState userState, String inputId) {
+ if (DEBUG) {
+ Slog.d(TAG, "notifyInputUpdatedLocked(inputId=" + inputId + ")");
+ }
+ for (ITvInputManagerCallback callback : userState.callbackSet) {
+ try {
+ callback.onInputUpdated(inputId);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "failed to report updated input to callback", e);
+ }
+ }
+ }
+
private void notifyInputStateChangedLocked(UserState userState, String inputId,
int state, ITvInputManagerCallback targetCallback) {
if (DEBUG) {
@@ -1813,7 +1878,7 @@ public final class TvInputManagerService extends SystemService {
private void addTvInputLocked(TvInputInfo inputInfo) {
ServiceState serviceState = getServiceStateLocked(mComponent, mUserId);
serviceState.inputList.add(inputInfo);
- buildTvInputListLocked(mUserId);
+ buildTvInputListLocked(mUserId, null);
}
@Override
@@ -1851,7 +1916,7 @@ public final class TvInputManagerService extends SystemService {
}
}
if (removed) {
- buildTvInputListLocked(mUserId);
+ buildTvInputListLocked(mUserId, null);
mTvInputHardwareManager.removeTvInput(inputId);
} else {
Slog.e(TAG, "failed to remove input " + inputId);
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index e1ade63a2cb8..a8245e785346 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -843,7 +843,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
}
File file = new File(dir, WALLPAPER);
ParcelFileDescriptor fd = ParcelFileDescriptor.open(file,
- MODE_CREATE|MODE_READ_WRITE);
+ MODE_CREATE|MODE_READ_WRITE|MODE_TRUNCATE);
if (!SELinux.restorecon(file)) {
return null;
}
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java
index 81cd6020c607..da5cfda94c9a 100644
--- a/services/core/java/com/android/server/wm/WindowAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowAnimator.java
@@ -252,6 +252,10 @@ public class WindowAnimator {
final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleNow() &&
(imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0;
+ final WindowState winShowWhenLocked = (WindowState) mPolicy.getWinShowWhenLockedLw();
+ final AppWindowToken appShowWhenLocked = winShowWhenLocked == null ?
+ null : winShowWhenLocked.mAppToken;
+
for (int i = windows.size() - 1; i >= 0; i--) {
WindowState win = windows.get(i);
WindowStateAnimator winAnimator = win.mWinAnimator;
@@ -316,8 +320,8 @@ public class WindowAnimator {
+ " hidden=" + win.mRootToken.hidden
+ " anim=" + win.mWinAnimator.mAnimation);
} else if (mPolicy.canBeForceHidden(win, win.mAttrs)) {
- final boolean hideWhenLocked = (flags & FLAG_SHOW_WHEN_LOCKED) == 0 &&
- !(win.mIsImWindow && showImeOverKeyguard);
+ final boolean hideWhenLocked = !((win.mIsImWindow && showImeOverKeyguard) ||
+ (appShowWhenLocked != null && appShowWhenLocked == win.mAppToken));
final boolean changed;
if (((mForceHiding == KEYGUARD_ANIMATING_IN)
&& (!winAnimator.isAnimating() || hideWhenLocked))
@@ -454,7 +458,10 @@ public class WindowAnimator {
}
final int color = winAnimator.mAnimation.getBackgroundColor();
if (color != 0) {
- win.getStack().setAnimationBackground(winAnimator, color);
+ final TaskStack stack = win.getStack();
+ if (stack != null) {
+ stack.setAnimationBackground(winAnimator, color);
+ }
}
}
mAnimating = true;
@@ -473,7 +480,10 @@ public class WindowAnimator {
final int color = appAnimator.animation.getBackgroundColor();
if (color != 0) {
- win.getStack().setAnimationBackground(winAnimator, color);
+ final TaskStack stack = win.getStack();
+ if (stack != null) {
+ stack.setAnimationBackground(winAnimator, color);
+ }
}
}
} // end forall windows
@@ -568,6 +578,15 @@ public class WindowAnimator {
mBulkUpdateParams |= SET_UPDATE_ROTATION;
screenRotationAnimation.kill();
displayAnimator.mScreenRotationAnimation = null;
+
+ //TODO (multidisplay): Accessibility supported only for the default display.
+ if (mService.mAccessibilityController != null
+ && displayId == Display.DEFAULT_DISPLAY) {
+ // We just finished rotation animation which means we did not
+ // anounce the rotation and waited for it to end, announce now.
+ mService.mAccessibilityController.onRotationChangedLocked(
+ mService.getDefaultDisplayContentLocked(), mService.mRotation);
+ }
}
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 10ab6b545e0d..9033f3033ba9 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -21,6 +21,7 @@ import static android.view.WindowManager.LayoutParams.*;
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import android.app.AppOpsManager;
import android.os.Build;
+import android.os.SystemService;
import android.util.ArraySet;
import android.util.TimeUtils;
import android.view.IWindowId;
@@ -272,6 +273,12 @@ public class WindowManagerService extends IWindowManager.Stub
// Default input dispatching timeout in nanoseconds.
static final long DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS = 5000 * 1000000L;
+ // Poll interval in milliseconds for watching boot animation finished.
+ private static final int BOOT_ANIMATION_POLL_INTERVAL = 200;
+
+ // The name of the boot animation service in init.rc.
+ private static final String BOOT_ANIMATION_SERVICE = "bootanim";
+
/** Minimum value for attachStack and resizeStack weight value */
public static final float STACK_WEIGHT_MIN = 0.2f;
@@ -458,6 +465,7 @@ public class WindowManagerService extends IWindowManager.Stub
boolean mSystemBooted = false;
boolean mForceDisplayEnabled = false;
boolean mShowingBootMessages = false;
+ boolean mBootAnimationStopped = false;
String mLastANRState;
@@ -5607,17 +5615,70 @@ public class WindowManagerService extends IWindowManager.Stub
performEnableScreen();
}
+ private boolean checkWaitingForWindowsLocked() {
+
+ boolean haveBootMsg = false;
+ boolean haveApp = false;
+ // if the wallpaper service is disabled on the device, we're never going to have
+ // wallpaper, don't bother waiting for it
+ boolean haveWallpaper = false;
+ boolean wallpaperEnabled = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableWallpaperService)
+ && !mOnlyCore;
+ boolean haveKeyguard = true;
+ // TODO(multidisplay): Expand to all displays?
+ final WindowList windows = getDefaultWindowListLocked();
+ final int N = windows.size();
+ for (int i=0; i<N; i++) {
+ WindowState w = windows.get(i);
+ if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) {
+ return true;
+ }
+ if (w.isDrawnLw()) {
+ if (w.mAttrs.type == TYPE_BOOT_PROGRESS) {
+ haveBootMsg = true;
+ } else if (w.mAttrs.type == TYPE_APPLICATION) {
+ haveApp = true;
+ } else if (w.mAttrs.type == TYPE_WALLPAPER) {
+ haveWallpaper = true;
+ } else if (w.mAttrs.type == TYPE_STATUS_BAR) {
+ haveKeyguard = mPolicy.isKeyguardDrawnLw();
+ }
+ }
+ }
+
+ if (DEBUG_SCREEN_ON || DEBUG_BOOT) {
+ Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages
+ + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp
+ + " haveWall=" + haveWallpaper + " wallEnabled=" + wallpaperEnabled
+ + " haveKeyguard=" + haveKeyguard);
+ }
+
+ // If we are turning on the screen to show the boot message,
+ // don't do it until the boot message is actually displayed.
+ if (!mSystemBooted && !haveBootMsg) {
+ return true;
+ }
+
+ // If we are turning on the screen after the boot is completed
+ // normally, don't do so until we have the application and
+ // wallpaper.
+ if (mSystemBooted && ((!haveApp && !haveKeyguard) ||
+ (wallpaperEnabled && !haveWallpaper))) {
+ return true;
+ }
+
+ return false;
+ }
+
public void performEnableScreen() {
synchronized(mWindowMap) {
- if (DEBUG_BOOT) {
- RuntimeException here = new RuntimeException("here");
- here.fillInStackTrace();
- Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled
- + " mForceDisplayEnabled=" + mForceDisplayEnabled
- + " mShowingBootMessages=" + mShowingBootMessages
- + " mSystemBooted=" + mSystemBooted
- + " mOnlyCore=" + mOnlyCore, here);
- }
+ if (DEBUG_BOOT) Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled
+ + " mForceDisplayEnabled=" + mForceDisplayEnabled
+ + " mShowingBootMessages=" + mShowingBootMessages
+ + " mSystemBooted=" + mSystemBooted
+ + " mOnlyCore=" + mOnlyCore,
+ new RuntimeException("here").fillInStackTrace());
if (mDisplayEnabled) {
return;
}
@@ -5625,94 +5686,64 @@ public class WindowManagerService extends IWindowManager.Stub
return;
}
- if (!mForceDisplayEnabled) {
- // Don't enable the screen until all existing windows
- // have been drawn.
- boolean haveBootMsg = false;
- boolean haveApp = false;
- // if the wallpaper service is disabled on the device, we're never going to have
- // wallpaper, don't bother waiting for it
- boolean haveWallpaper = false;
- boolean wallpaperEnabled = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_enableWallpaperService)
- && !mOnlyCore;
- boolean haveKeyguard = true;
- // TODO(multidisplay): Expand to all displays?
- final WindowList windows = getDefaultWindowListLocked();
- final int N = windows.size();
- for (int i=0; i<N; i++) {
- WindowState w = windows.get(i);
- if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) {
- return;
- }
- if (w.isDrawnLw()) {
- if (w.mAttrs.type == TYPE_BOOT_PROGRESS) {
- haveBootMsg = true;
- } else if (w.mAttrs.type == TYPE_APPLICATION) {
- haveApp = true;
- } else if (w.mAttrs.type == TYPE_WALLPAPER) {
- haveWallpaper = true;
- } else if (w.mAttrs.type == TYPE_STATUS_BAR) {
- haveKeyguard = mPolicy.isKeyguardDrawnLw();
- }
- }
- }
-
- if (DEBUG_SCREEN_ON || DEBUG_BOOT) {
- Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages
- + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp
- + " haveWall=" + haveWallpaper + " wallEnabled=" + wallpaperEnabled
- + " haveKeyguard=" + haveKeyguard);
- }
+ // Don't enable the screen until all existing windows have been drawn.
+ if (!mForceDisplayEnabled && checkWaitingForWindowsLocked()) {
+ return;
+ }
- // If we are turning on the screen to show the boot message,
- // don't do it until the boot message is actually displayed.
- if (!mSystemBooted && !haveBootMsg) {
- return;
+ if (!mBootAnimationStopped) {
+ // Do this one time.
+ try {
+ IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
+ if (surfaceFlinger != null) {
+ //Slog.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken("android.ui.ISurfaceComposer");
+ surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
+ data, null, 0);
+ data.recycle();
+ }
+ } catch (RemoteException ex) {
+ Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
}
+ mBootAnimationStopped = true;
+ }
- // If we are turning on the screen after the boot is completed
- // normally, don't do so until we have the application and
- // wallpaper.
- if (mSystemBooted && ((!haveApp && !haveKeyguard) ||
- (wallpaperEnabled && !haveWallpaper))) {
- return;
- }
+ if (!mForceDisplayEnabled && !checkBootAnimationCompleteLocked()) {
+ if (DEBUG_BOOT) Slog.i(TAG, "performEnableScreen: Waiting for anim complete");
+ return;
}
mDisplayEnabled = true;
if (DEBUG_SCREEN_ON || DEBUG_BOOT) Slog.i(TAG, "******************** ENABLING SCREEN!");
- if (false) {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new FastPrintWriter(sw, false, 1024);
- this.dump(null, pw, null);
- pw.flush();
- Slog.i(TAG, sw.toString());
- }
- try {
- IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
- if (surfaceFlinger != null) {
- //Slog.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
- Parcel data = Parcel.obtain();
- data.writeInterfaceToken("android.ui.ISurfaceComposer");
- surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
- data, null, 0);
- data.recycle();
- }
- } catch (RemoteException ex) {
- Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
- }
// Enable input dispatch.
mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
}
+ try {
+ mActivityManager.bootAnimationComplete();
+ } catch (RemoteException e) {
+ }
+
mPolicy.enableScreenAfterBoot();
// Make sure the last requested orientation has been applied.
updateRotationUnchecked(false, false);
}
+ private boolean checkBootAnimationCompleteLocked() {
+ if (SystemService.isRunning(BOOT_ANIMATION_SERVICE)) {
+ mH.removeMessages(H.CHECK_IF_BOOT_ANIMATION_FINISHED);
+ mH.sendEmptyMessageDelayed(H.CHECK_IF_BOOT_ANIMATION_FINISHED,
+ BOOT_ANIMATION_POLL_INTERVAL);
+ if (DEBUG_BOOT) Slog.i(TAG, "checkBootAnimationComplete: Waiting for anim complete");
+ return false;
+ }
+ if (DEBUG_BOOT) Slog.i(TAG, "checkBootAnimationComplete: Animation complete!");
+ return true;
+ }
+
public void showBootMessage(final CharSequence msg, final boolean always) {
boolean first = false;
synchronized(mWindowMap) {
@@ -6411,9 +6442,12 @@ public class WindowManagerService extends IWindowManager.Stub
}
//TODO (multidisplay): Magnification is supported only for the default display.
- if (mAccessibilityController != null
+ // Announce rotation only if we will not animate as we already have the
+ // windows in final state. Otherwise, we make this call at the rotation end.
+ if (screenRotationAnimation == null && mAccessibilityController != null
&& displayContent.getDisplayId() == Display.DEFAULT_DISPLAY) {
- mAccessibilityController.onRotationChangedLocked(getDefaultDisplayContentLocked(), rotation);
+ mAccessibilityController.onRotationChangedLocked(getDefaultDisplayContentLocked(),
+ rotation);
}
return true;
@@ -7457,6 +7491,8 @@ public class WindowManagerService extends IWindowManager.Stub
public static final int SHOW_CIRCULAR_DISPLAY_MASK = 35;
public static final int SHOW_EMULATOR_DISPLAY_OVERLAY = 36;
+ public static final int CHECK_IF_BOOT_ANIMATION_FINISHED = 37;
+
@Override
public void handleMessage(Message msg) {
if (DEBUG_WINDOW_TRACE) {
@@ -7941,6 +7977,17 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
break;
+ case CHECK_IF_BOOT_ANIMATION_FINISHED: {
+ final boolean bootAnimationComplete;
+ synchronized (mWindowMap) {
+ if (DEBUG_BOOT) Slog.i(TAG, "CHECK_IF_BOOT_ANIMATION_FINISHED:");
+ bootAnimationComplete = checkBootAnimationCompleteLocked();
+ }
+ if (bootAnimationComplete) {
+ performEnableScreen();
+ }
+ }
+ break;
}
if (DEBUG_WINDOW_TRACE) {
Slog.v(TAG, "handleMessage: exit");
@@ -8509,7 +8556,8 @@ public class WindowManagerService extends IWindowManager.Stub
layerChanged = true;
anyLayerChanged = true;
}
- if (layerChanged && w.getStack().isDimming(winAnimator)) {
+ final TaskStack stack = w.getStack();
+ if (layerChanged && stack != null && stack.isDimming(winAnimator)) {
// Force an animation pass just to update the mDimLayer layer.
scheduleAnimationLocked();
}
@@ -9333,6 +9381,9 @@ public class WindowManagerService extends IWindowManager.Stub
&& !w.mExiting) {
final WindowStateAnimator winAnimator = w.mWinAnimator;
final TaskStack stack = w.getStack();
+ if (stack == null) {
+ return;
+ }
stack.setDimmingTag();
if (!stack.isDimming(winAnimator)) {
if (localLOGV) Slog.v(TAG, "Win " + w + " start dimming.");
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index dd611ceaaff2..da97876d90cc 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -1368,7 +1368,10 @@ class WindowStateAnimator {
mAnimator.setPendingLayoutChanges(w.getDisplayId(),
WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER);
if ((w.mAttrs.flags & LayoutParams.FLAG_DIM_BEHIND) != 0) {
- w.getStack().startDimmingIfNeeded(this);
+ final TaskStack stack = w.getStack();
+ if (stack != null) {
+ stack.startDimmingIfNeeded(this);
+ }
}
} catch (RuntimeException e) {
// If something goes wrong with the surface (such
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 09584f463ce6..95332bc60718 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -19,6 +19,7 @@ package com.android.server.devicepolicy;
import static android.Manifest.permission.MANAGE_CA_CERTIFICATES;
import android.accessibilityservice.AccessibilityServiceInfo;
+import android.accounts.AccountManager;
import android.app.Activity;
import android.app.ActivityManagerNative;
import android.app.AlarmManager;
@@ -44,13 +45,13 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
+import android.database.ContentObserver;
+import android.hardware.usb.UsbManager;
import android.media.AudioManager;
import android.media.IAudioService;
import android.net.ConnectivityManager;
-import android.net.Uri;
-import android.database.ContentObserver;
-import android.hardware.usb.UsbManager;
import android.net.ProxyInfo;
+import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
import android.os.Environment;
@@ -69,6 +70,7 @@ import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
import android.security.Credentials;
+import android.security.IKeyChainService;
import android.security.KeyChain;
import android.security.KeyChain.KeyChainConnection;
import android.util.Log;
@@ -110,6 +112,7 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
+import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
@@ -166,12 +169,17 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
private static final Set<String> SECURE_SETTINGS_WHITELIST;
+ private static final Set<String> SECURE_SETTINGS_DEVICEOWNER_WHITELIST;
private static final Set<String> GLOBAL_SETTINGS_WHITELIST;
static {
SECURE_SETTINGS_WHITELIST = new HashSet();
SECURE_SETTINGS_WHITELIST.add(Settings.Secure.DEFAULT_INPUT_METHOD);
SECURE_SETTINGS_WHITELIST.add(Settings.Secure.SKIP_FIRST_USE_HINTS);
+ SECURE_SETTINGS_DEVICEOWNER_WHITELIST = new HashSet();
+ SECURE_SETTINGS_DEVICEOWNER_WHITELIST.addAll(SECURE_SETTINGS_WHITELIST);
+ SECURE_SETTINGS_DEVICEOWNER_WHITELIST.add(Settings.Secure.LOCATION_MODE);
+
GLOBAL_SETTINGS_WHITELIST = new HashSet();
GLOBAL_SETTINGS_WHITELIST.add(Settings.Global.ADB_ENABLED);
GLOBAL_SETTINGS_WHITELIST.add(Settings.Global.AUTO_TIME);
@@ -2824,6 +2832,35 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
}
+ @Override
+ public boolean installKeyPair(ComponentName who, byte[] privKey, byte[] cert, String alias) {
+ if (who == null) {
+ throw new NullPointerException("ComponentName is null");
+ }
+ synchronized (this) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ }
+ final UserHandle userHandle = new UserHandle(UserHandle.getCallingUserId());
+ final long id = Binder.clearCallingIdentity();
+ try {
+ final KeyChainConnection keyChainConnection = KeyChain.bindAsUser(mContext, userHandle);
+ try {
+ IKeyChainService keyChain = keyChainConnection.getService();
+ return keyChain.installKeyPair(privKey, cert, alias);
+ } catch (RemoteException e) {
+ Log.e(LOG_TAG, "Installing certificate", e);
+ } finally {
+ keyChainConnection.close();
+ }
+ } catch (InterruptedException e) {
+ Log.w(LOG_TAG, "Interrupted while installing certificate", e);
+ Thread.currentThread().interrupt();
+ } finally {
+ Binder.restoreCallingIdentity(id);
+ }
+ return false;
+ }
+
void wipeDataLocked(int flags) {
// If the SD card is encrypted and non-removable, we have to force a wipe.
boolean forceExtWipe = !Environment.isExternalStorageRemovable() && isExtStorageEncrypted();
@@ -3543,7 +3580,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
+ " for device owner");
}
synchronized (this) {
- if (isDeviceProvisioned()) {
+ if (!allowedToSetDeviceOwnerOnDevice()) {
throw new IllegalStateException(
"Trying to set device owner but device is already provisioned.");
}
@@ -3679,7 +3716,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
synchronized (this) {
// Only SYSTEM_UID can override the userSetupComplete
if (UserHandle.getAppId(Binder.getCallingUid()) != Process.SYSTEM_UID
- && isUserSetupComplete(userHandle)) {
+ && hasUserSetupCompleted(userHandle)) {
throw new IllegalStateException(
"Trying to set profile owner but user is already set-up.");
}
@@ -3736,10 +3773,14 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@Override
public boolean hasUserSetupCompleted() {
+ return hasUserSetupCompleted(UserHandle.getCallingUserId());
+ }
+
+ private boolean hasUserSetupCompleted(int userHandle) {
if (!mHasFeature) {
return true;
}
- DevicePolicyData policy = getUserData(UserHandle.getCallingUserId());
+ DevicePolicyData policy = getUserData(userHandle);
// If policy is null, return true, else check if the setup has completed.
return policy == null || policy.mUserSetupComplete;
}
@@ -3842,14 +3883,17 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return null;
}
- private boolean isDeviceProvisioned() {
- return Settings.Global.getInt(mContext.getContentResolver(),
- Settings.Global.DEVICE_PROVISIONED, 0) > 0;
- }
-
- private boolean isUserSetupComplete(int userId) {
- return Settings.Secure.getIntForUser(mContext.getContentResolver(),
- Settings.Secure.USER_SETUP_COMPLETE, 0, userId) > 0;
+ /**
+ * Device owner can only be set on an unprovisioned device, unless it was initiated by "adb", in
+ * which case we allow it if no account is associated with the device.
+ */
+ private boolean allowedToSetDeviceOwnerOnDevice() {
+ int callingId = Binder.getCallingUid();
+ if (callingId == Process.SHELL_UID || callingId == Process.ROOT_UID) {
+ return AccountManager.get(mContext).getAccounts().length == 0;
+ } else {
+ return !hasUserSetupCompleted(UserHandle.USER_OWNER);
+ }
}
private void enforceCrossUserPermission(int userHandle) {
@@ -4608,7 +4652,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@Override
public void setUserRestriction(ComponentName who, String key, boolean enabled) {
- final UserHandle userHandle = new UserHandle(UserHandle.getCallingUserId());
+ final UserHandle user = new UserHandle(UserHandle.getCallingUserId());
+ final int userHandle = user.getIdentifier();
synchronized (this) {
if (who == null) {
throw new NullPointerException("ComponentName is null");
@@ -4619,7 +4664,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
if (!isDeviceOwner && DEVICE_OWNER_USER_RESTRICTIONS.contains(key)) {
throw new SecurityException("Profile owners cannot set user restriction " + key);
}
- boolean alreadyRestricted = mUserManager.hasUserRestriction(key, userHandle);
+ boolean alreadyRestricted = mUserManager.hasUserRestriction(key, user);
IAudioService iAudioService = null;
if (UserManager.DISALLOW_UNMUTE_MICROPHONE.equals(key)
@@ -4645,7 +4690,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
if (UserManager.DISALLOW_CONFIG_WIFI.equals(key)) {
Settings.Secure.putIntForUser(mContext.getContentResolver(),
Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0,
- userHandle.getIdentifier());
+ userHandle);
} else if (UserManager.DISALLOW_USB_FILE_TRANSFER.equals(key)) {
UsbManager manager =
(UsbManager) mContext.getSystemService(Context.USB_SERVICE);
@@ -4653,27 +4698,30 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
} else if (UserManager.DISALLOW_SHARE_LOCATION.equals(key)) {
Settings.Secure.putIntForUser(mContext.getContentResolver(),
Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF,
- userHandle.getIdentifier());
+ userHandle);
Settings.Secure.putStringForUser(mContext.getContentResolver(),
Settings.Secure.LOCATION_PROVIDERS_ALLOWED, "",
- userHandle.getIdentifier());
+ userHandle);
} else if (UserManager.DISALLOW_DEBUGGING_FEATURES.equals(key)) {
- Settings.Global.putStringForUser(mContext.getContentResolver(),
- Settings.Global.ADB_ENABLED, "0", userHandle.getIdentifier());
+ // Only disable adb if changing for primary user, since it is global
+ if (userHandle == UserHandle.USER_OWNER) {
+ Settings.Global.putStringForUser(mContext.getContentResolver(),
+ Settings.Global.ADB_ENABLED, "0", userHandle);
+ }
} else if (UserManager.ENSURE_VERIFY_APPS.equals(key)) {
Settings.Global.putStringForUser(mContext.getContentResolver(),
Settings.Global.PACKAGE_VERIFIER_ENABLE, "1",
- userHandle.getIdentifier());
+ userHandle);
Settings.Global.putStringForUser(mContext.getContentResolver(),
Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, "1",
- userHandle.getIdentifier());
+ userHandle);
} else if (UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES.equals(key)) {
Settings.Secure.putIntForUser(mContext.getContentResolver(),
Settings.Secure.INSTALL_NON_MARKET_APPS, 0,
- userHandle.getIdentifier());
+ userHandle);
}
}
- mUserManager.setUserRestriction(key, enabled, userHandle);
+ mUserManager.setUserRestriction(key, enabled, user);
} finally {
restoreCallingIdentity(id);
}
@@ -5109,11 +5157,17 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
if (who == null) {
throw new NullPointerException("ComponentName is null");
}
- getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ ActiveAdmin activeAdmin =
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
- if (!SECURE_SETTINGS_WHITELIST.contains(setting)) {
+ if (isDeviceOwner(activeAdmin.info.getPackageName())) {
+ if (!SECURE_SETTINGS_DEVICEOWNER_WHITELIST.contains(setting)) {
+ throw new SecurityException(String.format(
+ "Permission denial: Device owners cannot update %1$s", setting));
+ }
+ } else if (!SECURE_SETTINGS_WHITELIST.contains(setting)) {
throw new SecurityException(String.format(
- "Permission denial: profile/device owners cannot update %1$s", setting));
+ "Permission denial: Profile owners cannot update %1$s", setting));
}
long id = Binder.clearCallingIdentity();
diff --git a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
index 62a7ec073709..972c929edf65 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
@@ -61,7 +61,7 @@ class UsageStatsDatabase {
/**
* Initialize any directories required and index what stats are available.
*/
- void init() {
+ public void init(long currentTimeMillis) {
synchronized (mLock) {
for (File f : mIntervalDirs) {
f.mkdirs();
@@ -72,27 +72,53 @@ class UsageStatsDatabase {
}
checkVersionLocked();
+ indexFilesLocked();
- final FilenameFilter backupFileFilter = new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- return !name.endsWith(".bak");
+ // Delete files that are in the future.
+ for (TimeSparseArray<AtomicFile> files : mSortedStatFiles) {
+ final int startIndex = files.closestIndexOnOrAfter(currentTimeMillis);
+ if (startIndex < 0) {
+ continue;
}
- };
- // Index the available usage stat files on disk.
- for (int i = 0; i < mSortedStatFiles.length; i++) {
+ final int fileCount = files.size();
+ for (int i = startIndex; i < fileCount; i++) {
+ files.valueAt(i).delete();
+ }
+
+ // Remove in a separate loop because any accesses (valueAt)
+ // will cause a gc in the SparseArray and mess up the order.
+ for (int i = startIndex; i < fileCount; i++) {
+ files.removeAt(i);
+ }
+ }
+ }
+ }
+
+ private void indexFilesLocked() {
+ final FilenameFilter backupFileFilter = new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return !name.endsWith(".bak");
+ }
+ };
+
+ // Index the available usage stat files on disk.
+ for (int i = 0; i < mSortedStatFiles.length; i++) {
+ if (mSortedStatFiles[i] == null) {
mSortedStatFiles[i] = new TimeSparseArray<>();
- File[] files = mIntervalDirs[i].listFiles(backupFileFilter);
- if (files != null) {
- if (DEBUG) {
- Slog.d(TAG, "Found " + files.length + " stat files for interval " + i);
- }
+ } else {
+ mSortedStatFiles[i].clear();
+ }
+ File[] files = mIntervalDirs[i].listFiles(backupFileFilter);
+ if (files != null) {
+ if (DEBUG) {
+ Slog.d(TAG, "Found " + files.length + " stat files for interval " + i);
+ }
- for (File f : files) {
- final AtomicFile af = new AtomicFile(f);
- mSortedStatFiles[i].put(UsageStatsXml.parseBeginTime(af), af);
- }
+ for (File f : files) {
+ final AtomicFile af = new AtomicFile(f);
+ mSortedStatFiles[i].put(UsageStatsXml.parseBeginTime(af), af);
}
}
}
@@ -135,6 +161,38 @@ class UsageStatsDatabase {
}
}
+ public void onTimeChanged(long timeDiffMillis) {
+ synchronized (mLock) {
+ for (TimeSparseArray<AtomicFile> files : mSortedStatFiles) {
+ final int fileCount = files.size();
+ for (int i = 0; i < fileCount; i++) {
+ final AtomicFile file = files.valueAt(i);
+ final long newTime = files.keyAt(i) + timeDiffMillis;
+ if (newTime < 0) {
+ Slog.i(TAG, "Deleting file " + file.getBaseFile().getAbsolutePath()
+ + " for it is in the future now.");
+ file.delete();
+ } else {
+ try {
+ file.openRead().close();
+ } catch (IOException e) {
+ // Ignore, this is just to make sure there are no backups.
+ }
+ final File newFile = new File(file.getBaseFile().getParentFile(),
+ Long.toString(newTime));
+ Slog.i(TAG, "Moving file " + file.getBaseFile().getAbsolutePath() + " to "
+ + newFile.getAbsolutePath());
+ file.getBaseFile().renameTo(newFile);
+ }
+ }
+ files.clear();
+ }
+
+ // Now re-index the new files.
+ indexFilesLocked();
+ }
+ }
+
/**
* Get the latest stats that exist for this interval type.
*/
@@ -296,25 +354,24 @@ class UsageStatsDatabase {
/**
* Remove any usage stat files that are too old.
*/
- public void prune() {
+ public void prune(final long currentTimeMillis) {
synchronized (mLock) {
- long timeNow = System.currentTimeMillis();
- mCal.setTimeInMillis(timeNow);
+ mCal.setTimeInMillis(currentTimeMillis);
mCal.addYears(-3);
pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_YEARLY],
mCal.getTimeInMillis());
- mCal.setTimeInMillis(timeNow);
+ mCal.setTimeInMillis(currentTimeMillis);
mCal.addMonths(-6);
pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_MONTHLY],
mCal.getTimeInMillis());
- mCal.setTimeInMillis(timeNow);
+ mCal.setTimeInMillis(currentTimeMillis);
mCal.addWeeks(-4);
pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_WEEKLY],
mCal.getTimeInMillis());
- mCal.setTimeInMillis(timeNow);
+ mCal.setTimeInMillis(currentTimeMillis);
mCal.addDays(-7);
pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_DAILY],
mCal.getTimeInMillis());
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 2dcdcc40014a..2ed974505de3 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -33,6 +33,7 @@ import android.content.pm.ParceledListSlice;
import android.content.pm.UserInfo;
import android.content.res.Configuration;
import android.os.Binder;
+import android.os.Debug;
import android.os.Environment;
import android.os.Handler;
import android.os.Looper;
@@ -64,6 +65,7 @@ public class UsageStatsService extends SystemService implements
private static final long TEN_SECONDS = 10 * 1000;
private static final long TWENTY_MINUTES = 20 * 60 * 1000;
private static final long FLUSH_INTERVAL = DEBUG ? TEN_SECONDS : TWENTY_MINUTES;
+ private static final long TIME_CHANGE_THRESHOLD_MILLIS = 2 * 1000; // Two seconds.
// Handler message types.
static final int MSG_REPORT_EVENT = 0;
@@ -170,18 +172,47 @@ public class UsageStatsService extends SystemService implements
}
}
- private UserUsageStatsService getUserDataAndInitializeIfNeededLocked(int userId) {
+ private UserUsageStatsService getUserDataAndInitializeIfNeededLocked(int userId,
+ long currentTimeMillis) {
UserUsageStatsService service = mUserState.get(userId);
if (service == null) {
service = new UserUsageStatsService(userId,
new File(mUsageStatsDir, Integer.toString(userId)), this);
- service.init();
+ service.init(currentTimeMillis);
mUserState.put(userId, service);
}
return service;
}
/**
+ * This should be the only way to get the time from the system.
+ */
+ private long checkAndGetTimeLocked() {
+ final long actualSystemTime = System.currentTimeMillis();
+ final long actualRealtime = SystemClock.elapsedRealtime();
+ final long expectedSystemTime = (actualRealtime - mRealTimeSnapshot) + mSystemTimeSnapshot;
+ if (Math.abs(actualSystemTime - expectedSystemTime) > TIME_CHANGE_THRESHOLD_MILLIS) {
+ // The time has changed.
+ final int userCount = mUserState.size();
+ for (int i = 0; i < userCount; i++) {
+ final UserUsageStatsService service = mUserState.valueAt(i);
+ service.onTimeChanged(expectedSystemTime, actualSystemTime);
+ }
+ mRealTimeSnapshot = actualRealtime;
+ mSystemTimeSnapshot = actualSystemTime;
+ }
+ return actualSystemTime;
+ }
+
+ /**
+ * Assuming the event's timestamp is measured in milliseconds since boot,
+ * convert it to a system wall time.
+ */
+ private void convertToSystemTimeLocked(UsageEvents.Event event) {
+ event.mTimeStamp = Math.max(0, event.mTimeStamp - mRealTimeSnapshot) + mSystemTimeSnapshot;
+ }
+
+ /**
* Called by the Binder stub
*/
void shutdown() {
@@ -196,7 +227,11 @@ public class UsageStatsService extends SystemService implements
*/
void reportEvent(UsageEvents.Event event, int userId) {
synchronized (mLock) {
- final UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
+ final long timeNow = checkAndGetTimeLocked();
+ convertToSystemTimeLocked(event);
+
+ final UserUsageStatsService service =
+ getUserDataAndInitializeIfNeededLocked(userId, timeNow);
service.reportEvent(event);
}
}
@@ -225,12 +260,14 @@ public class UsageStatsService extends SystemService implements
* Called by the Binder stub.
*/
List<UsageStats> queryUsageStats(int userId, int bucketType, long beginTime, long endTime) {
- if (!validRange(beginTime, endTime)) {
- return null;
- }
-
synchronized (mLock) {
- UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
+ final long timeNow = checkAndGetTimeLocked();
+ if (!validRange(timeNow, beginTime, endTime)) {
+ return null;
+ }
+
+ final UserUsageStatsService service =
+ getUserDataAndInitializeIfNeededLocked(userId, timeNow);
return service.queryUsageStats(bucketType, beginTime, endTime);
}
}
@@ -240,12 +277,14 @@ public class UsageStatsService extends SystemService implements
*/
List<ConfigurationStats> queryConfigurationStats(int userId, int bucketType, long beginTime,
long endTime) {
- if (!validRange(beginTime, endTime)) {
- return null;
- }
-
synchronized (mLock) {
- UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
+ final long timeNow = checkAndGetTimeLocked();
+ if (!validRange(timeNow, beginTime, endTime)) {
+ return null;
+ }
+
+ final UserUsageStatsService service =
+ getUserDataAndInitializeIfNeededLocked(userId, timeNow);
return service.queryConfigurationStats(bucketType, beginTime, endTime);
}
}
@@ -254,19 +293,20 @@ public class UsageStatsService extends SystemService implements
* Called by the Binder stub.
*/
UsageEvents queryEvents(int userId, long beginTime, long endTime) {
- if (!validRange(beginTime, endTime)) {
- return null;
- }
-
synchronized (mLock) {
- UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
+ final long timeNow = checkAndGetTimeLocked();
+ if (!validRange(timeNow, beginTime, endTime)) {
+ return null;
+ }
+
+ final UserUsageStatsService service =
+ getUserDataAndInitializeIfNeededLocked(userId, timeNow);
return service.queryEvents(beginTime, endTime);
}
}
- private static boolean validRange(long beginTime, long endTime) {
- final long timeNow = System.currentTimeMillis();
- return beginTime <= timeNow && beginTime < endTime;
+ private static boolean validRange(long currentTime, long beginTime, long endTime) {
+ return beginTime <= currentTime && beginTime < endTime;
}
private void flushToDiskLocked() {
@@ -386,14 +426,6 @@ public class UsageStatsService extends SystemService implements
*/
private class LocalService extends UsageStatsManagerInternal {
- /**
- * The system may have its time change, so at least make sure the events
- * are monotonic in order.
- */
- private long computeMonotonicSystemTime(long realTime) {
- return (realTime - mRealTimeSnapshot) + mSystemTimeSnapshot;
- }
-
@Override
public void reportEvent(ComponentName component, int userId, int eventType) {
if (component == null) {
@@ -404,7 +436,10 @@ public class UsageStatsService extends SystemService implements
UsageEvents.Event event = new UsageEvents.Event();
event.mPackage = component.getPackageName();
event.mClass = component.getClassName();
- event.mTimeStamp = computeMonotonicSystemTime(SystemClock.elapsedRealtime());
+
+ // This will later be converted to system time.
+ event.mTimeStamp = SystemClock.elapsedRealtime();
+
event.mEventType = eventType;
mHandler.obtainMessage(MSG_REPORT_EVENT, userId, 0, event).sendToTarget();
}
@@ -418,7 +453,10 @@ public class UsageStatsService extends SystemService implements
UsageEvents.Event event = new UsageEvents.Event();
event.mPackage = "android";
- event.mTimeStamp = computeMonotonicSystemTime(SystemClock.elapsedRealtime());
+
+ // This will later be converted to system time.
+ event.mTimeStamp = SystemClock.elapsedRealtime();
+
event.mEventType = UsageEvents.Event.CONFIGURATION_CHANGE;
event.mConfiguration = new Configuration(config);
mHandler.obtainMessage(MSG_REPORT_EVENT, userId, 0, event).sendToTarget();
diff --git a/services/usage/java/com/android/server/usage/UserUsageStatsService.java b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
index 2769666cb62a..4916ec2c8612 100644
--- a/services/usage/java/com/android/server/usage/UserUsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
@@ -22,6 +22,7 @@ import android.app.usage.UsageEvents;
import android.app.usage.UsageStats;
import android.app.usage.UsageStatsManager;
import android.content.res.Configuration;
+import android.os.SystemClock;
import android.util.ArraySet;
import android.util.Slog;
@@ -62,10 +63,9 @@ class UserUsageStatsService {
mLogPrefix = "User[" + Integer.toString(userId) + "] ";
}
- void init() {
- mDatabase.init();
+ void init(final long currentTimeMillis) {
+ mDatabase.init(currentTimeMillis);
- final long timeNow = System.currentTimeMillis();
int nullCount = 0;
for (int i = 0; i < mCurrentStats.length; i++) {
mCurrentStats[i] = mDatabase.getLatestUsageStats(i);
@@ -73,11 +73,6 @@ class UserUsageStatsService {
// Find out how many intervals we don't have data for.
// Ideally it should be all or none.
nullCount++;
- } else if (mCurrentStats[i].beginTime > timeNow) {
- Slog.e(TAG, mLogPrefix + "Interval " + i + " has stat in the future " +
- mCurrentStats[i].beginTime);
- mCurrentStats[i] = null;
- nullCount++;
}
}
@@ -92,7 +87,7 @@ class UserUsageStatsService {
// By calling loadActiveStats, we will
// generate new stats for each bucket.
- loadActiveStats();
+ loadActiveStats(currentTimeMillis, false);
} else {
// Set up the expiry date to be one day from the latest daily stat.
// This may actually be today and we will rollover on the first event
@@ -123,6 +118,12 @@ class UserUsageStatsService {
}
}
+ void onTimeChanged(long oldTime, long newTime) {
+ persistActiveStats();
+ mDatabase.onTimeChanged(newTime - oldTime);
+ loadActiveStats(newTime, true);
+ }
+
void reportEvent(UsageEvents.Event event) {
if (DEBUG) {
Slog.d(TAG, mLogPrefix + "Got usage event for " + event.mPackage
@@ -132,7 +133,7 @@ class UserUsageStatsService {
if (event.mTimeStamp >= mDailyExpiryDate.getTimeInMillis()) {
// Need to rollover
- rolloverStats();
+ rolloverStats(event.mTimeStamp);
}
final IntervalStats currentDailyStats = mCurrentStats[UsageStatsManager.INTERVAL_DAILY];
@@ -330,8 +331,8 @@ class UserUsageStatsService {
}
}
- private void rolloverStats() {
- final long startTime = System.currentTimeMillis();
+ private void rolloverStats(final long currentTimeMillis) {
+ final long startTime = SystemClock.elapsedRealtime();
Slog.i(TAG, mLogPrefix + "Rolling over usage stats");
// Finish any ongoing events with an END_OF_DAY event. Make a note of which components
@@ -348,7 +349,7 @@ class UserUsageStatsService {
continuePreviousDay.add(pkgStats.mPackageName);
stat.update(pkgStats.mPackageName, mDailyExpiryDate.getTimeInMillis() - 1,
UsageEvents.Event.END_OF_DAY);
- mStatsChanged = true;
+ notifyStatsChanged();
}
}
@@ -356,8 +357,8 @@ class UserUsageStatsService {
}
persistActiveStats();
- mDatabase.prune();
- loadActiveStats();
+ mDatabase.prune(currentTimeMillis);
+ loadActiveStats(currentTimeMillis, false);
final int continueCount = continuePreviousDay.size();
for (int i = 0; i < continueCount; i++) {
@@ -366,12 +367,12 @@ class UserUsageStatsService {
for (IntervalStats stat : mCurrentStats) {
stat.update(name, beginTime, UsageEvents.Event.CONTINUE_PREVIOUS_DAY);
stat.updateConfigurationStats(previousConfig, beginTime);
- mStatsChanged = true;
+ notifyStatsChanged();
}
}
persistActiveStats();
- final long totalTime = System.currentTimeMillis() - startTime;
+ final long totalTime = SystemClock.elapsedRealtime() - startTime;
Slog.i(TAG, mLogPrefix + "Rolling over usage stats complete. Took " + totalTime
+ " milliseconds");
}
@@ -383,15 +384,16 @@ class UserUsageStatsService {
}
}
- private void loadActiveStats() {
- final long timeNow = System.currentTimeMillis();
-
+ /**
+ * @param force To force all in-memory stats to be reloaded.
+ */
+ private void loadActiveStats(final long currentTimeMillis, boolean force) {
final UnixCalendar tempCal = mDailyExpiryDate;
for (int intervalType = 0; intervalType < mCurrentStats.length; intervalType++) {
- tempCal.setTimeInMillis(timeNow);
+ tempCal.setTimeInMillis(currentTimeMillis);
UnixCalendar.truncateTo(tempCal, intervalType);
- if (mCurrentStats[intervalType] != null &&
+ if (!force && mCurrentStats[intervalType] != null &&
mCurrentStats[intervalType].beginTime == tempCal.getTimeInMillis()) {
// These are the same, no need to load them (in memory stats are always newer
// than persisted stats).
@@ -399,11 +401,7 @@ class UserUsageStatsService {
}
final long lastBeginTime = mDatabase.getLatestUsageStatsBeginTime(intervalType);
- if (lastBeginTime > timeNow) {
- Slog.e(TAG, mLogPrefix + "Latest usage stats for interval " +
- intervalType + " begins in the future");
- mCurrentStats[intervalType] = null;
- } else if (lastBeginTime >= tempCal.getTimeInMillis()) {
+ if (lastBeginTime >= tempCal.getTimeInMillis()) {
if (DEBUG) {
Slog.d(TAG, mLogPrefix + "Loading existing stats @ " +
sDateFormat.format(lastBeginTime) + "(" + lastBeginTime +
@@ -423,11 +421,11 @@ class UserUsageStatsService {
}
mCurrentStats[intervalType] = new IntervalStats();
mCurrentStats[intervalType].beginTime = tempCal.getTimeInMillis();
- mCurrentStats[intervalType].endTime = timeNow;
+ mCurrentStats[intervalType].endTime = currentTimeMillis;
}
}
mStatsChanged = false;
- mDailyExpiryDate.setTimeInMillis(timeNow);
+ mDailyExpiryDate.setTimeInMillis(currentTimeMillis);
mDailyExpiryDate.addDays(1);
mDailyExpiryDate.truncateToDay();
Slog.i(TAG, mLogPrefix + "Rollover scheduled @ " +
diff --git a/telecomm/java/android/telecomm/AudioState.aidl b/telecomm/java/android/telecom/AudioState.aidl
index 03772b6614a4..b36e2388aeec 100644
--- a/telecomm/java/android/telecomm/AudioState.aidl
+++ b/telecomm/java/android/telecom/AudioState.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/AudioState.java b/telecomm/java/android/telecom/AudioState.java
index 314704b8cda6..d0e286042461 100644
--- a/telecomm/java/android/telecomm/AudioState.java
+++ b/telecomm/java/android/telecom/AudioState.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecom/Call.java
index c3aa2a00cf93..1d33b3bca11e 100644
--- a/telecomm/java/android/telecomm/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -14,10 +14,9 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.annotation.SystemApi;
-import android.app.PendingIntent;
import android.net.Uri;
import android.os.Bundle;
import android.telephony.DisconnectCause;
@@ -108,7 +107,7 @@ public final class Call {
/**
* @return The presentation requirements for the handle. See
- * {@link PropertyPresentation} for valid values.
+ * {@link TelecomManager} for valid values.
*/
public int getHandlePresentation() {
return mHandlePresentation;
@@ -123,7 +122,7 @@ public final class Call {
/**
* @return The presentation requirements for the caller display name. See
- * {@link PropertyPresentation} for valid values.
+ * {@link TelecomManager} for valid values.
*/
public int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
@@ -193,7 +192,7 @@ public final class Call {
}
/**
- * @return The current {@link android.telecomm.StatusHints}, or {@code null} if none
+ * @return The current {@link android.telecom.StatusHints}, or {@code null} if none
* have been set.
*/
public StatusHints getStatusHints() {
@@ -369,7 +368,7 @@ public final class Call {
}
private final Phone mPhone;
- private final String mTelecommCallId;
+ private final String mTelecomCallId;
private final InCallAdapter mInCallAdapter;
private final List<String> mChildrenIds = new ArrayList<>();
private final List<Call> mChildren = new ArrayList<>();
@@ -402,7 +401,7 @@ public final class Call {
* @param videoState The video state in which to answer the call.
*/
public void answer(int videoState) {
- mInCallAdapter.answerCall(mTelecommCallId, videoState);
+ mInCallAdapter.answerCall(mTelecomCallId, videoState);
}
/**
@@ -412,28 +411,28 @@ public final class Call {
* @param textMessage An optional text message with which to respond.
*/
public void reject(boolean rejectWithMessage, String textMessage) {
- mInCallAdapter.rejectCall(mTelecommCallId, rejectWithMessage, textMessage);
+ mInCallAdapter.rejectCall(mTelecomCallId, rejectWithMessage, textMessage);
}
/**
* Instructs this {@code Call} to disconnect.
*/
public void disconnect() {
- mInCallAdapter.disconnectCall(mTelecommCallId);
+ mInCallAdapter.disconnectCall(mTelecomCallId);
}
/**
* Instructs this {@code Call} to go on hold.
*/
public void hold() {
- mInCallAdapter.holdCall(mTelecommCallId);
+ mInCallAdapter.holdCall(mTelecomCallId);
}
/**
* Instructs this {@link #STATE_HOLDING} call to release from hold.
*/
public void unhold() {
- mInCallAdapter.unholdCall(mTelecommCallId);
+ mInCallAdapter.unholdCall(mTelecomCallId);
}
/**
@@ -445,7 +444,7 @@ public final class Call {
* value must be one of {@code '0'} through {@code '9'}, {@code '*'} or {@code '#'}.
*/
public void playDtmfTone(char digit) {
- mInCallAdapter.playDtmfTone(mTelecommCallId, digit);
+ mInCallAdapter.playDtmfTone(mTelecomCallId, digit);
}
/**
@@ -456,7 +455,7 @@ public final class Call {
* currently playing, this method will do nothing.
*/
public void stopDtmfTone() {
- mInCallAdapter.stopDtmfTone(mTelecommCallId);
+ mInCallAdapter.stopDtmfTone(mTelecomCallId);
}
/**
@@ -465,10 +464,10 @@ public final class Call {
* A post-dial DTMF string is a string of digits entered after a phone number, when dialed,
* that are immediately sent as DTMF tones to the recipient as soon as the connection is made.
*
- * If the DTMF string contains a {@link TelecommManager#DTMF_CHARACTER_PAUSE} symbol, this
+ * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_PAUSE} symbol, this
* {@code Call} will temporarily pause playing the tones for a pre-defined period of time.
*
- * If the DTMF string contains a {@link TelecommManager#DTMF_CHARACTER_WAIT} symbol, this
+ * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_WAIT} symbol, this
* {@code Call} will pause playing the tones and notify listeners via
* {@link Listener#onPostDialWait(Call, String)}. At this point, the in-call app
* should display to the user an indication of this state and an affordance to continue
@@ -478,14 +477,7 @@ public final class Call {
* @param proceed Whether or not to continue with the post-dial sequence.
*/
public void postDialContinue(boolean proceed) {
- mInCallAdapter.postDialContinue(mTelecommCallId, proceed);
- }
-
- /**
- * Notifies this {@code Call} that the phone account user interface element was touched.
- */
- public void phoneAccountClicked() {
- mInCallAdapter.phoneAccountClicked(mTelecommCallId);
+ mInCallAdapter.postDialContinue(mTelecomCallId, proceed);
}
/**
@@ -493,7 +485,7 @@ public final class Call {
* an outgoing call.
*/
public void phoneAccountSelected(PhoneAccountHandle accountHandle) {
- mInCallAdapter.phoneAccountSelected(mTelecommCallId, accountHandle);
+ mInCallAdapter.phoneAccountSelected(mTelecomCallId, accountHandle);
}
@@ -504,7 +496,7 @@ public final class Call {
*/
public void conference(Call callToConferenceWith) {
if (callToConferenceWith != null) {
- mInCallAdapter.conference(mTelecommCallId, callToConferenceWith.mTelecommCallId);
+ mInCallAdapter.conference(mTelecomCallId, callToConferenceWith.mTelecomCallId);
}
}
@@ -513,21 +505,21 @@ public final class Call {
* connected.
*/
public void splitFromConference() {
- mInCallAdapter.splitFromConference(mTelecommCallId);
+ mInCallAdapter.splitFromConference(mTelecomCallId);
}
/**
* Merges the calls within this conference. See {@link PhoneCapabilities#MERGE_CONFERENCE}.
*/
public void mergeConference() {
- mInCallAdapter.mergeConference(mTelecommCallId);
+ mInCallAdapter.mergeConference(mTelecomCallId);
}
/**
* Swaps the calls within this conference. See {@link PhoneCapabilities#SWAP_CONFERENCE}.
*/
public void swapConference() {
- mInCallAdapter.swapConference(mTelecommCallId);
+ mInCallAdapter.swapConference(mTelecomCallId);
}
/**
@@ -538,7 +530,7 @@ public final class Call {
*/
public Call getParent() {
if (mParentId != null) {
- return mPhone.internalGetCallByTelecommId(mParentId);
+ return mPhone.internalGetCallByTelecomId(mParentId);
}
return null;
}
@@ -555,7 +547,7 @@ public final class Call {
mChildren.clear();
for(String id : mChildrenIds) {
- Call call = mPhone.internalGetCallByTelecommId(id);
+ Call call = mPhone.internalGetCallByTelecomId(id);
if (call == null) {
// At least one child was still not found, so do not save true for "cached"
mChildrenCached = false;
@@ -639,16 +631,16 @@ public final class Call {
}
/** {@hide} */
- Call(Phone phone, String telecommCallId, InCallAdapter inCallAdapter) {
+ Call(Phone phone, String telecomCallId, InCallAdapter inCallAdapter) {
mPhone = phone;
- mTelecommCallId = telecommCallId;
+ mTelecomCallId = telecomCallId;
mInCallAdapter = inCallAdapter;
mState = STATE_NEW;
}
/** {@hide} */
final String internalGetCallId() {
- return mTelecommCallId;
+ return mTelecomCallId;
}
/** {@hide} */
diff --git a/telecomm/java/android/telecomm/CallProperties.java b/telecomm/java/android/telecom/CallProperties.java
index 90eb0cb63a07..b1b82e233882 100644
--- a/telecomm/java/android/telecomm/CallProperties.java
+++ b/telecomm/java/android/telecom/CallProperties.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package android.telecomm;
+package android.telecom;
/**
* Defines properties of a phone call which may be affected by changes to the call.
diff --git a/telecomm/java/android/telecomm/CallState.java b/telecomm/java/android/telecom/CallState.java
index 0770e260609f..769084794a2d 100644
--- a/telecomm/java/android/telecomm/CallState.java
+++ b/telecomm/java/android/telecom/CallState.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.annotation.SystemApi;
@@ -33,7 +33,7 @@ public final class CallState {
/**
* Indicates that a call is new and not connected. This is used as the default state internally
- * within Telecomm and should not be used between Telecomm and call services. Call services are
+ * within Telecom and should not be used between Telecom and call services. Call services are
* not expected to ever interact with NEW calls, but {@link InCallService}s will see calls in
* this state.
*/
diff --git a/telecomm/java/android/telecomm/CameraCapabilities.aidl b/telecomm/java/android/telecom/CameraCapabilities.aidl
index 08e6f434e37b..c8e0c5e896a5 100644
--- a/telecomm/java/android/telecomm/CameraCapabilities.aidl
+++ b/telecomm/java/android/telecom/CameraCapabilities.aidl
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/CameraCapabilities.java b/telecomm/java/android/telecom/CameraCapabilities.java
index 5f860db06d1f..f968c13aa358 100644
--- a/telecomm/java/android/telecomm/CameraCapabilities.java
+++ b/telecomm/java/android/telecom/CameraCapabilities.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package android.telecomm;
+package android.telecom;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/telecomm/java/android/telecomm/Conference.java b/telecomm/java/android/telecom/Conference.java
index f9c3ac3f2dbd..ca854460fba2 100644
--- a/telecomm/java/android/telecomm/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.telephony.DisconnectCause;
@@ -50,22 +50,47 @@ public abstract class Conference {
private int mCapabilities;
private String mDisconnectMessage;
+ /**
+ * Constructs a new Conference with a mandatory {@link PhoneAccountHandle}
+ *
+ * @param phoneAccount The {@code PhoneAccountHandle} associated with the conference.
+ */
public Conference(PhoneAccountHandle phoneAccount) {
mPhoneAccount = phoneAccount;
}
+ /**
+ * Returns the {@link PhoneAccountHandle} the conference call is being placed through.
+ *
+ * @return A {@code PhoneAccountHandle} object representing the PhoneAccount of the conference.
+ */
public final PhoneAccountHandle getPhoneAccountHandle() {
return mPhoneAccount;
}
+ /**
+ * Returns the list of connections currently associated with the conference call.
+ *
+ * @return A list of {@code Connection} objects which represent the children of the conference.
+ */
public final List<Connection> getConnections() {
return mUnmodifiableChildConnections;
}
+ /**
+ * Gets the state of the conference call. See {@link Connection} for valid values.
+ *
+ * @return A constant representing the state the conference call is currently in.
+ */
public final int getState() {
return mState;
}
+ /**
+ * Returns the capabilities of a conference. See {@link PhoneCapabilities} for valid values.
+ *
+ * @return A bitmask of the {@code PhoneCapabilities} of the conference call.
+ */
public final int getCapabilities() {
return mCapabilities;
}
@@ -135,7 +160,9 @@ public abstract class Conference {
}
/**
- * Sets the capabilities of a conference.
+ * Sets the capabilities of a conference. See {@link PhoneCapabilities} for valid values.
+ *
+ * @param capabilities A bitmask of the {@code PhoneCapabilities} of the conference call.
*/
public final void setCapabilities(int capabilities) {
if (capabilities != mCapabilities) {
@@ -170,7 +197,6 @@ public abstract class Conference {
* Removes the specified connection as a child of this conference.
*
* @param connection The connection to remove.
- * @return True if the connection was successfully removed.
*/
public final void removeConnection(Connection connection) {
Log.d(this, "removing %s from %s", connection, mChildConnections);
diff --git a/telecomm/java/android/telecomm/Connection.java b/telecomm/java/android/telecom/Connection.java
index 03db1c30516b..5f63af3cc17e 100644
--- a/telecomm/java/android/telecomm/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -14,12 +14,11 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
-import com.android.internal.telecomm.IVideoCallback;
-import com.android.internal.telecomm.IVideoProvider;
+import com.android.internal.telecom.IVideoCallback;
+import com.android.internal.telecom.IVideoProvider;
-import android.app.PendingIntent;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
@@ -68,13 +67,13 @@ public abstract class Connection {
/** @hide */
public abstract static class Listener {
public void onStateChanged(Connection c, int state) {}
- public void onHandleChanged(Connection c, Uri newHandle, int presentation) {}
+ public void onAddressChanged(Connection c, Uri newAddress, int presentation) {}
public void onCallerDisplayNameChanged(
Connection c, String callerDisplayName, int presentation) {}
public void onVideoStateChanged(Connection c, int videoState) {}
public void onDisconnected(Connection c, int cause, String message) {}
public void onPostDialWait(Connection c, String remaining) {}
- public void onRequestingRingback(Connection c, boolean ringback) {}
+ public void onRingbackRequested(Connection c, boolean ringback) {}
public void onDestroyed(Connection c) {}
public void onCallCapabilitiesChanged(Connection c, int callCapabilities) {}
public void onVideoProviderChanged(
@@ -464,11 +463,11 @@ public abstract class Connection {
private int mState = STATE_NEW;
private AudioState mAudioState;
- private Uri mHandle;
- private int mHandlePresentation;
+ private Uri mAddress;
+ private int mAddressPresentation;
private String mCallerDisplayName;
private int mCallerDisplayNamePresentation;
- private boolean mRequestingRingback = false;
+ private boolean mRingbackRequested = false;
private int mCallCapabilities;
private VideoProvider mVideoProvider;
private boolean mAudioModeIsVoip;
@@ -485,17 +484,18 @@ public abstract class Connection {
public Connection() {}
/**
- * @return The handle (e.g., phone number) to which this Connection is currently communicating.
+ * @return The address (e.g., phone number) to which this Connection is currently communicating.
*/
- public final Uri getHandle() {
- return mHandle;
+ public final Uri getAddress() {
+ return mAddress;
}
/**
- * @return The {@link PropertyPresentation} which controls how the handle is shown.
+ * @return The presentation requirements for the address.
+ * See {@link TelecomManager} for valid values.
*/
- public final int getHandlePresentation() {
- return mHandlePresentation;
+ public final int getAddressPresentation() {
+ return mAddressPresentation;
}
/**
@@ -506,8 +506,8 @@ public abstract class Connection {
}
/**
- * @return The {@link PropertyPresentation} which controls how the caller display name is
- * shown.
+ * @return The presentation requirements for the handle.
+ * See {@link TelecomManager} for valid values.
*/
public final int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
@@ -555,8 +555,8 @@ public abstract class Connection {
* Returns whether this connection is requesting that the system play a ringback tone
* on its behalf.
*/
- public final boolean isRequestingRingback() {
- return mRequestingRingback;
+ public final boolean isRingbackRequested() {
+ return mRingbackRequested;
}
/**
@@ -624,7 +624,7 @@ public abstract class Connection {
final void setAudioState(AudioState state) {
Log.d(this, "setAudioState %s", state);
mAudioState = state;
- onSetAudioState(state);
+ onAudioStateChanged(state);
}
/**
@@ -661,18 +661,18 @@ public abstract class Connection {
}
/**
- * Sets the value of the {@link #getHandle()} property.
+ * Sets the value of the {@link #getAddress()} property.
*
- * @param handle The new handle.
- * @param presentation The {@link PropertyPresentation} which controls how the handle is
- * shown.
+ * @param address The new address.
+ * @param presentation The presentation requirements for the address.
+ * See {@link TelecomManager} for valid values.
*/
- public final void setHandle(Uri handle, int presentation) {
- Log.d(this, "setHandle %s", handle);
- mHandle = handle;
- mHandlePresentation = presentation;
+ public final void setAddress(Uri address, int presentation) {
+ Log.d(this, "setAddress %s", address);
+ mAddress = address;
+ mAddressPresentation = presentation;
for (Listener l : mListeners) {
- l.onHandleChanged(this, handle, presentation);
+ l.onAddressChanged(this, address, presentation);
}
}
@@ -680,8 +680,8 @@ public abstract class Connection {
* Sets the caller display name (CNAP).
*
* @param callerDisplayName The new display name.
- * @param presentation The {@link PropertyPresentation} which controls how the name is
- * shown.
+ * @param presentation The presentation requirements for the handle.
+ * See {@link TelecomManager} for valid values.
*/
public final void setCallerDisplayName(String callerDisplayName, int presentation) {
Log.d(this, "setCallerDisplayName %s", callerDisplayName);
@@ -715,7 +715,7 @@ public abstract class Connection {
* communicate).
*/
public final void setActive() {
- setRequestingRingback(false);
+ setRingbackRequested(false);
setState(STATE_ACTIVE);
}
@@ -803,11 +803,11 @@ public abstract class Connection {
*
* @param ringback Whether the ringback tone is to be played.
*/
- public final void setRequestingRingback(boolean ringback) {
- if (mRequestingRingback != ringback) {
- mRequestingRingback = ringback;
+ public final void setRingbackRequested(boolean ringback) {
+ if (mRingbackRequested != ringback) {
+ mRingbackRequested = ringback;
for (Listener l : mListeners) {
- l.onRequestingRingback(this, ringback);
+ l.onRingbackRequested(this, ringback);
}
}
}
@@ -945,7 +945,7 @@ public abstract class Connection {
*
* @param state The new call audio state.
*/
- public void onSetAudioState(AudioState state) {}
+ public void onAudioStateChanged(AudioState state) {}
/**
* Notifies this Connection of an internal state change. This method is called after the
@@ -953,7 +953,7 @@ public abstract class Connection {
*
* @param state The new state, one of the {@code STATE_*} constants.
*/
- public void onSetState(int state) {}
+ public void onStateChanged(int state) {}
/**
* Notifies this Connection of a request to play a DTMF tone.
@@ -1021,11 +1021,6 @@ public abstract class Connection {
public void onPostDialContinue(boolean proceed) {}
/**
- * Called when the phone account UI was clicked.
- */
- public void onPhoneAccountClicked() {}
-
- /**
* Merge this connection and the specified connection into a conference call. Once the
* connections are merged, the calls should be added to the an existing or new
* {@code Conference} instance. For new {@code Conference} instances, use
@@ -1068,7 +1063,7 @@ public abstract class Connection {
if (mState != state) {
Log.d(this, "setState: %s", stateToString(state));
mState = state;
- onSetState(state);
+ onStateChanged(state);
for (Listener l : mListeners) {
l.onStateChanged(this, state);
}
diff --git a/telecomm/java/android/telecomm/ConnectionRequest.aidl b/telecomm/java/android/telecom/ConnectionRequest.aidl
index 6081c2247f7b..de39c67def4d 100644
--- a/telecomm/java/android/telecomm/ConnectionRequest.aidl
+++ b/telecomm/java/android/telecom/ConnectionRequest.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/ConnectionRequest.java b/telecomm/java/android/telecom/ConnectionRequest.java
index d5a6aa5c47ed..71b481b89c77 100644
--- a/telecomm/java/android/telecomm/ConnectionRequest.java
+++ b/telecomm/java/android/telecom/ConnectionRequest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.net.Uri;
import android.os.Bundle;
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 39365b62dc2f..cc80e2260d2b 100644
--- a/telecomm/java/android/telecomm/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -14,10 +14,9 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.annotation.SdkConstant;
-import android.app.PendingIntent;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
@@ -29,9 +28,9 @@ import android.os.Message;
import android.telephony.DisconnectCause;
import com.android.internal.os.SomeArgs;
-import com.android.internal.telecomm.IConnectionService;
-import com.android.internal.telecomm.IConnectionServiceAdapter;
-import com.android.internal.telecomm.RemoteServiceCallback;
+import com.android.internal.telecom.IConnectionService;
+import com.android.internal.telecom.IConnectionServiceAdapter;
+import com.android.internal.telecom.RemoteServiceCallback;
import java.util.ArrayList;
import java.util.Collection;
@@ -50,7 +49,7 @@ public abstract class ConnectionService extends Service {
* The {@link Intent} that must be declared as handled by the service.
*/
@SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION)
- public static final String SERVICE_INTERFACE = "android.telecomm.ConnectionService";
+ public static final String SERVICE_INTERFACE = "android.telecom.ConnectionService";
// Flag controlling whether PII is emitted into the logs
private static final boolean PII_DEBUG = Log.isLoggable(android.util.Log.DEBUG);
@@ -69,7 +68,6 @@ public abstract class ConnectionService extends Service {
private static final int MSG_CONFERENCE = 12;
private static final int MSG_SPLIT_FROM_CONFERENCE = 13;
private static final int MSG_ON_POST_DIAL_CONTINUE = 14;
- private static final int MSG_ON_PHONE_ACCOUNT_CLICKED = 15;
private static final int MSG_REMOVE_CONNECTION_SERVICE_ADAPTER = 16;
private static final int MSG_ANSWER_VIDEO = 17;
private static final int MSG_MERGE_CONFERENCE = 18;
@@ -200,11 +198,6 @@ public abstract class ConnectionService extends Service {
args.argi1 = proceed ? 1 : 0;
mHandler.obtainMessage(MSG_ON_POST_DIAL_CONTINUE, args).sendToTarget();
}
-
- @Override
- public void onPhoneAccountClicked(String callId) {
- mHandler.obtainMessage(MSG_ON_PHONE_ACCOUNT_CLICKED, callId).sendToTarget();
- }
};
private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -327,9 +320,6 @@ public abstract class ConnectionService extends Service {
}
break;
}
- case MSG_ON_PHONE_ACCOUNT_CLICKED:
- onPhoneAccountHandleClicked((String) msg.obj);
- break;
default:
break;
}
@@ -400,7 +390,7 @@ public abstract class ConnectionService extends Service {
mAdapter.setOnHold(id);
break;
case Connection.STATE_NEW:
- // Nothing to tell Telecomm
+ // Nothing to tell Telecom
break;
case Connection.STATE_RINGING:
mAdapter.setRinging(id);
@@ -423,9 +413,9 @@ public abstract class ConnectionService extends Service {
}
@Override
- public void onHandleChanged(Connection c, Uri handle, int presentation) {
+ public void onAddressChanged(Connection c, Uri address, int presentation) {
String id = mIdByConnection.get(c);
- mAdapter.setHandle(id, handle, presentation);
+ mAdapter.setAddress(id, address, presentation);
}
@Override
@@ -448,10 +438,10 @@ public abstract class ConnectionService extends Service {
}
@Override
- public void onRequestingRingback(Connection c, boolean ringback) {
+ public void onRingbackRequested(Connection c, boolean ringback) {
String id = mIdByConnection.get(c);
Log.d(this, "Adapter onRingback %b", ringback);
- mAdapter.setRequestingRingback(id, ringback);
+ mAdapter.setRingbackRequested(id, ringback);
}
@Override
@@ -471,7 +461,7 @@ public abstract class ConnectionService extends Service {
@Override
public void onAudioModeIsVoipChanged(Connection c, boolean isVoip) {
String id = mIdByConnection.get(c);
- mAdapter.setAudioModeIsVoip(id, isVoip);
+ mAdapter.setIsVoipAudioMode(id, isVoip);
}
@Override
@@ -507,9 +497,16 @@ public abstract class ConnectionService extends Service {
return mBinder;
}
+ /** {@inheritDoc} */
+ @Override
+ public boolean onUnbind(Intent intent) {
+ endAllConnections();
+ return super.onUnbind(intent);
+ }
+
/**
- * This can be used by telecomm to either create a new outgoing call or attach to an existing
- * incoming call. In either case, telecomm will cycle through a set of services and call
+ * This can be used by telecom to either create a new outgoing call or attach to an existing
+ * incoming call. In either case, telecom will cycle through a set of services and call
* createConnection util a connection service cancels the process or completes it successfully.
*/
private void createConnection(
@@ -532,8 +529,8 @@ public abstract class ConnectionService extends Service {
addConnection(callId, connection);
}
- Uri handle = connection.getHandle();
- String number = handle == null ? "null" : handle.getSchemeSpecificPart();
+ Uri address = connection.getAddress();
+ String number = address == null ? "null" : address.getSchemeSpecificPart();
Log.v(this, "createConnection, number: %s, state: %s, capabilities: %s",
Connection.toLogSafePhoneNumber(number),
Connection.stateToString(connection.getState()),
@@ -547,14 +544,14 @@ public abstract class ConnectionService extends Service {
request.getAccountHandle(),
connection.getState(),
connection.getCallCapabilities(),
- connection.getHandle(),
- connection.getHandlePresentation(),
+ connection.getAddress(),
+ connection.getAddressPresentation(),
connection.getCallerDisplayName(),
connection.getCallerDisplayNamePresentation(),
connection.getVideoProvider() == null ?
null : connection.getVideoProvider().getInterface(),
connection.getVideoState(),
- connection.isRequestingRingback(),
+ connection.isRingbackRequested(),
connection.getAudioModeIsVoip(),
connection.getStatusHints(),
connection.getDisconnectCause(),
@@ -678,11 +675,6 @@ public abstract class ConnectionService extends Service {
findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed);
}
- private void onPhoneAccountHandleClicked(String callId) {
- Log.d(this, "onPhoneAccountClicked %s", callId);
- findConnectionForAction(callId, "onPhoneAccountClicked").onPhoneAccountClicked();
- }
-
private void onAdapterAttached() {
if (mAreAccountsInitialized) {
// No need to query again if we already did it.
@@ -965,4 +957,17 @@ public abstract class ConnectionService extends Service {
}
return sNullConference;
}
+
+ private void endAllConnections() {
+ // Unbound from telecomm. We should end all connections and conferences.
+ for (Connection connection : mIdByConnection.keySet()) {
+ // only operate on top-level calls. Conference calls will be removed on their own.
+ if (connection.getConference() == null) {
+ connection.onDisconnect();
+ }
+ }
+ for (Conference conference : mIdByConference.keySet()) {
+ conference.onDisconnect();
+ }
+ }
}
diff --git a/telecomm/java/android/telecomm/ConnectionServiceAdapter.java b/telecomm/java/android/telecom/ConnectionServiceAdapter.java
index e3dc71389162..f6bcdc66a84f 100644
--- a/telecomm/java/android/telecomm/ConnectionServiceAdapter.java
+++ b/telecomm/java/android/telecom/ConnectionServiceAdapter.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
-import android.app.PendingIntent;
import android.net.Uri;
import android.os.IBinder.DeathRecipient;
import android.os.RemoteException;
-import com.android.internal.telecomm.IConnectionServiceAdapter;
-import com.android.internal.telecomm.RemoteServiceCallback;
+import com.android.internal.telecom.IConnectionServiceAdapter;
+import com.android.internal.telecom.RemoteServiceCallback;
import java.util.Collections;
import java.util.Iterator;
@@ -163,15 +162,15 @@ final class ConnectionServiceAdapter implements DeathRecipient {
}
/**
- * Asks Telecomm to start or stop a ringback tone for a call.
+ * Asks Telecom to start or stop a ringback tone for a call.
*
* @param callId The unique ID of the call whose ringback is being changed.
- * @param ringback Whether Telecomm should start playing a ringback tone.
+ * @param ringback Whether Telecom should start playing a ringback tone.
*/
- void setRequestingRingback(String callId, boolean ringback) {
+ void setRingbackRequested(String callId, boolean ringback) {
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
- adapter.setRequestingRingback(callId, ringback);
+ adapter.setRingbackRequested(callId, ringback);
} catch (RemoteException e) {
}
}
@@ -280,10 +279,10 @@ final class ConnectionServiceAdapter implements DeathRecipient {
* @param callId The unique ID of the call to set with the given call video provider.
* @param isVoip True if the audio mode is VOIP.
*/
- void setAudioModeIsVoip(String callId, boolean isVoip) {
+ void setIsVoipAudioMode(String callId, boolean isVoip) {
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
- adapter.setAudioModeIsVoip(callId, isVoip);
+ adapter.setIsVoipAudioMode(callId, isVoip);
} catch (RemoteException e) {
}
}
@@ -298,10 +297,10 @@ final class ConnectionServiceAdapter implements DeathRecipient {
}
}
- void setHandle(String callId, Uri handle, int presentation) {
+ void setAddress(String callId, Uri address, int presentation) {
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
- adapter.setHandle(callId, handle, presentation);
+ adapter.setAddress(callId, address, presentation);
} catch (RemoteException e) {
}
}
diff --git a/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
index 21e99db0e61b..ffbbc8a653d8 100644
--- a/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java
+++ b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
@@ -14,18 +14,17 @@
R* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
-import android.app.PendingIntent;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
import android.os.RemoteException;
import com.android.internal.os.SomeArgs;
-import com.android.internal.telecomm.IConnectionServiceAdapter;
-import com.android.internal.telecomm.IVideoProvider;
-import com.android.internal.telecomm.RemoteServiceCallback;
+import com.android.internal.telecom.IConnectionServiceAdapter;
+import com.android.internal.telecom.IVideoProvider;
+import com.android.internal.telecom.RemoteServiceCallback;
import java.util.List;
@@ -44,7 +43,7 @@ final class ConnectionServiceAdapterServant {
private static final int MSG_SET_DIALING = 4;
private static final int MSG_SET_DISCONNECTED = 5;
private static final int MSG_SET_ON_HOLD = 6;
- private static final int MSG_SET_REQUESTING_RINGBACK = 7;
+ private static final int MSG_SET_RINGBACK_REQUESTED = 7;
private static final int MSG_SET_CALL_CAPABILITIES = 8;
private static final int MSG_SET_IS_CONFERENCED = 9;
private static final int MSG_ADD_CONFERENCE_CALL = 10;
@@ -53,9 +52,9 @@ final class ConnectionServiceAdapterServant {
private static final int MSG_QUERY_REMOTE_CALL_SERVICES = 13;
private static final int MSG_SET_VIDEO_STATE = 14;
private static final int MSG_SET_VIDEO_CALL_PROVIDER = 15;
- private static final int MSG_SET_AUDIO_MODE_IS_VOIP = 16;
+ private static final int MSG_SET_IS_VOIP_AUDIO_MODE = 16;
private static final int MSG_SET_STATUS_HINTS = 17;
- private static final int MSG_SET_HANDLE = 18;
+ private static final int MSG_SET_ADDRESS = 18;
private static final int MSG_SET_CALLER_DISPLAY_NAME = 19;
private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20;
@@ -107,8 +106,8 @@ final class ConnectionServiceAdapterServant {
case MSG_SET_ON_HOLD:
mDelegate.setOnHold((String) msg.obj);
break;
- case MSG_SET_REQUESTING_RINGBACK:
- mDelegate.setRequestingRingback((String) msg.obj, msg.arg1 == 1);
+ case MSG_SET_RINGBACK_REQUESTED:
+ mDelegate.setRingbackRequested((String) msg.obj, msg.arg1 == 1);
break;
case MSG_SET_CALL_CAPABILITIES:
mDelegate.setCallCapabilities((String) msg.obj, msg.arg1);
@@ -160,8 +159,8 @@ final class ConnectionServiceAdapterServant {
}
break;
}
- case MSG_SET_AUDIO_MODE_IS_VOIP:
- mDelegate.setAudioModeIsVoip((String) msg.obj, msg.arg1 == 1);
+ case MSG_SET_IS_VOIP_AUDIO_MODE:
+ mDelegate.setIsVoipAudioMode((String) msg.obj, msg.arg1 == 1);
break;
case MSG_SET_STATUS_HINTS: {
SomeArgs args = (SomeArgs) msg.obj;
@@ -172,10 +171,10 @@ final class ConnectionServiceAdapterServant {
}
break;
}
- case MSG_SET_HANDLE: {
+ case MSG_SET_ADDRESS: {
SomeArgs args = (SomeArgs) msg.obj;
try {
- mDelegate.setHandle((String) args.arg1, (Uri) args.arg2, args.argi1);
+ mDelegate.setAddress((String) args.arg1, (Uri) args.arg2, args.argi1);
} finally {
args.recycle();
}
@@ -249,8 +248,8 @@ final class ConnectionServiceAdapterServant {
}
@Override
- public void setRequestingRingback(String connectionId, boolean ringback) {
- mHandler.obtainMessage(MSG_SET_REQUESTING_RINGBACK, ringback ? 1 : 0, 0, connectionId)
+ public void setRingbackRequested(String connectionId, boolean ringback) {
+ mHandler.obtainMessage(MSG_SET_RINGBACK_REQUESTED, ringback ? 1 : 0, 0, connectionId)
.sendToTarget();
}
@@ -308,8 +307,8 @@ final class ConnectionServiceAdapterServant {
}
@Override
- public final void setAudioModeIsVoip(String connectionId, boolean isVoip) {
- mHandler.obtainMessage(MSG_SET_AUDIO_MODE_IS_VOIP, isVoip ? 1 : 0, 0,
+ public final void setIsVoipAudioMode(String connectionId, boolean isVoip) {
+ mHandler.obtainMessage(MSG_SET_IS_VOIP_AUDIO_MODE, isVoip ? 1 : 0, 0,
connectionId).sendToTarget();
}
@@ -322,12 +321,12 @@ final class ConnectionServiceAdapterServant {
}
@Override
- public final void setHandle(String connectionId, Uri handle, int presentation) {
+ public final void setAddress(String connectionId, Uri address, int presentation) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId;
- args.arg2 = handle;
+ args.arg2 = address;
args.argi1 = presentation;
- mHandler.obtainMessage(MSG_SET_HANDLE, args).sendToTarget();
+ mHandler.obtainMessage(MSG_SET_ADDRESS, args).sendToTarget();
}
@Override
diff --git a/telecomm/java/android/telecomm/GatewayInfo.aidl b/telecomm/java/android/telecom/GatewayInfo.aidl
index bd810149bdab..ad9858c0bdc6 100644
--- a/telecomm/java/android/telecomm/GatewayInfo.aidl
+++ b/telecomm/java/android/telecom/GatewayInfo.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/GatewayInfo.java b/telecomm/java/android/telecom/GatewayInfo.java
index b95e6b68ad48..583c3e284787 100644
--- a/telecomm/java/android/telecomm/GatewayInfo.java
+++ b/telecomm/java/android/telecom/GatewayInfo.java
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -33,14 +34,15 @@ import android.text.TextUtils;
public class GatewayInfo implements Parcelable {
private final String mGatewayProviderPackageName;
- private final Uri mGatewayHandle;
- private final Uri mOriginalHandle;
+ private final Uri mGatewayAddress;
+ private final Uri mOriginalAddress;
/** @hide */
- public GatewayInfo(String packageName, Uri gatewayUri, Uri originalHandle) {
+ @SystemApi
+ public GatewayInfo(String packageName, Uri gatewayUri, Uri originalAddress) {
mGatewayProviderPackageName = packageName;
- mGatewayHandle = gatewayUri;
- mOriginalHandle = originalHandle;
+ mGatewayAddress = gatewayUri;
+ mOriginalAddress = originalAddress;
}
/**
@@ -51,21 +53,21 @@ public class GatewayInfo implements Parcelable {
}
/**
- * Gateway provider handle to use when actually placing the call.
+ * Gateway provider address to use when actually placing the call.
*/
- public Uri getGatewayHandle() {
- return mGatewayHandle;
+ public Uri getGatewayAddress() {
+ return mGatewayAddress;
}
/**
- * The actual call handle that the user is trying to connect to via the gateway.
+ * The actual call address that the user is trying to connect to via the gateway.
*/
- public Uri getOriginalHandle() {
- return mOriginalHandle;
+ public Uri getOriginalAddress() {
+ return mOriginalAddress;
}
public boolean isEmpty() {
- return TextUtils.isEmpty(mGatewayProviderPackageName) || mGatewayHandle == null;
+ return TextUtils.isEmpty(mGatewayProviderPackageName) || mGatewayAddress == null;
}
/** Implement the Parcelable interface */
@@ -76,8 +78,8 @@ public class GatewayInfo implements Parcelable {
public GatewayInfo createFromParcel(Parcel source) {
String gatewayPackageName = source.readString();
Uri gatewayUri = Uri.CREATOR.createFromParcel(source);
- Uri originalHandle = Uri.CREATOR.createFromParcel(source);
- return new GatewayInfo(gatewayPackageName, gatewayUri, originalHandle);
+ Uri originalAddress = Uri.CREATOR.createFromParcel(source);
+ return new GatewayInfo(gatewayPackageName, gatewayUri, originalAddress);
}
@Override
@@ -100,7 +102,7 @@ public class GatewayInfo implements Parcelable {
@Override
public void writeToParcel(Parcel destination, int flags) {
destination.writeString(mGatewayProviderPackageName);
- mGatewayHandle.writeToParcel(destination, 0);
- mOriginalHandle.writeToParcel(destination, 0);
+ mGatewayAddress.writeToParcel(destination, 0);
+ mOriginalAddress.writeToParcel(destination, 0);
}
}
diff --git a/telecomm/java/android/telecomm/InCallAdapter.java b/telecomm/java/android/telecom/InCallAdapter.java
index 96ea5a61db3e..fd3cf2e12668 100644
--- a/telecomm/java/android/telecomm/InCallAdapter.java
+++ b/telecomm/java/android/telecom/InCallAdapter.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.os.RemoteException;
-import com.android.internal.telecomm.IInCallAdapter;
+import com.android.internal.telecom.IInCallAdapter;
/**
* Receives commands from {@link InCallService} implementations which should be executed by
- * Telecomm. When Telecomm binds to a {@link InCallService}, an instance of this class is given to
+ * Telecom. When Telecom binds to a {@link InCallService}, an instance of this class is given to
* the in-call service through which it can manipulate live (active, dialing, ringing) calls. When
* the in-call service is notified of new calls, it can use the
* given call IDs to execute commands such as {@link #answerCall} for incoming calls or
@@ -44,7 +44,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to answer the specified call.
+ * Instructs Telecom to answer the specified call.
*
* @param callId The identifier of the call to answer.
* @param videoState The video state in which to answer the call.
@@ -57,7 +57,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to reject the specified call.
+ * Instructs Telecom to reject the specified call.
*
* @param callId The identifier of the call to reject.
* @param rejectWithMessage Whether to reject with a text message.
@@ -71,7 +71,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to disconnect the specified call.
+ * Instructs Telecom to disconnect the specified call.
*
* @param callId The identifier of the call to disconnect.
*/
@@ -83,7 +83,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to put the specified call on hold.
+ * Instructs Telecom to put the specified call on hold.
*
* @param callId The identifier of the call to put on hold.
*/
@@ -95,7 +95,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to release the specified call from hold.
+ * Instructs Telecom to release the specified call from hold.
*
* @param callId The identifier of the call to release from hold.
*/
@@ -131,7 +131,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to play a dual-tone multi-frequency signaling (DTMF) tone in a call.
+ * Instructs Telecom to play a dual-tone multi-frequency signaling (DTMF) tone in a call.
*
* Any other currently playing DTMF tone in the specified call is immediately stopped.
*
@@ -147,7 +147,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to stop any dual-tone multi-frequency signaling (DTMF) tone currently
+ * Instructs Telecom to stop any dual-tone multi-frequency signaling (DTMF) tone currently
* playing.
*
* DTMF tones are played by calling {@link #playDtmfTone(String,char)}. If no DTMF tone is
@@ -163,17 +163,17 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to continue playing a post-dial DTMF string.
+ * Instructs Telecom to continue playing a post-dial DTMF string.
*
* A post-dial DTMF string is a string of digits entered after a phone number, when dialed,
* that are immediately sent as DTMF tones to the recipient as soon as the connection is made.
- * While these tones are playing, Telecomm will notify the {@link InCallService} that the call
+ * While these tones are playing, Telecom will notify the {@link InCallService} that the call
* is in the post dial state.
*
- * If the DTMF string contains a {@link TelecommManager#DTMF_CHARACTER_PAUSE} symbol, Telecomm
+ * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_PAUSE} symbol, Telecom
* will temporarily pause playing the tones for a pre-defined period of time.
*
- * If the DTMF string contains a {@link TelecommManager#DTMF_CHARACTER_WAIT} symbol, Telecomm
+ * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_WAIT} symbol, Telecom
* will pause playing the tones and notify the {@link InCallService} that the call is in the
* post dial wait state. When the user decides to continue the postdial sequence, the
* {@link InCallService} should invoke the {@link #postDialContinue(String,boolean)} method.
@@ -189,19 +189,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm that the phone account UI was clicked.
- *
- * @param callId The identifier of the call.
- */
- public void phoneAccountClicked(String callId) {
- try {
- mAdapter.phoneAccountClicked(callId);
- } catch (RemoteException e) {
- }
- }
-
- /**
- * Instructs Telecomm to add a PhoneAccountHandle to the specified call
+ * Instructs Telecom to add a PhoneAccountHandle to the specified call
*
* @param callId The identifier of the call
* @param accountHandle The PhoneAccountHandle through which to place the call
@@ -214,7 +202,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to conference the specified call.
+ * Instructs Telecom to conference the specified call.
*
* @param callId The unique ID of the call.
* @hide
@@ -227,7 +215,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to split the specified call from any conference call with which it may be
+ * Instructs Telecom to split the specified call from any conference call with which it may be
* connected.
*
* @param callId The unique ID of the call.
@@ -241,7 +229,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to merge child calls of the specified conference call.
+ * Instructs Telecom to merge child calls of the specified conference call.
*/
public void mergeConference(String callId) {
try {
@@ -251,7 +239,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to swap the child calls of the specified conference call.
+ * Instructs Telecom to swap the child calls of the specified conference call.
*/
public void swapConference(String callId) {
try {
@@ -261,7 +249,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to turn the proximity sensor on.
+ * Instructs Telecom to turn the proximity sensor on.
*/
public void turnProximitySensorOn() {
try {
@@ -271,7 +259,7 @@ public final class InCallAdapter {
}
/**
- * Instructs Telecomm to turn the proximity sensor off.
+ * Instructs Telecom to turn the proximity sensor off.
*
* @param screenOnImmediately If true, the screen will be turned on immediately if it was
* previously off. Otherwise, the screen will only be turned on after the proximity sensor
diff --git a/telecomm/java/android/telecomm/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index 51cd537c5477..fa12756cc52b 100644
--- a/telecomm/java/android/telecomm/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -14,11 +14,10 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.annotation.SystemApi;
import android.annotation.SdkConstant;
-import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.os.Handler;
@@ -28,14 +27,14 @@ import android.os.Message;
import android.view.Surface;
import com.android.internal.os.SomeArgs;
-import com.android.internal.telecomm.IInCallAdapter;
-import com.android.internal.telecomm.IInCallService;
+import com.android.internal.telecom.IInCallAdapter;
+import com.android.internal.telecom.IInCallService;
import java.lang.String;
/**
* This service is implemented by any app that wishes to provide the user-interface for managing
- * phone calls. Telecomm binds to this service while there exists a live (active or incoming) call,
+ * phone calls. Telecom binds to this service while there exists a live (active or incoming) call,
* and uses it to notify the in-call app of any live and and recently disconnected calls.
*
* {@hide}
@@ -47,7 +46,7 @@ public abstract class InCallService extends Service {
* The {@link Intent} that must be declared as handled by the service.
*/
@SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION)
- public static final String SERVICE_INTERFACE = "android.telecomm.InCallService";
+ public static final String SERVICE_INTERFACE = "android.telecom.InCallService";
private static final int MSG_SET_IN_CALL_ADAPTER = 1;
private static final int MSG_ADD_CALL = 2;
diff --git a/telecomm/java/android/telecomm/Log.java b/telecomm/java/android/telecom/Log.java
index 446ae7560600..73cc4a5f6138 100644
--- a/telecomm/java/android/telecomm/Log.java
+++ b/telecomm/java/android/telecom/Log.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -28,8 +28,8 @@ import java.util.Locale;
*/
final public class Log {
- // Generic tag for all Telecomm Framework logging
- private static final String TAG = "TelecommFramework";
+ // Generic tag for all Telecom Framework logging
+ private static final String TAG = "TelecomFramework";
public static final boolean FORCE_LOGGING = false; /* STOP SHIP if true */
public static final boolean DEBUG = isLoggable(android.util.Log.DEBUG);
diff --git a/telecomm/java/android/telecomm/ParcelableCall.aidl b/telecomm/java/android/telecom/ParcelableCall.aidl
index 18691d267562..480e82fd7540 100644
--- a/telecomm/java/android/telecomm/ParcelableCall.aidl
+++ b/telecomm/java/android/telecom/ParcelableCall.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/ParcelableCall.java b/telecomm/java/android/telecom/ParcelableCall.java
index a2aa192c1dc4..838c7cf22c5a 100644
--- a/telecomm/java/android/telecomm/ParcelableCall.java
+++ b/telecomm/java/android/telecom/ParcelableCall.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.net.Uri;
import android.os.Bundle;
@@ -27,10 +27,10 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import com.android.internal.telecomm.IVideoProvider;
+import com.android.internal.telecom.IVideoProvider;
/**
- * Information about a call that is used between InCallService and Telecomm.
+ * Information about a call that is used between InCallService and Telecom.
* @hide
*/
public final class ParcelableCall implements Parcelable {
@@ -153,7 +153,9 @@ public final class ParcelableCall implements Parcelable {
return mHandle;
}
- /** The {@link PropertyPresentation} which controls how the handle is shown. */
+ /**
+ * The presentation requirements for the handle. See {@link TelecomManager} for valid values.
+ */
public int getHandlePresentation() {
return mHandlePresentation;
}
@@ -163,7 +165,10 @@ public final class ParcelableCall implements Parcelable {
return mCallerDisplayName;
}
- /** The {@link PropertyPresentation} which controls how the caller display name is shown. */
+ /**
+ * The presentation requirements for the caller display name.
+ * See {@link TelecomManager} for valid values.
+ */
public int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
}
diff --git a/telecomm/java/android/telecomm/ParcelableConference.aidl b/telecomm/java/android/telecom/ParcelableConference.aidl
index a26008587792..155ba9482ea0 100644
--- a/telecomm/java/android/telecomm/ParcelableConference.aidl
+++ b/telecomm/java/android/telecom/ParcelableConference.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
parcelable ParcelableConference;
diff --git a/telecomm/java/android/telecomm/ParcelableConference.java b/telecomm/java/android/telecom/ParcelableConference.java
index b2798613935d..97c709c774e8 100644
--- a/telecomm/java/android/telecomm/ParcelableConference.java
+++ b/telecomm/java/android/telecom/ParcelableConference.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/telecomm/java/android/telecomm/ParcelableConnection.aidl b/telecomm/java/android/telecom/ParcelableConnection.aidl
index 143c5a6133d8..e91ebc331e05 100644
--- a/telecomm/java/android/telecomm/ParcelableConnection.aidl
+++ b/telecomm/java/android/telecom/ParcelableConnection.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/ParcelableConnection.java b/telecomm/java/android/telecom/ParcelableConnection.java
index 2e21d3777df5..63393b250389 100644
--- a/telecomm/java/android/telecomm/ParcelableConnection.java
+++ b/telecomm/java/android/telecom/ParcelableConnection.java
@@ -14,20 +14,20 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
-import com.android.internal.telecomm.IVideoProvider;
+import com.android.internal.telecom.IVideoProvider;
import java.util.ArrayList;
import java.util.List;
/**
- * Information about a connection that is used between Telecomm and the ConnectionService.
- * This is used to send initial Connection information to Telecomm when the connection is
+ * Information about a connection that is used between Telecom and the ConnectionService.
+ * This is used to send initial Connection information to Telecom when the connection is
* first created.
* @hide
*/
@@ -35,14 +35,14 @@ public final class ParcelableConnection implements Parcelable {
private final PhoneAccountHandle mPhoneAccount;
private final int mState;
private final int mCapabilities;
- private final Uri mHandle;
- private final int mHandlePresentation;
+ private final Uri mAddress;
+ private final int mAddressPresentation;
private final String mCallerDisplayName;
private final int mCallerDisplayNamePresentation;
private final IVideoProvider mVideoProvider;
private final int mVideoState;
- private final boolean mRequestingRingback;
- private final boolean mAudioModeIsVoip;
+ private final boolean mRingbackRequested;
+ private final boolean mIsVoipAudioMode;
private final StatusHints mStatusHints;
private final int mDisconnectCause;
private final String mDisconnectMessage;
@@ -53,14 +53,14 @@ public final class ParcelableConnection implements Parcelable {
PhoneAccountHandle phoneAccount,
int state,
int capabilities,
- Uri handle,
- int handlePresentation,
+ Uri address,
+ int addressPresentation,
String callerDisplayName,
int callerDisplayNamePresentation,
IVideoProvider videoProvider,
int videoState,
- boolean requestingRingback,
- boolean audioModeIsVoip,
+ boolean ringbackRequested,
+ boolean isVoipAudioMode,
StatusHints statusHints,
int disconnectCause,
String disconnectMessage,
@@ -68,14 +68,14 @@ public final class ParcelableConnection implements Parcelable {
mPhoneAccount = phoneAccount;
mState = state;
mCapabilities = capabilities;
- mHandle = handle;
- mHandlePresentation = handlePresentation;
+ mAddress = address;
+ mAddressPresentation = addressPresentation;
mCallerDisplayName = callerDisplayName;
mCallerDisplayNamePresentation = callerDisplayNamePresentation;
mVideoProvider = videoProvider;
mVideoState = videoState;
- mRequestingRingback = requestingRingback;
- mAudioModeIsVoip = audioModeIsVoip;
+ mRingbackRequested = ringbackRequested;
+ mIsVoipAudioMode = isVoipAudioMode;
mStatusHints = statusHints;
mDisconnectCause = disconnectCause;
mDisconnectMessage = disconnectMessage;
@@ -96,11 +96,11 @@ public final class ParcelableConnection implements Parcelable {
}
public Uri getHandle() {
- return mHandle;
+ return mAddress;
}
public int getHandlePresentation() {
- return mHandlePresentation;
+ return mAddressPresentation;
}
public String getCallerDisplayName() {
@@ -119,12 +119,12 @@ public final class ParcelableConnection implements Parcelable {
return mVideoState;
}
- public boolean isRequestingRingback() {
- return mRequestingRingback;
+ public boolean isRingbackRequested() {
+ return mRingbackRequested;
}
- public boolean getAudioModeIsVoip() {
- return mAudioModeIsVoip;
+ public boolean getIsVoipAudioMode() {
+ return mIsVoipAudioMode;
}
public final StatusHints getStatusHints() {
@@ -164,14 +164,14 @@ public final class ParcelableConnection implements Parcelable {
PhoneAccountHandle phoneAccount = source.readParcelable(classLoader);
int state = source.readInt();
int capabilities = source.readInt();
- Uri handle = source.readParcelable(classLoader);
- int handlePresentation = source.readInt();
+ Uri address = source.readParcelable(classLoader);
+ int addressPresentation = source.readInt();
String callerDisplayName = source.readString();
int callerDisplayNamePresentation = source.readInt();
IVideoProvider videoCallProvider =
IVideoProvider.Stub.asInterface(source.readStrongBinder());
int videoState = source.readInt();
- boolean requestingRingback = source.readByte() == 1;
+ boolean ringbackRequested = source.readByte() == 1;
boolean audioModeIsVoip = source.readByte() == 1;
StatusHints statusHints = source.readParcelable(classLoader);
int disconnectCauseCode = source.readInt();
@@ -183,13 +183,13 @@ public final class ParcelableConnection implements Parcelable {
phoneAccount,
state,
capabilities,
- handle,
- handlePresentation,
+ address,
+ addressPresentation,
callerDisplayName,
callerDisplayNamePresentation,
videoCallProvider,
videoState,
- requestingRingback,
+ ringbackRequested,
audioModeIsVoip,
statusHints,
disconnectCauseCode,
@@ -215,15 +215,15 @@ public final class ParcelableConnection implements Parcelable {
destination.writeParcelable(mPhoneAccount, 0);
destination.writeInt(mState);
destination.writeInt(mCapabilities);
- destination.writeParcelable(mHandle, 0);
- destination.writeInt(mHandlePresentation);
+ destination.writeParcelable(mAddress, 0);
+ destination.writeInt(mAddressPresentation);
destination.writeString(mCallerDisplayName);
destination.writeInt(mCallerDisplayNamePresentation);
destination.writeStrongBinder(
mVideoProvider != null ? mVideoProvider.asBinder() : null);
destination.writeInt(mVideoState);
- destination.writeByte((byte) (mRequestingRingback ? 1 : 0));
- destination.writeByte((byte) (mAudioModeIsVoip ? 1 : 0));
+ destination.writeByte((byte) (mRingbackRequested ? 1 : 0));
+ destination.writeByte((byte) (mIsVoipAudioMode ? 1 : 0));
destination.writeParcelable(mStatusHints, 0);
destination.writeInt(mDisconnectCause);
destination.writeString(mDisconnectMessage);
diff --git a/telecomm/java/android/telecomm/Phone.java b/telecomm/java/android/telecom/Phone.java
index 8831f8f00fc4..5131790e5332 100644
--- a/telecomm/java/android/telecomm/Phone.java
+++ b/telecomm/java/android/telecom/Phone.java
@@ -14,10 +14,9 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.annotation.SystemApi;
-import android.app.PendingIntent;
import android.util.ArrayMap;
import java.util.Collections;
@@ -77,8 +76,8 @@ public final class Phone {
public void onCallRemoved(Phone phone, Call call) { }
}
- // A Map allows us to track each Call by its Telecomm-specified call ID
- private final Map<String, Call> mCallByTelecommCallId = new ArrayMap<>();
+ // A Map allows us to track each Call by its Telecom-specified call ID
+ private final Map<String, Call> mCallByTelecomCallId = new ArrayMap<>();
// A List allows us to keep the Calls in a stable iteration order so that casually developed
// user interface components do not incur any spurious jank
@@ -101,32 +100,32 @@ public final class Phone {
/** {@hide} */
final void internalAddCall(ParcelableCall parcelableCall) {
Call call = new Call(this, parcelableCall.getId(), mInCallAdapter);
- mCallByTelecommCallId.put(parcelableCall.getId(), call);
+ mCallByTelecomCallId.put(parcelableCall.getId(), call);
mCalls.add(call);
checkCallTree(parcelableCall);
- call.internalUpdate(parcelableCall, mCallByTelecommCallId);
+ call.internalUpdate(parcelableCall, mCallByTelecomCallId);
fireCallAdded(call);
}
/** {@hide} */
final void internalRemoveCall(Call call) {
- mCallByTelecommCallId.remove(call.internalGetCallId());
+ mCallByTelecomCallId.remove(call.internalGetCallId());
mCalls.remove(call);
fireCallRemoved(call);
}
/** {@hide} */
final void internalUpdateCall(ParcelableCall parcelableCall) {
- Call call = mCallByTelecommCallId.get(parcelableCall.getId());
+ Call call = mCallByTelecomCallId.get(parcelableCall.getId());
if (call != null) {
checkCallTree(parcelableCall);
- call.internalUpdate(parcelableCall, mCallByTelecommCallId);
+ call.internalUpdate(parcelableCall, mCallByTelecomCallId);
}
}
/** {@hide} */
- final void internalSetPostDialWait(String telecommId, String remaining) {
- Call call = mCallByTelecommCallId.get(telecommId);
+ final void internalSetPostDialWait(String telecomId, String remaining) {
+ Call call = mCallByTelecomCallId.get(telecomId);
if (call != null) {
call.internalSetPostDialWait(remaining);
}
@@ -141,8 +140,8 @@ public final class Phone {
}
/** {@hide} */
- final Call internalGetCallByTelecommId(String telecommId) {
- return mCallByTelecommCallId.get(telecommId);
+ final Call internalGetCallByTelecomId(String telecomId) {
+ return mCallByTelecomCallId.get(telecomId);
}
/** {@hide} */
@@ -269,13 +268,13 @@ public final class Phone {
private void checkCallTree(ParcelableCall parcelableCall) {
if (parcelableCall.getParentCallId() != null &&
- !mCallByTelecommCallId.containsKey(parcelableCall.getParentCallId())) {
+ !mCallByTelecomCallId.containsKey(parcelableCall.getParentCallId())) {
Log.wtf(this, "ParcelableCall %s has nonexistent parent %s",
parcelableCall.getId(), parcelableCall.getParentCallId());
}
if (parcelableCall.getChildCallIds() != null) {
for (int i = 0; i < parcelableCall.getChildCallIds().size(); i++) {
- if (!mCallByTelecommCallId.containsKey(parcelableCall.getChildCallIds().get(i))) {
+ if (!mCallByTelecomCallId.containsKey(parcelableCall.getChildCallIds().get(i))) {
Log.wtf(this, "ParcelableCall %s has nonexistent child %s",
parcelableCall.getId(), parcelableCall.getChildCallIds().get(i));
}
diff --git a/telecomm/java/android/telecomm/PhoneAccount.aidl b/telecomm/java/android/telecom/PhoneAccount.aidl
index 15377df7ac6d..d5e605887e94 100644
--- a/telecomm/java/android/telecomm/PhoneAccount.aidl
+++ b/telecomm/java/android/telecom/PhoneAccount.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index f709a86d6709..0c233ebb1ebd 100644
--- a/telecomm/java/android/telecomm/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -83,6 +83,25 @@ public class PhoneAccount implements Parcelable {
public static final int CAPABILITY_VIDEO_CALLING = 0x8;
/**
+ * Flag indicating that this {@code PhoneAccount} is capable of placing emergency calls.
+ * By default all PSTN {@code PhoneAccount}s are capable of placing emergency calls.
+ * <p>
+ * See {@link #getCapabilities}
+ */
+ public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 0x10;
+
+ /**
+ * Flag indicating that this {@code PhoneAccount} is always enabled and cannot be disabled by
+ * the user.
+ * This capability is reserved for important {@code PhoneAccount}s such as the emergency calling
+ * only {@code PhoneAccount}.
+ * <p>
+ * See {@link #getCapabilities}
+ * @hide
+ */
+ public static final int CAPABILITY_ALWAYS_ENABLED = 0x20;
+
+ /**
* URI scheme for telephone number URIs.
*/
public static final String SCHEME_TEL = "tel";
@@ -105,6 +124,7 @@ public class PhoneAccount implements Parcelable {
private final CharSequence mLabel;
private final CharSequence mShortDescription;
private final List<String> mSupportedUriSchemes;
+ private final boolean mIsEnabled;
public static class Builder {
private PhoneAccountHandle mAccountHandle;
@@ -115,12 +135,31 @@ public class PhoneAccount implements Parcelable {
private CharSequence mLabel;
private CharSequence mShortDescription;
private List<String> mSupportedUriSchemes = new ArrayList<String>();
+ private boolean mIsEnabled = false;
public Builder(PhoneAccountHandle accountHandle, CharSequence label) {
this.mAccountHandle = accountHandle;
this.mLabel = label;
}
+ /**
+ * Creates an instance of the {@link PhoneAccount.Builder} from an existing
+ * {@link PhoneAccount}.
+ *
+ * @param phoneAccount The {@link PhoneAccount} used to initialize the builder.
+ */
+ public Builder(PhoneAccount phoneAccount) {
+ mAccountHandle = phoneAccount.getAccountHandle();
+ mAddress = phoneAccount.getAddress();
+ mSubscriptionAddress = phoneAccount.getSubscriptionAddress();
+ mCapabilities = phoneAccount.getCapabilities();
+ mIconResId = phoneAccount.getIconResId();
+ mLabel = phoneAccount.getLabel();
+ mShortDescription = phoneAccount.getShortDescription();
+ mSupportedUriSchemes.addAll(phoneAccount.getSupportedUriSchemes());
+ mIsEnabled = phoneAccount.isEnabled();
+ }
+
public Builder setAddress(Uri value) {
this.mAddress = value;
return this;
@@ -177,6 +216,24 @@ public class PhoneAccount implements Parcelable {
return this;
}
+ /**
+ * Specifies whether the {@link PhoneAccount} is enabled or not. {@link PhoneAccount}s are
+ * by default not enabled.
+ *
+ * @param value {@code True} if the {@link PhoneAccount} is enabled.
+ * @return The Builder.
+ * @hide
+ */
+ public Builder setEnabled(boolean value) {
+ this.mIsEnabled = value;
+ return this;
+ }
+
+ /**
+ * Creates an instance of a {@link PhoneAccount} based on the current builder settings.
+ *
+ * @return The {@link PhoneAccount}.
+ */
public PhoneAccount build() {
// If no supported URI schemes were defined, assume "tel" is supported.
if (mSupportedUriSchemes.isEmpty()) {
@@ -191,7 +248,8 @@ public class PhoneAccount implements Parcelable {
mIconResId,
mLabel,
mShortDescription,
- mSupportedUriSchemes);
+ mSupportedUriSchemes,
+ mIsEnabled);
}
}
@@ -203,7 +261,8 @@ public class PhoneAccount implements Parcelable {
int iconResId,
CharSequence label,
CharSequence shortDescription,
- List<String> supportedUriSchemes) {
+ List<String> supportedUriSchemes,
+ boolean enabled) {
mAccountHandle = account;
mAddress = address;
mSubscriptionAddress = subscriptionAddress;
@@ -212,6 +271,7 @@ public class PhoneAccount implements Parcelable {
mLabel = label;
mShortDescription = shortDescription;
mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes);
+ mIsEnabled = enabled;
}
public static Builder builder(
@@ -221,6 +281,14 @@ public class PhoneAccount implements Parcelable {
}
/**
+ * Returns a builder initialized with the current {@link PhoneAccount} instance.
+ *
+ * @return The builder.
+ * @hide
+ */
+ public Builder toBuilder() { return new Builder(this); }
+
+ /**
* The unique identifier of this {@code PhoneAccount}.
*
* @return A {@code PhoneAccountHandle}.
@@ -265,6 +333,17 @@ public class PhoneAccount implements Parcelable {
}
/**
+ * Determines if this {@code PhoneAccount} has a capabilities specified by the passed in
+ * bit mask.
+ *
+ * @param capability The capabilities to check.
+ * @return {@code True} if the phone account has the capability.
+ */
+ public boolean hasCapabilities(int capability) {
+ return (mCapabilities & capability) == capability;
+ }
+
+ /**
* A short label describing a {@code PhoneAccount}.
*
* @return A label for this {@code PhoneAccount}.
@@ -313,6 +392,15 @@ public class PhoneAccount implements Parcelable {
}
/**
+ * Determines whether this {@code PhoneAccount} is enabled.
+ *
+ * @return {@code True} if this {@code PhoneAccount} is enabled..
+ */
+ public boolean isEnabled() {
+ return mIsEnabled;
+ }
+
+ /**
* The icon resource ID for the icon of this {@code PhoneAccount}.
*
* @return A resource ID.
@@ -367,6 +455,7 @@ public class PhoneAccount implements Parcelable {
out.writeCharSequence(mLabel);
out.writeCharSequence(mShortDescription);
out.writeList(mSupportedUriSchemes);
+ out.writeInt(mIsEnabled ? 1 : 0);
}
public static final Creator<PhoneAccount> CREATOR
@@ -396,5 +485,6 @@ public class PhoneAccount implements Parcelable {
List<String> supportedUriSchemes = new ArrayList<>();
in.readList(supportedUriSchemes, classLoader);
mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes);
+ mIsEnabled = in.readInt() == 1;
}
}
diff --git a/telecomm/java/android/telecomm/PhoneAccountHandle.aidl b/telecomm/java/android/telecom/PhoneAccountHandle.aidl
index 3be5a2ed2321..f8f965694210 100644
--- a/telecomm/java/android/telecomm/PhoneAccountHandle.aidl
+++ b/telecomm/java/android/telecom/PhoneAccountHandle.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/PhoneAccountHandle.java b/telecomm/java/android/telecom/PhoneAccountHandle.java
index 04cd2b0f64da..e13df7685d6d 100644
--- a/telecomm/java/android/telecomm/PhoneAccountHandle.java
+++ b/telecomm/java/android/telecom/PhoneAccountHandle.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.content.ComponentName;
import android.os.Parcel;
@@ -37,7 +37,7 @@ public class PhoneAccountHandle implements Parcelable {
}
/**
- * The {@code ComponentName} of the {@link android.telecomm.ConnectionService} which is
+ * The {@code ComponentName} of the {@link android.telecom.ConnectionService} which is
* responsible for making phone calls using this {@code PhoneAccountHandle}.
*
* @return A suitable {@code ComponentName}.
diff --git a/telecomm/java/android/telecomm/PhoneCapabilities.java b/telecomm/java/android/telecom/PhoneCapabilities.java
index 7a338b4281cd..e73dfe28fea3 100644
--- a/telecomm/java/android/telecomm/PhoneCapabilities.java
+++ b/telecomm/java/android/telecom/PhoneCapabilities.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* Defines capabilities a phone call can support, such as conference calling and video telephony.
@@ -78,8 +78,19 @@ public final class PhoneCapabilities {
*/
public static final int VoWIFI = 0x00000800;
- public static final int ALL = HOLD | SUPPORT_HOLD | MERGE_CONFERENCE | SWAP_CONFERENCE | ADD_CALL
- | RESPOND_VIA_TEXT | MUTE | MANAGE_CONFERENCE;
+ /**
+ * Call is able to be separated from its parent {@code Conference}, if any.
+ */
+ public static final int SEPARATE_FROM_CONFERENCE = 0x00001000;
+
+ /**
+ * Call is able to be individually disconnected when in a {@code Conference}.
+ */
+ public static final int DISCONNECT_FROM_CONFERENCE = 0x00002000;
+
+ public static final int ALL = HOLD | SUPPORT_HOLD | MERGE_CONFERENCE | SWAP_CONFERENCE
+ | ADD_CALL | RESPOND_VIA_TEXT | MUTE | MANAGE_CONFERENCE | SEPARATE_FROM_CONFERENCE
+ | DISCONNECT_FROM_CONFERENCE;
public static String toString(int capabilities) {
StringBuilder builder = new StringBuilder();
diff --git a/telecomm/java/android/telecomm/RemoteConference.java b/telecomm/java/android/telecom/RemoteConference.java
index b0738274a913..996e09184911 100644
--- a/telecomm/java/android/telecomm/RemoteConference.java
+++ b/telecomm/java/android/telecom/RemoteConference.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
-import com.android.internal.telecomm.IConnectionService;
+import com.android.internal.telecom.IConnectionService;
import android.os.RemoteException;
import android.telephony.DisconnectCause;
@@ -188,11 +188,11 @@ public final class RemoteConference {
return mDisconnectMessage;
}
- public final void addCallback(Callback callback) {
+ public final void registerCallback(Callback callback) {
mCallbacks.add(callback);
}
- public final void removeCallback(Callback callback) {
+ public final void unregisterCallback(Callback callback) {
mCallbacks.remove(callback);
}
}
diff --git a/telecomm/java/android/telecomm/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java
index 8ad8d1982490..bf699b39777d 100644
--- a/telecomm/java/android/telecomm/RemoteConnection.java
+++ b/telecomm/java/android/telecom/RemoteConnection.java
@@ -14,13 +14,12 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
-import com.android.internal.telecomm.IConnectionService;
-import com.android.internal.telecomm.IVideoCallback;
-import com.android.internal.telecomm.IVideoProvider;
+import com.android.internal.telecom.IConnectionService;
+import com.android.internal.telecom.IVideoCallback;
+import com.android.internal.telecom.IVideoProvider;
-import android.app.PendingIntent;
import android.net.Uri;
import android.os.IBinder;
import android.os.RemoteException;
@@ -42,7 +41,7 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public final class RemoteConnection {
- public static abstract class Listener {
+ public static abstract class Callback {
/**
* Invoked when the state of this {@code RemoteConnection} has changed. See
* {@link #getState()}.
@@ -53,25 +52,6 @@ public final class RemoteConnection {
public void onStateChanged(RemoteConnection connection, int state) {}
/**
- * Invoked when the parent of this {@code RemoteConnection} has changed. See
- * {@link #getParent()}.
- *
- * @param connection The {@code RemoteConnection} invoking this method.
- * @param parent The new parent of the {@code RemoteConnection}.
- */
- public void onParentChanged(RemoteConnection connection, RemoteConnection parent) {}
-
- /**
- * Invoked when the children of this {@code RemoteConnection} have changed. See
- * {@link #getChildren()}.
- *
- * @param connection The {@code RemoteConnection} invoking this method.
- * @param children The new children of the {@code RemoteConnection}.
- */
- public void onChildrenChanged(
- RemoteConnection connection, List<RemoteConnection> children) {}
-
- /**
* Invoked when this {@code RemoteConnection} is disconnected.
*
* @param connection The {@code RemoteConnection} invoking this method.
@@ -87,12 +67,12 @@ public final class RemoteConnection {
/**
* Invoked when this {@code RemoteConnection} is requesting ringback. See
- * {@link #isRequestingRingback()}.
+ * {@link #isRingbackRequested()}.
*
* @param connection The {@code RemoteConnection} invoking this method.
* @param ringback Whether the {@code RemoteConnection} is requesting ringback.
*/
- public void onRequestingRingback(RemoteConnection connection, boolean ringback) {}
+ public void onRingbackRequested(RemoteConnection connection, boolean ringback) {}
/**
* Indicates that the call capabilities of this {@code RemoteConnection} have changed.
@@ -116,12 +96,12 @@ public final class RemoteConnection {
/**
* Indicates that the VOIP audio status of this {@code RemoteConnection} has changed.
- * See {@link #getAudioModeIsVoip()}.
+ * See {@link #isVoipAudioMode()}.
*
* @param connection The {@code RemoteConnection} invoking this method.
* @param isVoip Whether the new audio state of the {@code RemoteConnection} is VOIP.
*/
- public void onAudioModeIsVoipChanged(RemoteConnection connection, boolean isVoip) {}
+ public void onVoipAudioChanged(RemoteConnection connection, boolean isVoip) {}
/**
* Indicates that the status hints of this {@code RemoteConnection} have changed. See
@@ -133,15 +113,15 @@ public final class RemoteConnection {
public void onStatusHintsChanged(RemoteConnection connection, StatusHints statusHints) {}
/**
- * Indicates that the handle (e.g., phone number) of this {@code RemoteConnection} has
- * changed. See {@link #getHandle()} and {@link #getHandlePresentation()}.
+ * Indicates that the address (e.g., phone number) of this {@code RemoteConnection} has
+ * changed. See {@link #getAddress()} and {@link #getAddressPresentation()}.
*
* @param connection The {@code RemoteConnection} invoking this method.
- * @param handle The new handle of the {@code RemoteConnection}.
- * @param presentation The {@link PropertyPresentation} which controls how the
- * handle is shown.
+ * @param address The new address of the {@code RemoteConnection}.
+ * @param presentation The presentation requirements for the address.
+ * See {@link TelecomManager} for valid values.
*/
- public void onHandleChanged(RemoteConnection connection, Uri handle, int presentation) {}
+ public void onAddressChanged(RemoteConnection connection, Uri address, int presentation) {}
/**
* Indicates that the caller display name of this {@code RemoteConnection} has changed.
@@ -149,8 +129,8 @@ public final class RemoteConnection {
*
* @param connection The {@code RemoteConnection} invoking this method.
* @param callerDisplayName The new caller display name of the {@code RemoteConnection}.
- * @param presentation The {@link PropertyPresentation} which controls how the
- * caller display name is shown.
+ * @param presentation The presentation requirements for the handle.
+ * See {@link TelecomManager} for valid values.
*/
public void onCallerDisplayNameChanged(
RemoteConnection connection, String callerDisplayName, int presentation) {}
@@ -396,8 +376,8 @@ public final class RemoteConnection {
* load factor before resizing, 1 means we only expect a single thread to
* access the map so make only a single shard
*/
- private final Set<Listener> mListeners = Collections.newSetFromMap(
- new ConcurrentHashMap<Listener, Boolean>(8, 0.9f, 1));
+ private final Set<Callback> mCallbacks = Collections.newSetFromMap(
+ new ConcurrentHashMap<Callback, Boolean>(8, 0.9f, 1));
private final List<RemoteConnection> mConferenceableConnections = new ArrayList<>();
private final List<RemoteConnection> mUnmodifiableconferenceableConnections =
Collections.unmodifiableList(mConferenceableConnections);
@@ -405,15 +385,15 @@ public final class RemoteConnection {
private int mState = Connection.STATE_NEW;
private int mDisconnectCauseCode = DisconnectCause.NOT_VALID;
private String mDisconnectCauseMessage;
- private boolean mRequestingRingback;
+ private boolean mRingbackRequested;
private boolean mConnected;
private int mCallCapabilities;
private int mVideoState;
private VideoProvider mVideoProvider;
- private boolean mAudioModeIsVoip;
+ private boolean mIsVoipAudioMode;
private StatusHints mStatusHints;
- private Uri mHandle;
- private int mHandlePresentation;
+ private Uri mAddress;
+ private int mAddressPresentation;
private String mCallerDisplayName;
private int mCallerDisplayNamePresentation;
private int mFailureCode;
@@ -450,42 +430,26 @@ public final class RemoteConnection {
}
/**
- * Adds a listener to this {@code RemoteConnection}.
+ * Adds a callback to this {@code RemoteConnection}.
*
- * @param listener A {@code Listener}.
+ * @param callback A {@code Callback}.
*/
- public void addListener(Listener listener) {
- mListeners.add(listener);
+ public void registerCallback(Callback callback) {
+ mCallbacks.add(callback);
}
/**
- * Removes a listener from this {@code RemoteConnection}.
+ * Removes a callback from this {@code RemoteConnection}.
*
- * @param listener A {@code Listener}.
+ * @param callback A {@code Callback}.
*/
- public void removeListener(Listener listener) {
- if (listener != null) {
- mListeners.remove(listener);
+ public void unregisterCallback(Callback callback) {
+ if (callback != null) {
+ mCallbacks.remove(callback);
}
}
/**
- * Obtains the parent of this {@code RemoteConnection} in a conference, if any.
- *
- * @return The parent {@code RemoteConnection}, or {@code null} if this {@code RemoteConnection}
- * is not a child of any conference {@code RemoteConnection}s.
- */
- public RemoteConnection getParent() { return null; }
-
- /**
- * Obtains the children of this conference {@code RemoteConnection}, if any.
- *
- * @return The children of this {@code RemoteConnection} if this {@code RemoteConnection} is
- * a conference, or an empty {@code List} otherwise.
- */
- public List<RemoteConnection> getChildren() { return new ArrayList<>(); }
-
- /**
* Obtains the state of this {@code RemoteConnection}.
*
* @return A state value, chosen from the {@code STATE_*} constants.
@@ -522,8 +486,8 @@ public final class RemoteConnection {
/**
* @return {@code true} if the {@code RemoteConnection}'s current audio mode is VOIP.
*/
- public boolean getAudioModeIsVoip() {
- return mAudioModeIsVoip;
+ public boolean isVoipAudioMode() {
+ return mIsVoipAudioMode;
}
/**
@@ -535,31 +499,31 @@ public final class RemoteConnection {
}
/**
- * @return The handle (e.g., phone number) to which the {@code RemoteConnection} is currently
+ * @return The address (e.g., phone number) to which the {@code RemoteConnection} is currently
* connected.
*/
- public Uri getHandle() {
- return mHandle;
+ public Uri getAddress() {
+ return mAddress;
}
/**
- * @return The presentation requirements for the handle. See
- * {@link PropertyPresentation} for valid values.
+ * @return The presentation requirements for the address. See {@link TelecomManager} for valid
+ * values.
*/
- public int getHandlePresentation() {
- return mHandlePresentation;
+ public int getAddressPresentation() {
+ return mAddressPresentation;
}
/**
* @return The display name for the caller.
*/
- public String getCallerDisplayName() {
+ public CharSequence getCallerDisplayName() {
return mCallerDisplayName;
}
/**
* @return The presentation requirements for the caller display name. See
- * {@link PropertyPresentation} for valid values.
+ * {@link TelecomManager} for valid values.
*/
public int getCallerDisplayNamePresentation() {
return mCallerDisplayNamePresentation;
@@ -601,7 +565,7 @@ public final class RemoteConnection {
* @return Whether the {@code RemoteConnection} is requesting that the framework play a
* ringback tone on its behalf.
*/
- public boolean isRequestingRingback() {
+ public boolean isRingbackRequested() {
return false;
}
@@ -729,17 +693,17 @@ public final class RemoteConnection {
* Instructs this {@code RemoteConnection} to continue playing a post-dial DTMF string.
*
* A post-dial DTMF string is a string of digits following the first instance of either
- * {@link TelecommManager#DTMF_CHARACTER_WAIT} or {@link TelecommManager#DTMF_CHARACTER_PAUSE}.
+ * {@link TelecomManager#DTMF_CHARACTER_WAIT} or {@link TelecomManager#DTMF_CHARACTER_PAUSE}.
* These digits are immediately sent as DTMF tones to the recipient as soon as the
* connection is made.
*
- * If the DTMF string contains a {@link TelecommManager#DTMF_CHARACTER_PAUSE} symbol, this
+ * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_PAUSE} symbol, this
* {@code RemoteConnection} will temporarily pause playing the tones for a pre-defined period
* of time.
*
- * If the DTMF string contains a {@link TelecommManager#DTMF_CHARACTER_WAIT} symbol, this
- * {@code RemoteConnection} will pause playing the tones and notify listeners via
- * {@link Listener#onPostDialWait(RemoteConnection, String)}. At this point, the in-call app
+ * If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_WAIT} symbol, this
+ * {@code RemoteConnection} will pause playing the tones and notify callbackss via
+ * {@link Callback#onPostDialWait(RemoteConnection, String)}. At this point, the in-call app
* should display to the user an indication of this state and an affordance to continue
* the postdial sequence. When the user decides to continue the postdial sequence, the in-call
* app should invoke the {@link #postDialContinue(boolean)} method.
@@ -806,8 +770,8 @@ public final class RemoteConnection {
void setState(int state) {
if (mState != state) {
mState = state;
- for (Listener l: mListeners) {
- l.onStateChanged(this, state);
+ for (Callback c: mCallbacks) {
+ c.onStateChanged(this, state);
}
}
}
@@ -821,8 +785,8 @@ public final class RemoteConnection {
mDisconnectCauseCode = cause;
mDisconnectCauseMessage = message;
- for (Listener l : mListeners) {
- l.onDisconnected(this, cause, message);
+ for (Callback c : mCallbacks) {
+ c.onDisconnected(this, cause, message);
}
}
}
@@ -830,11 +794,11 @@ public final class RemoteConnection {
/**
* @hide
*/
- void setRequestingRingback(boolean ringback) {
- if (mRequestingRingback != ringback) {
- mRequestingRingback = ringback;
- for (Listener l : mListeners) {
- l.onRequestingRingback(this, ringback);
+ void setRingbackRequested(boolean ringback) {
+ if (mRingbackRequested != ringback) {
+ mRingbackRequested = ringback;
+ for (Callback c : mCallbacks) {
+ c.onRingbackRequested(this, ringback);
}
}
}
@@ -844,8 +808,8 @@ public final class RemoteConnection {
*/
void setCallCapabilities(int callCapabilities) {
mCallCapabilities = callCapabilities;
- for (Listener l : mListeners) {
- l.onCallCapabilitiesChanged(this, callCapabilities);
+ for (Callback c : mCallbacks) {
+ c.onCallCapabilitiesChanged(this, callCapabilities);
}
}
@@ -853,16 +817,16 @@ public final class RemoteConnection {
* @hide
*/
void setDestroyed() {
- if (!mListeners.isEmpty()) {
- // Make sure that the listeners are notified that the call is destroyed first.
+ if (!mCallbacks.isEmpty()) {
+ // Make sure that the callbacks are notified that the call is destroyed first.
if (mState != Connection.STATE_DISCONNECTED) {
setDisconnected(DisconnectCause.ERROR_UNSPECIFIED, "Connection destroyed.");
}
- for (Listener l : mListeners) {
- l.onDestroyed(this);
+ for (Callback c : mCallbacks) {
+ c.onDestroyed(this);
}
- mListeners.clear();
+ mCallbacks.clear();
mConnected = false;
}
@@ -872,8 +836,8 @@ public final class RemoteConnection {
* @hide
*/
void setPostDialWait(String remainingDigits) {
- for (Listener l : mListeners) {
- l.onPostDialWait(this, remainingDigits);
+ for (Callback c : mCallbacks) {
+ c.onPostDialWait(this, remainingDigits);
}
}
@@ -882,8 +846,8 @@ public final class RemoteConnection {
*/
void setVideoState(int videoState) {
mVideoState = videoState;
- for (Listener l : mListeners) {
- l.onVideoStateChanged(this, videoState);
+ for (Callback c : mCallbacks) {
+ c.onVideoStateChanged(this, videoState);
}
}
@@ -892,33 +856,33 @@ public final class RemoteConnection {
*/
void setVideoProvider(VideoProvider videoProvider) {
mVideoProvider = videoProvider;
- for (Listener l : mListeners) {
- l.onVideoProviderChanged(this, videoProvider);
+ for (Callback c : mCallbacks) {
+ c.onVideoProviderChanged(this, videoProvider);
}
}
/** @hide */
- void setAudioModeIsVoip(boolean isVoip) {
- mAudioModeIsVoip = isVoip;
- for (Listener l : mListeners) {
- l.onAudioModeIsVoipChanged(this, isVoip);
+ void setIsVoipAudioMode(boolean isVoip) {
+ mIsVoipAudioMode = isVoip;
+ for (Callback c : mCallbacks) {
+ c.onVoipAudioChanged(this, isVoip);
}
}
/** @hide */
void setStatusHints(StatusHints statusHints) {
mStatusHints = statusHints;
- for (Listener l : mListeners) {
- l.onStatusHintsChanged(this, statusHints);
+ for (Callback c : mCallbacks) {
+ c.onStatusHintsChanged(this, statusHints);
}
}
/** @hide */
- void setHandle(Uri handle, int presentation) {
- mHandle = handle;
- mHandlePresentation = presentation;
- for (Listener l : mListeners) {
- l.onHandleChanged(this, handle, presentation);
+ void setAddress(Uri address, int presentation) {
+ mAddress = address;
+ mAddressPresentation = presentation;
+ for (Callback c : mCallbacks) {
+ c.onAddressChanged(this, address, presentation);
}
}
@@ -926,8 +890,8 @@ public final class RemoteConnection {
void setCallerDisplayName(String callerDisplayName, int presentation) {
mCallerDisplayName = callerDisplayName;
mCallerDisplayNamePresentation = presentation;
- for (Listener l : mListeners) {
- l.onCallerDisplayNameChanged(this, callerDisplayName, presentation);
+ for (Callback c : mCallbacks) {
+ c.onCallerDisplayNameChanged(this, callerDisplayName, presentation);
}
}
@@ -935,8 +899,8 @@ public final class RemoteConnection {
void setConferenceableConnections(List<RemoteConnection> conferenceableConnections) {
mConferenceableConnections.clear();
mConferenceableConnections.addAll(conferenceableConnections);
- for (Listener l : mListeners) {
- l.onConferenceableConnectionsChanged(this, mUnmodifiableconferenceableConnections);
+ for (Callback c : mCallbacks) {
+ c.onConferenceableConnectionsChanged(this, mUnmodifiableconferenceableConnections);
}
}
@@ -944,8 +908,8 @@ public final class RemoteConnection {
void setConference(RemoteConference conference) {
if (mConference != conference) {
mConference = conference;
- for (Listener l : mListeners) {
- l.onConferenceChanged(this, conference);
+ for (Callback c : mCallbacks) {
+ c.onConferenceChanged(this, conference);
}
}
}
diff --git a/telecomm/java/android/telecomm/RemoteConnectionManager.java b/telecomm/java/android/telecom/RemoteConnectionManager.java
index 83502c5ec2de..036650927f3a 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionManager.java
+++ b/telecomm/java/android/telecom/RemoteConnectionManager.java
@@ -14,12 +14,12 @@
R* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.content.ComponentName;
import android.os.RemoteException;
-import com.android.internal.telecomm.IConnectionService;
+import com.android.internal.telecom.IConnectionService;
import java.util.HashMap;
import java.util.Map;
diff --git a/telecomm/java/android/telecomm/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java
index 348c36c196cd..bfd7c51658a5 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionService.java
+++ b/telecomm/java/android/telecom/RemoteConnectionService.java
@@ -14,19 +14,18 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
-import android.app.PendingIntent;
import android.net.Uri;
import android.os.IBinder;
import android.os.IBinder.DeathRecipient;
import android.os.RemoteException;
import android.telephony.DisconnectCause;
-import com.android.internal.telecomm.IConnectionService;
-import com.android.internal.telecomm.IConnectionServiceAdapter;
-import com.android.internal.telecomm.IVideoProvider;
-import com.android.internal.telecomm.RemoteServiceCallback;
+import com.android.internal.telecom.IConnectionService;
+import com.android.internal.telecom.IConnectionServiceAdapter;
+import com.android.internal.telecom.IVideoProvider;
+import com.android.internal.telecom.RemoteServiceCallback;
import java.util.ArrayList;
import java.util.HashMap;
@@ -60,13 +59,14 @@ final class RemoteConnectionService {
if (connection != NULL_CONNECTION && mPendingConnections.contains(connection)) {
mPendingConnections.remove(connection);
// Unconditionally initialize the connection ...
- connection.setState(parcel.getState());
connection.setCallCapabilities(parcel.getCapabilities());
- connection.setHandle(
+ connection.setAddress(
parcel.getHandle(), parcel.getHandlePresentation());
connection.setCallerDisplayName(
parcel.getCallerDisplayName(),
parcel.getCallerDisplayNamePresentation());
+ // Set state after handle so that the client can identify the connection.
+ connection.setState(parcel.getState());
List<RemoteConnection> conferenceable = new ArrayList<>();
for (String confId : parcel.getConferenceableConnectionIds()) {
if (mConnectionById.containsKey(confId)) {
@@ -130,9 +130,9 @@ final class RemoteConnectionService {
}
@Override
- public void setRequestingRingback(String callId, boolean ringing) {
- findConnectionForAction(callId, "setRequestingRingback")
- .setRequestingRingback(ringing);
+ public void setRingbackRequested(String callId, boolean ringing) {
+ findConnectionForAction(callId, "setRingbackRequested")
+ .setRingbackRequested(ringing);
}
@Override
@@ -191,7 +191,7 @@ final class RemoteConnectionService {
conference.setState(parcel.getState());
conference.setCallCapabilities(parcel.getCapabilities());
mConferenceById.put(callId, conference);
- conference.addCallback(new RemoteConference.Callback() {
+ conference.registerCallback(new RemoteConference.Callback() {
@Override
public void onDestroyed(RemoteConference c) {
mConferenceById.remove(callId);
@@ -237,9 +237,9 @@ final class RemoteConnectionService {
}
@Override
- public void setAudioModeIsVoip(String callId, boolean isVoip) {
- findConnectionForAction(callId, "setAudioModeIsVoip")
- .setAudioModeIsVoip(isVoip);
+ public void setIsVoipAudioMode(String callId, boolean isVoip) {
+ findConnectionForAction(callId, "setIsVoipAudioMode")
+ .setIsVoipAudioMode(isVoip);
}
@Override
@@ -249,9 +249,9 @@ final class RemoteConnectionService {
}
@Override
- public void setHandle(String callId, Uri handle, int presentation) {
- findConnectionForAction(callId, "setHandle")
- .setHandle(handle, presentation);
+ public void setAddress(String callId, Uri address, int presentation) {
+ findConnectionForAction(callId, "setAddress")
+ .setAddress(address, presentation);
}
@Override
@@ -342,7 +342,7 @@ final class RemoteConnectionService {
id,
newRequest,
isIncoming);
- connection.addListener(new RemoteConnection.Listener() {
+ connection.registerCallback(new RemoteConnection.Callback() {
@Override
public void onDestroyed(RemoteConnection connection) {
mConnectionById.remove(id);
diff --git a/telecomm/java/android/telecomm/Response.java b/telecomm/java/android/telecom/Response.java
index f87975615421..ce7a7612786b 100644
--- a/telecomm/java/android/telecomm/Response.java
+++ b/telecomm/java/android/telecom/Response.java
@@ -14,13 +14,10 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
- * <strong>OBSOLETE</strong> Used to inform a client of asynchronously returned results.
- * <p>
- * <strong>TODO:</strong> Remove onCreateConferenceConnection() async method
- * then delete this interface.
+ * @hide
*/
public interface Response<IN, OUT> {
diff --git a/telecomm/java/android/telecomm/StatusHints.aidl b/telecomm/java/android/telecom/StatusHints.aidl
index 22da293da878..ae7df2e274e8 100644
--- a/telecomm/java/android/telecomm/StatusHints.aidl
+++ b/telecomm/java/android/telecom/StatusHints.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/StatusHints.java b/telecomm/java/android/telecom/StatusHints.java
index ff96a5b4f838..a32eae76dcea 100644
--- a/telecomm/java/android/telecomm/StatusHints.java
+++ b/telecomm/java/android/telecom/StatusHints.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import android.content.ComponentName;
import android.content.Context;
diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 5e9e6d0b2218..c69a17c04206 100644
--- a/telecomm/java/android/telecomm/TelecommManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -12,7 +12,7 @@
* the License.
*/
-package android.telecomm;
+package android.telecom;
import android.annotation.SystemApi;
import android.content.ComponentName;
@@ -20,60 +20,80 @@ import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.telephony.TelephonyManager;
import android.util.Log;
-import com.android.internal.telecomm.ITelecommService;
+import com.android.internal.telecom.ITelecomService;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
- * Provides access to Telecomm-related functionality.
+ * Provides access to Telecom-related functionality.
* TODO: Move this all into PhoneManager.
*/
-public class TelecommManager {
+public class TelecomManager {
/**
* Activity action: Starts the UI for handing an incoming call. This intent starts the in-call
- * UI by notifying the Telecomm system that an incoming call exists for a specific call service
- * (see {@link android.telecomm.ConnectionService}). Telecomm reads the Intent extras to find
- * and bind to the appropriate {@link android.telecomm.ConnectionService} which Telecomm will
+ * UI by notifying the Telecom system that an incoming call exists for a specific call service
+ * (see {@link android.telecom.ConnectionService}). Telecom reads the Intent extras to find
+ * and bind to the appropriate {@link android.telecom.ConnectionService} which Telecom will
* ultimately use to control and get information about the call.
* <p>
* Input: get*Extra field {@link #EXTRA_PHONE_ACCOUNT_HANDLE} contains the component name of the
- * {@link android.telecomm.ConnectionService} that Telecomm should bind to. Telecomm will then
+ * {@link android.telecom.ConnectionService} that Telecom should bind to. Telecom will then
* ask the connection service for more information about the call prior to showing any UI.
*
* @hide
*/
- public static final String ACTION_INCOMING_CALL = "android.telecomm.action.INCOMING_CALL";
+ public static final String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL";
/**
* The {@link android.content.Intent} action used to configure a
- * {@link android.telecomm.ConnectionService}.
+ * {@link android.telecom.ConnectionService}.
*/
public static final String ACTION_CONNECTION_SERVICE_CONFIGURE =
- "android.telecomm.action.CONNECTION_SERVICE_CONFIGURE";
+ "android.telecom.action.CONNECTION_SERVICE_CONFIGURE";
/**
* The {@link android.content.Intent} action used to show the call settings page.
*/
public static final String ACTION_SHOW_CALL_SETTINGS =
- "android.telecomm.action.SHOW_CALL_SETTINGS";
+ "android.telecom.action.SHOW_CALL_SETTINGS";
/**
* The {@link android.content.Intent} action used to show the settings page used to configure
* {@link PhoneAccount} preferences.
*/
public static final String ACTION_CHANGE_PHONE_ACCOUNTS =
- "android.telecomm.action.CHANGE_PHONE_ACCOUNTS";
+ "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
+
+ /**
+ * The {@link android.content.Intent} action used to inform a
+ * {@link android.telecom.ConnectionService} that one of its {@link PhoneAccount}s has been
+ * enabled. The {@link TelecomManager#EXTRA_PHONE_ACCOUNT_HANDLE} extra is used to indicate
+ * which {@link PhoneAccount} has been enabled.
+ */
+ public static final String ACTION_PHONE_ACCOUNT_ENABLED =
+ "android.telecom.action.PHONE_ACCOUNT_ENABLED";
+
+ /**
+ * The {@link android.content.Intent} action used to inform a
+ * {@link android.telecom.ConnectionService} that one of its {@link PhoneAccount}s has been
+ * disabled. The {@link TelecomManager#EXTRA_PHONE_ACCOUNT_HANDLE} extra is used to indicate
+ * which {@link PhoneAccount} has been disabled.
+ */
+ public static final String ACTION_PHONE_ACCOUNT_DISABLED =
+ "android.telecom.action.PHONE_ACCOUNT_DISABLED";
/**
* Optional extra for {@link android.content.Intent#ACTION_CALL} containing a boolean that
* determines whether the speakerphone should be automatically turned on for an outgoing call.
*/
public static final String EXTRA_START_CALL_WITH_SPEAKERPHONE =
- "android.telecomm.extra.START_CALL_WITH_SPEAKERPHONE";
+ "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
/**
* Optional extra for {@link android.content.Intent#ACTION_CALL} containing an integer that
@@ -86,7 +106,7 @@ public class TelecommManager {
* @hide
*/
public static final String EXTRA_START_CALL_WITH_VIDEO_STATE =
- "android.telecomm.extra.START_CALL_WITH_VIDEO_STATE";
+ "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
/**
* The extra used with an {@link android.content.Intent#ACTION_CALL} and
@@ -96,7 +116,7 @@ public class TelecommManager {
* Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
*/
public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
- "android.telecomm.extra.PHONE_ACCOUNT_HANDLE";
+ "android.telecom.extra.PHONE_ACCOUNT_HANDLE";
/**
* Optional extra for {@link #ACTION_INCOMING_CALL} containing a {@link Bundle} which contains
@@ -106,7 +126,7 @@ public class TelecommManager {
* @hide
*/
public static final String EXTRA_INCOMING_CALL_EXTRAS =
- "android.telecomm.extra.INCOMING_CALL_EXTRAS";
+ "android.telecom.extra.INCOMING_CALL_EXTRAS";
/**
* Optional extra for {@link android.content.Intent#ACTION_CALL} and
@@ -117,28 +137,52 @@ public class TelecommManager {
* @hide
*/
public static final String EXTRA_OUTGOING_CALL_EXTRAS =
- "android.telecomm.extra.OUTGOING_CALL_EXTRAS";
+ "android.telecom.extra.OUTGOING_CALL_EXTRAS";
/**
* Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
* containing the disconnect code.
*/
public static final String EXTRA_CALL_DISCONNECT_CAUSE =
- "android.telecomm.extra.CALL_DISCONNECT_CAUSE";
+ "android.telecom.extra.CALL_DISCONNECT_CAUSE";
/**
* Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
* containing the disconnect message.
*/
public static final String EXTRA_CALL_DISCONNECT_MESSAGE =
- "android.telecomm.extra.CALL_DISCONNECT_MESSAGE";
+ "android.telecom.extra.CALL_DISCONNECT_MESSAGE";
/**
* Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
* containing the component name of the associated connection service.
*/
public static final String EXTRA_CONNECTION_SERVICE =
- "android.telecomm.extra.CONNECTION_SERVICE";
+ "android.telecom.extra.CONNECTION_SERVICE";
+
+ /**
+ * An optional {@link android.content.Intent#ACTION_CALL} intent extra denoting the
+ * package name of the app specifying an alternative gateway for the call.
+ * The value is a string.
+ *
+ * (The following comment corresponds to the all GATEWAY_* extras)
+ * An app which sends the {@link android.content.Intent#ACTION_CALL} intent can specify an
+ * alternative address to dial which is different from the one specified and displayed to
+ * the user. This alternative address is referred to as the gateway address.
+ */
+ public static final String GATEWAY_PROVIDER_PACKAGE =
+ "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
+
+ /**
+ * An optional {@link android.content.Intent#ACTION_CALL} intent extra corresponding to the
+ * original address to dial for the call. This is used when an alternative gateway address is
+ * provided to recall the original address.
+ * The value is a {@link android.net.Uri}.
+ *
+ * (See {@link #GATEWAY_PROVIDER_PACKAGE} for details)
+ */
+ public static final String GATEWAY_ORIGINAL_ADDRESS =
+ "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
/**
* The number which the party on the other side of the line will see (and use to return the
@@ -148,7 +192,7 @@ public class TelecommManager {
* this if the {@link android.telephony.TelephonyManager#getLine1Number()} value, as that is the
* user's expected caller ID.
*/
- public static final String EXTRA_CALL_BACK_NUMBER = "android.telecomm.extra.CALL_BACK_NUMBER";
+ public static final String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
/**
* The dual tone multi-frequency signaling character sent to indicate the dialing system should
@@ -203,7 +247,7 @@ public class TelecommManager {
* @hide
*/
public static final String ACTION_CURRENT_TTY_MODE_CHANGED =
- "android.telecomm.action.CURRENT_TTY_MODE_CHANGED";
+ "android.telecom.action.CURRENT_TTY_MODE_CHANGED";
/**
* The lookup key for an int that indicates the current TTY mode.
@@ -216,7 +260,7 @@ public class TelecommManager {
* @hide
*/
public static final String EXTRA_CURRENT_TTY_MODE =
- "android.telecomm.intent.extra.CURRENT_TTY_MODE";
+ "android.telecom.intent.extra.CURRENT_TTY_MODE";
/**
* Broadcast intent action indicating that the TTY preferred operating mode has changed. An
@@ -226,7 +270,7 @@ public class TelecommManager {
* @hide
*/
public static final String ACTION_TTY_PREFERRED_MODE_CHANGED =
- "android.telecomm.action.TTY_PREFERRED_MODE_CHANGED";
+ "android.telecom.action.TTY_PREFERRED_MODE_CHANGED";
/**
* The lookup key for an int that indicates preferred TTY mode. Valid modes are: -
@@ -236,25 +280,40 @@ public class TelecommManager {
* @hide
*/
public static final String EXTRA_TTY_PREFERRED_MODE =
- "android.telecomm.intent.extra.TTY_PREFERRED";
+ "android.telecom.intent.extra.TTY_PREFERRED";
+
+ /**
+ * The following 4 constants define how properties such as phone numbers and names are
+ * displayed to the user.
+ */
- private static final String TAG = "TelecommManager";
+ /** Property is displayed normally. */
+ public static final int PRESENTATION_ALLOWED = 1;
- private static final String TELECOMM_SERVICE_NAME = "telecomm";
+ /** Property was blocked. */
+ public static final int PRESENTATION_RESTRICTED = 2;
+
+ /** Presentation was not specified or is unknown. */
+ public static final int PRESENTATION_UNKNOWN = 3;
+
+ /** Property should be displayed as a pay phone. */
+ public static final int PRESENTATION_PAYPHONE = 4;
+
+ private static final String TAG = "TelecomManager";
private final Context mContext;
/**
* @hide
*/
- public static TelecommManager from(Context context) {
- return (TelecommManager) context.getSystemService(Context.TELECOMM_SERVICE);
+ public static TelecomManager from(Context context) {
+ return (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
}
/**
* @hide
*/
- public TelecommManager(Context context) {
+ public TelecomManager(Context context) {
Context appContext = context.getApplicationContext();
if (appContext != null) {
mContext = appContext;
@@ -270,13 +329,13 @@ public class TelecommManager {
* <p>
* Apps must be prepared for this method to return {@code null}, indicating that there currently
* exists no user-chosen default {@code PhoneAccount}. In this case, apps wishing to initiate a
- * phone call must either create their {@link android.content .Intent#ACTION_CALL} or
+ * phone call must either create their {@link android.content.Intent#ACTION_CALL} or
* {@link android.content.Intent#ACTION_DIAL} {@code Intent} with no
- * {@link TelecommManager#EXTRA_PHONE_ACCOUNT_HANDLE}, or present the user with an affordance to
+ * {@link TelecomManager#EXTRA_PHONE_ACCOUNT_HANDLE}, or present the user with an affordance to
* select one of the elements of {@link #getEnabledPhoneAccounts()}.
* <p>
* An {@link android.content.Intent#ACTION_CALL} or {@link android.content.Intent#ACTION_DIAL}
- * {@code Intent} with no {@link TelecommManager#EXTRA_PHONE_ACCOUNT_HANDLE} is valid, and
+ * {@code Intent} with no {@link TelecomManager#EXTRA_PHONE_ACCOUNT_HANDLE} is valid, and
* subsequent steps in the phone call flow are responsible for presenting the user with an
* affordance, if necessary, to choose a {@code PhoneAccount}.
*
@@ -285,10 +344,10 @@ public class TelecommManager {
public PhoneAccountHandle getDefaultOutgoingPhoneAccount(String uriScheme) {
try {
if (isServiceConnected()) {
- return getTelecommService().getDefaultOutgoingPhoneAccount(uriScheme);
+ return getTelecomService().getDefaultOutgoingPhoneAccount(uriScheme);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getDefaultOutgoingPhoneAccount", e);
+ Log.e(TAG, "Error calling ITelecomService#getDefaultOutgoingPhoneAccount", e);
}
return null;
}
@@ -307,10 +366,10 @@ public class TelecommManager {
public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount() {
try {
if (isServiceConnected()) {
- return getTelecommService().getUserSelectedOutgoingPhoneAccount();
+ return getTelecomService().getUserSelectedOutgoingPhoneAccount();
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getUserSelectedOutgoingPhoneAccount", e);
+ Log.e(TAG, "Error calling ITelecomService#getUserSelectedOutgoingPhoneAccount", e);
}
return null;
}
@@ -322,16 +381,16 @@ public class TelecommManager {
public void setUserSelectedOutgoingPhoneAccount(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
- getTelecommService().setUserSelectedOutgoingPhoneAccount(accountHandle);
+ getTelecomService().setUserSelectedOutgoingPhoneAccount(accountHandle);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#setUserSelectedOutgoingPhoneAccount");
+ Log.e(TAG, "Error calling ITelecomService#setUserSelectedOutgoingPhoneAccount");
}
}
/**
- * Return a list of {@link PhoneAccountHandle}s which can be used to make and receive phone
- * calls.
+ * Return a list of enabled {@link PhoneAccountHandle}s which can be used to make and receive
+ * phone calls.
*
* @see #EXTRA_PHONE_ACCOUNT_HANDLE
* @return A list of {@code PhoneAccountHandle} objects.
@@ -339,10 +398,10 @@ public class TelecommManager {
public List<PhoneAccountHandle> getEnabledPhoneAccounts() {
try {
if (isServiceConnected()) {
- return getTelecommService().getOutgoingPhoneAccounts();
+ return getTelecomService().getEnabledPhoneAccounts();
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getOutgoingPhoneAccounts", e);
+ Log.e(TAG, "Error calling ITelecomService#getEnabledPhoneAccounts", e);
}
return new ArrayList<>();
}
@@ -357,10 +416,10 @@ public class TelecommManager {
public PhoneAccountHandle getSimCallManager() {
try {
if (isServiceConnected()) {
- return getTelecommService().getSimCallManager();
+ return getTelecomService().getSimCallManager();
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getSimCallManager");
+ Log.e(TAG, "Error calling ITelecomService#getSimCallManager");
}
return null;
}
@@ -373,10 +432,10 @@ public class TelecommManager {
public void setSimCallManager(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
- getTelecommService().setSimCallManager(accountHandle);
+ getTelecomService().setSimCallManager(accountHandle);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#setSimCallManager");
+ Log.e(TAG, "Error calling ITelecomService#setSimCallManager");
}
}
@@ -388,10 +447,10 @@ public class TelecommManager {
public List<PhoneAccountHandle> getSimCallManagers() {
try {
if (isServiceConnected()) {
- return getTelecommService().getSimCallManagers();
+ return getTelecomService().getSimCallManagers();
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getSimCallManagers");
+ Log.e(TAG, "Error calling ITelecomService#getSimCallManagers");
}
return new ArrayList<>();
}
@@ -408,8 +467,8 @@ public class TelecommManager {
}
/**
- * Returns a list of {@link PhoneAccountHandle}s which can be used to make and receive phone
- * calls which support the specified URI scheme.
+ * Returns a list of the enabled {@link PhoneAccountHandle}s which can be used to make and
+ * receive phone calls which support the specified URI scheme.
* <P>
* For example, invoking with {@code "tel"} will find all {@link PhoneAccountHandle}s which
* support telephone calls (e.g. URIs such as {@code tel:555-555-1212}). Invoking with
@@ -422,10 +481,10 @@ public class TelecommManager {
public List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(String uriScheme) {
try {
if (isServiceConnected()) {
- return getTelecommService().getPhoneAccountsSupportingScheme(uriScheme);
+ return getTelecomService().getPhoneAccountsSupportingScheme(uriScheme);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getPhoneAccountsSupportingScheme", e);
+ Log.e(TAG, "Error calling ITelecomService#getPhoneAccountsSupportingScheme", e);
}
return new ArrayList<>();
}
@@ -450,15 +509,87 @@ public class TelecommManager {
public PhoneAccount getPhoneAccount(PhoneAccountHandle account) {
try {
if (isServiceConnected()) {
- return getTelecommService().getPhoneAccount(account);
+ return getTelecomService().getPhoneAccount(account);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#getPhoneAccount", e);
+ Log.e(TAG, "Error calling ITelecomService#getPhoneAccount", e);
}
return null;
}
/**
+ * Returns a count of enabled and disabled {@link PhoneAccount}s.
+ *
+ * @return The count of enabled and disabled {@link PhoneAccount}s.
+ * @hide
+ */
+ @SystemApi
+ public int getAllPhoneAccountsCount() {
+ try {
+ if (isServiceConnected()) {
+ return getTelecomService().getAllPhoneAccountsCount();
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelecomService#getAllPhoneAccountsCount", e);
+ }
+ return 0;
+ }
+
+ /**
+ * Returns a list of all {@link PhoneAccount}s.
+ *
+ * @return All {@link PhoneAccount}s.
+ * @hide
+ */
+ @SystemApi
+ public List<PhoneAccount> getAllPhoneAccounts() {
+ try {
+ if (isServiceConnected()) {
+ return getTelecomService().getAllPhoneAccounts();
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelecomService#getAllPhoneAccounts", e);
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * Returns a list of all {@link PhoneAccountHandle}s.
+ *
+ * @return All {@link PhoneAccountHandle}s.
+ * @hide
+ */
+ @SystemApi
+ public List<PhoneAccountHandle> getAllPhoneAccountHandles() {
+ try {
+ if (isServiceConnected()) {
+ return getTelecomService().getAllPhoneAccountHandles();
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelecomService#getAllPhoneAccountHandles", e);
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * Enables or disables a {@link PhoneAccount}.
+ *
+ * @param account The {@link PhoneAccountHandle} to enable or disable.
+ * @param isEnabled {@code True} if the phone account should be enabled.
+ * @hide
+ */
+ @SystemApi
+ public void setPhoneAccountEnabled(PhoneAccountHandle account, boolean isEnabled) {
+ try {
+ if (isServiceConnected()) {
+ getTelecomService().setPhoneAccountEnabled(account, isEnabled);
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelecomService#setPhoneAccountEnabled", e);
+ }
+ }
+
+ /**
* Register a {@link PhoneAccount} for use by the system.
*
* @param account The complete {@link PhoneAccount}.
@@ -466,10 +597,10 @@ public class TelecommManager {
public void registerPhoneAccount(PhoneAccount account) {
try {
if (isServiceConnected()) {
- getTelecommService().registerPhoneAccount(account);
+ getTelecomService().registerPhoneAccount(account);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#registerPhoneAccount", e);
+ Log.e(TAG, "Error calling ITelecomService#registerPhoneAccount", e);
}
}
@@ -481,26 +612,24 @@ public class TelecommManager {
public void unregisterPhoneAccount(PhoneAccountHandle accountHandle) {
try {
if (isServiceConnected()) {
- getTelecommService().unregisterPhoneAccount(accountHandle);
+ getTelecomService().unregisterPhoneAccount(accountHandle);
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#unregisterPhoneAccount", e);
+ Log.e(TAG, "Error calling ITelecomService#unregisterPhoneAccount", e);
}
}
/**
- * Remove all Accounts for a given package from the system.
- *
- * @param packageName A package name that may have registered Accounts.
+ * Remove all Accounts that belong to the calling package from the system.
*/
@SystemApi
- public void clearAccounts(String packageName) {
+ public void clearAccounts() {
try {
if (isServiceConnected()) {
- getTelecommService().clearAccounts(packageName);
+ getTelecomService().clearAccounts(mContext.getPackageName());
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#clearAccounts", e);
+ Log.e(TAG, "Error calling ITelecomService#clearAccounts", e);
}
}
@@ -511,7 +640,7 @@ public class TelecommManager {
public ComponentName getDefaultPhoneApp() {
try {
if (isServiceConnected()) {
- return getTelecommService().getDefaultPhoneApp();
+ return getTelecomService().getDefaultPhoneApp();
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException attempting to get the default phone app.", e);
@@ -530,15 +659,39 @@ public class TelecommManager {
public boolean isInCall() {
try {
if (isServiceConnected()) {
- return getTelecommService().isInCall();
+ return getTelecomService().isInCall();
}
} catch (RemoteException e) {
- Log.e(TAG, "RemoteException attempting to get default phone app.", e);
+ Log.e(TAG, "RemoteException calling isInCall().", e);
}
return false;
}
/**
+ * Returns one of the following constants that represents the current state of Telecom:
+ *
+ * {@link TelephonyManager#CALL_STATE_RINGING}
+ * {@link TelephonyManager#CALL_STATE_OFFHOOK}
+ * {@link TelephonyManager#CALL_STATE_IDLE}
+ *
+ * <p>
+ * Requires permission: {@link android.Manifest.permission#READ_PHONE_STATE}
+ * </p>
+ * @hide
+ */
+ @SystemApi
+ public int getCallState() {
+ try {
+ if (isServiceConnected()) {
+ return getTelecomService().getCallState();
+ }
+ } catch (RemoteException e) {
+ Log.d(TAG, "RemoteException calling getCallState().", e);
+ }
+ return TelephonyManager.CALL_STATE_IDLE;
+ }
+
+ /**
* Returns whether there currently exists is a ringing incoming-call.
*
* @hide
@@ -547,7 +700,7 @@ public class TelecommManager {
public boolean isRinging() {
try {
if (isServiceConnected()) {
- return getTelecommService().isRinging();
+ return getTelecomService().isRinging();
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException attempting to get ringing state of phone app.", e);
@@ -557,7 +710,7 @@ public class TelecommManager {
/**
* Ends an ongoing call.
- * TODO: L-release - need to convert all invocations of ITelecommService#endCall to use this
+ * TODO: L-release - need to convert all invocations of ITelecomService#endCall to use this
* method (clockwork & gearhead).
* @hide
*/
@@ -565,17 +718,17 @@ public class TelecommManager {
public boolean endCall() {
try {
if (isServiceConnected()) {
- return getTelecommService().endCall();
+ return getTelecomService().endCall();
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#endCall", e);
+ Log.e(TAG, "Error calling ITelecomService#endCall", e);
}
return false;
}
/**
* If there is a ringing incoming call, this method accepts the call on behalf of the user.
- * TODO: L-release - need to convert all invocation of ITelecommService#answerRingingCall to use
+ * TODO: L-release - need to convert all invocation of ITelecmmService#answerRingingCall to use
* this method (clockwork & gearhead).
*
* @hide
@@ -584,10 +737,10 @@ public class TelecommManager {
public void acceptRingingCall() {
try {
if (isServiceConnected()) {
- getTelecommService().acceptRingingCall();
+ getTelecomService().acceptRingingCall();
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#acceptRingingCall", e);
+ Log.e(TAG, "Error calling ITelecomService#acceptRingingCall", e);
}
}
@@ -600,10 +753,10 @@ public class TelecommManager {
public void silenceRinger() {
try {
if (isServiceConnected()) {
- getTelecommService().silenceRinger();
+ getTelecomService().silenceRinger();
}
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#silenceRinger", e);
+ Log.e(TAG, "Error calling ITelecomService#silenceRinger", e);
}
}
@@ -616,7 +769,7 @@ public class TelecommManager {
public boolean isTtySupported() {
try {
if (isServiceConnected()) {
- return getTelecommService().isTtySupported();
+ return getTelecomService().isTtySupported();
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException attempting to get TTY supported state.", e);
@@ -628,16 +781,16 @@ public class TelecommManager {
* Returns the current TTY mode of the device. For TTY to be on the user must enable it in
* settings and have a wired headset plugged in.
* Valid modes are:
- * - {@link TelecommManager#TTY_MODE_OFF}
- * - {@link TelecommManager#TTY_MODE_FULL}
- * - {@link TelecommManager#TTY_MODE_HCO}
- * - {@link TelecommManager#TTY_MODE_VCO}
+ * - {@link TelecomManager#TTY_MODE_OFF}
+ * - {@link TelecomManager#TTY_MODE_FULL}
+ * - {@link TelecomManager#TTY_MODE_HCO}
+ * - {@link TelecomManager#TTY_MODE_VCO}
* @hide
*/
public int getCurrentTtyMode() {
try {
if (isServiceConnected()) {
- return getTelecommService().getCurrentTtyMode();
+ return getTelecomService().getCurrentTtyMode();
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException attempting to get the current TTY mode.", e);
@@ -662,7 +815,7 @@ public class TelecommManager {
public void addNewIncomingCall(PhoneAccountHandle phoneAccount, Bundle extras) {
try {
if (isServiceConnected()) {
- getTelecommService().addNewIncomingCall(
+ getTelecomService().addNewIncomingCall(
phoneAccount, extras == null ? new Bundle() : extras);
}
} catch (RemoteException e) {
@@ -682,12 +835,12 @@ public class TelecommManager {
* @return True if the digits were processed as an MMI code, false otherwise.
*/
public boolean handleMmi(String dialString) {
- ITelecommService service = getTelecommService();
+ ITelecomService service = getTelecomService();
if (service != null) {
try {
return service.handlePinMmi(dialString);
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#handlePinMmi", e);
+ Log.e(TAG, "Error calling ITelecomService#handlePinMmi", e);
}
}
return false;
@@ -700,12 +853,12 @@ public class TelecommManager {
* </p>
*/
public void cancelMissedCallsNotification() {
- ITelecommService service = getTelecommService();
+ ITelecomService service = getTelecomService();
if (service != null) {
try {
service.cancelMissedCallsNotification();
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#cancelMissedCallsNotification", e);
+ Log.e(TAG, "Error calling ITelecomService#cancelMissedCallsNotification", e);
}
}
}
@@ -721,24 +874,24 @@ public class TelecommManager {
* @param showDialpad Brings up the in-call dialpad as part of showing the in-call screen.
*/
public void showInCallScreen(boolean showDialpad) {
- ITelecommService service = getTelecommService();
+ ITelecomService service = getTelecomService();
if (service != null) {
try {
service.showInCallScreen(showDialpad);
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#showCallScreen", e);
+ Log.e(TAG, "Error calling ITelecomService#showCallScreen", e);
}
}
}
- private ITelecommService getTelecommService() {
- return ITelecommService.Stub.asInterface(ServiceManager.getService(TELECOMM_SERVICE_NAME));
+ private ITelecomService getTelecomService() {
+ return ITelecomService.Stub.asInterface(ServiceManager.getService(Context.TELECOM_SERVICE));
}
private boolean isServiceConnected() {
- boolean isConnected = getTelecommService() != null;
+ boolean isConnected = getTelecomService() != null;
if (!isConnected) {
- Log.w(TAG, "Telecomm Service not found.");
+ Log.w(TAG, "Telecom Service not found.");
}
return isConnected;
}
diff --git a/telecomm/java/android/telecomm/VideoCallImpl.java b/telecomm/java/android/telecom/VideoCallImpl.java
index d33a3513d7eb..925058e190e9 100644
--- a/telecomm/java/android/telecomm/VideoCallImpl.java
+++ b/telecomm/java/android/telecom/VideoCallImpl.java
@@ -14,19 +14,19 @@
* limitations under the License
*/
-package android.telecomm;
+package android.telecom;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
-import android.telecomm.InCallService.VideoCall;
+import android.telecom.InCallService.VideoCall;
import android.view.Surface;
import com.android.internal.os.SomeArgs;
-import com.android.internal.telecomm.IVideoCallback;
-import com.android.internal.telecomm.IVideoProvider;
+import com.android.internal.telecom.IVideoCallback;
+import com.android.internal.telecom.IVideoProvider;
/**
* Implementation of a Video Call, which allows InCallUi to communicate commands to the underlying
diff --git a/telecomm/java/android/telecomm/VideoCallbackServant.java b/telecomm/java/android/telecom/VideoCallbackServant.java
index 060b8a96cdbc..d0e3f2245e8f 100644
--- a/telecomm/java/android/telecomm/VideoCallbackServant.java
+++ b/telecomm/java/android/telecom/VideoCallbackServant.java
@@ -14,10 +14,10 @@
R* limitations under the License.
*/
-package android.telecomm;
+package android.telecom;
import com.android.internal.os.SomeArgs;
-import com.android.internal.telecomm.IVideoCallback;
+import com.android.internal.telecom.IVideoCallback;
import android.os.Handler;
import android.os.Message;
diff --git a/telecomm/java/android/telecomm/VideoProfile.aidl b/telecomm/java/android/telecom/VideoProfile.aidl
index e756fa771a53..091b5697aba2 100644
--- a/telecomm/java/android/telecomm/VideoProfile.aidl
+++ b/telecomm/java/android/telecom/VideoProfile.aidl
@@ -15,7 +15,7 @@
*/
-package android.telecomm;
+package android.telecom;
/**
* {@hide}
diff --git a/telecomm/java/android/telecomm/VideoProfile.java b/telecomm/java/android/telecom/VideoProfile.java
index 028d24e63d20..f5cb054b0f50 100644
--- a/telecomm/java/android/telecomm/VideoProfile.java
+++ b/telecomm/java/android/telecom/VideoProfile.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package android.telecomm;
+package android.telecom;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/telecomm/java/android/telecomm/PropertyPresentation.java b/telecomm/java/android/telecomm/PropertyPresentation.java
deleted file mode 100644
index fe97b3d6be3e..000000000000
--- a/telecomm/java/android/telecomm/PropertyPresentation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2014, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telecomm;
-
-/**
- * Defines how properties such as phone numbers and names are displayed to the user.
- */
-public class PropertyPresentation {
- /** Property is displayed normally. */
- public static final int ALLOWED = 1;
-
- /** Property was blocked. */
- public static final int RESTRICTED = 2;
-
- /** Presentation was not specified or is unknown. */
- public static final int UNKNOWN = 3;
-
- /** Property should be displayed as a pay phone. */
- public static final int PAYPHONE = 4;
-}
diff --git a/telecomm/java/com/android/internal/telecomm/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
index a673733b7e84..1059da379dd4 100644
--- a/telecomm/java/com/android/internal/telecomm/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
@@ -14,19 +14,19 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
import android.os.Bundle;
-import android.telecomm.AudioState;
-import android.telecomm.ConnectionRequest;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.AudioState;
+import android.telecom.ConnectionRequest;
+import android.telecom.PhoneAccountHandle;
-import com.android.internal.telecomm.IConnectionServiceAdapter;
+import com.android.internal.telecom.IConnectionServiceAdapter;
/**
* Internal remote interface for connection services.
*
- * @see android.telecomm.ConnectionService
+ * @see android.telecom.ConnectionService
*
* @hide
*/
@@ -70,6 +70,4 @@ oneway interface IConnectionService {
void swapConference(String conferenceCallId);
void onPostDialContinue(String callId, boolean proceed);
-
- void onPhoneAccountClicked(String callId);
}
diff --git a/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl b/telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl
index 610178e9ff02..8f3506d63d91 100644
--- a/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl
@@ -14,22 +14,22 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
import android.app.PendingIntent;
import android.net.Uri;
-import android.telecomm.ConnectionRequest;
-import android.telecomm.ParcelableConnection;
-import android.telecomm.ParcelableConference;
-import android.telecomm.StatusHints;
+import android.telecom.ConnectionRequest;
+import android.telecom.ParcelableConnection;
+import android.telecom.ParcelableConference;
+import android.telecom.StatusHints;
-import com.android.internal.telecomm.IVideoProvider;
-import com.android.internal.telecomm.RemoteServiceCallback;
+import com.android.internal.telecom.IVideoProvider;
+import com.android.internal.telecom.RemoteServiceCallback;
/**
* Internal remote callback interface for connection services.
*
- * @see android.telecomm.ConnectionServiceAdapter
+ * @see android.telecom.ConnectionServiceAdapter
*
* {@hide}
*/
@@ -49,7 +49,7 @@ oneway interface IConnectionServiceAdapter {
void setOnHold(String callId);
- void setRequestingRingback(String callId, boolean ringing);
+ void setRingbackRequested(String callId, boolean ringing);
void setCallCapabilities(String callId, int callCapabilities);
@@ -67,11 +67,11 @@ oneway interface IConnectionServiceAdapter {
void setVideoState(String callId, int videoState);
- void setAudioModeIsVoip(String callId, boolean isVoip);
+ void setIsVoipAudioMode(String callId, boolean isVoip);
void setStatusHints(String callId, in StatusHints statusHints);
- void setHandle(String callId, in Uri handle, int presentation);
+ void setAddress(String callId, in Uri address, int presentation);
void setCallerDisplayName(String callId, String callerDisplayName, int presentation);
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
index 626bb91604bf..138a877cd843 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.PhoneAccountHandle;
/**
* Internal remote callback interface for in-call services.
*
- * @see android.telecomm.InCallAdapter
+ * @see android.telecom.InCallAdapter
*
* {@hide}
*/
@@ -46,8 +46,6 @@ oneway interface IInCallAdapter {
void postDialContinue(String callId, boolean proceed);
- void phoneAccountClicked(String callId);
-
void phoneAccountSelected(String callId, in PhoneAccountHandle accountHandle);
void conference(String callId, String otherCallId);
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl b/telecomm/java/com/android/internal/telecom/IInCallService.aidl
index 23dbaf47025c..35f6f65dd3df 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IInCallService.aidl
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
import android.app.PendingIntent;
-import android.telecomm.AudioState;
-import android.telecomm.ParcelableCall;
+import android.telecom.AudioState;
+import android.telecom.ParcelableCall;
-import com.android.internal.telecomm.IInCallAdapter;
+import com.android.internal.telecom.IInCallAdapter;
/**
* Internal remote interface for in-call services.
*
- * @see android.telecomm.InCallService
+ * @see android.telecom.InCallService
*
* {@hide}
*/
diff --git a/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
index 6ab78c40cb99..4875cc3fd660 100644
--- a/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
@@ -14,19 +14,19 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
import android.content.ComponentName;
-import android.telecomm.PhoneAccountHandle;
+import android.telecom.PhoneAccountHandle;
import android.os.Bundle;
-import android.telecomm.PhoneAccount;
+import android.telecom.PhoneAccount;
/**
- * Interface used to interact with Telecomm. Mostly this is used by TelephonyManager for passing
+ * Interface used to interact with Telecom. Mostly this is used by TelephonyManager for passing
* commands that were previously handled by ITelephony.
* {@hide}
*/
-interface ITelecommService {
+interface ITelecomService {
/**
* Brings the in-call screen to the foreground if there is an active call.
*
@@ -35,67 +35,87 @@ interface ITelecommService {
void showInCallScreen(boolean showDialpad);
/**
- * @see TelecommServiceImpl#getDefaultOutgoingPhoneAccount
+ * @see TelecomServiceImpl#getDefaultOutgoingPhoneAccount
*/
PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme);
/**
- * @see TelecommServiceImpl#getUserSelectedOutgoingPhoneAccount
+ * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount
*/
PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
/**
- * @see TelecommServiceImpl#setUserSelectedOutgoingPhoneAccount
+ * @see TelecomServiceImpl#setUserSelectedOutgoingPhoneAccount
*/
void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account);
/**
- * @see TelecommServiceImpl#getOutgoingPhoneAccounts
+ * @see TelecomServiceImpl#getEnabledPhoneAccounts
*/
- List<PhoneAccountHandle> getOutgoingPhoneAccounts();
+ List<PhoneAccountHandle> getEnabledPhoneAccounts();
/**
- * @see TelecommManager#getPhoneAccountsSupportingScheme
+ * @see TelecomManager#getPhoneAccountsSupportingScheme
*/
List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme);
/**
- * @see TelecommManager#getPhoneAccount
+ * @see TelecomManager#getPhoneAccount
*/
PhoneAccount getPhoneAccount(in PhoneAccountHandle account);
/**
- * @see TelecommServiceImpl#getSimCallManager
+ * @see TelecomManager#getAllPhoneAccountsCount
+ */
+ int getAllPhoneAccountsCount();
+
+ /**
+ * @see TelecomManager#getAllPhoneAccounts
+ */
+ List<PhoneAccount> getAllPhoneAccounts();
+
+ /**
+ * @see TelecomManager#getAllPhoneAccountHandles
+ */
+ List<PhoneAccountHandle> getAllPhoneAccountHandles();
+
+ /**
+ * @see TelecomServiceImpl#getSimCallManager
*/
PhoneAccountHandle getSimCallManager();
/**
- * @see TelecommServiceImpl#setSimCallManager
+ * @see TelecomServiceImpl#setSimCallManager
*/
void setSimCallManager(in PhoneAccountHandle account);
/**
- * @see TelecommServiceImpl#getSimCallManagers
+ * @see TelecomServiceImpl#getSimCallManagers
*/
List<PhoneAccountHandle> getSimCallManagers();
/**
- * @see TelecommServiceImpl#registerPhoneAccount
+ * @see TelecomServiceImpl#setPhoneAccountEnabled
+ */
+ void setPhoneAccountEnabled(in PhoneAccountHandle account, in boolean isEnabled);
+
+ /**
+ * @see TelecomServiceImpl#registerPhoneAccount
*/
void registerPhoneAccount(in PhoneAccount metadata);
/**
- * @see TelecommServiceImpl#unregisterPhoneAccount
+ * @see TelecomServiceImpl#unregisterPhoneAccount
*/
void unregisterPhoneAccount(in PhoneAccountHandle account);
/**
- * @see TelecommServiceImpl#clearAccounts
+ * @see TelecomServiceImpl#clearAccounts
*/
void clearAccounts(String packageName);
/**
- * @see TelecommServiceImpl#getDefaultPhoneApp
+ * @see TelecomServiceImpl#getDefaultPhoneApp
*/
ComponentName getDefaultPhoneApp();
@@ -104,52 +124,57 @@ interface ITelecommService {
//
/**
- * @see TelecommServiceImpl#silenceRinger
+ * @see TelecomServiceImpl#silenceRinger
*/
void silenceRinger();
/**
- * @see TelecommServiceImpl#isInCall
+ * @see TelecomServiceImpl#isInCall
*/
boolean isInCall();
/**
- * @see TelecommServiceImpl#isRinging
+ * @see TelecomServiceImpl#isRinging
*/
boolean isRinging();
/**
- * @see TelecommServiceImpl#endCall
+ * @see TelecomServiceImpl#getCallState
+ */
+ int getCallState();
+
+ /**
+ * @see TelecomServiceImpl#endCall
*/
boolean endCall();
/**
- * @see TelecommServiceImpl#acceptRingingCall
+ * @see TelecomServiceImpl#acceptRingingCall
*/
void acceptRingingCall();
/**
- * @see TelecommServiceImpl#cancelMissedCallsNotification
+ * @see TelecomServiceImpl#cancelMissedCallsNotification
*/
void cancelMissedCallsNotification();
/**
- * @see TelecommServiceImpl#handleMmi
+ * @see TelecomServiceImpl#handleMmi
*/
boolean handlePinMmi(String dialString);
/**
- * @see TelecommServiceImpl#isTtySupported
+ * @see TelecomServiceImpl#isTtySupported
*/
boolean isTtySupported();
/**
- * @see TelecommServiceImpl#getCurrentTtyMode
+ * @see TelecomServiceImpl#getCurrentTtyMode
*/
int getCurrentTtyMode();
/**
- * @see TelecommServiceImpl#addNewIncomingCall
+ * @see TelecomServiceImpl#addNewIncomingCall
*/
void addNewIncomingCall(in PhoneAccountHandle phoneAccount, in Bundle extras);
}
diff --git a/telecomm/java/com/android/internal/telecomm/IVideoCallback.aidl b/telecomm/java/com/android/internal/telecom/IVideoCallback.aidl
index 186f083dc633..f758b600415f 100644
--- a/telecomm/java/com/android/internal/telecomm/IVideoCallback.aidl
+++ b/telecomm/java/com/android/internal/telecom/IVideoCallback.aidl
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
-import android.telecomm.CameraCapabilities;
-import android.telecomm.VideoProfile;
+import android.telecom.CameraCapabilities;
+import android.telecom.VideoProfile;
/**
* Internal definition of a callback interface, used for an InCallUi to respond to video
* telephony changes.
*
- * @see android.telecomm.InCallService.VideoCall.Listener
+ * @see android.telecom.InCallService.VideoCall.Listener
*
* {@hide}
*/
diff --git a/telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl b/telecomm/java/com/android/internal/telecom/IVideoProvider.aidl
index b0aa9884223f..e96d9d3d7eb7 100644
--- a/telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl
+++ b/telecomm/java/com/android/internal/telecom/IVideoProvider.aidl
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
import android.view.Surface;
-import android.telecomm.VideoProfile;
+import android.telecom.VideoProfile;
/**
* Internal remote interface for a video call provider.
- * @see android.telecomm.VideoProvider
+ * @see android.telecom.VideoProvider
* @hide
*/
oneway interface IVideoProvider {
diff --git a/telecomm/java/com/android/internal/telecomm/RemoteServiceCallback.aidl b/telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl
index 0ab75645bafa..441704d0c67e 100644
--- a/telecomm/java/com/android/internal/telecomm/RemoteServiceCallback.aidl
+++ b/telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.internal.telecomm;
+package com.android.internal.telecom;
import android.content.ComponentName;
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index aa6c47c35df7..6366c9113e14 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -155,7 +155,7 @@ public class DisconnectCause {
public static final int OUTGOING_FAILURE = 43;
/**
- * The outgoing call was canceled by the {@link android.telecomm.ConnectionService}.
+ * The outgoing call was canceled by the {@link android.telecom.ConnectionService}.
*/
public static final int OUTGOING_CANCELED = 44;
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index d0f355e9e491..fe68263961a1 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -930,13 +930,20 @@ public class SubscriptionManager implements BaseColumns {
/** @hide */
public static boolean isValidSlotId(int slotId) {
- return slotId > INVALID_SLOT_ID && slotId < TelephonyManager.getDefault().getSimCount();
+ // We are testing INVALID_SLOT_ID and slotId >= 0 independently because we should
+ // not assume that INVALID_SLOT_ID will always be a negative value. Any negative
+ // value is invalid.
+ return slotId != INVALID_SLOT_ID && slotId >= 0 &&
+ slotId < TelephonyManager.getDefault().getSimCount();
}
/** @hide */
public static boolean isValidPhoneId(int phoneId) {
- return phoneId > INVALID_PHONE_ID
- && phoneId < TelephonyManager.getDefault().getPhoneCount();
+ // We are testing INVALID_PHONE_ID and phoneId >= 0 independently because we should
+ // not assume that INVALID_PHONE_ID will always be a negative value. Any negative
+ // value is invalid.
+ return phoneId != INVALID_PHONE_ID && phoneId >= 0 &&
+ phoneId < TelephonyManager.getDefault().getPhoneCount();
}
/** @hide */
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index d53be4f02ffe..34b1454158d9 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -26,9 +26,8 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.util.Log;
-import android.util.Pair;
-import com.android.internal.telecomm.ITelecommService;
+import com.android.internal.telecom.ITelecomService;
import com.android.internal.telephony.IPhoneSubInfo;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.ITelephonyRegistry;
@@ -63,8 +62,6 @@ import java.util.regex.Pattern;
public class TelephonyManager {
private static final String TAG = "TelephonyManager";
- private static final String TELECOMM_SERVICE_NAME = "telecomm";
-
private static ITelephonyRegistry sRegistry;
/**
@@ -1738,10 +1735,10 @@ public class TelephonyManager {
}
/**
- * Set the phone number string and its alphatag for line 1 for display
- * purpose only, for example, displayed in Phone Status. It won't change
- * the actual MSISDN/MDN. This setting won't be persisted during power cycle
- * and it should be set again after reboot.
+ * Set the line 1 phone number string and its alphatag for the current ICCID
+ * for display purpose only, for example, displayed in Phone Status. It won't
+ * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
+ * value.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
@@ -1755,10 +1752,10 @@ public class TelephonyManager {
}
/**
- * Set the phone number string and its alphatag for line 1 for display
- * purpose only, for example, displayed in Phone Status. It won't change
- * the actual MSISDN/MDN. This setting won't be persisted during power cycle
- * and it should be set again after reboot.
+ * Set the line 1 phone number string and its alphatag for the current ICCID
+ * for display purpose only, for example, displayed in Phone Status. It won't
+ * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
+ * value.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
@@ -2048,7 +2045,11 @@ public class TelephonyManager {
* Returns a constant indicating the call state (cellular) on the device.
*/
public int getCallState() {
- return getCallState(getDefaultSubscription());
+ try {
+ return getTelecomService().getCallState();
+ } catch (RemoteException | NullPointerException e) {
+ return CALL_STATE_IDLE;
+ }
}
/**
@@ -2145,8 +2146,8 @@ public class TelephonyManager {
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
}
- private ITelecommService getTelecommService() {
- return ITelecommService.Stub.asInterface(ServiceManager.getService(TELECOMM_SERVICE_NAME));
+ private ITelecomService getTelecomService() {
+ return ITelecomService.Stub.asInterface(ServiceManager.getService(Context.TELECOM_SERVICE));
}
//
@@ -3135,9 +3136,9 @@ public class TelephonyManager {
@SystemApi
public void silenceRinger() {
try {
- getTelecommService().silenceRinger();
+ getTelecomService().silenceRinger();
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelecommService#silenceRinger", e);
+ Log.e(TAG, "Error calling ITelecomService#silenceRinger", e);
}
}
@@ -3359,8 +3360,8 @@ public class TelephonyManager {
}
/**
- * Set whether Android should display a simplified Mobile Network Settings UI.
- * The setting won't be persisted during power cycle.
+ * Set whether Android should display a simplified Mobile Network Settings UI
+ * for the current ICCID.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
@@ -3374,8 +3375,8 @@ public class TelephonyManager {
}
/**
- * Set whether Android should display a simplified Mobile Network Settings UI.
- * The setting won't be persisted during power cycle.
+ * Set whether Android should display a simplified Mobile Network Settings UI
+ * for the current ICCID.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
@@ -3394,7 +3395,8 @@ public class TelephonyManager {
}
/**
- * Get whether a simplified Mobile Network Settings UI is enabled.
+ * Get whether a simplified Mobile Network Settings UI is enabled for the
+ * current ICCID.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
@@ -3407,7 +3409,8 @@ public class TelephonyManager {
}
/**
- * Get whether a simplified Mobile Network Settings UI is enabled.
+ * Get whether a simplified Mobile Network Settings UI is enabled for the
+ * current ICCID.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/com/android/ims/ImsCallProfile.java
index 767ecf9ed7ea..8b7901ccda76 100644
--- a/telephony/java/com/android/ims/ImsCallProfile.java
+++ b/telephony/java/com/android/ims/ImsCallProfile.java
@@ -19,7 +19,7 @@ package com.android.ims;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
-import android.telecomm.VideoProfile;
+import android.telecom.VideoProfile;
import com.android.internal.telephony.PhoneConstants;
diff --git a/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl b/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl
index 67bfe416978f..f867fcbac7fa 100644
--- a/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl
+++ b/telephony/java/com/android/ims/internal/IImsVideoCallCallback.aidl
@@ -16,8 +16,8 @@
package com.android.ims.internal;
-import android.telecomm.CameraCapabilities;
-import android.telecomm.VideoProfile;
+import android.telecom.CameraCapabilities;
+import android.telecom.VideoProfile;
/**
* Internal remote interface for IMS's video call provider.
@@ -26,8 +26,8 @@ import android.telecomm.VideoProfile;
* separate aidl interface for invoking callbacks in Telephony from the IMS Service to without
* accessing internal interfaces. See {@link IImsVideoCallProvider} for additional detail.
*
- * @see android.telecomm.internal.IVideoCallCallback
- * @see android.telecomm.VideoCallImpl
+ * @see android.telecom.internal.IVideoCallCallback
+ * @see android.telecom.VideoCallImpl
*
* {@hide}
*/
diff --git a/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl b/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl
index 4db0d1460967..1fd88e701eb3 100644
--- a/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl
+++ b/telephony/java/com/android/ims/internal/IImsVideoCallProvider.aidl
@@ -17,7 +17,7 @@
package com.android.ims.internal;
import android.view.Surface;
-import android.telecomm.VideoProfile;
+import android.telecom.VideoProfile;
import com.android.ims.internal.IImsVideoCallCallback;
@@ -35,8 +35,8 @@ import com.android.ims.internal.IImsVideoCallCallback;
* video call provider will not have the benefit of accessing the internal
* {@link IVideoCallProvider} aidl for interprocess communication.
*
- * @see android.telecomm.internal.IVideoCallProvider
- * @see android.telecomm.VideoCallProvider
+ * @see android.telecom.internal.IVideoCallProvider
+ * @see android.telecom.VideoCallProvider
* @hide
*/
oneway interface IImsVideoCallProvider {
diff --git a/telephony/java/com/android/internal/telephony/IMms.aidl b/telephony/java/com/android/internal/telephony/IMms.aidl
index 433701278de0..ebfefd199497 100644
--- a/telephony/java/com/android/internal/telephony/IMms.aidl
+++ b/telephony/java/com/android/internal/telephony/IMms.aidl
@@ -62,24 +62,37 @@ interface IMms {
/**
* Update the status of a pending (send-by-IP) MMS message handled by the carrier app.
- * If the carrier app fails to send this message, it would be resent via carrier network.
+ * If the carrier app fails to send this message, it may be resent via carrier network
+ * depending on the status code.
+ *
+ * The caller should have carrier privileges.
+ * @see android.telephony.TelephonyManager.hasCarrierPrivileges
*
* @param messageRef the reference number of the MMS message.
- * @param success True if and only if the message was sent successfully. If its value is
- * false, this message should be resent via carrier network
+ * @param pdu non-empty (contains the SendConf PDU) if the message was sent successfully,
+ * otherwise, this param should be null.
+ * @param status send status. It can be Activity.RESULT_OK or one of the MMS error codes.
+ * If status is Activity.RESULT_OK, the MMS was sent successfully.
+ * If status is MMS_ERROR_RETRY, this message would be resent via carrier
+ * network. The message will not be resent for other MMS error statuses.
*/
- void updateMmsSendStatus(int messageRef, boolean success);
+ void updateMmsSendStatus(int messageRef, in byte[] pdu, in int status);
/**
* Update the status of a pending (download-by-IP) MMS message handled by the carrier app.
- * If the carrier app fails to download this message, it would be re-downloaded via carrier
- * network.
+ * If the carrier app fails to download this message, it may be re-downloaded via carrier
+ * network depending on the status code.
+ *
+ * The caller should have carrier privileges.
+ * @see android.telephony.TelephonyManager.hasCarrierPrivileges
*
* @param messageRef the reference number of the MMS message.
- * @param pdu non-empty if downloaded successfully, otherwise, it is empty and the message
- * will be downloaded via carrier network
+ * @param status download status. It can be Activity.RESULT_OK or one of the MMS error codes.
+ * If status is Activity.RESULT_OK, the MMS was downloaded successfully.
+ * If status is MMS_ERROR_RETRY, this message would be re-downloaded via carrier
+ * network. The message will not be re-downloaded for other MMS error statuses.
*/
- void updateMmsDownloadStatus(int messageRef, in byte[] pdu);
+ void updateMmsDownloadStatus(int messageRef, in int status);
/**
* Get carrier-dependent configuration values.
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index fa9cad488fe2..0868f41855f9 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -709,8 +709,8 @@ interface ITelephony {
List<String> getCarrierPackageNamesForIntent(in Intent intent);
/**
- * Set whether Android should display a simplified Mobile Network Settings UI.
- * The setting won't be persisted during power cycle.
+ * Set whether Android should display a simplified Mobile Network Settings UI
+ * for the current ICCID.
*
* @param subId for which the simplified UI should be enabled or disabled.
* @param enable true means enabling the simplified UI.
@@ -718,7 +718,8 @@ interface ITelephony {
void enableSimplifiedNetworkSettingsForSubscriber(long subId, boolean enable);
/**
- * Get whether a simplified Mobile Network Settings UI is enabled.
+ * Get whether a simplified Mobile Network Settings UI is enabled for the
+ * current ICCID.
*
* @param subId for which the simplified UI should be enabled or disabled.
* @return true if the simplified UI is enabled.
@@ -726,10 +727,10 @@ interface ITelephony {
boolean getSimplifiedNetworkSettingsEnabledForSubscriber(long subId);
/**
- * Set the phone number string and its alphatag for line 1 for display
- * purpose only, for example, displayed in Phone Status. It won't change
- * the actual MSISDN/MDN. This setting won't be persisted during power cycle
- * and it should be set again after reboot.
+ * Set the line 1 phone number string and its alphatag for the current ICCID
+ * for display purpose only, for example, displayed in Phone Status. It won't
+ * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
+ * value.
*
* @param subId the subscriber that the alphatag and dialing number belongs to.
* @param alphaTag alpha-tagging of the dailing nubmer
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index 5a4e0eb79668..afe1d5dba9e9 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -790,24 +790,6 @@ public class MockPackageManager extends PackageManager {
/**
* @hide
*/
- @Override
- public void addCrossProfileIntentsForPackage(String packageName, int sourceUserId,
- int targetUserId) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @hide
- */
- @Override
- public void removeCrossProfileIntentsForPackage(String packageName, int sourceUserId,
- int targetUserId) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @hide
- */
public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
throw new UnsupportedOperationException();
}
diff --git a/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/service/TestJobService.java b/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/service/TestJobService.java
index a68e04ef1cb2..9df11fe90553 100644
--- a/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/service/TestJobService.java
+++ b/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/service/TestJobService.java
@@ -29,6 +29,7 @@ import android.os.Messenger;
import android.os.RemoteException;
import android.util.Log;
import android.util.SparseArray;
+import android.widget.Toast;
import com.android.demo.jobSchedulerApp.MainActivity;
@@ -84,12 +85,15 @@ public class TestJobService extends JobService {
currentId++;
jobParamsMap.put(currentId, params);
final int currId = this.currentId;
- Log.d(TAG, "putting :" + currId + " for " + params.toString());
- Log.d(TAG, " pulled: " + jobParamsMap.get(currId));
if (mActivity != null) {
mActivity.onReceivedStartJob(params);
}
+ Toast.makeText(
+ this, "On start job: '" + params.getJobId() + "' deadline exceeded: " +
+ params.isOverrideDeadlineExpired(),
+ Toast.LENGTH_LONG).show();
+
return true;
}
@@ -100,7 +104,7 @@ public class TestJobService extends JobService {
int ind = jobParamsMap.indexOfValue(params);
jobParamsMap.remove(ind);
mActivity.onReceivedStopJob();
- return true;
+ return false; // no reschedule
}
static int currentId = 0;
@@ -129,6 +133,7 @@ public class TestJobService extends JobService {
return false;
} else {
jobFinished(params, false);
+ jobParamsMap.removeAt(0);
return true;
}
}
diff --git a/tests/StatusBar/src/com/android/statusbartest/PowerTest.java b/tests/StatusBar/src/com/android/statusbartest/PowerTest.java
index 2ec620bdfcb8..52527d914215 100644
--- a/tests/StatusBar/src/com/android/statusbartest/PowerTest.java
+++ b/tests/StatusBar/src/com/android/statusbartest/PowerTest.java
@@ -77,9 +77,9 @@ public class PowerTest extends TestActivity
mProx.release();
}
},
- new Test("Disable proximity (WAIT_FOR_DISTANT_PROXIMITY") {
+ new Test("Disable proximity (RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY") {
public void run() {
- mProx.release(PowerManager.WAIT_FOR_DISTANT_PROXIMITY);
+ mProx.release(PowerManager.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY);
}
},
new Test("Enable proximity, wait 5 seconds then disable") {
@@ -93,13 +93,14 @@ public class PowerTest extends TestActivity
}, 5000);
}
},
- new Test("Enable proximity, wait 5 seconds then disable (WAIT_FOR_DISTANT_PROXIMITY)") {
+ new Test("Enable proximity, wait 5 seconds then disable " +
+ "(RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY)") {
public void run() {
mProx.acquire();
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
- mProx.release(PowerManager.WAIT_FOR_DISTANT_PROXIMITY);
+ mProx.release(PowerManager.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY);
}
}, 5000);
}
diff --git a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
index 31e7c38d3a03..d9a3b6171ffc 100644
--- a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
+++ b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
@@ -86,7 +86,10 @@ public class UsageLogActivity extends ListActivity implements Runnable {
}
mEvents.addFirst(event);
}
- notifyDataSetChanged();
+
+ if (lastTimeStamp != 0) {
+ notifyDataSetChanged();
+ }
return lastTimeStamp;
}
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml b/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml
new file mode 100644
index 000000000000..1a81866669bc
--- /dev/null
+++ b/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:duration="9000"
+ android:propertyName="alpha"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"/>
+
+</set> \ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
index 19b82adcc143..8b0ceda4939f 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
+++ b/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
@@ -37,5 +37,8 @@
<target
android:name="rotationGroup"
android:animation="@anim/trim_path_animation04" />
+ <target
+ android:name="rootGroup"
+ android:animation="@anim/trim_path_animation06" />
</animated-vector> \ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml
index bbf1a17d35b1..f94ecba1ffb8 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml
@@ -28,7 +28,8 @@
l-5.046875,0.0 0.0-1.0Z" />
<path
android:name="two"
- android:fillColor="#00ffff00"
+ android:fillColor="#ffff00"
+ android:fillAlpha="0"
android:pathData="M 2.534375,9.6875l 4.140625,0.0 0.0,1.0-5.5625,0.0 0.0-1.0q 0.671875-0.6875 1.828125-1.859375
q 1.1718752-1.1875 1.4687502-1.53125 0.578125-0.625 0.796875-1.0625
q 0.234375-0.453125 0.234375-0.875 0.0-0.703125-0.5-1.140625
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml
index 2c8b75118dfe..69ae62c19aba 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml
@@ -14,10 +14,12 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:name="rootGroup"
android:height="64dp"
android:width="64dp"
android:viewportHeight="600"
- android:viewportWidth="600" >
+ android:viewportWidth="600"
+ android:alpha="0.5" >
<group
android:name="rotationGroup"
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml b/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
index 1aad743065e1..3f79968d88a9 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
@@ -21,10 +21,12 @@ limitations under the License.
<group>
<path
- android:fillColor="#E6000000"
+ android:fillColor="#FF000000"
+ android:fillAlpha="0.9"
android:pathData="M11.994999,2.0C6.4679985,2.0 2.0,6.4780006 2.0,12.0s4.468,10.0 9.995,10.0S22.0,17.522 22.0,12.0S17.521,2.0 11.994999,2.0zM12.0,20.0c-4.42,0.0 -8.0,-3.582 -8.0,-8.0s3.58,-8.0 8.0,-8.0s8.0,3.582 8.0,8.0S16.419998,20.0 12.0,20.0z" />
<path
- android:fillColor="#E6000000"
+ android:fillColor="#FF000000"
+ android:fillAlpha="0.9"
android:pathData="M12.5,6.0l-1.5,0.0 0.0,7.0 5.3029995,3.1819992 0.75,-1.249999 -4.5529995,-2.7320004z" />
</group>
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
index f165cde79bc5..05bf166a98ce 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
+++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
@@ -31,6 +31,8 @@ public class AnimatedVectorDrawableTest extends Activity implements View.OnClick
R.drawable.animation_vector_progress_bar,
R.drawable.animation_vector_drawable_favorite,
R.drawable.animation_vector_drawable01,
+ // Duplicate to test constant state.
+ R.drawable.animation_vector_drawable01,
};
@Override
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 27e60f3b85d7..41d8502c5331 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -2390,7 +2390,8 @@ int doPackage(Bundle* bundle)
char* packageString = strtok(libs.lockBuffer(libs.length()), ":");
while (packageString != NULL) {
// Write the R.java file out with the correct package name
- err = writeResourceSymbols(bundle, assets, String8(packageString), true, false);
+ err = writeResourceSymbols(bundle, assets, String8(packageString), true,
+ bundle->getBuildSharedLibrary());
if (err < 0) {
goto bail;
}
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 5deeca2e03bc..afec5edd3f0f 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -1926,110 +1926,75 @@ static String16 getAttributeComment(const sp<AaptAssets>& assets,
return String16();
}
-static void writeResourceLoadedCallback(FILE* fp, int indent) {
- IndentPrinter p(fp, 4);
- p.indent(indent);
- p.println("private static void rewriteIntArrayField(java.lang.reflect.Field field, int packageId) throws IllegalAccessException {");
- {
- p.indent();
- p.println("int requiredModifiers = java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.PUBLIC;");
- p.println("if ((field.getModifiers() & requiredModifiers) != requiredModifiers) {");
- {
- p.indent();
- p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not rewritable\");");
- p.indent(-1);
- }
- p.println("}");
- p.println("if (field.getType() != int[].class) {");
- {
- p.indent();
- p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not an int array\");");
- p.indent(-1);
- }
- p.println("}");
- p.println("int[] array = (int[]) field.get(null);");
- p.println("for (int i = 0; i < array.length; i++) {");
- {
- p.indent();
- p.println("array[i] = (array[i] & 0x00ffffff) | (packageId << 24);");
- p.indent(-1);
- }
- p.println("}");
- p.indent(-1);
- }
- p.println("}");
- p.println();
- p.println("private static void rewriteIntField(java.lang.reflect.Field field, int packageId) throws IllegalAccessException {");
- {
- p.indent();
- p.println("int requiredModifiers = java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.PUBLIC;");
- p.println("int bannedModifiers = java.lang.reflect.Modifier.FINAL;");
- p.println("int mod = field.getModifiers();");
- p.println("if ((mod & requiredModifiers) != requiredModifiers || (mod & bannedModifiers) != 0) {");
- {
- p.indent();
- p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not rewritable\");");
- p.indent(-1);
- }
- p.println("}");
- p.println("if (field.getType() != int.class && field.getType() != Integer.class) {");
- {
- p.indent();
- p.println("throw new IllegalArgumentException(\"Field \" + field.getName() + \" is not an int\");");
- p.indent(-1);
- }
- p.println("}");
- p.println("int resId = field.getInt(null);");
- p.println("field.setInt(null, (resId & 0x00ffffff) | (packageId << 24));");
- p.indent(-1);
- }
- p.println("}");
- p.println();
- p.println("public static void onResourcesLoaded(int assignedPackageId) throws Exception {");
- {
- p.indent();
- p.println("Class<?>[] declaredClasses = R.class.getDeclaredClasses();");
- p.println("for (Class<?> clazz : declaredClasses) {");
- {
- p.indent();
- p.println("if (clazz.getSimpleName().equals(\"styleable\")) {");
- {
- p.indent();
- p.println("for (java.lang.reflect.Field field : clazz.getDeclaredFields()) {");
- {
- p.indent();
- p.println("if (field.getType() == int[].class) {");
- {
- p.indent();
- p.println("rewriteIntArrayField(field, assignedPackageId);");
- p.indent(-1);
- }
- p.println("}");
- p.indent(-1);
- }
- p.println("}");
- p.indent(-1);
- }
- p.println("} else {");
- {
- p.indent();
- p.println("for (java.lang.reflect.Field field : clazz.getDeclaredFields()) {");
- {
- p.indent();
- p.println("rewriteIntField(field, assignedPackageId);");
- p.indent(-1);
- }
- p.println("}");
- p.indent(-1);
- }
- p.println("}");
- p.indent(-1);
+static status_t writeResourceLoadedCallbackForLayoutClasses(
+ FILE* fp, const sp<AaptAssets>& assets,
+ const sp<AaptSymbols>& symbols, int indent, bool includePrivate)
+{
+ String16 attr16("attr");
+ String16 package16(assets->getPackage());
+
+ const char* indentStr = getIndentSpace(indent);
+ bool hasErrors = false;
+
+ size_t i;
+ size_t N = symbols->getNestedSymbols().size();
+ for (i=0; i<N; i++) {
+ sp<AaptSymbols> nsymbols = symbols->getNestedSymbols().valueAt(i);
+ String8 realClassName(symbols->getNestedSymbols().keyAt(i));
+ String8 nclassName(flattenSymbol(realClassName));
+
+ fprintf(fp,
+ "%sfor(int i = 0; i < styleable.%s.length; ++i) {\n"
+ "%sstyleable.%s[i] = (styleable.%s[i] & 0x00ffffff) | (packageId << 24);\n"
+ "%s}\n",
+ indentStr, nclassName.string(),
+ getIndentSpace(indent+1), nclassName.string(), nclassName.string(),
+ indentStr);
+ }
+
+ return hasErrors ? UNKNOWN_ERROR : NO_ERROR;
+}
+
+static status_t writeResourceLoadedCallback(
+ FILE* fp, const sp<AaptAssets>& assets, bool includePrivate,
+ const sp<AaptSymbols>& symbols, const String8& className, int indent)
+{
+ size_t i;
+ status_t err = NO_ERROR;
+
+ size_t N = symbols->getSymbols().size();
+ for (i=0; i<N; i++) {
+ const AaptSymbolEntry& sym = symbols->getSymbols().valueAt(i);
+ if (sym.typeCode == AaptSymbolEntry::TYPE_UNKNOWN) {
+ continue;
+ }
+ if (!assets->isJavaSymbol(sym, includePrivate)) {
+ continue;
+ }
+ String8 flat_name(flattenSymbol(sym.name));
+ fprintf(fp,
+ "%s%s.%s = (%s.%s & 0x00ffffff) | (packageId << 24);\n",
+ getIndentSpace(indent), className.string(), flat_name.string(),
+ className.string(), flat_name.string());
+ }
+
+ N = symbols->getNestedSymbols().size();
+ for (i=0; i<N; i++) {
+ sp<AaptSymbols> nsymbols = symbols->getNestedSymbols().valueAt(i);
+ String8 nclassName(symbols->getNestedSymbols().keyAt(i));
+ if (nclassName == "styleable") {
+ err = writeResourceLoadedCallbackForLayoutClasses(
+ fp, assets, nsymbols, indent, includePrivate);
+ } else {
+ err = writeResourceLoadedCallback(fp, assets, includePrivate, nsymbols,
+ nclassName, indent);
+ }
+ if (err != NO_ERROR) {
+ return err;
}
- p.println("}");
- p.indent(-1);
}
- p.println("}");
- p.println();
+
+ return NO_ERROR;
}
static status_t writeLayoutClasses(
@@ -2485,7 +2450,10 @@ static status_t writeSymbolClass(
}
if (emitCallback) {
- writeResourceLoadedCallback(fp, indent);
+ fprintf(fp, "%spublic static void onResourcesLoaded(int packageId) {\n",
+ getIndentSpace(indent));
+ writeResourceLoadedCallback(fp, assets, includePrivate, symbols, className, indent + 1);
+ fprintf(fp, "%s}\n", getIndentSpace(indent));
}
indent--;
diff --git a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
index bd80cb8b2374..bef5181339b8 100644
--- a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java
@@ -16,6 +16,8 @@
package android.graphics;
+import com.android.annotations.NonNull;
+import com.android.annotations.Nullable;
import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.impl.DelegateManager;
@@ -50,10 +52,12 @@ import static android.graphics.Typeface_Delegate.SYSTEM_FONTS;
*/
public class FontFamily_Delegate {
+ public static final int DEFAULT_FONT_WEIGHT = 400;
+ public static final int BOLD_FONT_WEIGHT_DELTA = 300;
+ public static final int BOLD_FONT_WEIGHT = 700;
+
// FONT_SUFFIX_ITALIC will always match FONT_SUFFIX_BOLDITALIC and hence it must be checked
// separately.
- private static final String FONT_SUFFIX_BOLDITALIC = "BoldItalic.ttf";
- private static final String FONT_SUFFIX_BOLD = "Bold.ttf";
private static final String FONT_SUFFIX_ITALIC = "Italic.ttf";
private static final String FN_ALL_FONTS_LIST = "fontsInSdk.txt";
@@ -61,9 +65,10 @@ public class FontFamily_Delegate {
* A class associating {@link Font} with its metadata.
*/
private static final class FontInfo {
+ @Nullable
Font mFont;
- /** Regular, Bold, Italic, or BoldItalic. */
- int mStyle;
+ int mWeight;
+ boolean mIsItalic;
}
// ---- delegate manager ----
@@ -79,16 +84,18 @@ public class FontFamily_Delegate {
// ---- delegate data ----
private List<FontInfo> mFonts = new ArrayList<FontInfo>();
+
/**
* The variant of the Font Family - compact or elegant.
+ * <p/>
* 0 is unspecified, 1 is compact and 2 is elegant. This needs to be kept in sync with values in
* android.graphics.FontFamily
*
* @see Paint#setElegantTextHeight(boolean)
*/
private FontVariant mVariant;
- // Path of fonts that haven't been created since sFontLoader hasn't been initialized.
- private List<String> mPath = new ArrayList<String>();
+ // List of runnables to process fonts after sFontLoader is initialized.
+ private List<Runnable> mPostInitRunnables = new ArrayList<Runnable>();
/** @see #isValid() */
private boolean mValid = false;
@@ -139,27 +146,30 @@ public class FontFamily_Delegate {
sPostInitDelegate.clear();
}
- public Font getFont(int style) {
- FontInfo plainFont = null;
+ @Nullable
+ public Font getFont(int desiredWeight, boolean isItalic) {
+ FontInfo desiredStyle = new FontInfo();
+ desiredStyle.mWeight = desiredWeight;
+ desiredStyle.mIsItalic = isItalic;
+ FontInfo bestFont = null;
+ int bestMatch = Integer.MAX_VALUE;
for (FontInfo font : mFonts) {
- if (font.mStyle == style) {
- return font.mFont;
- }
- if (font.mStyle == Font.PLAIN && plainFont == null) {
- plainFont = font;
+ int match = computeMatch(font, desiredStyle);
+ if (match < bestMatch) {
+ bestMatch = match;
+ bestFont = font;
}
}
-
- // No font with the mentioned style is found. Try to derive one.
- if (plainFont != null && style > 0 && style < 4) {
- FontInfo styledFont = new FontInfo();
- styledFont.mFont = plainFont.mFont.deriveFont(style);
- styledFont.mStyle = style;
- // Add the font to the list of fonts so that we don't have to derive it the next time.
- mFonts.add(styledFont);
- return styledFont.mFont;
+ if (bestFont == null) {
+ return null;
}
- return null;
+ if (bestMatch == 0) {
+ return bestFont.mFont;
+ }
+ // Derive the font as required and add it to the list of Fonts.
+ deriveFont(bestFont, desiredStyle);
+ addFont(desiredStyle);
+ return desiredStyle.mFont;
}
public FontVariant getVariant() {
@@ -168,27 +178,14 @@ public class FontFamily_Delegate {
/**
* Returns if the FontFamily should contain any fonts. If this returns true and
- * {@link #getFont(int)} returns an empty list, it means that an error occurred while loading
- * the fonts. However, some fonts are deliberately skipped, for example they are not bundled
- * with the SDK. In such a case, this method returns false.
+ * {@link #getFont(int, boolean)} returns an empty list, it means that an error occurred while
+ * loading the fonts. However, some fonts are deliberately skipped, for example they are not
+ * bundled with the SDK. In such a case, this method returns false.
*/
public boolean isValid() {
return mValid;
}
- /*package*/ static int getFontStyle(String path) {
- int style = Font.PLAIN;
- String fontName = path.substring(path.lastIndexOf('/'));
- if (fontName.endsWith(FONT_SUFFIX_BOLDITALIC)) {
- style = Font.BOLD | Font.ITALIC;
- } else if (fontName.endsWith(FONT_SUFFIX_BOLD)) {
- style = Font.BOLD;
- } else if (fontName.endsWith(FONT_SUFFIX_ITALIC)) {
- style = Font.ITALIC;
- }
- return style;
- }
-
/*package*/ static Font loadFont(String path) {
if (path.startsWith(SYSTEM_FONTS) ) {
String relativePath = path.substring(SYSTEM_FONTS.length());
@@ -242,11 +239,16 @@ public class FontFamily_Delegate {
}
@LayoutlibDelegate
- /*package*/ static boolean nAddFont(long nativeFamily, String path) {
- FontFamily_Delegate delegate = getDelegate(nativeFamily);
+ /*package*/ static boolean nAddFont(long nativeFamily, final String path) {
+ final FontFamily_Delegate delegate = getDelegate(nativeFamily);
if (delegate != null) {
if (sFontLocation == null) {
- delegate.mPath.add(path);
+ delegate.mPostInitRunnables.add(new Runnable() {
+ @Override
+ public void run() {
+ delegate.addFont(path);
+ }
+ });
return true;
}
return delegate.addFont(path);
@@ -255,6 +257,25 @@ public class FontFamily_Delegate {
}
@LayoutlibDelegate
+ /*package*/ static boolean nAddFontWeightStyle(long nativeFamily, final String path,
+ final int weight, final boolean isItalic) {
+ final FontFamily_Delegate delegate = getDelegate(nativeFamily);
+ if (delegate != null) {
+ if (sFontLocation == null) {
+ delegate.mPostInitRunnables.add(new Runnable() {
+ @Override
+ public void run() {
+ delegate.addFont(path, weight, isItalic);
+ }
+ });
+ return true;
+ }
+ return delegate.addFont(path, weight, isItalic);
+ }
+ return false;
+ }
+
+ @LayoutlibDelegate
/*package*/ static boolean nAddFontFromAsset(long nativeFamily, AssetManager mgr, String path) {
Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"FontFamily.addFontFromAsset is not supported.", null, null);
@@ -265,15 +286,17 @@ public class FontFamily_Delegate {
// ---- private helper methods ----
private void init() {
- for (String path : mPath) {
- addFont(path);
+ for (Runnable postInitRunnable : mPostInitRunnables) {
+ postInitRunnable.run();
}
- mPath = null;
+ mPostInitRunnables = null;
}
- private boolean addFont(String path) {
- // If the font is not in the list of fonts bundled with the SDK, don't try to load it and
- // mark the FontFamily to be not valid.
+ private boolean addFont(@NonNull String path) {
+ return addFont(path, DEFAULT_FONT_WEIGHT, path.endsWith(FONT_SUFFIX_ITALIC));
+ }
+
+ private boolean addFont(@NonNull String path, int weight, boolean isItalic) {
if (path.startsWith(SYSTEM_FONTS) &&
!SDK_FONTS.contains(path.substring(SYSTEM_FONTS.length()))) {
return mValid = false;
@@ -286,9 +309,67 @@ public class FontFamily_Delegate {
}
FontInfo fontInfo = new FontInfo();
fontInfo.mFont = font;
- fontInfo.mStyle = getFontStyle(path);
- // TODO ensure that mFonts doesn't have the font with this style already.
+ fontInfo.mWeight = weight;
+ fontInfo.mIsItalic = isItalic;
+ addFont(fontInfo);
+ return true;
+ }
+
+ private boolean addFont(@NonNull FontInfo fontInfo) {
+ int weight = fontInfo.mWeight;
+ boolean isItalic = fontInfo.mIsItalic;
+ // The list is usually just two fonts big. So iterating over all isn't as bad as it looks.
+ // It's biggest for roboto where the size is 12.
+ for (FontInfo font : mFonts) {
+ if (font.mWeight == weight && font.mIsItalic == isItalic) {
+ return false;
+ }
+ }
mFonts.add(fontInfo);
return true;
}
+
+ /**
+ * Compute matching metric between two styles - 0 is an exact match.
+ */
+ private static int computeMatch(@NonNull FontInfo font1, @NonNull FontInfo font2) {
+ int score = Math.abs(font1.mWeight - font2.mWeight);
+ if (font1.mIsItalic != font2.mIsItalic) {
+ score += 200;
+ }
+ return score;
+ }
+
+ /**
+ * Try to derive a font from {@code srcFont} for the style in {@code outFont}.
+ * <p/>
+ * {@code outFont} is updated to reflect the style of the derived font.
+ * @param srcFont the source font
+ * @param outFont contains the desired font style. Updated to contain the derived font and
+ * its style
+ * @return outFont
+ */
+ @NonNull
+ private FontInfo deriveFont(@NonNull FontInfo srcFont, @NonNull FontInfo outFont) {
+ int desiredWeight = outFont.mWeight;
+ int srcWeight = srcFont.mWeight;
+ Font derivedFont = srcFont.mFont;
+ // Embolden the font if required.
+ if (desiredWeight >= BOLD_FONT_WEIGHT && desiredWeight - srcWeight > BOLD_FONT_WEIGHT_DELTA / 2) {
+ derivedFont = derivedFont.deriveFont(Font.BOLD);
+ srcWeight += BOLD_FONT_WEIGHT_DELTA;
+ }
+ // Italicize the font if required.
+ if (outFont.mIsItalic && !srcFont.mIsItalic) {
+ derivedFont = derivedFont.deriveFont(Font.ITALIC);
+ } else if (outFont.mIsItalic != srcFont.mIsItalic) {
+ // The desired font is plain, but the src font is italics. We can't convert it back. So
+ // we update the value to reflect the true style of the font we're deriving.
+ outFont.mIsItalic = srcFont.mIsItalic;
+ }
+ outFont.mFont = derivedFont;
+ outFont.mWeight = srcWeight;
+ // No need to update mIsItalics, as it's already been handled above.
+ return outFont;
+ }
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Shader_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Shader_Delegate.java
index 832d0a31f2c8..14e9960f8285 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Shader_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Shader_Delegate.java
@@ -76,22 +76,19 @@ public abstract class Shader_Delegate {
// ---- native methods ----
@LayoutlibDelegate
- /*package*/ static void nativeDestructor(long native_shader, long native_with_local_matrix) {
- // TODO: check what's native_with_local_matrix
+ /*package*/ static void nativeDestructor(long native_shader) {
sManager.removeJavaReferenceFor(native_shader);
}
@LayoutlibDelegate
- /*package*/ static long nativeSetLocalMatrix(long native_shader,
- long native_with_local_matrix, long matrix_instance) {
+ /*package*/ static void nativeSetLocalMatrix(long native_shader, long matrix_instance) {
// get the delegate from the native int.
Shader_Delegate shaderDelegate = sManager.getDelegate(native_shader);
if (shaderDelegate == null) {
- return 0;
+ return;
}
shaderDelegate.mLocalMatrix = Matrix_Delegate.getDelegate(matrix_instance);
- return 0;
}
// ---- Private delegate/helper methods ----
diff --git a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
index 72fe61c88923..276e134f3785 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
@@ -55,8 +55,9 @@ public final class Typeface_Delegate {
@NonNull
private final FontFamily_Delegate[] mFontFamilies; // the reference to FontFamily_Delegate.
- /** @see FontFamily_Delegate.FontInfo#mStyle */
+ /** @see Font#getStyle() */
private final int mStyle;
+ private final int mWeight;
private static long sDefaultTypeface;
@@ -84,11 +85,18 @@ public final class Typeface_Delegate {
@NonNull
public List<Font> getFonts(FontVariant variant) {
assert variant != FontVariant.NONE;
+
+ // Calculate the required weight based on style and weight of this typeface.
+ int weight = mWeight + ((mStyle & Font.BOLD) == 0 ? 0 : FontFamily_Delegate.BOLD_FONT_WEIGHT_DELTA);
+ if (weight > 900) {
+ weight = 900;
+ }
+ final boolean isItalic = (mStyle & Font.ITALIC) != 0;
List<Font> fonts = new ArrayList<Font>(mFontFamilies.length);
for (int i = 0; i < mFontFamilies.length; i++) {
FontFamily_Delegate ffd = mFontFamilies[i];
if (ffd != null && ffd.isValid()) {
- Font font = ffd.getFont(mStyle);
+ Font font = ffd.getFont(weight, isItalic);
if (font != null) {
FontVariant ffdVariant = ffd.getVariant();
if (ffdVariant == FontVariant.NONE) {
@@ -102,7 +110,7 @@ public final class Typeface_Delegate {
FontFamily_Delegate ffd2 = mFontFamilies[++i];
assert ffd2 != null;
FontVariant ffd2Variant = ffd2.getVariant();
- Font font2 = ffd2.getFont(mStyle);
+ Font font2 = ffd2.getFont(weight, isItalic);
assert ffd2Variant != FontVariant.NONE && ffd2Variant != ffdVariant
&& font2 != null;
// Add the font with the matching variant to the list.
@@ -135,7 +143,22 @@ public final class Typeface_Delegate {
return 0;
}
- return sManager.addNewDelegate(new Typeface_Delegate(delegate.mFontFamilies, style));
+ return sManager.addNewDelegate(new Typeface_Delegate(delegate.mFontFamilies, style,
+ delegate.mWeight));
+ }
+
+ @LayoutlibDelegate
+ /*package*/ static long nativeCreateWeightAlias(long native_instance, int weight) {
+ Typeface_Delegate delegate = sManager.getDelegate(native_instance);
+ if (delegate == null) {
+ delegate = sManager.getDelegate(sDefaultTypeface);
+ }
+ if (delegate == null) {
+ return 0;
+ }
+ Typeface_Delegate weightAlias =
+ new Typeface_Delegate(delegate.mFontFamilies, delegate.mStyle, weight);
+ return sManager.addNewDelegate(weightAlias);
}
@LayoutlibDelegate
@@ -176,7 +199,12 @@ public final class Typeface_Delegate {
// ---- Private delegate/helper methods ----
private Typeface_Delegate(@NonNull FontFamily_Delegate[] fontFamilies, int style) {
+ this(fontFamilies, style, FontFamily_Delegate.DEFAULT_FONT_WEIGHT);
+ }
+
+ public Typeface_Delegate(@NonNull FontFamily_Delegate[] fontFamilies, int style, int weight) {
mFontFamilies = fontFamilies;
mStyle = style;
+ mWeight = weight;
}
}
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index 21f200f28956..9ece434451ba 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -186,6 +186,8 @@ public class WifiConfiguration implements Parcelable {
public static final int DISABLED_AUTH_FAILURE = 3;
/** @hide */
public static final int DISABLED_ASSOCIATION_REJECT = 4;
+ /** @hide */
+ public static final int DISABLED_BY_WIFI_MANAGER = 5;
/**
* The ID number that the supplicant uses to identify this
@@ -367,9 +369,9 @@ public class WifiConfiguration implements Parcelable {
/**
* @hide
- * Uid of app owning the BSSID
+ * Uid used by autoJoin
*/
- public int bssidOwnerUid;
+ public String autoJoinBSSID;
/**
* @hide
@@ -438,11 +440,7 @@ public class WifiConfiguration implements Parcelable {
/** @hide
* 5GHz band is prefered low over 2.4 if the 5GHz RSSI is higher than this threshold */
- public static int A_BAND_PREFERENCE_RSSI_THRESHOLD_LOW = -65;
-
- /** @hide
- * 5GHz band is prefered hard over 2.4 if the 5GHz RSSI is higher than this threshold */
- public static int A_BAND_PREFERENCE_RSSI_THRESHOLD = -55;
+ public static int A_BAND_PREFERENCE_RSSI_THRESHOLD = -65;
/** @hide
* 5GHz band is penalized if the 5GHz RSSI is lower than this threshold **/
@@ -457,6 +455,12 @@ public class WifiConfiguration implements Parcelable {
***/
public static int HOME_NETWORK_RSSI_BOOST = 5;
+ /** @hide
+ * RSSI boost for configuration which use autoJoinUseAggressiveJoinAttemptThreshold
+ * To be more aggressive when initially attempting to auto join
+ */
+ public static int MAX_INITIAL_AUTO_JOIN_RSSI_BOOST = 8;
+
/**
* @hide
* A summary of the RSSI and Band status for that configuration
@@ -467,8 +471,10 @@ public class WifiConfiguration implements Parcelable {
public int rssi24; // strongest 2.4GHz RSSI
public int num5; // number of BSSIDs on 5GHz
public int num24; // number of BSSIDs on 2.4GHz
- public long age5; // timestamp of the strongest 5GHz BSSID (last time it was seen)
- public long age24; // timestamp of the strongest 2.4GHz BSSID (last time it was seen)
+ public long age5; // timestamp of the strongest 5GHz BSSID (last time it was seen)
+ public long age24; // timestamp of the strongest 2.4GHz BSSID (last time it was seen)
+ public String BSSID24;
+ public String BSSID5;
public Visibility() {
rssi5 = INVALID_RSSI;
@@ -482,6 +488,8 @@ public class WifiConfiguration implements Parcelable {
age5 = source.age5;
num24 = source.num24;
num5 = source.num5;
+ BSSID5 = source.BSSID5;
+ BSSID24 = source.BSSID24;
}
@Override
@@ -492,6 +500,7 @@ public class WifiConfiguration implements Parcelable {
sbuf.append(Integer.toString(rssi24));
sbuf.append(",");
sbuf.append(Integer.toString(num24));
+ if (BSSID24 != null) sbuf.append(",").append(BSSID24);
} else {
sbuf.append("*");
}
@@ -500,6 +509,7 @@ public class WifiConfiguration implements Parcelable {
sbuf.append(Integer.toString(rssi5));
sbuf.append(",");
sbuf.append(Integer.toString(num5));
+ if (BSSID5 != null) sbuf.append(",").append(BSSID5);
}
sbuf.append("]");
return sbuf.toString();
@@ -549,11 +559,13 @@ public class WifiConfiguration implements Parcelable {
if (result.level > status.rssi5) {
status.rssi5 = result.level;
status.age5 = result.seen;
+ status.BSSID5 = result.BSSID;
}
} else if (result.is24GHz()) {
if (result.level > status.rssi24) {
status.rssi24 = result.level;
status.age24 = result.seen;
+ status.BSSID24 = result.BSSID;
}
}
}
@@ -586,6 +598,11 @@ public class WifiConfiguration implements Parcelable {
/** @hide */
public static final int AUTO_JOIN_DISABLED_ON_AUTH_FAILURE = 128;
/** @hide */
+ public static final int AUTO_JOIN_DISABLED_NO_CREDENTIALS = 160;
+ /** @hide */
+ public static final int AUTO_JOIN_DISABLED_USER_ACTION = 161;
+
+ /** @hide */
public static final int AUTO_JOIN_DELETED = 200;
/**
@@ -656,6 +673,18 @@ public class WifiConfiguration implements Parcelable {
/**
* @hide
+ * Indicate that we didn't auto-join because rssi was too low
+ */
+ public boolean autoJoinBailedDueToLowRssi;
+
+ /**
+ * @hide
+ * AutoJoin even though RSSI is 10dB below threshold
+ */
+ public int autoJoinUseAggressiveJoinAttemptThreshold;
+
+ /**
+ * @hide
* Number of time the scorer overrode a the priority based choice, when comparing two
* WifiConfigurations, note that since comparing WifiConfiguration happens very often
* potentially at every scan, this number might become very large, even on an idle
@@ -873,11 +902,10 @@ public class WifiConfiguration implements Parcelable {
if (this.autoJoinStatus > 0) {
sbuf.append(" autoJoinStatus ").append(this.numConnectionFailures).append("\n");
}
- if (this.didSelfAdd || this.selfAdded) {
- if (this.didSelfAdd) sbuf.append(" didSelfAdd");
- if (this.selfAdded) sbuf.append(" selfAdded");
- if (this.noInternetAccess) sbuf.append(" noInternetAccess");
-
+ if (this.didSelfAdd) sbuf.append(" didSelfAdd");
+ if (this.selfAdded) sbuf.append(" selfAdded");
+ if (this.noInternetAccess) sbuf.append(" noInternetAccess");
+ if (this.didSelfAdd || this.selfAdded || this.noInternetAccess) {
sbuf.append("\n");
}
sbuf.append(" KeyMgmt:");
@@ -942,21 +970,41 @@ public class WifiConfiguration implements Parcelable {
if (this.preSharedKey != null) {
sbuf.append('*');
}
-
+ sbuf.append("\nEnterprise config:\n");
sbuf.append(enterpriseConfig);
- sbuf.append('\n');
+ sbuf.append("IP config:\n");
sbuf.append(mIpConfiguration.toString());
- if (this.creatorUid != 0) sbuf.append("uid=" + Integer.toString(creatorUid));
-
+ if (this.creatorUid != 0) sbuf.append(" uid=" + Integer.toString(creatorUid));
+ if (this.autoJoinBSSID != null) sbuf.append(" autoJoinBSSID=" + autoJoinBSSID);
+ long now_ms = System.currentTimeMillis();
if (this.blackListTimestamp != 0) {
- long now_ms = System.currentTimeMillis();
+ sbuf.append('\n');
long diff = now_ms - this.blackListTimestamp;
if (diff <= 0) {
- sbuf.append("blackListed since <incorrect>");
+ sbuf.append(" blackListed since <incorrect>");
} else {
- sbuf.append("blackListed since ").append(Long.toString(diff/1000)).append( "sec");
+ sbuf.append(" blackListed: ").append(Long.toString(diff/1000)).append( "sec");
+ }
+ }
+ if (this.lastConnected != 0) {
+ sbuf.append('\n');
+ long diff = now_ms - this.lastConnected;
+ if (diff <= 0) {
+ sbuf.append("lastConnected since <incorrect>");
+ } else {
+ sbuf.append("lastConnected: ").append(Long.toString(diff/1000)).append( "sec");
+ }
+ }
+ if (this.lastConnectionFailure != 0) {
+ sbuf.append('\n');
+ long diff = now_ms - this.lastConnectionFailure;
+ if (diff <= 0) {
+ sbuf.append("lastConnectionFailure since <incorrect>");
+ } else {
+ sbuf.append("lastConnectionFailure: ").append(Long.toString(diff/1000));
+ sbuf.append( "sec");
}
}
sbuf.append('\n');
@@ -976,15 +1024,29 @@ public class WifiConfiguration implements Parcelable {
}
}
}
- sbuf.append(" triggeredLow: ").append(numUserTriggeredWifiDisableLowRSSI);
- sbuf.append(" triggeredBad: ").append(numUserTriggeredWifiDisableBadRSSI);
- sbuf.append(" triggeredNotHigh: ").append(numUserTriggeredWifiDisableNotHighRSSI);
+ if (this.scanResultCache != null) {
+ sbuf.append("scan cache: ");
+ for(ScanResult result : this.scanResultCache.values()) {
+ sbuf.append("{").append(result.BSSID).append(",").append(result.frequency);
+ sbuf.append(",").append(result.level).append(",st=");
+ sbuf.append(result.autoJoinStatus).append("} ");
+ }
+ sbuf.append('\n');
+ }
+ sbuf.append("triggeredLow: ").append(this.numUserTriggeredWifiDisableLowRSSI);
+ sbuf.append(" triggeredBad: ").append(this.numUserTriggeredWifiDisableBadRSSI);
+ sbuf.append(" triggeredNotHigh: ").append(this.numUserTriggeredWifiDisableNotHighRSSI);
+ sbuf.append('\n');
+ sbuf.append("ticksLow: ").append(this.numTicksAtLowRSSI);
+ sbuf.append(" ticksBad: ").append(this.numTicksAtBadRSSI);
+ sbuf.append(" ticksNotHigh: ").append(this.numTicksAtNotHighRSSI);
sbuf.append('\n');
- sbuf.append(" ticksLow: ").append(numTicksAtLowRSSI);
- sbuf.append(" ticksBad: ").append(numTicksAtBadRSSI);
- sbuf.append(" ticksNotHigh: ").append(numTicksAtNotHighRSSI);
+ sbuf.append("triggeredJoin: ").append(this.numUserTriggeredJoinAttempts);
sbuf.append('\n');
- sbuf.append(" triggeredJoin: ").append(numUserTriggeredJoinAttempts);
+ sbuf.append("autoJoinBailedDueToLowRssi: ").append(this.autoJoinBailedDueToLowRssi);
+ sbuf.append('\n');
+ sbuf.append("autoJoinUseAggressiveJoinAttemptThreshold: ");
+ sbuf.append(this.autoJoinUseAggressiveJoinAttemptThreshold);
sbuf.append('\n');
return sbuf.toString();
@@ -1284,7 +1346,6 @@ public class WifiConfiguration implements Parcelable {
didSelfAdd = source.didSelfAdd;
lastConnectUid = source.lastConnectUid;
lastUpdateUid = source.lastUpdateUid;
- bssidOwnerUid = source.bssidOwnerUid;
creatorUid = source.creatorUid;
peerWifiConfiguration = source.peerWifiConfiguration;
blackListTimestamp = source.blackListTimestamp;
@@ -1302,6 +1363,10 @@ public class WifiConfiguration implements Parcelable {
numTicksAtBadRSSI = source.numTicksAtBadRSSI;
numTicksAtNotHighRSSI = source.numTicksAtNotHighRSSI;
numUserTriggeredJoinAttempts = source.numUserTriggeredJoinAttempts;
+ autoJoinBSSID = source.autoJoinBSSID;
+ autoJoinUseAggressiveJoinAttemptThreshold
+ = source.autoJoinUseAggressiveJoinAttemptThreshold;
+ autoJoinBailedDueToLowRssi = source.autoJoinBailedDueToLowRssi;
}
}
@@ -1318,6 +1383,7 @@ public class WifiConfiguration implements Parcelable {
dest.writeInt(disableReason);
dest.writeString(SSID);
dest.writeString(BSSID);
+ dest.writeString(autoJoinBSSID);
dest.writeString(FQDN);
dest.writeString(naiRealm);
dest.writeString(preSharedKey);
@@ -1348,7 +1414,6 @@ public class WifiConfiguration implements Parcelable {
dest.writeInt(creatorUid);
dest.writeInt(lastConnectUid);
dest.writeInt(lastUpdateUid);
- dest.writeInt(bssidOwnerUid);
dest.writeLong(blackListTimestamp);
dest.writeLong(lastConnectionFailure);
dest.writeInt(numConnectionFailures);
@@ -1362,7 +1427,8 @@ public class WifiConfiguration implements Parcelable {
dest.writeInt(numTicksAtBadRSSI);
dest.writeInt(numTicksAtNotHighRSSI);
dest.writeInt(numUserTriggeredJoinAttempts);
-
+ dest.writeInt(autoJoinUseAggressiveJoinAttemptThreshold);
+ dest.writeInt(autoJoinBailedDueToLowRssi ? 1 : 0);
}
/** Implement the Parcelable interface {@hide} */
@@ -1375,6 +1441,7 @@ public class WifiConfiguration implements Parcelable {
config.disableReason = in.readInt();
config.SSID = in.readString();
config.BSSID = in.readString();
+ config.autoJoinBSSID = in.readString();
config.FQDN = in.readString();
config.naiRealm = in.readString();
config.preSharedKey = in.readString();
@@ -1405,7 +1472,6 @@ public class WifiConfiguration implements Parcelable {
config.creatorUid = in.readInt();
config.lastConnectUid = in.readInt();
config.lastUpdateUid = in.readInt();
- config.bssidOwnerUid = in.readInt();
config.blackListTimestamp = in.readLong();
config.lastConnectionFailure = in.readLong();
config.numConnectionFailures = in.readInt();
@@ -1419,6 +1485,8 @@ public class WifiConfiguration implements Parcelable {
config.numTicksAtBadRSSI = in.readInt();
config.numTicksAtNotHighRSSI = in.readInt();
config.numUserTriggeredJoinAttempts = in.readInt();
+ config.autoJoinUseAggressiveJoinAttemptThreshold = in.readInt();
+ config.autoJoinBailedDueToLowRssi = in.readInt() != 0;
return config;
}