summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author kwaky <kwaky@google.com> 2020-11-10 18:51:36 -0800
committer kwaky <kwaky@google.com> 2020-11-10 18:51:36 -0800
commit78798c58bcf303fa97b33f55ecac8c95d547698a (patch)
tree1745071e50f3a88e09d52f256e16bdb2ffed7912
parent75b871a724ebbaa97929800a0c40d518c120bd3e (diff)
Migrate CarSystemUI out of framework/base.
Bug: 170742445 Test: Manual (build and boot succeeds) Change-Id: I88e0e2ff4d44b160f89297e03e4bb8111c3adaf6
-rw-r--r--packages/CarSystemUI/Android.bp165
-rw-r--r--packages/CarSystemUI/AndroidManifest.xml37
-rw-r--r--packages/CarSystemUI/CleanSpec.mk50
-rw-r--r--packages/CarSystemUI/TEST_MAPPING32
-rw-r--r--packages/CarSystemUI/proguard.flags7
-rw-r--r--packages/CarSystemUI/res-keyguard/drawable/ic_backspace.xml26
-rw-r--r--packages/CarSystemUI/res-keyguard/drawable/ic_done.xml26
-rw-r--r--packages/CarSystemUI/res-keyguard/drawable/keyguard_button_background.xml31
-rw-r--r--packages/CarSystemUI/res-keyguard/layout-land/keyguard_pattern_view.xml82
-rw-r--r--packages/CarSystemUI/res-keyguard/layout-land/keyguard_pin_view.xml126
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/keyguard_bouncer.xml31
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/keyguard_container.xml25
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/keyguard_message_area.xml31
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/keyguard_num_pad_key.xml37
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml102
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/keyguard_pattern_view.xml84
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/keyguard_pin_view.xml127
-rw-r--r--packages/CarSystemUI/res-keyguard/layout/num_pad_keys.xml83
-rw-r--r--packages/CarSystemUI/res-keyguard/values-h1000dp/dimens.xml19
-rw-r--r--packages/CarSystemUI/res-keyguard/values-land/dimens.xml20
-rw-r--r--packages/CarSystemUI/res-keyguard/values/colors.xml21
-rw-r--r--packages/CarSystemUI/res-keyguard/values/dimens.xml30
-rw-r--r--packages/CarSystemUI/res-keyguard/values/integers.xml20
-rw-r--r--packages/CarSystemUI/res-keyguard/values/styles.xml53
-rw-r--r--packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_down.xml48
-rw-r--r--packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_up.xml48
-rw-r--r--packages/CarSystemUI/res/anim/car_arrow_fade_out.xml42
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_close_animation.xml20
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_close_icon_animation.xml24
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_close_name_animation.xml23
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_close_pages_animation.xml23
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_close_pod_animation.xml24
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_open_animation.xml20
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_open_icon_animation.xml24
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_open_name_animation.xml24
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_open_pages_animation.xml24
-rw-r--r--packages/CarSystemUI/res/anim/car_user_switcher_open_pod_animation.xml33
-rw-r--r--packages/CarSystemUI/res/drawable/car_add_circle_round.xml29
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_add_white.xml23
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_apps.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_apps_selected.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_arrow.xml24
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_arrow_drop_up.xml24
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_home.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_home_selected.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_hvac.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_hvac_selected.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_keyboard_arrow_down.xml27
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_music.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_music_selected.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_navigation.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_navigation_selected.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_notification.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_overview.xml26
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_overview_selected.xml26
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_phone.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_phone_selected.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_selection_bg.xml28
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_settings_icon.xml26
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_unseen_indicator.xml30
-rw-r--r--packages/CarSystemUI/res/drawable/car_ic_user_icon.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/car_rounded_bg_bottom.xml27
-rw-r--r--packages/CarSystemUI/res/drawable/car_seekbar_thumb.xml37
-rw-r--r--packages/CarSystemUI/res/drawable/car_stat_sys_data_bluetooth_indicator.xml28
-rw-r--r--packages/CarSystemUI/res/drawable/hvac_decrease_button.xml53
-rw-r--r--packages/CarSystemUI/res/drawable/hvac_increase_button.xml53
-rw-r--r--packages/CarSystemUI/res/drawable/ic_mic_white.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/notification_handle_bar.xml26
-rw-r--r--packages/CarSystemUI/res/drawable/notification_material_bg.xml26
-rw-r--r--packages/CarSystemUI/res/drawable/notification_material_bg_dim.xml26
-rw-r--r--packages/CarSystemUI/res/drawable/stat_sys_signal_null.xml25
-rw-r--r--packages/CarSystemUI/res/drawable/system_bar_background_pill.xml33
-rw-r--r--packages/CarSystemUI/res/drawable/volume_dialog_background.xml26
-rw-r--r--packages/CarSystemUI/res/layout/adjustable_temperature_view.xml50
-rw-r--r--packages/CarSystemUI/res/layout/car_fullscreen_user_pod.xml46
-rw-r--r--packages/CarSystemUI/res/layout/car_fullscreen_user_switcher.xml49
-rw-r--r--packages/CarSystemUI/res/layout/car_left_navigation_bar.xml112
-rw-r--r--packages/CarSystemUI/res/layout/car_left_navigation_bar_unprovisioned.xml61
-rw-r--r--packages/CarSystemUI/res/layout/car_navigation_bar.xml122
-rw-r--r--packages/CarSystemUI/res/layout/car_navigation_bar_unprovisioned.xml46
-rw-r--r--packages/CarSystemUI/res/layout/car_navigation_button.xml68
-rw-r--r--packages/CarSystemUI/res/layout/car_right_navigation_bar.xml115
-rw-r--r--packages/CarSystemUI/res/layout/car_right_navigation_bar_unprovisioned.xml61
-rw-r--r--packages/CarSystemUI/res/layout/car_status_bar_header.xml30
-rw-r--r--packages/CarSystemUI/res/layout/car_top_navigation_bar.xml135
-rw-r--r--packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml135
-rw-r--r--packages/CarSystemUI/res/layout/car_user_switching_dialog.xml42
-rw-r--r--packages/CarSystemUI/res/layout/car_volume_dialog.xml22
-rw-r--r--packages/CarSystemUI/res/layout/car_volume_item.xml72
-rw-r--r--packages/CarSystemUI/res/layout/notification_center_activity.xml57
-rw-r--r--packages/CarSystemUI/res/layout/notification_handle_bar.xml30
-rw-r--r--packages/CarSystemUI/res/layout/notification_panel_container.xml22
-rw-r--r--packages/CarSystemUI/res/layout/rear_view_camera.xml31
-rw-r--r--packages/CarSystemUI/res/layout/status_bar_wifi_group.xml85
-rw-r--r--packages/CarSystemUI/res/layout/system_icons.xml43
-rw-r--r--packages/CarSystemUI/res/layout/sysui_overlay_window.xml51
-rw-r--r--packages/CarSystemUI/res/values-af/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-am/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ar/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-as/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-az/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-b+sr+Latn/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-be/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-bg/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-bn/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-bs/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ca/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-cs/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-da/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-de/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-el/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-en-rAU/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-en-rCA/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-en-rGB/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-en-rIN/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-en-rXC/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-es-rUS/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-es/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-et/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-eu/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-fa/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-fi/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-fr-rCA/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-fr/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-gl/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-gu/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-hi/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-hr/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-hu/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-hy/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-in/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-is/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-it/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-iw/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ja/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ka/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-kk/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-km/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-kn/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ko/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ky/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-lo/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-lt/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-lv/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-mk/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ml/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-mn/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-mr/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ms/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-my/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-nb/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ne/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-night/colors.xml27
-rw-r--r--packages/CarSystemUI/res/values-nl/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-or/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-pa/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-pl/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-pt-rPT/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-pt/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ro/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ru/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-si/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-sk/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-sl/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-sq/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-sr/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-sv/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-sw/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ta/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-te/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-th/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-tl/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-tr/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-uk/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-ur/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-uz/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-vi/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-zh-rCN/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-zh-rHK/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-zh-rTW/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values-zu/strings.xml32
-rw-r--r--packages/CarSystemUI/res/values/attrs.xml113
-rw-r--r--packages/CarSystemUI/res/values/colors.xml71
-rw-r--r--packages/CarSystemUI/res/values/config.xml159
-rw-r--r--packages/CarSystemUI/res/values/dimens.xml234
-rw-r--r--packages/CarSystemUI/res/values/ids.xml21
-rw-r--r--packages/CarSystemUI/res/values/integers.xml34
-rw-r--r--packages/CarSystemUI/res/values/strings.xml47
-rw-r--r--packages/CarSystemUI/res/values/styles.xml54
-rw-r--r--packages/CarSystemUI/res/values/themes.xml23
-rw-r--r--packages/CarSystemUI/res/xml/car_volume_items.xml65
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/Android.bp27
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/AndroidManifest.xml24
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps_selected.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music_selected.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation_selected.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview.xml26
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview_selected.xml26
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone_selected.xml25
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background.xml33
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_2.xml33
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_3.xml33
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/layout/car_navigation_bar.xml88
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/layout/car_right_navigation_bar.xml141
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/layout/system_icons.xml34
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/values/attrs.xml44
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/values/colors.xml20
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/values/config.xml58
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/values/dimens.xml19
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/values/styles.xml35
-rw-r--r--packages/CarSystemUI/samples/sample1/rro/res/xml/car_sysui_overlays.xml76
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/Android.bp27
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/AndroidManifest.xml24
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_apps.xml25
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_music.xml25
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_navigation.xml25
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_notification.xml25
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_overview.xml26
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_phone.xml25
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/drawable/system_bar_background.xml33
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/layout/car_left_navigation_bar.xml105
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/values/attrs.xml28
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/values/colors.xml20
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/values/config.xml57
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/values/styles.xml35
-rw-r--r--packages/CarSystemUI/samples/sample2/rro/res/xml/car_sysui_overlays.xml66
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/Android.bp27
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/AndroidManifest.xml24
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_apps.xml25
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_home.xml25
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_hvac.xml25
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_music.xml25
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_navigation.xml25
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_notification.xml25
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_overview.xml26
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_phone.xml25
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/drawable/system_bar_background.xml21
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/layout/car_left_navigation_bar.xml51
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/layout/car_navigation_bar.xml122
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/values/attrs.xml43
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/values/colors.xml19
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/values/config.xml57
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/values/dimens.xml22
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/values/styles.xml30
-rw-r--r--packages/CarSystemUI/samples/sample3/rro/res/xml/car_sysui_overlays.xml75
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java33
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarGlobalRootComponent.java53
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarSysUIComponent.java45
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarSysUIComponentModule.java28
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java179
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarSystemUIFactory.java60
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java176
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedController.java44
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedControllerImpl.java119
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedListener.java36
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/CarServiceProvider.java80
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/CarSystemUiTest.java32
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/bluetooth/CarBatteryController.java292
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/bluetooth/ConnectedDeviceSignalController.java272
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java130
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java265
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java245
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureBackgroundAnimator.java340
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureColorStore.java202
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextAnimator.java164
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java83
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java49
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java404
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewMediator.java54
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/AssitantButton.java71
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonRoleHolderController.java142
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateController.java232
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateListener.java62
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java590
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java352
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java168
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationButton.java319
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java158
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java548
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java62
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainer.java76
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/CarNotificationModule.java83
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java602
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java174
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationShadeWindowControllerImpl.java46
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationVisibilityLogger.java150
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/PowerManagerHelper.java71
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java62
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewController.java141
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewMediator.java121
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppController.java73
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppDetector.java136
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppListener.java127
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppStateController.java52
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/statusbar/DozeServiceHost.java130
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/statusbar/UserNameViewController.java139
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/userswitcher/CarStatusBarHeader.java60
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java123
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullscreenUserSwitcherViewMediator.java97
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java657
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserIconProvider.java116
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java166
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java88
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifier.java95
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogComponent.java54
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogImpl.java658
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItem.java135
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItemAdapter.java59
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/volume/VolumeUI.java129
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java685
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java218
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java384
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewMediator.java37
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/window/OverlayWindowModule.java86
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java183
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowManager.java100
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/wm/BarControlPolicy.java250
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsController.java187
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsInsetsControllerHost.java173
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMComponent.java39
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMShellModule.java49
-rw-r--r--packages/CarSystemUI/tests/Android.mk88
-rw-r--r--packages/CarSystemUI/tests/AndroidManifest.xml40
-rw-r--r--packages/CarSystemUI/tests/AndroidTest.xml30
-rw-r--r--packages/CarSystemUI/tests/res/layout/button_role_holder_controller_test.xml41
-rw-r--r--packages/CarSystemUI/tests/res/layout/car_button_selection_state_controller_test.xml55
-rw-r--r--packages/CarSystemUI/tests/res/layout/car_navigation_bar_view_test.xml58
-rw-r--r--packages/CarSystemUI/tests/res/layout/car_navigation_button_test.xml124
-rw-r--r--packages/CarSystemUI/tests/res/layout/overlay_view_controller_stub.xml22
-rw-r--r--packages/CarSystemUI/tests/res/layout/overlay_view_controller_test.xml30
-rw-r--r--packages/CarSystemUI/tests/res/layout/overlay_view_global_state_controller_test.xml43
-rw-r--r--packages/CarSystemUI/tests/res/values/config.xml23
-rw-r--r--packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java216
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java234
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java146
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java110
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java199
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java189
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java138
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java479
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java373
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java102
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java291
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/SystemBarConfigsTest.java290
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java128
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java141
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewControllerTest.java117
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewMediatorTest.java169
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java166
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java243
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/statusbar/UserNameViewControllerTest.java162
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java178
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java97
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java135
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java499
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java160
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java985
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/wm/BarControlPolicyTest.java195
-rw-r--r--packages/CarSystemUI/tests/src/com/android/systemui/wm/DisplaySystemBarsControllerTest.java109
363 files changed, 0 insertions, 29721 deletions
diff --git a/packages/CarSystemUI/Android.bp b/packages/CarSystemUI/Android.bp
deleted file mode 100644
index 08dd79973fa9..000000000000
--- a/packages/CarSystemUI/Android.bp
+++ /dev/null
@@ -1,165 +0,0 @@
-//
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-android_library {
- name: "CarSystemUI-core",
-
- srcs: [
- "src/**/*.java",
- "src/**/I*.aidl",
- ],
-
- resource_dirs: [
- "res-keyguard",
- "res",
- ],
-
- static_libs: [
- "SystemUI-core",
- "CarNotificationLib",
- "SystemUIPluginLib",
- "SystemUISharedLib",
- "SettingsLib",
- "car-ui-lib",
- "android.car.userlib",
- "androidx.legacy_legacy-support-v4",
- "androidx.recyclerview_recyclerview",
- "androidx.preference_preference",
- "androidx.appcompat_appcompat",
- "androidx.mediarouter_mediarouter",
- "androidx.palette_palette",
- "androidx.legacy_legacy-preference-v14",
- "androidx.leanback_leanback",
- "androidx.slice_slice-core",
- "androidx.slice_slice-view",
- "androidx.slice_slice-builders",
- "androidx.arch.core_core-runtime",
- "androidx.lifecycle_lifecycle-extensions",
- "SystemUI-tags",
- "SystemUI-proto",
- "dagger2",
- "//external/kotlinc:kotlin-annotations",
- ],
-
- libs: [
- "android.car",
- ],
-
- manifest: "AndroidManifest.xml",
-
- plugins: ["dagger2-compiler"],
-
-}
-
-android_library {
- name: "CarSystemUI-tests",
- manifest: "tests/AndroidManifest.xml",
- resource_dirs: [
- "tests/res",
- "res-keyguard",
- "res",
- ],
- srcs: [
- "tests/src/**/*.java",
- "src/**/*.java",
- "src/**/I*.aidl",
- ],
- static_libs: [
- "SystemUI-tests",
- "CarNotificationLib",
- "SystemUIPluginLib",
- "SystemUISharedLib",
- "SettingsLib",
- "android.car.userlib",
- "androidx.legacy_legacy-support-v4",
- "androidx.recyclerview_recyclerview",
- "androidx.preference_preference",
- "androidx.appcompat_appcompat",
- "androidx.mediarouter_mediarouter",
- "androidx.palette_palette",
- "androidx.legacy_legacy-preference-v14",
- "androidx.leanback_leanback",
- "androidx.slice_slice-core",
- "androidx.slice_slice-view",
- "androidx.slice_slice-builders",
- "androidx.arch.core_core-runtime",
- "androidx.lifecycle_lifecycle-extensions",
- "car-ui-lib",
- "SystemUI-tags",
- "SystemUI-proto",
- "metrics-helper-lib",
- "androidx.test.rules", "hamcrest-library",
- "mockito-target-inline-minus-junit4",
- "testables",
- "truth-prebuilt",
- "dagger2",
- "//external/kotlinc:kotlin-annotations",
- ],
- libs: [
- "android.test.runner",
- "android.test.base",
- "android.car",
- ],
-
- aaptflags: [
- "--extra-packages",
- "com.android.systemui",
- ],
-
- plugins: ["dagger2-compiler"],
-}
-
-android_app {
- name: "CarSystemUI",
-
- static_libs: [
- "CarSystemUI-core",
- ],
-
- export_package_resources: true,
-
- libs: [
- "android.car",
- ],
-
- resource_dirs: [],
-
- overrides: [
- "SystemUI",
- ],
-
- platform_apis: true,
- system_ext_specific: true,
- certificate: "platform",
- privileged: true,
-
- optimize: {
- proguard_flags_files: [
- "proguard.flags",
- ],
- },
- dxflags: ["--multi-dex"],
-
- aaptflags: [
- "--extra-packages",
- "com.android.keyguard",
- ],
-
- kotlincflags: ["-Xjvm-default=enable"],
-
- plugins: ["dagger2-compiler"],
-
- required: ["privapp_whitelist_com.android.systemui"],
-}
diff --git a/packages/CarSystemUI/AndroidManifest.xml b/packages/CarSystemUI/AndroidManifest.xml
deleted file mode 100644
index f0cf2a9b7156..000000000000
--- a/packages/CarSystemUI/AndroidManifest.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- package="com.android.systemui"
- android:sharedUserId="android.uid.systemui"
- coreApp="true">
- <!-- This permission is required to monitor car power state. -->
- <uses-permission android:name="android.car.permission.CAR_POWER" />
- <!-- This permission is required to get the trusted device list of a user. -->
- <uses-permission android:name="android.car.permission.CAR_ENROLL_TRUST"/>
- <!-- This permission is required to monitor gear state. -->
- <uses-permission android:name="android.car.permission.CAR_POWERTRAIN" />
- <!-- This permission is required to get bluetooth broadcast. -->
- <uses-permission android:name="android.permission.BLUETOOTH" />
- <!-- These permissions are required to implement icons based on role holders. -->
- <uses-permission android:name="android.permission.OBSERVE_ROLE_HOLDERS"/>
- <uses-permission android:name="android.permission.MANAGE_ROLE_HOLDERS"/>
- <!-- This permission is required to access app information from other users. -->
- <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
- <!-- This permission is required to check the foreground user id. -->
- <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
-</manifest>
diff --git a/packages/CarSystemUI/CleanSpec.mk b/packages/CarSystemUI/CleanSpec.mk
deleted file mode 100644
index ceac67c55f09..000000000000
--- a/packages/CarSystemUI/CleanSpec.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2019 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.
-#
-
-# If you don't need to do a full clean build but would like to touch
-# a file or delete some intermediate files, add a clean step to the end
-# of the list. These steps will only be run once, if they haven't been
-# run before.
-#
-# E.g.:
-# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
-# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
-#
-# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
-# files that are missing or have been moved.
-#
-# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
-# Use $(OUT_DIR) to refer to the "out" directory.
-#
-# If you need to re-do something that's already mentioned, just copy
-# the command and add it to the bottom of the list. E.g., if a change
-# that you made last week required touching a file and a change you
-# made today requires touching the same file, just copy the old
-# touch step and add it to the end of the list.
-#
-# *****************************************************************
-# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THE BANNER
-# *****************************************************************
-
-# For example:
-#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
-#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
-#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
-#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/product/priv-app/CarSystemUI)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product/priv-app/CarSystemUI)
-# ******************************************************************
-# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
-# ******************************************************************
diff --git a/packages/CarSystemUI/TEST_MAPPING b/packages/CarSystemUI/TEST_MAPPING
deleted file mode 100644
index 54afb9097f87..000000000000
--- a/packages/CarSystemUI/TEST_MAPPING
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "auto-end-to-end-presubmit": [
- {
- "name": "AndroidAutoUiTests",
- "options" : [
- {
- "include-filter": "android.test.functional.auto.apps.HomeHelperTest"
- }
- ]
- }
- ],
- "auto-end-to-end-postsubmit": [
- {
- "name": "AndroidAutoUiTests",
- "options" : [
- {
- "include-filter": "android.test.functional.auto.apps.NotificationHelperTest"
- }
- ]
- }
- ],
- "carsysui-presubmit": [
- {
- "name": "CarSystemUITests",
- "options" : [
- {
- "include-annotation": "com.android.systemui.car.CarSystemUiTest"
- }
- ]
- }
- ]
-}
diff --git a/packages/CarSystemUI/proguard.flags b/packages/CarSystemUI/proguard.flags
deleted file mode 100644
index f0b20c105b84..000000000000
--- a/packages/CarSystemUI/proguard.flags
+++ /dev/null
@@ -1,7 +0,0 @@
--keep class com.android.systemui.CarSystemUIFactory
--keep class com.android.car.notification.headsup.animationhelper.**
-
--keep class com.android.systemui.DaggerCarGlobalRootComponent { *; }
--keep class com.android.systemui.DaggerCarGlobalRootComponent$CarSysUIComponentImpl { *; }
-
--include ../SystemUI/proguard.flags
diff --git a/packages/CarSystemUI/res-keyguard/drawable/ic_backspace.xml b/packages/CarSystemUI/res-keyguard/drawable/ic_backspace.xml
deleted file mode 100644
index f3a2f0f76a08..000000000000
--- a/packages/CarSystemUI/res-keyguard/drawable/ic_backspace.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="36dp"
- android:height="36dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59L17.59,17L14,13.41L10.41,17L9,15.59zM21,6H8l-4.5,6L8,18h13V6M21,4c1.1,0 2,0.9 2,2v12c0,1.1 -0.9,2 -2,2H8c-0.63,0 -1.22,-0.3 -1.6,-0.8L1,12l5.4,-7.2C6.78,4.3 7.37,4 8,4H21L21,4z"/>
-</vector>
diff --git a/packages/CarSystemUI/res-keyguard/drawable/ic_done.xml b/packages/CarSystemUI/res-keyguard/drawable/ic_done.xml
deleted file mode 100644
index ef0aac27b84e..000000000000
--- a/packages/CarSystemUI/res-keyguard/drawable/ic_done.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="36dp"
- android:height="36dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M9,16.2l-3.5,-3.5a0.984,0.984 0,0 0,-1.4 0,0.984 0.984,0 0,0 0,1.4l4.19,4.19c0.39,0.39 1.02,0.39 1.41,0L20.3,7.7a0.984,0.984 0,0 0,0 -1.4,0.984 0.984,0 0,0 -1.4,0L9,16.2z"/>
-</vector>
diff --git a/packages/CarSystemUI/res-keyguard/drawable/keyguard_button_background.xml b/packages/CarSystemUI/res-keyguard/drawable/keyguard_button_background.xml
deleted file mode 100644
index 8b2779d10481..000000000000
--- a/packages/CarSystemUI/res-keyguard/drawable/keyguard_button_background.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <corners android:radius="@*android:dimen/car_button_radius"/>
- <solid android:color="#131315"/>
- </shape>
- </item>
- <item>
- <shape android:shape="rectangle">
- <corners android:radius="@*android:dimen/car_button_radius"/>
- <solid android:color="@color/button_background"/>
- </shape>
- </item>
-</selector>
diff --git a/packages/CarSystemUI/res-keyguard/layout-land/keyguard_pattern_view.xml b/packages/CarSystemUI/res-keyguard/layout-land/keyguard_pattern_view.xml
deleted file mode 100644
index a465254afebb..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout-land/keyguard_pattern_view.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License")
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- Car customizations
- - Added title "Enter your Pattern" at the top
- - Hid the emergency call at the bottom
--->
-
-<com.android.keyguard.KeyguardPatternView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/keyguard_pattern_view"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingHorizontal="@*android:dimen/car_margin">
-
- <FrameLayout
- android:layout_height="match_parent"
- android:layout_width="0dp"
- android:layout_weight="1">
-
- <com.android.internal.widget.LockPatternView
- android:id="@+id/lockPatternView"
- android:layout_width="@dimen/keyguard_pattern_dimension"
- android:layout_height="@dimen/keyguard_pattern_dimension"
- android:layout_gravity="center"/>
- </FrameLayout>
-
- <LinearLayout
- android:id="@+id/container"
- android:layout_height="match_parent"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:orientation="vertical"
- android:gravity="center_vertical">
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@*android:dimen/car_padding_2"
- android:gravity="center"
- android:textColor="@android:color/white"
- android:textSize="@*android:dimen/car_body1_size"
- android:text="@string/keyguard_enter_your_pattern" />
-
- <include layout="@layout/keyguard_message_area" />
-
- <Button
- android:id="@+id/cancel_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- style="@style/KeyguardButton"
- android:text="@string/cancel"/>
-
- <include layout="@layout/keyguard_eca"
- android:id="@+id/keyguard_selector_fade_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_gravity="bottom|center_horizontal"
- android:gravity="center_horizontal"
- android:visibility="gone" />
- </LinearLayout>
-
-</com.android.keyguard.KeyguardPatternView>
diff --git a/packages/CarSystemUI/res-keyguard/layout-land/keyguard_pin_view.xml b/packages/CarSystemUI/res-keyguard/layout-land/keyguard_pin_view.xml
deleted file mode 100644
index 5746102f5f27..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout-land/keyguard_pin_view.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Car customizations
- - Added title "Enter your PIN" under the entry field
- - Put backspace and enter buttons in row 4
- - PIN pad is on start side while entry field and title are on the end side
- - Hid the emergency call at the bottom
--->
-
-<com.android.keyguard.KeyguardPINView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/keyguard_pin_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- android:paddingHorizontal="@*android:dimen/car_margin">
-
- <FrameLayout
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="match_parent">
-
- <GridLayout
- android:id="@+id/container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center"
- android:columnCount="3">
-
- <include layout="@layout/num_pad_keys"/>
- </GridLayout>
- </FrameLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="center"
- android:orientation="vertical">
-
- <com.android.keyguard.PasswordTextView
- android:id="@+id/pinEntry"
- android:layout_width="@dimen/keyguard_security_width"
- android:layout_height="@dimen/pin_entry_height"
- android:gravity="center"
- app:scaledTextSize="@integer/password_text_view_scale"
- android:contentDescription="@string/keyguard_accessibility_pin_area" />
-
- <View
- android:id="@+id/divider"
- android:layout_width="@dimen/keyguard_security_width"
- android:layout_height="@dimen/divider_height"
- android:background="@android:color/white" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@*android:dimen/car_padding_2"
- android:gravity="center"
- android:textColor="@android:color/white"
- android:textSize="@*android:dimen/car_body1_size"
- android:text="@string/keyguard_enter_your_pin" />
-
- <include layout="@layout/keyguard_message_area" />
-
- <Button
- android:id="@+id/cancel_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- style="@style/KeyguardButton"
- android:text="@string/cancel"/>
- </LinearLayout>
-
- <!-- KeyguardPinView references these resources ids in code so removing them will cause the
- keyguard to crash. Instead put them down here where they are out of the way and set their
- visibility to gone. -->
- <com.android.keyguard.AlphaOptimizedRelativeLayout
- android:id="@+id/row0"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row1"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row2"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row3"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row4"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
-
- <include layout="@layout/keyguard_eca"
- android:id="@+id/keyguard_selector_fade_container"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
-</com.android.keyguard.KeyguardPINView>
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_bouncer.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_bouncer.xml
deleted file mode 100644
index d105e4415ca3..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_bouncer.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<!-- Car customizations
- Car has solid black background instead of a transparent one
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/black"
- android:fitsSystemWindows="true">
-
- <include
- style="@style/BouncerSecurityContainer"
- layout="@layout/keyguard_host_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-</FrameLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_container.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_container.xml
deleted file mode 100644
index 3e35df9d9b0c..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_container.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- ~ Copyright (C) 2020 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.
- -->
-
-<!-- Car customizations
- Car has solid black background instead of a transparent one
--->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/keyguard_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"/> \ No newline at end of file
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_message_area.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_message_area.xml
deleted file mode 100644
index 09cf4722dae0..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_message_area.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License")
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.keyguard.KeyguardMessageArea
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- style="@style/Keyguard.TextView"
- android:id="@+id/keyguard_message_area"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:focusable="true"
- android:layout_marginBottom="@*android:dimen/car_padding_4"
- android:textSize="@*android:dimen/car_body2_size" />
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_num_pad_key.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_num_pad_key.xml
deleted file mode 100644
index c7eda3888d7a..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_num_pad_key.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<!-- Car customizations
- The mnemonics is not shown for car but KeyguardPinView references the resource id in code.
- Removing it will cause the keyguard to crash. Hide them instead
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <TextView
- android:id="@+id/digit_text"
- style="@style/Widget.TextView.NumPadKey"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- />
- <!-- The mnemonics is not shown for car but KeyguardPinView references the resource id in code.
- Removing it will cause the keyguard to crash. Hide them instead -->
- <TextView
- android:id="@+id/klondike_text"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone"
- />
-</merge>
-
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml
deleted file mode 100644
index d57875f8daba..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_password_view.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License")
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- Car customizations
- - Added title "Enter your Password" below the password field
- - Hid the emergency call at the bottom
--->
-
-<com.android.keyguard.KeyguardPasswordView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/res-auto"
- android:id="@+id/keyguard_password_view"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center">
-
- <include layout="@layout/keyguard_message_area" />
-
- <!-- Password entry field -->
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="vertical"
- android:theme="?attr/passwordStyle">
-
- <EditText
- android:id="@+id/passwordEntry"
- android:layout_width="@dimen/password_field_width"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:singleLine="true"
- android:textStyle="normal"
- android:inputType="textPassword"
- android:textSize="@*android:dimen/car_body1_size"
- android:textColor="?attr/wallpaperTextColor"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:imeOptions="flagForceAscii|actionDone"
- android:maxLength="@integer/password_max_length"
- />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@*android:dimen/car_padding_2"
- android:gravity="center"
- android:textColor="@android:color/white"
- android:textSize="@*android:dimen/car_body1_size"
- android:text="@string/keyguard_enter_your_password" />
-
- <Button
- android:id="@+id/cancel_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- style="@style/KeyguardButton"
- android:text="@string/cancel"/>
-
- <ImageView android:id="@+id/switch_ime_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
- android:src="@drawable/ic_lockscreen_ime"
- android:contentDescription="@string/accessibility_ime_switch_button"
- android:clickable="true"
- android:padding="8dp"
- android:tint="@color/background_protected"
- android:layout_gravity="end|center_vertical"
- android:background="?android:attr/selectableItemBackground"
- android:visibility="gone"
- />
- </LinearLayout>
-
- <include layout="@layout/keyguard_eca"
- android:id="@+id/keyguard_selector_fade_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
- android:orientation="vertical"
- android:layout_gravity="bottom|center_horizontal"
- android:gravity="center_horizontal"
- android:visibility="gone"
- />
-
-</com.android.keyguard.KeyguardPasswordView>
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_pattern_view.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_pattern_view.xml
deleted file mode 100644
index bb69d44a3ac7..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_pattern_view.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License")
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- Car customizations
- - Added title "Enter your Pattern" at the top
- - Hid the emergency call at the bottom
--->
-
-<com.android.keyguard.KeyguardPatternView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/res-auto"
- android:id="@+id/keyguard_pattern_view"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- androidprv:layout_maxWidth="@dimen/keyguard_security_width"
- android:gravity="center_horizontal">
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <LinearLayout
- android:id="@+id/container"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:orientation="vertical"
- android:layout_gravity="center">
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@*android:dimen/car_padding_2"
- android:gravity="center"
- android:textColor="@android:color/white"
- android:textSize="@*android:dimen/car_body1_size"
- android:text="@string/keyguard_enter_your_pattern" />
-
- <include layout="@layout/keyguard_message_area" />
-
- <com.android.internal.widget.LockPatternView
- android:id="@+id/lockPatternView"
- android:layout_width="@dimen/keyguard_pattern_dimension"
- android:layout_height="@dimen/keyguard_pattern_dimension"
- android:layout_marginVertical="@dimen/pin_pattern_pad_margin_vertical"
- android:layout_gravity="center_horizontal"
- android:gravity="center" />
-
- <Button
- android:id="@+id/cancel_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- style="@style/KeyguardButton"
- android:text="@string/cancel"/>
-
- <include layout="@layout/keyguard_eca"
- android:id="@+id/keyguard_selector_fade_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_gravity="bottom|center_horizontal"
- android:gravity="center_horizontal"
- android:visibility="gone" />
- </LinearLayout>
- </FrameLayout>
-
-</com.android.keyguard.KeyguardPatternView>
diff --git a/packages/CarSystemUI/res-keyguard/layout/keyguard_pin_view.xml b/packages/CarSystemUI/res-keyguard/layout/keyguard_pin_view.xml
deleted file mode 100644
index 815e67d1e278..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/keyguard_pin_view.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Car customizations
- - Added title "Enter your PIN" under the entry field
- - Put backspace and enter buttons in row 4
- - Hid the emergency call at the bottom
--->
-
-<com.android.keyguard.KeyguardPINView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/keyguard_pin_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/num_pad_margin_left"
- android:layout_marginRight="@dimen/num_pad_margin_right"
- android:orientation="vertical"
- android:gravity="center">
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:orientation="vertical">
-
- <com.android.keyguard.PasswordTextView
- android:id="@+id/pinEntry"
- android:layout_width="@dimen/keyguard_security_width"
- android:layout_height="@dimen/pin_entry_height"
- android:gravity="center"
- app:scaledTextSize="@integer/password_text_view_scale"
- android:contentDescription="@string/keyguard_accessibility_pin_area" />
-
- <View
- android:id="@+id/divider"
- android:layout_width="@dimen/keyguard_security_width"
- android:layout_height="@dimen/divider_height"
- android:background="@android:color/white" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@*android:dimen/car_padding_2"
- android:gravity="center"
- android:textColor="@android:color/white"
- android:textSize="@*android:dimen/car_body1_size"
- android:text="@string/keyguard_enter_your_pin" />
-
- <include layout="@layout/keyguard_message_area" />
-
- </LinearLayout>
-
- <GridLayout
- android:id="@+id/container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginVertical="@dimen/pin_pattern_pad_margin_vertical"
- android:columnCount="3">
-
- <include layout="@layout/num_pad_keys"/>
- </GridLayout>
-
- <Button
- android:id="@+id/cancel_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- style="@style/KeyguardButton"
- android:text="@string/cancel"/>
-
- </LinearLayout>
-
- <!-- KeyguardPinView references these resources ids in code so removing them will cause the
- keyguard to crash. Instead put them down here where they are out of the way and set their
- visibility to gone. -->
- <com.android.keyguard.AlphaOptimizedRelativeLayout
- android:id="@+id/row0"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row1"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row2"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row3"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
- <LinearLayout
- android:id="@+id/row4"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
-
- <include
- layout="@layout/keyguard_eca"
- android:id="@+id/keyguard_selector_fade_container"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:visibility="gone" />
-</com.android.keyguard.KeyguardPINView>
diff --git a/packages/CarSystemUI/res-keyguard/layout/num_pad_keys.xml b/packages/CarSystemUI/res-keyguard/layout/num_pad_keys.xml
deleted file mode 100644
index 8306cb4a708a..000000000000
--- a/packages/CarSystemUI/res-keyguard/layout/num_pad_keys.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto">
- <!-- Row 1 -->
- <com.android.keyguard.NumPadKey
- android:id="@+id/key1"
- style="@style/NumPadKeyButton"
- app:digit="1" />
- <com.android.keyguard.NumPadKey
- android:id="@+id/key2"
- style="@style/NumPadKeyButton.MiddleColumn"
- app:digit="2" />
- <com.android.keyguard.NumPadKey
- android:id="@+id/key3"
- style="@style/NumPadKeyButton"
- app:digit="3" />
-
- <!-- Row 2 -->
- <com.android.keyguard.NumPadKey
- android:id="@+id/key4"
- style="@style/NumPadKeyButton"
- app:digit="4" />
- <com.android.keyguard.NumPadKey
- android:id="@+id/key5"
- style="@style/NumPadKeyButton.MiddleColumn"
- app:digit="5" />
- <com.android.keyguard.NumPadKey
- android:id="@+id/key6"
- style="@style/NumPadKeyButton"
- app:digit="6" />
-
- <!-- Row 3 -->
- <com.android.keyguard.NumPadKey
- android:id="@+id/key7"
- style="@style/NumPadKeyButton"
- app:digit="7" />
- <com.android.keyguard.NumPadKey
- android:id="@+id/key8"
- style="@style/NumPadKeyButton.MiddleColumn"
- app:digit="8" />
- <com.android.keyguard.NumPadKey
- android:id="@+id/key9"
- style="@style/NumPadKeyButton"
- app:digit="9" />
-
- <!-- Row 4 -->
- <ImageButton
- android:id="@+id/delete_button"
- style="@style/NumPadKeyButton.LastRow"
- android:gravity="center_vertical"
- android:src="@drawable/ic_backspace"
- android:clickable="true"
- android:tint="@android:color/white"
- android:background="@drawable/ripple_drawable"
- android:contentDescription="@string/keyboardview_keycode_delete" />
- <com.android.keyguard.NumPadKey
- android:id="@+id/key0"
- style="@style/NumPadKeyButton.LastRow.MiddleColumn"
- app:digit="0" />
- <ImageButton
- android:id="@+id/key_enter"
- style="@style/NumPadKeyButton.LastRow"
- android:src="@drawable/ic_done"
- android:tint="@android:color/white"
- android:background="@drawable/ripple_drawable"
- android:contentDescription="@string/keyboardview_keycode_enter" />
-</merge>
-
diff --git a/packages/CarSystemUI/res-keyguard/values-h1000dp/dimens.xml b/packages/CarSystemUI/res-keyguard/values-h1000dp/dimens.xml
deleted file mode 100644
index d055efa25078..000000000000
--- a/packages/CarSystemUI/res-keyguard/values-h1000dp/dimens.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<resources>
- <dimen name="pin_pattern_pad_margin_vertical">178dp</dimen>
-</resources>
diff --git a/packages/CarSystemUI/res-keyguard/values-land/dimens.xml b/packages/CarSystemUI/res-keyguard/values-land/dimens.xml
deleted file mode 100644
index c39e0e4731e8..000000000000
--- a/packages/CarSystemUI/res-keyguard/values-land/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<resources>
- <dimen name="num_pad_key_margin_horizontal">@*android:dimen/car_padding_5</dimen>
- <dimen name="num_pad_key_margin_bottom">@*android:dimen/car_padding_4</dimen>
-</resources>
diff --git a/packages/CarSystemUI/res-keyguard/values/colors.xml b/packages/CarSystemUI/res-keyguard/values/colors.xml
deleted file mode 100644
index ba9f060fab88..000000000000
--- a/packages/CarSystemUI/res-keyguard/values/colors.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<resources>
- <color name="button_background">@*android:color/car_dark_blue_grey_600</color>
- <color name="button_text">@android:color/white</color>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/res-keyguard/values/dimens.xml b/packages/CarSystemUI/res-keyguard/values/dimens.xml
deleted file mode 100644
index 8dfe1716ef54..000000000000
--- a/packages/CarSystemUI/res-keyguard/values/dimens.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2017, 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="num_pad_margin_left">112dp</dimen>
- <dimen name="num_pad_margin_right">144dp</dimen>
- <dimen name="num_pad_key_width">80dp</dimen>
- <dimen name="num_pad_key_height">80dp</dimen>
- <dimen name="num_pad_key_margin_horizontal">@*android:dimen/car_padding_5</dimen>
- <dimen name="num_pad_key_margin_bottom">@*android:dimen/car_padding_5</dimen>
- <dimen name="pin_entry_height">@dimen/num_pad_key_height</dimen>
- <dimen name="divider_height">1dp</dimen>
- <dimen name="key_enter_margin_top">128dp</dimen>
- <dimen name="keyguard_pattern_dimension">400dp</dimen>
- <dimen name="password_field_width">350dp</dimen>
- <dimen name="pin_pattern_pad_margin_vertical">0dp</dimen>
-</resources>
diff --git a/packages/CarSystemUI/res-keyguard/values/integers.xml b/packages/CarSystemUI/res-keyguard/values/integers.xml
deleted file mode 100644
index bad1346af452..000000000000
--- a/packages/CarSystemUI/res-keyguard/values/integers.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2017, 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>
- <integer name="password_text_view_scale">40</integer>
- <integer name="password_max_length">500</integer>
-</resources>
diff --git a/packages/CarSystemUI/res-keyguard/values/styles.xml b/packages/CarSystemUI/res-keyguard/values/styles.xml
deleted file mode 100644
index ecea30a13ced..000000000000
--- a/packages/CarSystemUI/res-keyguard/values/styles.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2017, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-
- <!-- The style for the volume icons in the volume dialog. This style makes the icon scale to
- fit its container since auto wants the icon to be larger. The padding is added to make it
- so the icon does not press along the edges of the dialog. -->
- <style name="NumPadKeyButton">
- <item name="android:layout_width">@dimen/num_pad_key_width</item>
- <item name="android:layout_height">@dimen/num_pad_key_height</item>
- <item name="android:layout_marginBottom">@dimen/num_pad_key_margin_bottom</item>
- <item name="textView">@id/pinEntry</item>
- </style>
-
- <style name="NumPadKeyButton.MiddleColumn">
- <item name="android:layout_marginStart">@dimen/num_pad_key_margin_horizontal</item>
- <item name="android:layout_marginEnd">@dimen/num_pad_key_margin_horizontal</item>
- </style>
-
- <style name="NumPadKeyButton.LastRow">
- <item name="android:layout_marginBottom">0dp</item>
- </style>
-
- <style name="NumPadKeyButton.LastRow.MiddleColumn">
- <item name="android:layout_marginStart">@dimen/num_pad_key_margin_horizontal</item>
- <item name="android:layout_marginEnd">@dimen/num_pad_key_margin_horizontal</item>
- </style>
-
- <style name="KeyguardButton" parent="@android:style/Widget.DeviceDefault.Button">
- <item name="android:background">@drawable/keyguard_button_background</item>
- <item name="android:textColor">@color/button_text</item>
- <item name="android:textAllCaps">false</item>
- </style>
-
- <style name="Widget.TextView.NumPadKey" parent="@android:style/Widget.TextView">
- <!-- Only replaces the text size. -->
- <item name="android:textSize">@*android:dimen/car_body1_size</item>
- </style>
-</resources>
diff --git a/packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_down.xml b/packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_down.xml
deleted file mode 100644
index 74f38d4f9946..000000000000
--- a/packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_down.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:ordering="together">
- <objectAnimator
- android:propertyName="rotation"
- android:duration="0"
- android:valueFrom="180"
- android:valueTo="0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="alpha"
- android:valueFrom="0.0"
- android:valueTo="1.0"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="scaleX"
- android:valueFrom="0.8"
- android:valueTo="1.0"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="scaleY"
- android:valueFrom="0.8"
- android:valueTo="1.0"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_up.xml b/packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_up.xml
deleted file mode 100644
index 0f28297f0214..000000000000
--- a/packages/CarSystemUI/res/anim/car_arrow_fade_in_rotate_up.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:ordering="together">
- <objectAnimator
- android:propertyName="rotation"
- android:duration="0"
- android:valueFrom="0"
- android:valueTo="180"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="alpha"
- android:valueFrom="0.0"
- android:valueTo="1.0"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="scaleX"
- android:valueFrom="0.8"
- android:valueTo="1.0"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="scaleY"
- android:valueFrom="0.8"
- android:valueTo="1.0"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_arrow_fade_out.xml b/packages/CarSystemUI/res/anim/car_arrow_fade_out.xml
deleted file mode 100644
index e6757d2862b1..000000000000
--- a/packages/CarSystemUI/res/anim/car_arrow_fade_out.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:ordering="together">
- <objectAnimator
- android:propertyName="alpha"
- android:valueFrom="1.0"
- android:valueTo="0.0"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="scaleX"
- android:valueFrom="1.0"
- android:valueTo="0.8"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:propertyName="scaleY"
- android:valueFrom="1.0"
- android:valueTo="0.8"
- android:valueType="floatType"
- android:duration="300"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_close_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_close_animation.xml
deleted file mode 100644
index 6f12338d8db8..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_close_animation.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<animator xmlns:android="http://schemas.android.com/apk/res/android"
- android:duration="133"
- android:valueType="intType"
- android:valueFrom="@dimen/car_user_switcher_container_height"
- android:valueTo="0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_close_icon_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_close_icon_animation.xml
deleted file mode 100644
index 9f8c12ef16b5..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_close_icon_animation.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="167"
- android:propertyName="rotation"
- android:valueType="floatType"
- android:valueFrom="180"
- android:valueTo="0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_close_name_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_close_name_animation.xml
deleted file mode 100644
index adc1f720e91b..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_close_name_animation.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="83"
- android:propertyName="alpha"
- android:valueType="floatType"
- android:valueFrom="0"
- android:valueTo="1" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_close_pages_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_close_pages_animation.xml
deleted file mode 100644
index dec5c05dbce8..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_close_pages_animation.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="83"
- android:propertyName="alpha"
- android:valueType="floatType"
- android:valueFrom="1"
- android:valueTo="0" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_close_pod_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_close_pod_animation.xml
deleted file mode 100644
index 986a9cb06459..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_close_pod_animation.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:ordering="together" >
-
- <objectAnimator
- android:duration="50"
- android:propertyName="alpha"
- android:valueType="floatType"
- android:valueFrom="1"
- android:valueTo="0" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_open_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_open_animation.xml
deleted file mode 100644
index 80b38b388aed..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_open_animation.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<animator xmlns:android="http://schemas.android.com/apk/res/android"
- android:duration="200"
- android:valueType="intType"
- android:valueFrom="0"
- android:valueTo="@dimen/car_user_switcher_container_height"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_open_icon_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_open_icon_animation.xml
deleted file mode 100644
index 721376cae960..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_open_icon_animation.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="167"
- android:propertyName="rotation"
- android:valueType="floatType"
- android:valueFrom="0"
- android:valueTo="180"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_open_name_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_open_name_animation.xml
deleted file mode 100644
index 246099ef7b35..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_open_name_animation.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="83"
- android:startOffset="83"
- android:propertyName="alpha"
- android:valueType="floatType"
- android:valueFrom="1"
- android:valueTo="0" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_open_pages_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_open_pages_animation.xml
deleted file mode 100644
index 9a1c642363d0..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_open_pages_animation.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="83"
- android:startOffset="83"
- android:propertyName="alpha"
- android:valueType="floatType"
- android:valueFrom="0"
- android:valueTo="1" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/anim/car_user_switcher_open_pod_animation.xml b/packages/CarSystemUI/res/anim/car_user_switcher_open_pod_animation.xml
deleted file mode 100644
index 1414b6688c8f..000000000000
--- a/packages/CarSystemUI/res/anim/car_user_switcher_open_pod_animation.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:ordering="together" >
-
- <objectAnimator
- android:duration="167"
- android:startOffset="67"
- android:propertyName="translationY"
- android:valueType="floatType"
- android:valueFrom="@dimen/car_user_switcher_container_anim_height"
- android:valueTo="0"
- android:interpolator="@android:interpolator/fast_out_slow_in" />
- <objectAnimator
- android:duration="83"
- android:startOffset="117"
- android:propertyName="alpha"
- android:valueType="floatType"
- android:valueFrom="0"
- android:valueTo="1" />
-</set> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_add_circle_round.xml b/packages/CarSystemUI/res/drawable/car_add_circle_round.xml
deleted file mode 100644
index 13c7dd12f940..000000000000
--- a/packages/CarSystemUI/res/drawable/car_add_circle_round.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item>
- <shape android:shape="oval">
- <solid
- android:color="@color/car_user_switcher_add_user_background_color"/>
- <size
- android:width="@dimen/car_user_switcher_image_avatar_size"
- android:height="@dimen/car_user_switcher_image_avatar_size"/>
- </shape>
- </item>
- <item
- android:drawable="@drawable/car_ic_add_white"
- android:gravity="center"/>
-</layer-list> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_add_white.xml b/packages/CarSystemUI/res/drawable/car_ic_add_white.xml
deleted file mode 100644
index 9d5ca264cdfa..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_add_white.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@*android:dimen/car_touch_target_size"
- android:height="@*android:dimen/car_touch_target_size"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="@color/car_user_switcher_add_user_add_sign_color"
- android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_apps.xml b/packages/CarSystemUI/res/drawable/car_ic_apps.xml
deleted file mode 100644
index e028a0ed45c9..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_apps.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="44"
- android:viewportHeight="44">
- <path
- android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_apps_selected.xml b/packages/CarSystemUI/res/drawable/car_ic_apps_selected.xml
deleted file mode 100644
index 9504e61e53e4..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_apps_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="44"
- android:viewportHeight="44">
- <path
- android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_arrow.xml b/packages/CarSystemUI/res/drawable/car_ic_arrow.xml
deleted file mode 100644
index cfacbf98354f..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_arrow.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="48.0dp"
- android:height="48.0dp"
- android:viewportWidth="48.0"
- android:viewportHeight="48.0">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M14.0,20.0l10.0,10.0 10.0,-10.0z"/>
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/car_ic_arrow_drop_up.xml b/packages/CarSystemUI/res/drawable/car_ic_arrow_drop_up.xml
deleted file mode 100644
index 81e7262c7cea..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_arrow_drop_up.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="48.0dp"
- android:height="48.0dp"
- android:viewportWidth="48.0"
- android:viewportHeight="48.0">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M14 28l10-10 10 10z"/>
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/car_ic_home.xml b/packages/CarSystemUI/res/drawable/car_ic_home.xml
deleted file mode 100644
index c78f0edd5594..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_home.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_home_selected.xml b/packages/CarSystemUI/res/drawable/car_ic_home_selected.xml
deleted file mode 100644
index 16192df86676..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_home_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_hvac.xml b/packages/CarSystemUI/res/drawable/car_ic_hvac.xml
deleted file mode 100644
index 55c968eacc4d..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_hvac.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:pathData="M16.34,8.36l-2.29,0.82c-0.18,-0.13 -0.38,-0.25 -0.58,-0.34c0.17,-0.83 0.63,-1.58 1.36,-2.06C16.85,5.44 16.18,2 13.39,2C9,2 7.16,5.01 8.36,7.66l0.82,2.29c-0.13,0.18 -0.25,0.38 -0.34,0.58c-0.83,-0.17 -1.58,-0.63 -2.06,-1.36C5.44,7.15 2,7.82 2,10.61c0,4.4 3.01,6.24 5.66,5.03l2.29,-0.82c0.18,0.13 0.38,0.25 0.58,0.34c-0.17,0.83 -0.63,1.58 -1.36,2.06C7.15,18.56 7.82,22 10.61,22c4.4,0 6.24,-3.01 5.03,-5.66l-0.82,-2.29c0.13,-0.18 0.25,-0.38 0.34,-0.58c0.83,0.17 1.58,0.63 2.06,1.36c1.34,2.01 4.77,1.34 4.77,-1.45C22,9 18.99,7.16 16.34,8.36zM12,13.5c-0.83,0 -1.5,-0.67 -1.5,-1.5c0,-0.83 0.67,-1.5 1.5,-1.5c0.83,0 1.5,0.67 1.5,1.5C13.5,12.83 12.83,13.5 12,13.5zM10.24,5.22C10.74,4.44 11.89,4 13.39,4c0.79,0 0.71,0.86 0.34,1.11c-1.22,0.81 -2,2.06 -2.25,3.44c-0.21,0.03 -0.42,0.08 -0.62,0.15l-0.68,-1.88C10,6.42 9.86,5.81 10.24,5.22zM6.83,13.82c-0.4,0.18 -1.01,0.32 -1.61,-0.06C4.44,13.26 4,12.11 4,10.61c0,-0.79 0.86,-0.71 1.11,-0.34c0.81,1.22 2.06,2 3.44,2.25c0.03,0.21 0.08,0.42 0.15,0.62L6.83,13.82zM13.76,18.78c-0.5,0.77 -1.65,1.22 -3.15,1.22c-0.79,0 -0.71,-0.86 -0.34,-1.11c1.22,-0.81 2,-2.06 2.25,-3.44c0.21,-0.03 0.42,-0.08 0.62,-0.15l0.68,1.88C14,17.58 14.14,18.18 13.76,18.78zM18.89,13.73c-0.81,-1.22 -2.06,-2 -3.44,-2.25c-0.03,-0.21 -0.08,-0.42 -0.15,-0.62l1.88,-0.68c0.4,-0.18 1.01,-0.32 1.61,0.06c0.77,0.5 1.22,1.65 1.22,3.15C20,14.19 19.14,14.11 18.89,13.73z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/car_ic_hvac_selected.xml b/packages/CarSystemUI/res/drawable/car_ic_hvac_selected.xml
deleted file mode 100644
index 817b7148ecdd..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_hvac_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:pathData="M16.34,8.36l-2.29,0.82c-0.18,-0.13 -0.38,-0.25 -0.58,-0.34c0.17,-0.83 0.63,-1.58 1.36,-2.06C16.85,5.44 16.18,2 13.39,2C9,2 7.16,5.01 8.36,7.66l0.82,2.29c-0.13,0.18 -0.25,0.38 -0.34,0.58c-0.83,-0.17 -1.58,-0.63 -2.06,-1.36C5.44,7.15 2,7.82 2,10.61c0,4.4 3.01,6.24 5.66,5.03l2.29,-0.82c0.18,0.13 0.38,0.25 0.58,0.34c-0.17,0.83 -0.63,1.58 -1.36,2.06C7.15,18.56 7.82,22 10.61,22c4.4,0 6.24,-3.01 5.03,-5.66l-0.82,-2.29c0.13,-0.18 0.25,-0.38 0.34,-0.58c0.83,0.17 1.58,0.63 2.06,1.36c1.34,2.01 4.77,1.34 4.77,-1.45C22,9 18.99,7.16 16.34,8.36zM12,13.5c-0.83,0 -1.5,-0.67 -1.5,-1.5c0,-0.83 0.67,-1.5 1.5,-1.5c0.83,0 1.5,0.67 1.5,1.5C13.5,12.83 12.83,13.5 12,13.5zM10.24,5.22C10.74,4.44 11.89,4 13.39,4c0.79,0 0.71,0.86 0.34,1.11c-1.22,0.81 -2,2.06 -2.25,3.44c-0.21,0.03 -0.42,0.08 -0.62,0.15l-0.68,-1.88C10,6.42 9.86,5.81 10.24,5.22zM6.83,13.82c-0.4,0.18 -1.01,0.32 -1.61,-0.06C4.44,13.26 4,12.11 4,10.61c0,-0.79 0.86,-0.71 1.11,-0.34c0.81,1.22 2.06,2 3.44,2.25c0.03,0.21 0.08,0.42 0.15,0.62L6.83,13.82zM13.76,18.78c-0.5,0.77 -1.65,1.22 -3.15,1.22c-0.79,0 -0.71,-0.86 -0.34,-1.11c1.22,-0.81 2,-2.06 2.25,-3.44c0.21,-0.03 0.42,-0.08 0.62,-0.15l0.68,1.88C14,17.58 14.14,18.18 13.76,18.78zM18.89,13.73c-0.81,-1.22 -2.06,-2 -3.44,-2.25c-0.03,-0.21 -0.08,-0.42 -0.15,-0.62l1.88,-0.68c0.4,-0.18 1.01,-0.32 1.61,0.06c0.77,0.5 1.22,1.65 1.22,3.15C20,14.19 19.14,14.11 18.89,13.73z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_keyboard_arrow_down.xml b/packages/CarSystemUI/res/drawable/car_ic_keyboard_arrow_down.xml
deleted file mode 100644
index 3709aa546766..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_keyboard_arrow_down.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~
- ~ Copyright (C) 2018 Google Inc.
- ~
- ~ 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="44dp"
- android:height="44dp"
- android:viewportWidth="48.0"
- android:viewportHeight="48.0">
- <path
- android:pathData="M14.83 16.42L24 25.59l9.17-9.17L36 19.25l-12 12-12-12z"
- android:fillColor="#ffffff"/>
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_music.xml b/packages/CarSystemUI/res/drawable/car_ic_music.xml
deleted file mode 100644
index 6339ebb3ea8d..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_music.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M22 5.5L22 24.8416667C20.9183333 24.2183333 19.6716667 23.8333333 18.3333333 23.8333333C14.2816667 23.8333333 11 27.115 11 31.1666667C11 35.2183333 14.2816667 38.5 18.3333333 38.5C22.385 38.5 25.6666667 35.2183333 25.6666667 31.1666667L25.6666667 12.8333333L33 12.8333333L33 5.5L22 5.5Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_music_selected.xml b/packages/CarSystemUI/res/drawable/car_ic_music_selected.xml
deleted file mode 100644
index a56bcb38d883..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_music_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M22 5.5L22 24.8416667C20.9183333 24.2183333 19.6716667 23.8333333 18.3333333 23.8333333C14.2816667 23.8333333 11 27.115 11 31.1666667C11 35.2183333 14.2816667 38.5 18.3333333 38.5C22.385 38.5 25.6666667 35.2183333 25.6666667 31.1666667L25.6666667 12.8333333L33 12.8333333L33 5.5L22 5.5Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_navigation.xml b/packages/CarSystemUI/res/drawable/car_ic_navigation.xml
deleted file mode 100644
index e1fabe07cdeb..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_navigation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M39.8016667 20.6983333L23.3016667 4.19833333C22.5866667 3.48333333 21.4316667 3.48333333 20.7166667 4.19833333L4.21666667 20.6983333C3.50166667 21.4133333 3.50166667 22.5683333 4.21666667 23.2833333L20.7166667 39.7833333C21.4316667 40.4983333 22.5866667 40.4983333 23.3016667 39.7833333L39.8016667 23.2833333C40.5166667 22.5866667 40.5166667 21.4316667 39.8016667 20.6983333ZM25.6666667 26.5833333L25.6666667 22L18.3333333 22L18.3333333 27.5L14.6666667 27.5L14.6666667 20.1666667C14.6666667 19.1583333 15.4916667 18.3333333 16.5 18.3333333L25.6666667 18.3333333L25.6666667 13.75L32.0833333 20.1666667L25.6666667 26.5833333Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_navigation_selected.xml b/packages/CarSystemUI/res/drawable/car_ic_navigation_selected.xml
deleted file mode 100644
index d11cf28f6ca7..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_navigation_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M39.8016667 20.6983333L23.3016667 4.19833333C22.5866667 3.48333333 21.4316667 3.48333333 20.7166667 4.19833333L4.21666667 20.6983333C3.50166667 21.4133333 3.50166667 22.5683333 4.21666667 23.2833333L20.7166667 39.7833333C21.4316667 40.4983333 22.5866667 40.4983333 23.3016667 39.7833333L39.8016667 23.2833333C40.5166667 22.5866667 40.5166667 21.4316667 39.8016667 20.6983333ZM25.6666667 26.5833333L25.6666667 22L18.3333333 22L18.3333333 27.5L14.6666667 27.5L14.6666667 20.1666667C14.6666667 19.1583333 15.4916667 18.3333333 16.5 18.3333333L25.6666667 18.3333333L25.6666667 13.75L32.0833333 20.1666667L25.6666667 26.5833333Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_notification.xml b/packages/CarSystemUI/res/drawable/car_ic_notification.xml
deleted file mode 100644
index aabf9161c11f..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_notification.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="44"
- android:viewportHeight="44">
- <path
- android:pathData="M22 39.125C23.925 39.125 25.5 37.55 25.5 35.625L18.5 35.625C18.5 37.55 20.0575 39.125 22 39.125ZM32.5 28.625L32.5 19.875C32.5 14.5025 29.63 10.005 24.625 8.815L24.625 7.625C24.625 6.1725 23.4525 5 22 5C20.5475 5 19.375 6.1725 19.375 7.625L19.375 8.815C14.3525 10.005 11.5 14.485 11.5 19.875L11.5 28.625L8 32.125L8 33.875L36 33.875L36 32.125L32.5 28.625Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_overview.xml b/packages/CarSystemUI/res/drawable/car_ic_overview.xml
deleted file mode 100644
index f185eb9afb75..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_overview.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M36.92857 22.39286A14.53571 14.53571 0 0 1 7.857143 22.39286A14.53571 14.53571 0 0 1 36.92857 22.39286Z"
- android:strokeColor="@color/car_nav_icon_fill_color"
- android:strokeWidth="4" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_overview_selected.xml b/packages/CarSystemUI/res/drawable/car_ic_overview_selected.xml
deleted file mode 100644
index 19b558363720..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_overview_selected.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M36.92857 22.39286A14.53571 14.53571 0 0 1 7.857143 22.39286A14.53571 14.53571 0 0 1 36.92857 22.39286Z"
- android:strokeColor="@color/car_nav_icon_fill_color_selected"
- android:strokeWidth="4" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_phone.xml b/packages/CarSystemUI/res/drawable/car_ic_phone.xml
deleted file mode 100644
index 50e36b5a6e3c..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_phone.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M12.1366667 19.7816667C14.7766667 24.97 19.03 29.205 24.2183333 31.8633333L28.2516667 27.83C28.7466667 27.335 29.48 27.17 30.1216667 27.39C32.175 28.0683333 34.3933333 28.435 36.6666667 28.435C37.675 28.435 38.5 29.26 38.5 30.2683333L38.5 36.6666667C38.5 37.675 37.675 38.5 36.6666667 38.5C19.4516667 38.5 5.5 24.5483333 5.5 7.33333333C5.5 6.325 6.325 5.5 7.33333333 5.5L13.75 5.5C14.7583333 5.5 15.5833333 6.325 15.5833333 7.33333333C15.5833333 9.625 15.95 11.825 16.6283333 13.8783333C16.83 14.52 16.6833333 15.235 16.17 15.7483333L12.1366667 19.7816667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_phone_selected.xml b/packages/CarSystemUI/res/drawable/car_ic_phone_selected.xml
deleted file mode 100644
index 11b1687cf1c1..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_phone_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M12.1366667 19.7816667C14.7766667 24.97 19.03 29.205 24.2183333 31.8633333L28.2516667 27.83C28.7466667 27.335 29.48 27.17 30.1216667 27.39C32.175 28.0683333 34.3933333 28.435 36.6666667 28.435C37.675 28.435 38.5 29.26 38.5 30.2683333L38.5 36.6666667C38.5 37.675 37.675 38.5 36.6666667 38.5C19.4516667 38.5 5.5 24.5483333 5.5 7.33333333C5.5 6.325 6.325 5.5 7.33333333 5.5L13.75 5.5C14.7583333 5.5 15.5833333 6.325 15.5833333 7.33333333C15.5833333 9.625 15.95 11.825 16.6283333 13.8783333C16.83 14.52 16.6833333 15.235 16.17 15.7483333L12.1366667 19.7816667Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_ic_selection_bg.xml b/packages/CarSystemUI/res/drawable/car_ic_selection_bg.xml
deleted file mode 100644
index 12993f5b8b7c..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_selection_bg.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="70dp"
- android:height="70dp"
- android:viewportHeight="70.0"
- android:viewportWidth="70.0">
- <path
- android:fillColor="?android:attr/colorAccent"
- android:fillType="evenOdd"
- android:pathData="M4,0L66,0A4,4 0,0 1,70 4L70,66A4,4 0,0 1,66 70L4,70A4,4 0,0 1,0 66L0,4A4,4 0,0 1,4 0z"
- android:strokeColor="#00000000"
- android:strokeWidth="1"/>
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/car_ic_settings_icon.xml b/packages/CarSystemUI/res/drawable/car_ic_settings_icon.xml
deleted file mode 100644
index 147f5397361e..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_settings_icon.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ~ Copyright (C) 2020 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="@*android:dimen/status_bar_system_icon_size"
- android:height="@*android:dimen/status_bar_system_icon_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:fillColor="@color/system_bar_icon_color"
- android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4C9.75,2 9.54,2.18 9.51,2.42L9.13,5.07C8.52,5.32 7.96,5.66 7.44,6.05l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46C2.21,8.95 2.27,9.22 2.46,9.37l2.11,1.65C4.53,11.34 4.5,11.67 4.5,12s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65C9.54,21.82 9.75,22 10,22h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64L19.43,12.98zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5s3.5,1.57 3.5,3.5S13.93,15.5 12,15.5z"/>
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/car_ic_unseen_indicator.xml b/packages/CarSystemUI/res/drawable/car_ic_unseen_indicator.xml
deleted file mode 100644
index 025fc9c4ea3b..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_unseen_indicator.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <group
- android:translateX="30"
- android:translateY="2">
- <path
- android:fillColor="@color/car_nav_unseen_indicator_color"
- android:strokeWidth="1"
- android:pathData="M 6 0 C 9.31370849898 0 12 2.68629150102 12 6 C 12 9.31370849898 9.31370849898 12 6 12 C 2.68629150102 12 0 9.31370849898 0 6 C 0 2.68629150102 2.68629150102 0 6 0 Z" />
- </group>
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/car_ic_user_icon.xml b/packages/CarSystemUI/res/drawable/car_ic_user_icon.xml
deleted file mode 100644
index 270d932714f3..000000000000
--- a/packages/CarSystemUI/res/drawable/car_ic_user_icon.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"
- android:fillColor="@color/system_bar_icon_color"/>
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/car_rounded_bg_bottom.xml b/packages/CarSystemUI/res/drawable/car_rounded_bg_bottom.xml
deleted file mode 100644
index 07227fbeb0d8..000000000000
--- a/packages/CarSystemUI/res/drawable/car_rounded_bg_bottom.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="?android:attr/colorBackgroundFloating" />
- <corners
- android:bottomLeftRadius="@*android:dimen/car_radius_3"
- android:topLeftRadius="0dp"
- android:bottomRightRadius="@*android:dimen/car_radius_3"
- android:topRightRadius="0dp"
- />
-</shape>
diff --git a/packages/CarSystemUI/res/drawable/car_seekbar_thumb.xml b/packages/CarSystemUI/res/drawable/car_seekbar_thumb.xml
deleted file mode 100644
index 2649a005a971..000000000000
--- a/packages/CarSystemUI/res/drawable/car_seekbar_thumb.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item>
- <shape android:shape="oval">
- <padding
- android:bottom="@*android:dimen/car_padding_1"
- android:left="@*android:dimen/car_padding_1"
- android:right="@*android:dimen/car_padding_1"
- android:top="@*android:dimen/car_padding_1"/>
- <solid android:color="@android:color/black"/>
- </shape>
- </item>
- <item>
- <shape android:shape="oval">
- <solid android:color="@*android:color/car_accent"/>
- <size
- android:width="@*android:dimen/car_seekbar_thumb_size"
- android:height="@*android:dimen/car_seekbar_thumb_size"/>
- </shape>
- </item>
-</layer-list>
diff --git a/packages/CarSystemUI/res/drawable/car_stat_sys_data_bluetooth_indicator.xml b/packages/CarSystemUI/res/drawable/car_stat_sys_data_bluetooth_indicator.xml
deleted file mode 100644
index 34578fe252d4..000000000000
--- a/packages/CarSystemUI/res/drawable/car_stat_sys_data_bluetooth_indicator.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="17dp"
- android:height="17dp"
- android:viewportWidth="18.0"
- android:viewportHeight="18.0">
- <group
- android:translateY="0.5"
- android:translateX="0.5" >
- <path
- android:pathData="M9.57,8.5l2.79,-2.78c0.3,-0.3 0.3,-0.8 0,-1.1L9.04,1.29L9.02,1.27C8.7,0.98 8.21,1 7.91,1.31C7.78,1.45 7.71,1.64 7.71,1.84v4.79L4.69,3.61c-0.3,-0.3 -0.79,-0.3 -1.09,0s-0.3,0.79 0,1.09L7.39,8.5L3.6,12.29c-0.3,0.3 -0.3,0.79 0,1.09s0.79,0.3 1.09,0l3.01,-3.01v4.8c0,0.42 0.35,0.77 0.77,0.77c0.19,0 0.39,-0.07 0.53,-0.21l0.04,-0.04l3.32,-3.32c0.3,-0.3 0.3,-0.8 0,-1.1L9.57,8.5zM9.19,6.77v-3.2l1.6,1.6L9.19,6.77zM9.19,13.42v-3.2l1.6,1.6L9.19,13.42zM4.03,9.29c-0.44,0.44 -1.15,0.44 -1.58,0C2.02,8.86 2.02,8.16 2.45,7.72l0.01,-0.01C2.89,7.27 3.59,7.27 4.02,7.7l0.01,0.01C4.47,8.15 4.47,8.85 4.03,9.29zM14.44,7.71c0.44,0.44 0.44,1.15 0,1.58c-0.44,0.44 -1.15,0.44 -1.58,0c-0.44,-0.43 -0.44,-1.13 -0.01,-1.57l0.01,-0.01C13.3,7.28 14,7.27 14.43,7.7C14.44,7.7 14.44,7.71 14.44,7.71z"
- android:fillColor="#FFFFFF"/>
- </group>
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/hvac_decrease_button.xml b/packages/CarSystemUI/res/drawable/hvac_decrease_button.xml
deleted file mode 100644
index 656e94ae348b..000000000000
--- a/packages/CarSystemUI/res/drawable/hvac_decrease_button.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<layer-list
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <item android:gravity="center"
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size">
- <aapt:attr name="android:drawable">
- <shape android:shape="oval">
- <size
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"/>
- <solid
- android:color="@color/hvac_temperature_adjust_button_color"/>
- </shape>
- </aapt:attr>
- </item>
- <item android:gravity="center"
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size">
- <aapt:attr name="android:drawable">
- <vector android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="@color/hvac_temperature_decrease_arrow_color"
- android:pathData="M14,7l-5,5 5,5V7z"/>
- </vector>
- </aapt:attr>
- </item>
- <item>
- <aapt:attr name="android:drawable">
- <ripple android:color="?android:attr/colorControlHighlight"/>
- </aapt:attr>
- </item>
-</layer-list> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/hvac_increase_button.xml b/packages/CarSystemUI/res/drawable/hvac_increase_button.xml
deleted file mode 100644
index 57c07c873d76..000000000000
--- a/packages/CarSystemUI/res/drawable/hvac_increase_button.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<layer-list
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <item android:gravity="center"
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size">
- <aapt:attr name="android:drawable">
- <shape android:shape="oval">
- <size
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"/>
- <solid
- android:color="@color/hvac_temperature_adjust_button_color"/>
- </shape>
- </aapt:attr>
- </item>
- <item android:gravity="center"
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size">
- <aapt:attr name="android:drawable">
- <vector android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="@color/hvac_temperature_increase_arrow_color"
- android:pathData="M10,17l5,-5 -5,-5v10z"/>
- </vector>
- </aapt:attr>
- </item>
- <item>
- <aapt:attr name="android:drawable">
- <ripple android:color="?android:attr/colorControlHighlight"/>
- </aapt:attr>
- </item>
-</layer-list> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/ic_mic_white.xml b/packages/CarSystemUI/res/drawable/ic_mic_white.xml
deleted file mode 100644
index 71fcc5302d75..000000000000
--- a/packages/CarSystemUI/res/drawable/ic_mic_white.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="44"
- android:viewportHeight="44">
-<path
- android:pathData="M22 25.6666667C25.0433333 25.6666667 27.4816667 23.21 27.4816667 20.1666667L27.5 9.16666667C27.5 6.12333333 25.0433333 3.66666667 22 3.66666667C18.9566667 3.66666667 16.5 6.12333333 16.5 9.16666667L16.5 20.1666667C16.5 23.21 18.9566667 25.6666667 22 25.6666667ZM31.7166667 20.1666667C31.7166667 25.6666667 27.06 29.5166667 22 29.5166667C16.94 29.5166667 12.2833333 25.6666667 12.2833333 20.1666667L9.16666667 20.1666667C9.16666667 26.4183333 14.1533333 31.5883333 20.1666667 32.4866667L20.1666667 38.5L23.8333333 38.5L23.8333333 32.4866667C29.8466667 31.6066667 34.8333333 26.4366667 34.8333333 20.1666667L31.7166667 20.1666667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/notification_handle_bar.xml b/packages/CarSystemUI/res/drawable/notification_handle_bar.xml
deleted file mode 100644
index 5ed7499952ed..000000000000
--- a/packages/CarSystemUI/res/drawable/notification_handle_bar.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 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.
--->
-<ripple
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="@android:color/white">
- <item>
- <shape android:shape="rectangle">
- <corners android:radius="@dimen/clear_all_button_radius"/>
- <solid android:color="@android:color/white"/>
- </shape>
- </item>
-</ripple> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/drawable/notification_material_bg.xml b/packages/CarSystemUI/res/drawable/notification_material_bg.xml
deleted file mode 100644
index 03746c8bfe4d..000000000000
--- a/packages/CarSystemUI/res/drawable/notification_material_bg.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="@color/notification_ripple_untinted_color">
- <item>
- <shape xmlns:android="http://schemas.android.com/apk/res/android">
- <solid android:color="@color/notification_material_background_color"/>
- <corners
- android:radius="@dimen/notification_shadow_radius"/>
- </shape>
- </item>
-</ripple>
diff --git a/packages/CarSystemUI/res/drawable/notification_material_bg_dim.xml b/packages/CarSystemUI/res/drawable/notification_material_bg_dim.xml
deleted file mode 100644
index 03746c8bfe4d..000000000000
--- a/packages/CarSystemUI/res/drawable/notification_material_bg_dim.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="@color/notification_ripple_untinted_color">
- <item>
- <shape xmlns:android="http://schemas.android.com/apk/res/android">
- <solid android:color="@color/notification_material_background_color"/>
- <corners
- android:radius="@dimen/notification_shadow_radius"/>
- </shape>
- </item>
-</ripple>
diff --git a/packages/CarSystemUI/res/drawable/stat_sys_signal_null.xml b/packages/CarSystemUI/res/drawable/stat_sys_signal_null.xml
deleted file mode 100644
index 2b487f9e3ebd..000000000000
--- a/packages/CarSystemUI/res/drawable/stat_sys_signal_null.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-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:autoMirrored="true"
- android:width="17dp"
- android:height="17dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="?attr/backgroundColor"
- android:pathData="M2.000000,22.000000l20.000000,0.000000L22.000000,2.000000L2.000000,22.000000zM20.000000,20.000000L6.800000,20.000000L20.000000,6.800000L20.000000,20.000000z"/>
-</vector>
diff --git a/packages/CarSystemUI/res/drawable/system_bar_background_pill.xml b/packages/CarSystemUI/res/drawable/system_bar_background_pill.xml
deleted file mode 100644
index 51d2b9d3e1e0..000000000000
--- a/packages/CarSystemUI/res/drawable/system_bar_background_pill.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<layer-list
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <item>
- <aapt:attr name="android:drawable">
- <shape android:shape="rectangle">
- <solid android:color="@color/system_bar_background_pill_color"/>
- <corners android:radius="30dp"/>
- </shape>
- </aapt:attr>
- </item>
- <item>
- <aapt:attr name="android:drawable">
- <ripple android:color="?android:attr/colorControlHighlight"/>
- </aapt:attr>
- </item>
-</layer-list>
diff --git a/packages/CarSystemUI/res/drawable/volume_dialog_background.xml b/packages/CarSystemUI/res/drawable/volume_dialog_background.xml
deleted file mode 100644
index fa3ca8f27fc9..000000000000
--- a/packages/CarSystemUI/res/drawable/volume_dialog_background.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <solid android:color="?android:attr/colorBackgroundFloating"/>
- <padding
- android:bottom="5dp"
- android:left="5dp"
- android:right="5dp"
- android:top="5dp"/>
- <corners android:bottomLeftRadius="20dp"
- android:bottomRightRadius="20dp"/>
-</shape>
diff --git a/packages/CarSystemUI/res/layout/adjustable_temperature_view.xml b/packages/CarSystemUI/res/layout/adjustable_temperature_view.xml
deleted file mode 100644
index d19740932aa4..000000000000
--- a/packages/CarSystemUI/res/layout/adjustable_temperature_view.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- android:paddingEnd="@dimen/hvac_container_padding"
- android:paddingStart="@dimen/hvac_container_padding">
-
- <ImageView
- android:id="@+id/hvac_decrease_button"
- android:layout_width="@dimen/hvac_temperature_button_size"
- android:layout_height="@dimen/hvac_temperature_button_size"
- android:scaleType="center"
- android:src="@drawable/hvac_decrease_button"/>
-
- <TextView
- android:id="@+id/hvac_temperature_text"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:textSize="@dimen/hvac_temperature_text_size"
- android:textColor="@color/system_bar_text_color"
- android:paddingStart="@dimen/hvac_temperature_text_padding"
- android:paddingEnd="@dimen/hvac_temperature_text_padding"
- android:gravity="center"/>
-
- <ImageView
- android:id="@+id/hvac_increase_button"
- android:layout_width="@dimen/hvac_temperature_button_size"
- android:layout_height="@dimen/hvac_temperature_button_size"
- android:scaleType="center"
- android:src="@drawable/hvac_increase_button" />
-</LinearLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/layout/car_fullscreen_user_pod.xml b/packages/CarSystemUI/res/layout/car_fullscreen_user_pod.xml
deleted file mode 100644
index a2a628d7319e..000000000000
--- a/packages/CarSystemUI/res/layout/car_fullscreen_user_pod.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:clipChildren="false"
- android:alpha="0"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:gravity="center">
-
- <ImageView
- android:id="@+id/user_avatar"
- android:layout_width="@dimen/car_user_switcher_image_avatar_size"
- android:layout_height="@dimen/car_user_switcher_image_avatar_size"
- android:background="?android:attr/selectableItemBackground"
- android:gravity="center"/>
-
- <TextView
- android:id="@+id/user_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/car_user_switcher_vertical_spacing_between_name_and_avatar"
- android:textSize="@dimen/car_user_switcher_name_text_size"
- android:textColor="@color/car_user_switcher_name_text_color"
- android:ellipsize="end"
- android:singleLine="true"
- android:gravity="center"/>
-
-</LinearLayout>
diff --git a/packages/CarSystemUI/res/layout/car_fullscreen_user_switcher.xml b/packages/CarSystemUI/res/layout/car_fullscreen_user_switcher.xml
deleted file mode 100644
index 534c51e0febe..000000000000
--- a/packages/CarSystemUI/res/layout/car_fullscreen_user_switcher.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/fullscreen_user_switcher"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/car_user_switcher_background_color">
-
- <LinearLayout
- android:id="@+id/container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentTop="true"
- android:orientation="vertical">
-
- <include
- layout="@layout/car_status_bar_header"
- android:layout_alignParentTop="true"
- android:theme="@android:style/Theme"/>
-
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <com.android.systemui.car.userswitcher.UserGridRecyclerView
- android:id="@+id/user_grid"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_marginTop="@dimen/car_user_switcher_margin_top"/>
- </FrameLayout>
-
- </LinearLayout>
-</FrameLayout>
diff --git a/packages/CarSystemUI/res/layout/car_left_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_left_navigation_bar.xml
deleted file mode 100644
index 94816f81a4c5..000000000000
--- a/packages/CarSystemUI/res/layout/car_left_navigation_bar.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:background="@drawable/system_bar_background">
-
- <LinearLayout
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:id="@+id/nav_buttons"
- android:orientation="vertical"
- android:gravity="top"
- android:paddingTop="30dp"
- android:layout_weight="1"
- android:animateLayoutChanges="true">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- android:src="@drawable/car_ic_overview"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/grid"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;component=com.android.car.home/.AppGridActivity;end"
- systemui:longIntent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- android:src="@drawable/car_ic_apps"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvac"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- systemui:broadcast="true"
- android:src="@drawable/car_ic_hvac"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="bottom"
- android:orientation="vertical">
-
- <com.android.systemui.statusbar.AlphaOptimizedImageView
- android:id="@+id/note"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:src="@drawable/car_ic_notification"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="20dp"
- android:paddingBottom="20dp"
- android:alpha="0.7"
- />
-
-
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:singleLine="true"
- android:paddingStart="@dimen/status_bar_clock_starting_padding"
- android:paddingEnd="@dimen/status_bar_clock_end_padding"
- android:gravity="center_horizontal"
- android:paddingBottom="20dp"
- />
-
- <Space
- android:layout_height="10dp"
- android:layout_width="match_parent"/>
-
- </LinearLayout>
-
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/res/layout/car_left_navigation_bar_unprovisioned.xml b/packages/CarSystemUI/res/layout/car_left_navigation_bar_unprovisioned.xml
deleted file mode 100644
index 9e6dd113eeba..000000000000
--- a/packages/CarSystemUI/res/layout/car_left_navigation_bar_unprovisioned.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:background="@drawable/system_bar_background">
-
- <LinearLayout
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:id="@+id/nav_buttons"
- android:orientation="vertical"
- android:gravity="top"
- android:paddingTop="30dp"
- android:layout_weight="1"
- android:animateLayoutChanges="true">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- android:src="@drawable/car_ic_overview"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvac"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- systemui:broadcast="true"
- android:src="@drawable/car_ic_hvac"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
- </LinearLayout>
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/res/layout/car_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_navigation_bar.xml
deleted file mode 100644
index 8314ba5600a9..000000000000
--- a/packages/CarSystemUI/res/layout/car_navigation_bar.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/system_bar_background"
- android:gravity="center"
- android:orientation="horizontal">
-
- <RelativeLayout
- android:id="@+id/nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layoutDirection="ltr">
-
- <com.android.systemui.car.hvac.AdjustableTemperatureView
- android:id="@+id/driver_hvac"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center_vertical"
- systemui:hvacAreaId="49"
- systemui:hvacTempFormat="%.0f\u00B0" />
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerInParent="true"
- android:layout_weight="1"
- android:gravity="center"
- android:layoutDirection="ltr"
- android:paddingEnd="@dimen/system_bar_button_group_padding"
- android:paddingStart="@dimen/system_bar_button_group_padding">
-
- <Space
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_home"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/phone_nav"
- style="@style/NavigationBarButton"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_phone"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
- systemui:packages="com.android.car.dialer"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/grid_nav"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_apps"
- systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvac"
- style="@style/NavigationBarButton"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_hvac"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- systemui:broadcast="true"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/notifications"
- style="@style/NavigationBarButton"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_notification"
- systemui:longIntent="intent:#Intent;component=com.android.car.bugreport/.BugReportActivity;end"/>
-
- <Space
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"/>
- </LinearLayout>
-
- <com.android.systemui.car.hvac.AdjustableTemperatureView
- android:id="@+id/passenger_hvac"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- android:gravity="center_vertical"
- systemui:hvacAreaId="68"
- systemui:hvacTempFormat="%.0f\u00B0" />
- </RelativeLayout>
-
- <LinearLayout
- android:id="@+id/lock_screen_nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:layoutDirection="ltr"
- android:paddingEnd="@dimen/car_keyline_1"
- android:paddingStart="@dimen/car_keyline_1"
- android:visibility="gone"
- />
-</com.android.systemui.car.navigationbar.CarNavigationBarView> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/layout/car_navigation_bar_unprovisioned.xml b/packages/CarSystemUI/res/layout/car_navigation_bar_unprovisioned.xml
deleted file mode 100644
index a040e800cbfc..000000000000
--- a/packages/CarSystemUI/res/layout/car_navigation_bar_unprovisioned.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/system_bar_background"
- android:orientation="vertical">
-
- <LinearLayout
- android:id="@+id/nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingStart="@*android:dimen/car_padding_5"
- android:paddingEnd="@*android:dimen/car_padding_5">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- android:layout_width="@*android:dimen/car_touch_target_size"
- android:layout_height="match_parent"
- android:background="?android:attr/selectableItemBackground"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:highlightWhenSelected="true"
- />
- </LinearLayout>
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
-
diff --git a/packages/CarSystemUI/res/layout/car_navigation_button.xml b/packages/CarSystemUI/res/layout/car_navigation_button.xml
deleted file mode 100644
index 9f79023b0f31..000000000000
--- a/packages/CarSystemUI/res/layout/car_navigation_button.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/car_nav_button_icon"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:animateLayoutChanges="true"
- android:orientation="vertical">
-
- <com.android.systemui.statusbar.AlphaOptimizedImageView
- android:id="@+id/car_nav_button_icon_image"
- android:layout_height="@dimen/car_navigation_button_icon_height"
- android:layout_width="match_parent"
- android:layout_gravity="center"
- android:animateLayoutChanges="true"
- android:background="@android:color/transparent"
- android:scaleType="fitCenter"
- android:tintMode="src_in"
- android:tint="@color/car_nav_icon_fill_color_selected"
- android:clickable="false"
- />
-
- <com.android.systemui.statusbar.AlphaOptimizedImageView
- android:id="@+id/car_nav_button_more_icon"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:layout_gravity="center"
- android:animateLayoutChanges="true"
- android:src="@drawable/car_ic_arrow"
- android:background="@android:color/transparent"
- android:scaleType="fitCenter"
- android:clickable="false"
- android:visibility="gone"
- />
-
- <ImageView
- android:id="@+id/car_nav_button_unseen_icon"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:layout_gravity="center"
- android:src="@drawable/car_ic_unseen_indicator"
- android:background="@android:color/transparent"
- android:scaleType="fitCenter"
- android:clickable="false"
- />
-
- </FrameLayout>
-</merge>
diff --git a/packages/CarSystemUI/res/layout/car_right_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_right_navigation_bar.xml
deleted file mode 100644
index dc9583382921..000000000000
--- a/packages/CarSystemUI/res/layout/car_right_navigation_bar.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:background="@drawable/system_bar_background">
-
- <!-- phone.NavigationBarView has rot0 and rot90 but we expect the car head unit to have a fixed
- rotation so skip this level of the hierarchy.
- -->
- <LinearLayout
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:id="@+id/nav_buttons"
- android:orientation="vertical"
- android:gravity="top"
- android:paddingTop="30dp"
- android:layout_weight="1"
- android:animateLayoutChanges="true">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- android:src="@drawable/car_ic_overview"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/grid"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;component=com.android.car.home/.AppGridActivity;launchFlags=0x14000000;end"
- systemui:longIntent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- android:src="@drawable/car_ic_apps"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvac"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- systemui:broadcast="true"
- android:src="@drawable/car_ic_hvac"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="bottom"
- android:orientation="vertical">
-
- <com.android.systemui.statusbar.AlphaOptimizedImageView
- android:id="@+id/note"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:src="@drawable/car_ic_notification"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="20dp"
- android:paddingBottom="20dp"
- android:alpha="0.7"
- />
-
-
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:singleLine="true"
- android:paddingStart="@dimen/status_bar_clock_starting_padding"
- android:paddingEnd="@dimen/status_bar_clock_end_padding"
- android:gravity="center_horizontal"
- android:paddingBottom="20dp"
- />
-
- <Space
- android:layout_height="10dp"
- android:layout_width="match_parent"/>
-
- </LinearLayout>
-
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/res/layout/car_right_navigation_bar_unprovisioned.xml b/packages/CarSystemUI/res/layout/car_right_navigation_bar_unprovisioned.xml
deleted file mode 100644
index 9e6dd113eeba..000000000000
--- a/packages/CarSystemUI/res/layout/car_right_navigation_bar_unprovisioned.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:background="@drawable/system_bar_background">
-
- <LinearLayout
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:id="@+id/nav_buttons"
- android:orientation="vertical"
- android:gravity="top"
- android:paddingTop="30dp"
- android:layout_weight="1"
- android:animateLayoutChanges="true">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- android:src="@drawable/car_ic_overview"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvac"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- systemui:broadcast="true"
- android:src="@drawable/car_ic_hvac"
- android:background="?android:attr/selectableItemBackground"
- android:paddingTop="30dp"
- android:paddingBottom="30dp"
- />
- </LinearLayout>
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/res/layout/car_status_bar_header.xml b/packages/CarSystemUI/res/layout/car_status_bar_header.xml
deleted file mode 100644
index 12c9f11b3064..000000000000
--- a/packages/CarSystemUI/res/layout/car_status_bar_header.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<!-- Extends LinearLayout -->
-<com.android.systemui.car.userswitcher.CarStatusBarHeader
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/header"
- android:layout_width="match_parent"
- android:layout_height="@dimen/status_bar_height">
-
- <include layout="@layout/car_top_navigation_bar"
- android:id="@+id/qs_car_top_bar"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- />
-</com.android.systemui.car.userswitcher.CarStatusBarHeader>
diff --git a/packages/CarSystemUI/res/layout/car_top_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_top_navigation_bar.xml
deleted file mode 100644
index 7994b19242cd..000000000000
--- a/packages/CarSystemUI/res/layout/car_top_navigation_bar.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:id="@+id/car_top_bar"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/system_bar_background"
- android:orientation="vertical">
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layoutDirection="ltr">
-
- <FrameLayout
- android:id="@+id/system_icon_area"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentStart="true"
- android:layout_marginTop="@dimen/car_padding_2"
- android:layout_marginStart="@dimen/car_padding_2"
- android:layout_centerVertical="true"
- android:gravity="center_vertical"
- >
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@drawable/system_bar_background_pill"
- android:layout_weight="1"
- android:gravity="center_vertical"
- systemui:intent="intent:#Intent;component=com.android.car.settings/.common.CarSettingActivities$QuickSettingActivity;launchFlags=0x24000000;end">
-
- <include
- layout="@layout/system_icons"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginStart="@dimen/car_padding_2"
- android:layout_marginEnd="@dimen/car_padding_2"
- android:gravity="center_vertical"
- />
- </com.android.systemui.car.navigationbar.CarNavigationButton>
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/clock_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerInParent="true"
- >
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/qs"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- systemui:intent="intent:#Intent;component=com.android.car.settings/.common.CarSettingActivities$QuickSettingActivity;launchFlags=0x24000000;end"
- />
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:elevation="5dp"
- android:singleLine="true"
- android:textAppearance="@style/TextAppearance.SystemBar.Clock"
- systemui:amPmStyle="normal"
- />
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/user_name_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:layout_marginTop="@dimen/car_padding_2"
- >
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/user_name"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginEnd="@dimen/car_padding_2"
- android:background="@drawable/system_bar_background_pill"
- android:gravity="center_vertical"
- systemui:intent="intent:#Intent;component=com.android.car.settings/.users.UserSwitcherActivity;launchFlags=0x24000000;end"
- >
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- android:layout_marginStart="@dimen/car_padding_2"
- android:layout_marginEnd="@dimen/car_padding_2"
- android:gravity="center_vertical"
- >
- <ImageView
- android:id="@+id/user_avatar"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:src="@drawable/car_ic_user_icon"
- android:layout_marginEnd="@dimen/system_bar_user_icon_padding"
- />
- <TextView
- android:id="@+id/user_name_text"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center_vertical"
- android:textAppearance="@style/TextAppearance.SystemBar.Username"
- android:maxLines="1"
- android:maxLength="10"
- android:layout_marginEnd="@dimen/system_bar_user_icon_padding"
- />
- </LinearLayout>
- </com.android.systemui.car.navigationbar.CarNavigationButton>
- </FrameLayout>
- </RelativeLayout>
-
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml b/packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml
deleted file mode 100644
index b8ac2b43b047..000000000000
--- a/packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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
- -->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:id="@+id/car_top_bar"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/system_bar_background"
- android:orientation="vertical">
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1">
-
- <FrameLayout
- android:id="@+id/left_hvac_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentStart="true"
- >
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvacleft"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- systemui:broadcast="true"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- />
-
- <com.android.systemui.car.hvac.AnimatedTemperatureView
- android:id="@+id/lefttext"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingStart="@*android:dimen/car_padding_4"
- android:paddingEnd="16dp"
- android:gravity="center_vertical|start"
- android:minEms="4"
- android:textAppearance="@style/TextAppearance.CarStatus"
- systemui:hvacAreaId="49"
- systemui:hvacPivotOffset="60dp"
- />
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/clock_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerInParent="true">
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/qs"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"/>
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:elevation="5dp"
- android:singleLine="true"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"/>
- </FrameLayout>
-
- <LinearLayout
- android:id="@+id/system_icon_area"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerHorizontal="true"
- android:layout_centerVertical="true"
- android:layout_toEndOf="@+id/clock_container"
- android:paddingStart="@*android:dimen/car_padding_1"
- android:gravity="center_vertical"
- android:orientation="horizontal"
- >
-
- <include
- layout="@layout/system_icons"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingStart="4dp"
- android:gravity="center_vertical"
- />
- </LinearLayout>
-
- <FrameLayout
- android:id="@+id/right_hvac_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- >
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvacright"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- systemui:broadcast="true"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- />
-
- <com.android.systemui.car.hvac.AnimatedTemperatureView
- android:id="@+id/righttext"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingStart="16dp"
- android:paddingEnd="@*android:dimen/car_padding_4"
- android:gravity="center_vertical|end"
- android:minEms="4"
- android:textAppearance="@style/TextAppearance.CarStatus"
- systemui:hvacAreaId="68"
- systemui:hvacPivotOffset="60dp"
- />
- </FrameLayout>
- </RelativeLayout>
-
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/res/layout/car_user_switching_dialog.xml b/packages/CarSystemUI/res/layout/car_user_switching_dialog.xml
deleted file mode 100644
index 09fbf7a59a8c..000000000000
--- a/packages/CarSystemUI/res/layout/car_user_switching_dialog.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:background="@color/car_user_switching_dialog_background_color">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_gravity="center"
- android:gravity="center_horizontal">
- <ImageView
- android:id="@+id/user_loading_avatar"
- android:layout_width="@dimen/car_fullscreen_user_pod_image_avatar_width"
- android:layout_height="@dimen/car_fullscreen_user_pod_image_avatar_height"/>
-
- <TextView
- android:id="@+id/user_loading"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/car_user_switching_dialog_loading_text_margin_top"
- android:textSize="@dimen/car_user_switching_dialog_loading_text_font_size"
- android:textColor="@color/car_user_switching_dialog_loading_text_color"
- android:layout_below="@id/user_loading_avatar"/>
- </LinearLayout>
-</FrameLayout>
diff --git a/packages/CarSystemUI/res/layout/car_volume_dialog.xml b/packages/CarSystemUI/res/layout/car_volume_dialog.xml
deleted file mode 100644
index 35551eabfaed..000000000000
--- a/packages/CarSystemUI/res/layout/car_volume_dialog.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<androidx.recyclerview.widget.RecyclerView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/volume_list"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minWidth="@dimen/volume_dialog_panel_width"/>
diff --git a/packages/CarSystemUI/res/layout/car_volume_item.xml b/packages/CarSystemUI/res/layout/car_volume_item.xml
deleted file mode 100644
index 0b429040fc86..000000000000
--- a/packages/CarSystemUI/res/layout/car_volume_item.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 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.
--->
-
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/car_volume_dialog_background_color"
- android:paddingStart="@dimen/car_volume_item_padding_start"
- android:paddingEnd="@dimen/car_volume_item_padding_end"
- android:minHeight="@dimen/car_volume_item_height">
-
- <!-- Primary Action. -->
- <ImageView
- android:id="@+id/primary_icon"
- android:layout_width="@dimen/car_volume_item_icon_size"
- android:layout_centerVertical="true"
- android:layout_alignParentStart="true"
- android:layout_height="@dimen/car_volume_item_icon_size"/>
-
- <!-- Note: the horizontal padding and offset are set to 0 so that the track and thumb
- aligns with the proper keylines. -->
- <SeekBar
- android:id="@+id/seek_bar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/car_volume_item_seekbar_margin_vertical"
- android:layout_marginTop="@dimen/car_volume_item_seekbar_margin_vertical"
- android:min="0"
- android:paddingBottom="@dimen/car_volume_item_seekbar_padding_vertical"
- android:layout_centerVertical="true"
- android:paddingEnd="0dp"
- android:paddingStart="0dp"
- android:paddingTop="@dimen/car_volume_item_seekbar_padding_vertical"
- android:splitTrack="false"
- android:layout_toStartOf="@id/supplemental_icon_divider"
- android:layout_marginStart="@dimen/car_volume_item_seekbar_margin_start"
- android:layout_marginEnd="@dimen/car_volume_item_seekbar_margin_end"
- android:thumbOffset="0dp"/>
-
- <!-- Supplemental action. -->
- <View
- android:id="@+id/supplemental_icon_divider"
- android:layout_width="@dimen/car_volume_item_divider_width"
- android:layout_height="@dimen/car_volume_item_divider_height"
- android:layout_marginEnd="@dimen/car_volume_item_divider_margin_end"
- android:layout_centerVertical="true"
- android:layout_toStartOf="@id/supplemental_icon"
- android:background="@color/car_volume_item_divider_color"/>
- <ImageView
- android:id="@+id/supplemental_icon"
- android:layout_width="@dimen/car_volume_item_icon_size"
- android:layout_height="@dimen/car_volume_item_icon_size"
- android:background="?android:attr/selectableItemBackground"
- android:layout_centerVertical="true"
- android:layout_alignParentEnd="true"
- android:scaleType="fitCenter"/>
-</RelativeLayout>
diff --git a/packages/CarSystemUI/res/layout/notification_center_activity.xml b/packages/CarSystemUI/res/layout/notification_center_activity.xml
deleted file mode 100644
index 0e45e43132de..000000000000
--- a/packages/CarSystemUI/res/layout/notification_center_activity.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.car.notification.CarNotificationView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/notification_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/notification_shade_background_color">
-
- <com.android.car.ui.FocusParkingView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
- <View
- android:id="@+id/glass_pane"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:translationZ="2dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- />
-
- <com.android.car.ui.FocusArea
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:orientation="vertical"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/notifications"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingBottom="@dimen/notification_shade_list_padding_bottom"/>
- </com.android.car.ui.FocusArea>
-
- <include layout="@layout/notification_handle_bar"/>
-
-</com.android.car.notification.CarNotificationView>
diff --git a/packages/CarSystemUI/res/layout/notification_handle_bar.xml b/packages/CarSystemUI/res/layout/notification_handle_bar.xml
deleted file mode 100644
index 99c3a02091db..000000000000
--- a/packages/CarSystemUI/res/layout/notification_handle_bar.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2019, 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.
-*/
--->
-
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <View
- android:id="@+id/handle_bar"
- android:layout_width="match_parent"
- android:layout_height="@dimen/notification_shade_handle_bar_height"
- android:layout_marginBottom="@dimen/notification_shade_handle_bar_margin_bottom"
- android:layout_marginEnd="@dimen/notification_shade_handle_bar_margin_start"
- android:layout_marginStart="@dimen/notification_shade_handle_bar_margin_end"
- android:layout_marginTop="@dimen/notification_shade_handle_bar_margin_top"
- android:background="@drawable/notification_handle_bar"/>
-</merge> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/layout/notification_panel_container.xml b/packages/CarSystemUI/res/layout/notification_panel_container.xml
deleted file mode 100644
index 3b53c6aaeac3..000000000000
--- a/packages/CarSystemUI/res/layout/notification_panel_container.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/notification_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="invisible"/>
diff --git a/packages/CarSystemUI/res/layout/rear_view_camera.xml b/packages/CarSystemUI/res/layout/rear_view_camera.xml
deleted file mode 100644
index 9b9898cf3f45..000000000000
--- a/packages/CarSystemUI/res/layout/rear_view_camera.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/rear_view_camera_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/transparent"
- android:orientation="vertical">
- <Button
- android:id="@+id/close_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/rear_view_camera_button_background"
- android:text="@string/rear_view_camera_close_button_text"
- android:textAppearance="?android:attr/textAppearanceLarge"/>
-</LinearLayout>
diff --git a/packages/CarSystemUI/res/layout/status_bar_wifi_group.xml b/packages/CarSystemUI/res/layout/status_bar_wifi_group.xml
deleted file mode 100644
index 531e57780817..000000000000
--- a/packages/CarSystemUI/res/layout/status_bar_wifi_group.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<com.android.systemui.statusbar.StatusBarWifiView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:id="@+id/wifi_combo"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center_vertical">
-
- <com.android.keyguard.AlphaOptimizedLinearLayout
- android:id="@+id/wifi_group"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingStart="2dp"
- android:gravity="center_vertical"
- >
- <FrameLayout
- android:id="@+id/inout_container"
- android:layout_width="wrap_content"
- android:layout_height="17dp"
- android:gravity="center_vertical">
- <ImageView
- android:id="@+id/wifi_in"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingEnd="2dp"
- android:src="@drawable/ic_activity_down"
- android:visibility="gone"
- />
- <ImageView
- android:id="@+id/wifi_out"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingEnd="2dp"
- android:src="@drawable/ic_activity_up"
- android:visibility="gone"
- />
- </FrameLayout>
- <FrameLayout
- android:id="@+id/wifi_combo"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_vertical">
- <com.android.systemui.statusbar.AlphaOptimizedImageView
- android:id="@+id/wifi_signal"
- android:layout_width="@*android:dimen/status_bar_system_icon_size"
- android:layout_height="@*android:dimen/status_bar_system_icon_size"
- android:theme="?attr/lightIconTheme"/>
- </FrameLayout>
-
- <View
- android:id="@+id/wifi_signal_spacer"
- android:layout_width="@dimen/status_bar_wifi_signal_spacer_width"
- android:layout_height="4dp"
- android:visibility="gone"/>
-
- <ViewStub
- android:id="@+id/connected_device_signals_stub"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout="@layout/connected_device_signal"/>
-
- <View
- android:id="@+id/wifi_airplane_spacer"
- android:layout_width="@dimen/status_bar_airplane_spacer_width"
- android:layout_height="4dp"
- android:visibility="gone"
- />
- </com.android.keyguard.AlphaOptimizedLinearLayout>
-</com.android.systemui.statusbar.StatusBarWifiView>
diff --git a/packages/CarSystemUI/res/layout/system_icons.xml b/packages/CarSystemUI/res/layout/system_icons.xml
deleted file mode 100644
index f6ffcc8c16f0..000000000000
--- a/packages/CarSystemUI/res/layout/system_icons.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/system_icons"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center_vertical"
- android:orientation="horizontal">
-
- <com.android.systemui.statusbar.phone.StatusIconContainer
- android:id="@+id/statusIcons"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:scaleType="fitCenter"
- android:gravity="center_vertical"
- android:orientation="horizontal"
- />
-
- <ImageView
- android:id="@+id/settingsIcon"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginStart="@dimen/car_padding_2"
- android:src="@drawable/car_ic_settings_icon"
- />
-</LinearLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/layout/sysui_overlay_window.xml b/packages/CarSystemUI/res/layout/sysui_overlay_window.xml
deleted file mode 100644
index 980265e84e54..000000000000
--- a/packages/CarSystemUI/res/layout/sysui_overlay_window.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<!-- Fullscreen views in sysui should be listed here in increasing Z order. -->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:background="@android:color/transparent"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ViewStub android:id="@+id/notification_panel_stub"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/notification_panel_container"/>
-
- <ViewStub android:id="@+id/keyguard_stub"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/keyguard_container" />
-
- <ViewStub android:id="@+id/fullscreen_user_switcher_stub"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/car_fullscreen_user_switcher"/>
-
- <ViewStub android:id="@+id/user_switching_dialog_stub"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/car_user_switching_dialog"/>
-
- <!-- Should be at bottom to get the highest Z-order. -->
- <ViewStub android:id="@+id/rear_view_camera_stub"
- android:layout_width="@dimen/rear_view_camera_width"
- android:layout_height="@dimen/rear_view_camera_height"
- android:layout_gravity="center"
- android:layout="@layout/rear_view_camera"/>
-</FrameLayout>
diff --git a/packages/CarSystemUI/res/values-af/strings.xml b/packages/CarSystemUI/res/values-af/strings.xml
deleted file mode 100644
index cf288d74d61c..000000000000
--- a/packages/CarSystemUI/res/values-af/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Stemherkenning nou deur gekoppelde Bluetooth-toestel hanteer"</string>
- <string name="car_guest" msgid="318393171202663722">"Gas"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gas"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Voeg gebruiker by"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nuwe gebruiker"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Wanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul spasie opstel."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Enige gebruiker kan programme vir al die ander gebruikers opdateer."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Laai tans"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Laai tans gebruiker (van <xliff:g id="FROM_USER">%1$d</xliff:g> na <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Maak toe"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-am/strings.xml b/packages/CarSystemUI/res/values-am/strings.xml
deleted file mode 100644
index 8281631312b7..000000000000
--- a/packages/CarSystemUI/res/values-am/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"ዝቅተኛ"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"ከፍተኛ"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"የድምፅ ለይቶ ማወቅ አሁን በተገናኘ የብሉቱዝ መሣሪያ ይስተናገዳል"</string>
- <string name="car_guest" msgid="318393171202663722">"እንግዳ"</string>
- <string name="start_guest_session" msgid="497784785761754874">"እንግዳ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ተጠቃሚ አክል"</string>
- <string name="car_new_user" msgid="6637442369728092473">"አዲስ ተጠቃሚ"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"አዲስ ተጠቃሚ ሲያክሉ ያ ሰው የራሳቸውን ቦታ ማቀናበር አለባቸው።"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ማንኛውም ተጠቃሚ መተግበሪያዎችን ለሌሎች ተጠቃሚዎች ሁሉ ማዘመን ይችላል።"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"በመጫን ላይ"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ተጠቃሚን (ከ<xliff:g id="FROM_USER">%1$d</xliff:g> ወደ <xliff:g id="TO_USER">%2$d</xliff:g>) በመጫን ላይ"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"ዝጋ"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ar/strings.xml b/packages/CarSystemUI/res/values-ar/strings.xml
deleted file mode 100644
index d9abb0af5608..000000000000
--- a/packages/CarSystemUI/res/values-ar/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"حد أدنى"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"حد أقصى"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"تتم معالجة التعرّف على الصوت الآن من خلال جهاز بلوتوث متصل."</string>
- <string name="car_guest" msgid="318393171202663722">"ضيف"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ضيف"</string>
- <string name="car_add_user" msgid="4067337059622483269">"إضافة مستخدم"</string>
- <string name="car_new_user" msgid="6637442369728092473">"مستخدم جديد"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"عند إضافة مستخدم جديد، على هذا المستخدم إعداد مساحته."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"يمكن لأي مستخدم تحديث التطبيقات لجميع المستخدمين الآخرين."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"جارٍ التحميل"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"جارٍ تحميل الملف الشخصي الجديد للمستخدم (من <xliff:g id="FROM_USER">%1$d</xliff:g> إلى <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"إغلاق"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-as/strings.xml b/packages/CarSystemUI/res/values-as/strings.xml
deleted file mode 100644
index d8710555149b..000000000000
--- a/packages/CarSystemUI/res/values-as/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"সর্বনিম্ন"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"সৰ্বাধিক"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"কণ্ঠস্বৰৰ চিনাক্তকৰণ এতিয়া সংযুক্ত ব্লুটুথ ডিভাইচে নিয়ন্ত্ৰণ কৰে"</string>
- <string name="car_guest" msgid="318393171202663722">"অতিথি"</string>
- <string name="start_guest_session" msgid="497784785761754874">"অতিথি"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ব্যৱহাৰকাৰী যোগ দিয়ক"</string>
- <string name="car_new_user" msgid="6637442369728092473">"নতুন ব্যৱহাৰকাৰী"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"আপুনি যেতিয়া এজন নতুন ব্যৱহাৰকাৰীক যোগ কৰে, তেতিয়া তেওঁ নিজৰ ঠাই ছেট আপ কৰাটো প্ৰয়োজন হয়।"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"যিকোনো ব্যৱহাৰকাৰীয়ে অন্য ব্যৱহাৰকাৰীৰ বাবে এপ্‌সমূহ আপডে’ট কৰিব পাৰে।"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ল’ড হৈ আছে"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ব্যৱহাৰকাৰী ল’ড হৈ আছে (<xliff:g id="FROM_USER">%1$d</xliff:g>ৰ পৰা to <xliff:g id="TO_USER">%2$d</xliff:g>লৈ)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"বন্ধ কৰক"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-az/strings.xml b/packages/CarSystemUI/res/values-az/strings.xml
deleted file mode 100644
index 89c9eb4ee258..000000000000
--- a/packages/CarSystemUI/res/values-az/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Səs tanınması qoşulmuş Bluetooth cihazı ilə icra edilir"</string>
- <string name="car_guest" msgid="318393171202663722">"Qonaq"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Qonaq"</string>
- <string name="car_add_user" msgid="4067337059622483269">"İstifadəçi əlavə edin"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Yeni İstifadəçi"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Yeni istifadəçi əlavə etdiyinizdə həmin şəxs öz yerini təyin etməlidir."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"İstənilən istifadəçi digər bütün istifadəçilər üçün tətbiqləri güncəlləyə bilər."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Yüklənir"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"İstifadəçi yüklənir (<xliff:g id="FROM_USER">%1$d</xliff:g>-<xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Qapadın"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-b+sr+Latn/strings.xml b/packages/CarSystemUI/res/values-b+sr+Latn/strings.xml
deleted file mode 100644
index 6aee01321ade..000000000000
--- a/packages/CarSystemUI/res/values-b+sr+Latn/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Prepoznavanjem glasa sada upravlja povezani Bluetooth uređaj"</string>
- <string name="car_guest" msgid="318393171202663722">"Gost"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gost"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Dodaj korisnika"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Novi korisnik"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kada dodate novog korisnika, ta osoba treba da podesi svoj prostor."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Svaki korisnik može da ažurira aplikacije za sve ostale korisnike."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Učitava se"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Profil korisnika se učitava (iz<xliff:g id="FROM_USER">%1$d</xliff:g> u <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Zatvori"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-be/strings.xml b/packages/CarSystemUI/res/values-be/strings.xml
deleted file mode 100644
index fde42732283f..000000000000
--- a/packages/CarSystemUI/res/values-be/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мін"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Макс"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Распазнаванне голасу выконвае падключаная прылада Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Госць"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Госць"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Дадаць карыстальніка"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Новы карыстальнік"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Калі вы дадаяце новага карыстальніка, яму трэба наладзіць свой профіль."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Кожны карыстальнік прылады можа абнаўляць праграмы для ўсіх іншых карыстальнікаў."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Ідзе загрузка"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Ідзе загрузка профілю карыстальніка (ад <xliff:g id="FROM_USER">%1$d</xliff:g> да <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Закрыць"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-bg/strings.xml b/packages/CarSystemUI/res/values-bg/strings.xml
deleted file mode 100644
index 25f284515b9f..000000000000
--- a/packages/CarSystemUI/res/values-bg/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мин."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Макс."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Гл. разпознаване се обработва от свързаното у-во с Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Гост"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Гост"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Добавяне на потребител"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Нов потребител"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Когато добавите нов потребител, той трябва да настрои работната си област."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Всеки потребител може да актуализира приложенията за всички останали потребители."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Зарежда се"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Потребителят се зарежда (от <xliff:g id="FROM_USER">%1$d</xliff:g> до <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Затваряне"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-bn/strings.xml b/packages/CarSystemUI/res/values-bn/strings.xml
deleted file mode 100644
index 5664cc12e109..000000000000
--- a/packages/CarSystemUI/res/values-bn/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"সর্বনিম্ন"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"সর্বাধিক"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"কানেক্ট করা ব্লুটুথ ডিভাইস এখন ভয়েস শনাক্তকরণ ম্যানেজ করছে"</string>
- <string name="car_guest" msgid="318393171202663722">"অতিথি"</string>
- <string name="start_guest_session" msgid="497784785761754874">"অতিথি"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ব্যবহারকারীকে যোগ করুন"</string>
- <string name="car_new_user" msgid="6637442369728092473">"নতুন ব্যবহারকারী"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"নতুন ব্যবহারকারী যোগ করলে, তার স্পেস তাকে সেট-আপ করে নিতে হবে।"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"যেকোনও ব্যবহারকারী বাকি সব ব্যবহারকারীর জন্য অ্যাপ আপডেট করতে পারবেন।"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"লোড হচ্ছে"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ব্যবহারকারীর প্রোফাইল লোড করা হচ্ছে (<xliff:g id="FROM_USER">%1$d</xliff:g> থেকে <xliff:g id="TO_USER">%2$d</xliff:g>-এ)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"বন্ধ করুন"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-bs/strings.xml b/packages/CarSystemUI/res/values-bs/strings.xml
deleted file mode 100644
index 588771e41740..000000000000
--- a/packages/CarSystemUI/res/values-bs/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Prepoznavanjem glasa sada upravlja povezani Bluetooth uređaj"</string>
- <string name="car_guest" msgid="318393171202663722">"Gost"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gost"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Dodaj korisnika"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Novi korisnik"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kada dodate novog korisnika, ta osoba treba postaviti svoj prostor."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Bilo koji korisnik može ažurirati aplikacije za sve druge korisnike."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Učitavanje"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Učitavanje korisnika (od korisnika <xliff:g id="FROM_USER">%1$d</xliff:g> do korisnika <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Zatvori"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ca/strings.xml b/packages/CarSystemUI/res/values-ca/strings.xml
deleted file mode 100644
index c151d48bee76..000000000000
--- a/packages/CarSystemUI/res/values-ca/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Mín."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Màx."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Reconeixement de veu gestionat per disp. Bluetooth connectat"</string>
- <string name="car_guest" msgid="318393171202663722">"Convidat"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Convidat"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Afegeix un usuari"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Usuari nou"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Quan s\'afegeix un usuari nou, aquesta persona ha de configurar el seu espai."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Qualsevol usuari pot actualitzar les aplicacions de la resta d\'usuaris."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"S\'està carregant"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"S\'està carregant l\'usuari (de <xliff:g id="FROM_USER">%1$d</xliff:g> a <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Tanca"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-cs/strings.xml b/packages/CarSystemUI/res/values-cs/strings.xml
deleted file mode 100644
index 7657e32b0223..000000000000
--- a/packages/CarSystemUI/res/values-cs/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Rozpoznávání hlasu teď provádí připojené zařízení Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Host"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Host"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Přidat uživatele"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nový uživatel"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Každý nově přidaný uživatel si musí nastavit vlastní prostor."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Každý uživatel může aktualizovat aplikace všech ostatních uživatelů."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Načítání"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Načítání uživatele (předchozí: <xliff:g id="FROM_USER">%1$d</xliff:g>, následující: <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Zavřít"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-da/strings.xml b/packages/CarSystemUI/res/values-da/strings.xml
deleted file mode 100644
index 120929e34347..000000000000
--- a/packages/CarSystemUI/res/values-da/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Talegenkendelse sker nu med den forbundne Blutetooth-enhed"</string>
- <string name="car_guest" msgid="318393171202663722">"Gæst"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gæst"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Tilføj bruger"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Ny bruger"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Når du tilføjer en ny bruger, skal vedkommende konfigurere sit område."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Alle brugere kan opdatere apps for alle andre brugere."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Indlæser"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Indlæser bruger (fra <xliff:g id="FROM_USER">%1$d</xliff:g> til <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Luk"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-de/strings.xml b/packages/CarSystemUI/res/values-de/strings.xml
deleted file mode 100644
index e2437f0c55cb..000000000000
--- a/packages/CarSystemUI/res/values-de/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Spracherkennung jetzt über das verbundene Bluetooth-Gerät"</string>
- <string name="car_guest" msgid="318393171202663722">"Gast"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gast"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Nutzer hinzufügen"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Neuer Nutzer"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Wenn du einen neuen Nutzer hinzufügst, muss dieser seinen Bereich einrichten."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Jeder Nutzer kann Apps für alle anderen Nutzer aktualisieren."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Wird geladen"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Nutzer wird geladen (von <xliff:g id="FROM_USER">%1$d</xliff:g> bis <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Schließen"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-el/strings.xml b/packages/CarSystemUI/res/values-el/strings.xml
deleted file mode 100644
index 9b24fa488923..000000000000
--- a/packages/CarSystemUI/res/values-el/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Ελάχ."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Μεγ."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Φωνητική αναγνωση από συνδεδεμένη συσκευή Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Επισκέπτης"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Επισκέπτης"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Προσθήκη χρήστη"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Νέος χρήστης"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Κατά την προσθήκη ενός νέου χρήστη, αυτός θα πρέπει να ρυθμίσει τον χώρο του."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Οποιοσδήποτε χρήστης μπορεί να ενημερώσει τις εφαρμογές για όλους τους άλλους χρήστες."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Φόρτωση"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Φόρτωση χρήστη (από <xliff:g id="FROM_USER">%1$d</xliff:g> έως <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Κλείσιμο"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-en-rAU/strings.xml b/packages/CarSystemUI/res/values-en-rAU/strings.xml
deleted file mode 100644
index 8eb76c20d8a2..000000000000
--- a/packages/CarSystemUI/res/values-en-rAU/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Voice recognition now handled by connected Bluetooth device"</string>
- <string name="car_guest" msgid="318393171202663722">"Guest"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Guest"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Add user"</string>
- <string name="car_new_user" msgid="6637442369728092473">"New user"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"When you add a new user, that person needs to set up their space."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Any user can update apps for all other users."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Loading"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Loading user (from <xliff:g id="FROM_USER">%1$d</xliff:g> to <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Close"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-en-rCA/strings.xml b/packages/CarSystemUI/res/values-en-rCA/strings.xml
deleted file mode 100644
index 8eb76c20d8a2..000000000000
--- a/packages/CarSystemUI/res/values-en-rCA/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Voice recognition now handled by connected Bluetooth device"</string>
- <string name="car_guest" msgid="318393171202663722">"Guest"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Guest"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Add user"</string>
- <string name="car_new_user" msgid="6637442369728092473">"New user"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"When you add a new user, that person needs to set up their space."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Any user can update apps for all other users."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Loading"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Loading user (from <xliff:g id="FROM_USER">%1$d</xliff:g> to <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Close"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-en-rGB/strings.xml b/packages/CarSystemUI/res/values-en-rGB/strings.xml
deleted file mode 100644
index 8eb76c20d8a2..000000000000
--- a/packages/CarSystemUI/res/values-en-rGB/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Voice recognition now handled by connected Bluetooth device"</string>
- <string name="car_guest" msgid="318393171202663722">"Guest"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Guest"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Add user"</string>
- <string name="car_new_user" msgid="6637442369728092473">"New user"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"When you add a new user, that person needs to set up their space."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Any user can update apps for all other users."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Loading"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Loading user (from <xliff:g id="FROM_USER">%1$d</xliff:g> to <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Close"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-en-rIN/strings.xml b/packages/CarSystemUI/res/values-en-rIN/strings.xml
deleted file mode 100644
index 8eb76c20d8a2..000000000000
--- a/packages/CarSystemUI/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Voice recognition now handled by connected Bluetooth device"</string>
- <string name="car_guest" msgid="318393171202663722">"Guest"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Guest"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Add user"</string>
- <string name="car_new_user" msgid="6637442369728092473">"New user"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"When you add a new user, that person needs to set up their space."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Any user can update apps for all other users."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Loading"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Loading user (from <xliff:g id="FROM_USER">%1$d</xliff:g> to <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Close"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-en-rXC/strings.xml b/packages/CarSystemUI/res/values-en-rXC/strings.xml
deleted file mode 100644
index 37a568bf3e5a..000000000000
--- a/packages/CarSystemUI/res/values-en-rXC/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‏‎‏‎‏‏‏‎‏‏‏‎‏‎‎‏‎‏‏‏‎‎‏‎‏‏‏‎‎‎‎‏‎‏‏‎‏‏‎‏‏‏‏‎‏‏‏‎‎‏‎‎‎‎‎‎Min‎‏‎‎‏‎"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‎‏‎‏‏‏‎‏‏‎‏‎‏‎‏‏‏‏‎‏‎‏‎‏‏‎‏‏‏‎‏‎‏‎‏‎‎‎‏‏‏‏‏‎‎‎‎‎‏‎‏‏‏‎‏‏‏‏‏‎Max‎‏‎‎‏‎"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‏‏‎‎‎‏‏‎‏‎‏‏‏‎‏‏‏‎‏‏‎‎‎‏‏‎‏‎‏‏‎‎‎‏‎‏‏‎‎‎‏‏‎‏‎‏‎‎Voice recognition now handled by connected Bluetooth device‎‏‎‎‏‎"</string>
- <string name="car_guest" msgid="318393171202663722">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‎‎‏‏‎‏‎‏‏‎‎‏‎‏‎‎‎‏‏‏‎‎‏‏‎‏‏‏‏‏‏‎‎‎‏‏‏‎‎‎‏‏‏‏‎‎‏‎‏‎‎‏‎‏‎‏‎‎Guest‎‏‎‎‏‎"</string>
- <string name="start_guest_session" msgid="497784785761754874">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‎‏‏‏‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‎‎‎‎‎‎‎‏‎‎‎‏‏‏‏‎‏‏‎‎‎‏‎‏‏‏‏‎‏‏‏‏‏‎‏‎‎Guest‎‏‎‎‏‎"</string>
- <string name="car_add_user" msgid="4067337059622483269">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‎‎‎‏‏‏‎‎‏‎‎‎‎‏‎‏‎‏‏‎‎‎‎‎‎‏‏‎‎‎‏‏‎‎‏‎‎‏‎‏‎‎‎‏‏‏‎‏‎‏‎‏‎‎‎‏‎‏‎Add User‎‏‎‎‏‎"</string>
- <string name="car_new_user" msgid="6637442369728092473">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‎‎‎‎‏‏‏‎‎‏‏‏‎‏‏‏‎‏‎‏‎‏‎‏‏‎‎‏‎‏‎‎‎‏‏‎‎‎‏‎‏‎‎‎‏‏‎‎‏‎‎‏‏‏‎‎‏‎New User‎‏‎‎‏‎"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‏‎‎‏‎‏‏‏‏‏‎‎‎‏‏‏‎‏‎‏‏‏‏‎‎‏‎‏‎‎‎‏‎‏‎‎‏‎‏‏‎‏‎‏‎‏‏‏‎‎‎‎‎‎‎‎‏‏‎When you add a new user, that person needs to set up their space.‎‏‎‎‏‎"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‎‎‎‎‎‎‎‎‎‎‎‏‏‎‎‎‏‎‏‎‎‎‏‏‏‎‏‎‏‏‏‎‏‎‎‏‎‏‏‏‏‏‏‏‎‏‎‎‏‏‏‎‎‎‏‏‎Any user can update apps for all other users.‎‏‎‎‏‎"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‎‏‏‎‏‎‏‏‏‎‎‏‎‏‏‎‎‏‏‏‏‎‏‏‏‏‏‎‏‎‎‏‏‏‎‏‏‎‏‏‎‎‎‎‎‎‎‎‎‏‎‏‎‎Loading‎‏‎‎‏‎"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‏‏‎‎‎‎‏‏‎‎‏‏‏‎‏‏‎‎‏‏‎‏‎‏‏‎‎‎‎‏‏‎‏‎‏‏‏‎‏‎‎‏‎‏‏‎‎‎‏‎‏‎‎‎‏‎‏‏‎Loading user (from ‎‏‎‎‏‏‎<xliff:g id="FROM_USER">%1$d</xliff:g>‎‏‎‎‏‏‏‎ to ‎‏‎‎‏‏‎<xliff:g id="TO_USER">%2$d</xliff:g>‎‏‎‎‏‏‏‎)‎‏‎‎‏‎"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‎‎‎‎‎‏‎‏‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‏‏‏‏‎‏‎Close‎‏‎‎‏‎"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-es-rUS/strings.xml b/packages/CarSystemUI/res/values-es-rUS/strings.xml
deleted file mode 100644
index e067594b71c5..000000000000
--- a/packages/CarSystemUI/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Mín."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Máx."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"El dispositivo Bluetooth administra el reconocimiento de voz"</string>
- <string name="car_guest" msgid="318393171202663722">"Invitado"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Invitado"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Agregar usuario"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Usuario nuevo"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Cuando agregues un usuario nuevo, esa persona deberá configurar su espacio."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Cualquier usuario puede actualizar las aplicaciones del resto de los usuarios."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Cargando"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Cargando usuario (de <xliff:g id="FROM_USER">%1$d</xliff:g> a <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Cerrar"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-es/strings.xml b/packages/CarSystemUI/res/values-es/strings.xml
deleted file mode 100644
index 8aad2cad9cf2..000000000000
--- a/packages/CarSystemUI/res/values-es/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Mín."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Máx."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"El dispositivo Bluetooth gestiona el reconocimiento de voz"</string>
- <string name="car_guest" msgid="318393171202663722">"Invitado"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Invitado"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Añadir usuario"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nuevo usuario"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Cuando añades un usuario, esa persona debe configurar su espacio."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Cualquier usuario puede actualizar las aplicaciones del resto de los usuarios."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Cargando"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Cargando usuario (de <xliff:g id="FROM_USER">%1$d</xliff:g> a <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Cerrar"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-et/strings.xml b/packages/CarSystemUI/res/values-et/strings.xml
deleted file mode 100644
index 14ec9df45c2d..000000000000
--- a/packages/CarSystemUI/res/values-et/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Häältuvastust haldab nüüd ühendatud Bluetoothi seade"</string>
- <string name="car_guest" msgid="318393171202663722">"Külaline"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Külaline"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Lisa kasutaja"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Uus kasutaja"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kui lisate uue kasutaja, siis peab ta seadistama oma ruumi."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Iga kasutaja saab rakendusi värskendada kõigi teiste kasutajate jaoks."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Laadimine"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Kasutaja laadimine (<xliff:g id="FROM_USER">%1$d</xliff:g> &gt; <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Sule"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-eu/strings.xml b/packages/CarSystemUI/res/values-eu/strings.xml
deleted file mode 100644
index 9139e650187e..000000000000
--- a/packages/CarSystemUI/res/values-eu/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Konektatutako Bluetooth bidezko gailuak kudeatzen du ahotsa ezagutzeko eginbidea"</string>
- <string name="car_guest" msgid="318393171202663722">"Gonbidatua"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gonbidatua"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Gehitu erabiltzaile bat"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Erabiltzaile berria"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Erabiltzaile bat gehitzen duzunean, bere eremua konfiguratu beharko du."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Edozein erabiltzailek egunera ditzake beste erabiltzaile guztien aplikazioak."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Kargatzen"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Erabiltzailea kargatzen (<xliff:g id="FROM_USER">%1$d</xliff:g> izatetik<xliff:g id="TO_USER">%2$d</xliff:g> izatera igaroko da)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Itxi"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-fa/strings.xml b/packages/CarSystemUI/res/values-fa/strings.xml
deleted file mode 100644
index 3f53b1145b96..000000000000
--- a/packages/CarSystemUI/res/values-fa/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"حداقل"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"حداکثر"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"اکنون تشخیص صدا را دستگاه بلوتوث متصل کنترل می‌کند"</string>
- <string name="car_guest" msgid="318393171202663722">"مهمان"</string>
- <string name="start_guest_session" msgid="497784785761754874">"مهمان"</string>
- <string name="car_add_user" msgid="4067337059622483269">"افزودن کاربر"</string>
- <string name="car_new_user" msgid="6637442369728092473">"کاربر جدید"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"وقتی کاربر جدیدی اضافه می‌کنید، آن فرد باید فضای خود را تنظیم کند."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"هر کاربری می‌تواند برنامه‌ها را برای همه کاربران دیگر به‌روزرسانی کند."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"درحال بارگیری"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"بارگیری کاربر (از <xliff:g id="FROM_USER">%1$d</xliff:g> تا <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"بستن"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-fi/strings.xml b/packages/CarSystemUI/res/values-fi/strings.xml
deleted file mode 100644
index 4c20f85786c5..000000000000
--- a/packages/CarSystemUI/res/values-fi/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Alin"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Ylin"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Äänentunnistus tehdään nyt yhdistetyllä Bluetooth-laitteella"</string>
- <string name="car_guest" msgid="318393171202663722">"Vieras"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Vieras"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Lisää käyttäjä"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Uusi käyttäjä"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kun lisäät uuden käyttäjän, hänen on valittava oman tilansa asetukset."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Kaikki käyttäjät voivat päivittää sovelluksia muille käyttäjille."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Ladataan"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Ladataan käyttäjäprofiilia (<xliff:g id="FROM_USER">%1$d</xliff:g>–<xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Sulje"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-fr-rCA/strings.xml b/packages/CarSystemUI/res/values-fr-rCA/strings.xml
deleted file mode 100644
index b1905490f229..000000000000
--- a/packages/CarSystemUI/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"La reconn. voc. est gérée par l\'appareil Bluetooth connecté"</string>
- <string name="car_guest" msgid="318393171202663722">"Invité"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Invité"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Ajouter un utilisateur"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nouvel utilisateur"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Lorsque vous ajoutez un utilisateur, celui-ci doit configurer son espace."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Tout utilisateur peut mettre à jour les applications pour tous les autres utilisateurs."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Chargement en cours…"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Chargement de l\'utilisateur (de <xliff:g id="FROM_USER">%1$d</xliff:g> vers <xliff:g id="TO_USER">%2$d</xliff:g>) en cours…"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Fermer"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-fr/strings.xml b/packages/CarSystemUI/res/values-fr/strings.xml
deleted file mode 100644
index 5a905a000c42..000000000000
--- a/packages/CarSystemUI/res/values-fr/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"L\'appareil Bluetooth connecté gère la reconnaissance vocale"</string>
- <string name="car_guest" msgid="318393171202663722">"Invité"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Invité"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Ajouter un utilisateur"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nouvel utilisateur"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Lorsque vous ajoutez un utilisateur, celui-ci doit configurer son espace."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"N\'importe quel utilisateur peut mettre à jour les applications pour tous les autres utilisateurs."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Chargement…"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Chargement de l\'utilisateur (de <xliff:g id="FROM_USER">%1$d</xliff:g> à <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Fermer"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-gl/strings.xml b/packages/CarSystemUI/res/values-gl/strings.xml
deleted file mode 100644
index e77df4f50272..000000000000
--- a/packages/CarSystemUI/res/values-gl/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Mín."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Máx."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"O dispositivo Bluetooth xestionará o recoñecemento de voz"</string>
- <string name="car_guest" msgid="318393171202663722">"Convidado"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Convidado"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Engadir usuario"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Novo usuario"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Cando engadas un novo usuario, este deberá configurar o seu espazo."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Calquera usuario pode actualizar as aplicacións para o resto dos usuarios."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Cargando"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Cargando usuario (do <xliff:g id="FROM_USER">%1$d</xliff:g> ao <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Pechar"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-gu/strings.xml b/packages/CarSystemUI/res/values-gu/strings.xml
deleted file mode 100644
index 174d7a724240..000000000000
--- a/packages/CarSystemUI/res/values-gu/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"ન્યૂનતમ"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"મહત્તમ"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"અવાજની ઓળખ હવે કનેક્ટેડ બ્લૂટૂથ ડિવાઇસ વડે નિયંત્રિત થશે"</string>
- <string name="car_guest" msgid="318393171202663722">"અતિથિ"</string>
- <string name="start_guest_session" msgid="497784785761754874">"અતિથિ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"વપરાશકર્તા ઉમેરો"</string>
- <string name="car_new_user" msgid="6637442369728092473">"નવા વપરાશકર્તા"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"જ્યારે તમે કોઈ નવા વપરાશકર્તાને ઉમેરો છો, ત્યારે તે વ્યક્તિએ તેમની સ્પેસ સેટ કરવાની જરૂર રહે છે."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"કોઈપણ વપરાશકર્તા અન્ય બધા વપરાશકર્તાઓ માટે ઍપને અપડેટ કરી શકે છે."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"લોડ કરી રહ્યાં છીએ"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"વપરાશકર્તાને લોડ કરી રહ્યાં છીએ (<xliff:g id="FROM_USER">%1$d</xliff:g>માંથી <xliff:g id="TO_USER">%2$d</xliff:g>માં)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"બંધ કરો"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-hi/strings.xml b/packages/CarSystemUI/res/values-hi/strings.xml
deleted file mode 100644
index 83321fd630b9..000000000000
--- a/packages/CarSystemUI/res/values-hi/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"कम से कम"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"ज़्यादा से ज़्यादा"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"अब आवाज़ पहचानने का काम, कनेक्ट किए गए ब्लूटूथ डिवाइस करते हैं"</string>
- <string name="car_guest" msgid="318393171202663722">"मेहमान प्रोफ़ाइल"</string>
- <string name="start_guest_session" msgid="497784785761754874">"मेहमान के तौर पर सेशन शुरू करें"</string>
- <string name="car_add_user" msgid="4067337059622483269">"उपयोगकर्ता जोड़ें"</string>
- <string name="car_new_user" msgid="6637442369728092473">"नया उपयोगकर्ता"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"जब आप कोई नया उपयोगकर्ता जोड़ते हैं, तब उसे अपनी जगह सेट करनी होती है."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"कोई भी उपयोगकर्ता, बाकी सभी उपयोगकर्ताओं के लिए ऐप्लिकेशन अपडेट कर सकता है."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"लोड हो रही है"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"उपयोगकर्ता को लोड किया जा रहा है (<xliff:g id="FROM_USER">%1$d</xliff:g> से <xliff:g id="TO_USER">%2$d</xliff:g> पर)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"बंद करें"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-hr/strings.xml b/packages/CarSystemUI/res/values-hr/strings.xml
deleted file mode 100644
index 872fc69d8cfb..000000000000
--- a/packages/CarSystemUI/res/values-hr/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Prepoznavanjem glasa rukuje se s povezanog Bluetooth uređaja"</string>
- <string name="car_guest" msgid="318393171202663722">"Gost"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gost"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Dodajte korisnika"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Novi korisnik"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kada dodate novog korisnika, ta osoba mora postaviti vlastiti prostor."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Svaki korisnik može ažurirati aplikacije za ostale korisnike."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Učitavanje"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Učitavanje korisnika (od <xliff:g id="FROM_USER">%1$d</xliff:g> do <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Zatvori"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-hu/strings.xml b/packages/CarSystemUI/res/values-hu/strings.xml
deleted file mode 100644
index 63328f370ed3..000000000000
--- a/packages/CarSystemUI/res/values-hu/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"A hangfelismerést a csatlakoztatott Bluetooth-eszköz kezeli"</string>
- <string name="car_guest" msgid="318393171202663722">"Vendég"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Vendég"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Felhasználó hozzáadása"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Új felhasználó"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Ha új felhasználót ad hozzá, az illetőnek be kell állítania saját felületét."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Bármely felhasználó frissítheti az alkalmazásokat az összes felhasználó számára."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Betöltés"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Felhasználó betöltése (<xliff:g id="FROM_USER">%1$d</xliff:g> → <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Bezárás"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-hy/strings.xml b/packages/CarSystemUI/res/values-hy/strings.xml
deleted file mode 100644
index 778f6954da3d..000000000000
--- a/packages/CarSystemUI/res/values-hy/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Նվազ․"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Առավ․"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Ձայնի ճանաչումը մշակվում է միացված Bluetooth սարքի կողմից"</string>
- <string name="car_guest" msgid="318393171202663722">"Հյուր"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Հյուրի ռեժիմ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Ավելացնել օգտատեր"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Նոր օգտատեր"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Երբ դուք նոր օգտատեր եք ավելացնում, նա պետք է կարգավորի իր պրոֆիլը։"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Ցանկացած օգտատեր կարող է թարմացնել հավելվածները բոլոր մյուս հաշիվների համար։"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Բեռնում"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Օգտատերը բեռնվում է (<xliff:g id="FROM_USER">%1$d</xliff:g> – <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Փակել"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-in/strings.xml b/packages/CarSystemUI/res/values-in/strings.xml
deleted file mode 100644
index 60525ad8da54..000000000000
--- a/packages/CarSystemUI/res/values-in/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Pengenalan suara ditangani perangkat Bluetooth terhubung"</string>
- <string name="car_guest" msgid="318393171202663722">"Tamu"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Tamu"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Tambahkan Pengguna"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Pengguna Baru"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Jika ditambahkan, pengguna baru harus menyiapkan ruangnya sendiri."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Setiap pengguna dapat mengupdate aplikasi untuk semua pengguna lain."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Memuat"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Memuat pengguna (dari <xliff:g id="FROM_USER">%1$d</xliff:g> menjadi <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Tutup"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-is/strings.xml b/packages/CarSystemUI/res/values-is/strings.xml
deleted file mode 100644
index 5a927aa0928a..000000000000
--- a/packages/CarSystemUI/res/values-is/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Lágm."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Hám."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Raddgreiningu er nú stjórnað af tengdu Bluetooth-tæki"</string>
- <string name="car_guest" msgid="318393171202663722">"Gestur"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gestur"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Bæta notanda við"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nýr notandi"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Þegar þú bætir nýjum notanda við þarf viðkomandi að setja upp sitt eigið svæði."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Allir notendur geta uppfært forrit fyrir alla aðra notendur."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Hleður"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Hleður notanda (frá <xliff:g id="FROM_USER">%1$d</xliff:g> til <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Loka"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-it/strings.xml b/packages/CarSystemUI/res/values-it/strings.xml
deleted file mode 100644
index 41d7ad4f70ee..000000000000
--- a/packages/CarSystemUI/res/values-it/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Riconoscimento vocale gestito da dispos. Bluetooth connesso"</string>
- <string name="car_guest" msgid="318393171202663722">"Ospite"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Ospite"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Aggiungi utente"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nuovo utente"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Il nuovo utente, una volta aggiunto, dovrà configurare il suo spazio."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Qualsiasi utente può aggiornare le app per tutti gli altri."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Caricamento"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Caricamento dell\'utente (da <xliff:g id="FROM_USER">%1$d</xliff:g> a <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Chiudi"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-iw/strings.xml b/packages/CarSystemUI/res/values-iw/strings.xml
deleted file mode 100644
index f419cac56d48..000000000000
--- a/packages/CarSystemUI/res/values-iw/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"מינ\'"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"מקס\'"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"הזיהוי הקולי מתבצע עכשיו במכשיר Bluetooth מחובר"</string>
- <string name="car_guest" msgid="318393171202663722">"אורח"</string>
- <string name="start_guest_session" msgid="497784785761754874">"אורח"</string>
- <string name="car_add_user" msgid="4067337059622483269">"הוספת משתמש"</string>
- <string name="car_new_user" msgid="6637442369728092473">"משתמש חדש"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"בעת הוספת משתמש חדש, על משתמש זה להגדיר את המרחב שלו."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"כל משתמש יכול לעדכן אפליקציות לכל שאר המשתמשים."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"בטעינה"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"המשתמש בטעינה (מהמשתמש <xliff:g id="FROM_USER">%1$d</xliff:g> אל <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"סגירה"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ja/strings.xml b/packages/CarSystemUI/res/values-ja/strings.xml
deleted file mode 100644
index 9cf056fdf7c6..000000000000
--- a/packages/CarSystemUI/res/values-ja/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"最小"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"最大"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Bluetooth 接続デバイスで音声認識が処理されるようになりました"</string>
- <string name="car_guest" msgid="318393171202663722">"ゲスト"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ゲスト"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ユーザーを追加"</string>
- <string name="car_new_user" msgid="6637442369728092473">"新しいユーザー"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"新しいユーザーを追加したら、そのユーザーは自分のスペースをセットアップする必要があります。"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"どのユーザーも他のすべてのユーザーに代わってアプリを更新できます。"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"読み込んでいます"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ユーザーを読み込んでいます(<xliff:g id="FROM_USER">%1$d</xliff:g>~<xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"閉じる"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ka/strings.xml b/packages/CarSystemUI/res/values-ka/strings.xml
deleted file mode 100644
index 7d62c62a8abe..000000000000
--- a/packages/CarSystemUI/res/values-ka/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"მინ"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"მაქს"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ხმის ამოცნობა დამუშავდება დაკავშირებული Bluetooth-მოწყობილობით"</string>
- <string name="car_guest" msgid="318393171202663722">"სტუმარი"</string>
- <string name="start_guest_session" msgid="497784785761754874">"სტუმარი"</string>
- <string name="car_add_user" msgid="4067337059622483269">"მომხმარებლის დამატება"</string>
- <string name="car_new_user" msgid="6637442369728092473">"ახალი მომხმარებელი"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"ახალი მომხმარებლის დამატებისას, ამ მომხმარებელს საკუთარი სივრცის გამართვა მოუწევს."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ნებისმიერ მომხმარებელს შეუძლია აპები ყველა სხვა მომხმარებლისათვის განაახლოს."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"იტვირთება"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"იტვირთება მომხმარებელი (<xliff:g id="FROM_USER">%1$d</xliff:g>-დან <xliff:g id="TO_USER">%2$d</xliff:g>-მდე)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"დახურვა"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-kk/strings.xml b/packages/CarSystemUI/res/values-kk/strings.xml
deleted file mode 100644
index 313fe816f106..000000000000
--- a/packages/CarSystemUI/res/values-kk/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мин."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Макс."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Дауысты тану үшін Bluetooth құрылғысы пайдаланылады."</string>
- <string name="car_guest" msgid="318393171202663722">"Қонақ"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Қонақ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Пайдаланушыны енгізу"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Жаңа пайдаланушы"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Қосылған жаңа пайдаланушы өз профилін реттеуі керек."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Кез келген пайдаланушы қолданбаларды басқа пайдаланушылар үшін жаңарта алады."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Жүктелуде"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Пайдаланушы профилі жүктелуде (<xliff:g id="FROM_USER">%1$d</xliff:g> – <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Жабу"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-km/strings.xml b/packages/CarSystemUI/res/values-km/strings.xml
deleted file mode 100644
index 709cfe572ce9..000000000000
--- a/packages/CarSystemUI/res/values-km/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"អប្បបរមា"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"អតិបរិមា"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ឥឡូវនេះ ការសម្គាល់សំឡេងត្រូវបានចាត់ចែងដោយឧបករណ៍ដែលបានភ្ជាប់ប៊្លូធូស"</string>
- <string name="car_guest" msgid="318393171202663722">"ភ្ញៀវ"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ភ្ញៀវ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"បញ្ចូល​អ្នក​ប្រើប្រាស់"</string>
- <string name="car_new_user" msgid="6637442369728092473">"អ្នក​ប្រើប្រាស់​ថ្មី"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"នៅពេលដែល​អ្នក​បញ្ចូល​អ្នក​ប្រើប្រាស់​ថ្មី បុគ្គល​នោះ​ត្រូវតែ​រៀបចំ​ទំហំ​ផ្ទុក​របស់គេ។"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"អ្នកប្រើប្រាស់​ណាក៏​អាច​ដំឡើងកំណែ​កម្មវិធី​សម្រាប់​អ្នកប្រើប្រាស់ទាំងអស់​ផ្សេងទៀត​បានដែរ។"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"កំពុងផ្ទុក"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"កំពុងផ្ទុក​អ្នកប្រើប្រាស់ (ពី <xliff:g id="FROM_USER">%1$d</xliff:g> ដល់ <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"បិទ"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-kn/strings.xml b/packages/CarSystemUI/res/values-kn/strings.xml
deleted file mode 100644
index b9667df3afb3..000000000000
--- a/packages/CarSystemUI/res/values-kn/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"ಕನಿಷ್ಠ"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"ಗರಿಷ್ಠ"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ಇದೀಗ ಕನೆಕ್ಟ್ ಆದ ಬ್ಲೂಟೂತ್ ಸಾಧನ ಧ್ವನಿ ಗುರುತಿಸುವಿಕೆ ನಿರ್ವಹಿಸಿದೆ"</string>
- <string name="car_guest" msgid="318393171202663722">"ಅತಿಥಿ"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ಅತಿಥಿ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿ"</string>
- <string name="car_new_user" msgid="6637442369728092473">"ಹೊಸ ಬಳಕೆದಾರ"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"ನೀವು ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ಅವರ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ಯಾವುದೇ ಬಳಕೆದಾರರು ಎಲ್ಲಾ ಇತರೆ ಬಳಕೆದಾರರಿಗಾಗಿ ಆ್ಯಪ್‌ಗಳನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ಲೋಡ್ ಆಗುತ್ತಿದೆ"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ಬಳಕೆದಾರರನ್ನು ಲೋಡ್ ಮಾಡಲಾಗುತ್ತಿದೆ (<xliff:g id="FROM_USER">%1$d</xliff:g> ನಿಂದ <xliff:g id="TO_USER">%2$d</xliff:g> ವರೆಗೆ)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"ಮುಚ್ಚಿರಿ"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ko/strings.xml b/packages/CarSystemUI/res/values-ko/strings.xml
deleted file mode 100644
index 17a24667b547..000000000000
--- a/packages/CarSystemUI/res/values-ko/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"최소"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"최대"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"이제 연결된 블루투스 기기에서 음성 인식이 처리됩니다."</string>
- <string name="car_guest" msgid="318393171202663722">"게스트"</string>
- <string name="start_guest_session" msgid="497784785761754874">"게스트"</string>
- <string name="car_add_user" msgid="4067337059622483269">"사용자 추가"</string>
- <string name="car_new_user" msgid="6637442369728092473">"신규 사용자"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"추가된 신규 사용자는 자신만의 공간을 설정해야 합니다."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"누구나 다른 모든 사용자를 위해 앱을 업데이트할 수 있습니다."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"로드 중"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"사용자 로드 중(<xliff:g id="FROM_USER">%1$d</xliff:g>님에서 <xliff:g id="TO_USER">%2$d</xliff:g>님으로)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"닫기"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ky/strings.xml b/packages/CarSystemUI/res/values-ky/strings.xml
deleted file mode 100644
index 74150d07a8ae..000000000000
--- a/packages/CarSystemUI/res/values-ky/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мин."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Макс."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Үндү эми туташкан Bluetooth түзмөгү менен тааныса болот"</string>
- <string name="car_guest" msgid="318393171202663722">"Конок"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Конок"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Колдонуучу кошуу"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Жаңы колдонуучу"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Жаңы колдонуучу кошулганда, ал өзүнүн профилин жөндөп алышы керек."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Колдонмолорду бир колдонуучу жаңыртканда, ал калган бардык колдонуучулар үчүн да жаңырат."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Жүктөлүүдө"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Колдонуучу тууралуу маалымат жүктөлүүдө (<xliff:g id="FROM_USER">%1$d</xliff:g> – <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Жабуу"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-lo/strings.xml b/packages/CarSystemUI/res/values-lo/strings.xml
deleted file mode 100644
index bc94a5104c6b..000000000000
--- a/packages/CarSystemUI/res/values-lo/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"ນທ"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"ສູງສຸດ"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ການຈຳແນກສຽງເວົ້າດຽວນີ້ຈັດການໂດຍອຸປະກອນ Bluetooth ທີ່ເຊື່ອມຕໍ່"</string>
- <string name="car_guest" msgid="318393171202663722">"ແຂກ"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ແຂກ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ເພີ່ມຜູ້ໃຊ້"</string>
- <string name="car_new_user" msgid="6637442369728092473">"ຜູ້ໃຊ້ໃໝ່"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"ເມື່ອທ່ານເພີ່ມຜູ້ໃຊ້ໃໝ່, ບຸກຄົນນັ້ນຈຳເປັນຕ້ອງຕັ້ງຄ່າພື້ນທີ່ຂອງເຂົາເຈົ້າ."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ຜູ້ໃຊ້ຕ່າງໆສາມາດອັບເດດແອັບສຳລັບຜູ້ໃຊ້ອື່ນທັງໝົດໄດ້."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ກຳລັງໂຫຼດ"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ກຳລັງໂຫຼດຜູ້ໃຊ້ (ຈາກ <xliff:g id="FROM_USER">%1$d</xliff:g> ໄປຍັງ <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"ປິດ"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-lt/strings.xml b/packages/CarSystemUI/res/values-lt/strings.xml
deleted file mode 100644
index a47ad5909f12..000000000000
--- a/packages/CarSystemUI/res/values-lt/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Didž."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Balso atpažinimą dabar tvarko susietas „Bluetooth“ įrenginys"</string>
- <string name="car_guest" msgid="318393171202663722">"Svečias"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Svečias"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Pridėti naudotoją"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Naujas naudotojas"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kai pridedate naują naudotoją, šis asmuo turi nustatyti savo vietą."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Bet kuris naudotojas gali atnaujinti visų kitų naudotojų programas."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Įkeliama"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Įkeliamas naudotojo profilis (<xliff:g id="FROM_USER">%1$d</xliff:g> – <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Uždaryti"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-lv/strings.xml b/packages/CarSystemUI/res/values-lv/strings.xml
deleted file mode 100644
index cb7c8b9f1575..000000000000
--- a/packages/CarSystemUI/res/values-lv/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Balss atpazīšanu tagad nodrošina pievienotā Bluetooth ierīce"</string>
- <string name="car_guest" msgid="318393171202663722">"Viesis"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Viesis"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Pievienot lietotāju"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Jauns lietotājs"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kad pievienojat jaunu lietotāju, viņam ir jāizveido savs profils."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Ikviens lietotājs var atjaunināt lietotnes visu lietotāju vārdā."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Notiek ielāde…"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Notiek lietotāja profila ielāde (<xliff:g id="FROM_USER">%1$d</xliff:g>–<xliff:g id="TO_USER">%2$d</xliff:g>)…"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Aizvērt"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-mk/strings.xml b/packages/CarSystemUI/res/values-mk/strings.xml
deleted file mode 100644
index cd2ae973a078..000000000000
--- a/packages/CarSystemUI/res/values-mk/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мин."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Макс."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Поврзаниот уред со Bluetooth управува со препознавањето глас"</string>
- <string name="car_guest" msgid="318393171202663722">"Гостин"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Гостин"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Додај корисник"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Нов корисник"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Кога додавате нов корисник, тоа лице треба да го постави својот простор."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Секој корисник може да ажурира апликации за сите други корисници."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Се вчитува"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Се вчитува корисникот (од <xliff:g id="FROM_USER">%1$d</xliff:g> до <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Затвори"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ml/strings.xml b/packages/CarSystemUI/res/values-ml/strings.xml
deleted file mode 100644
index 613ea59874bc..000000000000
--- a/packages/CarSystemUI/res/values-ml/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"മിനിമം"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"മാക്സിമം"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"കണക്റ്റ് ചെയ്ത Bluetooth ഉപകരണം വഴി ഇപ്പോൾ വോയ്‌സ് തിരിച്ചറിയൽ കെെകാര്യം ചെയ്യുന്നു"</string>
- <string name="car_guest" msgid="318393171202663722">"അതിഥി"</string>
- <string name="start_guest_session" msgid="497784785761754874">"അതിഥി"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ഉപയോക്താവിനെ ചേർക്കുക"</string>
- <string name="car_new_user" msgid="6637442369728092473">"പുതിയ ഉപയോക്താവ്"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"നിങ്ങളൊരു പുതിയ ഉപയോക്താവിനെ ചേർക്കുമ്പോൾ, ആ വ്യക്തി സ്വന്തം ഇടം സജ്ജീകരിക്കേണ്ടതുണ്ട്."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ഏതൊരു ഉപയോക്താവിനും മറ്റെല്ലാ ഉപയോക്താക്കൾക്കുമായി ആപ്പുകൾ അപ്‌ഡേറ്റ് ചെയ്യാനാവും."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ലോഡ് ചെയ്യുന്നു"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ഉപയോക്തൃ പ്രൊഫൈൽ ലോഡ് ചെയ്യുന്നു (<xliff:g id="FROM_USER">%1$d</xliff:g> എന്നതിൽ നിന്ന് <xliff:g id="TO_USER">%2$d</xliff:g> എന്നതിലേക്ക്)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"അടയ്ക്കുക"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-mn/strings.xml b/packages/CarSystemUI/res/values-mn/strings.xml
deleted file mode 100644
index 33bcd275117d..000000000000
--- a/packages/CarSystemUI/res/values-mn/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Бага"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Их"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Одоо дуугаар танихыг холбогдсон Bluetooth төхөөрөмж удирдана"</string>
- <string name="car_guest" msgid="318393171202663722">"Зочин"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Зочин"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Хэрэглэгч нэмэх"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Шинэ хэрэглэгч"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Та шинэ хэрэглэгч нэмэх үед тухайн хэрэглэгч хувийн орон зайгаа тохируулах шаардлагатай."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Бусад бүх хэрэглэгчийн аппыг дурын хэрэглэгч шинэчлэх боломжтой."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Ачаалж байна"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Хэрэглэгчийг ачаалж байна (<xliff:g id="FROM_USER">%1$d</xliff:g>-с <xliff:g id="TO_USER">%2$d</xliff:g> хүртэл)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Хаах"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-mr/strings.xml b/packages/CarSystemUI/res/values-mr/strings.xml
deleted file mode 100644
index b1c8a72a04df..000000000000
--- a/packages/CarSystemUI/res/values-mr/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"मि"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"कमाल"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"आता कनेक्ट केलेले ब्लूटूथ डिव्हाइस व्हॉइस रेकग्निशन हाताळते"</string>
- <string name="car_guest" msgid="318393171202663722">"अतिथी"</string>
- <string name="start_guest_session" msgid="497784785761754874">"अतिथी"</string>
- <string name="car_add_user" msgid="4067337059622483269">"वापरकर्ता जोडा"</string>
- <string name="car_new_user" msgid="6637442369728092473">"नवीन वापरकर्ता"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"तुम्ही नवीन वापरकर्ता जोडता तेव्हा त्या व्यक्तीने त्यांची जागा सेट करणे आवश्यक असते."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"कोणताही वापरकर्ता इतर सर्व वापरकर्त्यांसाठी अ‍ॅप्स अपडेट करू शकतो."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"लोड करत आहे"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"वापरकर्ता लोड करत आहे (<xliff:g id="FROM_USER">%1$d</xliff:g> पासून <xliff:g id="TO_USER">%2$d</xliff:g> पर्यंत)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"बंद करा"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ms/strings.xml b/packages/CarSystemUI/res/values-ms/strings.xml
deleted file mode 100644
index 0bb683b0a58d..000000000000
--- a/packages/CarSystemUI/res/values-ms/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Pengecaman suara kini dikendalikan peranti Bluetooth tersmbg"</string>
- <string name="car_guest" msgid="318393171202663722">"Tetamu"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Tetamu"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Tambah Pengguna"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Pengguna Baharu"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Apabila anda menambahkan pengguna baharu, orang itu perlu menyediakan ruang mereka."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Mana-mana pengguna boleh mengemas kini apl untuk semua pengguna lain."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Memuatkan"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Memuatkan pengguna (daripada <xliff:g id="FROM_USER">%1$d</xliff:g> hingga <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Tutup"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-my/strings.xml b/packages/CarSystemUI/res/values-my/strings.xml
deleted file mode 100644
index 4e7ca39a2b12..000000000000
--- a/packages/CarSystemUI/res/values-my/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"နိမ့်"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"မြင့်"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ချိတ်ထားသော ဘလူးတုသ်စက်ဖြင့် အသံမှတ်သားမှုကို ထိန်းချုပ်သည်"</string>
- <string name="car_guest" msgid="318393171202663722">"ဧည့်သည်"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ဧည့်သည်"</string>
- <string name="car_add_user" msgid="4067337059622483269">"အသုံးပြုသူ ထည့်ရန်"</string>
- <string name="car_new_user" msgid="6637442369728092473">"အသုံးပြုသူ အသစ်"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"အသုံးပြုသူအသစ် ထည့်သည့်အခါ ထိုသူသည် မိမိ၏ နေရာကို စနစ်ထည့်သွင်းရပါမည်။"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"မည်သူမဆို အသုံးပြုသူအားလုံးအတွက် အက်ပ်များကို အပ်ဒိတ်လုပ်နိုင်သည်။"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ဖွင့်နေသည်"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"အသုံးပြုသူကို ဖွင့်နေသည် (<xliff:g id="FROM_USER">%1$d</xliff:g> မှ <xliff:g id="TO_USER">%2$d</xliff:g> သို့)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"ပိတ်ရန်"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-nb/strings.xml b/packages/CarSystemUI/res/values-nb/strings.xml
deleted file mode 100644
index 0b2856f0d7b2..000000000000
--- a/packages/CarSystemUI/res/values-nb/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Talegjenkjenning håndteres nå av tilkoblet Bluetooth-enhet"</string>
- <string name="car_guest" msgid="318393171202663722">"Gjest"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gjest"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Legg til bruker"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Ny bruker"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Når du legger til en ny bruker, må vedkommende konfigurere sitt eget område."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Alle brukere kan oppdatere apper for alle andre brukere."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Laster inn"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Laster inn brukeren (fra <xliff:g id="FROM_USER">%1$d</xliff:g> til <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Lukk"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ne/strings.xml b/packages/CarSystemUI/res/values-ne/strings.xml
deleted file mode 100644
index 3a25d6e05db6..000000000000
--- a/packages/CarSystemUI/res/values-ne/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"न्यूनतम"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"अधिकतम"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"अब ब्लुटुथ मार्फत जोडिएको यन्त्रले आवाज पहिचान गर्ने कार्य सम्हाल्छ"</string>
- <string name="car_guest" msgid="318393171202663722">"अतिथि"</string>
- <string name="start_guest_session" msgid="497784785761754874">"अतिथि"</string>
- <string name="car_add_user" msgid="4067337059622483269">"प्रयोगकर्ता थप्नुहोस्"</string>
- <string name="car_new_user" msgid="6637442369728092473">"नयाँ प्रयोगकर्ता"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"तपाईंले नयाँ प्रयोगकर्ता थप्दा ती व्यक्तिले आफ्नो स्थान सेटअप गर्नु पर्छ।"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"सबै प्रयोगकर्ताले अन्य प्रयोगकर्ताका अनुप्रयोगहरू अद्यावधिक गर्न सक्छन्।"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"लोड गरिँदै"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"प्रयोगकर्तासम्बन्धी जानकारी लोड गरिँदै (<xliff:g id="FROM_USER">%1$d</xliff:g> बाट <xliff:g id="TO_USER">%2$d</xliff:g> मा)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"बन्द गर्नुहोस्"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-night/colors.xml b/packages/CarSystemUI/res/values-night/colors.xml
deleted file mode 100644
index a2edd7dc5b4e..000000000000
--- a/packages/CarSystemUI/res/values-night/colors.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <color name="car_accent">#356FE5</color>
- <color name="status_bar_background_color">#ff000000</color>
- <color name="system_bar_background_opaque">#ff0c1013</color>
-
- <!-- The background color of the notification shade -->
- <color name="notification_shade_background_color">#E0000000</color>
-
- <!-- The color of the ripples on the untinted notifications -->
- <color name="notification_ripple_untinted_color">@color/ripple_material_dark</color>
-</resources>
diff --git a/packages/CarSystemUI/res/values-nl/strings.xml b/packages/CarSystemUI/res/values-nl/strings.xml
deleted file mode 100644
index 4765f71b8b61..000000000000
--- a/packages/CarSystemUI/res/values-nl/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Spraakherkenning actief via een verbonden bluetooth-apparaat"</string>
- <string name="car_guest" msgid="318393171202663722">"Gast"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gast"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Gebruiker toevoegen"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nieuwe gebruiker"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Als je een nieuwe gebruiker toevoegt, moet die persoon een eigen profiel instellen."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Elke gebruiker kan apps updaten voor alle andere gebruikers"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Laden"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Gebruiker laden (van <xliff:g id="FROM_USER">%1$d</xliff:g> naar <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Sluiten"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-or/strings.xml b/packages/CarSystemUI/res/values-or/strings.xml
deleted file mode 100644
index 4168d5a109b8..000000000000
--- a/packages/CarSystemUI/res/values-or/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"ସର୍ବନିମ୍ନ"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"ସର୍ବାଧିକ"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ଭଏସ ଚିହ୍ନଟକରଣ ଏବେ ସଂଯୁକ୍ତ ଥିବା ବ୍ଲୁଟୁଥ ଡିଭାଇସ ଦ୍ୱାରା ପରିଚାଳିତ"</string>
- <string name="car_guest" msgid="318393171202663722">"ଅତିଥି"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ଅତିଥି"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ଉପଯୋଗକର୍ତ୍ତାଙ୍କୁ ଯୋଗ କରନ୍ତୁ"</string>
- <string name="car_new_user" msgid="6637442369728092473">"ନୂଆ ଉପଯୋଗକର୍ତ୍ତା"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"ଜଣେ ନୂଆ ଉପଯୋଗକର୍ତ୍ତାଙ୍କୁ ଯୋଗ କରିବା ବେଳେ ସେହି ବ୍ୟକ୍ତିଙ୍କୁ ତାଙ୍କ ସ୍ଥାନ ସେଟ୍ ଅପ୍ କରିବାର ଆବଶ୍ୟକତା ଅଛି।"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ଯେ କୌଣସି ଉପଯୋଗକର୍ତ୍ତା ଅନ୍ୟ ସମସ୍ତ ଉପଯୋଗକର୍ତ୍ତାଙ୍କ ପାଇଁ ଆପଗୁଡ଼ିକୁ ଅପଡେଟ୍ କରିପାରିବେ।"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ଲୋଡ୍ କରାଯାଉଛି"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ଉପଯୋଗକର୍ତ୍ତାଙ୍କୁ ଲୋଡ୍ କରାଯାଉଛି (<xliff:g id="FROM_USER">%1$d</xliff:g>ଙ୍କ ଠାରୁ <xliff:g id="TO_USER">%2$d</xliff:g> ପର୍ଯ୍ୟନ୍ତ)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"ବନ୍ଦ କରନ୍ତୁ"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-pa/strings.xml b/packages/CarSystemUI/res/values-pa/strings.xml
deleted file mode 100644
index 3d9d3a597c07..000000000000
--- a/packages/CarSystemUI/res/values-pa/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"ਨਿਊਨਤਮ"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"ਅਧਿਕਤਮ"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ਅਵਾਜ਼ ਦੀ ਪਛਾਣ ਨੂੰ ਹੁਣ ਕਨੈਕਟ ਕੀਤਾ ਬਲੂਟੁੱਥ ਡੀਵਾਈਸ ਸੰਭਾਲਦਾ ਹੈ"</string>
- <string name="car_guest" msgid="318393171202663722">"ਮਹਿਮਾਨ"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ਮਹਿਮਾਨ"</string>
- <string name="car_add_user" msgid="4067337059622483269">"ਵਰਤੋਂਕਾਰ ਸ਼ਾਮਲ ਕਰੋ"</string>
- <string name="car_new_user" msgid="6637442369728092473">"ਨਵਾਂ ਵਰਤੋਂਕਾਰ"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"ਜਦੋਂ ਤੁਸੀਂ ਕੋਈ ਨਵਾਂ ਵਰਤੋਂਕਾਰ ਸ਼ਾਮਲ ਕਰਦੇ ਹੋ, ਤਾਂ ਉਸ ਵਿਅਕਤੀ ਨੂੰ ਆਪਣੀ ਜਗ੍ਹਾ ਸੈੱਟਅੱਪ ਕਰਨ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ।"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ਕੋਈ ਵੀ ਵਰਤੋਂਕਾਰ ਹੋਰ ਸਾਰੇ ਵਰਤੋਂਕਾਰਾਂ ਦੀਆਂ ਐਪਾਂ ਨੂੰ ਅੱਪਡੇਟ ਕਰ ਸਕਦਾ ਹੈ।"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"ਵਰਤੋਂਕਾਰ ਨੂੰ ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (<xliff:g id="FROM_USER">%1$d</xliff:g> ਤੋਂ <xliff:g id="TO_USER">%2$d</xliff:g> ਤੱਕ)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"ਬੰਦ ਕਰੋ"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-pl/strings.xml b/packages/CarSystemUI/res/values-pl/strings.xml
deleted file mode 100644
index 52b90f1b5b96..000000000000
--- a/packages/CarSystemUI/res/values-pl/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Rozpoznawanie mowy przez połączone urządzenie Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Gość"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gość"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Dodaj użytkownika"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nowy użytkownik"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Gdy dodasz nowego użytkownika, musi on skonfigurować swój profil."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Każdy użytkownik może aktualizować aplikacje wszystkich innych użytkowników."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Ładuję"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Ładuję użytkownika (od <xliff:g id="FROM_USER">%1$d</xliff:g> do <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Zamknij"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-pt-rPT/strings.xml b/packages/CarSystemUI/res/values-pt-rPT/strings.xml
deleted file mode 100644
index 2dffa17e8f1c..000000000000
--- a/packages/CarSystemUI/res/values-pt-rPT/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Mín."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Máx."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Reconhecimento de voz agora através do disp. Bluetooth lig."</string>
- <string name="car_guest" msgid="318393171202663722">"Convidado"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Convidado"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Adicionar utilizador"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Novo utilizador"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Ao adicionar um novo utilizador, essa pessoa tem de configurar o respetivo espaço."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Qualquer utilizador pode atualizar apps para todos os outros utilizadores."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"A carregar…"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"A carregar o utilizador (de <xliff:g id="FROM_USER">%1$d</xliff:g> para <xliff:g id="TO_USER">%2$d</xliff:g>)…"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Fechar"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-pt/strings.xml b/packages/CarSystemUI/res/values-pt/strings.xml
deleted file mode 100644
index a7c44d2522d6..000000000000
--- a/packages/CarSystemUI/res/values-pt/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Mín"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Máx"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Reconhecimento de voz com dispositivo Bluetooth conectado"</string>
- <string name="car_guest" msgid="318393171202663722">"Convidado"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Convidado"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Adicionar usuário"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Novo usuário"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Quando você adiciona um usuário novo, essa pessoa precisa configurar o espaço dela."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Qualquer usuário pode atualizar apps para os demais usuários."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Carregando"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Carregando usuário (de <xliff:g id="FROM_USER">%1$d</xliff:g> para <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Fechar"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ro/strings.xml b/packages/CarSystemUI/res/values-ro/strings.xml
deleted file mode 100644
index 1a4e71d9eea8..000000000000
--- a/packages/CarSystemUI/res/values-ro/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Recunoașterea vocală acum gestionată de dispozitivul Bluetooth conectat"</string>
- <string name="car_guest" msgid="318393171202663722">"Invitat"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Invitat"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Adăugați un utilizator"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Utilizator nou"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Când adăugați un utilizator nou, acesta trebuie să-și configureze spațiul."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Orice utilizator poate actualiza aplicațiile pentru toți ceilalți utilizatori."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Se încarcă"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Se încarcă utilizatorul (de la <xliff:g id="FROM_USER">%1$d</xliff:g> la <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Închideți"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ru/strings.xml b/packages/CarSystemUI/res/values-ru/strings.xml
deleted file mode 100644
index 330ba2f0bdbd..000000000000
--- a/packages/CarSystemUI/res/values-ru/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мин."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Макс."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Для распознавания речи используется Bluetooth-устройство."</string>
- <string name="car_guest" msgid="318393171202663722">"Гость"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Гость"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Добавить пользователя"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Новый пользователь"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Когда вы добавите пользователя, ему потребуется настроить профиль."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Любой пользователь устройства может обновлять приложения для всех аккаунтов."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Загрузка…"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Загрузка профиля пользователя (с <xliff:g id="FROM_USER">%1$d</xliff:g> по <xliff:g id="TO_USER">%2$d</xliff:g>)…"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Закрыть"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-si/strings.xml b/packages/CarSystemUI/res/values-si/strings.xml
deleted file mode 100644
index 6391d28e9568..000000000000
--- a/packages/CarSystemUI/res/values-si/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"අවම"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"උපරිම"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"හඬ හැඳුනුම දැන් සම්බන්ධ බ්ලූටූත් උපාංගය මගින් හසුරුවනු ලැබේ"</string>
- <string name="car_guest" msgid="318393171202663722">"අමුත්තා"</string>
- <string name="start_guest_session" msgid="497784785761754874">"අමුත්තා"</string>
- <string name="car_add_user" msgid="4067337059622483269">"පරිශීලක එක් කරන්න"</string>
- <string name="car_new_user" msgid="6637442369728092473">"නව පරිශීලක"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"ඔබ අලුත් පරිශීලකයෙකු එක් කරන විට, එම පුද්ගලයා තමන්ගේ ඉඩ සකසා ගැනීමට අවශ්‍ය වේ."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"සියලුම අනෙක් පරිශීලකයින් සඳහා ඕනෑම පරිශීලකයෙකුට යෙදුම් යාවත්කාලීන කළ හැක."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"පූරණය වෙමින්"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"පරිශීලකයා පූරණය වෙමින් (<xliff:g id="FROM_USER">%1$d</xliff:g> සිට <xliff:g id="TO_USER">%2$d</xliff:g> වෙත)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"වසන්න"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-sk/strings.xml b/packages/CarSystemUI/res/values-sk/strings.xml
deleted file mode 100644
index 80b9b5ed11c9..000000000000
--- a/packages/CarSystemUI/res/values-sk/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"max."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Rozpoznávanie hlasu teraz prebieha v pripoj. zar. Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Hosť"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Hosť"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Pridať používateľa"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nový používateľ"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Keď pridáte nového používateľa, musí si nastaviť vlastný priestor."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Každý používateľ môže aktualizovať aplikácie pre všetkých ostatných používateľov."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Načítava sa"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Načítava sa používateľ (predchádzajúci: <xliff:g id="FROM_USER">%1$d</xliff:g>, nasledujúci: <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Zavrieť"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-sl/strings.xml b/packages/CarSystemUI/res/values-sl/strings.xml
deleted file mode 100644
index b67002bec7d4..000000000000
--- a/packages/CarSystemUI/res/values-sl/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Najn."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Najv."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Prepoznavanje glasu zdaj izvaja povezana naprava Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Gost"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gost"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Dodaj uporabnika"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Nov uporabnik"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Ko dodate novega uporabnika, mora ta nastaviti svoj prostor."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Vsak uporabnik lahko posodobi aplikacije za vse druge uporabnike."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Nalaganje"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Nalaganje uporabnika (od uporabnika <xliff:g id="FROM_USER">%1$d</xliff:g> do uporabnika <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Zapri"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-sq/strings.xml b/packages/CarSystemUI/res/values-sq/strings.xml
deleted file mode 100644
index d19e1583664b..000000000000
--- a/packages/CarSystemUI/res/values-sq/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Njohja zanore trajtohet nga pajisja me Bluetooth-in e lidhur"</string>
- <string name="car_guest" msgid="318393171202663722">"I ftuar"</string>
- <string name="start_guest_session" msgid="497784785761754874">"I ftuar"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Shto përdorues"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Përdorues i ri"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kur shton një përdorues të ri, ai person duhet të konfigurojë hapësirën e vet."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Çdo përdorues mund t\'i përditësojë aplikacionet për të gjithë përdoruesit e tjerë."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Po ngarkohet"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Përdoruesi po ngarkohet (nga <xliff:g id="FROM_USER">%1$d</xliff:g> te <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Mbyll"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-sr/strings.xml b/packages/CarSystemUI/res/values-sr/strings.xml
deleted file mode 100644
index a5fb5b4f6ad6..000000000000
--- a/packages/CarSystemUI/res/values-sr/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мин."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maкс."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Препознавањем гласа сада управља повезани Bluetooth уређај"</string>
- <string name="car_guest" msgid="318393171202663722">"Гост"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Гост"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Додај корисника"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Нови корисник"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Када додате новог корисника, та особа треба да подеси свој простор."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Сваки корисник може да ажурира апликације за све остале кориснике."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Учитава се"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Профил корисника се учитава (из<xliff:g id="FROM_USER">%1$d</xliff:g> у <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Затвори"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-sv/strings.xml b/packages/CarSystemUI/res/values-sv/strings.xml
deleted file mode 100644
index 8a942d6af080..000000000000
--- a/packages/CarSystemUI/res/values-sv/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Nu hanteras röstigenkänning via en anstluten Bluetooth-enhet"</string>
- <string name="car_guest" msgid="318393171202663722">"Gäst"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Gäst"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Lägg till användare"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Ny användare"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"När du lägger till en ny användare måste den personen konfigurera sitt utrymme."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Alla användare kan uppdatera appar för andra användare."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Läser in"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Läser in användare (från <xliff:g id="FROM_USER">%1$d</xliff:g> till <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Stäng"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-sw/strings.xml b/packages/CarSystemUI/res/values-sw/strings.xml
deleted file mode 100644
index be03373c48a1..000000000000
--- a/packages/CarSystemUI/res/values-sw/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Chini"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Juu"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Utambuzi wa sauti sasa unashughulikiwa na kifaa kilichounganishwa cha Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Mgeni"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Mgeni"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Ongeza Mtumiaji"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Mtumiaji Mpya"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Ukiongeza mtumiaji mpya, ni lazima aweke kikundi chake."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Mtumiaji yeyote anaweza kusasisha programu za watumiaji wengine."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Inapakia"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Inapakia wasifu wa mtumiaji (kutoka <xliff:g id="FROM_USER">%1$d</xliff:g> kuwa <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Funga"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ta/strings.xml b/packages/CarSystemUI/res/values-ta/strings.xml
deleted file mode 100644
index a82a2f856bd4..000000000000
--- a/packages/CarSystemUI/res/values-ta/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"குறைந்தபட்சம்"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"அதிகபட்சம்"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"இணைக்கப்பட்ட புளூடூத் சாதனத்தால் \'குரல் அறிதல்\' கையாளப்படுகிறது"</string>
- <string name="car_guest" msgid="318393171202663722">"கெஸ்ட்"</string>
- <string name="start_guest_session" msgid="497784785761754874">"கெஸ்ட்"</string>
- <string name="car_add_user" msgid="4067337059622483269">"பயனரைச் சேருங்கள்"</string>
- <string name="car_new_user" msgid="6637442369728092473">"புதிய பயனர்"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"புதிய பயனரைச் சேர்க்கும்போது அவர் தனக்கான சேமிப்பிடத்தை அமைக்க வேண்டும்."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"எந்தப் பயனரும் பிற பயனர்கள் சார்பாக ஆப்ஸைப் புதுப்பிக்க முடியும்."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"ஏற்றுகிறது"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"பயனர் தகவலை ஏற்றுகிறது (<xliff:g id="FROM_USER">%1$d</xliff:g>லிருந்து <xliff:g id="TO_USER">%2$d</xliff:g> வரை)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"மூடுக"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-te/strings.xml b/packages/CarSystemUI/res/values-te/strings.xml
deleted file mode 100644
index cf74f8053349..000000000000
--- a/packages/CarSystemUI/res/values-te/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"కని."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"గరి."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"నేడు వాయిస్ గుర్తింపును కనెక్ట్ అయిన బ్లూటూత్ నిర్వహిస్తోంది"</string>
- <string name="car_guest" msgid="318393171202663722">"గెస్ట్"</string>
- <string name="start_guest_session" msgid="497784785761754874">"గెస్ట్"</string>
- <string name="car_add_user" msgid="4067337059622483269">"యూజర్‌ను జోడించండి"</string>
- <string name="car_new_user" msgid="6637442369728092473">"కొత్త యూజర్"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"మీరు కొత్త యూజర్‌ను జోడించినప్పుడు, ఆ వ్యక్తి తన స్పేస్‌ను సెటప్ చేసుకోవాలి."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ఏ యూజర్ అయినా మిగతా యూజర్‌ల కోసం యాప్‌లను అప్‌డేట్ చేయవచ్చు."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"లోడ్ అవుతోంది"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"యూజర్‌ను లోడ్ చేస్తోంది (<xliff:g id="FROM_USER">%1$d</xliff:g> నుండి <xliff:g id="TO_USER">%2$d</xliff:g> వరకు)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"మూసివేయి"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-th/strings.xml b/packages/CarSystemUI/res/values-th/strings.xml
deleted file mode 100644
index dacf605888f5..000000000000
--- a/packages/CarSystemUI/res/values-th/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"ตอนนี้อุปกรณ์บลูทูธที่เชื่อมต่อจะจัดการการจดจำเสียง"</string>
- <string name="car_guest" msgid="318393171202663722">"ผู้ใช้ชั่วคราว"</string>
- <string name="start_guest_session" msgid="497784785761754874">"ผู้ใช้ชั่วคราว"</string>
- <string name="car_add_user" msgid="4067337059622483269">"เพิ่มผู้ใช้"</string>
- <string name="car_new_user" msgid="6637442369728092473">"ผู้ใช้ใหม่"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"เมื่อคุณเพิ่มผู้ใช้ใหม่ ผู้ใช้ดังกล่าวจะต้องตั้งค่าพื้นที่ของตนเอง"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"ผู้ใช้ทุกคนจะอัปเดตแอปให้แก่ผู้ใช้คนอื่นๆ ได้"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"กำลังโหลด"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"กำลังโหลดผู้ใช้ (จาก <xliff:g id="FROM_USER">%1$d</xliff:g> ถึง <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"ปิด"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-tl/strings.xml b/packages/CarSystemUI/res/values-tl/strings.xml
deleted file mode 100644
index 89d8cd201e5f..000000000000
--- a/packages/CarSystemUI/res/values-tl/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Minuto"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Max"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Hawak na ngayon ng Bluetooth device ang Pagkilala ng boses"</string>
- <string name="car_guest" msgid="318393171202663722">"Bisita"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Bisita"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Magdagdag ng User"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Bagong User"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Kapag nagdagdag ka ng bagong user, kailangang i-set up ng taong iyon ang kanyang espasyo."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Puwedeng i-update ng sinumang user ang mga app para sa lahat ng iba pang user."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Naglo-load"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Nilo-load ang user (mula kay <xliff:g id="FROM_USER">%1$d</xliff:g> papunta kay <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Isara"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-tr/strings.xml b/packages/CarSystemUI/res/values-tr/strings.xml
deleted file mode 100644
index 36bf694f30ab..000000000000
--- a/packages/CarSystemUI/res/values-tr/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Min."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Artık ses tanıma, bağlı Bluetooth cihazı tarafından işleniyor"</string>
- <string name="car_guest" msgid="318393171202663722">"Misafir"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Misafir"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Kullanıcı Ekle"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Yeni Kullanıcı"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Yeni kullanıcı eklediğinizde, bu kişinin alanını ayarlaması gerekir."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Herhangi bir kullanıcı, diğer tüm kullanıcılar için uygulamaları güncelleyebilir."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Yükleniyor"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Kullanıcı yükleniyor (<xliff:g id="FROM_USER">%1$d</xliff:g> kullanıcısından <xliff:g id="TO_USER">%2$d</xliff:g> kullanıcısına)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Kapat"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-uk/strings.xml b/packages/CarSystemUI/res/values-uk/strings.xml
deleted file mode 100644
index 391513f1b57a..000000000000
--- a/packages/CarSystemUI/res/values-uk/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Мін."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Макс."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Голос розпізнається через підключений пристрій Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Гість"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Гість"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Додати користувача"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Новий користувач"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Коли ви додаєте нового користувача, він має налаштувати свій профіль."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Усі користувачі можуть оновлювати додатки для решти людей."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Завантаження"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Завантаження профілю користувача (від <xliff:g id="FROM_USER">%1$d</xliff:g> до <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Закрити"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-ur/strings.xml b/packages/CarSystemUI/res/values-ur/strings.xml
deleted file mode 100644
index abe9214181a2..000000000000
--- a/packages/CarSystemUI/res/values-ur/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"کم از کم"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"زیادہ سے زیادہ"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"آواز کی شناخت اب منسلک کردہ بلوٹوتھ آلے سے ہوتی ہے"</string>
- <string name="car_guest" msgid="318393171202663722">"مہمان"</string>
- <string name="start_guest_session" msgid="497784785761754874">"مہمان"</string>
- <string name="car_add_user" msgid="4067337059622483269">"صارف شامل کریں"</string>
- <string name="car_new_user" msgid="6637442369728092473">"نیا صارف"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"جب آپ ایک نیا صارف شامل کرتے ہیں تو اس شخص کو اپنی جگہ سیٹ کرنی ہوتی ہے۔"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"کوئی بھی صارف دیگر سبھی صارفین کے لیے ایپس کو اپ ڈیٹ کر سکتا ہے۔"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"لوڈ ہو رہی ہے"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"صارف کی نئی پروفائل لوڈ ہو رہی ہے (<xliff:g id="FROM_USER">%1$d</xliff:g> سے <xliff:g id="TO_USER">%2$d</xliff:g> کو)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"بند کریں"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-uz/strings.xml b/packages/CarSystemUI/res/values-uz/strings.xml
deleted file mode 100644
index 398d1f5ce29e..000000000000
--- a/packages/CarSystemUI/res/values-uz/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Daq."</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Maks."</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Endi ovozni tanish Bluetooth qurilma ulanganda amalga oshadi"</string>
- <string name="car_guest" msgid="318393171202663722">"Mehmon"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Mehmon"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Foydalanuvchi kiritish"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Yangi foydalanuvchi"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Yangi profil kiritilgach, uni sozlash lozim."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Qurilmaning istalgan foydalanuvchisi ilovalarni barcha hisoblar uchun yangilashi mumkin."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Yuklanmoqda"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Foydalanuvchi profili yuklanmoqda (<xliff:g id="FROM_USER">%1$d</xliff:g> – <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Yopish"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-vi/strings.xml b/packages/CarSystemUI/res/values-vi/strings.xml
deleted file mode 100644
index f15320fd1dcd..000000000000
--- a/packages/CarSystemUI/res/values-vi/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Tối thiểu"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Tối đa"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Thiết bị Bluetooth được kết nối đang xử lý vấn đề nhận dạng giọng nói"</string>
- <string name="car_guest" msgid="318393171202663722">"Khách"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Khách"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Thêm người dùng"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Người dùng mới"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Khi bạn thêm một người dùng mới, người đó cần thiết lập không gian của mình."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Bất kỳ người dùng nào cũng có thể cập nhật ứng dụng cho tất cả những người dùng khác."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Đang tải"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Đang tải hồ sơ người dùng (từ <xliff:g id="FROM_USER">%1$d</xliff:g> sang <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Đóng"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-zh-rCN/strings.xml b/packages/CarSystemUI/res/values-zh-rCN/strings.xml
deleted file mode 100644
index a91f48c8b378..000000000000
--- a/packages/CarSystemUI/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"最小"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"最大"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"现在由已连接的蓝牙设备处理语音识别操作"</string>
- <string name="car_guest" msgid="318393171202663722">"访客"</string>
- <string name="start_guest_session" msgid="497784785761754874">"访客"</string>
- <string name="car_add_user" msgid="4067337059622483269">"添加用户"</string>
- <string name="car_new_user" msgid="6637442369728092473">"新用户"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"当您添加新用户时,该用户需要自行设置个人空间。"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"任何用户均可为所有其他用户更新应用。"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"正在加载"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"正在加载用户(从 <xliff:g id="FROM_USER">%1$d</xliff:g> 到 <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"关闭"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-zh-rHK/strings.xml b/packages/CarSystemUI/res/values-zh-rHK/strings.xml
deleted file mode 100644
index 7aa611606274..000000000000
--- a/packages/CarSystemUI/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"最小"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"最大"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"現在由已連線的藍牙裝置處理語音辨識作業"</string>
- <string name="car_guest" msgid="318393171202663722">"訪客"</string>
- <string name="start_guest_session" msgid="497784785761754874">"訪客"</string>
- <string name="car_add_user" msgid="4067337059622483269">"新增使用者"</string>
- <string name="car_new_user" msgid="6637442369728092473">"新使用者"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"新增的使用者需要自行設定個人空間。"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"任何使用者都可以為所有其他使用者更新應用程式。"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"正在載入"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"正在載入使用者 (由 <xliff:g id="FROM_USER">%1$d</xliff:g> 至 <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"關閉"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-zh-rTW/strings.xml b/packages/CarSystemUI/res/values-zh-rTW/strings.xml
deleted file mode 100644
index c062463905d7..000000000000
--- a/packages/CarSystemUI/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"最小"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"最大"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"現在由已連線的藍牙裝置處理語音辨識作業"</string>
- <string name="car_guest" msgid="318393171202663722">"訪客"</string>
- <string name="start_guest_session" msgid="497784785761754874">"訪客"</string>
- <string name="car_add_user" msgid="4067337059622483269">"新增使用者"</string>
- <string name="car_new_user" msgid="6637442369728092473">"新使用者"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"新使用者必須自行設定個人空間。"</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"任何使用者都能為所有其他使用者更新應用程式。"</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"載入中"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"正在載入使用者 (從 <xliff:g id="FROM_USER">%1$d</xliff:g> 到 <xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"關閉"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values-zu/strings.xml b/packages/CarSystemUI/res/values-zu/strings.xml
deleted file mode 100644
index 2dd33d827324..000000000000
--- a/packages/CarSystemUI/res/values-zu/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="hvac_min_text" msgid="8167124789068494624">"Okuncane"</string>
- <string name="hvac_max_text" msgid="3669693372074755551">"Okuningi"</string>
- <string name="voice_recognition_toast" msgid="1149934534584052842">"Ukubonwa kwezwi manje kuphethwe idivayisi exhunyiwe ye-Bluetooth"</string>
- <string name="car_guest" msgid="318393171202663722">"Isihambeli"</string>
- <string name="start_guest_session" msgid="497784785761754874">"Isihambeli"</string>
- <string name="car_add_user" msgid="4067337059622483269">"Engeza umsebenzisi"</string>
- <string name="car_new_user" msgid="6637442369728092473">"Umsebenzisi omusha"</string>
- <string name="user_add_user_message_setup" msgid="1035578846007352323">"Uma ungeza umsebenzisi omusha, loyo muntu udinga ukusetha izikhala zakhe."</string>
- <string name="user_add_user_message_update" msgid="7061671307004867811">"Noma yimuphi umsebenzisi angabuyekeza izinhlelo zokusebenza zabanye abasebenzisi."</string>
- <string name="car_loading_profile" msgid="4507385037552574474">"Iyalayisha"</string>
- <string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Ilayisha umsebenzisi (kusuka ku-<xliff:g id="FROM_USER">%1$d</xliff:g> kuya ku-<xliff:g id="TO_USER">%2$d</xliff:g>)"</string>
- <string name="rear_view_camera_close_button_text" msgid="8430918817320533693">"Vala"</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values/attrs.xml b/packages/CarSystemUI/res/values/attrs.xml
deleted file mode 100644
index 788376494032..000000000000
--- a/packages/CarSystemUI/res/values/attrs.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources>
- <attr name="icon" format="reference"/>
- <attr name="selectedIcon" format="reference"/>
- <attr name="intent" format="string"/>
- <attr name="longIntent" format="string"/>
- <attr name="selectedAlpha" format="float" />
- <attr name="unselectedAlpha" format="float" />
-
- <!-- Custom attributes to configure hvac values -->
- <declare-styleable name="AnimatedTemperatureView">
- <attr name="hvacAreaId" format="integer"/>
- <attr name="hvacPropertyId" format="integer"/>
- <attr name="hvacTempFormat" format="string"/>
- <!-- how far away the animations should center around -->
- <attr name="hvacPivotOffset" format="dimension"/>
- <attr name="hvacMinValue" format="float"/>
- <attr name="hvacMaxValue" format="float"/>
- <attr name="hvacMinText" format="string|reference"/>
- <attr name="hvacMaxText" format="string|reference"/>
- <attr name="android:gravity"/>
- <attr name="android:minEms"/>
- <attr name="android:textAppearance"/>
- </declare-styleable>
-
- <!-- Allow for custom attribs to be added to a nav button -->
- <declare-styleable name="CarNavigationButton">
- <!-- intent to start when button is click -->
- <attr name="intent" />
- <!-- intent to start when a long press has happened -->
- <attr name="longIntent" />
- <!-- start the intent as a broad cast instead of an activity if true-->
- <attr name="broadcast" format="boolean"/>
- <!-- Alpha value to used when in selected state. Defaults 1f -->
- <attr name="selectedAlpha" />
- <!-- Alpha value to used when in un-selected state. Defaults 0.7f -->
- <attr name="unselectedAlpha" />
- <!-- icon to be rendered when in selected state -->
- <attr name="selectedIcon" />
- <!-- icon to be rendered (drawable) -->
- <attr name="icon"/>
- <!-- categories that will be added as extras to the fired intents -->
- <attr name="categories" format="string"/>
- <!-- package names that will be added as extras to the fired intents -->
- <attr name="packages" format="string" />
- <!-- componentName names that will be used for detecting selected state -->
- <attr name="componentNames" format="string" />
- <!-- whether to highlight the button when selected. Defaults false -->
- <attr name="showMoreWhenSelected" format="boolean" />
- <!-- whether to highlight the button when selected. Defaults false -->
- <attr name="highlightWhenSelected" format="boolean" />
- <!-- whether to show the icon of the app currently associated this button's role. Only
- relevant for buttons associated to specific roles (e.g.: AssistantButton).
- Defaults false -->
- <attr name="useDefaultAppIconForRole" format="boolean"/>
- </declare-styleable>
-
- <!-- Custom attributes to configure hvac values -->
- <declare-styleable name="TemperatureView">
- <attr name="hvacAreaId" format="integer"/>
- <attr name="hvacPropertyId" format="integer"/>
- <attr name="hvacTempFormat" format="string"/>
- </declare-styleable>
-
- <declare-styleable name="carVolumeItems"/>
- <declare-styleable name="carVolumeItems_item">
- <!-- Align with AudioAttributes.USAGE_* -->
- <attr name="usage">
- <enum name="unknown" value="0"/>
- <enum name="media" value="1"/>
- <enum name="voice_communication" value="2"/>
- <enum name="voice_communication_signalling" value="3"/>
- <enum name="alarm" value="4"/>
- <enum name="notification" value="5"/>
- <enum name="notification_ringtone" value="6"/>
- <enum name="notification_communication_request" value="7"/>
- <enum name="notification_communication_instant" value="8"/>
- <enum name="notification_communication_delayed" value="9"/>
- <enum name="notification_event" value="10"/>
- <enum name="assistance_accessibility" value="11"/>
- <enum name="assistance_navigation_guidance" value="12"/>
- <enum name="assistance_sonification" value="13"/>
- <enum name="game" value="14"/>
- <!-- hidden, do not use -->
- <!-- enum name="virtual_source" value="15"/ -->
- <enum name="assistant" value="16"/>
- <enum name="call_assistant" value="17"/>
- <enum name="emergency" value="1000"/>
- <enum name="safety" value="1001"/>
- <enum name="vehicle_status" value="1002"/>
- <enum name="announcement" value="1003"/>
- </attr>
-
- <!-- Icon resource ids to render on UI -->
- <attr name="icon" />
- </declare-styleable>
-</resources>
diff --git a/packages/CarSystemUI/res/values/colors.xml b/packages/CarSystemUI/res/values/colors.xml
deleted file mode 100644
index 91d416623538..000000000000
--- a/packages/CarSystemUI/res/values/colors.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- colors for user switcher -->
- <color name="car_user_switcher_background_color">#000000</color>
- <color name="car_user_switcher_name_text_color">@*android:color/car_body1_light</color>
- <color name="car_user_switcher_add_user_background_color">#131313</color>
- <color name="car_user_switcher_add_user_add_sign_color">@*android:color/car_body1_light</color>
- <color name="car_nav_icon_fill_color">#8F8F8F</color>
- <color name="car_nav_icon_fill_color_selected">#ffffff</color>
- <!-- colors for seekbar -->
- <color name="car_seekbar_track_background">#131315</color>
- <color name="car_seekbar_track_secondary_progress">@*android:color/car_accent</color>
- <!-- colors for volume dialog tint -->
- <color name="car_volume_dialog_tint">@*android:color/car_tint</color>
-
- <color name="docked_divider_background">@*android:color/car_grey_50</color>
- <color name="system_bar_background_opaque">#ff172026</color>
-
- <!-- colors for status bar -->
- <color name="system_bar_background_pill_color">#282A2D</color>
- <color name="system_bar_icon_color">#FFFFFF</color>
- <color name="system_bar_text_color">#FFFFFF</color>
- <color name="status_bar_background_color">#33000000</color>
- <drawable name="system_bar_background">@color/status_bar_background_color</drawable>
-
- <!-- colors for hvac temperature view -->
- <color name="hvac_temperature_adjust_button_color">#3C4043</color>
- <color name="hvac_temperature_decrease_arrow_color">#8AB4F8</color>
- <color name="hvac_temperature_increase_arrow_color">#F28B82</color>
-
- <!-- The background color of the notification shade -->
- <color name="notification_shade_background_color">#D6000000</color>
-
- <!-- The background color of the car volume dialog -->
- <color name="car_volume_dialog_background_color">@color/system_bar_background_opaque</color>
-
- <!-- The color of the dividing line between grouped notifications. -->
- <color name="notification_divider_color">@*android:color/notification_action_list</color>
-
- <!-- The color for the unseen indicator. -->
- <color name="car_nav_unseen_indicator_color">#e25142</color>
-
- <!-- The color of the ripples on the untinted notifications -->
- <color name="notification_ripple_untinted_color">@color/ripple_material_light</color>
-
- <color name="keyguard_button_text_color">@android:color/black</color>
-
- <color name="list_divider_color">@*android:color/car_list_divider_light</color>
- <color name="car_volume_item_divider_color">@*android:color/car_list_divider</color>
- <color name="car_volume_item_background_color">@*android:color/car_card_dark</color>
-
- <color name="car_user_switching_dialog_background_color">@android:color/black</color>
- <color name="car_user_switching_dialog_loading_text_color">@*android:color/car_body1</color>
-
- <color name="rear_view_camera_button_background">@*android:color/car_card_dark</color>
-</resources>
diff --git a/packages/CarSystemUI/res/values/config.xml b/packages/CarSystemUI/res/values/config.xml
deleted file mode 100644
index 61963ace0801..000000000000
--- a/packages/CarSystemUI/res/values/config.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<resources>
- <string name="config_statusBarComponent" translatable="false">
- com.android.systemui.statusbar.car.CarStatusBar
- </string>
- <string name="config_systemUIFactoryComponent" translatable="false">
- com.android.systemui.CarSystemUIFactory
- </string>
-
- <bool name="config_enableFullscreenUserSwitcher">true</bool>
-
- <!-- Configure which system bars should be displayed. -->
- <bool name="config_enableTopNavigationBar">true</bool>
- <bool name="config_enableLeftNavigationBar">false</bool>
- <bool name="config_enableRightNavigationBar">false</bool>
- <bool name="config_enableBottomNavigationBar">true</bool>
-
- <!-- Configure the type of each system bar. Each system bar must have a unique type. -->
- <!-- STATUS_BAR = 0-->
- <!-- NAVIGATION_BAR = 1-->
- <!-- STATUS_BAR_EXTRA = 2-->
- <!-- NAVIGATION_BAR_EXTRA = 3-->
- <integer name="config_topSystemBarType">0</integer>
- <integer name="config_leftSystemBarType">2</integer>
- <integer name="config_rightSystemBarType">3</integer>
- <integer name="config_bottomSystemBarType">1</integer>
-
- <!-- Configure the relative z-order among the system bars. When two system bars overlap (e.g.
- if both top bar and left bar are enabled, it creates an overlapping space in the upper left
- corner), the system bar with the higher z-order takes the overlapping space and padding is
- applied to the other bar.-->
- <!-- NOTE: If two overlapping system bars have the same z-order, SystemBarConfigs will throw a
- RuntimeException, since their placing order cannot be determined. Bars that do not overlap
- are allowed to have the same z-order. -->
- <!-- NOTE: If the z-order of a bar is 10 or above, it will also appear on top of HUN's. -->
- <integer name="config_topSystemBarZOrder">1</integer>
- <integer name="config_leftSystemBarZOrder">0</integer>
- <integer name="config_rightSystemBarZOrder">0</integer>
- <integer name="config_bottomSystemBarZOrder">10</integer>
-
- <!-- If set to true, the corresponding system bar will be hidden when Keyboard (IME) appears.
- NOTE: hideBottomSystemBarKeyboard must not be overlaid directly here. To change its value,
- overlay config_automotiveHideNavBarForKeyboard in framework/base/core/res/res. -->
- <bool name="config_hideTopSystemBarForKeyboard">false</bool>
- <bool name="config_hideBottomSystemBarForKeyboard">@*android:bool/config_automotiveHideNavBarForKeyboard</bool>
- <bool name="config_hideLeftSystemBarForKeyboard">false</bool>
- <bool name="config_hideRightSystemBarForKeyboard">false</bool>
-
- <!-- Disable normal notification rendering; we handle that ourselves -->
- <bool name="config_renderNotifications">false</bool>
-
- <!-- Whether navigationBar touch events should be consumed before reaching the CarFacetButton \
- when the notification panel is open. -->
- <bool name="config_consumeNavigationBarTouchWhenNotificationPanelOpen">false</bool>
-
- <!-- Whether heads-up notifications should be shown when shade is open. -->
- <bool name="config_enableHeadsUpNotificationWhenNotificationShadeOpen">true</bool>
-
- <bool name="config_hideNavWhenKeyguardBouncerShown">true</bool>
- <bool name="config_enablePersistentDockedActivity">false</bool>
- <string name="config_persistentDockedActivityIntentUri" translatable="false"></string>
-
- <!-- How many icons may be shown at once in the system bar. Includes any
- slots that may be reused for things like IME control. -->
- <integer name="config_maxNotificationIcons">0</integer>
-
- <!--
- Initial alpha percent value for the background when the notification
- shade is open. Should be a number between, and inclusive, 0 and 100.
- If the number is 0, then the background alpha starts off fully
- transparent. If the number if 100, then the background alpha starts off
- fully opaque. -->
- <integer name="config_initialNotificationBackgroundAlpha">0</integer>
- <!--
- Final alpha percent value for the background when the notification
- shade is fully open. Should be a number between, and inclusive, 0 and
- 100. If this value is smaller than
- config_initialNotificationBackgroundAlpha, the background will default
- to a constant alpha percent value using the initial alpha. -->
- <integer name="config_finalNotificationBackgroundAlpha">100</integer>
-
- <!-- Car System UI's OverlayViewsMediator.
- Whenever a new class is added, make sure to also add that class to OverlayWindowModule. -->
- <string-array name="config_carSystemUIOverlayViewsMediators" translatable="false">
- <item>@string/config_notificationPanelViewMediator</item>
- <item>com.android.systemui.car.keyguard.CarKeyguardViewMediator</item>
- <item>com.android.systemui.car.userswitcher.FullscreenUserSwitcherViewMediator</item>
- <item>com.android.systemui.car.userswitcher.UserSwitchTransitionViewMediator</item>
- <item>com.android.systemui.car.rvc.RearViewCameraViewMediator</item>
- </string-array>
-
- <!--
- Car SystemUI's notification mediator. Replace with other notification mediators to have
- the notification panel show from another system bar. The system bar should be enabled to
- use the mediator with that system bar.
- Example: config_enableBottomNavigationBar=true
- config_notificationPanelViewMediator=
- com.android.systemui.car.notification.BottomNotificationPanelViewMediator -->
- <string name="config_notificationPanelViewMediator" translatable="false">
- com.android.systemui.car.notification.TopNotificationPanelViewMediator</string>
-
- <!-- List of package names that are allowed sources of app installation. -->
- <string-array name="config_allowedAppInstallSources" translatable="false">
- <item>com.android.vending</item>
- </string-array>
-
- <!-- The list of components to exclude from config_systemUIServiceComponents. -->
- <string-array name="config_systemUIServiceComponentsExclude" translatable="false">
- <item>com.android.systemui.recents.Recents</item>
- <item>com.android.systemui.volume.VolumeUI</item>
- <item>com.android.systemui.statusbar.phone.StatusBar</item>
- <item>com.android.systemui.keyboard.KeyboardUI</item>
- <item>com.android.systemui.shortcut.ShortcutKeyDispatcher</item>
- <item>com.android.systemui.LatencyTester</item>
- <item>com.android.systemui.globalactions.GlobalActionsComponent</item>
- <item>com.android.systemui.SliceBroadcastRelayHandler</item>
- <item>com.android.systemui.statusbar.notification.InstantAppNotifier</item>
- <item>com.android.systemui.accessibility.WindowMagnification</item>
- <item>com.android.systemui.accessibility.SystemActions</item>
- </string-array>
-
- <!-- The list of components to append to config_systemUIServiceComponents. -->
- <string-array name="config_systemUIServiceComponentsInclude" translatable="false">
- <item>com.android.systemui.car.navigationbar.CarNavigationBar</item>
- <item>com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier</item>
- <item>com.android.systemui.car.window.SystemUIOverlayWindowManager</item>
- <item>com.android.systemui.car.volume.VolumeUI</item>
- </string-array>
-
- <!-- How many milliseconds to wait before force hiding the UserSwitchTransitionView -->
- <integer name="config_userSwitchTransitionViewShownTimeoutMs" translatable="false">5000</integer>
-
- <!-- The Activity name for the Rear View Camera, if empty, the feature will be disabled. -->
- <string name="config_rearViewCameraActivity" translatable="false"></string>
-
- <!-- Whether the Notification Panel should be inset by the top system bar. -->
- <bool name="config_notif_panel_inset_by_top_systembar" translatable="false">false</bool>
- <!-- Whether the Notification Panel should be inset by the bottom system bar. -->
- <bool name="config_notif_panel_inset_by_bottom_systembar" translatable="false">true</bool>
- <!-- Whether the Notification Panel should be inset by the left system bar. -->
- <bool name="config_notif_panel_inset_by_left_systembar" translatable="false">false</bool>
- <!-- Whether the Notification Panel should be inset by the right system bar. -->
- <bool name="config_notif_panel_inset_by_right_systembar" translatable="false">false</bool>
-</resources>
diff --git a/packages/CarSystemUI/res/values/dimens.xml b/packages/CarSystemUI/res/values/dimens.xml
deleted file mode 100644
index a7d8ab5f2a4c..000000000000
--- a/packages/CarSystemUI/res/values/dimens.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<resources>
- <!-- Text size for car -->
- <dimen name="car_title_size">32sp</dimen>
- <dimen name="car_title2_size">32sp</dimen>
- <dimen name="car_headline1_size">45sp</dimen>
- <dimen name="car_headline2_size">32sp</dimen>
- <dimen name="car_headline3_size">24sp</dimen>
- <dimen name="car_headline4_size">20sp</dimen>
- <dimen name="car_body1_size">32sp</dimen>
- <dimen name="car_body2_size">28sp</dimen>
- <dimen name="car_body3_size">26sp</dimen>
- <dimen name="car_body4_size">24sp</dimen>
- <!-- car_body5_size is deprecated -->
- <dimen name="car_body5_size">18sp</dimen>
- <dimen name="car_label1_size">26sp</dimen>
- <dimen name="car_label2_size">64sp</dimen>
- <dimen name="car_action1_size">26sp</dimen>
- <dimen name="car_action2_size">26sp</dimen>
- <!-- Paddings -->
- <dimen name="car_padding_0">4dp</dimen>
- <dimen name="car_padding_1">8dp</dimen>
- <dimen name="car_padding_2">16dp</dimen>
- <dimen name="car_padding_3">24dp</dimen>
- <dimen name="car_padding_4">32dp</dimen>
- <dimen name="car_padding_5">64dp</dimen>
- <dimen name="car_padding_6">96dp</dimen>
-
- <!--
- Note: status bar height and navigation bar heights are defined
- in frameworks/base/core package and thus will have no effect if
- set here. See car_product overlay for car specific defaults-->
-
- <!-- Overrides the space between each status icon in the system bar -->
- <dimen name="status_bar_system_icon_spacing">16dp</dimen>
- <!-- Overrides the size of the network signal icon -->
- <dimen name="signal_icon_size">32dp</dimen>
- <dimen name="system_bar_user_icon_padding">16dp</dimen>
- <dimen name="system_bar_user_icon_drawing_size">36dp</dimen>
- <!-- Padding on either side of the group of all system bar buttons -->
- <dimen name="system_bar_button_group_padding">64dp</dimen>
- <dimen name="system_bar_icon_drawing_size">44dp</dimen>
- <dimen name="system_bar_button_size">76dp</dimen>
- <!-- Margin between the system bar buttons -->
- <dimen name="system_bar_button_margin">32dp</dimen>
- <!-- Padding between the system bar button and the icon within it -->
- <dimen name="system_bar_button_padding">16dp</dimen>
-
- <!-- The amount by which to scale up the status bar icons. -->
- <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.75</item>
-
- <dimen name="car_primary_icon_size">@*android:dimen/car_primary_icon_size</dimen>
-
- <dimen name="hvac_container_padding">16dp</dimen>
- <dimen name="hvac_temperature_text_size">56sp</dimen>
- <dimen name="hvac_temperature_text_padding">8dp</dimen>
- <dimen name="hvac_temperature_button_size">76dp</dimen>
- <!--These values represent MIN and MAX for hvac-->
- <item name="hvac_min_value_celsius" format="float" type="dimen">10</item>
- <item name="hvac_max_value_celsius" format="float" type="dimen">35</item>
-
- <!-- Largest size an avatar might need to be drawn in the user picker, status bar, or
- quick settings header -->
- <dimen name="max_avatar_size">128dp</dimen>
-
- <!-- Standard image button size for volume dialog buttons -->
- <dimen name="volume_button_size">84dp</dimen>
- <!-- The maximum width allowed for the volume dialog. For auto, we allow this to span a good
- deal of the screen. This value accounts for the side margins. -->
- <dimen name="volume_dialog_panel_width">1920dp</dimen>
- <dimen name="volume_dialog_side_margin">@dimen/side_margin</dimen>
-
- <dimen name="volume_dialog_elevation">6dp</dimen>
-
- <dimen name="volume_dialog_row_margin_end">@*android:dimen/car_keyline_3</dimen>
-
- <dimen name="volume_dialog_row_padding_end">0dp</dimen>
-
- <dimen name="line_item_height">128dp</dimen>
- <dimen name="volume_icon_size">96dp</dimen>
- <dimen name="side_margin">148dp</dimen>
- <dimen name="car_keyline_1">24dp</dimen>
- <dimen name="car_keyline_2">96dp</dimen>
- <dimen name="car_keyline_3">128dp</dimen>
-
- <!-- Height of icons in Ongoing App Ops dialog. Both App Op icon and application icon -->
- <dimen name="ongoing_appops_dialog_icon_height">48dp</dimen>
- <!-- Margin between text lines in Ongoing App Ops dialog -->
- <dimen name="ongoing_appops_dialog_text_margin">15dp</dimen>
- <!-- Padding around Ongoing App Ops dialog content -->
- <dimen name="ongoing_appops_dialog_content_padding">24dp</dimen>
- <!-- Margins around the Ongoing App Ops chip. In landscape, the side margins are 0 -->
- <dimen name="ongoing_appops_chip_margin">12dp</dimen>
- <!-- Start and End padding for Ongoing App Ops chip -->
- <dimen name="ongoing_appops_chip_side_padding">6dp</dimen>
- <!-- Padding between background of Ongoing App Ops chip and content -->
- <dimen name="ongoing_appops_chip_bg_padding">4dp</dimen>
- <!-- Radius of Ongoing App Ops chip corners -->
- <dimen name="ongoing_appops_chip_bg_corner_radius">12dp</dimen>
-
- <!-- Car volume dimens. -->
- <dimen name="car_volume_item_icon_size">@dimen/car_primary_icon_size</dimen>
- <dimen name="car_volume_item_height">@*android:dimen/car_single_line_list_item_height</dimen>
- <dimen name="car_volume_item_padding_start">@*android:dimen/car_keyline_1</dimen>
- <dimen name="car_volume_item_padding_end">@*android:dimen/car_keyline_1</dimen>
- <dimen name="car_volume_item_seekbar_margin_vertical">@*android:dimen/car_padding_1</dimen>
- <dimen name="car_volume_item_seekbar_margin_start">@*android:dimen/car_keyline_3</dimen>
- <dimen name="car_volume_item_seekbar_margin_end">@*android:dimen/car_padding_4</dimen>
- <dimen name="car_volume_item_seekbar_padding_vertical">@*android:dimen/car_seekbar_padding</dimen>
- <dimen name="car_volume_item_divider_height">60dp</dimen>
- <dimen name="car_volume_item_divider_width">1dp</dimen>
- <dimen name="car_volume_item_divider_margin_end">@*android:dimen/car_padding_4</dimen>
- <dimen name="car_volume_item_corner_radius">@*android:dimen/car_radius_3</dimen>
-
- <!-- Car notification shade-->
- <dimen name="notification_shade_handle_bar_height">10dp</dimen>
- <dimen name="notification_shade_handle_bar_radius">20dp</dimen>
- <dimen name="notification_shade_handle_bar_margin_start">200dp</dimen>
- <dimen name="notification_shade_handle_bar_margin_end">200dp</dimen>
- <dimen name="notification_shade_handle_bar_margin_top">20dp</dimen>
- <dimen name="notification_shade_handle_bar_margin_bottom">10dp</dimen>
- <dimen name="notification_shade_list_padding_bottom">50dp</dimen>
-
- <!-- The alpha for the scrim behind the notification shade. This value is 1 so that the
- scrim has no transparency. -->
- <item name="scrim_behind_alpha" format="float" type="dimen">1.0</item>
-
- <!-- The width of panel holding the notification card. -->
- <dimen name="notification_panel_width">522dp</dimen>
-
- <!-- Height of a small notification in the status bar-->
- <dimen name="notification_min_height">192dp</dimen>
-
- <!-- Height of a small notification in the status bar which was used before android N -->
- <dimen name="notification_min_height_legacy">192dp</dimen>
-
- <!-- Height of a large notification in the status bar -->
- <dimen name="notification_max_height">400dp</dimen>
-
- <!-- Height of a heads up notification in the status bar for legacy custom views -->
- <dimen name="notification_max_heads_up_height_legacy">400dp</dimen>
-
- <!-- Height of a heads up notification in the status bar -->
- <dimen name="notification_max_heads_up_height">400dp</dimen>
-
- <!-- Height of the status bar header bar -->
- <dimen name="status_bar_header_height">54dp</dimen>
-
- <!-- The height of the divider between the individual notifications. -->
- <dimen name="notification_divider_height">16dp</dimen>
-
- <!-- The height of the divider between the individual notifications when the notification
- wants it to be increased. This value is the same as notification_divider_height so that
- the spacing between all notifications will always be the same. -->
- <dimen name="notification_divider_height_increased">@dimen/notification_divider_height</dimen>
-
- <!-- The alpha of the dividing line between child notifications of a notification group. -->
- <item name="notification_divider_alpha" format="float" type="dimen">1.0</item>
-
- <!-- The width of each individual notification card. -->
- <dimen name="notification_child_width">522dp</dimen>
-
- <!-- The top margin of the notification panel. -->
- <dimen name="notification_panel_margin_top">32dp</dimen>
-
- <!-- The bottom margin of the panel that holds the list of notifications. -->
- <dimen name="notification_panel_margin_bottom">@dimen/notification_divider_height</dimen>
-
- <!-- The corner radius of the shadow behind the notification. -->
- <dimen name="notification_shadow_radius">16dp</dimen>
-
- <!-- The amount of space below the notification list. This value is 0 so the list scrolls
- all the way to the bottom. -->
- <dimen name="close_handle_underlap">0dp</dimen>
-
- <!-- The height of the divider between the individual notifications in a notification group. -->
- <dimen name="notification_children_container_divider_height">1dp</dimen>
-
- <!-- The height of the header for a container containing child notifications. -->
- <dimen name="notification_children_container_header_height">76dp</dimen>
-
- <!-- The top margin for the notification children container in its non-expanded form. This
- value is smaller than notification_children_container_header_height to bring the first
- child closer so there is less wasted space. -->
- <dimen name="notification_children_container_margin_top">68dp</dimen>
-
- <!-- dimensions for the car user switcher -->
- <dimen name="car_user_switcher_name_text_size">@*android:dimen/car_body1_size</dimen>
- <dimen name="car_user_switcher_image_avatar_size">@*android:dimen/car_large_avatar_size</dimen>
- <dimen name="car_user_switcher_vertical_spacing_between_users">@*android:dimen/car_padding_5</dimen>
- <dimen name="car_user_switcher_vertical_spacing_between_name_and_avatar">@*android:dimen/car_padding_4</dimen>
- <dimen name="car_user_switcher_margin_top">@*android:dimen/car_padding_4</dimen>
-
- <dimen name="car_navigation_button_width">64dp</dimen>
- <dimen name="car_navigation_button_icon_height">44dp</dimen>
- <dimen name="car_navigation_bar_width">760dp</dimen>
- <dimen name="car_left_navigation_bar_width">96dp</dimen>
- <dimen name="car_right_navigation_bar_width">96dp</dimen>
- <!-- In order to change the height of the bottom nav bar, overlay navigation_bar_height in
- frameworks/base/core/res/res instead. -->
- <dimen name="car_bottom_navigation_bar_height">@*android:dimen/navigation_bar_height</dimen>
- <!-- In order to change the height of the top nav bar, overlay status_bar_height in
- frameworks/base/core/res/res instead. -->
- <dimen name="car_top_navigation_bar_height">@*android:dimen/status_bar_height</dimen>
-
- <dimen name="car_user_switcher_container_height">420dp</dimen>
- <!-- This must be the negative of car_user_switcher_container_height for the animation. -->
- <dimen name="car_user_switcher_container_anim_height">-420dp</dimen>
-
- <!-- dimensions for car user switching dialog -->
- <dimen name="car_fullscreen_user_pod_image_avatar_width">96dp</dimen>
- <dimen name="car_fullscreen_user_pod_image_avatar_height">96dp</dimen>
- <dimen name="car_user_switching_dialog_loading_text_margin_top">@*android:dimen/car_padding_4</dimen>
- <dimen name="car_user_switching_dialog_loading_text_font_size">@*android:dimen/car_body1_size</dimen>
-
- <!-- dimensions for rear view camera -->
- <dimen name="rear_view_camera_width">600dp</dimen>
- <dimen name="rear_view_camera_height">500dp</dimen>
-</resources>
diff --git a/packages/CarSystemUI/res/values/ids.xml b/packages/CarSystemUI/res/values/ids.xml
deleted file mode 100644
index 05194a4d6279..000000000000
--- a/packages/CarSystemUI/res/values/ids.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<resources>
- <!-- Values used for finding elements on the system ui nav bars -->
- <item type="id" name="lock_screen_nav_buttons"/>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/values/integers.xml b/packages/CarSystemUI/res/values/integers.xml
deleted file mode 100644
index 5ae5555a8092..000000000000
--- a/packages/CarSystemUI/res/values/integers.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (c) 2018, The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<resources>
- <!-- Full screen user switcher column number -->
- <integer name="user_fullscreen_switcher_num_col">3</integer>
-
- <!--Percentage of the screen height, from the bottom, that a notification panel being
- partially closed at will result in it remaining open if released-->
- <integer name="notification_settle_open_percentage">20</integer>
- <!--Percentage of the screen height, from the bottom, that a notification panel being peeked
- at will result in remaining closed the panel if released-->
- <integer name="notification_settle_close_percentage">80</integer>
-
- <!-- Timeout values in milliseconds for displaying volume dialog-->
- <integer name="car_volume_dialog_display_normal_timeout">3000</integer>
- <integer name="car_volume_dialog_display_hovering_timeout">16000</integer>
- <integer name="car_volume_dialog_display_expanded_normal_timeout">6000</integer>
- <integer name="car_volume_dialog_display_expanded_hovering_timeout">32000</integer>
-</resources>
diff --git a/packages/CarSystemUI/res/values/strings.xml b/packages/CarSystemUI/res/values/strings.xml
deleted file mode 100644
index 264456588c80..000000000000
--- a/packages/CarSystemUI/res/values/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (c) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Format for HVAC temperature (No decimal and the degree symbol) -->
- <string name="hvac_temperature_format" translatable="false">%.0f\u00B0</string>
- <!-- String to represent lowest setting of an HVAC system [CHAR LIMIT=10]-->
- <string name="hvac_min_text">Min</string>
- <!-- String to represent largest setting of an HVAC system [CHAR LIMIT=10]-->
- <string name="hvac_max_text">Max</string>
- <!-- String to display when no HVAC temperature is available -->
- <string name="hvac_null_temp_text" translatable="false">--</string>
- <!-- Text for voice recognition toast. [CHAR LIMIT=60] -->
- <string name="voice_recognition_toast">Voice recognition now handled by connected Bluetooth device</string>
- <!-- Name of Guest Profile. [CHAR LIMIT=35] -->
- <string name="car_guest">Guest</string>
- <!-- Title for button that starts a guest session. [CHAR LIMIT=35] -->
- <string name="start_guest_session">Guest</string>
- <!-- Title for button that adds a new user. [CHAR LIMIT=30] -->
- <string name="car_add_user">Add User</string>
- <!-- Default name of the new user created. [CHAR LIMIT=30] -->
- <string name="car_new_user">New User</string>
- <!-- Message to inform user that creation of new user requires that user to set up their space. [CHAR LIMIT=100] -->
- <string name="user_add_user_message_setup">When you add a new user, that person needs to set up their space.</string>
- <!-- Message to inform user that the newly created user will have permissions to update apps for all other users. [CHAR LIMIT=100] -->
- <string name="user_add_user_message_update">Any user can update apps for all other users.</string>
- <!-- Message to inform user that the new user profile is loading. [CHAR LIMIT=20] -->
- <string name="car_loading_profile">Loading</string>
- <!-- Message to inform user that the new user profile is loading with additional information on the previous and the next user. [CHAR LIMIT=100] -->
- <string name="car_loading_profile_developer_message">Loading user (from <xliff:g id="from_user" example="10">%1$d</xliff:g> to <xliff:g id="to_user" example="12">%2$d</xliff:g>)</string>
- <!-- Text for the close button in Rear View Camera [CHAR LIMIT=30] -->
- <string name="rear_view_camera_close_button_text">Close</string>
-</resources>
diff --git a/packages/CarSystemUI/res/values/styles.xml b/packages/CarSystemUI/res/values/styles.xml
deleted file mode 100644
index f5de2fde7b1a..000000000000
--- a/packages/CarSystemUI/res/values/styles.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-
- <!-- The style for the volume icons in the volume dialog. This style makes the icon scale to
- fit its container since auto wants the icon to be larger. The padding is added to make it
- so the icon does not press along the edges of the dialog. -->
- <style name="VolumeButtons" parent="@android:style/Widget.Material.Button.Borderless">
- <item name="android:background">@drawable/btn_borderless_rect</item>
- <item name="android:scaleType">fitCenter</item>
- <item name="android:padding">22dp</item>
- </style>
-
- <style name="TextAppearance.SystemBar.Clock"
- parent="@*android:style/TextAppearance.StatusBar.Icon">
- <item name="android:textSize">@dimen/car_body1_size</item>
- <item name="android:textColor">@*android:color/car_headline3</item>
- </style>
-
- <style name="TextAppearance.SystemBar.Username"
- parent="@android:style/TextAppearance.DeviceDefault">
- <item name="android:textSize">@dimen/car_body3_size</item>
- <item name="android:textColor">@color/system_bar_text_color</item>
- </style>
-
- <style name="TextAppearance.CarStatus" parent="@android:style/TextAppearance.DeviceDefault">
- <item name="android:textSize">@*android:dimen/car_body2_size</item>
- <item name="android:textColor">@color/system_bar_text_color</item>
- </style>
-
- <style name="NavigationBarButton">
- <item name="android:layout_height">@dimen/system_bar_button_size</item>
- <item name="android:layout_width">@dimen/system_bar_button_size</item>
- <item name="android:layout_marginEnd">@dimen/system_bar_button_margin</item>
- <item name="android:padding">@dimen/system_bar_button_padding</item>
- <item name="android:gravity">center</item>
- <item name="android:background">?android:attr/selectableItemBackground</item>
- <item name="unselectedAlpha">0.56</item>
- </style>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/res/values/themes.xml b/packages/CarSystemUI/res/values/themes.xml
deleted file mode 100644
index f82be3c0e529..000000000000
--- a/packages/CarSystemUI/res/values/themes.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2018, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<resources>
- <style name="Theme.Notification" parent="Theme.DeviceDefault.NoActionBar.Notification">
- </style>
-</resources>
diff --git a/packages/CarSystemUI/res/xml/car_volume_items.xml b/packages/CarSystemUI/res/xml/car_volume_items.xml
deleted file mode 100644
index d371a646b85d..000000000000
--- a/packages/CarSystemUI/res/xml/car_volume_items.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<!--
- Defines all possible items on car volume settings UI, keyed by usage.
--->
-<carVolumeItems xmlns:car="http://schemas.android.com/apk/res-auto">
- <item car:usage="unknown"
- car:icon="@drawable/car_ic_music"/>
- <item car:usage="media"
- car:icon="@drawable/car_ic_music"/>
- <item car:usage="assistance_navigation_guidance"
- car:icon="@drawable/car_ic_navigation"/>
- <item car:usage="voice_communication_signalling"
- car:icon="@*android:drawable/ic_audio_ring_notif"/>
- <item car:usage="alarm"
- car:icon="@drawable/ic_volume_alarm"/>
- <item car:usage="notification"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="notification_ringtone"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="notification_communication_request"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="notification_communication_instant"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="notification_communication_delayed"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="notification_event"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="assistance_accessibility"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="voice_communication"
- car:icon="@*android:drawable/ic_audio_ring_notif"/>
- <item car:usage="assistance_sonification"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="game"
- car:icon="@drawable/car_ic_music"/>
- <item car:usage="assistant"
- car:icon="@drawable/car_ic_music"/>
- <item car:usage="call_assistant"
- car:icon="@*android:drawable/ic_audio_ring_notif"/>
- <item car:usage="emergency"
- car:icon="@drawable/ic_volume_alarm"/>
- <item car:usage="safety"
- car:icon="@drawable/ic_volume_alarm"/>
- <item car:usage="vehicle_status"
- car:icon="@drawable/car_ic_notification"/>
- <item car:usage="announcement"
- car:icon="@drawable/car_ic_notification"/>
-</carVolumeItems>
-
diff --git a/packages/CarSystemUI/samples/sample1/rro/Android.bp b/packages/CarSystemUI/samples/sample1/rro/Android.bp
deleted file mode 100644
index 5b0347ff73fd..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/Android.bp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// Copyright (C) 2020 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.
-//
-
-android_app {
- name: "CarSystemUISampleOneRRO",
- resource_dirs: ["res"],
- certificate: "platform",
- platform_apis: true,
- manifest: "AndroidManifest.xml",
- aaptflags: [
- "--no-resource-deduping",
- "--no-resource-removal",
- ]
-} \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/AndroidManifest.xml b/packages/CarSystemUI/samples/sample1/rro/AndroidManifest.xml
deleted file mode 100644
index 5c25056f7915..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.systemui.rro">
- <overlay
- android:targetPackage="com.android.systemui"
- android:isStatic="false"
- android:resourcesMap="@xml/car_sysui_overlays"
- />
-</manifest> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps.xml
deleted file mode 100644
index a8d8a2f241f6..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
-<path
- android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps_selected.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps_selected.xml
deleted file mode 100644
index 2a4e91aa3cd9..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_apps_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music.xml
deleted file mode 100644
index 6339ebb3ea8d..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M22 5.5L22 24.8416667C20.9183333 24.2183333 19.6716667 23.8333333 18.3333333 23.8333333C14.2816667 23.8333333 11 27.115 11 31.1666667C11 35.2183333 14.2816667 38.5 18.3333333 38.5C22.385 38.5 25.6666667 35.2183333 25.6666667 31.1666667L25.6666667 12.8333333L33 12.8333333L33 5.5L22 5.5Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music_selected.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music_selected.xml
deleted file mode 100644
index a56bcb38d883..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_music_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M22 5.5L22 24.8416667C20.9183333 24.2183333 19.6716667 23.8333333 18.3333333 23.8333333C14.2816667 23.8333333 11 27.115 11 31.1666667C11 35.2183333 14.2816667 38.5 18.3333333 38.5C22.385 38.5 25.6666667 35.2183333 25.6666667 31.1666667L25.6666667 12.8333333L33 12.8333333L33 5.5L22 5.5Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation.xml
deleted file mode 100644
index e1fabe07cdeb..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M39.8016667 20.6983333L23.3016667 4.19833333C22.5866667 3.48333333 21.4316667 3.48333333 20.7166667 4.19833333L4.21666667 20.6983333C3.50166667 21.4133333 3.50166667 22.5683333 4.21666667 23.2833333L20.7166667 39.7833333C21.4316667 40.4983333 22.5866667 40.4983333 23.3016667 39.7833333L39.8016667 23.2833333C40.5166667 22.5866667 40.5166667 21.4316667 39.8016667 20.6983333ZM25.6666667 26.5833333L25.6666667 22L18.3333333 22L18.3333333 27.5L14.6666667 27.5L14.6666667 20.1666667C14.6666667 19.1583333 15.4916667 18.3333333 16.5 18.3333333L25.6666667 18.3333333L25.6666667 13.75L32.0833333 20.1666667L25.6666667 26.5833333Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation_selected.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation_selected.xml
deleted file mode 100644
index d11cf28f6ca7..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_navigation_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M39.8016667 20.6983333L23.3016667 4.19833333C22.5866667 3.48333333 21.4316667 3.48333333 20.7166667 4.19833333L4.21666667 20.6983333C3.50166667 21.4133333 3.50166667 22.5683333 4.21666667 23.2833333L20.7166667 39.7833333C21.4316667 40.4983333 22.5866667 40.4983333 23.3016667 39.7833333L39.8016667 23.2833333C40.5166667 22.5866667 40.5166667 21.4316667 39.8016667 20.6983333ZM25.6666667 26.5833333L25.6666667 22L18.3333333 22L18.3333333 27.5L14.6666667 27.5L14.6666667 20.1666667C14.6666667 19.1583333 15.4916667 18.3333333 16.5 18.3333333L25.6666667 18.3333333L25.6666667 13.75L32.0833333 20.1666667L25.6666667 26.5833333Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview.xml
deleted file mode 100644
index f185eb9afb75..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M36.92857 22.39286A14.53571 14.53571 0 0 1 7.857143 22.39286A14.53571 14.53571 0 0 1 36.92857 22.39286Z"
- android:strokeColor="@color/car_nav_icon_fill_color"
- android:strokeWidth="4" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview_selected.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview_selected.xml
deleted file mode 100644
index 19b558363720..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_overview_selected.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M36.92857 22.39286A14.53571 14.53571 0 0 1 7.857143 22.39286A14.53571 14.53571 0 0 1 36.92857 22.39286Z"
- android:strokeColor="@color/car_nav_icon_fill_color_selected"
- android:strokeWidth="4" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone.xml
deleted file mode 100644
index 50e36b5a6e3c..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M12.1366667 19.7816667C14.7766667 24.97 19.03 29.205 24.2183333 31.8633333L28.2516667 27.83C28.7466667 27.335 29.48 27.17 30.1216667 27.39C32.175 28.0683333 34.3933333 28.435 36.6666667 28.435C37.675 28.435 38.5 29.26 38.5 30.2683333L38.5 36.6666667C38.5 37.675 37.675 38.5 36.6666667 38.5C19.4516667 38.5 5.5 24.5483333 5.5 7.33333333C5.5 6.325 6.325 5.5 7.33333333 5.5L13.75 5.5C14.7583333 5.5 15.5833333 6.325 15.5833333 7.33333333C15.5833333 9.625 15.95 11.825 16.6283333 13.8783333C16.83 14.52 16.6833333 15.235 16.17 15.7483333L12.1366667 19.7816667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone_selected.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone_selected.xml
deleted file mode 100644
index 11b1687cf1c1..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/car_ic_phone_selected.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M12.1366667 19.7816667C14.7766667 24.97 19.03 29.205 24.2183333 31.8633333L28.2516667 27.83C28.7466667 27.335 29.48 27.17 30.1216667 27.39C32.175 28.0683333 34.3933333 28.435 36.6666667 28.435C37.675 28.435 38.5 29.26 38.5 30.2683333L38.5 36.6666667C38.5 37.675 37.675 38.5 36.6666667 38.5C19.4516667 38.5 5.5 24.5483333 5.5 7.33333333C5.5 6.325 6.325 5.5 7.33333333 5.5L13.75 5.5C14.7583333 5.5 15.5833333 6.325 15.5833333 7.33333333C15.5833333 9.625 15.95 11.825 16.6283333 13.8783333C16.83 14.52 16.6833333 15.235 16.17 15.7483333L12.1366667 19.7816667Z"
- android:fillColor="@color/car_nav_icon_fill_color_selected" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background.xml
deleted file mode 100644
index 6161ad9b041c..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
- <corners
- android:topLeftRadius="0dp"
- android:topRightRadius="10dp"
- android:bottomLeftRadius="0dp"
- android:bottomRightRadius="0dp"
- />
- <solid
- android:color="#404040"
- />
- <padding
- android:left="0dp"
- android:top="0dp"
- android:right="0dp"
- android:bottom="0dp"
- />
-</shape> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_2.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_2.xml
deleted file mode 100644
index 35821426bee3..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_2.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
- <corners
- android:topLeftRadius="10dp"
- android:topRightRadius="0dp"
- android:bottomLeftRadius="0dp"
- android:bottomRightRadius="0dp"
- />
- <solid
- android:color="#404040"
- />
- <padding
- android:left="0dp"
- android:top="0dp"
- android:right="0dp"
- android:bottom="0dp"
- />
-</shape> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_3.xml b/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_3.xml
deleted file mode 100644
index afa5b32136a8..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/drawable/system_bar_background_3.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
- <corners
- android:topLeftRadius="0dp"
- android:topRightRadius="0dp"
- android:bottomLeftRadius="10dp"
- android:bottomRightRadius="0dp"
- />
- <solid
- android:color="#404040"
- />
- <padding
- android:left="0dp"
- android:top="0dp"
- android:right="0dp"
- android:bottom="0dp"
- />
-</shape> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/layout/car_navigation_bar.xml b/packages/CarSystemUI/samples/sample1/rro/res/layout/car_navigation_bar.xml
deleted file mode 100644
index 4358d977bcc3..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/layout/car_navigation_bar.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/transparent"
- android:orientation="horizontal">
- <!--The 20dp padding is the difference between the background selected icon size and the ripple
- that was chosen, thus it's a hack to make it look pretty and not an official margin value-->
- <LinearLayout
- android:id="@+id/nav_buttons"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/system_bar_background"
- android:gravity="center"
- android:layoutDirection="ltr"
- android:paddingEnd="20dp"
- android:paddingStart="20dp">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/maps_nav"
- style="@style/NavigationBarButton"
- systemui:categories="android.intent.category.APP_MAPS"
- systemui:icon="@drawable/car_ic_navigation"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MAPS;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_navigation_selected"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/music_nav"
- style="@style/NavigationBarButton"
- systemui:categories="android.intent.category.APP_MUSIC"
- systemui:icon="@drawable/car_ic_music"
- systemui:intent="intent:#Intent;action=android.car.intent.action.MEDIA_TEMPLATE;launchFlags=0x10000000;end"
- systemui:packages="com.android.car.media"
- systemui:selectedIcon="@drawable/car_ic_music_selected"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/phone_nav"
- style="@style/NavigationBarButton"
- systemui:icon="@drawable/car_ic_phone"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
- systemui:packages="com.android.car.dialer"
- systemui:selectedIcon="@drawable/car_ic_phone_selected"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/grid_nav"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
- systemui:icon="@drawable/car_ic_apps"
- systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"
- systemui:selectedIcon="@drawable/car_ic_apps_selected"
- systemui:highlightWhenSelected="true"
- />
-
- </LinearLayout>
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/layout/car_right_navigation_bar.xml b/packages/CarSystemUI/samples/sample1/rro/res/layout/car_right_navigation_bar.xml
deleted file mode 100644
index dc1d0d64a40b..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/layout/car_right_navigation_bar.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:baselineAligned="false"
- android:background="@android:color/transparent">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="110dp"
- android:background="@drawable/system_bar_background_3">
- <FrameLayout
- android:id="@+id/clock_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerInParent="true">
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/qs"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- systemui:intent="intent:#Intent;component=com.android.car.settings/.common.CarSettingActivities$QuickSettingActivity;launchFlags=0x24000000;end"
- />
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:elevation="5dp"
- android:singleLine="true"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
- />
- </FrameLayout>
- </RelativeLayout>
- <View
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="110dp"
- android:layout_gravity="bottom"
- android:orientation="horizontal"
- android:background="@drawable/system_bar_background_2">
-
- <FrameLayout
- android:id="@+id/left_hvac_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentStart="true">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvacleft"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- systemui:broadcast="true"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- />
-
- <com.android.systemui.car.hvac.AnimatedTemperatureView
- android:id="@+id/lefttext"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingStart="@*android:dimen/car_padding_4"
- android:paddingEnd="16dp"
- android:gravity="center_vertical|start"
- android:minEms="4"
- android:textAppearance="@style/TextAppearance.CarStatus"
- systemui:hvacAreaId="49"
- systemui:hvacMaxText="Max"
- systemui:hvacMaxValue="126"
- systemui:hvacMinText="Min"
- systemui:hvacMinValue="0"
- systemui:hvacPivotOffset="60dp"
- systemui:hvacPropertyId="358614275"
- systemui:hvacTempFormat="%.0f\u00B0"
- />
- </FrameLayout>
- <View
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- />
- <FrameLayout
- android:id="@+id/right_hvac_container"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvacright"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- systemui:broadcast="true"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- />
-
- <com.android.systemui.car.hvac.AnimatedTemperatureView
- android:id="@+id/righttext"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingStart="16dp"
- android:paddingEnd="@*android:dimen/car_padding_4"
- android:gravity="center_vertical|end"
- android:minEms="4"
- android:textAppearance="@style/TextAppearance.CarStatus"
- systemui:hvacAreaId="68"
- systemui:hvacMaxText="Max"
- systemui:hvacMaxValue="126"
- systemui:hvacMinText="Min"
- systemui:hvacMinValue="0"
- systemui:hvacPivotOffset="60dp"
- systemui:hvacPropertyId="358614275"
- systemui:hvacTempFormat="%.0f\u00B0"
- />
- </FrameLayout>
- </LinearLayout>
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/layout/system_icons.xml b/packages/CarSystemUI/samples/sample1/rro/res/layout/system_icons.xml
deleted file mode 100644
index d23579294ce8..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/layout/system_icons.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/system_icons"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center_vertical">
-
- <com.android.systemui.statusbar.phone.StatusIconContainer
- android:id="@+id/statusIcons"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:paddingEnd="4dp"
- android:gravity="center_vertical"
- android:orientation="horizontal"
- />
-</LinearLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/values/attrs.xml b/packages/CarSystemUI/samples/sample1/rro/res/values/attrs.xml
deleted file mode 100644
index e02f9e6e9a72..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/values/attrs.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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>
- <attr name="broadcast" format="boolean"/>
- <attr name="icon" format="reference"/>
- <attr name="selectedIcon" format="reference"/>
- <attr name="intent" format="string"/>
- <attr name="longIntent" format="string"/>
- <attr name="componentNames" format="string" />
- <attr name="highlightWhenSelected" format="boolean" />
- <attr name="categories" format="string"/>
- <attr name="packages" format="string" />
-
- <!-- Custom attributes to configure hvac values -->
- <declare-styleable name="AnimatedTemperatureView">
- <attr name="hvacAreaId" format="integer"/>
- <attr name="hvacPropertyId" format="integer"/>
- <attr name="hvacTempFormat" format="string"/>
- <!-- how far away the animations should center around -->
- <attr name="hvacPivotOffset" format="dimension"/>
- <attr name="hvacMinValue" format="float"/>
- <attr name="hvacMaxValue" format="float"/>
- <attr name="hvacMinText" format="string|reference"/>
- <attr name="hvacMaxText" format="string|reference"/>
- <attr name="android:gravity"/>
- <attr name="android:minEms"/>
- <attr name="android:textAppearance"/>
- </declare-styleable>
-</resources>
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/values/colors.xml b/packages/CarSystemUI/samples/sample1/rro/res/values/colors.xml
deleted file mode 100644
index c32d638681a2..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/values/colors.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <color name="car_nav_icon_fill_color">#8F8F8F</color>
- <color name="car_nav_icon_fill_color_selected">#FFFFFF</color>
-</resources>
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/values/config.xml b/packages/CarSystemUI/samples/sample1/rro/res/values/config.xml
deleted file mode 100644
index 2ec90e95d707..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/values/config.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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>
- <!-- Configure which system bars should be displayed. -->
- <bool name="config_enableTopNavigationBar">false</bool>
- <bool name="config_enableLeftNavigationBar">false</bool>
- <bool name="config_enableRightNavigationBar">true</bool>
- <bool name="config_enableBottomNavigationBar">true</bool>
-
- <!-- Configure the type of each system bar. Each system bar must have a unique type. -->
- <!-- STATUS_BAR = 0-->
- <!-- NAVIGATION_BAR = 1-->
- <!-- STATUS_BAR_EXTRA = 2-->
- <!-- NAVIGATION_BAR_EXTRA = 3-->
- <integer name="config_topSystemBarType">0</integer>
- <integer name="config_leftSystemBarType">0</integer>
- <integer name="config_rightSystemBarType">0</integer>
- <integer name="config_bottomSystemBarType">1</integer>
-
- <!-- Configure the relative z-order among the system bars. When two system bars overlap (e.g.
- if both top bar and left bar are enabled, it creates an overlapping space in the upper left
- corner), the system bar with the higher z-order takes the overlapping space and padding is
- applied to the other bar.-->
- <!-- NOTE: If two overlapping system bars have the same z-order, SystemBarConfigs will throw a
- RuntimeException, since their placing order cannot be determined. Bars that do not overlap
- are allowed to have the same z-order. -->
- <!-- NOTE: If the z-order of a bar is 10 or above, it will also appear on top of HUN's. -->
- <integer name="config_topSystemBarZOrder">0</integer>
- <integer name="config_leftSystemBarZOrder">0</integer>
- <integer name="config_rightSystemBarZOrder">11</integer>
- <integer name="config_bottomSystemBarZOrder">10</integer>
-
- <!-- Whether heads-up notifications should be shown on the bottom. If false, heads-up
- notifications will be shown pushed to the top of their parent container. If true, they will
- be shown pushed to the bottom of their parent container. If true, then should override
- config_headsUpNotificationAnimationHelper to use a different AnimationHelper, such as
- com.android.car.notification.headsup.animationhelper.
- CarHeadsUpNotificationBottomAnimationHelper. -->
- <bool name="config_showHeadsUpNotificationOnBottom">true</bool>
-
- <string name="config_notificationPanelViewMediator" translatable="false">
- com.android.systemui.car.notification.BottomNotificationPanelViewMediator</string>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/values/dimens.xml b/packages/CarSystemUI/samples/sample1/rro/res/values/dimens.xml
deleted file mode 100644
index cdfed27c64a7..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/values/dimens.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<resources>
- <dimen name="car_right_navigation_bar_width">280dp</dimen>
-</resources>
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/values/styles.xml b/packages/CarSystemUI/samples/sample1/rro/res/values/styles.xml
deleted file mode 100644
index 136dc3b6df18..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/values/styles.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="TextAppearance.StatusBar.Clock"
- parent="@*android:style/TextAppearance.StatusBar.Icon">
- <item name="android:textSize">40sp</item>
- <item name="android:fontFamily">sans-serif-regular</item>
- <item name="android:textColor">#FFFFFF</item>
- </style>
-
- <style name="NavigationBarButton">
- <item name="android:layout_height">96dp</item>
- <item name="android:layout_width">96dp</item>
- <item name="android:background">?android:attr/selectableItemBackground</item>
- </style>
-
- <style name="TextAppearance.CarStatus" parent="@android:style/TextAppearance.DeviceDefault">
- <item name="android:textSize">30sp</item>
- <item name="android:textColor">#FFFFFF</item>
- </style>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample1/rro/res/xml/car_sysui_overlays.xml b/packages/CarSystemUI/samples/sample1/rro/res/xml/car_sysui_overlays.xml
deleted file mode 100644
index 20aa5f79c5cc..000000000000
--- a/packages/CarSystemUI/samples/sample1/rro/res/xml/car_sysui_overlays.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<overlay>
- <item target="layout/car_navigation_bar" value="@layout/car_navigation_bar"/>
- <item target="layout/system_icons" value="@layout/system_icons"/>
- <item target="layout/car_right_navigation_bar" value="@layout/car_right_navigation_bar"/>
-
- <item target="attr/icon" value="@attr/icon"/>
- <item target="attr/selectedIcon" value="@attr/selectedIcon"/>
- <item target="attr/intent" value="@attr/intent"/>
- <item target="attr/longIntent" value="@attr/longIntent"/>
- <item target="attr/componentNames" value="@attr/componentNames"/>
- <item target="attr/highlightWhenSelected" value="@attr/highlightWhenSelected"/>
- <item target="attr/categories" value="@attr/categories"/>
- <item target="attr/packages" value="@attr/packages"/>
- <item target="attr/hvacAreaId" value="@attr/hvacAreaId"/>
- <item target="attr/hvacPropertyId" value="@attr/hvacPropertyId"/>
- <item target="attr/hvacTempFormat" value="@attr/hvacTempFormat"/>
- <item target="attr/hvacPivotOffset" value="@attr/hvacPivotOffset"/>
- <item target="attr/hvacMinValue" value="@attr/hvacMinValue"/>
- <item target="attr/hvacMaxValue" value="@attr/hvacMaxValue"/>
- <item target="attr/hvacMinText" value="@attr/hvacMinText"/>
- <item target="attr/hvacMaxText" value="@attr/hvacMaxText"/>
- <!-- start the intent as a broad cast instead of an activity if true-->
- <item target="attr/broadcast" value="@attr/broadcast"/>
-
- <item target="drawable/car_ic_overview" value="@drawable/car_ic_overview" />
- <item target="drawable/car_ic_overview_selected" value="@drawable/car_ic_overview_selected" />
- <item target="drawable/car_ic_apps" value="@drawable/car_ic_apps" />
- <item target="drawable/car_ic_apps_selected" value="@drawable/car_ic_apps_selected" />
- <item target="drawable/car_ic_music" value="@drawable/car_ic_music" />
- <item target="drawable/car_ic_music_selected" value="@drawable/car_ic_music_selected" />
- <item target="drawable/car_ic_phone" value="@drawable/car_ic_phone" />
- <item target="drawable/car_ic_phone_selected" value="@drawable/car_ic_phone_selected" />
- <item target="drawable/car_ic_navigation" value="@drawable/car_ic_navigation" />
- <item target="drawable/car_ic_navigation_selected" value="@drawable/car_ic_navigation_selected" />
-
- <item target="dimen/car_right_navigation_bar_width" value="@dimen/car_right_navigation_bar_width" />
-
- <item target="style/NavigationBarButton" value="@style/NavigationBarButton"/>
-
- <item target="color/car_nav_icon_fill_color" value="@color/car_nav_icon_fill_color" />
-
- <item target="bool/config_enableTopNavigationBar" value="@bool/config_enableTopNavigationBar"/>
- <item target="bool/config_enableLeftNavigationBar" value="@bool/config_enableLeftNavigationBar"/>
- <item target="bool/config_enableRightNavigationBar" value="@bool/config_enableRightNavigationBar"/>
- <item target="bool/config_enableBottomNavigationBar" value="@bool/config_enableBottomNavigationBar"/>
- <item target="bool/config_showHeadsUpNotificationOnBottom" value="@bool/config_showHeadsUpNotificationOnBottom"/>
-
- <item target="integer/config_topSystemBarType" value="@integer/config_topSystemBarType"/>
- <item target="integer/config_leftSystemBarType" value="@integer/config_leftSystemBarType"/>
- <item target="integer/config_rightSystemBarType" value="@integer/config_rightSystemBarType"/>
- <item target="integer/config_bottomSystemBarType" value="@integer/config_bottomSystemBarType"/>
-
- <item target="integer/config_topSystemBarZOrder" value="@integer/config_topSystemBarZOrder"/>
- <item target="integer/config_leftSystemBarZOrder" value="@integer/config_leftSystemBarZOrder"/>
- <item target="integer/config_rightSystemBarZOrder" value="@integer/config_rightSystemBarZOrder"/>
- <item target="integer/config_bottomSystemBarZOrder" value="@integer/config_bottomSystemBarZOrder"/>
-
- <item target="string/config_notificationPanelViewMediator" value="@string/config_notificationPanelViewMediator"/>
-</overlay> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/Android.bp b/packages/CarSystemUI/samples/sample2/rro/Android.bp
deleted file mode 100644
index bf68e414ca1c..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/Android.bp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// Copyright (C) 2020 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.
-//
-
-android_app {
- name: "CarSystemUISampleTwoRRO",
- resource_dirs: ["res"],
- certificate: "platform",
- platform_apis: true,
- manifest: "AndroidManifest.xml",
- aaptflags: [
- "--no-resource-deduping",
- "--no-resource-removal",
- ]
-} \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/AndroidManifest.xml b/packages/CarSystemUI/samples/sample2/rro/AndroidManifest.xml
deleted file mode 100644
index 5c25056f7915..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.systemui.rro">
- <overlay
- android:targetPackage="com.android.systemui"
- android:isStatic="false"
- android:resourcesMap="@xml/car_sysui_overlays"
- />
-</manifest> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_apps.xml b/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_apps.xml
deleted file mode 100644
index a8d8a2f241f6..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_apps.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
-<path
- android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_music.xml b/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_music.xml
deleted file mode 100644
index 6339ebb3ea8d..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_music.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M22 5.5L22 24.8416667C20.9183333 24.2183333 19.6716667 23.8333333 18.3333333 23.8333333C14.2816667 23.8333333 11 27.115 11 31.1666667C11 35.2183333 14.2816667 38.5 18.3333333 38.5C22.385 38.5 25.6666667 35.2183333 25.6666667 31.1666667L25.6666667 12.8333333L33 12.8333333L33 5.5L22 5.5Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_navigation.xml b/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_navigation.xml
deleted file mode 100644
index e1fabe07cdeb..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_navigation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M39.8016667 20.6983333L23.3016667 4.19833333C22.5866667 3.48333333 21.4316667 3.48333333 20.7166667 4.19833333L4.21666667 20.6983333C3.50166667 21.4133333 3.50166667 22.5683333 4.21666667 23.2833333L20.7166667 39.7833333C21.4316667 40.4983333 22.5866667 40.4983333 23.3016667 39.7833333L39.8016667 23.2833333C40.5166667 22.5866667 40.5166667 21.4316667 39.8016667 20.6983333ZM25.6666667 26.5833333L25.6666667 22L18.3333333 22L18.3333333 27.5L14.6666667 27.5L14.6666667 20.1666667C14.6666667 19.1583333 15.4916667 18.3333333 16.5 18.3333333L25.6666667 18.3333333L25.6666667 13.75L32.0833333 20.1666667L25.6666667 26.5833333Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_notification.xml b/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_notification.xml
deleted file mode 100644
index 3c3fefc9782a..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_notification.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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="44dp"
- android:height="44dp"
- android:viewportWidth="44"
- android:viewportHeight="44">
- <path
- android:pathData="M22 39.125C23.925 39.125 25.5 37.55 25.5 35.625L18.5 35.625C18.5 37.55 20.0575 39.125 22 39.125ZM32.5 28.625L32.5 19.875C32.5 14.5025 29.63 10.005 24.625 8.815L24.625 7.625C24.625 6.1725 23.4525 5 22 5C20.5475 5 19.375 6.1725 19.375 7.625L19.375 8.815C14.3525 10.005 11.5 14.485 11.5 19.875L11.5 28.625L8 32.125L8 33.875L36 33.875L36 32.125L32.5 28.625Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_overview.xml b/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_overview.xml
deleted file mode 100644
index f185eb9afb75..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_overview.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M36.92857 22.39286A14.53571 14.53571 0 0 1 7.857143 22.39286A14.53571 14.53571 0 0 1 36.92857 22.39286Z"
- android:strokeColor="@color/car_nav_icon_fill_color"
- android:strokeWidth="4" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_phone.xml b/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_phone.xml
deleted file mode 100644
index 50e36b5a6e3c..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/drawable/car_ic_phone.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M12.1366667 19.7816667C14.7766667 24.97 19.03 29.205 24.2183333 31.8633333L28.2516667 27.83C28.7466667 27.335 29.48 27.17 30.1216667 27.39C32.175 28.0683333 34.3933333 28.435 36.6666667 28.435C37.675 28.435 38.5 29.26 38.5 30.2683333L38.5 36.6666667C38.5 37.675 37.675 38.5 36.6666667 38.5C19.4516667 38.5 5.5 24.5483333 5.5 7.33333333C5.5 6.325 6.325 5.5 7.33333333 5.5L13.75 5.5C14.7583333 5.5 15.5833333 6.325 15.5833333 7.33333333C15.5833333 9.625 15.95 11.825 16.6283333 13.8783333C16.83 14.52 16.6833333 15.235 16.17 15.7483333L12.1366667 19.7816667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/drawable/system_bar_background.xml b/packages/CarSystemUI/samples/sample2/rro/res/drawable/system_bar_background.xml
deleted file mode 100644
index 6161ad9b041c..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/drawable/system_bar_background.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
- <corners
- android:topLeftRadius="0dp"
- android:topRightRadius="10dp"
- android:bottomLeftRadius="0dp"
- android:bottomRightRadius="0dp"
- />
- <solid
- android:color="#404040"
- />
- <padding
- android:left="0dp"
- android:top="0dp"
- android:right="0dp"
- android:bottom="0dp"
- />
-</shape> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/layout/car_left_navigation_bar.xml b/packages/CarSystemUI/samples/sample2/rro/res/layout/car_left_navigation_bar.xml
deleted file mode 100644
index bd6065c3de9a..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/layout/car_left_navigation_bar.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:background="@drawable/system_bar_background">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/maps_nav"
- style="@style/NavigationBarButton"
- systemui:categories="android.intent.category.APP_MAPS"
- systemui:icon="@drawable/car_ic_navigation"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MAPS;launchFlags=0x14000000;end"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/music_nav"
- style="@style/NavigationBarButton"
- systemui:categories="android.intent.category.APP_MUSIC"
- systemui:icon="@drawable/car_ic_music"
- systemui:intent="intent:#Intent;action=android.car.intent.action.MEDIA_TEMPLATE;launchFlags=0x10000000;end"
- systemui:packages="com.android.car.media"
- systemui:highlightWhenSelected="true"
- />
-
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/grid_nav"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
- systemui:icon="@drawable/car_ic_apps"
- systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/phone_nav"
- style="@style/NavigationBarButton"
- systemui:icon="@drawable/car_ic_phone"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
- systemui:packages="com.android.car.dialer"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/notifications"
- style="@style/NavigationBarButton"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_notification"
- systemui:longIntent="intent:#Intent;component=com.android.car.bugreport/.BugReportActivity;end"/>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="bottom"
- android:orientation="vertical">
-
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:singleLine="true"
- android:gravity="center_horizontal"
- android:paddingBottom="20dp"
- />
-
- <Space
- android:layout_height="10dp"
- android:layout_width="match_parent"/>
-
- </LinearLayout>
-
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/values/attrs.xml b/packages/CarSystemUI/samples/sample2/rro/res/values/attrs.xml
deleted file mode 100644
index 7ba333468422..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/values/attrs.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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>
- <attr name="broadcast" format="boolean"/>
- <attr name="icon" format="reference"/>
- <attr name="selectedIcon" format="reference"/>
- <attr name="intent" format="string"/>
- <attr name="longIntent" format="string"/>
- <attr name="componentNames" format="string" />
- <attr name="highlightWhenSelected" format="boolean" />
- <attr name="categories" format="string"/>
- <attr name="packages" format="string" />
-</resources>
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/values/colors.xml b/packages/CarSystemUI/samples/sample2/rro/res/values/colors.xml
deleted file mode 100644
index c32d638681a2..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/values/colors.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <color name="car_nav_icon_fill_color">#8F8F8F</color>
- <color name="car_nav_icon_fill_color_selected">#FFFFFF</color>
-</resources>
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/values/config.xml b/packages/CarSystemUI/samples/sample2/rro/res/values/config.xml
deleted file mode 100644
index 89c7bd4df2bc..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/values/config.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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>
- <!-- Configure which system bars should be displayed. -->
- <bool name="config_enableTopNavigationBar">false</bool>
- <bool name="config_enableLeftNavigationBar">true</bool>
- <bool name="config_enableRightNavigationBar">false</bool>
- <bool name="config_enableBottomNavigationBar">false</bool>
-
- <!-- Configure the type of each system bar. Each system bar must have a unique type. -->
- <!-- STATUS_BAR = 0-->
- <!-- NAVIGATION_BAR = 1-->
- <!-- STATUS_BAR_EXTRA = 2-->
- <!-- NAVIGATION_BAR_EXTRA = 3-->
- <integer name="config_topSystemBarType">0</integer>
- <integer name="config_leftSystemBarType">1</integer>
- <integer name="config_rightSystemBarType">2</integer>
- <integer name="config_bottomSystemBarType">3</integer>
-
- <!-- Configure the relative z-order among the system bars. When two system bars overlap (e.g.
- if both top bar and left bar are enabled, it creates an overlapping space in the upper left
- corner), the system bar with the higher z-order takes the overlapping space and padding is
- applied to the other bar.-->
- <!-- NOTE: If two overlapping system bars have the same z-order, SystemBarConfigs will throw a
- RuntimeException, since their placing order cannot be determined. Bars that do not overlap
- are allowed to have the same z-order. -->
- <!-- NOTE: If the z-order of a bar is 10 or above, it will also appear on top of HUN's. -->
- <integer name="config_topSystemBarZOrder">0</integer>
- <integer name="config_leftSystemBarZOrder">10</integer>
- <integer name="config_rightSystemBarZOrder">10</integer>
- <integer name="config_bottomSystemBarZOrder">10</integer>
-
- <!-- Whether heads-up notifications should be shown on the bottom. If false, heads-up
- notifications will be shown pushed to the top of their parent container. If true, they will
- be shown pushed to the bottom of their parent container. If true, then should override
- config_headsUpNotificationAnimationHelper to use a different AnimationHelper, such as
- com.android.car.notification.headsup.animationhelper.
- CarHeadsUpNotificationBottomAnimationHelper. -->
- <bool name="config_showHeadsUpNotificationOnBottom">true</bool>
-
- <string name="config_notificationPanelViewMediator" translatable="false">com.android.systemui.car.notification.NotificationPanelViewMediator</string>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/values/styles.xml b/packages/CarSystemUI/samples/sample2/rro/res/values/styles.xml
deleted file mode 100644
index 136dc3b6df18..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/values/styles.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="TextAppearance.StatusBar.Clock"
- parent="@*android:style/TextAppearance.StatusBar.Icon">
- <item name="android:textSize">40sp</item>
- <item name="android:fontFamily">sans-serif-regular</item>
- <item name="android:textColor">#FFFFFF</item>
- </style>
-
- <style name="NavigationBarButton">
- <item name="android:layout_height">96dp</item>
- <item name="android:layout_width">96dp</item>
- <item name="android:background">?android:attr/selectableItemBackground</item>
- </style>
-
- <style name="TextAppearance.CarStatus" parent="@android:style/TextAppearance.DeviceDefault">
- <item name="android:textSize">30sp</item>
- <item name="android:textColor">#FFFFFF</item>
- </style>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample2/rro/res/xml/car_sysui_overlays.xml b/packages/CarSystemUI/samples/sample2/rro/res/xml/car_sysui_overlays.xml
deleted file mode 100644
index 58a535b4e000..000000000000
--- a/packages/CarSystemUI/samples/sample2/rro/res/xml/car_sysui_overlays.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<overlay>
- <item target="layout/car_left_navigation_bar" value="@layout/car_left_navigation_bar"/>
-
- <item target="attr/icon" value="@attr/icon"/>
- <item target="attr/selectedIcon" value="@attr/selectedIcon"/>
- <item target="attr/intent" value="@attr/intent"/>
- <item target="attr/longIntent" value="@attr/longIntent"/>
- <item target="attr/componentNames" value="@attr/componentNames"/>
- <item target="attr/highlightWhenSelected" value="@attr/highlightWhenSelected"/>
- <item target="attr/categories" value="@attr/categories"/>
- <item target="attr/packages" value="@attr/packages"/>
- <!-- start the intent as a broad cast instead of an activity if true-->
- <item target="attr/broadcast" value="@attr/broadcast"/>
-
- <item target="drawable/car_ic_overview" value="@drawable/car_ic_overview" />
- <item target="drawable/car_ic_apps" value="@drawable/car_ic_apps" />
- <item target="drawable/car_ic_music" value="@drawable/car_ic_music" />
- <item target="drawable/car_ic_phone" value="@drawable/car_ic_phone" />
- <item target="drawable/car_ic_navigation" value="@drawable/car_ic_navigation" />
-
- <item target="style/NavigationBarButton" value="@style/NavigationBarButton"/>
-
- <item target="color/car_nav_icon_fill_color" value="@color/car_nav_icon_fill_color" />
-
- <item target="bool/config_enableTopNavigationBar" value="@bool/config_enableTopNavigationBar"/>
- <item target="bool/config_enableLeftNavigationBar" value="@bool/config_enableLeftNavigationBar"/>
- <item target="bool/config_enableRightNavigationBar" value="@bool/config_enableRightNavigationBar"/>
- <item target="bool/config_enableBottomNavigationBar" value="@bool/config_enableBottomNavigationBar"/>
- <item target="bool/config_showHeadsUpNotificationOnBottom" value="@bool/config_showHeadsUpNotificationOnBottom"/>
-
- <item target="integer/config_topSystemBarType" value="@integer/config_topSystemBarType"/>
- <item target="integer/config_leftSystemBarType" value="@integer/config_leftSystemBarType"/>
- <item target="integer/config_rightSystemBarType" value="@integer/config_rightSystemBarType"/>
- <item target="integer/config_bottomSystemBarType" value="@integer/config_bottomSystemBarType"/>
-
- <item target="integer/config_topSystemBarZOrder" value="@integer/config_topSystemBarZOrder"/>
- <item target="integer/config_leftSystemBarZOrder" value="@integer/config_leftSystemBarZOrder"/>
- <item target="integer/config_rightSystemBarZOrder" value="@integer/config_rightSystemBarZOrder"/>
- <item target="integer/config_bottomSystemBarZOrder" value="@integer/config_bottomSystemBarZOrder"/>
-
- <item target="string/config_notificationPanelViewMediator" value="@string/config_notificationPanelViewMediator"/>
-
- <item target="id/home" value="@id/home"/>
- <item target="id/maps_nav" value="@id/maps_nav"/>
- <item target="id/music_nav" value="@id/music_nav"/>
- <item target="id/grid_nav" value="@id/grid_nav"/>
- <item target="id/phone_nav" value="@id/phone_nav"/>
- <item target="id/notifications" value="@id/notifications"/>
-</overlay> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/Android.bp b/packages/CarSystemUI/samples/sample3/rro/Android.bp
deleted file mode 100644
index 0eae7c271f66..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/Android.bp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// Copyright (C) 2020 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.
-//
-
-android_app {
- name: "CarSystemUISampleThreeRRO",
- resource_dirs: ["res"],
- certificate: "platform",
- platform_apis: true,
- manifest: "AndroidManifest.xml",
- aaptflags: [
- "--no-resource-deduping",
- "--no-resource-removal",
- ]
-} \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/AndroidManifest.xml b/packages/CarSystemUI/samples/sample3/rro/AndroidManifest.xml
deleted file mode 100644
index 5c25056f7915..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.systemui.rro">
- <overlay
- android:targetPackage="com.android.systemui"
- android:isStatic="false"
- android:resourcesMap="@xml/car_sysui_overlays"
- />
-</manifest> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_apps.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_apps.xml
deleted file mode 100644
index a8d8a2f241f6..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_apps.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
-<path
- android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_home.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_home.xml
deleted file mode 100644
index c78f0edd5594..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_home.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_hvac.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_hvac.xml
deleted file mode 100644
index 55c968eacc4d..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_hvac.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:pathData="M16.34,8.36l-2.29,0.82c-0.18,-0.13 -0.38,-0.25 -0.58,-0.34c0.17,-0.83 0.63,-1.58 1.36,-2.06C16.85,5.44 16.18,2 13.39,2C9,2 7.16,5.01 8.36,7.66l0.82,2.29c-0.13,0.18 -0.25,0.38 -0.34,0.58c-0.83,-0.17 -1.58,-0.63 -2.06,-1.36C5.44,7.15 2,7.82 2,10.61c0,4.4 3.01,6.24 5.66,5.03l2.29,-0.82c0.18,0.13 0.38,0.25 0.58,0.34c-0.17,0.83 -0.63,1.58 -1.36,2.06C7.15,18.56 7.82,22 10.61,22c4.4,0 6.24,-3.01 5.03,-5.66l-0.82,-2.29c0.13,-0.18 0.25,-0.38 0.34,-0.58c0.83,0.17 1.58,0.63 2.06,1.36c1.34,2.01 4.77,1.34 4.77,-1.45C22,9 18.99,7.16 16.34,8.36zM12,13.5c-0.83,0 -1.5,-0.67 -1.5,-1.5c0,-0.83 0.67,-1.5 1.5,-1.5c0.83,0 1.5,0.67 1.5,1.5C13.5,12.83 12.83,13.5 12,13.5zM10.24,5.22C10.74,4.44 11.89,4 13.39,4c0.79,0 0.71,0.86 0.34,1.11c-1.22,0.81 -2,2.06 -2.25,3.44c-0.21,0.03 -0.42,0.08 -0.62,0.15l-0.68,-1.88C10,6.42 9.86,5.81 10.24,5.22zM6.83,13.82c-0.4,0.18 -1.01,0.32 -1.61,-0.06C4.44,13.26 4,12.11 4,10.61c0,-0.79 0.86,-0.71 1.11,-0.34c0.81,1.22 2.06,2 3.44,2.25c0.03,0.21 0.08,0.42 0.15,0.62L6.83,13.82zM13.76,18.78c-0.5,0.77 -1.65,1.22 -3.15,1.22c-0.79,0 -0.71,-0.86 -0.34,-1.11c1.22,-0.81 2,-2.06 2.25,-3.44c0.21,-0.03 0.42,-0.08 0.62,-0.15l0.68,1.88C14,17.58 14.14,18.18 13.76,18.78zM18.89,13.73c-0.81,-1.22 -2.06,-2 -3.44,-2.25c-0.03,-0.21 -0.08,-0.42 -0.15,-0.62l1.88,-0.68c0.4,-0.18 1.01,-0.32 1.61,0.06c0.77,0.5 1.22,1.65 1.22,3.15C20,14.19 19.14,14.11 18.89,13.73z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector>
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_music.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_music.xml
deleted file mode 100644
index 6339ebb3ea8d..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_music.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M22 5.5L22 24.8416667C20.9183333 24.2183333 19.6716667 23.8333333 18.3333333 23.8333333C14.2816667 23.8333333 11 27.115 11 31.1666667C11 35.2183333 14.2816667 38.5 18.3333333 38.5C22.385 38.5 25.6666667 35.2183333 25.6666667 31.1666667L25.6666667 12.8333333L33 12.8333333L33 5.5L22 5.5Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_navigation.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_navigation.xml
deleted file mode 100644
index e1fabe07cdeb..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_navigation.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M39.8016667 20.6983333L23.3016667 4.19833333C22.5866667 3.48333333 21.4316667 3.48333333 20.7166667 4.19833333L4.21666667 20.6983333C3.50166667 21.4133333 3.50166667 22.5683333 4.21666667 23.2833333L20.7166667 39.7833333C21.4316667 40.4983333 22.5866667 40.4983333 23.3016667 39.7833333L39.8016667 23.2833333C40.5166667 22.5866667 40.5166667 21.4316667 39.8016667 20.6983333ZM25.6666667 26.5833333L25.6666667 22L18.3333333 22L18.3333333 27.5L14.6666667 27.5L14.6666667 20.1666667C14.6666667 19.1583333 15.4916667 18.3333333 16.5 18.3333333L25.6666667 18.3333333L25.6666667 13.75L32.0833333 20.1666667L25.6666667 26.5833333Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_notification.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_notification.xml
deleted file mode 100644
index aabf9161c11f..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_notification.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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="@dimen/system_bar_icon_drawing_size"
- android:height="@dimen/system_bar_icon_drawing_size"
- android:viewportWidth="44"
- android:viewportHeight="44">
- <path
- android:pathData="M22 39.125C23.925 39.125 25.5 37.55 25.5 35.625L18.5 35.625C18.5 37.55 20.0575 39.125 22 39.125ZM32.5 28.625L32.5 19.875C32.5 14.5025 29.63 10.005 24.625 8.815L24.625 7.625C24.625 6.1725 23.4525 5 22 5C20.5475 5 19.375 6.1725 19.375 7.625L19.375 8.815C14.3525 10.005 11.5 14.485 11.5 19.875L11.5 28.625L8 32.125L8 33.875L36 33.875L36 32.125L32.5 28.625Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_overview.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_overview.xml
deleted file mode 100644
index f185eb9afb75..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_overview.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M36.92857 22.39286A14.53571 14.53571 0 0 1 7.857143 22.39286A14.53571 14.53571 0 0 1 36.92857 22.39286Z"
- android:strokeColor="@color/car_nav_icon_fill_color"
- android:strokeWidth="4" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_phone.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_phone.xml
deleted file mode 100644
index 50e36b5a6e3c..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/car_ic_phone.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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:viewportWidth="44"
- android:viewportHeight="44"
- android:width="44dp"
- android:height="44dp">
- <path
- android:pathData="M12.1366667 19.7816667C14.7766667 24.97 19.03 29.205 24.2183333 31.8633333L28.2516667 27.83C28.7466667 27.335 29.48 27.17 30.1216667 27.39C32.175 28.0683333 34.3933333 28.435 36.6666667 28.435C37.675 28.435 38.5 29.26 38.5 30.2683333L38.5 36.6666667C38.5 37.675 37.675 38.5 36.6666667 38.5C19.4516667 38.5 5.5 24.5483333 5.5 7.33333333C5.5 6.325 6.325 5.5 7.33333333 5.5L13.75 5.5C14.7583333 5.5 15.5833333 6.325 15.5833333 7.33333333C15.5833333 9.625 15.95 11.825 16.6283333 13.8783333C16.83 14.52 16.6833333 15.235 16.17 15.7483333L12.1366667 19.7816667Z"
- android:fillColor="@color/car_nav_icon_fill_color" />
-</vector> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/drawable/system_bar_background.xml b/packages/CarSystemUI/samples/sample3/rro/res/drawable/system_bar_background.xml
deleted file mode 100644
index 66da21ca23f8..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/drawable/system_bar_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
- <solid
- android:color="#404040"
- />
-</shape> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/layout/car_left_navigation_bar.xml b/packages/CarSystemUI/samples/sample3/rro/res/layout/car_left_navigation_bar.xml
deleted file mode 100644
index 3d1cd085e578..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/layout/car_left_navigation_bar.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2018, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:background="@android:color/transparent">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="bottom"
- android:orientation="vertical">
-
- <com.android.systemui.statusbar.policy.Clock
- android:id="@+id/clock"
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:singleLine="true"
- android:gravity="center_horizontal"
- android:paddingBottom="20dp"
- />
-
- <Space
- android:layout_height="50dp"
- android:layout_width="match_parent"/>
-
- </LinearLayout>
-
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/layout/car_navigation_bar.xml b/packages/CarSystemUI/samples/sample3/rro/res/layout/car_navigation_bar.xml
deleted file mode 100644
index 8314ba5600a9..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/layout/car_navigation_bar.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/system_bar_background"
- android:gravity="center"
- android:orientation="horizontal">
-
- <RelativeLayout
- android:id="@+id/nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layoutDirection="ltr">
-
- <com.android.systemui.car.hvac.AdjustableTemperatureView
- android:id="@+id/driver_hvac"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center_vertical"
- systemui:hvacAreaId="49"
- systemui:hvacTempFormat="%.0f\u00B0" />
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerInParent="true"
- android:layout_weight="1"
- android:gravity="center"
- android:layoutDirection="ltr"
- android:paddingEnd="@dimen/system_bar_button_group_padding"
- android:paddingStart="@dimen/system_bar_button_group_padding">
-
- <Space
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_home"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/phone_nav"
- style="@style/NavigationBarButton"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_phone"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
- systemui:packages="com.android.car.dialer"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/grid_nav"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_apps"
- systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/hvac"
- style="@style/NavigationBarButton"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_hvac"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- systemui:broadcast="true"/>
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/notifications"
- style="@style/NavigationBarButton"
- systemui:highlightWhenSelected="true"
- systemui:icon="@drawable/car_ic_notification"
- systemui:longIntent="intent:#Intent;component=com.android.car.bugreport/.BugReportActivity;end"/>
-
- <Space
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"/>
- </LinearLayout>
-
- <com.android.systemui.car.hvac.AdjustableTemperatureView
- android:id="@+id/passenger_hvac"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- android:gravity="center_vertical"
- systemui:hvacAreaId="68"
- systemui:hvacTempFormat="%.0f\u00B0" />
- </RelativeLayout>
-
- <LinearLayout
- android:id="@+id/lock_screen_nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:layoutDirection="ltr"
- android:paddingEnd="@dimen/car_keyline_1"
- android:paddingStart="@dimen/car_keyline_1"
- android:visibility="gone"
- />
-</com.android.systemui.car.navigationbar.CarNavigationBarView> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/values/attrs.xml b/packages/CarSystemUI/samples/sample3/rro/res/values/attrs.xml
deleted file mode 100644
index bc7ded20031a..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/values/attrs.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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>
- <attr name="broadcast" format="boolean"/>
- <attr name="icon" format="reference"/>
- <attr name="intent" format="string"/>
- <attr name="longIntent" format="string"/>
- <attr name="componentNames" format="string" />
- <attr name="highlightWhenSelected" format="boolean" />
- <attr name="categories" format="string"/>
- <attr name="packages" format="string" />
-
- <!-- Custom attributes to configure hvac values -->
- <declare-styleable name="AnimatedTemperatureView">
- <attr name="hvacAreaId" format="integer"/>
- <attr name="hvacPropertyId" format="integer"/>
- <attr name="hvacTempFormat" format="string"/>
- <!-- how far away the animations should center around -->
- <attr name="hvacPivotOffset" format="dimension"/>
- <attr name="hvacMinValue" format="float"/>
- <attr name="hvacMaxValue" format="float"/>
- <attr name="hvacMinText" format="string|reference"/>
- <attr name="hvacMaxText" format="string|reference"/>
- <attr name="android:gravity"/>
- <attr name="android:minEms"/>
- <attr name="android:textAppearance"/>
- </declare-styleable>
-</resources>
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/values/colors.xml b/packages/CarSystemUI/samples/sample3/rro/res/values/colors.xml
deleted file mode 100644
index f98cb96e76e8..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/values/colors.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <color name="car_nav_icon_fill_color">#8F8F8F</color>
-</resources>
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/values/config.xml b/packages/CarSystemUI/samples/sample3/rro/res/values/config.xml
deleted file mode 100644
index 2148e7cbfd96..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/values/config.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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>
- <!-- Configure which system bars should be displayed. -->
- <bool name="config_enableTopNavigationBar">false</bool>
- <bool name="config_enableLeftNavigationBar">true</bool>
- <bool name="config_enableRightNavigationBar">false</bool>
- <bool name="config_enableBottomNavigationBar">true</bool>
-
- <!-- Configure the type of each system bar. Each system bar must have a unique type. -->
- <!-- STATUS_BAR = 0-->
- <!-- NAVIGATION_BAR = 1-->
- <!-- STATUS_BAR_EXTRA = 2-->
- <!-- NAVIGATION_BAR_EXTRA = 3-->
- <integer name="config_topSystemBarType">2</integer>
- <integer name="config_leftSystemBarType">0</integer>
- <integer name="config_rightSystemBarType">3</integer>
- <integer name="config_bottomSystemBarType">1</integer>
-
- <!-- Configure the relative z-order among the system bars. When two system bars overlap (e.g.
- if both top bar and left bar are enabled, it creates an overlapping space in the upper left
- corner), the system bar with the higher z-order takes the overlapping space and padding is
- applied to the other bar.-->
- <!-- NOTE: If two overlapping system bars have the same z-order, SystemBarConfigs will throw a
- RuntimeException, since their placing order cannot be determined. Bars that do not overlap
- are allowed to have the same z-order. -->
- <!-- NOTE: If the z-order of a bar is 10 or above, it will also appear on top of HUN's. -->
- <integer name="config_topSystemBarZOrder">0</integer>
- <integer name="config_leftSystemBarZOrder">10</integer>
- <integer name="config_rightSystemBarZOrder">0</integer>
- <integer name="config_bottomSystemBarZOrder">15</integer>
-
- <!-- Whether heads-up notifications should be shown on the bottom. If false, heads-up
- notifications will be shown pushed to the top of their parent container. If true, they will
- be shown pushed to the bottom of their parent container. If true, then should override
- config_headsUpNotificationAnimationHelper to use a different AnimationHelper, such as
- com.android.car.notification.headsup.animationhelper.
- CarHeadsUpNotificationBottomAnimationHelper. -->
- <bool name="config_showHeadsUpNotificationOnBottom">false</bool>
-
- <string name="config_notificationPanelViewMediator" translatable="false">com.android.systemui.car.notification.BottomNotificationPanelViewMediator</string>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/values/dimens.xml b/packages/CarSystemUI/samples/sample3/rro/res/values/dimens.xml
deleted file mode 100644
index c89f94938582..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/values/dimens.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-<resources>
- <dimen name="car_left_navigation_bar_width">280dp</dimen>
- <dimen name="car_keyline_1">24dp</dimen>
- <dimen name="system_bar_button_group_padding">64dp</dimen>
- <dimen name="system_bar_icon_drawing_size">44dp</dimen>
-</resources>
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/values/styles.xml b/packages/CarSystemUI/samples/sample3/rro/res/values/styles.xml
deleted file mode 100644
index bad36917d2cf..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/values/styles.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="TextAppearance.StatusBar.Clock"
- parent="@*android:style/TextAppearance.StatusBar.Icon">
- <item name="android:textSize">40sp</item>
- <item name="android:fontFamily">sans-serif-regular</item>
- <item name="android:textColor">#FFFFFF</item>
- </style>
-
- <style name="NavigationBarButton">
- <item name="android:layout_height">96dp</item>
- <item name="android:layout_width">96dp</item>
- <item name="android:background">?android:attr/selectableItemBackground</item>
- </style>
-</resources> \ No newline at end of file
diff --git a/packages/CarSystemUI/samples/sample3/rro/res/xml/car_sysui_overlays.xml b/packages/CarSystemUI/samples/sample3/rro/res/xml/car_sysui_overlays.xml
deleted file mode 100644
index f08d9684f2d5..000000000000
--- a/packages/CarSystemUI/samples/sample3/rro/res/xml/car_sysui_overlays.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<overlay>
- <item target="layout/car_navigation_bar" value="@layout/car_navigation_bar"/>
- <item target="layout/car_left_navigation_bar" value="@layout/car_left_navigation_bar"/>
-
- <item target="bool/config_enableTopNavigationBar" value="@bool/config_enableTopNavigationBar"/>
- <item target="bool/config_enableLeftNavigationBar" value="@bool/config_enableLeftNavigationBar"/>
- <item target="bool/config_enableRightNavigationBar" value="@bool/config_enableRightNavigationBar"/>
- <item target="bool/config_enableBottomNavigationBar" value="@bool/config_enableBottomNavigationBar"/>
- <item target="bool/config_showHeadsUpNotificationOnBottom" value="@bool/config_showHeadsUpNotificationOnBottom"/>
-
- <item target="attr/icon" value="@attr/icon"/>
- <item target="attr/intent" value="@attr/intent"/>
- <item target="attr/longIntent" value="@attr/longIntent"/>
- <item target="attr/componentNames" value="@attr/componentNames"/>
- <item target="attr/highlightWhenSelected" value="@attr/highlightWhenSelected"/>
- <item target="attr/categories" value="@attr/categories"/>
- <item target="attr/packages" value="@attr/packages"/>
- <item target="attr/hvacAreaId" value="@attr/hvacAreaId"/>
- <item target="attr/hvacPropertyId" value="@attr/hvacPropertyId"/>
- <item target="attr/hvacTempFormat" value="@attr/hvacTempFormat"/>
- <item target="attr/hvacPivotOffset" value="@attr/hvacPivotOffset"/>
- <item target="attr/hvacMinValue" value="@attr/hvacMinValue"/>
- <item target="attr/hvacMaxValue" value="@attr/hvacMaxValue"/>
- <item target="attr/hvacMinText" value="@attr/hvacMinText"/>
- <item target="attr/hvacMaxText" value="@attr/hvacMaxText"/>
- <!-- start the intent as a broad cast instead of an activity if true-->
- <item target="attr/broadcast" value="@attr/broadcast"/>
-
- <item target="color/car_nav_icon_fill_color" value="@color/car_nav_icon_fill_color" />
-
- <item target="drawable/car_ic_overview" value="@drawable/car_ic_overview" />
- <item target="drawable/car_ic_home" value="@drawable/car_ic_home" />
- <item target="drawable/car_ic_hvac" value="@drawable/car_ic_hvac" />
- <item target="drawable/car_ic_apps" value="@drawable/car_ic_apps" />
- <item target="drawable/car_ic_music" value="@drawable/car_ic_music" />
- <item target="drawable/car_ic_notification" value="@drawable/car_ic_notification" />
- <item target="drawable/car_ic_phone" value="@drawable/car_ic_phone" />
- <item target="drawable/car_ic_navigation" value="@drawable/car_ic_navigation" />
-
- <item target="dimen/car_left_navigation_bar_width" value="@dimen/car_left_navigation_bar_width" />
- <item target="dimen/car_keyline_1" value="@dimen/car_keyline_1" />
- <item target="dimen/system_bar_button_group_padding" value="@dimen/system_bar_button_group_padding" />
- <item target="dimen/system_bar_icon_drawing_size" value="@dimen/system_bar_icon_drawing_size" />
-
- <item target="integer/config_topSystemBarType" value="@integer/config_topSystemBarType"/>
- <item target="integer/config_leftSystemBarType" value="@integer/config_leftSystemBarType"/>
- <item target="integer/config_rightSystemBarType" value="@integer/config_rightSystemBarType"/>
- <item target="integer/config_bottomSystemBarType" value="@integer/config_bottomSystemBarType"/>
-
- <item target="integer/config_topSystemBarZOrder" value="@integer/config_topSystemBarZOrder"/>
- <item target="integer/config_leftSystemBarZOrder" value="@integer/config_leftSystemBarZOrder"/>
- <item target="integer/config_rightSystemBarZOrder" value="@integer/config_rightSystemBarZOrder"/>
- <item target="integer/config_bottomSystemBarZOrder" value="@integer/config_bottomSystemBarZOrder"/>
-
- <item target="string/config_notificationPanelViewMediator" value="@string/config_notificationPanelViewMediator"/>
-
- <item target="style/NavigationBarButton" value="@style/NavigationBarButton"/>
-</overlay> \ No newline at end of file
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java
deleted file mode 100644
index d84b2f958feb..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2019 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;
-
-import com.android.systemui.dagger.DefaultActivityBinder;
-import com.android.systemui.dagger.DefaultBroadcastReceiverBinder;
-import com.android.systemui.dagger.DefaultServiceBinder;
-
-import dagger.Module;
-
-/**
- * Supply Activities, Services, and SystemUI Objects for CarSystemUI.
- */
-@Module(includes = {
- DefaultActivityBinder.class,
- DefaultBroadcastReceiverBinder.class,
- DefaultServiceBinder.class})
-public class CarComponentBinder {
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarGlobalRootComponent.java b/packages/CarSystemUI/src/com/android/systemui/CarGlobalRootComponent.java
deleted file mode 100644
index b056dcf8fd2b..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/CarGlobalRootComponent.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2019 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;
-
-import com.android.systemui.dagger.GlobalModule;
-import com.android.systemui.dagger.GlobalRootComponent;
-import com.android.systemui.dagger.WMModule;
-import com.android.systemui.wmshell.CarWMComponent;
-
-import javax.inject.Singleton;
-
-import dagger.Component;
-
-/** Car subclass for GlobalRootComponent. */
-@Singleton
-@Component(
- modules = {
- GlobalModule.class,
- CarSysUIComponentModule.class,
- WMModule.class
- })
-public interface CarGlobalRootComponent extends GlobalRootComponent {
- /**
- * Builder for a CarGlobalRootComponent.
- */
- @Component.Builder
- interface Builder extends GlobalRootComponent.Builder {
- CarGlobalRootComponent build();
- }
-
- /**
- * Builder for a WMComponent.
- */
- @Override
- CarWMComponent.Builder getWMComponentBuilder();
-
- @Override
- CarSysUIComponent.Builder getSysUIComponent();
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSysUIComponent.java b/packages/CarSystemUI/src/com/android/systemui/CarSysUIComponent.java
deleted file mode 100644
index 51855dc648e9..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/CarSysUIComponent.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2019 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;
-
-import com.android.systemui.dagger.DependencyProvider;
-import com.android.systemui.dagger.SysUIComponent;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.SystemUIModule;
-
-import dagger.Subcomponent;
-
-/**
- * Dagger Subcomponent for Core SysUI.
- */
-@SysUISingleton
-@Subcomponent(modules = {
- CarComponentBinder.class,
- DependencyProvider.class,
- SystemUIModule.class,
- CarSystemUIModule.class,
- CarSystemUIBinder.class})
-public interface CarSysUIComponent extends SysUIComponent {
-
- /**
- * Builder for a CarSysUIComponent.
- */
- @Subcomponent.Builder
- interface Builder extends SysUIComponent.Builder {
- CarSysUIComponent build();
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSysUIComponentModule.java b/packages/CarSystemUI/src/com/android/systemui/CarSysUIComponentModule.java
deleted file mode 100644
index 4de316693c10..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/CarSysUIComponentModule.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2020 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;
-
-import dagger.Module;
-
-/**
- * Dagger module for including the CarSysUIComponent.
- *
- * TODO(b/162923491): Remove or otherwise refactor this module. This is a stop gap.
- */
-@Module(subcomponents = {CarSysUIComponent.class})
-public abstract class CarSysUIComponentModule {
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
deleted file mode 100644
index ec1240fac5ae..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (C) 2019 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;
-
-import com.android.systemui.biometrics.AuthController;
-import com.android.systemui.car.navigationbar.CarNavigationBar;
-import com.android.systemui.car.notification.CarNotificationModule;
-import com.android.systemui.car.sideloaded.SideLoadedAppController;
-import com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier;
-import com.android.systemui.car.volume.VolumeUI;
-import com.android.systemui.car.window.OverlayWindowModule;
-import com.android.systemui.car.window.SystemUIOverlayWindowManager;
-import com.android.systemui.globalactions.GlobalActionsComponent;
-import com.android.systemui.keyguard.KeyguardViewMediator;
-import com.android.systemui.keyguard.dagger.KeyguardModule;
-import com.android.systemui.power.PowerUI;
-import com.android.systemui.recents.Recents;
-import com.android.systemui.recents.RecentsModule;
-import com.android.systemui.shortcut.ShortcutKeyDispatcher;
-import com.android.systemui.statusbar.dagger.StatusBarModule;
-import com.android.systemui.statusbar.notification.InstantAppNotifier;
-import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
-import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.theme.ThemeOverlayController;
-import com.android.systemui.toast.ToastUI;
-import com.android.systemui.util.leak.GarbageMonitor;
-import com.android.systemui.wmshell.WMShell;
-
-import dagger.Binds;
-import dagger.Module;
-import dagger.multibindings.ClassKey;
-import dagger.multibindings.IntoMap;
-
-/** Binder for car specific {@link SystemUI} modules. */
-@Module(includes = {RecentsModule.class, StatusBarModule.class, NotificationsModule.class,
- KeyguardModule.class, OverlayWindowModule.class, CarNotificationModule.class})
-public abstract class CarSystemUIBinder {
- /** Inject into AuthController. */
- @Binds
- @IntoMap
- @ClassKey(AuthController.class)
- public abstract SystemUI bindAuthController(AuthController sysui);
-
- /** Inject Car Navigation Bar. */
- @Binds
- @IntoMap
- @ClassKey(CarNavigationBar.class)
- public abstract SystemUI bindCarNavigationBar(CarNavigationBar sysui);
-
- /** Inject into GarbageMonitor.Service. */
- @Binds
- @IntoMap
- @ClassKey(GarbageMonitor.Service.class)
- public abstract SystemUI bindGarbageMonitorService(GarbageMonitor.Service sysui);
-
- /** Inject into GlobalActionsComponent. */
- @Binds
- @IntoMap
- @ClassKey(GlobalActionsComponent.class)
- public abstract SystemUI bindGlobalActionsComponent(GlobalActionsComponent sysui);
-
- /** Inject into InstantAppNotifier. */
- @Binds
- @IntoMap
- @ClassKey(InstantAppNotifier.class)
- public abstract SystemUI bindInstantAppNotifier(InstantAppNotifier sysui);
-
- /** Inject into KeyguardViewMediator. */
- @Binds
- @IntoMap
- @ClassKey(KeyguardViewMediator.class)
- public abstract SystemUI bindKeyguardViewMediator(KeyguardViewMediator sysui);
-
- /** Inject into LatencyTests. */
- @Binds
- @IntoMap
- @ClassKey(LatencyTester.class)
- public abstract SystemUI bindLatencyTester(LatencyTester sysui);
-
- /** Inject into PowerUI. */
- @Binds
- @IntoMap
- @ClassKey(PowerUI.class)
- public abstract SystemUI bindPowerUI(PowerUI sysui);
-
- /** Inject into Recents. */
- @Binds
- @IntoMap
- @ClassKey(Recents.class)
- public abstract SystemUI bindRecents(Recents sysui);
-
- /** Inject into ScreenDecorations. */
- @Binds
- @IntoMap
- @ClassKey(ScreenDecorations.class)
- public abstract SystemUI bindScreenDecorations(ScreenDecorations sysui);
-
- /** Inject into ShortcutKeyDispatcher. */
- @Binds
- @IntoMap
- @ClassKey(ShortcutKeyDispatcher.class)
- public abstract SystemUI bindsShortcutKeyDispatcher(ShortcutKeyDispatcher sysui);
-
- /** Inject into SizeCompatModeActivityController. */
- @Binds
- @IntoMap
- @ClassKey(SizeCompatModeActivityController.class)
- public abstract SystemUI bindsSizeCompatModeActivityController(
- SizeCompatModeActivityController sysui);
-
- /** Inject into SliceBroadcastRelayHandler. */
- @Binds
- @IntoMap
- @ClassKey(SliceBroadcastRelayHandler.class)
- public abstract SystemUI bindSliceBroadcastRelayHandler(SliceBroadcastRelayHandler sysui);
-
- /** Inject into ThemeOverlayController. */
- @Binds
- @IntoMap
- @ClassKey(ThemeOverlayController.class)
- public abstract SystemUI bindThemeOverlayController(ThemeOverlayController sysui);
-
- /** Inject into StatusBar. */
- @Binds
- @IntoMap
- @ClassKey(StatusBar.class)
- public abstract SystemUI bindsStatusBar(StatusBar sysui);
-
- /** Inject into VolumeUI. */
- @Binds
- @IntoMap
- @ClassKey(VolumeUI.class)
- public abstract SystemUI bindVolumeUI(VolumeUI sysui);
-
- /** Inject into ToastUI. */
- @Binds
- @IntoMap
- @ClassKey(ToastUI.class)
- public abstract SystemUI bindToastUI(ToastUI service);
-
- /** Inject into ConnectedDeviceVoiceRecognitionNotifier. */
- @Binds
- @IntoMap
- @ClassKey(ConnectedDeviceVoiceRecognitionNotifier.class)
- public abstract SystemUI bindConnectedDeviceVoiceRecognitionNotifier(
- ConnectedDeviceVoiceRecognitionNotifier sysui);
-
- /** Inject into SystemUIOverlayWindowManager. */
- @Binds
- @IntoMap
- @ClassKey(SystemUIOverlayWindowManager.class)
- public abstract SystemUI bindSystemUIPrimaryWindowManager(SystemUIOverlayWindowManager sysui);
-
- /** Inject into SideLoadedAppController. */
- @Binds
- @IntoMap
- @ClassKey(SideLoadedAppController.class)
- public abstract SystemUI bindSideLoadedAppController(SideLoadedAppController sysui);
-
- /** Inject into WMShell. */
- @Binds
- @IntoMap
- @ClassKey(WMShell.class)
- public abstract SystemUI bindWMShell(WMShell sysui);
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIFactory.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIFactory.java
deleted file mode 100644
index a65edc5477df..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui;
-
-import android.content.Context;
-import android.content.res.Resources;
-
-import com.android.systemui.dagger.GlobalRootComponent;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Class factory to provide car specific SystemUI components.
- */
-public class CarSystemUIFactory extends SystemUIFactory {
-
- @Override
- protected GlobalRootComponent buildGlobalRootComponent(Context context) {
- return DaggerCarGlobalRootComponent.builder()
- .context(context)
- .build();
- }
-
- @Override
- public String[] getSystemUIServiceComponents(Resources resources) {
- Set<String> names = new HashSet<>();
-
- for (String s : super.getSystemUIServiceComponents(resources)) {
- names.add(s);
- }
-
- for (String s : resources.getStringArray(R.array.config_systemUIServiceComponentsExclude)) {
- names.remove(s);
- }
-
- for (String s : resources.getStringArray(R.array.config_systemUIServiceComponentsInclude)) {
- names.add(s);
- }
-
- String[] finalNames = new String[names.size()];
- names.toArray(finalNames);
-
- return finalNames;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
deleted file mode 100644
index 1d35bbb84464..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (C) 2019 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;
-
-import static com.android.systemui.Dependency.ALLOW_NOTIFICATION_LONG_PRESS_NAME;
-import static com.android.systemui.Dependency.LEAK_REPORT_EMAIL_NAME;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.PowerManager;
-
-import com.android.keyguard.KeyguardViewController;
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarDeviceProvisionedControllerImpl;
-import com.android.systemui.car.keyguard.CarKeyguardViewController;
-import com.android.systemui.car.notification.NotificationShadeWindowControllerImpl;
-import com.android.systemui.car.statusbar.DozeServiceHost;
-import com.android.systemui.car.volume.CarVolumeDialogComponent;
-import com.android.systemui.dagger.GlobalRootComponent;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Background;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.demomode.DemoModeController;
-import com.android.systemui.dock.DockManager;
-import com.android.systemui.dock.DockManagerImpl;
-import com.android.systemui.doze.DozeHost;
-import com.android.systemui.plugins.qs.QSFactory;
-import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.power.EnhancedEstimates;
-import com.android.systemui.power.EnhancedEstimatesImpl;
-import com.android.systemui.qs.dagger.QSModule;
-import com.android.systemui.qs.tileimpl.QSFactoryImpl;
-import com.android.systemui.recents.Recents;
-import com.android.systemui.recents.RecentsImplementation;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.NotificationLockscreenUserManager;
-import com.android.systemui.statusbar.NotificationLockscreenUserManagerImpl;
-import com.android.systemui.statusbar.NotificationShadeWindowController;
-import com.android.systemui.statusbar.notification.NotificationEntryManager;
-import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager;
-import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
-import com.android.systemui.statusbar.phone.KeyguardBypassController;
-import com.android.systemui.statusbar.phone.KeyguardEnvironmentImpl;
-import com.android.systemui.statusbar.phone.ShadeController;
-import com.android.systemui.statusbar.phone.ShadeControllerImpl;
-import com.android.systemui.statusbar.policy.BatteryController;
-import com.android.systemui.statusbar.policy.BatteryControllerImpl;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-import com.android.systemui.statusbar.policy.DeviceProvisionedController;
-import com.android.systemui.statusbar.policy.HeadsUpManager;
-import com.android.systemui.volume.VolumeDialogComponent;
-
-import javax.inject.Named;
-
-import dagger.Binds;
-import dagger.Module;
-import dagger.Provides;
-
-@Module(
- includes = {
- QSModule.class
- })
-abstract class CarSystemUIModule {
-
- @SysUISingleton
- @Provides
- @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME)
- static boolean provideAllowNotificationLongPress() {
- return false;
- }
-
- @SysUISingleton
- @Provides
- static HeadsUpManagerPhone provideHeadsUpManagerPhone(
- Context context,
- StatusBarStateController statusBarStateController,
- KeyguardBypassController bypassController,
- GroupMembershipManager groupManager,
- ConfigurationController configurationController) {
- return new HeadsUpManagerPhone(context, statusBarStateController, bypassController,
- groupManager, configurationController);
- }
-
- @SysUISingleton
- @Provides
- @Named(LEAK_REPORT_EMAIL_NAME)
- static String provideLeakReportEmail() {
- return "buganizer-system+181579@google.com";
- }
-
- @Provides
- @SysUISingleton
- static Recents provideRecents(Context context, RecentsImplementation recentsImplementation,
- CommandQueue commandQueue) {
- return new Recents(context, recentsImplementation, commandQueue);
- }
-
- @Binds
- abstract HeadsUpManager bindHeadsUpManagerPhone(HeadsUpManagerPhone headsUpManagerPhone);
-
- @Binds
- abstract EnhancedEstimates bindEnhancedEstimates(EnhancedEstimatesImpl enhancedEstimates);
-
- @Binds
- abstract NotificationLockscreenUserManager bindNotificationLockscreenUserManager(
- NotificationLockscreenUserManagerImpl notificationLockscreenUserManager);
-
- @Provides
- @SysUISingleton
- static BatteryController provideBatteryController(Context context,
- EnhancedEstimates enhancedEstimates, PowerManager powerManager,
- BroadcastDispatcher broadcastDispatcher, DemoModeController demoModeController,
- @Main Handler mainHandler,
- @Background Handler bgHandler) {
- BatteryController bC = new BatteryControllerImpl(context, enhancedEstimates, powerManager,
- broadcastDispatcher, demoModeController, mainHandler, bgHandler);
- bC.init();
- return bC;
- }
-
- @Binds
- @SysUISingleton
- public abstract QSFactory bindQSFactory(QSFactoryImpl qsFactoryImpl);
-
- @Binds
- abstract DockManager bindDockManager(DockManagerImpl dockManager);
-
- @Binds
- abstract NotificationEntryManager.KeyguardEnvironment bindKeyguardEnvironment(
- KeyguardEnvironmentImpl keyguardEnvironment);
-
- @Binds
- abstract ShadeController provideShadeController(ShadeControllerImpl shadeController);
-
- @Binds
- abstract GlobalRootComponent bindGlobalRootComponent(
- CarGlobalRootComponent globalRootComponent);
-
- @Binds
- abstract VolumeDialogComponent bindVolumeDialogComponent(
- CarVolumeDialogComponent carVolumeDialogComponent);
-
- @Binds
- abstract KeyguardViewController bindKeyguardViewController(
- CarKeyguardViewController carKeyguardViewController);
-
- @Binds
- abstract NotificationShadeWindowController bindNotificationShadeController(
- NotificationShadeWindowControllerImpl notificationPanelViewController);
-
- @Binds
- abstract DeviceProvisionedController bindDeviceProvisionedController(
- CarDeviceProvisionedControllerImpl deviceProvisionedController);
-
- @Binds
- abstract CarDeviceProvisionedController bindCarDeviceProvisionedController(
- CarDeviceProvisionedControllerImpl deviceProvisionedController);
-
- @Binds
- abstract DozeHost bindDozeHost(DozeServiceHost dozeServiceHost);
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedController.java b/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedController.java
deleted file mode 100644
index 44e43fe9af8c..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedController.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2019 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.car;
-
-import com.android.systemui.statusbar.policy.DeviceProvisionedController;
-
-/**
- * This interface defines controller that monitors the status of SUW progress for each user in
- * addition to the functionality defined by {@link DeviceProvisionedController}.
- */
-public interface CarDeviceProvisionedController extends DeviceProvisionedController {
- /**
- * Returns {@code true} when SUW is in progress for the given user.
- */
- boolean isUserSetupInProgress(int user);
-
- /**
- * Returns {@code true} when SUW is in progress for the current user.
- */
- default boolean isCurrentUserSetupInProgress() {
- return isUserSetupInProgress(getCurrentUser());
- }
-
- /**
- * Returns {@code true} when the user is setup and not currently in SUW.
- */
- default boolean isCurrentUserFullySetup() {
- return isCurrentUserSetup() && !isCurrentUserSetupInProgress();
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedControllerImpl.java b/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedControllerImpl.java
deleted file mode 100644
index fef032414bb9..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedControllerImpl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2019 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.car;
-
-import android.annotation.NonNull;
-import android.app.ActivityManager;
-import android.car.settings.CarSettings;
-import android.database.ContentObserver;
-import android.net.Uri;
-import android.os.Handler;
-
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.statusbar.policy.DeviceProvisionedControllerImpl;
-import com.android.systemui.util.settings.GlobalSettings;
-import com.android.systemui.util.settings.SecureSettings;
-
-import javax.inject.Inject;
-
-/**
- * A controller that monitors the status of SUW progress for each user in addition to the
- * functionality provided by {@link DeviceProvisionedControllerImpl}.
- */
-@SysUISingleton
-public class CarDeviceProvisionedControllerImpl extends DeviceProvisionedControllerImpl implements
- CarDeviceProvisionedController {
- private final Uri mUserSetupInProgressUri;
- private final ContentObserver mCarSettingsObserver;
- private final Handler mMainHandler;
- private final SecureSettings mSecureSettings;
-
- @Inject
- public CarDeviceProvisionedControllerImpl(@Main Handler mainHandler,
- BroadcastDispatcher broadcastDispatcher, GlobalSettings globalSetting,
- SecureSettings secureSettings) {
- super(mainHandler, broadcastDispatcher, globalSetting, secureSettings);
- mMainHandler = mainHandler;
- mSecureSettings = secureSettings;
- mUserSetupInProgressUri = mSecureSettings.getUriFor(
- CarSettings.Secure.KEY_SETUP_WIZARD_IN_PROGRESS);
- mCarSettingsObserver = new ContentObserver(mMainHandler) {
- @Override
- public void onChange(boolean selfChange, Uri uri, int flags) {
- if (mUserSetupInProgressUri.equals(uri)) {
- notifyUserSetupInProgressChanged();
- }
- }
- };
- }
-
- @Override
- public boolean isUserSetupInProgress(int user) {
- return mSecureSettings.getIntForUser(
- CarSettings.Secure.KEY_SETUP_WIZARD_IN_PROGRESS, /* def= */ 0, user) != 0;
- }
-
- @Override
- public boolean isCurrentUserSetupInProgress() {
- return isUserSetupInProgress(ActivityManager.getCurrentUser());
- }
-
- @Override
- public void addCallback(@NonNull DeviceProvisionedListener listener) {
- super.addCallback(listener);
- if (listener instanceof CarDeviceProvisionedListener) {
- ((CarDeviceProvisionedListener) listener).onUserSetupInProgressChanged();
- }
- }
-
- @Override
- protected void startListening(int user) {
- mSecureSettings.registerContentObserverForUser(
- mUserSetupInProgressUri, /* notifyForDescendants= */ true,
- mCarSettingsObserver, user);
- // The SUW Flag observer is registered before super.startListening() so that the observer is
- // in place before DeviceProvisionedController starts to track user switches which avoids
- // an edge case where our observer gets registered twice.
- super.startListening(user);
- }
-
- @Override
- protected void stopListening() {
- super.stopListening();
- mSecureSettings.unregisterContentObserver(mCarSettingsObserver);
- }
-
- @Override
- public void onUserSwitched(int newUserId) {
- super.onUserSwitched(newUserId);
- mSecureSettings.unregisterContentObserver(mCarSettingsObserver);
- mSecureSettings.registerContentObserverForUser(
- mUserSetupInProgressUri, /* notifyForDescendants= */ true,
- mCarSettingsObserver, newUserId);
- }
-
- private void notifyUserSetupInProgressChanged() {
- for (int i = mListeners.size() - 1; i >= 0; --i) {
- DeviceProvisionedListener listener = mListeners.get(i);
- if (listener instanceof CarDeviceProvisionedListener) {
- ((CarDeviceProvisionedListener) listener).onUserSetupInProgressChanged();
- }
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedListener.java b/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedListener.java
deleted file mode 100644
index 008632223f3f..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/CarDeviceProvisionedListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2019 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.car;
-
-import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
-
-/**
- * A listener that listens for changes in SUW progress for a user in addition to the
- * functionality defined by {@link DeviceProvisionedListener}.
- */
-public interface CarDeviceProvisionedListener extends DeviceProvisionedListener {
- @Override
- default void onUserSwitched() {
- onUserSetupChanged();
- onUserSetupInProgressChanged();
- }
- /**
- * A callback for when a change occurs in SUW progress for a user.
- */
- default void onUserSetupInProgressChanged() {
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/CarServiceProvider.java b/packages/CarSystemUI/src/com/android/systemui/car/CarServiceProvider.java
deleted file mode 100644
index 5778d660a672..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/CarServiceProvider.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2019 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.car;
-
-import android.car.Car;
-import android.content.Context;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.systemui.dagger.SysUISingleton;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.inject.Inject;
-
-/** Provides a common connection to the car service that can be shared. */
-@SysUISingleton
-public class CarServiceProvider {
-
- private final Context mContext;
- private final List<CarServiceOnConnectedListener> mListeners = new ArrayList<>();
- private Car mCar;
-
- @Inject
- public CarServiceProvider(Context context) {
- mContext = context;
- mCar = Car.createCar(mContext, /* handler= */ null, Car.CAR_WAIT_TIMEOUT_DO_NOT_WAIT,
- (car, ready) -> {
- mCar = car;
-
- synchronized (mListeners) {
- for (CarServiceOnConnectedListener listener : mListeners) {
- if (ready) {
- listener.onConnected(mCar);
- }
- }
- }
- });
- }
-
- @VisibleForTesting
- public CarServiceProvider(Context context, Car car) {
- mContext = context;
- mCar = car;
- }
-
- /**
- * Let's other components hook into the connection to the car service. If we're already
- * connected to the car service, the callback is immediately triggered.
- */
- public void addListener(CarServiceOnConnectedListener listener) {
- if (mCar.isConnected()) {
- listener.onConnected(mCar);
- }
- mListeners.add(listener);
- }
-
- /**
- * Listener which is triggered when Car Service is connected.
- */
- public interface CarServiceOnConnectedListener {
- /** This will be called when the car service has successfully been connected. */
- void onConnected(Car car);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/CarSystemUiTest.java b/packages/CarSystemUI/src/com/android/systemui/car/CarSystemUiTest.java
deleted file mode 100644
index 5f593b06c511..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/CarSystemUiTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2020 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.car;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotates that a test class should be run as part of CarSystemUI presubmit
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Documented
-public @interface CarSystemUiTest {
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/bluetooth/CarBatteryController.java b/packages/CarSystemUI/src/com/android/systemui/car/bluetooth/CarBatteryController.java
deleted file mode 100644
index 9b5e2712a527..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/bluetooth/CarBatteryController.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.bluetooth;
-
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothHeadsetClient;
-import android.bluetooth.BluetoothProfile;
-import android.bluetooth.BluetoothProfile.ServiceListener;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.util.Log;
-
-import com.android.systemui.statusbar.policy.BatteryController;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-
-/**
- * A {@link BatteryController} that is specific to the Auto use-case. For Auto, the battery icon
- * displays the battery status of a device that is connected via bluetooth and not the system's
- * battery.
- */
-public class CarBatteryController extends BroadcastReceiver implements BatteryController {
- private static final String TAG = "CarBatteryController";
-
- // According to the Bluetooth HFP 1.5 specification, battery levels are indicated by a
- // value from 1-5, where these values represent the following:
- // 0%% - 0, 1-25%% - 1, 26-50%% - 2, 51-75%% - 3, 76-99%% - 4, 100%% - 5
- // As a result, set the level as the average within that range.
- private static final int BATTERY_LEVEL_EMPTY = 0;
- private static final int BATTERY_LEVEL_1 = 12;
- private static final int BATTERY_LEVEL_2 = 28;
- private static final int BATTERY_LEVEL_3 = 63;
- private static final int BATTERY_LEVEL_4 = 87;
- private static final int BATTERY_LEVEL_FULL = 100;
-
- private static final int INVALID_BATTERY_LEVEL = -1;
-
- private final Context mContext;
-
- private final BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter();
- private final ArrayList<BatteryStateChangeCallback> mChangeCallbacks = new ArrayList<>();
- private BluetoothHeadsetClient mBluetoothHeadsetClient;
- private final ServiceListener mHfpServiceListener = new ServiceListener() {
- @Override
- public void onServiceConnected(int profile, BluetoothProfile proxy) {
- if (profile == BluetoothProfile.HEADSET_CLIENT) {
- mBluetoothHeadsetClient = (BluetoothHeadsetClient) proxy;
- }
- }
-
- @Override
- public void onServiceDisconnected(int profile) {
- if (profile == BluetoothProfile.HEADSET_CLIENT) {
- mBluetoothHeadsetClient = null;
- }
- }
- };
- private int mLevel;
- private BatteryViewHandler mBatteryViewHandler;
-
- public CarBatteryController(Context context) {
- mContext = context;
-
- if (mAdapter == null) {
- return;
- }
-
- mAdapter.getProfileProxy(context.getApplicationContext(), mHfpServiceListener,
- BluetoothProfile.HEADSET_CLIENT);
- }
-
- @Override
- public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- pw.println("CarBatteryController state:");
- pw.print(" mLevel=");
- pw.println(mLevel);
- }
-
- @Override
- public void setPowerSaveMode(boolean powerSave) {
- // No-op. No power save mode for the car.
- }
-
- @Override
- public void addCallback(BatteryController.BatteryStateChangeCallback cb) {
- mChangeCallbacks.add(cb);
-
- // There is no way to know if the phone is plugged in or charging via bluetooth, so pass
- // false for these values.
- cb.onBatteryLevelChanged(mLevel, false /* pluggedIn */, false /* charging */);
- cb.onPowerSaveChanged(false /* isPowerSave */);
- }
-
- @Override
- public void removeCallback(BatteryController.BatteryStateChangeCallback cb) {
- mChangeCallbacks.remove(cb);
- }
-
- /** Sets {@link BatteryViewHandler}. */
- public void addBatteryViewHandler(BatteryViewHandler batteryViewHandler) {
- mBatteryViewHandler = batteryViewHandler;
- }
-
- /** Starts listening for bluetooth broadcast messages. */
- public void startListening() {
- IntentFilter filter = new IntentFilter();
- filter.addAction(BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED);
- filter.addAction(BluetoothHeadsetClient.ACTION_AG_EVENT);
- mContext.registerReceiver(this, filter);
- }
-
- /** Stops listening for bluetooth broadcast messages. */
- public void stopListening() {
- mContext.unregisterReceiver(this);
- }
-
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
-
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "onReceive(). action: " + action);
- }
-
- if (BluetoothHeadsetClient.ACTION_AG_EVENT.equals(action)) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Received ACTION_AG_EVENT");
- }
-
- int batteryLevel = intent.getIntExtra(BluetoothHeadsetClient.EXTRA_BATTERY_LEVEL,
- INVALID_BATTERY_LEVEL);
-
- updateBatteryLevel(batteryLevel);
-
- if (batteryLevel != INVALID_BATTERY_LEVEL && mBatteryViewHandler != null) {
- mBatteryViewHandler.showBatteryView();
- }
- } else if (BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED.equals(action)) {
- int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1);
-
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- int oldState = intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, -1);
- Log.d(TAG, "ACTION_CONNECTION_STATE_CHANGED event: "
- + oldState + " -> " + newState);
-
- }
- BluetoothDevice device =
- (BluetoothDevice) intent.getExtra(BluetoothDevice.EXTRA_DEVICE);
- updateBatteryIcon(device, newState);
- }
- }
-
- /**
- * Converts the battery level to a percentage that can be displayed on-screen and notifies
- * any {@link BatteryStateChangeCallback}s of this.
- */
- private void updateBatteryLevel(int batteryLevel) {
- if (batteryLevel == INVALID_BATTERY_LEVEL) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Battery level invalid. Ignoring.");
- }
- return;
- }
-
- // The battery level is a value between 0-5. Let the default battery level be 0.
- switch (batteryLevel) {
- case 5:
- mLevel = BATTERY_LEVEL_FULL;
- break;
- case 4:
- mLevel = BATTERY_LEVEL_4;
- break;
- case 3:
- mLevel = BATTERY_LEVEL_3;
- break;
- case 2:
- mLevel = BATTERY_LEVEL_2;
- break;
- case 1:
- mLevel = BATTERY_LEVEL_1;
- break;
- case 0:
- default:
- mLevel = BATTERY_LEVEL_EMPTY;
- }
-
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Battery level: " + batteryLevel + "; setting mLevel as: " + mLevel);
- }
-
- notifyBatteryLevelChanged();
- }
-
- /**
- * Updates the display of the battery icon depending on the given connection state from the
- * given {@link BluetoothDevice}.
- */
- private void updateBatteryIcon(BluetoothDevice device, int newState) {
- if (newState == BluetoothProfile.STATE_CONNECTED) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Device connected");
- }
-
- if (mBatteryViewHandler != null) {
- mBatteryViewHandler.showBatteryView();
- }
-
- if (mBluetoothHeadsetClient == null || device == null) {
- return;
- }
-
- // Check if battery information is available and immediately update.
- Bundle featuresBundle = mBluetoothHeadsetClient.getCurrentAgEvents(device);
- if (featuresBundle == null) {
- return;
- }
-
- int batteryLevel = featuresBundle.getInt(BluetoothHeadsetClient.EXTRA_BATTERY_LEVEL,
- INVALID_BATTERY_LEVEL);
- updateBatteryLevel(batteryLevel);
- } else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Device disconnected");
- }
-
- if (mBatteryViewHandler != null) {
- mBatteryViewHandler.hideBatteryView();
- }
- }
- }
-
- @Override
- public void dispatchDemoCommand(String command, Bundle args) {
- // TODO: Car demo mode.
- }
-
- @Override
- public boolean isPluggedIn() {
- return true;
- }
-
- @Override
- public boolean isPowerSave() {
- // Power save is not valid for the car, so always return false.
- return false;
- }
-
- @Override
- public boolean isAodPowerSave() {
- return false;
- }
-
- private void notifyBatteryLevelChanged() {
- for (int i = 0, size = mChangeCallbacks.size(); i < size; i++) {
- mChangeCallbacks.get(i)
- .onBatteryLevelChanged(mLevel, false /* pluggedIn */, false /* charging */);
- }
- }
-
- /**
- * An interface indicating the container of a View that will display what the information
- * in the {@link CarBatteryController}.
- */
- public interface BatteryViewHandler {
- /** Hides the battery view. */
- void hideBatteryView();
-
- /** Shows the battery view. */
- void showBatteryView();
- }
-
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/bluetooth/ConnectedDeviceSignalController.java b/packages/CarSystemUI/src/com/android/systemui/car/bluetooth/ConnectedDeviceSignalController.java
deleted file mode 100644
index 4642868a225e..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/bluetooth/ConnectedDeviceSignalController.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.bluetooth;
-
-import static com.android.systemui.statusbar.phone.StatusBar.DEBUG;
-
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothHeadsetClient;
-import android.bluetooth.BluetoothProfile;
-import android.bluetooth.BluetoothProfile.ServiceListener;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.telephony.SignalStrength;
-import android.util.Log;
-import android.util.TypedValue;
-import android.view.View;
-import android.widget.ImageView;
-
-import com.android.settingslib.graph.SignalDrawable;
-import com.android.systemui.Dependency;
-import com.android.systemui.R;
-import com.android.systemui.statusbar.ScalingDrawableWrapper;
-import com.android.systemui.statusbar.policy.BluetoothController;
-
-/**
- * Controller that monitors signal strength for a device that is connected via bluetooth.
- */
-public class ConnectedDeviceSignalController extends BroadcastReceiver implements
- BluetoothController.Callback {
- private static final String TAG = "DeviceSignalCtlr";
-
- /**
- * The value that indicates if a network is unavailable. This value is according ot the
- * Bluetooth HFP 1.5 spec, which indicates this value is one of two: 0 or 1. These stand
- * for network unavailable and available respectively.
- */
- private static final int NETWORK_UNAVAILABLE = 0;
- private static final int NETWORK_UNAVAILABLE_ICON_ID = R.drawable.stat_sys_signal_null;
-
- /**
- * All possible signal strength icons. According to the Bluetooth HFP 1.5 specification,
- * signal strength is indicated by a value from 1-5, where these values represent the following:
- *
- * <p>0%% - 0, 1-25%% - 1, 26-50%% - 2, 51-75%% - 3, 76-99%% - 4, 100%% - 5
- *
- * <p>As a result, these are treated as an index into this array for the corresponding icon.
- * Note that the icon is the same for 0 and 1.
- */
- private static final int[] SIGNAL_STRENGTH_ICONS = {
- 0,
- 0,
- 1,
- 2,
- 3,
- 4,
- };
-
- private static final int INVALID_SIGNAL = -1;
-
- private final BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter();
- private final Context mContext;
- private final BluetoothController mController;
-
- private final View mSignalsView;
- private final ImageView mNetworkSignalView;
-
- private final float mIconScaleFactor;
- private final SignalDrawable mSignalDrawable;
-
- private BluetoothHeadsetClient mBluetoothHeadsetClient;
- private final ServiceListener mHfpServiceListener = new ServiceListener() {
- @Override
- public void onServiceConnected(int profile, BluetoothProfile proxy) {
- if (profile == BluetoothProfile.HEADSET_CLIENT) {
- mBluetoothHeadsetClient = (BluetoothHeadsetClient) proxy;
- }
- }
-
- @Override
- public void onServiceDisconnected(int profile) {
- if (profile == BluetoothProfile.HEADSET_CLIENT) {
- mBluetoothHeadsetClient = null;
- }
- }
- };
-
- public ConnectedDeviceSignalController(Context context, View signalsView) {
- mContext = context;
- mController = Dependency.get(BluetoothController.class);
-
- mSignalsView = signalsView;
- mNetworkSignalView = (ImageView)
- mSignalsView.findViewById(R.id.connected_device_network_signal);
-
- TypedValue typedValue = new TypedValue();
- context.getResources().getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true);
- mIconScaleFactor = typedValue.getFloat();
- mSignalDrawable = new SignalDrawable(mNetworkSignalView.getContext());
- mNetworkSignalView.setImageDrawable(
- new ScalingDrawableWrapper(mSignalDrawable, mIconScaleFactor));
-
- if (mAdapter == null) {
- return;
- }
-
- mAdapter.getProfileProxy(context.getApplicationContext(), mHfpServiceListener,
- BluetoothProfile.HEADSET_CLIENT);
- }
-
- /** Starts listening for bluetooth broadcast messages. */
- public void startListening() {
- IntentFilter filter = new IntentFilter();
- filter.addAction(BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED);
- filter.addAction(BluetoothHeadsetClient.ACTION_AG_EVENT);
- mContext.registerReceiver(this, filter);
-
- mController.addCallback(this);
- }
-
- /** Stops listening for bluetooth broadcast messages. */
- public void stopListening() {
- mContext.unregisterReceiver(this);
- mController.removeCallback(this);
- }
-
- @Override
- public void onBluetoothDevicesChanged() {
- // Nothing to do here because this Controller is not displaying a list of possible
- // bluetooth devices.
- }
-
- @Override
- public void onBluetoothStateChange(boolean enabled) {
- if (DEBUG) {
- Log.d(TAG, "onBluetoothStateChange(). enabled: " + enabled);
- }
-
- // Only need to handle the case if bluetooth has been disabled, in which case the
- // signal indicators are hidden. If bluetooth has been enabled, then this class should
- // receive updates to the connection state via onReceive().
- if (!enabled) {
- mNetworkSignalView.setVisibility(View.GONE);
- mSignalsView.setVisibility(View.GONE);
- }
- }
-
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
-
- if (DEBUG) {
- Log.d(TAG, "onReceive(). action: " + action);
- }
-
- if (BluetoothHeadsetClient.ACTION_AG_EVENT.equals(action)) {
- if (DEBUG) {
- Log.d(TAG, "Received ACTION_AG_EVENT");
- }
-
- processActionAgEvent(intent);
- } else if (BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED.equals(action)) {
- int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1);
-
- if (DEBUG) {
- int oldState = intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, -1);
- Log.d(TAG, "ACTION_CONNECTION_STATE_CHANGED event: "
- + oldState + " -> " + newState);
- }
- BluetoothDevice device =
- (BluetoothDevice) intent.getExtra(BluetoothDevice.EXTRA_DEVICE);
- updateViewVisibility(device, newState);
- }
- }
-
- /**
- * Processes an {@link Intent} that had an action of
- * {@link BluetoothHeadsetClient#ACTION_AG_EVENT}.
- */
- private void processActionAgEvent(Intent intent) {
- int networkStatus = intent.getIntExtra(BluetoothHeadsetClient.EXTRA_NETWORK_STATUS,
- INVALID_SIGNAL);
- if (networkStatus != INVALID_SIGNAL) {
- if (DEBUG) {
- Log.d(TAG, "EXTRA_NETWORK_STATUS: " + " " + networkStatus);
- }
-
- if (networkStatus == NETWORK_UNAVAILABLE) {
- setNetworkSignalIcon(NETWORK_UNAVAILABLE_ICON_ID);
- }
- }
-
- int signalStrength = intent.getIntExtra(
- BluetoothHeadsetClient.EXTRA_NETWORK_SIGNAL_STRENGTH, INVALID_SIGNAL);
- if (signalStrength != INVALID_SIGNAL) {
- if (DEBUG) {
- Log.d(TAG, "EXTRA_NETWORK_SIGNAL_STRENGTH: " + signalStrength);
- }
-
- setNetworkSignalIcon(SIGNAL_STRENGTH_ICONS[signalStrength]);
- }
-
- int roamingStatus = intent.getIntExtra(BluetoothHeadsetClient.EXTRA_NETWORK_ROAMING,
- INVALID_SIGNAL);
- if (roamingStatus != INVALID_SIGNAL) {
- if (DEBUG) {
- Log.d(TAG, "EXTRA_NETWORK_ROAMING: " + roamingStatus);
- }
- }
- }
-
- private void setNetworkSignalIcon(int level) {
- // Setting the icon on a child view of mSignalView, so toggle this container visible.
- mSignalsView.setVisibility(View.VISIBLE);
-
- mSignalDrawable.setLevel(SignalDrawable.getState(level,
- SignalStrength.NUM_SIGNAL_STRENGTH_BINS, false));
- mNetworkSignalView.setVisibility(View.VISIBLE);
- }
-
- private void updateViewVisibility(BluetoothDevice device, int newState) {
- if (newState == BluetoothProfile.STATE_CONNECTED) {
- if (DEBUG) {
- Log.d(TAG, "Device connected");
- }
-
- if (mBluetoothHeadsetClient == null || device == null) {
- return;
- }
-
- // Check if battery information is available and immediately update.
- Bundle featuresBundle = mBluetoothHeadsetClient.getCurrentAgEvents(device);
- if (featuresBundle == null) {
- return;
- }
-
- int signalStrength = featuresBundle.getInt(
- BluetoothHeadsetClient.EXTRA_NETWORK_SIGNAL_STRENGTH, INVALID_SIGNAL);
- if (signalStrength != INVALID_SIGNAL) {
- if (DEBUG) {
- Log.d(TAG, "EXTRA_NETWORK_SIGNAL_STRENGTH: " + signalStrength);
- }
-
- setNetworkSignalIcon(SIGNAL_STRENGTH_ICONS[signalStrength]);
- }
- } else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
- if (DEBUG) {
- Log.d(TAG, "Device disconnected");
- }
-
- mNetworkSignalView.setVisibility(View.GONE);
- mSignalsView.setVisibility(View.GONE);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java
deleted file mode 100644
index af2a1d36bbd7..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static com.android.systemui.car.hvac.HvacController.convertToCelsius;
-import static com.android.systemui.car.hvac.HvacController.convertToFahrenheit;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.android.systemui.R;
-
-/**
- * Displays temperature with a button to decrease and a button to increase on either side.
- * Properties configured in the XML:
- * hvacAreaId - Example: VehicleSeat.SEAT_ROW_1_LEFT (1)
- */
-public class AdjustableTemperatureView extends LinearLayout implements TemperatureView {
-
- private final int mAreaId;
- private TextView mTempTextView;
- private float mMinTempC;
- private float mMaxTempC;
- private String mTempFormat;
- private String mNullTempText;
- private String mMinTempText;
- private String mMaxTempText;
- private boolean mDisplayInFahrenheit = false;
-
- private HvacController mHvacController;
- private float mCurrentTempC;
-
- public AdjustableTemperatureView(Context context, AttributeSet attrs) {
- super(context, attrs);
- TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TemperatureView);
- mAreaId = typedArray.getInt(R.styleable.TemperatureView_hvacAreaId, -1);
- }
-
- @Override
- public void onFinishInflate() {
- super.onFinishInflate();
- LayoutInflater.from(getContext()).inflate(R.layout.adjustable_temperature_view,
- /* root= */ this);
- mTempFormat = getResources().getString(R.string.hvac_temperature_format);
- mMinTempC = getResources().getFloat(R.dimen.hvac_min_value_celsius);
- mMaxTempC = getResources().getFloat(R.dimen.hvac_max_value_celsius);
- mNullTempText = getResources().getString(R.string.hvac_null_temp_text);
- mMinTempText = getResources().getString(R.string.hvac_min_text);
- mMaxTempText = getResources().getString(R.string.hvac_max_text);
- initializeButtons();
- }
-
- @Override
- public void setHvacController(HvacController controller) {
- mHvacController = controller;
- }
-
- @Override
- public void setTemp(float tempC) {
- if (mTempTextView == null) {
- mTempTextView = findViewById(R.id.hvac_temperature_text);
- }
- if (Float.isNaN(tempC)) {
- mTempTextView.setText(mNullTempText);
- return;
- }
- if (tempC <= mMinTempC) {
- mTempTextView.setText(mMinTempText);
- mCurrentTempC = mMinTempC;
- return;
- }
- if (tempC >= mMaxTempC) {
- mTempTextView.setText(mMaxTempText);
- mCurrentTempC = mMaxTempC;
- return;
- }
- mTempTextView.setText(String.format(mTempFormat,
- mDisplayInFahrenheit ? convertToFahrenheit(tempC) : tempC));
- mCurrentTempC = tempC;
- }
-
- @Override
- public void setDisplayInFahrenheit(boolean displayFahrenheit) {
- mDisplayInFahrenheit = displayFahrenheit;
- setTemp(mCurrentTempC);
- }
-
- @Override
- public int getAreaId() {
- return mAreaId;
- }
-
- private void initializeButtons() {
- findViewById(R.id.hvac_decrease_button).setOnClickListener(v -> {
- float newTemp = mDisplayInFahrenheit ? convertToCelsius(
- convertToFahrenheit(mCurrentTempC) - 1) : (mCurrentTempC - 1);
- setTemperature(newTemp, mAreaId);
- });
-
- findViewById(R.id.hvac_increase_button).setOnClickListener(v -> {
- float newTemp = mDisplayInFahrenheit ? convertToCelsius(
- convertToFahrenheit(mCurrentTempC) + 1) : (mCurrentTempC + 1);
- setTemperature(newTemp, mAreaId);
- });
- }
-
- private void setTemperature(float tempC, int zone) {
- if (tempC < mMaxTempC && tempC > mMinTempC && mHvacController != null) {
- mHvacController.setTemperature(tempC, zone);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java
deleted file mode 100644
index b98b68038e6f..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static com.android.systemui.car.hvac.HvacController.convertToFahrenheit;
-
-import android.animation.ObjectAnimator;
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.graphics.Color;
-import android.graphics.Rect;
-import android.graphics.drawable.ColorDrawable;
-import android.util.AttributeSet;
-import android.util.Property;
-import android.view.Gravity;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.TextSwitcher;
-import android.widget.TextView;
-
-import com.android.systemui.R;
-
-/**
- * Simple text display of HVAC properties, It is designed to show mTemperature and is configured in
- * the XML.
- * XML properties:
- * hvacAreaId - Example: VehicleAreaSeat.SEAT_ROW_1_LEFT (1)
- * hvacOrientaion = Example: left
- */
-public class AnimatedTemperatureView extends FrameLayout implements TemperatureView {
-
- private static final float TEMPERATURE_EQUIVALENT_DELTA = .01f;
- private static final Property<ColorDrawable, Integer> COLOR_PROPERTY =
- new Property<ColorDrawable, Integer>(Integer.class, "color") {
-
- @Override
- public Integer get(ColorDrawable object) {
- return object.getColor();
- }
-
- @Override
- public void set(ColorDrawable object, Integer value) {
- object.setColor(value);
- }
- };
-
- static boolean isHorizontal(int gravity) {
- return Gravity.isHorizontal(gravity)
- && (gravity & Gravity.HORIZONTAL_GRAVITY_MASK) != Gravity.CENTER_HORIZONTAL;
- }
-
- @SuppressLint("RtlHardcoded")
- static boolean isLeft(int gravity, int layoutDirection) {
- return Gravity
- .getAbsoluteGravity(gravity & Gravity.HORIZONTAL_GRAVITY_MASK, layoutDirection)
- == Gravity.LEFT;
- }
-
- static boolean isVertical(int gravity) {
- return Gravity.isVertical(gravity)
- && (gravity & Gravity.VERTICAL_GRAVITY_MASK) != Gravity.CENTER_VERTICAL;
- }
-
- static boolean isTop(int gravity) {
- return (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.TOP;
- }
-
- private final int mAreaId;
- private final int mPivotOffset;
- private final int mGravity;
- private final int mTextAppearanceRes;
- private final int mMinEms;
- private final Rect mPaddingRect;
- private final float mMinValue;
- private final float mMaxValue;
-
- private final ColorDrawable mBackgroundColor;
-
- private final TemperatureColorStore mColorStore = new TemperatureColorStore();
- private final TemperatureBackgroundAnimator mBackgroundAnimator;
- private final TemperatureTextAnimator mTextAnimator;
- boolean mDisplayInFahrenheit = false;
-
- private HvacController mHvacController;
-
- public AnimatedTemperatureView(Context context, AttributeSet attrs) {
- super(context, attrs);
- TypedArray typedArray = context.obtainStyledAttributes(attrs,
- R.styleable.AnimatedTemperatureView);
- mAreaId = typedArray.getInt(R.styleable.AnimatedTemperatureView_hvacAreaId, -1);
- mPivotOffset =
- typedArray.getDimensionPixelOffset(
- R.styleable.AnimatedTemperatureView_hvacPivotOffset, 0);
- mGravity = typedArray.getInt(R.styleable.AnimatedTemperatureView_android_gravity,
- Gravity.START);
- mTextAppearanceRes =
- typedArray.getResourceId(R.styleable.AnimatedTemperatureView_android_textAppearance,
- 0);
- mMinEms = typedArray.getInteger(R.styleable.AnimatedTemperatureView_android_minEms, 0);
- mMinValue = getResources().getFloat(R.dimen.hvac_min_value_celsius);
- mMaxValue = getResources().getFloat(R.dimen.hvac_max_value_celsius);
-
- mPaddingRect =
- new Rect(getPaddingLeft(), getPaddingTop(), getPaddingRight(), getPaddingBottom());
- setPadding(0, 0, 0, 0);
-
- setClipChildren(false);
- setClipToPadding(false);
-
- // init Views
- TextSwitcher textSwitcher = new TextSwitcher(context);
- textSwitcher.setFactory(this::generateTextView);
- ImageView background = new ImageView(context);
- mBackgroundColor = new ColorDrawable(Color.TRANSPARENT);
- background.setImageDrawable(mBackgroundColor);
- background.setVisibility(View.GONE);
-
- mBackgroundAnimator = new TemperatureBackgroundAnimator(this, background);
-
- mTextAnimator = new TemperatureTextAnimator(this, textSwitcher,
- getResources().getString(R.string.hvac_temperature_format), mPivotOffset,
- getResources().getString(R.string.hvac_min_text),
- getResources().getString(R.string.hvac_max_text));
-
- addView(background, ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT);
- addView(textSwitcher, ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT);
-
- typedArray.recycle();
- }
-
-
- private TextView generateTextView() {
- TextView textView = new TextView(getContext());
- textView.setTextAppearance(mTextAppearanceRes);
- textView.setAllCaps(true);
- textView.setMinEms(mMinEms);
- textView.setGravity(mGravity);
- textView.setPadding(mPaddingRect.left, mPaddingRect.top, mPaddingRect.right,
- mPaddingRect.bottom);
- textView.getViewTreeObserver()
- .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
- @Override
- public boolean onPreDraw() {
- if (isHorizontal(mGravity)) {
- if (isLeft(mGravity, getLayoutDirection())) {
- textView.setPivotX(-mPivotOffset);
- } else {
- textView.setPivotX(textView.getWidth() + mPivotOffset);
- }
- }
- textView.getViewTreeObserver().removeOnPreDrawListener(this);
- return true;
- }
- });
- textView.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT));
-
- return textView;
- }
-
- @Override
- public void setHvacController(HvacController controller) {
- mHvacController = controller;
- }
-
- /**
- * Formats the float for display
- *
- * @param temp - The current temp or NaN
- */
- @Override
- public void setTemp(float temp) {
- if (mDisplayInFahrenheit) {
- temp = convertToFahrenheit(temp);
- }
- mTextAnimator.setTemp(temp);
- if (Float.isNaN(temp)) {
- mBackgroundAnimator.hideCircle();
- return;
- }
- int color;
- if (isMinValue(temp)) {
- color = mColorStore.getMinColor();
- } else if (isMaxValue(temp)) {
- color = mColorStore.getMaxColor();
- } else {
- color = mColorStore.getColorForTemperature(temp);
- }
- if (mBackgroundAnimator.isOpen()) {
- ObjectAnimator colorAnimator =
- ObjectAnimator.ofInt(mBackgroundColor, COLOR_PROPERTY, color);
- colorAnimator.setEvaluator((fraction, startValue, endValue) -> mColorStore
- .lerpColor(fraction, (int) startValue, (int) endValue));
- colorAnimator.start();
- } else {
- mBackgroundColor.setColor(color);
- }
-
- mBackgroundAnimator.animateOpen();
- }
-
- @Override
- public void setDisplayInFahrenheit(boolean displayInFahrenheit) {
- mDisplayInFahrenheit = displayInFahrenheit;
- }
-
- boolean isMinValue(float temp) {
- return !Float.isNaN(mMinValue) && isApproxEqual(temp, mMinValue);
- }
-
- boolean isMaxValue(float temp) {
- return !Float.isNaN(mMaxValue) && isApproxEqual(temp, mMaxValue);
- }
-
- private boolean isApproxEqual(float left, float right) {
- return Math.abs(left - right) <= TEMPERATURE_EQUIVALENT_DELTA;
- }
-
- int getGravity() {
- return mGravity;
- }
-
- int getPivotOffset() {
- return mPivotOffset;
- }
-
- Rect getPaddingRect() {
- return mPaddingRect;
- }
-
- /**
- * @return hvac AreaId - Example: VehicleAreaSeat.SEAT_ROW_1_LEFT (1)
- */
- @Override
- public int getAreaId() {
- return mAreaId;
- }
-
- @Override
- protected void onDetachedFromWindow() {
- super.onDetachedFromWindow();
- mBackgroundAnimator.stopAnimations();
- }
-}
-
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java
deleted file mode 100644
index 10a361c3084e..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static android.car.VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_DISPLAY_UNITS;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_SET;
-
-import android.car.Car;
-import android.car.VehicleUnit;
-import android.car.hardware.CarPropertyValue;
-import android.car.hardware.property.CarPropertyManager;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.UiBackground;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Executor;
-
-import javax.inject.Inject;
-
-/**
- * Manages the connection to the Car service and delegates value changes to the registered
- * {@link TemperatureView}s
- */
-@SysUISingleton
-public class HvacController {
- public static final String TAG = "HvacController";
- private static final boolean DEBUG = true;
-
- private final Executor mBackgroundExecutor;
- private final CarServiceProvider mCarServiceProvider;
- private final Set<TemperatureView> mRegisteredViews = new HashSet<>();
-
- private CarPropertyManager mCarPropertyManager;
- private HashMap<Integer, List<TemperatureView>> mTempComponents = new HashMap<>();
-
- private final CarPropertyManager.CarPropertyEventCallback mHvacTemperatureSetCallback =
- new CarPropertyManager.CarPropertyEventCallback() {
- @Override
- public void onChangeEvent(CarPropertyValue value) {
- try {
- int areaId = value.getAreaId();
- List<TemperatureView> temperatureViews = mTempComponents.get(areaId);
- if (temperatureViews != null && !temperatureViews.isEmpty()) {
- float newTemp = (float) value.getValue();
- if (DEBUG) {
- Log.d(TAG, "onChangeEvent: " + areaId + ":" + value);
- }
- for (TemperatureView view : temperatureViews) {
- view.setTemp(newTemp);
- }
- }
- } catch (Exception e) {
- Log.e(TAG, "Failed handling hvac change event", e);
- }
- }
-
- @Override
- public void onErrorEvent(int propId, int zone) {
- Log.d(TAG, "HVAC error event, propertyId: " + propId + " zone: " + zone);
- }
- };
-
- private final CarPropertyManager.CarPropertyEventCallback mTemperatureUnitChangeCallback =
- new CarPropertyManager.CarPropertyEventCallback() {
- @Override
- public void onChangeEvent(CarPropertyValue value) {
- if (!mRegisteredViews.isEmpty()) {
- for (TemperatureView view : mRegisteredViews) {
- view.setDisplayInFahrenheit(
- value.getValue().equals(VehicleUnit.FAHRENHEIT));
- }
- }
- }
-
- @Override
- public void onErrorEvent(int propId, int zone) {
- Log.d(TAG, "HVAC error event, propertyId: " + propId + " zone: " + zone);
- }
- };
-
- private final CarServiceProvider.CarServiceOnConnectedListener mCarServiceLifecycleListener =
- car -> {
- try {
- mCarPropertyManager = (CarPropertyManager) car.getCarManager(
- Car.PROPERTY_SERVICE);
- mCarPropertyManager.registerCallback(mHvacTemperatureSetCallback,
- HVAC_TEMPERATURE_SET, CarPropertyManager.SENSOR_RATE_ONCHANGE);
- mCarPropertyManager.registerCallback(mTemperatureUnitChangeCallback,
- HVAC_TEMPERATURE_DISPLAY_UNITS,
- CarPropertyManager.SENSOR_RATE_ONCHANGE);
- initComponents();
- } catch (Exception e) {
- Log.e(TAG, "Failed to correctly connect to HVAC", e);
- }
- };
-
- @Inject
- public HvacController(CarServiceProvider carServiceProvider,
- @UiBackground Executor backgroundExecutor) {
- mCarServiceProvider = carServiceProvider;
- mBackgroundExecutor = backgroundExecutor;
- }
-
- /**
- * Create connection to the Car service.
- */
- public void connectToCarService() {
- mCarServiceProvider.addListener(mCarServiceLifecycleListener);
- }
-
- /**
- * Add component to list and initialize it if the connection is up.
- */
- private void addHvacTextView(TemperatureView temperatureView) {
- if (mRegisteredViews.contains(temperatureView)) {
- return;
- }
-
- int areaId = temperatureView.getAreaId();
- if (!mTempComponents.containsKey(areaId)) {
- mTempComponents.put(areaId, new ArrayList<>());
- }
- mTempComponents.get(areaId).add(temperatureView);
- initComponent(temperatureView);
-
- mRegisteredViews.add(temperatureView);
- }
-
- private void initComponents() {
- for (Map.Entry<Integer, List<TemperatureView>> next : mTempComponents.entrySet()) {
- List<TemperatureView> temperatureViews = next.getValue();
- for (TemperatureView view : temperatureViews) {
- initComponent(view);
- }
- }
- }
-
- private void initComponent(TemperatureView view) {
- int zone = view.getAreaId();
- if (DEBUG) {
- Log.d(TAG, "initComponent: " + zone);
- }
-
- try {
- if (mCarPropertyManager != null && mCarPropertyManager.isPropertyAvailable(
- HVAC_TEMPERATURE_DISPLAY_UNITS, VEHICLE_AREA_TYPE_GLOBAL)) {
- if (mCarPropertyManager.getIntProperty(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL) == VehicleUnit.FAHRENHEIT) {
- view.setDisplayInFahrenheit(true);
- }
- }
- if (mCarPropertyManager == null || !mCarPropertyManager.isPropertyAvailable(
- HVAC_TEMPERATURE_SET, zone)) {
- view.setTemp(Float.NaN);
- return;
- }
- view.setTemp(
- mCarPropertyManager.getFloatProperty(HVAC_TEMPERATURE_SET, zone));
- view.setHvacController(this);
- } catch (Exception e) {
- view.setTemp(Float.NaN);
- Log.e(TAG, "Failed to get value from hvac service", e);
- }
- }
-
- /**
- * Removes all registered components. This is useful if you need to rebuild the UI since
- * components self register.
- */
- public void removeAllComponents() {
- mTempComponents.clear();
- mRegisteredViews.clear();
- }
-
- /**
- * Iterate through a view, looking for {@link TemperatureView} instances and add them to the
- * controller if found.
- */
- public void addTemperatureViewToController(View v) {
- if (v instanceof TemperatureView) {
- addHvacTextView((TemperatureView) v);
- } else if (v instanceof ViewGroup) {
- ViewGroup viewGroup = (ViewGroup) v;
- for (int i = 0; i < viewGroup.getChildCount(); i++) {
- addTemperatureViewToController(viewGroup.getChildAt(i));
- }
- }
- }
-
- /**
- * Set the temperature in Celsius of the specified zone
- */
- public void setTemperature(float tempC, int zone) {
- if (mCarPropertyManager != null) {
- // Internally, all temperatures are represented in floating point Celsius
- mBackgroundExecutor.execute(
- () -> mCarPropertyManager.setFloatProperty(HVAC_TEMPERATURE_SET, zone, tempC));
- }
- }
-
- /**
- * Convert the given temperature in Celsius into Fahrenheit
- *
- * @param tempC - The temperature in Celsius
- * @return Temperature in Fahrenheit.
- */
- public static float convertToFahrenheit(float tempC) {
- return (tempC * 9f / 5f) + 32;
- }
-
- /**
- * Convert the given temperature in Fahrenheit to Celsius
- *
- * @param tempF - The temperature in Fahrenheit.
- * @return Temperature in Celsius.
- */
- public static float convertToCelsius(float tempF) {
- return (tempF - 32) * 5f / 9f;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureBackgroundAnimator.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureBackgroundAnimator.java
deleted file mode 100644
index a4c45730a9c2..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureBackgroundAnimator.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static com.android.systemui.car.hvac.AnimatedTemperatureView.isHorizontal;
-import static com.android.systemui.car.hvac.AnimatedTemperatureView.isLeft;
-import static com.android.systemui.car.hvac.AnimatedTemperatureView.isTop;
-import static com.android.systemui.car.hvac.AnimatedTemperatureView.isVertical;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
-import android.annotation.IntDef;
-import android.graphics.Rect;
-import android.view.View;
-import android.view.ViewAnimationUtils;
-import android.view.animation.AnticipateInterpolator;
-import android.widget.ImageView;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Controls circular reveal animation of temperature background
- */
-class TemperatureBackgroundAnimator {
-
- private static final AnticipateInterpolator ANTICIPATE_INTERPOLATOR =
- new AnticipateInterpolator();
- private static final float MAX_OPACITY = .6f;
-
- private final View mAnimatedView;
-
- private int mPivotX;
- private int mPivotY;
- private int mGoneRadius;
- private int mOvershootRadius;
- private int mRestingRadius;
- private int mBumpRadius;
-
- @CircleState
- private int mCircleState;
-
- private Animator mCircularReveal;
- private boolean mAnimationsReady;
-
- @IntDef({CircleState.GONE, CircleState.ENTERING, CircleState.OVERSHOT, CircleState.RESTING,
- CircleState.RESTED, CircleState.BUMPING, CircleState.BUMPED, CircleState.EXITING})
- private @interface CircleState {
- int GONE = 0;
- int ENTERING = 1;
- int OVERSHOT = 2;
- int RESTING = 3;
- int RESTED = 4;
- int BUMPING = 5;
- int BUMPED = 6;
- int EXITING = 7;
- }
-
- TemperatureBackgroundAnimator(
- AnimatedTemperatureView parent,
- ImageView animatedView) {
- mAnimatedView = animatedView;
- mAnimatedView.setAlpha(0);
-
- parent.addOnLayoutChangeListener(
- (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) ->
- setupAnimations(parent.getGravity(), parent.getPivotOffset(),
- parent.getPaddingRect(), parent.getWidth(), parent.getHeight()));
- }
-
- private void setupAnimations(int gravity, int pivotOffset, Rect paddingRect,
- int width, int height) {
- int padding;
- if (isHorizontal(gravity)) {
- mGoneRadius = pivotOffset;
- if (isLeft(gravity, mAnimatedView.getLayoutDirection())) {
- mPivotX = -pivotOffset;
- padding = paddingRect.right;
- } else {
- mPivotX = width + pivotOffset;
- padding = paddingRect.left;
- }
- mPivotY = height / 2;
- mOvershootRadius = pivotOffset + width;
- } else if (isVertical(gravity)) {
- mGoneRadius = pivotOffset;
- if (isTop(gravity)) {
- mPivotY = -pivotOffset;
- padding = paddingRect.bottom;
- } else {
- mPivotY = height + pivotOffset;
- padding = paddingRect.top;
- }
- mPivotX = width / 2;
- mOvershootRadius = pivotOffset + height;
- } else {
- mPivotX = width / 2;
- mPivotY = height / 2;
- mGoneRadius = 0;
- if (width > height) {
- mOvershootRadius = height;
- padding = Math.max(paddingRect.top, paddingRect.bottom);
- } else {
- mOvershootRadius = width;
- padding = Math.max(paddingRect.left, paddingRect.right);
- }
- }
- mRestingRadius = mOvershootRadius - padding;
- mBumpRadius = mOvershootRadius - padding / 3;
- mAnimationsReady = true;
- }
-
- boolean isOpen() {
- return mCircleState != CircleState.GONE;
- }
-
- void animateOpen() {
- if (!mAnimationsReady
- || !mAnimatedView.isAttachedToWindow()
- || mCircleState == CircleState.ENTERING) {
- return;
- }
-
- AnimatorSet set = new AnimatorSet();
- List<Animator> animators = new ArrayList<>();
- switch (mCircleState) {
- case CircleState.ENTERING:
- throw new AssertionError("Should not be able to reach this statement");
- case CircleState.GONE: {
- Animator startCircle = createEnterAnimator();
- markState(startCircle, CircleState.ENTERING);
- animators.add(startCircle);
- Animator holdOvershoot = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, mOvershootRadius,
- mOvershootRadius);
- holdOvershoot.setDuration(50);
- markState(holdOvershoot, CircleState.OVERSHOT);
- animators.add(holdOvershoot);
- Animator rest = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, mOvershootRadius,
- mRestingRadius);
- markState(rest, CircleState.RESTING);
- animators.add(rest);
- Animator holdRest = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, mRestingRadius,
- mRestingRadius);
- markState(holdRest, CircleState.RESTED);
- holdRest.setDuration(1000);
- animators.add(holdRest);
- Animator exit = createExitAnimator(mRestingRadius);
- markState(exit, CircleState.EXITING);
- animators.add(exit);
- }
- break;
- case CircleState.RESTED:
- case CircleState.RESTING:
- case CircleState.EXITING:
- case CircleState.OVERSHOT:
- int startRadius =
- mCircleState == CircleState.OVERSHOT ? mOvershootRadius : mRestingRadius;
- Animator bump = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, startRadius,
- mBumpRadius);
- bump.setDuration(50);
- markState(bump, CircleState.BUMPING);
- animators.add(bump);
- // fallthrough intentional
- case CircleState.BUMPED:
- case CircleState.BUMPING:
- Animator holdBump = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, mBumpRadius,
- mBumpRadius);
- holdBump.setDuration(100);
- markState(holdBump, CircleState.BUMPED);
- animators.add(holdBump);
- Animator rest = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, mBumpRadius,
- mRestingRadius);
- markState(rest, CircleState.RESTING);
- animators.add(rest);
- Animator holdRest = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, mRestingRadius,
- mRestingRadius);
- holdRest.setDuration(1000);
- markState(holdRest, CircleState.RESTED);
- animators.add(holdRest);
- Animator exit = createExitAnimator(mRestingRadius);
- markState(exit, CircleState.EXITING);
- animators.add(exit);
- break;
- }
- set.playSequentially(animators);
- set.addListener(new AnimatorListenerAdapter() {
- private boolean mCanceled = false;
-
- @Override
- public void onAnimationStart(Animator animation) {
- if (mCircularReveal != null) {
- mCircularReveal.cancel();
- }
- mCircularReveal = animation;
- mAnimatedView.setVisibility(View.VISIBLE);
- }
-
- @Override
- public void onAnimationCancel(Animator animation) {
- mCanceled = true;
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- if (mCanceled) {
- return;
- }
- mCircularReveal = null;
- mCircleState = CircleState.GONE;
- mAnimatedView.setVisibility(View.GONE);
- }
- });
-
- set.start();
- }
-
- private Animator createEnterAnimator() {
- AnimatorSet animatorSet = new AnimatorSet();
- Animator circularReveal = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, mGoneRadius,
- mOvershootRadius);
- Animator fade = ObjectAnimator.ofFloat(mAnimatedView, View.ALPHA, MAX_OPACITY);
- animatorSet.playTogether(circularReveal, fade);
- return animatorSet;
- }
-
- private Animator createExitAnimator(int startRadius) {
- AnimatorSet animatorSet = new AnimatorSet();
- Animator circularHide = ViewAnimationUtils
- .createCircularReveal(mAnimatedView, mPivotX, mPivotY, startRadius,
- (mGoneRadius + startRadius) / 2);
- circularHide.setInterpolator(ANTICIPATE_INTERPOLATOR);
- Animator fade = ObjectAnimator.ofFloat(mAnimatedView, View.ALPHA, 0);
- fade.setStartDelay(50);
- animatorSet.playTogether(circularHide, fade);
- return animatorSet;
- }
-
- void hideCircle() {
- if (!mAnimationsReady || mCircleState == CircleState.GONE
- || mCircleState == CircleState.EXITING) {
- return;
- }
-
- int startRadius;
- switch (mCircleState) {
- // Unreachable, but here to exhaust switch cases
- //noinspection ConstantConditions
- case CircleState.EXITING:
- //noinspection ConstantConditions
- case CircleState.GONE:
- throw new AssertionError("Should not be able to reach this statement");
- case CircleState.BUMPED:
- case CircleState.BUMPING:
- startRadius = mBumpRadius;
- break;
- case CircleState.OVERSHOT:
- startRadius = mOvershootRadius;
- break;
- case CircleState.ENTERING:
- case CircleState.RESTED:
- case CircleState.RESTING:
- startRadius = mRestingRadius;
- break;
- default:
- throw new IllegalStateException("Unknown CircleState: " + mCircleState);
- }
-
- Animator hideAnimation = createExitAnimator(startRadius);
- if (startRadius == mRestingRadius) {
- hideAnimation.setInterpolator(ANTICIPATE_INTERPOLATOR);
- }
- hideAnimation.addListener(new AnimatorListenerAdapter() {
- private boolean mCanceled = false;
-
- @Override
- public void onAnimationStart(Animator animation) {
- mCircleState = CircleState.EXITING;
- if (mCircularReveal != null) {
- mCircularReveal.cancel();
- }
- mCircularReveal = animation;
- }
-
- @Override
- public void onAnimationCancel(Animator animation) {
- mCanceled = true;
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- if (mCanceled) {
- return;
- }
- mCircularReveal = null;
- mCircleState = CircleState.GONE;
- mAnimatedView.setVisibility(View.GONE);
- }
- });
- hideAnimation.start();
- }
-
- void stopAnimations() {
- if (mCircularReveal != null) {
- mCircularReveal.end();
- }
- }
-
- private void markState(Animator animator, @CircleState int startState) {
- animator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- mCircleState = startState;
- }
- });
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureColorStore.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureColorStore.java
deleted file mode 100644
index 9a7b0b9819c5..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureColorStore.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import android.graphics.Color;
-
-/**
- * Contains the logic for mapping colors to temperatures
- */
-class TemperatureColorStore {
-
- private static class TemperatureColorValue {
- final float mTemperature;
- final int mColor;
-
- private TemperatureColorValue(float temperature, int color) {
- this.mTemperature = temperature;
- this.mColor = color;
- }
-
- float getTemperature() {
- return mTemperature;
- }
-
- int getColor() {
- return mColor;
- }
- }
-
- private static TemperatureColorValue tempToColor(float temperature, int color) {
- return new TemperatureColorValue(temperature, color);
- }
-
- private static final int COLOR_COLDEST = 0xFF406DFF;
- private static final int COLOR_COLD = 0xFF4094FF;
- private static final int COLOR_NEUTRAL = 0xFFF4F4F4;
- private static final int COLOR_WARM = 0xFFFF550F;
- private static final int COLOR_WARMEST = 0xFFFF0000;
- // must be sorted by temperature
- private static final TemperatureColorValue[] sTemperatureColorValues =
- {
- // Celsius
- tempToColor(19, COLOR_COLDEST),
- tempToColor(21, COLOR_COLD),
- tempToColor(23, COLOR_NEUTRAL),
- tempToColor(25, COLOR_WARM),
- tempToColor(27, COLOR_WARMEST),
-
- // Switch over
- tempToColor(45, COLOR_WARMEST),
- tempToColor(45.00001f, COLOR_COLDEST),
-
- // Farenheight
- tempToColor(66, COLOR_COLDEST),
- tempToColor(70, COLOR_COLD),
- tempToColor(74, COLOR_NEUTRAL),
- tempToColor(76, COLOR_WARM),
- tempToColor(80, COLOR_WARMEST)
- };
-
- private static final int COLOR_UNSET = Color.BLACK;
-
- private final float[] mTempHsv1 = new float[3];
- private final float[] mTempHsv2 = new float[3];
- private final float[] mTempHsv3 = new float[3];
-
- int getMinColor() {
- return COLOR_COLDEST;
- }
-
- int getMaxColor() {
- return COLOR_WARMEST;
- }
-
- int getColorForTemperature(float temperature) {
- if (Float.isNaN(temperature)) {
- return COLOR_UNSET;
- }
- TemperatureColorValue bottomValue = sTemperatureColorValues[0];
- if (temperature <= bottomValue.getTemperature()) {
- return bottomValue.getColor();
- }
- TemperatureColorValue topValue =
- sTemperatureColorValues[sTemperatureColorValues.length - 1];
- if (temperature >= topValue.getTemperature()) {
- return topValue.getColor();
- }
-
- int index = binarySearch(temperature);
- if (index >= 0) {
- return sTemperatureColorValues[index].getColor();
- }
-
- index = -index - 1; // move to the insertion point
-
- TemperatureColorValue startValue = sTemperatureColorValues[index - 1];
- TemperatureColorValue endValue = sTemperatureColorValues[index];
- float fraction = (temperature - startValue.getTemperature()) / (endValue.getTemperature()
- - startValue.getTemperature());
- return lerpColor(fraction, startValue.getColor(), endValue.getColor());
- }
-
- int lerpColor(float fraction, int startColor, int endColor) {
- float[] startHsv = mTempHsv1;
- Color.colorToHSV(startColor, startHsv);
- float[] endHsv = mTempHsv2;
- Color.colorToHSV(endColor, endHsv);
-
- // If a target color is white/gray, it should use the same hue as the other target
- if (startHsv[1] == 0) {
- startHsv[0] = endHsv[0];
- }
- if (endHsv[1] == 0) {
- endHsv[0] = startHsv[0];
- }
-
- float[] outColor = mTempHsv3;
- outColor[0] = hueLerp(fraction, startHsv[0], endHsv[0]);
- outColor[1] = lerp(fraction, startHsv[1], endHsv[1]);
- outColor[2] = lerp(fraction, startHsv[2], endHsv[2]);
-
- return Color.HSVToColor(outColor);
- }
-
- private float hueLerp(float fraction, float start, float end) {
- // If in flat part of curve, no interpolation necessary
- if (start == end) {
- return start;
- }
-
- // If the hues are more than 180 degrees apart, go the other way around the color wheel
- // by moving the smaller value above 360
- if (Math.abs(start - end) > 180f) {
- if (start < end) {
- start += 360f;
- } else {
- end += 360f;
- }
- }
- // Lerp and ensure the final output is within [0, 360)
- return lerp(fraction, start, end) % 360f;
-
- }
-
- private float lerp(float fraction, float start, float end) {
- // If in flat part of curve, no interpolation necessary
- if (start == end) {
- return start;
- }
-
- // If outside bounds, use boundary value
- if (fraction >= 1) {
- return end;
- }
- if (fraction <= 0) {
- return start;
- }
-
- return (end - start) * fraction + start;
- }
-
- private int binarySearch(float temperature) {
- int low = 0;
- int high = sTemperatureColorValues.length;
-
- while (low <= high) {
- int mid = (low + high) >>> 1;
- float midVal = sTemperatureColorValues[mid].getTemperature();
-
- if (midVal < temperature) {
- low = mid + 1; // Neither val is NaN, thisVal is smaller
- } else if (midVal > temperature) {
- high = mid - 1; // Neither val is NaN, thisVal is larger
- } else {
- int midBits = Float.floatToIntBits(midVal);
- int keyBits = Float.floatToIntBits(temperature);
- if (midBits == keyBits) { // Values are equal
- return mid; // Key found
- } else if (midBits < keyBits) { // (-0.0, 0.0) or (!NaN, NaN)
- low = mid + 1;
- } else { /* (0.0, -0.0) or (NaN, !NaN)*/
- high = mid - 1;
- }
- }
- }
- return -(low + 1); // key not found.
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextAnimator.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextAnimator.java
deleted file mode 100644
index 74d970464108..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextAnimator.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static com.android.systemui.car.hvac.AnimatedTemperatureView.isHorizontal;
-import static com.android.systemui.car.hvac.AnimatedTemperatureView.isLeft;
-
-import android.annotation.NonNull;
-import android.view.animation.AccelerateDecelerateInterpolator;
-import android.view.animation.AlphaAnimation;
-import android.view.animation.Animation;
-import android.view.animation.AnimationSet;
-import android.view.animation.DecelerateInterpolator;
-import android.view.animation.RotateAnimation;
-import android.view.animation.TranslateAnimation;
-import android.widget.TextSwitcher;
-
-/**
- * Controls animating TemperatureView's text
- */
-class TemperatureTextAnimator {
-
- private static final DecelerateInterpolator DECELERATE_INTERPOLATOR =
- new DecelerateInterpolator();
- private static final AccelerateDecelerateInterpolator ACCELERATE_DECELERATE_INTERPOLATOR =
- new AccelerateDecelerateInterpolator();
-
- private static final int ROTATION_DEGREES = 15;
- private static final int DURATION_MILLIS = 200;
-
- private AnimatedTemperatureView mParent;
- private final TextSwitcher mTextSwitcher;
- private final String mTempFormat;
- private final int mPivotOffset;
- private final CharSequence mMinText;
- private final CharSequence mMaxText;
-
- private Animation mTextInAnimationUp;
- private Animation mTextOutAnimationUp;
- private Animation mTextInAnimationDown;
- private Animation mTextOutAnimationDown;
- private Animation mTextFadeInAnimation;
- private Animation mTextFadeOutAnimation;
-
- private float mLastTemp = Float.NaN;
-
- TemperatureTextAnimator(AnimatedTemperatureView parent, TextSwitcher textSwitcher,
- String tempFormat, int pivotOffset,
- CharSequence minText, CharSequence maxText) {
- mParent = parent;
- mTextSwitcher = textSwitcher;
- mTempFormat = tempFormat;
- mPivotOffset = pivotOffset;
- mMinText = minText;
- mMaxText = maxText;
-
- mParent.addOnLayoutChangeListener(
- (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) ->
- setupAnimations(mParent.getGravity()));
- }
-
- void setTemp(float temp) {
- if (Float.isNaN(temp)) {
- mTextSwitcher.setInAnimation(mTextFadeInAnimation);
- mTextSwitcher.setOutAnimation(mTextFadeOutAnimation);
- mTextSwitcher.setText("--");
- mLastTemp = temp;
- return;
- }
- boolean isMinValue = mParent.isMinValue(temp);
- boolean isMaxValue = mParent.isMaxValue(temp);
- if (Float.isNaN(mLastTemp)) {
- mTextSwitcher.setInAnimation(mTextFadeInAnimation);
- mTextSwitcher.setOutAnimation(mTextFadeOutAnimation);
- } else if (!isMinValue && (isMaxValue || temp > mLastTemp)) {
- mTextSwitcher.setInAnimation(mTextInAnimationUp);
- mTextSwitcher.setOutAnimation(mTextOutAnimationUp);
- } else {
- mTextSwitcher.setInAnimation(mTextInAnimationDown);
- mTextSwitcher.setOutAnimation(mTextOutAnimationDown);
- }
- CharSequence text;
- if (isMinValue) {
- text = mMinText;
- } else if (isMaxValue) {
- text = mMaxText;
- } else {
- text = String.format(mTempFormat, temp);
- }
- mTextSwitcher.setText(text);
- mLastTemp = temp;
- }
-
- private void setupAnimations(int gravity) {
- mTextFadeInAnimation = createFadeAnimation(true);
- mTextFadeOutAnimation = createFadeAnimation(false);
- if (!isHorizontal(gravity)) {
- mTextInAnimationUp = createTranslateFadeAnimation(true, true);
- mTextOutAnimationUp = createTranslateFadeAnimation(false, true);
- mTextInAnimationDown = createTranslateFadeAnimation(true, false);
- mTextOutAnimationDown = createTranslateFadeAnimation(false, false);
- } else {
- boolean isLeft = isLeft(gravity, mTextSwitcher.getLayoutDirection());
- mTextInAnimationUp = createRotateFadeAnimation(true, isLeft, true);
- mTextOutAnimationUp = createRotateFadeAnimation(false, isLeft, true);
- mTextInAnimationDown = createRotateFadeAnimation(true, isLeft, false);
- mTextOutAnimationDown = createRotateFadeAnimation(false, isLeft, false);
- }
- }
-
- @NonNull
- private Animation createFadeAnimation(boolean in) {
- AnimationSet set = new AnimationSet(true);
- AlphaAnimation alphaAnimation = new AlphaAnimation(in ? 0 : 1, in ? 1 : 0);
- alphaAnimation.setDuration(DURATION_MILLIS);
- set.addAnimation(new RotateAnimation(0, 0)); // Undo any previous rotation
- set.addAnimation(alphaAnimation);
- return set;
- }
-
- @NonNull
- private Animation createTranslateFadeAnimation(boolean in, boolean up) {
- AnimationSet set = new AnimationSet(true);
- set.setInterpolator(ACCELERATE_DECELERATE_INTERPOLATOR);
- set.setDuration(DURATION_MILLIS);
- int fromYDelta = in ? (up ? 1 : -1) : 0;
- int toYDelta = in ? 0 : (up ? -1 : 1);
- set.addAnimation(
- new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0,
- Animation.RELATIVE_TO_SELF, fromYDelta, Animation.RELATIVE_TO_SELF,
- toYDelta));
- set.addAnimation(new AlphaAnimation(in ? 0 : 1, in ? 1 : 0));
- return set;
- }
-
- @NonNull
- private Animation createRotateFadeAnimation(boolean in, boolean isLeft, boolean up) {
- AnimationSet set = new AnimationSet(true);
- set.setInterpolator(DECELERATE_INTERPOLATOR);
- set.setDuration(DURATION_MILLIS);
-
- float degrees = isLeft == up ? -ROTATION_DEGREES : ROTATION_DEGREES;
- int pivotX = isLeft ? -mPivotOffset : mParent.getWidth() + mPivotOffset;
- set.addAnimation(
- new RotateAnimation(in ? -degrees : 0f, in ? 0f : degrees, Animation.ABSOLUTE,
- pivotX, Animation.ABSOLUTE, 0f));
- set.addAnimation(new AlphaAnimation(in ? 0 : 1, in ? 1 : 0));
- return set;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java
deleted file mode 100644
index 90df15c907dd..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static com.android.systemui.car.hvac.HvacController.convertToFahrenheit;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.util.AttributeSet;
-import android.widget.TextView;
-
-import com.android.systemui.R;
-
-/**
- * Simple text display of HVAC properties, It is designed to show temperature and is configured in
- * the XML.
- * XML properties:
- * hvacAreaId - Example: VehicleAreaSeat.SEAT_ROW_1_LEFT (1)
- */
-public class TemperatureTextView extends TextView implements TemperatureView {
-
- private final int mAreaId;
- private final String mTempFormat;
- private HvacController mHvacController;
- private boolean mDisplayFahrenheit = false;
-
- public TemperatureTextView(Context context, AttributeSet attrs) {
- super(context, attrs);
- TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TemperatureView);
- mAreaId = typedArray.getInt(R.styleable.TemperatureView_hvacAreaId, -1);
- mTempFormat = getResources().getString(R.string.hvac_temperature_format);
- }
-
- @Override
- public void setHvacController(HvacController controller) {
- mHvacController = controller;
- }
-
- /**
- * Formats the float for display
- *
- * @param temp - The current temp or NaN
- */
- @Override
- public void setTemp(float temp) {
- if (Float.isNaN(temp)) {
- setText("--");
- return;
- }
- if (mDisplayFahrenheit) {
- temp = convertToFahrenheit(temp);
- }
- setText(String.format(mTempFormat, temp));
- }
-
- @Override
- public void setDisplayInFahrenheit(boolean displayFahrenheit) {
- mDisplayFahrenheit = displayFahrenheit;
- }
-
- /**
- * @return hvac AreaId - Example: VehicleAreaSeat.SEAT_ROW_1_LEFT (1)
- */
- @Override
- public int getAreaId() {
- return mAreaId;
- }
-}
-
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java
deleted file mode 100644
index 6edf25431ffd..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-/**
- * Interface for Views that display temperature HVAC properties.
- */
-public interface TemperatureView {
-
- /**
- * Sets the {@link HvacController} to handle changes to HVAC properties. The View is only
- * responsible for the UI to display temperature. It should not contain logic that makes direct
- * changes to HVAC properties and instead use this {@link HvacController}.
- */
- void setHvacController(HvacController controller);
-
- /**
- * Formats the float for display
- *
- * @param temp - The current temp in Celsius or NaN
- */
- void setTemp(float temp);
-
- /**
- * Render the displayed temperature in Fahrenheit
- *
- * @param displayFahrenheit - True if temperature should be displayed in Fahrenheit
- */
- void setDisplayInFahrenheit(boolean displayFahrenheit);
-
- /**
- * @return hvac AreaId - Example: VehicleAreaSeat.SEAT_ROW_1_LEFT (1)
- */
- int getAreaId();
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
deleted file mode 100644
index c190ae54b1cf..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.keyguard;
-
-import android.car.Car;
-import android.car.user.CarUserManager;
-import android.os.Bundle;
-import android.os.Handler;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewRootImpl;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.keyguard.KeyguardViewController;
-import com.android.keyguard.ViewMediatorCallback;
-import com.android.systemui.R;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.car.window.OverlayViewController;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.statusbar.phone.BiometricUnlockController;
-import com.android.systemui.statusbar.phone.KeyguardBouncer;
-import com.android.systemui.statusbar.phone.KeyguardBouncer.Factory;
-import com.android.systemui.statusbar.phone.KeyguardBypassController;
-import com.android.systemui.statusbar.phone.NotificationPanelViewController;
-import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.policy.KeyguardStateController;
-
-import javax.inject.Inject;
-
-import dagger.Lazy;
-
-/**
- * Automotive implementation of the {@link KeyguardViewController}. It controls the Keyguard View
- * that is mounted to the SystemUIOverlayWindow.
- */
-@SysUISingleton
-public class CarKeyguardViewController extends OverlayViewController implements
- KeyguardViewController {
- private static final String TAG = "CarKeyguardViewController";
- private static final boolean DEBUG = true;
-
- private final Handler mHandler;
- private final CarServiceProvider mCarServiceProvider;
- private final KeyguardStateController mKeyguardStateController;
- private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
- private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy;
- private final ViewMediatorCallback mViewMediatorCallback;
- private final CarNavigationBarController mCarNavigationBarController;
- private final Factory mKeyguardBouncerFactory;
- // Needed to instantiate mBouncer.
- private final KeyguardBouncer.BouncerExpansionCallback
- mExpansionCallback = new KeyguardBouncer.BouncerExpansionCallback() {
- @Override
- public void onFullyShown() {
- }
-
- @Override
- public void onStartingToHide() {
- }
-
- @Override
- public void onStartingToShow() {
- }
-
- @Override
- public void onFullyHidden() {
- }
- };
- private final CarUserManager.UserLifecycleListener mUserLifecycleListener = (e) -> {
- if (e.getEventType() == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING) {
- revealKeyguardIfBouncerPrepared();
- }
- };
-
- private KeyguardBouncer mBouncer;
- private OnKeyguardCancelClickedListener mKeyguardCancelClickedListener;
- private boolean mShowing;
- private boolean mIsOccluded;
-
- @Inject
- public CarKeyguardViewController(
- @Main Handler mainHandler,
- CarServiceProvider carServiceProvider,
- OverlayViewGlobalStateController overlayViewGlobalStateController,
- KeyguardStateController keyguardStateController,
- KeyguardUpdateMonitor keyguardUpdateMonitor,
- Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
- ViewMediatorCallback viewMediatorCallback,
- CarNavigationBarController carNavigationBarController,
- KeyguardBouncer.Factory keyguardBouncerFactory) {
-
- super(R.id.keyguard_stub, overlayViewGlobalStateController);
-
- mHandler = mainHandler;
- mCarServiceProvider = carServiceProvider;
- mKeyguardStateController = keyguardStateController;
- mKeyguardUpdateMonitor = keyguardUpdateMonitor;
- mBiometricUnlockControllerLazy = biometricUnlockControllerLazy;
- mViewMediatorCallback = viewMediatorCallback;
- mCarNavigationBarController = carNavigationBarController;
- mKeyguardBouncerFactory = keyguardBouncerFactory;
-
- registerUserSwitchedListener();
- }
-
- @Override
- protected boolean shouldShowNavigationBarInsets() {
- return true;
- }
-
- @Override
- public void onFinishInflate() {
- mBouncer = mKeyguardBouncerFactory
- .create(getLayout().findViewById(R.id.keyguard_container), mExpansionCallback);
- mBiometricUnlockControllerLazy.get().setKeyguardViewController(this);
- }
-
- @Override
- public void notifyKeyguardAuthenticated(boolean strongAuth) {
- if (mBouncer != null) {
- mBouncer.notifyKeyguardAuthenticated(strongAuth);
- }
- }
-
- @Override
- public void showBouncer(boolean scrimmed) {
- if (mShowing && !mBouncer.isShowing()) {
- mBouncer.show(/* resetSecuritySelection= */ false);
- }
- }
-
- @Override
- public void show(Bundle options) {
- if (mShowing) return;
-
- mShowing = true;
- mKeyguardStateController.notifyKeyguardState(mShowing, /* occluded= */ false);
- mCarNavigationBarController.showAllKeyguardButtons(/* isSetUp= */ true);
- start();
- reset(/* hideBouncerWhenShowing= */ false);
- notifyKeyguardUpdateMonitor();
- }
-
- @Override
- public void hide(long startTime, long fadeoutDuration) {
- if (!mShowing) return;
-
- mViewMediatorCallback.readyForKeyguardDone();
- mShowing = false;
- mKeyguardStateController.notifyKeyguardState(mShowing, /* occluded= */ false);
- mBouncer.hide(/* destroyView= */ true);
- mCarNavigationBarController.hideAllKeyguardButtons(/* isSetUp= */ true);
- stop();
- mKeyguardStateController.notifyKeyguardDoneFading();
- mHandler.post(mViewMediatorCallback::keyguardGone);
- notifyKeyguardUpdateMonitor();
- }
-
- @Override
- public void reset(boolean hideBouncerWhenShowing) {
- if (mShowing) {
- if (mBouncer != null) {
- if (!mBouncer.isSecure()) {
- dismissAndCollapse();
- }
- mBouncer.show(/* resetSecuritySelection= */ true);
- }
- mKeyguardUpdateMonitor.sendKeyguardReset();
- notifyKeyguardUpdateMonitor();
- } else {
- // This is necessary in order to address an inconsistency between the keyguard service
- // and the keyguard views.
- // TODO: Investigate the source of the inconsistency.
- show(/* options= */ null);
- }
- }
-
- @Override
- public void onFinishedGoingToSleep() {
- if (mBouncer != null) {
- mBouncer.onScreenTurnedOff();
- }
- }
-
- @Override
- public void setOccluded(boolean occluded, boolean animate) {
- mIsOccluded = occluded;
- getOverlayViewGlobalStateController().setOccluded(occluded);
- if (!occluded) {
- reset(/* hideBouncerWhenShowing= */ false);
- }
- }
-
- @Override
- public void onCancelClicked() {
- if (mBouncer == null) return;
-
- getOverlayViewGlobalStateController().setWindowNeedsInput(/* needsInput= */ false);
-
- mBouncer.hide(/* destroyView= */ true);
- mKeyguardCancelClickedListener.onCancelClicked();
- }
-
- @Override
- public boolean isShowing() {
- return mShowing;
- }
-
- @Override
- public void dismissAndCollapse() {
- // If dismissing and collapsing Keyguard is requested (e.g. by a Keyguard-dismissing
- // Activity) while Keyguard is occluded, unocclude Keyguard so the user can authenticate to
- // dismiss Keyguard.
- if (mIsOccluded) {
- setOccluded(/* occluded= */ false, /* animate= */ false);
- }
- if (!mBouncer.isSecure()) {
- hide(/* startTime= */ 0, /* fadeoutDuration= */ 0);
- }
- }
-
- @Override
- public void startPreHideAnimation(Runnable finishRunnable) {
- if (mBouncer == null) return;
-
- mBouncer.startPreHideAnimation(finishRunnable);
- }
-
- @Override
- public void setNeedsInput(boolean needsInput) {
- getOverlayViewGlobalStateController().setWindowNeedsInput(needsInput);
- }
-
- /**
- * Add listener for keyguard cancel clicked.
- */
- public void registerOnKeyguardCancelClickedListener(
- OnKeyguardCancelClickedListener keyguardCancelClickedListener) {
- mKeyguardCancelClickedListener = keyguardCancelClickedListener;
- }
-
- /**
- * Remove listener for keyguard cancel clicked.
- */
- public void unregisterOnKeyguardCancelClickedListener(
- OnKeyguardCancelClickedListener keyguardCancelClickedListener) {
- mKeyguardCancelClickedListener = null;
- }
-
- @Override
- public ViewRootImpl getViewRootImpl() {
- return ((View) getLayout().getParent()).getViewRootImpl();
- }
-
- @Override
- public boolean isBouncerShowing() {
- return mBouncer != null && mBouncer.isShowing();
- }
-
- @Override
- public boolean bouncerIsOrWillBeShowing() {
- return mBouncer != null && (mBouncer.isShowing() || mBouncer.inTransit());
- }
-
- @Override
- public void keyguardGoingAway() {
- // no-op
- }
-
- @Override
- public void setKeyguardGoingAwayState(boolean isKeyguardGoingAway) {
- // no-op
- }
-
- @Override
- public void onStartedGoingToSleep() {
- // no-op
- }
-
- @Override
- public void onStartedWakingUp() {
- // no-op
- }
-
- @Override
- public void onScreenTurningOn() {
- // no-op
- }
-
- @Override
- public void onScreenTurnedOn() {
- // no-op
- }
-
- @Override
- public boolean shouldDisableWindowAnimationsForUnlock() {
- return false;
- }
-
- @Override
- public boolean isGoingToNotificationShade() {
- return false;
- }
-
- @Override
- public boolean isUnlockWithWallpaper() {
- return false;
- }
-
- @Override
- public boolean shouldSubtleWindowAnimationsForUnlock() {
- return false;
- }
-
- @Override
- public void registerStatusBar(StatusBar statusBar, ViewGroup container,
- NotificationPanelViewController notificationPanelViewController,
- BiometricUnlockController biometricUnlockController,
- ViewGroup lockIconContainer,
- View notificationContainer, KeyguardBypassController bypassController) {
- // no-op
- }
-
- /**
- * Hides Keyguard so that the transitioning Bouncer can be hidden until it is prepared. To be
- * called by {@link com.android.systemui.car.userswitcher.FullscreenUserSwitcherViewMediator}
- * when a new user is selected.
- */
- public void hideKeyguardToPrepareBouncer() {
- getLayout().setVisibility(View.INVISIBLE);
- }
-
- @VisibleForTesting
- void setKeyguardBouncer(KeyguardBouncer keyguardBouncer) {
- mBouncer = keyguardBouncer;
- }
-
- private void revealKeyguardIfBouncerPrepared() {
- int reattemptDelayMillis = 50;
- Runnable revealKeyguard = () -> {
- if (mBouncer == null) {
- if (DEBUG) {
- Log.d(TAG, "revealKeyguardIfBouncerPrepared: revealKeyguard request is ignored "
- + "since the Bouncer has not been initialized yet.");
- }
- return;
- }
- if (!mBouncer.inTransit() || !mBouncer.isSecure()) {
- getLayout().setVisibility(View.VISIBLE);
- } else {
- if (DEBUG) {
- Log.d(TAG, "revealKeyguardIfBouncerPrepared: Bouncer is not prepared "
- + "yet so reattempting after " + reattemptDelayMillis + "ms.");
- }
- mHandler.postDelayed(this::revealKeyguardIfBouncerPrepared, reattemptDelayMillis);
- }
- };
- mHandler.post(revealKeyguard);
- }
-
- private void notifyKeyguardUpdateMonitor() {
- mKeyguardUpdateMonitor.onKeyguardVisibilityChanged(mShowing);
- if (mBouncer != null) {
- mKeyguardUpdateMonitor.sendKeyguardBouncerChanged(isBouncerShowing());
- }
- }
-
- private void registerUserSwitchedListener() {
- mCarServiceProvider.addListener(car -> {
- CarUserManager userManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE);
- userManager.addListener(Runnable::run, mUserLifecycleListener);
- });
- }
-
- /**
- * Defines a callback for keyguard cancel button clicked listeners.
- */
- public interface OnKeyguardCancelClickedListener {
- /**
- * Called when keyguard cancel button is clicked.
- */
- void onCancelClicked();
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewMediator.java
deleted file mode 100644
index 155b73e691ef..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewMediator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.keyguard;
-
-import com.android.systemui.car.userswitcher.FullScreenUserSwitcherViewController;
-import com.android.systemui.car.window.OverlayViewMediator;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/**
- * Manages events originating from the Keyguard service that cause Keyguard or other OverlayWindow
- * Components to appear or disappear.
- */
-@SysUISingleton
-public class CarKeyguardViewMediator implements OverlayViewMediator {
-
- private final CarKeyguardViewController mCarKeyguardViewController;
- private final FullScreenUserSwitcherViewController mFullScreenUserSwitcherViewController;
-
- @Inject
- public CarKeyguardViewMediator(
- CarKeyguardViewController carKeyguardViewController,
- FullScreenUserSwitcherViewController fullScreenUserSwitcherViewController
- ) {
- mCarKeyguardViewController = carKeyguardViewController;
- mFullScreenUserSwitcherViewController = fullScreenUserSwitcherViewController;
- }
-
- @Override
- public void registerListeners() {
- mCarKeyguardViewController.registerOnKeyguardCancelClickedListener(
- mFullScreenUserSwitcherViewController::start);
- }
-
- @Override
- public void setupOverlayContentViewControllers() {
- // no-op
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/AssitantButton.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/AssitantButton.java
deleted file mode 100644
index ede4696a96c3..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/AssitantButton.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static android.service.voice.VoiceInteractionSession.SHOW_SOURCE_ASSIST_GESTURE;
-
-import android.app.role.RoleManager;
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.os.Bundle;
-import android.util.AttributeSet;
-import android.util.Log;
-
-import com.android.internal.app.AssistUtils;
-import com.android.internal.app.IVoiceInteractionSessionShowCallback;
-
-/**
- * AssitantButton is a ui component that will trigger the Voice Interaction Service.
- */
-public class AssitantButton extends CarNavigationButton {
- private static final String TAG = "AssistantButton";
- private final AssistUtils mAssistUtils;
- private IVoiceInteractionSessionShowCallback mShowCallback =
- new IVoiceInteractionSessionShowCallback.Stub() {
- @Override
- public void onFailed() {
- Log.w(TAG, "Failed to show VoiceInteractionSession");
- }
-
- @Override
- public void onShown() {
- Log.d(TAG, "IVoiceInteractionSessionShowCallback onShown()");
- }
- };
-
- public AssitantButton(Context context, AttributeSet attrs) {
- super(context, attrs);
- mAssistUtils = new AssistUtils(context);
- setOnClickListener(v -> showAssistant());
- }
-
- private void showAssistant() {
- final Bundle args = new Bundle();
- mAssistUtils.showSessionForActiveService(args,
- SHOW_SOURCE_ASSIST_GESTURE, mShowCallback, /*activityToken=*/ null);
- }
-
- @Override
- protected void setUpIntents(TypedArray typedArray) {
- // left blank because for the assistant button Intent will not be passed from the layout.
- }
-
- @Override
- protected String getRoleName() {
- return RoleManager.ROLE_ASSISTANT;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonRoleHolderController.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonRoleHolderController.java
deleted file mode 100644
index f8cd20fe8377..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonRoleHolderController.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.annotation.Nullable;
-import android.app.role.OnRoleHoldersChangedListener;
-import android.app.role.RoleManager;
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.os.UserHandle;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.dagger.SysUISingleton;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Inject;
-
-/**
- * Some CarNavigationButtons can be associated to a {@link RoleManager} role. When they are, it is
- * possible to have them display the icon of the default application (role holder) for the given
- * role.
- *
- * This class monitors the current role holders for each role type and updates the button icon for
- * this buttons with have this feature enabled.
- */
-@SysUISingleton
-public class ButtonRoleHolderController {
- private static final String TAG = "ButtonRoleHolderController";
-
- private final Context mContext;
- private final PackageManager mPackageManager;
- private final RoleManager mRoleManager;
- private final CarDeviceProvisionedController mDeviceController;
- private final Map<String, CarNavigationButton> mButtonMap = new HashMap<>();
- private final OnRoleHoldersChangedListener mListener = this::onRoleChanged;
- private boolean mRegistered;
-
- @Inject
- public ButtonRoleHolderController(Context context, PackageManager packageManager,
- RoleManager roleManager, CarDeviceProvisionedController deviceController) {
- mContext = context;
- mPackageManager = packageManager;
- mRoleManager = roleManager;
- mDeviceController = deviceController;
- }
-
- /**
- * Iterate through a view looking for CarNavigationButton and add it to this controller if it
- * opted to be associated with a {@link RoleManager} role type.
- *
- * @param v the View that may contain CarFacetButtons
- */
- void addAllButtonsWithRoleName(View v) {
- if (v instanceof CarNavigationButton) {
- CarNavigationButton button = (CarNavigationButton) v;
- String roleName = button.getRoleName();
- if (roleName != null && button.isDefaultAppIconForRoleEnabled()) {
- addButtonWithRoleName(button, roleName);
- }
- } else if (v instanceof ViewGroup) {
- ViewGroup viewGroup = (ViewGroup) v;
- for (int i = 0; i < viewGroup.getChildCount(); i++) {
- addAllButtonsWithRoleName(viewGroup.getChildAt(i));
- }
- }
- }
-
- private void addButtonWithRoleName(CarNavigationButton button, String roleName) {
- mButtonMap.put(roleName, button);
- updateIcon(roleName);
- if (!mRegistered) {
- mRoleManager.addOnRoleHoldersChangedListenerAsUser(mContext.getMainExecutor(),
- mListener, UserHandle.ALL);
- mRegistered = true;
- }
- }
-
- void removeAll() {
- mButtonMap.clear();
- if (mRegistered) {
- mRoleManager.removeOnRoleHoldersChangedListenerAsUser(mListener, UserHandle.ALL);
- mRegistered = false;
- }
- }
-
- @VisibleForTesting
- void onRoleChanged(String roleName, UserHandle user) {
- if (RoleManager.ROLE_ASSISTANT.equals(roleName)
- && user.getIdentifier() == mDeviceController.getCurrentUser()) {
- updateIcon(roleName);
- }
- }
-
- private void updateIcon(String roleName) {
- CarNavigationButton button = mButtonMap.get(roleName);
- if (button == null) {
- return;
- }
- List<String> holders = mRoleManager.getRoleHoldersAsUser(button.getRoleName(),
- UserHandle.of(mDeviceController.getCurrentUser()));
- if (holders == null || holders.isEmpty()) {
- button.setAppIcon(null);
- } else {
- button.setAppIcon(loadIcon(holders.get(0)));
- }
- }
-
- @Nullable
- private Drawable loadIcon(String packageName) {
- try {
- ApplicationInfo appInfo = mPackageManager.getApplicationInfo(packageName,
- PackageManager.MATCH_ANY_USER);
- return appInfo.loadIcon(mPackageManager);
- } catch (PackageManager.NameNotFoundException e) {
- Log.e(ButtonRoleHolderController.TAG, "Package not found: " + packageName, e);
- return null;
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateController.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateController.java
deleted file mode 100644
index 2dc475682fac..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateController.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.app.ActivityTaskManager.RootTaskInfo;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.view.Display;
-import android.view.View;
-import android.view.ViewGroup;
-
-import com.android.systemui.dagger.SysUISingleton;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.inject.Inject;
-
-/**
- * CarNavigationButtons can optionally have selection state that toggles certain visual indications
- * based on whether the active application on screen is associated with it. This is basically a
- * similar concept to a radio button group.
- *
- * This class controls the selection state of CarNavigationButtons that have opted in to have such
- * selection state-dependent visual indications.
- */
-@SysUISingleton
-public class ButtonSelectionStateController {
-
- private final Set<CarNavigationButton> mRegisteredViews = new HashSet<>();
-
- protected ButtonMap mButtonsByCategory = new ButtonMap();
- protected ButtonMap mButtonsByPackage = new ButtonMap();
- protected ButtonMap mButtonsByComponentName = new ButtonMap();
- protected HashSet<CarNavigationButton> mSelectedButtons;
- protected Context mContext;
-
- @Inject
- public ButtonSelectionStateController(Context context) {
- mContext = context;
- mSelectedButtons = new HashSet<>();
- }
-
- /**
- * Iterate through a view looking for CarNavigationButton and add it to the controller if it
- * opted in to be highlighted when the active application is associated with it.
- *
- * @param v the View that may contain CarFacetButtons
- */
- protected void addAllButtonsWithSelectionState(View v) {
- if (v instanceof CarNavigationButton) {
- if (((CarNavigationButton) v).hasSelectionState()) {
- addButtonWithSelectionState((CarNavigationButton) v);
- }
- } else if (v instanceof ViewGroup) {
- ViewGroup viewGroup = (ViewGroup) v;
- for (int i = 0; i < viewGroup.getChildCount(); i++) {
- addAllButtonsWithSelectionState(viewGroup.getChildAt(i));
- }
- }
- }
-
- /** Removes all buttons from the button maps. */
- protected void removeAll() {
- mButtonsByCategory.clear();
- mButtonsByPackage.clear();
- mButtonsByComponentName.clear();
- mSelectedButtons.clear();
- mRegisteredViews.clear();
- }
-
- /**
- * This will unselect the currently selected CarNavigationButton and determine which one should
- * be selected next. It does this by reading the properties on the CarNavigationButton and
- * seeing if they are a match with the supplied StackInfo list.
- * The order of selection detection is ComponentName, PackageName then Category
- * They will then be compared with the supplied StackInfo list.
- * The StackInfo is expected to be supplied in order of recency and StackInfo will only be used
- * for consideration if it has the same displayId as the CarNavigationButton.
- *
- * @param taskInfoList of the currently running application
- * @param validDisplay index of the valid display
- */
-
- protected void taskChanged(List<RootTaskInfo> taskInfoList, int validDisplay) {
- RootTaskInfo validTaskInfo = null;
- for (RootTaskInfo taskInfo : taskInfoList) {
- // Find the first stack info with a topActivity in the primary display.
- // TODO: We assume that CarFacetButton will launch an app only in the primary display.
- // We need to extend the functionality to handle the multiple display properly.
- if (taskInfo.topActivity != null && taskInfo.displayId == validDisplay) {
- validTaskInfo = taskInfo;
- break;
- }
- }
-
- if (validTaskInfo == null) {
- // No stack was found that was on the same display as the buttons thus return
- return;
- }
- int displayId = validTaskInfo.displayId;
-
- mSelectedButtons.forEach(carNavigationButton -> {
- if (carNavigationButton.getDisplayId() == displayId) {
- carNavigationButton.setSelected(false);
- }
- });
- mSelectedButtons.clear();
-
- HashSet<CarNavigationButton> selectedButtons = findSelectedButtons(validTaskInfo);
-
- if (selectedButtons != null) {
- selectedButtons.forEach(carNavigationButton -> {
- if (carNavigationButton.getDisplayId() == displayId) {
- carNavigationButton.setSelected(true);
- mSelectedButtons.add(carNavigationButton);
- }
- });
- }
- }
-
- /**
- * Defaults to Display.DEFAULT_DISPLAY when no parameter is provided for the validDisplay.
- *
- * @param taskInfoList
- */
- protected void taskChanged(List<RootTaskInfo> taskInfoList) {
- taskChanged(taskInfoList, Display.DEFAULT_DISPLAY);
- }
-
- /**
- * Add navigation button to this controller if it uses selection state.
- */
- private void addButtonWithSelectionState(CarNavigationButton carNavigationButton) {
- if (mRegisteredViews.contains(carNavigationButton)) {
- return;
- }
- String[] categories = carNavigationButton.getCategories();
- for (int i = 0; i < categories.length; i++) {
- mButtonsByCategory.add(categories[i], carNavigationButton);
- }
-
- String[] packages = carNavigationButton.getPackages();
- for (int i = 0; i < packages.length; i++) {
- mButtonsByPackage.add(packages[i], carNavigationButton);
- }
- String[] componentNames = carNavigationButton.getComponentName();
- for (int i = 0; i < componentNames.length; i++) {
- mButtonsByComponentName.add(componentNames[i], carNavigationButton);
- }
-
- mRegisteredViews.add(carNavigationButton);
- }
-
- private HashSet<CarNavigationButton> findSelectedButtons(RootTaskInfo validTaskInfo) {
- String packageName = validTaskInfo.topActivity.getPackageName();
-
- HashSet<CarNavigationButton> selectedButtons =
- findButtonsByComponentName(validTaskInfo.topActivity);
- if (selectedButtons == null) {
- selectedButtons = mButtonsByPackage.get(packageName);
- }
- if (selectedButtons == null) {
- String category = getPackageCategory(packageName);
- if (category != null) {
- selectedButtons = mButtonsByCategory.get(category);
- }
- }
-
- return selectedButtons;
- }
-
- private HashSet<CarNavigationButton> findButtonsByComponentName(
- ComponentName componentName) {
- HashSet<CarNavigationButton> buttons =
- mButtonsByComponentName.get(componentName.flattenToShortString());
- return (buttons != null) ? buttons :
- mButtonsByComponentName.get(componentName.flattenToString());
- }
-
- private String getPackageCategory(String packageName) {
- PackageManager pm = mContext.getPackageManager();
- Set<String> supportedCategories = mButtonsByCategory.keySet();
- for (String category : supportedCategories) {
- Intent intent = new Intent();
- intent.setPackage(packageName);
- intent.setAction(Intent.ACTION_MAIN);
- intent.addCategory(category);
- List<ResolveInfo> list = pm.queryIntentActivities(intent, 0);
- if (list.size() > 0) {
- // Cache this package name into ButtonsByPackage map, so we won't have to query
- // all categories next time this package name shows up.
- mButtonsByPackage.put(packageName, mButtonsByCategory.get(category));
- return category;
- }
- }
- return null;
- }
-
- // simple multi-map
- private static class ButtonMap extends HashMap<String, HashSet<CarNavigationButton>> {
-
- public boolean add(String key, CarNavigationButton value) {
- if (containsKey(key)) {
- return get(key).add(value);
- }
- HashSet<CarNavigationButton> set = new HashSet<>();
- set.add(value);
- put(key, set);
- return true;
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateListener.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateListener.java
deleted file mode 100644
index f74bd4fce312..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/ButtonSelectionStateListener.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.app.ActivityTaskManager;
-import android.util.Log;
-
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.shared.system.TaskStackChangeListener;
-
-import javax.inject.Inject;
-
-/**
- * An implementation of TaskStackChangeListener, that listens for changes in the system
- * task stack and notifies the navigation bar.
- */
-@SysUISingleton
-class ButtonSelectionStateListener extends TaskStackChangeListener {
- private static final String TAG = ButtonSelectionStateListener.class.getSimpleName();
-
- private final ButtonSelectionStateController mButtonSelectionStateController;
-
- @Inject
- ButtonSelectionStateListener(ButtonSelectionStateController carNavigationButtonController) {
- mButtonSelectionStateController = carNavigationButtonController;
- }
-
- @Override
- public void onTaskStackChanged() {
- try {
- mButtonSelectionStateController.taskChanged(
- ActivityTaskManager.getService().getAllRootTaskInfos());
- } catch (Exception e) {
- Log.e(TAG, "Getting RootTaskInfo from activity task manager failed", e);
- }
- }
-
- @Override
- public void onTaskDisplayChanged(int taskId, int newDisplayId) {
- try {
- mButtonSelectionStateController.taskChanged(
- ActivityTaskManager.getService().getAllRootTaskInfos());
- } catch (Exception e) {
- Log.e(TAG, "Getting RootTaskInfo from activity task manager failed", e);
- }
-
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
deleted file mode 100644
index c7db3f6fc4f9..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBar.java
+++ /dev/null
@@ -1,590 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
-import static android.view.InsetsState.ITYPE_STATUS_BAR;
-import static android.view.InsetsState.containsType;
-import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS;
-
-import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT;
-import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.inputmethodservice.InputMethodService;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.view.Display;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowInsetsController;
-import android.view.WindowManager;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.internal.statusbar.IStatusBarService;
-import com.android.internal.statusbar.RegisterStatusBarResult;
-import com.android.internal.view.AppearanceRegion;
-import com.android.systemui.SystemUI;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarDeviceProvisionedListener;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.dagger.qualifiers.UiBackground;
-import com.android.systemui.plugins.DarkIconDispatcher;
-import com.android.systemui.shared.system.ActivityManagerWrapper;
-import com.android.systemui.statusbar.AutoHideUiElement;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.phone.AutoHideController;
-import com.android.systemui.statusbar.phone.BarTransitions;
-import com.android.systemui.statusbar.phone.LightBarController;
-import com.android.systemui.statusbar.phone.PhoneStatusBarPolicy;
-import com.android.systemui.statusbar.phone.StatusBarIconController;
-import com.android.systemui.statusbar.phone.StatusBarSignalPolicy;
-import com.android.systemui.statusbar.phone.SysuiDarkIconDispatcher;
-import com.android.systemui.statusbar.policy.KeyguardStateController;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.concurrent.Executor;
-
-import javax.inject.Inject;
-
-import dagger.Lazy;
-
-/** Navigation bars customized for the automotive use case. */
-public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks {
- private final Resources mResources;
- private final CarNavigationBarController mCarNavigationBarController;
- private final SysuiDarkIconDispatcher mStatusBarIconController;
- private final WindowManager mWindowManager;
- private final CarDeviceProvisionedController mCarDeviceProvisionedController;
- private final CommandQueue mCommandQueue;
- private final AutoHideController mAutoHideController;
- private final ButtonSelectionStateListener mButtonSelectionStateListener;
- private final Handler mMainHandler;
- private final Executor mUiBgExecutor;
- private final IStatusBarService mBarService;
- private final Lazy<KeyguardStateController> mKeyguardStateControllerLazy;
- private final Lazy<PhoneStatusBarPolicy> mIconPolicyLazy;
- private final Lazy<StatusBarIconController> mIconControllerLazy;
-
- private final int mDisplayId;
- private final SystemBarConfigs mSystemBarConfigs;
-
- private StatusBarSignalPolicy mSignalPolicy;
- private ActivityManagerWrapper mActivityManagerWrapper;
-
- // If the nav bar should be hidden when the soft keyboard is visible.
- private boolean mHideTopBarForKeyboard;
- private boolean mHideLeftBarForKeyboard;
- private boolean mHideRightBarForKeyboard;
- private boolean mHideBottomBarForKeyboard;
-
- private boolean mBottomNavBarVisible;
-
- // Nav bar views.
- private ViewGroup mTopNavigationBarWindow;
- private ViewGroup mBottomNavigationBarWindow;
- private ViewGroup mLeftNavigationBarWindow;
- private ViewGroup mRightNavigationBarWindow;
- private CarNavigationBarView mTopNavigationBarView;
- private CarNavigationBarView mBottomNavigationBarView;
- private CarNavigationBarView mLeftNavigationBarView;
- private CarNavigationBarView mRightNavigationBarView;
-
- // To be attached to the navigation bars such that they can close the notification panel if
- // it's open.
- private boolean mDeviceIsSetUpForUser = true;
- private boolean mIsUserSetupInProgress = false;
-
- private AppearanceRegion[] mAppearanceRegions = new AppearanceRegion[0];
- @BarTransitions.TransitionMode
- private int mStatusBarMode;
- @BarTransitions.TransitionMode
- private int mNavigationBarMode;
- private boolean mStatusBarTransientShown;
- private boolean mNavBarTransientShown;
-
- @Inject
- public CarNavigationBar(Context context,
- @Main Resources resources,
- CarNavigationBarController carNavigationBarController,
- // TODO(b/156052638): Should not need to inject LightBarController
- LightBarController lightBarController,
- DarkIconDispatcher darkIconDispatcher,
- WindowManager windowManager,
- CarDeviceProvisionedController deviceProvisionedController,
- CommandQueue commandQueue,
- AutoHideController autoHideController,
- ButtonSelectionStateListener buttonSelectionStateListener,
- @Main Handler mainHandler,
- @UiBackground Executor uiBgExecutor,
- IStatusBarService barService,
- Lazy<KeyguardStateController> keyguardStateControllerLazy,
- Lazy<PhoneStatusBarPolicy> iconPolicyLazy,
- Lazy<StatusBarIconController> iconControllerLazy,
- SystemBarConfigs systemBarConfigs
- ) {
- super(context);
- mResources = resources;
- mCarNavigationBarController = carNavigationBarController;
- mStatusBarIconController = (SysuiDarkIconDispatcher) darkIconDispatcher;
- mWindowManager = windowManager;
- mCarDeviceProvisionedController = deviceProvisionedController;
- mCommandQueue = commandQueue;
- mAutoHideController = autoHideController;
- mButtonSelectionStateListener = buttonSelectionStateListener;
- mMainHandler = mainHandler;
- mUiBgExecutor = uiBgExecutor;
- mBarService = barService;
- mKeyguardStateControllerLazy = keyguardStateControllerLazy;
- mIconPolicyLazy = iconPolicyLazy;
- mIconControllerLazy = iconControllerLazy;
- mSystemBarConfigs = systemBarConfigs;
-
- mDisplayId = context.getDisplayId();
- }
-
- @Override
- public void start() {
- // Set initial state.
- mHideTopBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
- mHideBottomBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(
- SystemBarConfigs.BOTTOM);
- mHideLeftBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.LEFT);
- mHideRightBarForKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(
- SystemBarConfigs.RIGHT);
-
- mBottomNavBarVisible = false;
-
- // Connect into the status bar manager service
- mCommandQueue.addCallback(this);
-
- RegisterStatusBarResult result = null;
- try {
- result = mBarService.registerStatusBar(mCommandQueue);
- } catch (RemoteException ex) {
- ex.rethrowFromSystemServer();
- }
-
- onSystemBarAppearanceChanged(mDisplayId, result.mAppearance, result.mAppearanceRegions,
- result.mNavbarColorManagedByIme);
-
- // StatusBarManagerService has a back up of IME token and it's restored here.
- setImeWindowStatus(mDisplayId, result.mImeToken, result.mImeWindowVis,
- result.mImeBackDisposition, result.mShowImeSwitcher);
-
- // Set up the initial icon state
- int numIcons = result.mIcons.size();
- for (int i = 0; i < numIcons; i++) {
- mCommandQueue.setIcon(result.mIcons.keyAt(i), result.mIcons.valueAt(i));
- }
-
- mAutoHideController.setStatusBar(new AutoHideUiElement() {
- @Override
- public void synchronizeState() {
- // No op.
- }
-
- @Override
- public boolean isVisible() {
- return mStatusBarTransientShown;
- }
-
- @Override
- public void hide() {
- clearTransient();
- }
- });
-
- mAutoHideController.setNavigationBar(new AutoHideUiElement() {
- @Override
- public void synchronizeState() {
- // No op.
- }
-
- @Override
- public boolean isVisible() {
- return mNavBarTransientShown;
- }
-
- @Override
- public void hide() {
- clearTransient();
- }
- });
-
- mDeviceIsSetUpForUser = mCarDeviceProvisionedController.isCurrentUserSetup();
- mIsUserSetupInProgress = mCarDeviceProvisionedController.isCurrentUserSetupInProgress();
- mCarDeviceProvisionedController.addCallback(
- new CarDeviceProvisionedListener() {
- @Override
- public void onUserSetupInProgressChanged() {
- mMainHandler.post(() -> restartNavBarsIfNecessary());
- }
-
- @Override
- public void onUserSetupChanged() {
- mMainHandler.post(() -> restartNavBarsIfNecessary());
- }
-
- @Override
- public void onUserSwitched() {
- mMainHandler.post(() -> restartNavBarsIfNecessary());
- }
- });
-
- createNavigationBar(result);
-
- mActivityManagerWrapper = ActivityManagerWrapper.getInstance();
- mActivityManagerWrapper.registerTaskStackListener(mButtonSelectionStateListener);
-
- mUiBgExecutor.execute(mCarNavigationBarController::connectToHvac);
-
- // Lastly, call to the icon policy to install/update all the icons.
- // Must be called on the main thread due to the use of observeForever() in
- // mIconPolicy.init().
- mMainHandler.post(() -> {
- mIconPolicyLazy.get().init();
- mSignalPolicy = new StatusBarSignalPolicy(mContext, mIconControllerLazy.get());
- });
- }
-
- private void restartNavBarsIfNecessary() {
- boolean currentUserSetup = mCarDeviceProvisionedController.isCurrentUserSetup();
- boolean currentUserSetupInProgress = mCarDeviceProvisionedController
- .isCurrentUserSetupInProgress();
- if (mIsUserSetupInProgress != currentUserSetupInProgress
- || mDeviceIsSetUpForUser != currentUserSetup) {
- mDeviceIsSetUpForUser = currentUserSetup;
- mIsUserSetupInProgress = currentUserSetupInProgress;
- restartNavBars();
- }
- }
-
- /**
- * Remove all content from navbars and rebuild them. Used to allow for different nav bars
- * before and after the device is provisioned. . Also for change of density and font size.
- */
- private void restartNavBars() {
- // remove and reattach all components such that we don't keep a reference to unused ui
- // elements
- mCarNavigationBarController.removeAll();
-
- if (mTopNavigationBarWindow != null) {
- mTopNavigationBarWindow.removeAllViews();
- mTopNavigationBarView = null;
- }
-
- if (mBottomNavigationBarWindow != null) {
- mBottomNavigationBarWindow.removeAllViews();
- mBottomNavigationBarView = null;
- }
-
- if (mLeftNavigationBarWindow != null) {
- mLeftNavigationBarWindow.removeAllViews();
- mLeftNavigationBarView = null;
- }
-
- if (mRightNavigationBarWindow != null) {
- mRightNavigationBarWindow.removeAllViews();
- mRightNavigationBarView = null;
- }
-
- buildNavBarContent();
- // If the UI was rebuilt (day/night change or user change) while the keyguard was up we need
- // to correctly respect that state.
- if (mKeyguardStateControllerLazy.get().isShowing()) {
- mCarNavigationBarController.showAllKeyguardButtons(isDeviceSetupForUser());
- } else {
- mCarNavigationBarController.hideAllKeyguardButtons(isDeviceSetupForUser());
- }
-
- // Upon restarting the Navigation Bar, CarFacetButtonController should immediately apply the
- // selection state that reflects the current task stack.
- mButtonSelectionStateListener.onTaskStackChanged();
- }
-
- private boolean isDeviceSetupForUser() {
- return mDeviceIsSetUpForUser && !mIsUserSetupInProgress;
- }
-
- private void createNavigationBar(RegisterStatusBarResult result) {
- buildNavBarWindows();
- buildNavBarContent();
- attachNavBarWindows();
-
- // Try setting up the initial state of the nav bar if applicable.
- if (result != null) {
- setImeWindowStatus(Display.DEFAULT_DISPLAY, result.mImeToken,
- result.mImeWindowVis, result.mImeBackDisposition,
- result.mShowImeSwitcher);
- }
- }
-
- private void buildNavBarWindows() {
- mTopNavigationBarWindow = mCarNavigationBarController.getTopWindow();
- mBottomNavigationBarWindow = mCarNavigationBarController.getBottomWindow();
- mLeftNavigationBarWindow = mCarNavigationBarController.getLeftWindow();
- mRightNavigationBarWindow = mCarNavigationBarController.getRightWindow();
- }
-
- private void buildNavBarContent() {
- mTopNavigationBarView = mCarNavigationBarController.getTopBar(isDeviceSetupForUser());
- if (mTopNavigationBarView != null) {
- mSystemBarConfigs.insetSystemBar(SystemBarConfigs.TOP, mTopNavigationBarView);
- mSystemBarConfigs.setInsetUpdater(SystemBarConfigs.TOP, mTopNavigationBarView);
- mTopNavigationBarWindow.addView(mTopNavigationBarView);
- }
-
- mBottomNavigationBarView = mCarNavigationBarController.getBottomBar(isDeviceSetupForUser());
- if (mBottomNavigationBarView != null) {
- mSystemBarConfigs.insetSystemBar(SystemBarConfigs.BOTTOM, mBottomNavigationBarView);
- mSystemBarConfigs.setInsetUpdater(SystemBarConfigs.BOTTOM, mBottomNavigationBarView);
- mBottomNavigationBarWindow.addView(mBottomNavigationBarView);
- }
-
- mLeftNavigationBarView = mCarNavigationBarController.getLeftBar(isDeviceSetupForUser());
- if (mLeftNavigationBarView != null) {
- mSystemBarConfigs.insetSystemBar(SystemBarConfigs.LEFT, mLeftNavigationBarView);
- mSystemBarConfigs.setInsetUpdater(SystemBarConfigs.LEFT, mLeftNavigationBarView);
- mLeftNavigationBarWindow.addView(mLeftNavigationBarView);
- }
-
- mRightNavigationBarView = mCarNavigationBarController.getRightBar(isDeviceSetupForUser());
- if (mRightNavigationBarView != null) {
- mSystemBarConfigs.insetSystemBar(SystemBarConfigs.RIGHT, mRightNavigationBarView);
- mSystemBarConfigs.setInsetUpdater(SystemBarConfigs.RIGHT, mRightNavigationBarView);
- mRightNavigationBarWindow.addView(mRightNavigationBarView);
- }
- }
-
- private void attachNavBarWindows() {
- mSystemBarConfigs.getSystemBarSidesByZOrder().forEach(this::attachNavBarBySide);
- }
-
- private void attachNavBarBySide(int side) {
- switch (side) {
- case SystemBarConfigs.TOP:
- if (mTopNavigationBarWindow != null) {
- mWindowManager.addView(mTopNavigationBarWindow,
- mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.TOP));
- }
- break;
- case SystemBarConfigs.BOTTOM:
- if (mBottomNavigationBarWindow != null && !mBottomNavBarVisible) {
- mBottomNavBarVisible = true;
-
- mWindowManager.addView(mBottomNavigationBarWindow,
- mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.BOTTOM));
- }
- break;
- case SystemBarConfigs.LEFT:
- if (mLeftNavigationBarWindow != null) {
- mWindowManager.addView(mLeftNavigationBarWindow,
- mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.LEFT));
- }
- break;
- case SystemBarConfigs.RIGHT:
- if (mRightNavigationBarWindow != null) {
- mWindowManager.addView(mRightNavigationBarWindow,
- mSystemBarConfigs.getLayoutParamsBySide(SystemBarConfigs.RIGHT));
- }
- break;
- default:
- return;
- }
- }
-
- /**
- * We register for soft keyboard visibility events such that we can hide the navigation bar
- * giving more screen space to the IME. Note: this is optional and controlled by
- * {@code com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard}.
- */
- @Override
- public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
- boolean showImeSwitcher) {
- if (mContext.getDisplayId() != displayId) {
- return;
- }
-
- boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
-
- if (mHideTopBarForKeyboard) {
- mCarNavigationBarController.setTopWindowVisibility(
- isKeyboardVisible ? View.GONE : View.VISIBLE);
- }
-
- if (mHideBottomBarForKeyboard) {
- mCarNavigationBarController.setBottomWindowVisibility(
- isKeyboardVisible ? View.GONE : View.VISIBLE);
- }
-
- if (mHideLeftBarForKeyboard) {
- mCarNavigationBarController.setLeftWindowVisibility(
- isKeyboardVisible ? View.GONE : View.VISIBLE);
- }
- if (mHideRightBarForKeyboard) {
- mCarNavigationBarController.setRightWindowVisibility(
- isKeyboardVisible ? View.GONE : View.VISIBLE);
- }
- }
-
- @Override
- public void onSystemBarAppearanceChanged(
- int displayId,
- @WindowInsetsController.Appearance int appearance,
- AppearanceRegion[] appearanceRegions,
- boolean navbarColorManagedByIme) {
- if (displayId != mDisplayId) {
- return;
- }
- boolean barModeChanged = updateStatusBarMode(
- mStatusBarTransientShown ? MODE_SEMI_TRANSPARENT : MODE_TRANSPARENT);
- int numStacks = appearanceRegions.length;
- boolean stackAppearancesChanged = mAppearanceRegions.length != numStacks;
- for (int i = 0; i < numStacks && !stackAppearancesChanged; i++) {
- stackAppearancesChanged |= !appearanceRegions[i].equals(mAppearanceRegions[i]);
- }
- if (stackAppearancesChanged || barModeChanged) {
- mAppearanceRegions = appearanceRegions;
- updateStatusBarAppearance();
- }
- }
-
- private void updateStatusBarAppearance() {
- int numStacks = mAppearanceRegions.length;
- int numLightStacks = 0;
-
- // We can only have maximum one light stack.
- int indexLightStack = -1;
-
- for (int i = 0; i < numStacks; i++) {
- if (isLight(mAppearanceRegions[i].getAppearance())) {
- numLightStacks++;
- indexLightStack = i;
- }
- }
-
- // If all stacks are light, all icons become dark.
- if (numLightStacks == numStacks) {
- mStatusBarIconController.setIconsDarkArea(null);
- mStatusBarIconController.getTransitionsController().setIconsDark(
- /* dark= */ true, /* animate= */ false);
- } else if (numLightStacks == 0) {
- // If no one is light, all icons become white.
- mStatusBarIconController.getTransitionsController().setIconsDark(
- /* dark= */ false, /* animate= */ false);
- } else {
- // Not the same for every stack, update icons in area only.
- mStatusBarIconController.setIconsDarkArea(
- mAppearanceRegions[indexLightStack].getBounds());
- mStatusBarIconController.getTransitionsController().setIconsDark(
- /* dark= */ true, /* animate= */ false);
- }
- }
-
- private static boolean isLight(int appearance) {
- return (appearance & APPEARANCE_LIGHT_STATUS_BARS) != 0;
- }
-
- @Override
- public void showTransient(int displayId, int[] types) {
- if (displayId != mDisplayId) {
- return;
- }
- if (containsType(types, ITYPE_STATUS_BAR)) {
- if (!mStatusBarTransientShown) {
- mStatusBarTransientShown = true;
- handleTransientChanged();
- }
- }
- if (containsType(types, ITYPE_NAVIGATION_BAR)) {
- if (!mNavBarTransientShown) {
- mNavBarTransientShown = true;
- handleTransientChanged();
- }
- }
- }
-
- @Override
- public void abortTransient(int displayId, int[] types) {
- if (displayId != mDisplayId) {
- return;
- }
- if (!containsType(types, ITYPE_STATUS_BAR) && !containsType(types, ITYPE_NAVIGATION_BAR)) {
- return;
- }
- clearTransient();
- }
-
- private void clearTransient() {
- if (mStatusBarTransientShown) {
- mStatusBarTransientShown = false;
- handleTransientChanged();
- }
- if (mNavBarTransientShown) {
- mNavBarTransientShown = false;
- handleTransientChanged();
- }
- }
-
- @VisibleForTesting
- boolean isStatusBarTransientShown() {
- return mStatusBarTransientShown;
- }
-
- @VisibleForTesting
- boolean isNavBarTransientShown() {
- return mNavBarTransientShown;
- }
-
- @Override
- public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- pw.print(" mTaskStackListener=");
- pw.println(mButtonSelectionStateListener);
- pw.print(" mBottomNavigationBarView=");
- pw.println(mBottomNavigationBarView);
- }
-
- private void handleTransientChanged() {
- updateStatusBarMode(mStatusBarTransientShown ? MODE_SEMI_TRANSPARENT : MODE_TRANSPARENT);
- updateNavBarMode(mNavBarTransientShown ? MODE_SEMI_TRANSPARENT : MODE_TRANSPARENT);
- }
-
- // Returns true if the status bar mode has changed.
- private boolean updateStatusBarMode(int barMode) {
- if (mStatusBarMode != barMode) {
- mStatusBarMode = barMode;
- mAutoHideController.touchAutoHide();
- return true;
- }
- return false;
- }
-
- // Returns true if the nav bar mode has changed.
- private boolean updateNavBarMode(int barMode) {
- if (mNavigationBarMode != barMode) {
- mNavigationBarMode = barMode;
- mAutoHideController.touchAutoHide();
- return true;
- }
- return false;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java
deleted file mode 100644
index 4fb522008578..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarController.java
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.content.Context;
-import android.view.View;
-import android.view.ViewGroup;
-
-import androidx.annotation.Nullable;
-
-import com.android.systemui.car.hvac.HvacController;
-import com.android.systemui.car.statusbar.UserNameViewController;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-import dagger.Lazy;
-
-/** A single class which controls the navigation bar views. */
-@SysUISingleton
-public class CarNavigationBarController {
-
- private final Context mContext;
- private final NavigationBarViewFactory mNavigationBarViewFactory;
- private final ButtonSelectionStateController mButtonSelectionStateController;
- private final ButtonRoleHolderController mButtonRoleHolderController;
- private final Lazy<HvacController> mHvacControllerLazy;
- private final Lazy<UserNameViewController> mUserNameViewControllerLazy;
-
- private boolean mShowTop;
- private boolean mShowBottom;
- private boolean mShowLeft;
- private boolean mShowRight;
-
- private View.OnTouchListener mTopBarTouchListener;
- private View.OnTouchListener mBottomBarTouchListener;
- private View.OnTouchListener mLeftBarTouchListener;
- private View.OnTouchListener mRightBarTouchListener;
- private NotificationsShadeController mNotificationsShadeController;
-
- private CarNavigationBarView mTopView;
- private CarNavigationBarView mBottomView;
- private CarNavigationBarView mLeftView;
- private CarNavigationBarView mRightView;
-
- @Inject
- public CarNavigationBarController(Context context,
- NavigationBarViewFactory navigationBarViewFactory,
- ButtonSelectionStateController buttonSelectionStateController,
- Lazy<HvacController> hvacControllerLazy,
- Lazy<UserNameViewController> userNameViewControllerLazy,
- ButtonRoleHolderController buttonRoleHolderController,
- SystemBarConfigs systemBarConfigs) {
- mContext = context;
- mNavigationBarViewFactory = navigationBarViewFactory;
- mButtonSelectionStateController = buttonSelectionStateController;
- mHvacControllerLazy = hvacControllerLazy;
- mUserNameViewControllerLazy = userNameViewControllerLazy;
- mButtonRoleHolderController = buttonRoleHolderController;
-
- // Read configuration.
- mShowTop = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.TOP);
- mShowBottom = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.BOTTOM);
- mShowLeft = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.LEFT);
- mShowRight = systemBarConfigs.getEnabledStatusBySide(SystemBarConfigs.RIGHT);
- }
-
- /**
- * Hides all system bars.
- */
- public void hideBars() {
- setTopWindowVisibility(View.GONE);
- setBottomWindowVisibility(View.GONE);
- setLeftWindowVisibility(View.GONE);
- setRightWindowVisibility(View.GONE);
- }
-
- /**
- * Shows all system bars.
- */
- public void showBars() {
- setTopWindowVisibility(View.VISIBLE);
- setBottomWindowVisibility(View.VISIBLE);
- setLeftWindowVisibility(View.VISIBLE);
- setRightWindowVisibility(View.VISIBLE);
- }
-
- /** Connect to hvac service. */
- public void connectToHvac() {
- mHvacControllerLazy.get().connectToCarService();
- }
-
- /** Clean up */
- public void removeAll() {
- mHvacControllerLazy.get().removeAllComponents();
- mButtonSelectionStateController.removeAll();
- mButtonRoleHolderController.removeAll();
- mUserNameViewControllerLazy.get().removeAll();
- }
-
- /** Gets the top window if configured to do so. */
- @Nullable
- public ViewGroup getTopWindow() {
- return mShowTop ? mNavigationBarViewFactory.getTopWindow() : null;
- }
-
- /** Gets the bottom window if configured to do so. */
- @Nullable
- public ViewGroup getBottomWindow() {
- return mShowBottom ? mNavigationBarViewFactory.getBottomWindow() : null;
- }
-
- /** Gets the left window if configured to do so. */
- @Nullable
- public ViewGroup getLeftWindow() {
- return mShowLeft ? mNavigationBarViewFactory.getLeftWindow() : null;
- }
-
- /** Gets the right window if configured to do so. */
- @Nullable
- public ViewGroup getRightWindow() {
- return mShowRight ? mNavigationBarViewFactory.getRightWindow() : null;
- }
-
- /** Toggles the top nav bar visibility. */
- public boolean setTopWindowVisibility(@View.Visibility int visibility) {
- return setWindowVisibility(getTopWindow(), visibility);
- }
-
- /** Toggles the bottom nav bar visibility. */
- public boolean setBottomWindowVisibility(@View.Visibility int visibility) {
- return setWindowVisibility(getBottomWindow(), visibility);
- }
-
- /** Toggles the left nav bar visibility. */
- public boolean setLeftWindowVisibility(@View.Visibility int visibility) {
- return setWindowVisibility(getLeftWindow(), visibility);
- }
-
- /** Toggles the right nav bar visibility. */
- public boolean setRightWindowVisibility(@View.Visibility int visibility) {
- return setWindowVisibility(getRightWindow(), visibility);
- }
-
- private boolean setWindowVisibility(ViewGroup window, @View.Visibility int visibility) {
- if (window == null) {
- return false;
- }
-
- if (window.getVisibility() == visibility) {
- return false;
- }
-
- window.setVisibility(visibility);
- return true;
- }
-
- /** Gets the top navigation bar with the appropriate listeners set. */
- @Nullable
- public CarNavigationBarView getTopBar(boolean isSetUp) {
- if (!mShowTop) {
- return null;
- }
-
- mTopView = mNavigationBarViewFactory.getTopBar(isSetUp);
- setupBar(mTopView, mTopBarTouchListener, mNotificationsShadeController);
- return mTopView;
- }
-
- /** Gets the bottom navigation bar with the appropriate listeners set. */
- @Nullable
- public CarNavigationBarView getBottomBar(boolean isSetUp) {
- if (!mShowBottom) {
- return null;
- }
-
- mBottomView = mNavigationBarViewFactory.getBottomBar(isSetUp);
- setupBar(mBottomView, mBottomBarTouchListener, mNotificationsShadeController);
- return mBottomView;
- }
-
- /** Gets the left navigation bar with the appropriate listeners set. */
- @Nullable
- public CarNavigationBarView getLeftBar(boolean isSetUp) {
- if (!mShowLeft) {
- return null;
- }
-
- mLeftView = mNavigationBarViewFactory.getLeftBar(isSetUp);
- setupBar(mLeftView, mLeftBarTouchListener, mNotificationsShadeController);
- return mLeftView;
- }
-
- /** Gets the right navigation bar with the appropriate listeners set. */
- @Nullable
- public CarNavigationBarView getRightBar(boolean isSetUp) {
- if (!mShowRight) {
- return null;
- }
-
- mRightView = mNavigationBarViewFactory.getRightBar(isSetUp);
- setupBar(mRightView, mRightBarTouchListener, mNotificationsShadeController);
- return mRightView;
- }
-
- private void setupBar(CarNavigationBarView view, View.OnTouchListener statusBarTouchListener,
- NotificationsShadeController notifShadeController) {
- view.setStatusBarWindowTouchListener(statusBarTouchListener);
- view.setNotificationsPanelController(notifShadeController);
- mButtonSelectionStateController.addAllButtonsWithSelectionState(view);
- mButtonRoleHolderController.addAllButtonsWithRoleName(view);
- mHvacControllerLazy.get().addTemperatureViewToController(view);
- mUserNameViewControllerLazy.get().addUserNameView(view);
- }
-
- /** Sets a touch listener for the top navigation bar. */
- public void registerTopBarTouchListener(View.OnTouchListener listener) {
- mTopBarTouchListener = listener;
- if (mTopView != null) {
- mTopView.setStatusBarWindowTouchListener(mTopBarTouchListener);
- }
- }
-
- /** Sets a touch listener for the bottom navigation bar. */
- public void registerBottomBarTouchListener(View.OnTouchListener listener) {
- mBottomBarTouchListener = listener;
- if (mBottomView != null) {
- mBottomView.setStatusBarWindowTouchListener(mBottomBarTouchListener);
- }
- }
-
- /** Sets a touch listener for the left navigation bar. */
- public void registerLeftBarTouchListener(View.OnTouchListener listener) {
- mLeftBarTouchListener = listener;
- if (mLeftView != null) {
- mLeftView.setStatusBarWindowTouchListener(mLeftBarTouchListener);
- }
- }
-
- /** Sets a touch listener for the right navigation bar. */
- public void registerRightBarTouchListener(View.OnTouchListener listener) {
- mRightBarTouchListener = listener;
- if (mRightView != null) {
- mRightView.setStatusBarWindowTouchListener(mRightBarTouchListener);
- }
- }
-
- /** Sets a notification controller which toggles the notification panel. */
- public void registerNotificationController(
- NotificationsShadeController notificationsShadeController) {
- mNotificationsShadeController = notificationsShadeController;
- if (mTopView != null) {
- mTopView.setNotificationsPanelController(mNotificationsShadeController);
- }
- if (mBottomView != null) {
- mBottomView.setNotificationsPanelController(mNotificationsShadeController);
- }
- if (mLeftView != null) {
- mLeftView.setNotificationsPanelController(mNotificationsShadeController);
- }
- if (mRightView != null) {
- mRightView.setNotificationsPanelController(mNotificationsShadeController);
- }
- }
-
- /**
- * Shows all of the keyguard specific buttons on the valid instances of
- * {@link CarNavigationBarView}.
- */
- public void showAllKeyguardButtons(boolean isSetUp) {
- checkAllBars(isSetUp);
- if (mTopView != null) {
- mTopView.showKeyguardButtons();
- }
- if (mBottomView != null) {
- mBottomView.showKeyguardButtons();
- }
- if (mLeftView != null) {
- mLeftView.showKeyguardButtons();
- }
- if (mRightView != null) {
- mRightView.showKeyguardButtons();
- }
- }
-
- /**
- * Hides all of the keyguard specific buttons on the valid instances of
- * {@link CarNavigationBarView}.
- */
- public void hideAllKeyguardButtons(boolean isSetUp) {
- checkAllBars(isSetUp);
- if (mTopView != null) {
- mTopView.hideKeyguardButtons();
- }
- if (mBottomView != null) {
- mBottomView.hideKeyguardButtons();
- }
- if (mLeftView != null) {
- mLeftView.hideKeyguardButtons();
- }
- if (mRightView != null) {
- mRightView.hideKeyguardButtons();
- }
- }
-
- /** Toggles whether the notifications icon has an unseen indicator or not. */
- public void toggleAllNotificationsUnseenIndicator(boolean isSetUp, boolean hasUnseen) {
- checkAllBars(isSetUp);
- if (mTopView != null) {
- mTopView.toggleNotificationUnseenIndicator(hasUnseen);
- }
- if (mBottomView != null) {
- mBottomView.toggleNotificationUnseenIndicator(hasUnseen);
- }
- if (mLeftView != null) {
- mLeftView.toggleNotificationUnseenIndicator(hasUnseen);
- }
- if (mRightView != null) {
- mRightView.toggleNotificationUnseenIndicator(hasUnseen);
- }
- }
-
- /** Interface for controlling the notifications shade. */
- public interface NotificationsShadeController {
- /** Toggles the visibility of the notifications shade. */
- void togglePanel();
-
- /** Returns {@code true} if the panel is open. */
- boolean isNotificationPanelOpen();
- }
-
- private void checkAllBars(boolean isSetUp) {
- mTopView = getTopBar(isSetUp);
- mBottomView = getBottomBar(isSetUp);
- mLeftView = getLeftBar(isSetUp);
- mRightView = getRightBar(isSetUp);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java
deleted file mode 100644
index ab401bbf06bb..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationBarView.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.LinearLayout;
-
-import com.android.systemui.Dependency;
-import com.android.systemui.R;
-import com.android.systemui.car.navigationbar.CarNavigationBarController.NotificationsShadeController;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.phone.StatusBarIconController;
-
-/**
- * A custom navigation bar for the automotive use case.
- * <p>
- * The navigation bar in the automotive use case is more like a list of shortcuts, rendered
- * in a linear layout.
- */
-public class CarNavigationBarView extends LinearLayout {
- private final boolean mConsumeTouchWhenPanelOpen;
-
- private View mNavButtons;
- private CarNavigationButton mNotificationsButton;
- private NotificationsShadeController mNotificationsShadeController;
- private View mLockScreenButtons;
- // used to wire in open/close gestures for notifications
- private OnTouchListener mStatusBarWindowTouchListener;
-
- public CarNavigationBarView(Context context, AttributeSet attrs) {
- super(context, attrs);
- mConsumeTouchWhenPanelOpen = getResources().getBoolean(
- R.bool.config_consumeNavigationBarTouchWhenNotificationPanelOpen);
- }
-
- @Override
- public void onFinishInflate() {
- mNavButtons = findViewById(R.id.nav_buttons);
- mLockScreenButtons = findViewById(R.id.lock_screen_nav_buttons);
-
- mNotificationsButton = findViewById(R.id.notifications);
- if (mNotificationsButton != null) {
- mNotificationsButton.setOnClickListener(this::onNotificationsClick);
- }
- View mStatusIcons = findViewById(R.id.statusIcons);
- if (mStatusIcons != null) {
- // Attach the controllers for Status icons such as wifi and bluetooth if the standard
- // container is in the view.
- StatusBarIconController.DarkIconManager mDarkIconManager =
- new StatusBarIconController.DarkIconManager(
- mStatusIcons.findViewById(R.id.statusIcons),
- Dependency.get(CommandQueue.class));
- mDarkIconManager.setShouldLog(true);
- Dependency.get(StatusBarIconController.class).addIconGroup(mDarkIconManager);
- }
- // Needs to be clickable so that it will receive ACTION_MOVE events.
- setClickable(true);
- // Needs to not be focusable so rotary won't highlight the entire nav bar.
- setFocusable(false);
- }
-
- // Used to forward touch events even if the touch was initiated from a child component
- @Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
- if (mStatusBarWindowTouchListener != null) {
- boolean shouldConsumeEvent = mNotificationsShadeController == null ? false
- : mNotificationsShadeController.isNotificationPanelOpen();
-
- // Forward touch events to the status bar window so it can drag
- // windows if required (Notification shade)
- mStatusBarWindowTouchListener.onTouch(this, ev);
-
- if (mConsumeTouchWhenPanelOpen && shouldConsumeEvent) {
- return true;
- }
- }
- return super.onInterceptTouchEvent(ev);
- }
-
- /** Sets the notifications panel controller. */
- public void setNotificationsPanelController(NotificationsShadeController controller) {
- mNotificationsShadeController = controller;
- }
-
- /** Gets the notifications panel controller. */
- public NotificationsShadeController getNotificationsPanelController() {
- return mNotificationsShadeController;
- }
-
- /**
- * Sets a touch listener that will be called from onInterceptTouchEvent and onTouchEvent
- *
- * @param statusBarWindowTouchListener The listener to call from touch and intercept touch
- */
- public void setStatusBarWindowTouchListener(OnTouchListener statusBarWindowTouchListener) {
- mStatusBarWindowTouchListener = statusBarWindowTouchListener;
- }
-
- /** Gets the touch listener that will be called from onInterceptTouchEvent and onTouchEvent. */
- public OnTouchListener getStatusBarWindowTouchListener() {
- return mStatusBarWindowTouchListener;
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- if (mStatusBarWindowTouchListener != null) {
- mStatusBarWindowTouchListener.onTouch(this, event);
- }
- return super.onTouchEvent(event);
- }
-
- protected void onNotificationsClick(View v) {
- if (mNotificationsShadeController != null) {
- mNotificationsShadeController.togglePanel();
- }
- }
-
- /**
- * If there are buttons declared in the layout they will be shown and the normal
- * Nav buttons will be hidden.
- */
- public void showKeyguardButtons() {
- if (mLockScreenButtons == null) {
- return;
- }
- mLockScreenButtons.setVisibility(View.VISIBLE);
- mNavButtons.setVisibility(View.GONE);
- }
-
- /**
- * If there are buttons declared in the layout they will be hidden and the normal
- * Nav buttons will be shown.
- */
- public void hideKeyguardButtons() {
- if (mLockScreenButtons == null) return;
-
- mNavButtons.setVisibility(View.VISIBLE);
- mLockScreenButtons.setVisibility(View.GONE);
- }
-
- /**
- * Toggles the notification unseen indicator on/off.
- *
- * @param hasUnseen true if the unseen notification count is great than 0.
- */
- public void toggleNotificationUnseenIndicator(Boolean hasUnseen) {
- if (mNotificationsButton == null) return;
-
- mNotificationsButton.setUnseen(hasUnseen);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationButton.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationButton.java
deleted file mode 100644
index d2b931b3624b..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/CarNavigationButton.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.app.ActivityOptions;
-import android.app.role.RoleManager;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
-import android.os.Build;
-import android.os.UserHandle;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.Display;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.systemui.R;
-import com.android.systemui.statusbar.AlphaOptimizedImageView;
-
-import java.net.URISyntaxException;
-
-/**
- * CarNavigationButton is an image button that allows for a bit more configuration at the
- * xml file level. This allows for more control via overlays instead of having to update
- * code.
- */
-public class CarNavigationButton extends LinearLayout {
-
- protected static final float DEFAULT_SELECTED_ALPHA = 1f;
- protected static final float DEFAULT_UNSELECTED_ALPHA = 0.75f;
-
- private static final String TAG = "CarNavigationButton";
- private static final String BUTTON_FILTER_DELIMITER = ";";
- private static final String EXTRA_BUTTON_CATEGORIES = "categories";
- private static final String EXTRA_BUTTON_PACKAGES = "packages";
-
- private Context mContext;
- private AlphaOptimizedImageView mIcon;
- private AlphaOptimizedImageView mMoreIcon;
- private ImageView mUnseenIcon;
- private String mIntent;
- private String mLongIntent;
- private boolean mBroadcastIntent;
- private boolean mHasUnseen = false;
- private boolean mSelected = false;
- private float mSelectedAlpha;
- private float mUnselectedAlpha;
- private int mSelectedIconResourceId;
- private int mIconResourceId;
- private Drawable mAppIcon;
- private boolean mIsDefaultAppIconForRoleEnabled;
- private String[] mComponentNames;
- /** App categories that are to be used with this widget */
- private String[] mButtonCategories;
- /** App packages that are allowed to be used with this widget */
- private String[] mButtonPackages;
- /** Whether to display more icon beneath the primary icon when the button is selected */
- private boolean mShowMoreWhenSelected = false;
- /** Whether to highlight the button if the active application is associated with it */
- private boolean mHighlightWhenSelected = false;
-
- public CarNavigationButton(Context context, AttributeSet attrs) {
- super(context, attrs);
- mContext = context;
- View.inflate(mContext, R.layout.car_navigation_button, /* root= */ this);
- // CarNavigationButton attrs
- TypedArray typedArray = context.obtainStyledAttributes(attrs,
- R.styleable.CarNavigationButton);
-
- setUpIntents(typedArray);
- setUpIcons(typedArray);
- typedArray.recycle();
- }
-
- /**
- * @param selected true if should indicate if this is a selected state, false otherwise
- */
- public void setSelected(boolean selected) {
- super.setSelected(selected);
- mSelected = selected;
-
- if (mHighlightWhenSelected) {
- setAlpha(mSelected ? mSelectedAlpha : mUnselectedAlpha);
- }
-
- if (mShowMoreWhenSelected && mMoreIcon != null) {
- mMoreIcon.setVisibility(selected ? VISIBLE : GONE);
- }
- updateImage();
- }
-
- /**
- * @param hasUnseen true if should indicate if this is a Unseen state, false otherwise.
- */
- public void setUnseen(boolean hasUnseen) {
- mHasUnseen = hasUnseen;
- updateImage();
- }
-
- /**
- * Sets the current icon of the default application associated with this button.
- */
- public void setAppIcon(Drawable appIcon) {
- mAppIcon = appIcon;
- updateImage();
- }
-
- /** Gets the icon of the app currently associated to the role of this button. */
- @VisibleForTesting
- protected Drawable getAppIcon() {
- return mAppIcon;
- }
-
- /** Gets whether the icon is in an unseen state. */
- public boolean getUnseen() {
- return mHasUnseen;
- }
-
- /**
- * @return The app categories the component represents
- */
- public String[] getCategories() {
- if (mButtonCategories == null) {
- return new String[0];
- }
- return mButtonCategories;
- }
-
- /**
- * @return The valid packages that should be considered.
- */
- public String[] getPackages() {
- if (mButtonPackages == null) {
- return new String[0];
- }
- return mButtonPackages;
- }
-
- /**
- * @return The list of component names.
- */
- public String[] getComponentName() {
- if (mComponentNames == null) {
- return new String[0];
- }
- return mComponentNames;
- }
-
- /**
- * Subclasses should override this method to return the {@link RoleManager} role associated
- * with this button.
- */
- protected String getRoleName() {
- return null;
- }
-
- /**
- * @return true if this button should show the icon of the default application for the
- * role returned by {@link #getRoleName()}.
- */
- protected boolean isDefaultAppIconForRoleEnabled() {
- return mIsDefaultAppIconForRoleEnabled;
- }
-
- /**
- * @return The id of the display the button is on or Display.INVALID_DISPLAY if it's not yet on
- * a display.
- */
- protected int getDisplayId() {
- Display display = getDisplay();
- if (display == null) {
- return Display.INVALID_DISPLAY;
- }
- return display.getDisplayId();
- }
-
- protected boolean hasSelectionState() {
- return mHighlightWhenSelected || mShowMoreWhenSelected;
- }
-
- /**
- * Sets up intents for click, long touch, and broadcast.
- */
- protected void setUpIntents(TypedArray typedArray) {
- mIntent = typedArray.getString(R.styleable.CarNavigationButton_intent);
- mLongIntent = typedArray.getString(R.styleable.CarNavigationButton_longIntent);
- mBroadcastIntent = typedArray.getBoolean(R.styleable.CarNavigationButton_broadcast, false);
-
- String categoryString = typedArray.getString(R.styleable.CarNavigationButton_categories);
- String packageString = typedArray.getString(R.styleable.CarNavigationButton_packages);
- String componentNameString =
- typedArray.getString(R.styleable.CarNavigationButton_componentNames);
-
- try {
- if (mIntent != null) {
- final Intent intent = Intent.parseUri(mIntent, Intent.URI_INTENT_SCHEME);
- setOnClickListener(getButtonClickListener(intent));
- if (packageString != null) {
- mButtonPackages = packageString.split(BUTTON_FILTER_DELIMITER);
- intent.putExtra(EXTRA_BUTTON_PACKAGES, mButtonPackages);
- }
- if (categoryString != null) {
- mButtonCategories = categoryString.split(BUTTON_FILTER_DELIMITER);
- intent.putExtra(EXTRA_BUTTON_CATEGORIES, mButtonCategories);
- }
- if (componentNameString != null) {
- mComponentNames = componentNameString.split(BUTTON_FILTER_DELIMITER);
- }
- }
- } catch (URISyntaxException e) {
- throw new RuntimeException("Failed to attach intent", e);
- }
-
- try {
- if (mLongIntent != null && (Build.IS_ENG || Build.IS_USERDEBUG)) {
- final Intent intent = Intent.parseUri(mLongIntent, Intent.URI_INTENT_SCHEME);
- setOnLongClickListener(getButtonLongClickListener(intent));
- }
- } catch (URISyntaxException e) {
- throw new RuntimeException("Failed to attach long press intent", e);
- }
- }
-
- /** Defines the behavior of a button click. */
- protected OnClickListener getButtonClickListener(Intent toSend) {
- return v -> {
- mContext.sendBroadcastAsUser(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS),
- UserHandle.CURRENT);
- try {
- if (mBroadcastIntent) {
- mContext.sendBroadcastAsUser(toSend, UserHandle.CURRENT);
- return;
- }
- ActivityOptions options = ActivityOptions.makeBasic();
- options.setLaunchDisplayId(mContext.getDisplayId());
- mContext.startActivityAsUser(toSend, options.toBundle(),
- UserHandle.CURRENT);
- } catch (Exception e) {
- Log.e(TAG, "Failed to launch intent", e);
- }
- };
- }
-
- /** Defines the behavior of a long click. */
- protected OnLongClickListener getButtonLongClickListener(Intent toSend) {
- return v -> {
- mContext.sendBroadcastAsUser(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS),
- UserHandle.CURRENT);
- try {
- ActivityOptions options = ActivityOptions.makeBasic();
- options.setLaunchDisplayId(mContext.getDisplayId());
- mContext.startActivityAsUser(toSend, options.toBundle(),
- UserHandle.CURRENT);
- } catch (Exception e) {
- Log.e(TAG, "Failed to launch intent", e);
- }
- // consume event either way
- return true;
- };
- }
-
- /**
- * Initializes view-related aspects of the button.
- */
- private void setUpIcons(TypedArray typedArray) {
- mSelectedAlpha = typedArray.getFloat(
- R.styleable.CarNavigationButton_selectedAlpha, DEFAULT_SELECTED_ALPHA);
- mUnselectedAlpha = typedArray.getFloat(
- R.styleable.CarNavigationButton_unselectedAlpha, DEFAULT_UNSELECTED_ALPHA);
- mHighlightWhenSelected = typedArray.getBoolean(
- R.styleable.CarNavigationButton_highlightWhenSelected,
- mHighlightWhenSelected);
- mShowMoreWhenSelected = typedArray.getBoolean(
- R.styleable.CarNavigationButton_showMoreWhenSelected,
- mShowMoreWhenSelected);
-
- mIconResourceId = typedArray.getResourceId(
- R.styleable.CarNavigationButton_icon, 0);
- mSelectedIconResourceId = typedArray.getResourceId(
- R.styleable.CarNavigationButton_selectedIcon, mIconResourceId);
- mIsDefaultAppIconForRoleEnabled = typedArray.getBoolean(
- R.styleable.CarNavigationButton_useDefaultAppIconForRole, false);
- mIcon = findViewById(R.id.car_nav_button_icon_image);
- // Always apply un-selected alpha regardless of if the button toggles alpha based on
- // selection state.
- setAlpha(mHighlightWhenSelected ? mUnselectedAlpha : mSelectedAlpha);
- mMoreIcon = findViewById(R.id.car_nav_button_more_icon);
- mUnseenIcon = findViewById(R.id.car_nav_button_unseen_icon);
- updateImage();
- }
-
- private void updateImage() {
- if (mIsDefaultAppIconForRoleEnabled && mAppIcon != null) {
- mIcon.setImageDrawable(mAppIcon);
- } else {
- mIcon.setImageResource(mSelected ? mSelectedIconResourceId : mIconResourceId);
- }
- mUnseenIcon.setVisibility(mHasUnseen ? VISIBLE : GONE);
- }
-
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java
deleted file mode 100644
index a473bb7423b7..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/NavigationBarViewFactory.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.content.Context;
-import android.util.ArrayMap;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-
-import androidx.annotation.LayoutRes;
-
-import com.android.car.ui.FocusParkingView;
-import com.android.systemui.R;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/** A factory that creates and caches views for navigation bars. */
-@SysUISingleton
-public class NavigationBarViewFactory {
-
- private static final String TAG = NavigationBarViewFactory.class.getSimpleName();
- private static final ArrayMap<Type, Integer> sLayoutMap = setupLayoutMapping();
-
- private static ArrayMap<Type, Integer> setupLayoutMapping() {
- ArrayMap<Type, Integer> map = new ArrayMap<>();
- map.put(Type.TOP, R.layout.car_top_navigation_bar);
- map.put(Type.TOP_UNPROVISIONED, R.layout.car_top_navigation_bar_unprovisioned);
- map.put(Type.BOTTOM, R.layout.car_navigation_bar);
- map.put(Type.BOTTOM_UNPROVISIONED, R.layout.car_navigation_bar_unprovisioned);
- map.put(Type.LEFT, R.layout.car_left_navigation_bar);
- map.put(Type.LEFT_UNPROVISIONED, R.layout.car_left_navigation_bar_unprovisioned);
- map.put(Type.RIGHT, R.layout.car_right_navigation_bar);
- map.put(Type.RIGHT_UNPROVISIONED, R.layout.car_right_navigation_bar_unprovisioned);
- return map;
- }
-
- private final Context mContext;
- private final ArrayMap<Type, CarNavigationBarView> mCachedViewMap = new ArrayMap<>(
- Type.values().length);
- private final ArrayMap<Type, ViewGroup> mCachedContainerMap = new ArrayMap<>();
-
- /** Type of navigation bar to be created. */
- private enum Type {
- TOP,
- TOP_UNPROVISIONED,
- BOTTOM,
- BOTTOM_UNPROVISIONED,
- LEFT,
- LEFT_UNPROVISIONED,
- RIGHT,
- RIGHT_UNPROVISIONED
- }
-
- @Inject
- public NavigationBarViewFactory(Context context) {
- mContext = context;
- }
-
- /** Gets the top window. */
- public ViewGroup getTopWindow() {
- return getWindowCached(Type.TOP);
- }
-
- /** Gets the bottom window. */
- public ViewGroup getBottomWindow() {
- return getWindowCached(Type.BOTTOM);
- }
-
- /** Gets the left window. */
- public ViewGroup getLeftWindow() {
- return getWindowCached(Type.LEFT);
- }
-
- /** Gets the right window. */
- public ViewGroup getRightWindow() {
- return getWindowCached(Type.RIGHT);
- }
-
- /** Gets the top bar. */
- public CarNavigationBarView getTopBar(boolean isSetUp) {
- return getBar(isSetUp, Type.TOP, Type.TOP_UNPROVISIONED);
- }
-
- /** Gets the bottom bar. */
- public CarNavigationBarView getBottomBar(boolean isSetUp) {
- return getBar(isSetUp, Type.BOTTOM, Type.BOTTOM_UNPROVISIONED);
- }
-
- /** Gets the left bar. */
- public CarNavigationBarView getLeftBar(boolean isSetUp) {
- return getBar(isSetUp, Type.LEFT, Type.LEFT_UNPROVISIONED);
- }
-
- /** Gets the right bar. */
- public CarNavigationBarView getRightBar(boolean isSetUp) {
- return getBar(isSetUp, Type.RIGHT, Type.RIGHT_UNPROVISIONED);
- }
-
- private ViewGroup getWindowCached(Type type) {
- if (mCachedContainerMap.containsKey(type)) {
- return mCachedContainerMap.get(type);
- }
-
- ViewGroup window = (ViewGroup) View.inflate(mContext,
- R.layout.navigation_bar_window, /* root= */ null);
- mCachedContainerMap.put(type, window);
- return mCachedContainerMap.get(type);
- }
-
- private CarNavigationBarView getBar(boolean isSetUp, Type provisioned, Type unprovisioned) {
- CarNavigationBarView view;
- if (isSetUp) {
- view = getBarCached(provisioned, sLayoutMap.get(provisioned));
- } else {
- view = getBarCached(unprovisioned, sLayoutMap.get(unprovisioned));
- }
-
- if (view == null) {
- String name = isSetUp ? provisioned.name() : unprovisioned.name();
- Log.e(TAG, "CarStatusBar failed inflate for " + name);
- throw new RuntimeException(
- "Unable to build " + name + " nav bar due to missing layout");
- }
- return view;
- }
-
- private CarNavigationBarView getBarCached(Type type, @LayoutRes int barLayout) {
- if (mCachedViewMap.containsKey(type)) {
- return mCachedViewMap.get(type);
- }
-
- CarNavigationBarView view = (CarNavigationBarView) View.inflate(mContext, barLayout,
- /* root= */ null);
-
- // Include a FocusParkingView at the beginning. The rotary controller "parks" the focus here
- // when the user navigates to another window. This is also used to prevent wrap-around.
- view.addView(new FocusParkingView(mContext), 0);
-
- mCachedViewMap.put(type, view);
- return mCachedViewMap.get(type);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java
deleted file mode 100644
index 92cf60006917..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import android.annotation.IntDef;
-import android.content.res.Resources;
-import android.graphics.PixelFormat;
-import android.util.ArrayMap;
-import android.util.ArraySet;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.InsetsState;
-import android.view.ViewGroup;
-import android.view.WindowInsets;
-import android.view.WindowManager;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.systemui.R;
-import com.android.systemui.car.notification.BottomNotificationPanelViewMediator;
-import com.android.systemui.car.notification.TopNotificationPanelViewMediator;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.inject.Inject;
-
-/**
- * Reads configs for system bars for each side (TOP, BOTTOM, LEFT, and RIGHT) and returns the
- * corresponding {@link android.view.WindowManager.LayoutParams} per the configuration.
- */
-@SysUISingleton
-public class SystemBarConfigs {
-
- private static final String TAG = SystemBarConfigs.class.getSimpleName();
- // The z-order from which system bars will start to appear on top of HUN's.
- private static final int HUN_ZORDER = 10;
-
- @IntDef(value = {TOP, BOTTOM, LEFT, RIGHT})
- @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
- private @interface SystemBarSide {
- }
-
- public static final int TOP = 0;
- public static final int BOTTOM = 1;
- public static final int LEFT = 2;
- public static final int RIGHT = 3;
-
- /*
- NOTE: The elements' order in the map below must be preserved as-is since the correct
- corresponding values are obtained by the index.
- */
- private static final int[] BAR_TYPE_MAP = {
- InsetsState.ITYPE_STATUS_BAR,
- InsetsState.ITYPE_NAVIGATION_BAR,
- InsetsState.ITYPE_CLIMATE_BAR,
- InsetsState.ITYPE_EXTRA_NAVIGATION_BAR
- };
-
- private static final Map<@SystemBarSide Integer, Integer> BAR_GRAVITY_MAP = new ArrayMap<>();
- private static final Map<@SystemBarSide Integer, String> BAR_TITLE_MAP = new ArrayMap<>();
- private static final Map<@SystemBarSide Integer, Integer> BAR_GESTURE_MAP = new ArrayMap<>();
-
- private final Resources mResources;
- private final Map<@SystemBarSide Integer, SystemBarConfig> mSystemBarConfigMap =
- new ArrayMap<>();
- private final List<@SystemBarSide Integer> mSystemBarSidesByZOrder = new ArrayList<>();
-
- private boolean mTopNavBarEnabled;
- private boolean mBottomNavBarEnabled;
- private boolean mLeftNavBarEnabled;
- private boolean mRightNavBarEnabled;
-
- @Inject
- public SystemBarConfigs(@Main Resources resources) {
- mResources = resources;
-
- populateMaps();
- readConfigs();
-
- checkEnabledBarsHaveUniqueBarTypes();
- checkAllOverlappingBarsHaveDifferentZOrders();
- checkSystemBarEnabledForNotificationPanel();
- checkHideBottomBarForKeyboardConfigSync();
-
- setInsetPaddingsForOverlappingCorners();
- sortSystemBarSidesByZOrder();
- }
-
- protected WindowManager.LayoutParams getLayoutParamsBySide(@SystemBarSide int side) {
- return mSystemBarConfigMap.get(side) != null
- ? mSystemBarConfigMap.get(side).getLayoutParams() : null;
- }
-
- protected boolean getEnabledStatusBySide(@SystemBarSide int side) {
- switch (side) {
- case TOP:
- return mTopNavBarEnabled;
- case BOTTOM:
- return mBottomNavBarEnabled;
- case LEFT:
- return mLeftNavBarEnabled;
- case RIGHT:
- return mRightNavBarEnabled;
- default:
- return false;
- }
- }
-
- protected boolean getHideForKeyboardBySide(@SystemBarSide int side) {
- return mSystemBarConfigMap.get(side) != null
- && mSystemBarConfigMap.get(side).getHideForKeyboard();
- }
-
- protected void insetSystemBar(@SystemBarSide int side, CarNavigationBarView view) {
- if (mSystemBarConfigMap.get(side) == null) return;
-
- int[] paddings = mSystemBarConfigMap.get(side).getPaddings();
- view.setPadding(paddings[2], paddings[0], paddings[3], paddings[1]);
- }
-
- protected void setInsetUpdater(@SystemBarSide int side, CarNavigationBarView view) {
- view.setOnApplyWindowInsetsListener((v, insets) -> {
- updateInsetPaddings(side, getSystemBarsVisibility(insets));
- insetSystemBar(side, view);
- return insets;
- });
- }
-
- protected List<Integer> getSystemBarSidesByZOrder() {
- return mSystemBarSidesByZOrder;
- }
-
- @VisibleForTesting
- void updateInsetPaddings(@SystemBarSide int side,
- Map<@SystemBarSide Integer, Boolean> barVisibilities) {
- SystemBarConfig currentConfig = mSystemBarConfigMap.get(side);
-
- if (currentConfig == null) return;
-
- if (isHorizontalBar(side)) {
- if (mLeftNavBarEnabled && currentConfig.getZOrder() < mSystemBarConfigMap.get(
- LEFT).getZOrder()) {
- currentConfig.setPaddingBySide(LEFT,
- barVisibilities.get(LEFT) ? mSystemBarConfigMap.get(LEFT).getGirth() : 0);
- }
- if (mRightNavBarEnabled && currentConfig.getZOrder() < mSystemBarConfigMap.get(
- RIGHT).getZOrder()) {
- currentConfig.setPaddingBySide(RIGHT,
- barVisibilities.get(RIGHT) ? mSystemBarConfigMap.get(RIGHT).getGirth() : 0);
- }
- }
- if (isVerticalBar(side)) {
- if (mTopNavBarEnabled && currentConfig.getZOrder() < mSystemBarConfigMap.get(
- TOP).getZOrder()) {
- currentConfig.setPaddingBySide(TOP,
- barVisibilities.get(TOP) ? mSystemBarConfigMap.get(TOP).getGirth() : 0);
- }
- if (mBottomNavBarEnabled && currentConfig.getZOrder() < mSystemBarConfigMap.get(
- BOTTOM).getZOrder()) {
- currentConfig.setPaddingBySide(BOTTOM,
- barVisibilities.get(BOTTOM) ? mSystemBarConfigMap.get(BOTTOM).getGirth()
- : 0);
- }
- }
- }
-
- @VisibleForTesting
- static int getHunZOrder() {
- return HUN_ZORDER;
- }
-
- private static void populateMaps() {
- BAR_GRAVITY_MAP.put(TOP, Gravity.TOP);
- BAR_GRAVITY_MAP.put(BOTTOM, Gravity.BOTTOM);
- BAR_GRAVITY_MAP.put(LEFT, Gravity.LEFT);
- BAR_GRAVITY_MAP.put(RIGHT, Gravity.RIGHT);
-
- BAR_TITLE_MAP.put(TOP, "TopCarSystemBar");
- BAR_TITLE_MAP.put(BOTTOM, "BottomCarSystemBar");
- BAR_TITLE_MAP.put(LEFT, "LeftCarSystemBar");
- BAR_TITLE_MAP.put(RIGHT, "RightCarSystemBar");
-
- BAR_GESTURE_MAP.put(TOP, InsetsState.ITYPE_TOP_MANDATORY_GESTURES);
- BAR_GESTURE_MAP.put(BOTTOM, InsetsState.ITYPE_BOTTOM_MANDATORY_GESTURES);
- BAR_GESTURE_MAP.put(LEFT, InsetsState.ITYPE_LEFT_MANDATORY_GESTURES);
- BAR_GESTURE_MAP.put(RIGHT, InsetsState.ITYPE_RIGHT_MANDATORY_GESTURES);
- }
-
- private void readConfigs() {
- mTopNavBarEnabled = mResources.getBoolean(R.bool.config_enableTopNavigationBar);
- mBottomNavBarEnabled = mResources.getBoolean(R.bool.config_enableBottomNavigationBar);
- mLeftNavBarEnabled = mResources.getBoolean(R.bool.config_enableLeftNavigationBar);
- mRightNavBarEnabled = mResources.getBoolean(R.bool.config_enableRightNavigationBar);
-
- if (mTopNavBarEnabled) {
- SystemBarConfig topBarConfig =
- new SystemBarConfigBuilder()
- .setSide(TOP)
- .setGirth(mResources.getDimensionPixelSize(
- R.dimen.car_top_navigation_bar_height))
- .setBarType(mResources.getInteger(R.integer.config_topSystemBarType))
- .setZOrder(mResources.getInteger(R.integer.config_topSystemBarZOrder))
- .setHideForKeyboard(mResources.getBoolean(
- R.bool.config_hideTopSystemBarForKeyboard))
- .build();
- mSystemBarConfigMap.put(TOP, topBarConfig);
- }
-
- if (mBottomNavBarEnabled) {
- SystemBarConfig bottomBarConfig =
- new SystemBarConfigBuilder()
- .setSide(BOTTOM)
- .setGirth(mResources.getDimensionPixelSize(
- R.dimen.car_bottom_navigation_bar_height))
- .setBarType(mResources.getInteger(R.integer.config_bottomSystemBarType))
- .setZOrder(
- mResources.getInteger(R.integer.config_bottomSystemBarZOrder))
- .setHideForKeyboard(mResources.getBoolean(
- R.bool.config_hideBottomSystemBarForKeyboard))
- .build();
- mSystemBarConfigMap.put(BOTTOM, bottomBarConfig);
- }
-
- if (mLeftNavBarEnabled) {
- SystemBarConfig leftBarConfig =
- new SystemBarConfigBuilder()
- .setSide(LEFT)
- .setGirth(mResources.getDimensionPixelSize(
- R.dimen.car_left_navigation_bar_width))
- .setBarType(mResources.getInteger(R.integer.config_leftSystemBarType))
- .setZOrder(mResources.getInteger(R.integer.config_leftSystemBarZOrder))
- .setHideForKeyboard(mResources.getBoolean(
- R.bool.config_hideLeftSystemBarForKeyboard))
- .build();
- mSystemBarConfigMap.put(LEFT, leftBarConfig);
- }
-
- if (mRightNavBarEnabled) {
- SystemBarConfig rightBarConfig =
- new SystemBarConfigBuilder()
- .setSide(RIGHT)
- .setGirth(mResources.getDimensionPixelSize(
- R.dimen.car_right_navigation_bar_width))
- .setBarType(mResources.getInteger(R.integer.config_rightSystemBarType))
- .setZOrder(mResources.getInteger(R.integer.config_rightSystemBarZOrder))
- .setHideForKeyboard(mResources.getBoolean(
- R.bool.config_hideRightSystemBarForKeyboard))
- .build();
- mSystemBarConfigMap.put(RIGHT, rightBarConfig);
- }
- }
-
- private void checkEnabledBarsHaveUniqueBarTypes() throws RuntimeException {
- Set<Integer> barTypesUsed = new ArraySet<>();
- int enabledNavBarCount = mSystemBarConfigMap.size();
-
- for (SystemBarConfig systemBarConfig : mSystemBarConfigMap.values()) {
- barTypesUsed.add(systemBarConfig.getBarType());
- }
-
- // The number of bar types used cannot be fewer than that of enabled system bars.
- if (barTypesUsed.size() < enabledNavBarCount) {
- throw new RuntimeException("Each enabled system bar must have a unique bar type. Check "
- + "the configuration in config.xml");
- }
- }
-
- private void checkAllOverlappingBarsHaveDifferentZOrders() {
- checkOverlappingBarsHaveDifferentZOrders(TOP, LEFT);
- checkOverlappingBarsHaveDifferentZOrders(TOP, RIGHT);
- checkOverlappingBarsHaveDifferentZOrders(BOTTOM, LEFT);
- checkOverlappingBarsHaveDifferentZOrders(BOTTOM, RIGHT);
- }
-
- private void checkSystemBarEnabledForNotificationPanel() throws RuntimeException {
- String notificationPanelMediatorName =
- mResources.getString(R.string.config_notificationPanelViewMediator);
- if (notificationPanelMediatorName == null) {
- return;
- }
-
- Class<?> notificationPanelMediatorUsed = null;
- try {
- notificationPanelMediatorUsed = Class.forName(notificationPanelMediatorName);
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
-
- if (!mTopNavBarEnabled && TopNotificationPanelViewMediator.class.isAssignableFrom(
- notificationPanelMediatorUsed)) {
- throw new RuntimeException(
- "Top System Bar must be enabled to use " + notificationPanelMediatorName);
- }
-
- if (!mBottomNavBarEnabled && BottomNotificationPanelViewMediator.class.isAssignableFrom(
- notificationPanelMediatorUsed)) {
- throw new RuntimeException("Bottom System Bar must be enabled to use "
- + notificationPanelMediatorName);
- }
- }
-
- private void checkHideBottomBarForKeyboardConfigSync() throws RuntimeException {
- if (mBottomNavBarEnabled) {
- boolean actual = mResources.getBoolean(R.bool.config_hideBottomSystemBarForKeyboard);
- boolean expected = mResources.getBoolean(
- com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard);
-
- if (actual != expected) {
- throw new RuntimeException("config_hideBottomSystemBarForKeyboard must not be "
- + "overlaid directly and should always refer to"
- + "config_automotiveHideNavBarForKeyboard. However, their values "
- + "currently do not sync. Set config_hideBottomSystemBarForKeyguard to "
- + "@*android:bool/config_automotiveHideNavBarForKeyboard. To change its "
- + "value, overlay config_automotiveHideNavBarForKeyboard in "
- + "framework/base/core/res/res.");
- }
- }
- }
-
- private void setInsetPaddingsForOverlappingCorners() {
- Map<@SystemBarSide Integer, Boolean> systemBarVisibilityOnInit =
- getSystemBarsVisibilityOnInit();
- updateInsetPaddings(TOP, systemBarVisibilityOnInit);
- updateInsetPaddings(BOTTOM, systemBarVisibilityOnInit);
- updateInsetPaddings(LEFT, systemBarVisibilityOnInit);
- updateInsetPaddings(RIGHT, systemBarVisibilityOnInit);
- }
-
- private void sortSystemBarSidesByZOrder() {
- List<SystemBarConfig> systemBarsByZOrder = new ArrayList<>(mSystemBarConfigMap.values());
-
- systemBarsByZOrder.sort(new Comparator<SystemBarConfig>() {
- @Override
- public int compare(SystemBarConfig o1, SystemBarConfig o2) {
- return o1.getZOrder() - o2.getZOrder();
- }
- });
-
- systemBarsByZOrder.forEach(systemBarConfig -> {
- mSystemBarSidesByZOrder.add(systemBarConfig.getSide());
- });
- }
-
- @InsetsState.InternalInsetsType
- private int getSystemBarTypeBySide(@SystemBarSide int side) {
- return mSystemBarConfigMap.get(side) != null
- ? mSystemBarConfigMap.get(side).getBarType() : null;
- }
-
- // On init, system bars are visible as long as they are enabled.
- private Map<@SystemBarSide Integer, Boolean> getSystemBarsVisibilityOnInit() {
- ArrayMap<@SystemBarSide Integer, Boolean> visibilityMap = new ArrayMap<>();
- visibilityMap.put(TOP, mTopNavBarEnabled);
- visibilityMap.put(BOTTOM, mBottomNavBarEnabled);
- visibilityMap.put(LEFT, mLeftNavBarEnabled);
- visibilityMap.put(RIGHT, mRightNavBarEnabled);
- return visibilityMap;
- }
-
- private Map<@SystemBarSide Integer, Boolean> getSystemBarsVisibility(WindowInsets insets) {
- ArrayMap<@SystemBarSide Integer, Boolean> visibilityMap = new ArrayMap<>();
- if (mTopNavBarEnabled) {
- visibilityMap.put(TOP, getSystemBarInsetVisibleBySide(TOP, insets));
- }
- if (mBottomNavBarEnabled) {
- visibilityMap.put(BOTTOM, getSystemBarInsetVisibleBySide(BOTTOM, insets));
- }
- if (mLeftNavBarEnabled) {
- visibilityMap.put(LEFT, getSystemBarInsetVisibleBySide(LEFT, insets));
- }
- if (mRightNavBarEnabled) {
- visibilityMap.put(RIGHT, getSystemBarInsetVisibleBySide(RIGHT, insets));
- }
- return visibilityMap;
- }
-
- private boolean getSystemBarInsetVisibleBySide(@SystemBarSide int side, WindowInsets insets) {
- if (mSystemBarConfigMap.get(side) == null) return false;
-
- int internalInsetType = BAR_TYPE_MAP[getSystemBarTypeBySide(side)];
- int publicInsetType = InsetsState.toPublicType(internalInsetType);
-
- return insets.isVisible(publicInsetType);
- }
-
- private void checkOverlappingBarsHaveDifferentZOrders(@SystemBarSide int horizontalSide,
- @SystemBarSide int verticalSide) {
-
- if (isVerticalBar(horizontalSide) || isHorizontalBar(verticalSide)) {
- Log.w(TAG, "configureBarPaddings: Returning immediately since the horizontal and "
- + "vertical sides were not provided correctly.");
- return;
- }
-
- SystemBarConfig horizontalBarConfig = mSystemBarConfigMap.get(horizontalSide);
- SystemBarConfig verticalBarConfig = mSystemBarConfigMap.get(verticalSide);
-
- if (verticalBarConfig != null && horizontalBarConfig != null) {
- int horizontalBarZOrder = horizontalBarConfig.getZOrder();
- int verticalBarZOrder = verticalBarConfig.getZOrder();
-
- if (horizontalBarZOrder == verticalBarZOrder) {
- throw new RuntimeException(
- BAR_TITLE_MAP.get(horizontalSide) + " " + BAR_TITLE_MAP.get(verticalSide)
- + " have the same Z-Order, and so their placing order cannot be "
- + "determined. Determine which bar should be placed on top of the "
- + "other bar and change the Z-order in config.xml accordingly."
- );
- }
- }
- }
-
- private static boolean isHorizontalBar(@SystemBarSide int side) {
- return side == TOP || side == BOTTOM;
- }
-
- private static boolean isVerticalBar(@SystemBarSide int side) {
- return side == LEFT || side == RIGHT;
- }
-
- private static final class SystemBarConfig {
- private final int mSide;
- private final int mBarType;
- private final int mGirth;
- private final int mZOrder;
- private final boolean mHideForKeyboard;
-
- private int[] mPaddings = new int[]{0, 0, 0, 0};
-
- private SystemBarConfig(@SystemBarSide int side, int barType, int girth, int zOrder,
- boolean hideForKeyboard) {
- mSide = side;
- mBarType = barType;
- mGirth = girth;
- mZOrder = zOrder;
- mHideForKeyboard = hideForKeyboard;
- }
-
- private int getSide() {
- return mSide;
- }
-
- private int getBarType() {
- return mBarType;
- }
-
- private int getGirth() {
- return mGirth;
- }
-
- private int getZOrder() {
- return mZOrder;
- }
-
- private boolean getHideForKeyboard() {
- return mHideForKeyboard;
- }
-
- private int[] getPaddings() {
- return mPaddings;
- }
-
- private WindowManager.LayoutParams getLayoutParams() {
- WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
- isHorizontalBar(mSide) ? ViewGroup.LayoutParams.MATCH_PARENT : mGirth,
- isHorizontalBar(mSide) ? mGirth : ViewGroup.LayoutParams.MATCH_PARENT,
- mapZOrderToBarType(mZOrder),
- WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
- | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
- | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
- | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
- PixelFormat.TRANSLUCENT);
- lp.setTitle(BAR_TITLE_MAP.get(mSide));
- lp.providesInsetsTypes = new int[]{BAR_TYPE_MAP[mBarType], BAR_GESTURE_MAP.get(mSide)};
- lp.setFitInsetsTypes(0);
- lp.windowAnimations = 0;
- lp.gravity = BAR_GRAVITY_MAP.get(mSide);
- return lp;
- }
-
- private int mapZOrderToBarType(int zOrder) {
- return zOrder >= HUN_ZORDER ? WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL
- : WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
- }
-
- private void setPaddingBySide(@SystemBarSide int side, int padding) {
- mPaddings[side] = padding;
- }
- }
-
- private static final class SystemBarConfigBuilder {
- private int mSide;
- private int mBarType;
- private int mGirth;
- private int mZOrder;
- private boolean mHideForKeyboard;
-
- private SystemBarConfigBuilder setSide(@SystemBarSide int side) {
- mSide = side;
- return this;
- }
-
- private SystemBarConfigBuilder setBarType(int type) {
- mBarType = type;
- return this;
- }
-
- private SystemBarConfigBuilder setGirth(int girth) {
- mGirth = girth;
- return this;
- }
-
- private SystemBarConfigBuilder setZOrder(int zOrder) {
- mZOrder = zOrder;
- return this;
- }
-
- private SystemBarConfigBuilder setHideForKeyboard(boolean hide) {
- mHideForKeyboard = hide;
- return this;
- }
-
- private SystemBarConfig build() {
- return new SystemBarConfig(mSide, mBarType, mGirth, mZOrder, mHideForKeyboard);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java
deleted file mode 100644
index 8468bef1750c..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/BottomNotificationPanelViewMediator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.car.window.OverlayPanelViewController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-
-import javax.inject.Inject;
-
-/**
- * Implementation of NotificationPanelViewMediator that sets the notification panel to be opened
- * from the top navigation bar.
- */
-@SysUISingleton
-public class BottomNotificationPanelViewMediator extends NotificationPanelViewMediator {
-
- @Inject
- public BottomNotificationPanelViewMediator(
- CarNavigationBarController carNavigationBarController,
- NotificationPanelViewController notificationPanelViewController,
-
- PowerManagerHelper powerManagerHelper,
- BroadcastDispatcher broadcastDispatcher,
-
- CarDeviceProvisionedController carDeviceProvisionedController,
- ConfigurationController configurationController
- ) {
- super(carNavigationBarController,
- notificationPanelViewController,
- powerManagerHelper,
- broadcastDispatcher,
- carDeviceProvisionedController,
- configurationController);
- notificationPanelViewController.setOverlayDirection(
- OverlayPanelViewController.OVERLAY_FROM_BOTTOM_BAR);
- }
-
- @Override
- public void registerListeners() {
- super.registerListeners();
- getCarNavigationBarController().registerBottomBarTouchListener(
- getNotificationPanelViewController().getDragOpenTouchListener());
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainer.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainer.java
deleted file mode 100644
index 98b1fc4ae7c0..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import android.content.Context;
-import android.graphics.PixelFormat;
-import android.view.Gravity;
-import android.view.ViewGroup;
-import android.view.WindowManager;
-
-import com.android.car.notification.headsup.CarHeadsUpNotificationContainer;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/**
- * A controller for SysUI's HUN display.
- *
- * Used to attach HUNs views to window and determine whether to show HUN panel.
- */
-@SysUISingleton
-public class CarHeadsUpNotificationSystemContainer extends CarHeadsUpNotificationContainer {
- private static final String WINDOW_TITLE = "HeadsUpNotification";
- private final CarDeviceProvisionedController mCarDeviceProvisionedController;
- private final OverlayViewGlobalStateController mOverlayViewGlobalStateController;
-
- @Inject
- CarHeadsUpNotificationSystemContainer(Context context,
- CarDeviceProvisionedController deviceProvisionedController,
- WindowManager windowManager,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
- super(context, windowManager);
- mCarDeviceProvisionedController = deviceProvisionedController;
- mOverlayViewGlobalStateController = overlayViewGlobalStateController;
- }
-
- @Override
- protected WindowManager.LayoutParams getWindowManagerLayoutParams() {
- // Use TYPE_STATUS_BAR_SUB_PANEL window type since we need to find a window that is above
- // status bar but below navigation bar.
- WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
- ViewGroup.LayoutParams.MATCH_PARENT,
- WindowManager.LayoutParams.WRAP_CONTENT,
- WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL,
- WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
- | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
- PixelFormat.TRANSLUCENT);
-
- lp.gravity = getShowHunOnBottom() ? Gravity.BOTTOM : Gravity.TOP;
- lp.setTitle(WINDOW_TITLE);
-
- return lp;
- }
-
- @Override
- public boolean shouldShowHunPanel() {
- return mCarDeviceProvisionedController.isCurrentUserFullySetup()
- && mOverlayViewGlobalStateController.shouldShowHUN();
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/CarNotificationModule.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/CarNotificationModule.java
deleted file mode 100644
index 8a3bcfc5ef3a..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/CarNotificationModule.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import android.content.Context;
-
-import com.android.car.notification.CarHeadsUpNotificationManager;
-import com.android.car.notification.CarNotificationListener;
-import com.android.car.notification.CarUxRestrictionManagerWrapper;
-import com.android.car.notification.NotificationClickHandlerFactory;
-import com.android.car.notification.NotificationDataManager;
-import com.android.car.notification.headsup.CarHeadsUpNotificationContainer;
-import com.android.internal.statusbar.IStatusBarService;
-import com.android.systemui.dagger.SysUISingleton;
-
-import dagger.Binds;
-import dagger.Module;
-import dagger.Provides;
-
-/**
- * Module for Car SysUI Notifications
- */
-@Module
-public abstract class CarNotificationModule {
- @Provides
- @SysUISingleton
- static NotificationClickHandlerFactory provideNotificationClickHandlerFactory(
- IStatusBarService barService) {
- return new NotificationClickHandlerFactory(barService);
- }
-
- @Provides
- @SysUISingleton
- static NotificationDataManager provideNotificationDataManager() {
- return new NotificationDataManager();
- }
-
- @Provides
- @SysUISingleton
- static CarUxRestrictionManagerWrapper provideCarUxRestrictionManagerWrapper() {
- return new CarUxRestrictionManagerWrapper();
- }
-
- @Provides
- @SysUISingleton
- static CarNotificationListener provideCarNotificationListener(Context context,
- CarUxRestrictionManagerWrapper carUxRestrictionManagerWrapper,
- CarHeadsUpNotificationManager carHeadsUpNotificationManager,
- NotificationDataManager notificationDataManager) {
- CarNotificationListener listener = new CarNotificationListener();
- listener.registerAsSystemService(context, carUxRestrictionManagerWrapper,
- carHeadsUpNotificationManager, notificationDataManager);
- return listener;
- }
-
- @Provides
- @SysUISingleton
- static CarHeadsUpNotificationManager provideCarHeadsUpNotificationManager(Context context,
- NotificationClickHandlerFactory notificationClickHandlerFactory,
- NotificationDataManager notificationDataManager,
- CarHeadsUpNotificationContainer headsUpNotificationDisplay) {
- return new CarHeadsUpNotificationManager(context, notificationClickHandlerFactory,
- notificationDataManager, headsUpNotificationDisplay);
- }
-
- @Binds
- abstract CarHeadsUpNotificationContainer bindsCarHeadsUpNotificationContainer(
- CarHeadsUpNotificationSystemContainer carHeadsUpNotificationSystemContainer);
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
deleted file mode 100644
index 599e69cb6ab4..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import android.app.ActivityManager;
-import android.car.Car;
-import android.car.drivingstate.CarUxRestrictionsManager;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.inputmethodservice.InputMethodService;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.GestureDetector;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowInsets;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.android.car.notification.CarNotificationListener;
-import com.android.car.notification.CarNotificationView;
-import com.android.car.notification.CarUxRestrictionManagerWrapper;
-import com.android.car.notification.NotificationClickHandlerFactory;
-import com.android.car.notification.NotificationDataManager;
-import com.android.car.notification.NotificationViewController;
-import com.android.car.notification.PreprocessingManager;
-import com.android.internal.statusbar.IStatusBarService;
-import com.android.systemui.R;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.window.OverlayPanelViewController;
-import com.android.systemui.car.window.OverlayViewController;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.dagger.qualifiers.UiBackground;
-import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.StatusBarState;
-import com.android.wm.shell.animation.FlingAnimationUtils;
-
-import java.util.concurrent.Executor;
-
-import javax.inject.Inject;
-
-/** View controller for the notification panel. */
-@SysUISingleton
-public class NotificationPanelViewController extends OverlayPanelViewController
- implements CommandQueue.Callbacks {
-
- private static final boolean DEBUG = true;
- private static final String TAG = "NotificationPanelViewController";
-
- private final Context mContext;
- private final Resources mResources;
- private final CarServiceProvider mCarServiceProvider;
- private final IStatusBarService mBarService;
- private final CommandQueue mCommandQueue;
- private final Executor mUiBgExecutor;
- private final NotificationDataManager mNotificationDataManager;
- private final CarUxRestrictionManagerWrapper mCarUxRestrictionManagerWrapper;
- private final CarNotificationListener mCarNotificationListener;
- private final NotificationClickHandlerFactory mNotificationClickHandlerFactory;
- private final StatusBarStateController mStatusBarStateController;
- private final boolean mEnableHeadsUpNotificationWhenNotificationShadeOpen;
- private final NotificationVisibilityLogger mNotificationVisibilityLogger;
-
- private final boolean mFitTopSystemBarInset;
- private final boolean mFitBottomSystemBarInset;
- private final boolean mFitLeftSystemBarInset;
- private final boolean mFitRightSystemBarInset;
-
- private float mInitialBackgroundAlpha;
- private float mBackgroundAlphaDiff;
-
- private CarNotificationView mNotificationView;
- private View mHandleBar;
- private RecyclerView mNotificationList;
- private NotificationViewController mNotificationViewController;
-
- private boolean mNotificationListAtEnd;
- private float mFirstTouchDownOnGlassPane;
- private boolean mNotificationListAtEndAtTimeOfTouch;
- private boolean mIsSwipingVerticallyToClose;
- private boolean mIsNotificationCardSwiping;
- private boolean mImeVisible = false;
-
- private OnUnseenCountUpdateListener mUnseenCountUpdateListener;
-
- @Inject
- public NotificationPanelViewController(
- Context context,
- @Main Resources resources,
- OverlayViewGlobalStateController overlayViewGlobalStateController,
- FlingAnimationUtils.Builder flingAnimationUtilsBuilder,
- @UiBackground Executor uiBgExecutor,
-
- /* Other things */
- CarServiceProvider carServiceProvider,
- CarDeviceProvisionedController carDeviceProvisionedController,
-
- /* Things needed for notifications */
- IStatusBarService barService,
- CommandQueue commandQueue,
- NotificationDataManager notificationDataManager,
- CarUxRestrictionManagerWrapper carUxRestrictionManagerWrapper,
- CarNotificationListener carNotificationListener,
- NotificationClickHandlerFactory notificationClickHandlerFactory,
- NotificationVisibilityLogger notificationVisibilityLogger,
-
- /* Things that need to be replaced */
- StatusBarStateController statusBarStateController
- ) {
- super(context, resources, R.id.notification_panel_stub, overlayViewGlobalStateController,
- flingAnimationUtilsBuilder, carDeviceProvisionedController);
- mContext = context;
- mResources = resources;
- mCarServiceProvider = carServiceProvider;
- mBarService = barService;
- mCommandQueue = commandQueue;
- mUiBgExecutor = uiBgExecutor;
- mNotificationDataManager = notificationDataManager;
- mCarUxRestrictionManagerWrapper = carUxRestrictionManagerWrapper;
- mCarNotificationListener = carNotificationListener;
- mNotificationClickHandlerFactory = notificationClickHandlerFactory;
- mStatusBarStateController = statusBarStateController;
- mNotificationVisibilityLogger = notificationVisibilityLogger;
-
- mCommandQueue.addCallback(this);
-
- // Notification background setup.
- mInitialBackgroundAlpha = (float) mResources.getInteger(
- R.integer.config_initialNotificationBackgroundAlpha) / 100;
- if (mInitialBackgroundAlpha < 0 || mInitialBackgroundAlpha > 100) {
- throw new RuntimeException(
- "Unable to setup notification bar due to incorrect initial background alpha"
- + " percentage");
- }
- float finalBackgroundAlpha = Math.max(
- mInitialBackgroundAlpha,
- (float) mResources.getInteger(
- R.integer.config_finalNotificationBackgroundAlpha) / 100);
- if (finalBackgroundAlpha < 0 || finalBackgroundAlpha > 100) {
- throw new RuntimeException(
- "Unable to setup notification bar due to incorrect final background alpha"
- + " percentage");
- }
- mBackgroundAlphaDiff = finalBackgroundAlpha - mInitialBackgroundAlpha;
-
- mEnableHeadsUpNotificationWhenNotificationShadeOpen = mResources.getBoolean(
- com.android.car.notification.R.bool
- .config_enableHeadsUpNotificationWhenNotificationShadeOpen);
-
- mFitTopSystemBarInset = mResources.getBoolean(
- R.bool.config_notif_panel_inset_by_top_systembar);
- mFitBottomSystemBarInset = mResources.getBoolean(
- R.bool.config_notif_panel_inset_by_bottom_systembar);
- mFitLeftSystemBarInset = mResources.getBoolean(
- R.bool.config_notif_panel_inset_by_left_systembar);
- mFitRightSystemBarInset = mResources.getBoolean(
- R.bool.config_notif_panel_inset_by_right_systembar);
- }
-
- // CommandQueue.Callbacks
-
- @Override
- public void animateExpandNotificationsPanel() {
- if (!isPanelExpanded()) {
- toggle();
- }
- }
-
- @Override
- public void animateCollapsePanels(int flags, boolean force) {
- if (isPanelExpanded()) {
- toggle();
- }
- }
-
- @Override
- public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
- boolean showImeSwitcher) {
- if (mContext.getDisplayId() != displayId) {
- return;
- }
- mImeVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
- }
-
- // OverlayViewController
-
- @Override
- protected void onFinishInflate() {
- reinflate();
- }
-
- @Override
- protected void hideInternal() {
- super.hideInternal();
- mNotificationVisibilityLogger.stop();
- }
-
- @Override
- protected boolean shouldShowNavigationBarInsets() {
- return true;
- }
-
- @Override
- protected boolean shouldShowStatusBarInsets() {
- return true;
- }
-
- @Override
- protected int getInsetSidesToFit() {
- int insetSidesToFit = OverlayViewController.NO_INSET_SIDE;
-
- if (mFitTopSystemBarInset) {
- insetSidesToFit = insetSidesToFit | WindowInsets.Side.TOP;
- }
-
- if (mFitBottomSystemBarInset) {
- insetSidesToFit = insetSidesToFit | WindowInsets.Side.BOTTOM;
- }
-
- if (mFitLeftSystemBarInset) {
- insetSidesToFit = insetSidesToFit | WindowInsets.Side.LEFT;
- }
-
- if (mFitRightSystemBarInset) {
- insetSidesToFit = insetSidesToFit | WindowInsets.Side.RIGHT;
- }
-
- return insetSidesToFit;
- }
-
- @Override
- protected boolean shouldShowHUN() {
- return mEnableHeadsUpNotificationWhenNotificationShadeOpen;
- }
-
- @Override
- protected boolean shouldUseStableInsets() {
- // When IME is visible, then the inset from the nav bar should not be applied.
- return !mImeVisible;
- }
-
- /** Reinflates the view. */
- public void reinflate() {
- ViewGroup container = (ViewGroup) getLayout();
- container.removeView(mNotificationView);
-
- mNotificationView = (CarNotificationView) LayoutInflater.from(mContext).inflate(
- R.layout.notification_center_activity, container,
- /* attachToRoot= */ false);
-
- container.addView(mNotificationView);
- onNotificationViewInflated();
- }
-
- private void onNotificationViewInflated() {
- // Find views.
- mNotificationView = getLayout().findViewById(R.id.notification_view);
- setupHandleBar();
- setupNotificationPanel();
-
- mNotificationClickHandlerFactory.registerClickListener((launchResult, alertEntry) -> {
- if (launchResult == ActivityManager.START_TASK_TO_FRONT
- || launchResult == ActivityManager.START_SUCCESS) {
- animateCollapsePanel();
- }
- });
-
- mNotificationDataManager.setOnUnseenCountUpdateListener(() -> {
- if (mUnseenCountUpdateListener != null) {
- mUnseenCountUpdateListener.onUnseenCountUpdate(
- mNotificationDataManager.getUnseenNotificationCount());
- }
- mCarNotificationListener.setNotificationsShown(
- mNotificationDataManager.getSeenNotifications());
- // This logs both when the notification panel is expanded and when the notification
- // panel is scrolled.
- mNotificationVisibilityLogger.log(isPanelExpanded());
- });
-
- mNotificationClickHandlerFactory.setNotificationDataManager(mNotificationDataManager);
- mNotificationView.setClickHandlerFactory(mNotificationClickHandlerFactory);
- mNotificationView.setNotificationDataManager(mNotificationDataManager);
-
- mCarServiceProvider.addListener(car -> {
- CarUxRestrictionsManager carUxRestrictionsManager =
- (CarUxRestrictionsManager)
- car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE);
- mCarUxRestrictionManagerWrapper.setCarUxRestrictionsManager(
- carUxRestrictionsManager);
-
- mNotificationViewController = new NotificationViewController(
- mNotificationView,
- PreprocessingManager.getInstance(mContext),
- mCarNotificationListener,
- mCarUxRestrictionManagerWrapper,
- mNotificationDataManager);
- mNotificationViewController.enable();
- });
- }
-
- private void setupHandleBar() {
- mHandleBar = mNotificationView.findViewById(R.id.handle_bar);
- GestureDetector handleBarCloseNotificationGestureDetector = new GestureDetector(mContext,
- new HandleBarCloseGestureListener());
- mHandleBar.setOnTouchListener((v, event) -> {
- handleBarCloseNotificationGestureDetector.onTouchEvent(event);
- maybeCompleteAnimation(event);
- return true;
- });
- }
-
- private void setupNotificationPanel() {
- View glassPane = mNotificationView.findViewById(R.id.glass_pane);
- mNotificationList = mNotificationView.findViewById(R.id.notifications);
- GestureDetector closeGestureDetector = new GestureDetector(mContext,
- new CloseGestureListener() {
- @Override
- protected void close() {
- if (isPanelExpanded()) {
- animateCollapsePanel();
- }
- }
- });
-
- // The glass pane is used to view touch events before passed to the notification list.
- // This allows us to initialize gesture listeners and detect when to close the notifications
- glassPane.setOnTouchListener((v, event) -> {
- if (isClosingAction(event)) {
- mNotificationListAtEndAtTimeOfTouch = false;
- }
- if (isOpeningAction(event)) {
- mFirstTouchDownOnGlassPane = event.getRawX();
- mNotificationListAtEndAtTimeOfTouch = mNotificationListAtEnd;
- // Reset the tracker when there is a touch down on the glass pane.
- setIsTracking(false);
- // Pass the down event to gesture detector so that it knows where the touch event
- // started.
- closeGestureDetector.onTouchEvent(event);
- }
- return false;
- });
-
- mNotificationList.addOnScrollListener(new RecyclerView.OnScrollListener() {
- @Override
- public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
- super.onScrolled(recyclerView, dx, dy);
- // Check if we can scroll vertically in the animation direction.
- if (!mNotificationList.canScrollVertically(mAnimateDirection)) {
- mNotificationListAtEnd = true;
- return;
- }
- mNotificationListAtEnd = false;
- mIsSwipingVerticallyToClose = false;
- mNotificationListAtEndAtTimeOfTouch = false;
- }
- });
-
- mNotificationList.setOnTouchListener((v, event) -> {
- mIsNotificationCardSwiping = Math.abs(mFirstTouchDownOnGlassPane - event.getRawX())
- > SWIPE_MAX_OFF_PATH;
- if (mNotificationListAtEndAtTimeOfTouch && mNotificationListAtEnd) {
- // We need to save the state here as if notification card is swiping we will
- // change the mNotificationListAtEndAtTimeOfTouch. This is to protect
- // closing the notification shade while the notification card is being swiped.
- mIsSwipingVerticallyToClose = true;
- }
-
- // If the card is swiping we should not allow the notification shade to close.
- // Hence setting mNotificationListAtEndAtTimeOfTouch to false will stop that
- // for us. We are also checking for isTracking() because while swiping the
- // notification shade to close if the user goes a bit horizontal while swiping
- // upwards then also this should close.
- if (mIsNotificationCardSwiping && !isTracking()) {
- mNotificationListAtEndAtTimeOfTouch = false;
- }
-
- boolean handled = closeGestureDetector.onTouchEvent(event);
- boolean isTracking = isTracking();
- Rect rect = getLayout().getClipBounds();
- float clippedHeight = 0;
- if (rect != null) {
- clippedHeight = rect.bottom;
- }
- if (!handled && isClosingAction(event) && mIsSwipingVerticallyToClose) {
- if (getSettleClosePercentage() < getPercentageFromEndingEdge() && isTracking) {
- animatePanel(DEFAULT_FLING_VELOCITY, false);
- } else if (clippedHeight != getLayout().getHeight() && isTracking) {
- // this can be caused when user is at the end of the list and trying to
- // fling to top of the list by scrolling down.
- animatePanel(DEFAULT_FLING_VELOCITY, true);
- }
- }
-
- // Updating the mNotificationListAtEndAtTimeOfTouch state has to be done after
- // the event has been passed to the closeGestureDetector above, such that the
- // closeGestureDetector sees the up event before the state has changed.
- if (isClosingAction(event)) {
- mNotificationListAtEndAtTimeOfTouch = false;
- }
- return handled || isTracking;
- });
- }
-
- /** Called when the car power state is changed to ON. */
- public void onCarPowerStateOn() {
- if (mNotificationClickHandlerFactory != null) {
- mNotificationClickHandlerFactory.clearAllNotifications();
- }
- mNotificationDataManager.clearAll();
- }
-
- // OverlayPanelViewController
-
- @Override
- protected boolean shouldAnimateCollapsePanel() {
- return true;
- }
-
- @Override
- protected void onAnimateCollapsePanel() {
- // No op.
- }
-
- @Override
- protected boolean shouldAnimateExpandPanel() {
- return mCommandQueue.panelsEnabled();
- }
-
- @Override
- protected void onAnimateExpandPanel() {
- mNotificationList.scrollToPosition(0);
- }
-
- @Override
- protected void onCollapseAnimationEnd() {
- mNotificationViewController.onVisibilityChanged(false);
- }
-
- @Override
- protected void onExpandAnimationEnd() {
- mNotificationViewController.onVisibilityChanged(true);
- mNotificationView.setVisibleNotificationsAsSeen();
- }
-
- @Override
- protected void onPanelVisible(boolean visible) {
- super.onPanelVisible(visible);
- mUiBgExecutor.execute(() -> {
- try {
- if (visible) {
- // When notification panel is open even just a bit, we want to clear
- // notification effects.
- boolean clearNotificationEffects =
- mStatusBarStateController.getState() != StatusBarState.KEYGUARD;
- mBarService.onPanelRevealed(clearNotificationEffects,
- mNotificationDataManager.getVisibleNotifications().size());
- } else {
- mBarService.onPanelHidden();
- }
- } catch (RemoteException ex) {
- // Won't fail unless the world has ended.
- Log.e(TAG, String.format(
- "Unable to notify StatusBarService of panel visibility: %s", visible));
- }
- });
-
- }
-
- @Override
- protected void onPanelExpanded(boolean expand) {
- super.onPanelExpanded(expand);
-
- if (expand && mStatusBarStateController.getState() != StatusBarState.KEYGUARD) {
- if (DEBUG) {
- Log.v(TAG, "clearing notification effects from setExpandedHeight");
- }
- clearNotificationEffects();
- }
- if (!expand) {
- mNotificationVisibilityLogger.log(isPanelExpanded());
- }
- }
-
- /**
- * Clear Buzz/Beep/Blink.
- */
- private void clearNotificationEffects() {
- try {
- mBarService.clearNotificationEffects();
- } catch (RemoteException e) {
- // Won't fail unless the world has ended.
- }
- }
-
- @Override
- protected void onOpenScrollStart() {
- mNotificationList.scrollToPosition(0);
- }
-
- @Override
- protected void onScroll(int y) {
- if (mHandleBar != null) {
- ViewGroup.MarginLayoutParams lp =
- (ViewGroup.MarginLayoutParams) mHandleBar.getLayoutParams();
- // Adjust handlebar to new pointer position, and a little more depending on the
- // animate direction so the bar can be seen fully.
- if (mAnimateDirection > 0) {
- mHandleBar.setTranslationY(y - mHandleBar.getHeight() - lp.bottomMargin);
- } else {
- mHandleBar.setTranslationY(y + mHandleBar.getHeight() + lp.topMargin);
- }
- }
-
- if (mNotificationView.getHeight() > 0) {
- Drawable background = mNotificationView.getBackground().mutate();
- background.setAlpha((int) (getBackgroundAlpha(y) * 255));
- mNotificationView.setBackground(background);
- }
- }
-
- @Override
- protected boolean shouldAllowClosingScroll() {
- // Unless the notification list is at the end, the panel shouldn't be allowed to
- // collapse on scroll.
- return mNotificationListAtEndAtTimeOfTouch;
- }
-
- /**
- * Calculates the alpha value for the background based on how much of the notification
- * shade is visible to the user. When the notification shade is completely open then
- * alpha value will be 1.
- */
- private float getBackgroundAlpha(int y) {
- float fractionCovered =
- ((float) (mAnimateDirection > 0 ? y : mNotificationView.getHeight() - y))
- / mNotificationView.getHeight();
- return mInitialBackgroundAlpha + fractionCovered * mBackgroundAlphaDiff;
- }
-
- /** Sets the unseen count listener. */
- public void setOnUnseenCountUpdateListener(OnUnseenCountUpdateListener listener) {
- mUnseenCountUpdateListener = listener;
- }
-
- /** Listener that is updated when the number of unseen notifications changes. */
- public interface OnUnseenCountUpdateListener {
- /**
- * This method is automatically called whenever there is an update to the number of unseen
- * notifications. This method can be extended by OEMs to customize the desired logic.
- */
- void onUnseenCountUpdate(int unseenNotificationCount);
- }
-
- /**
- * To be installed on the handle bar.
- */
- private class HandleBarCloseGestureListener extends
- GestureDetector.SimpleOnGestureListener {
-
- @Override
- public boolean onScroll(MotionEvent event1, MotionEvent event2, float distanceX,
- float distanceY) {
- calculatePercentageFromEndingEdge(event2.getRawY());
- // To prevent the jump in the clip bounds while closing the notification panel using
- // the handle bar we should calculate the height using the diff of event1 and event2.
- // This will help the notification shade to clip smoothly as the event2 value changes
- // as event1 value will be fixed.
- float diff = mAnimateDirection * (event1.getRawY() - event2.getRawY());
- float y = mAnimateDirection > 0
- ? getLayout().getHeight() - diff
- : diff;
- // Ensure the position is within the overlay panel.
- y = Math.max(0, Math.min(y, getLayout().getHeight()));
- setViewClipBounds((int) y);
- return true;
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java
deleted file mode 100644
index 17b6b74014e4..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewMediator.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import android.car.hardware.power.CarPowerManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.res.Configuration;
-import android.os.UserHandle;
-import android.util.Log;
-
-import androidx.annotation.CallSuper;
-
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.car.window.OverlayViewMediator;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-
-import javax.inject.Inject;
-
-/**
- * The view mediator which attaches the view controller to other elements of the system ui. Disables
- * drag open behavior of the notification panel from any navigation bar.
- */
-@SysUISingleton
-public class NotificationPanelViewMediator implements OverlayViewMediator,
- ConfigurationController.ConfigurationListener {
-
- private static final boolean DEBUG = false;
- private static final String TAG = "NotificationPanelVM";
-
- private final CarNavigationBarController mCarNavigationBarController;
- private final NotificationPanelViewController mNotificationPanelViewController;
- private final PowerManagerHelper mPowerManagerHelper;
- private final BroadcastDispatcher mBroadcastDispatcher;
- private final CarDeviceProvisionedController mCarDeviceProvisionedController;
- private final ConfigurationController mConfigurationController;
-
- private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (DEBUG) Log.v(TAG, "onReceive: " + intent);
- String action = intent.getAction();
- if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
- if (mNotificationPanelViewController.isPanelExpanded()) {
- mNotificationPanelViewController.toggle();
- }
- }
- }
- };
-
- @Inject
- public NotificationPanelViewMediator(
- CarNavigationBarController carNavigationBarController,
- NotificationPanelViewController notificationPanelViewController,
-
- PowerManagerHelper powerManagerHelper,
- BroadcastDispatcher broadcastDispatcher,
-
- CarDeviceProvisionedController carDeviceProvisionedController,
- ConfigurationController configurationController
- ) {
- mCarNavigationBarController = carNavigationBarController;
- mNotificationPanelViewController = notificationPanelViewController;
- mPowerManagerHelper = powerManagerHelper;
- mBroadcastDispatcher = broadcastDispatcher;
- mCarDeviceProvisionedController = carDeviceProvisionedController;
- mConfigurationController = configurationController;
- }
-
- @Override
- @CallSuper
- public void registerListeners() {
- mCarNavigationBarController.registerTopBarTouchListener(
- mNotificationPanelViewController.getDragCloseTouchListener());
- mCarNavigationBarController.registerBottomBarTouchListener(
- mNotificationPanelViewController.getDragCloseTouchListener());
- mCarNavigationBarController.registerLeftBarTouchListener(
- mNotificationPanelViewController.getDragCloseTouchListener());
- mCarNavigationBarController.registerRightBarTouchListener(
- mNotificationPanelViewController.getDragCloseTouchListener());
-
- mCarNavigationBarController.registerNotificationController(
- new CarNavigationBarController.NotificationsShadeController() {
- @Override
- public void togglePanel() {
- mNotificationPanelViewController.toggle();
- }
-
- @Override
- public boolean isNotificationPanelOpen() {
- return mNotificationPanelViewController.isPanelExpanded();
- }
- });
-
- mBroadcastDispatcher.registerReceiver(mBroadcastReceiver,
- new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), null, UserHandle.ALL);
- }
-
- @Override
- public void setupOverlayContentViewControllers() {
- mNotificationPanelViewController.setOnUnseenCountUpdateListener(unseenNotificationCount -> {
- boolean hasUnseen = unseenNotificationCount > 0;
- mCarNavigationBarController.toggleAllNotificationsUnseenIndicator(
- mCarDeviceProvisionedController.isCurrentUserFullySetup(), hasUnseen);
- });
-
- mPowerManagerHelper.setCarPowerStateListener(state -> {
- if (state == CarPowerManager.CarPowerStateListener.ON) {
- mNotificationPanelViewController.onCarPowerStateOn();
- }
- });
- mPowerManagerHelper.connectToCarService();
-
- mConfigurationController.addCallback(this);
- }
-
- @Override
- public void onConfigChanged(Configuration newConfig) {
- // No op.
- }
-
- @Override
- public void onDensityOrFontScaleChanged() {
- registerListeners();
- }
-
- @Override
- public void onOverlayChanged() {
- // No op.
- }
-
- @Override
- public void onUiModeChanged() {
- // No op.
- }
-
- @Override
- public void onThemeChanged() {
- // No op.
- }
-
- @Override
- public void onLocaleListChanged() {
- mNotificationPanelViewController.reinflate();
- registerListeners();
- }
-
- protected final CarNavigationBarController getCarNavigationBarController() {
- return mCarNavigationBarController;
- }
-
- protected final NotificationPanelViewController getNotificationPanelViewController() {
- return mNotificationPanelViewController;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationShadeWindowControllerImpl.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationShadeWindowControllerImpl.java
deleted file mode 100644
index 1a1da89f147a..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationShadeWindowControllerImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.statusbar.NotificationShadeWindowController;
-
-import javax.inject.Inject;
-
-/** The automotive version of the notification shade window controller. */
-@SysUISingleton
-public class NotificationShadeWindowControllerImpl implements
- NotificationShadeWindowController {
-
- private final OverlayViewGlobalStateController mController;
-
- @Inject
- public NotificationShadeWindowControllerImpl(OverlayViewGlobalStateController controller) {
- mController = controller;
- }
-
- @Override
- public void setForceDozeBrightness(boolean forceDozeBrightness) {
- // No-op since dozing is not supported in Automotive devices.
- }
-
- @Override
- public void setNotificationShadeFocusable(boolean focusable) {
- mController.setWindowFocusable(focusable);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationVisibilityLogger.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationVisibilityLogger.java
deleted file mode 100644
index b263f721d29a..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationVisibilityLogger.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import android.os.RemoteException;
-import android.util.ArraySet;
-import android.util.Log;
-
-import com.android.car.notification.AlertEntry;
-import com.android.car.notification.NotificationDataManager;
-import com.android.internal.statusbar.IStatusBarService;
-import com.android.internal.statusbar.NotificationVisibility;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.UiBackground;
-
-import java.util.Set;
-import java.util.concurrent.Executor;
-
-import javax.inject.Inject;
-
-/**
- * Handles notification logging, in particular, logging which notifications are visible and which
- * are not.
- */
-@SysUISingleton
-public class NotificationVisibilityLogger {
-
- private static final String TAG = "NotificationVisibilityLogger";
-
- private final ArraySet<NotificationVisibility> mCurrentlyVisible = new ArraySet<>();
- private final ArraySet<NotificationVisibility> mNewlyVisible = new ArraySet<>();
- private final ArraySet<NotificationVisibility> mPreviouslyVisible = new ArraySet<>();
- private final ArraySet<NotificationVisibility> mTmpCurrentlyVisible = new ArraySet<>();
-
- private final IStatusBarService mBarService;
- private final Executor mUiBgExecutor;
- private final NotificationDataManager mNotificationDataManager;
-
- private boolean mIsVisible;
-
- private final Runnable mVisibilityReporter = new Runnable() {
-
- @Override
- public void run() {
- if (mIsVisible) {
- int count = mNotificationDataManager.getVisibleNotifications().size();
- for (AlertEntry alertEntry : mNotificationDataManager.getVisibleNotifications()) {
- NotificationVisibility visObj = NotificationVisibility.obtain(
- alertEntry.getKey(),
- /* rank= */ -1,
- count,
- mIsVisible,
- NotificationVisibility.NotificationLocation.LOCATION_MAIN_AREA);
- mTmpCurrentlyVisible.add(visObj);
- if (!mCurrentlyVisible.contains(visObj)) {
- mNewlyVisible.add(visObj);
- }
- }
- }
- mPreviouslyVisible.addAll(mCurrentlyVisible);
- mPreviouslyVisible.removeAll(mTmpCurrentlyVisible);
- onNotificationVisibilityChanged(mNewlyVisible, mPreviouslyVisible);
-
- recycleAllVisibilityObjects(mCurrentlyVisible);
- mCurrentlyVisible.addAll(mTmpCurrentlyVisible);
-
- recycleAllVisibilityObjects(mPreviouslyVisible);
- recycleAllVisibilityObjects(mNewlyVisible);
- recycleAllVisibilityObjects(mTmpCurrentlyVisible);
- }
- };
-
- @Inject
- public NotificationVisibilityLogger(
- @UiBackground Executor uiBgExecutor,
- IStatusBarService barService,
- NotificationDataManager notificationDataManager) {
- mUiBgExecutor = uiBgExecutor;
- mBarService = barService;
- mNotificationDataManager = notificationDataManager;
- }
-
- /** Triggers a visibility report update to be sent to StatusBarService. */
- public void log(boolean isVisible) {
- mIsVisible = isVisible;
- mUiBgExecutor.execute(mVisibilityReporter);
- }
-
- /** Stops logging, clearing all visibility objects. */
- public void stop() {
- recycleAllVisibilityObjects(mCurrentlyVisible);
- }
-
- /**
- * Notify StatusBarService of change in notifications' visibility.
- */
- private void onNotificationVisibilityChanged(
- Set<NotificationVisibility> newlyVisible, Set<NotificationVisibility> noLongerVisible) {
- if (newlyVisible.isEmpty() && noLongerVisible.isEmpty()) {
- return;
- }
-
- try {
- mBarService.onNotificationVisibilityChanged(
- cloneVisibilitiesAsArr(newlyVisible), cloneVisibilitiesAsArr(noLongerVisible));
- } catch (RemoteException e) {
- // Won't fail unless the world has ended.
- Log.e(TAG, "Failed to notify StatusBarService of notification visibility change");
- }
- }
-
- /**
- * Clears array and recycles NotificationVisibility objects for reuse.
- */
- private static void recycleAllVisibilityObjects(ArraySet<NotificationVisibility> array) {
- for (int i = 0; i < array.size(); i++) {
- array.valueAt(i).recycle();
- }
- array.clear();
- }
-
- /**
- * Converts Set of NotificationVisibility objects to primitive array.
- */
- private static NotificationVisibility[] cloneVisibilitiesAsArr(Set<NotificationVisibility> c) {
- NotificationVisibility[] array = new NotificationVisibility[c.size()];
- int i = 0;
- for (NotificationVisibility nv : c) {
- if (nv != null) {
- array[i] = nv.clone();
- }
- i++;
- }
- return array;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/PowerManagerHelper.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/PowerManagerHelper.java
deleted file mode 100644
index da43c5487623..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/PowerManagerHelper.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import android.annotation.NonNull;
-import android.car.Car;
-import android.car.hardware.power.CarPowerManager;
-import android.car.hardware.power.CarPowerManager.CarPowerStateListener;
-import android.util.Log;
-
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/**
- * Helper class for connecting to the {@link CarPowerManager} and listening for power state changes.
- */
-@SysUISingleton
-public class PowerManagerHelper {
- public static final String TAG = "PowerManagerHelper";
-
- private final CarServiceProvider mCarServiceProvider;
-
- private CarPowerManager mCarPowerManager;
- private CarPowerStateListener mCarPowerStateListener;
-
- private final CarServiceProvider.CarServiceOnConnectedListener mCarServiceLifecycleListener;
-
- @Inject
- public PowerManagerHelper(CarServiceProvider carServiceProvider) {
- mCarServiceProvider = carServiceProvider;
- mCarServiceLifecycleListener = car -> {
- Log.d(TAG, "Car Service connected");
- mCarPowerManager = (CarPowerManager) car.getCarManager(Car.POWER_SERVICE);
- if (mCarPowerManager != null) {
- mCarPowerManager.setListener(mCarPowerStateListener);
- } else {
- Log.e(TAG, "CarPowerManager service not available");
- }
- };
- }
-
- /**
- * Sets a {@link CarPowerStateListener}. Should be set before {@link #connectToCarService()}.
- */
- public void setCarPowerStateListener(@NonNull CarPowerStateListener listener) {
- mCarPowerStateListener = listener;
- }
-
- /**
- * Connect to Car service.
- */
- public void connectToCarService() {
- mCarServiceProvider.addListener(mCarServiceLifecycleListener);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java
deleted file mode 100644
index 9bc5b74cda6c..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/TopNotificationPanelViewMediator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.car.window.OverlayPanelViewController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-
-import javax.inject.Inject;
-
-/**
- * Implementation of NotificationPanelViewMediator that sets the notification panel to be opened
- * from the top navigation bar.
- */
-@SysUISingleton
-public class TopNotificationPanelViewMediator extends NotificationPanelViewMediator {
-
- @Inject
- public TopNotificationPanelViewMediator(
- CarNavigationBarController carNavigationBarController,
- NotificationPanelViewController notificationPanelViewController,
-
- PowerManagerHelper powerManagerHelper,
- BroadcastDispatcher broadcastDispatcher,
-
- CarDeviceProvisionedController carDeviceProvisionedController,
- ConfigurationController configurationController
- ) {
- super(carNavigationBarController,
- notificationPanelViewController,
- powerManagerHelper,
- broadcastDispatcher,
- carDeviceProvisionedController,
- configurationController);
- notificationPanelViewController.setOverlayDirection(
- OverlayPanelViewController.OVERLAY_FROM_TOP_BAR);
- }
-
- @Override
- public void registerListeners() {
- super.registerListeners();
- getCarNavigationBarController().registerTopBarTouchListener(
- getNotificationPanelViewController().getDragOpenTouchListener());
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewController.java
deleted file mode 100644
index d63463309ec5..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewController.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.rvc;
-
-import android.app.ActivityView;
-import android.app.ActivityView.StateCallback;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.content.res.Resources;
-import android.util.Slog;
-import android.view.ViewGroup;
-import android.widget.LinearLayout.LayoutParams;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.systemui.R;
-import com.android.systemui.car.window.OverlayViewController;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-
-import javax.inject.Inject;
-
-/** View controller for the rear view camera. */
-@SysUISingleton
-public class RearViewCameraViewController extends OverlayViewController {
- private static final String TAG = "RearViewCameraView";
- private static final boolean DBG = false;
-
- private final ComponentName mRearViewCameraActivity;
- private ViewGroup mRvcView;
- private final LayoutParams mRvcViewLayoutParams = new LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, /* weight= */ 1.0f);
- @VisibleForTesting
- ActivityView mActivityView;
- @VisibleForTesting
- final StateCallback mActivityViewCallback = new StateCallback() {
- @Override
- public void onActivityViewReady(ActivityView view) {
- Intent intent = new Intent(Intent.ACTION_MAIN)
- .setComponent(mRearViewCameraActivity)
- .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
- .addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT)
- .addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
- // TODO(b/170899079): Migrate this to FixedActivityService.
- view.startActivity(intent);
- }
-
- @Override
- public void onActivityViewDestroyed(ActivityView view) {}
- };
-
- @Inject
- public RearViewCameraViewController(
- @Main Resources resources,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
- super(R.id.rear_view_camera_stub, overlayViewGlobalStateController);
- String rearViewCameraActivityName = resources.getString(
- R.string.config_rearViewCameraActivity);
- if (!rearViewCameraActivityName.isEmpty()) {
- mRearViewCameraActivity = ComponentName.unflattenFromString(rearViewCameraActivityName);
- if (DBG) Slog.d(TAG, "mRearViewCameraActivity=" + mRearViewCameraActivity);
- } else {
- mRearViewCameraActivity = null;
- Slog.e(TAG, "RearViewCameraViewController is disabled, since no Activity is defined");
- }
- }
-
- @Override
- protected void onFinishInflate() {
- mRvcView = (ViewGroup) getLayout().findViewById(R.id.rear_view_camera_container);
- getLayout().findViewById(R.id.close_button).setOnClickListener(v -> {
- stop();
- });
- }
-
- @Override
- protected void hideInternal() {
- super.hideInternal();
- if (DBG) Slog.d(TAG, "hideInternal: mActivityView=" + mActivityView);
- if (mActivityView == null) return;
- mRvcView.removeView(mActivityView);
- // Release ActivityView since the Activity on ActivityView (with showWhenLocked flag) keeps
- // running even if ActivityView is hidden.
- mActivityView.release();
- mActivityView = null;
- }
-
- @Override
- protected void showInternal() {
- super.showInternal();
- if (DBG) Slog.d(TAG, "showInternal: mActivityView=" + mActivityView);
- if (mActivityView != null) return;
- mActivityView = new ActivityView(mRvcView.getContext());
- mActivityView.setCallback(mActivityViewCallback);
- mActivityView.setLayoutParams(mRvcViewLayoutParams);
- mRvcView.addView(mActivityView, /* index= */ 0);
- }
-
- boolean isShown() {
- return mActivityView != null;
- }
-
- boolean isEnabled() {
- return mRearViewCameraActivity != null;
- }
-
- @Override
- protected boolean shouldShowHUN() {
- return false;
- }
-
- @Override
- protected boolean shouldShowWhenOccluded() {
- // Returns true to show it on top of Keylock.
- return true;
- }
-
- @Override
- protected boolean shouldShowNavigationBarInsets() {
- return true;
- }
-
- @Override
- protected boolean shouldShowStatusBarInsets() {
- return true;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewMediator.java
deleted file mode 100644
index c575c423b256..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/rvc/RearViewCameraViewMediator.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.rvc;
-
-import android.car.Car;
-import android.car.VehicleGear;
-import android.car.VehiclePropertyIds;
-import android.car.hardware.CarPropertyValue;
-import android.car.hardware.property.CarPropertyManager;
-import android.car.hardware.property.CarPropertyManager.CarPropertyEventCallback;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.UserHandle;
-import android.util.Slog;
-
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.window.OverlayViewMediator;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/**
- * View mediator for the rear view camera (RVC), which monitors the gear changes and shows
- * the RVC when the gear position is R and otherwise it hides the RVC.
- */
-@SysUISingleton
-public class RearViewCameraViewMediator implements OverlayViewMediator {
- private static final String TAG = "RearViewCameraView";
- private static final boolean DBG = false;
-
- private final RearViewCameraViewController mRearViewCameraViewController;
- private final CarServiceProvider mCarServiceProvider;
- private final BroadcastDispatcher mBroadcastDispatcher;
-
- private CarPropertyManager mCarPropertyManager;
- // TODO(b/170792252): Replace the following with the callback from CarEvsManager if it's ready.
- private final CarPropertyEventCallback mPropertyEventCallback = new CarPropertyEventCallback() {
- @Override
- public void onChangeEvent(CarPropertyValue value) {
- if (DBG) Slog.d(TAG, "onChangeEvent value=" + value);
- if (value.getPropertyId() != VehiclePropertyIds.GEAR_SELECTION) {
- Slog.w(TAG, "Got the event for non-registered property: " + value.getPropertyId());
- return;
- }
- if ((Integer) value.getValue() == VehicleGear.GEAR_REVERSE) {
- mRearViewCameraViewController.start();
- } else {
- mRearViewCameraViewController.stop();
- }
- }
- @Override
- public void onErrorEvent(int propId, int zone) {
- Slog.e(TAG, "onErrorEvent propId=" + propId + ", zone=" + zone);
- }
- };
-
- private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (DBG) Slog.d(TAG, "onReceive: " + intent);
- if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(intent.getAction())
- && mRearViewCameraViewController.isShown()) {
- mRearViewCameraViewController.stop();
- }
- }
- };
-
- @Inject
- public RearViewCameraViewMediator(
- RearViewCameraViewController rearViewCameraViewController,
- CarServiceProvider carServiceProvider,
- BroadcastDispatcher broadcastDispatcher) {
- if (DBG) Slog.d(TAG, "RearViewCameraViewMediator:init");
- mRearViewCameraViewController = rearViewCameraViewController;
- mCarServiceProvider = carServiceProvider;
- mBroadcastDispatcher = broadcastDispatcher;
- }
-
- @Override
- public void registerListeners() {
- if (DBG) Slog.d(TAG, "RearViewCameraViewMediator:registerListeners");
- if (!mRearViewCameraViewController.isEnabled()) {
- Slog.i(TAG, "RearViewCameraViewController isn't enabled");
- return;
- }
-
- mCarServiceProvider.addListener(car -> {
- mCarPropertyManager = (CarPropertyManager) car.getCarManager(Car.PROPERTY_SERVICE);
- if (mCarPropertyManager == null) {
- Slog.e(TAG, "Unable to get CarPropertyManager");
- return;
- }
- if (DBG) Slog.d(TAG, "Registering mPropertyEventCallback.");
- mCarPropertyManager.registerCallback(mPropertyEventCallback,
- VehiclePropertyIds.GEAR_SELECTION, CarPropertyManager.SENSOR_RATE_UI);
- });
- mBroadcastDispatcher.registerReceiver(mBroadcastReceiver,
- new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), /* executor= */ null,
- UserHandle.ALL);
- }
-
- @Override
- public void setupOverlayContentViewControllers() {}
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppController.java b/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppController.java
deleted file mode 100644
index b8d6964fa32d..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppController.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.sideloaded;
-
-import android.app.IActivityTaskManager;
-import android.content.Context;
-import android.os.RemoteException;
-import android.util.Log;
-
-import com.android.systemui.SystemUI;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/**
- * Controller responsible for detecting unsafe apps.
- */
-@SysUISingleton
-public class SideLoadedAppController extends SystemUI {
- private static final String TAG = SideLoadedAppController.class.getSimpleName();
-
- private IActivityTaskManager mActivityTaskManager;
- private SideLoadedAppListener mSideLoadedAppListener;
- private SideLoadedAppDetector mSideLoadedAppDetector;
- private SideLoadedAppStateController mSideLoadedAppStateController;
-
- @Inject
- public SideLoadedAppController(Context context,
- IActivityTaskManager activityTaskManager,
- SideLoadedAppDetector sideLoadedAppDetector,
- SideLoadedAppListener sideLoadedAppListener,
- SideLoadedAppStateController sideLoadedAppStateController) {
- super(context);
-
- mSideLoadedAppDetector = sideLoadedAppDetector;
- mActivityTaskManager = activityTaskManager;
- mSideLoadedAppListener = sideLoadedAppListener;
- mSideLoadedAppStateController = sideLoadedAppStateController;
- }
-
- @Override
- public void start() {
- }
-
- @Override
- protected void onBootCompleted() {
- Log.i(TAG, "OnBootCompleted");
-
- try {
- mActivityTaskManager.registerTaskStackListener(mSideLoadedAppListener);
- } catch (RemoteException e) {
- Log.e(TAG, "Could not register car side loaded app listener.", e);
- }
-
- if (mSideLoadedAppDetector.hasUnsafeInstalledApps()) {
- mSideLoadedAppStateController.onUnsafeInstalledAppsDetected();
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppDetector.java b/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppDetector.java
deleted file mode 100644
index f96ee0f73dc0..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppDetector.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.sideloaded;
-
-import android.annotation.NonNull;
-import android.app.ActivityTaskManager.RootTaskInfo;
-import android.content.ComponentName;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.InstallSourceInfo;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.os.UserHandle;
-import android.util.Log;
-
-import com.android.systemui.R;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.inject.Inject;
-
-/**
- * A class that detects unsafe apps.
- * An app is considered safe if is a system app or installed through allowed sources.
- */
-@SysUISingleton
-public class SideLoadedAppDetector {
- private static final String TAG = SideLoadedAppDetector.class.getSimpleName();
-
- private final PackageManager mPackageManager;
- private final CarDeviceProvisionedController mCarDeviceProvisionedController;
- private final List<String> mAllowedAppInstallSources;
-
- @Inject
- public SideLoadedAppDetector(@Main Resources resources, PackageManager packageManager,
- CarDeviceProvisionedController deviceProvisionedController) {
- mAllowedAppInstallSources = Arrays.asList(
- resources.getStringArray(R.array.config_allowedAppInstallSources));
- mPackageManager = packageManager;
- mCarDeviceProvisionedController = deviceProvisionedController;
- }
-
- boolean hasUnsafeInstalledApps() {
- int userId = mCarDeviceProvisionedController.getCurrentUser();
-
- List<PackageInfo> packages = mPackageManager.getInstalledPackagesAsUser(
- PackageManager.MATCH_DIRECT_BOOT_AWARE
- | PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
- userId);
- for (PackageInfo info : packages) {
- if (info.applicationInfo == null) {
- Log.w(TAG, info.packageName + " does not have application info.");
- return true;
- }
-
- if (!isSafe(info.applicationInfo)) {
- return true;
- }
- }
- return false;
- }
-
- boolean isSafe(@NonNull RootTaskInfo taskInfo) {
- ComponentName componentName = taskInfo.topActivity;
- if (componentName == null) {
- Log.w(TAG, "Task info does not have top activity: " + taskInfo.taskId);
- return false;
- }
- return isSafe(componentName.getPackageName());
- }
-
- private boolean isSafe(@NonNull String packageName) {
- if (packageName == null) {
- return false;
- }
-
- ApplicationInfo applicationInfo;
- try {
- int userId = mCarDeviceProvisionedController.getCurrentUser();
- applicationInfo = mPackageManager.getApplicationInfoAsUser(packageName,
- PackageManager.MATCH_DIRECT_BOOT_AWARE
- | PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
- UserHandle.of(userId));
-
- if (applicationInfo == null) {
- Log.e(TAG, packageName + " did not have an application info!");
- return false;
- }
- } catch (PackageManager.NameNotFoundException e) {
- Log.e(TAG, "Could not get application info for package:" + packageName, e);
- return false;
- }
-
- return isSafe(applicationInfo);
- }
-
- private boolean isSafe(@NonNull ApplicationInfo applicationInfo) {
- String packageName = applicationInfo.packageName;
-
- if (applicationInfo.isSystemApp() || applicationInfo.isUpdatedSystemApp()) {
- return true;
- }
-
- String initiatingPackageName;
- try {
- InstallSourceInfo sourceInfo = mPackageManager.getInstallSourceInfo(packageName);
- initiatingPackageName = sourceInfo.getInitiatingPackageName();
- if (initiatingPackageName == null) {
- Log.w(TAG, packageName + " does not have an installer name.");
- return false;
- }
-
- return mAllowedAppInstallSources.contains(initiatingPackageName);
- } catch (IllegalArgumentException | PackageManager.NameNotFoundException e) {
- return false;
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppListener.java b/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppListener.java
deleted file mode 100644
index db7718bc166b..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppListener.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.sideloaded;
-
-import android.app.ActivityTaskManager.RootTaskInfo;
-import android.app.IActivityTaskManager;
-import android.app.TaskStackListener;
-import android.content.ComponentName;
-import android.hardware.display.DisplayManager;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.Display;
-
-import java.util.List;
-
-import javax.inject.Inject;
-
-/**
- * A TaskStackListener to detect when an unsafe app is launched/foregrounded.
- */
-public class SideLoadedAppListener extends TaskStackListener {
- private static final String TAG = SideLoadedAppListener.class.getSimpleName();
-
- private IActivityTaskManager mActivityTaskManager;
- private DisplayManager mDisplayManager;
- private SideLoadedAppDetector mSideLoadedAppDetector;
- private SideLoadedAppStateController mSideLoadedAppStateController;
-
- @Inject
- SideLoadedAppListener(SideLoadedAppDetector sideLoadedAppDetector,
- IActivityTaskManager activityTaskManager,
- DisplayManager displayManager,
- SideLoadedAppStateController sideLoadedAppStateController) {
- mSideLoadedAppDetector = sideLoadedAppDetector;
- mActivityTaskManager = activityTaskManager;
- mDisplayManager = displayManager;
- mSideLoadedAppStateController = sideLoadedAppStateController;
- }
-
- @Override
- public void onTaskCreated(int taskId, ComponentName componentName) throws RemoteException {
- super.onTaskCreated(taskId, componentName);
-
- List<RootTaskInfo> taskInfoList = mActivityTaskManager.getAllRootTaskInfos();
- RootTaskInfo taskInfo = getStackInfo(taskInfoList, taskId);
- if (taskInfo == null) {
- Log.e(TAG, "Stack info was not available for taskId: " + taskId);
- return;
- }
-
- if (!mSideLoadedAppDetector.isSafe(taskInfo)) {
- Display display = mDisplayManager.getDisplay(taskInfo.displayId);
- mSideLoadedAppStateController.onUnsafeTaskCreatedOnDisplay(display);
- }
- }
-
- @Override
- public void onTaskStackChanged() throws RemoteException {
- super.onTaskStackChanged();
-
- Display[] displays = mDisplayManager.getDisplays();
- for (Display display : displays) {
- // Note that the taskInfoList is ordered by recency.
- List<RootTaskInfo> taskInfoList =
- mActivityTaskManager.getAllRootTaskInfosOnDisplay(display.getDisplayId());
-
- if (taskInfoList == null) {
- continue;
- }
- RootTaskInfo taskInfo = getTopVisibleStackInfo(taskInfoList);
- if (taskInfo == null) {
- continue;
- }
- if (mSideLoadedAppDetector.isSafe(taskInfo)) {
- mSideLoadedAppStateController.onSafeTaskDisplayedOnDisplay(display);
- } else {
- mSideLoadedAppStateController.onUnsafeTaskDisplayedOnDisplay(display);
- }
- }
- }
-
- /**
- * Returns stack info for a given taskId.
- */
- private RootTaskInfo getStackInfo(List<RootTaskInfo> taskInfoList, int taskId) {
- if (taskInfoList == null) {
- return null;
- }
- for (RootTaskInfo taskInfo : taskInfoList) {
- if (taskInfo.childTaskIds == null) {
- continue;
- }
- for (int taskTaskId : taskInfo.childTaskIds) {
- if (taskId == taskTaskId) {
- return taskInfo;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns the first visible stackInfo.
- */
- private RootTaskInfo getTopVisibleStackInfo(List<RootTaskInfo> taskInfoList) {
- for (RootTaskInfo taskInfo : taskInfoList) {
- if (taskInfo.visible) {
- return taskInfo;
- }
- }
- return null;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppStateController.java b/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppStateController.java
deleted file mode 100644
index 5b4faa152685..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/SideLoadedAppStateController.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.sideloaded;
-
-import android.util.Log;
-import android.view.Display;
-
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/**
- * Manager responsible for displaying proper UI when an unsafe app is detected.
- */
-@SysUISingleton
-public class SideLoadedAppStateController {
- private static final String TAG = SideLoadedAppStateController.class.getSimpleName();
-
- @Inject
- SideLoadedAppStateController() {
- }
-
- void onUnsafeInstalledAppsDetected() {
- Log.d(TAG, "Unsafe installed apps detected.");
- }
-
- void onUnsafeTaskCreatedOnDisplay(Display display) {
- Log.d(TAG, "Unsafe task created on display " + display.getDisplayId() + ".");
- }
-
- void onSafeTaskDisplayedOnDisplay(Display display) {
- Log.d(TAG, "Safe task displayed on display " + display.getDisplayId() + ".");
- }
-
- void onUnsafeTaskDisplayedOnDisplay(Display display) {
- Log.d(TAG, "Unsafe task displayed on display " + display.getDisplayId() + ".");
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/DozeServiceHost.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/DozeServiceHost.java
deleted file mode 100644
index 3fb3cd8833b9..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/DozeServiceHost.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.statusbar;
-
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.doze.DozeHost;
-
-import javax.inject.Inject;
-
-/** No-op implementation of {@link DozeHost} for use by car sysui, which does not support dozing. */
-@SysUISingleton
-public class DozeServiceHost implements DozeHost {
-
- @Inject
- public DozeServiceHost() {}
-
- @Override
- public void addCallback(Callback callback) {
- // No op.
- }
-
- @Override
- public void removeCallback(Callback callback) {
- // No op.
- }
-
- @Override
- public void startDozing() {
- // No op.
- }
-
- @Override
- public void pulseWhileDozing(PulseCallback callback, int reason) {
- // No op.
- }
-
- @Override
- public void stopDozing() {
- // No op.
- }
-
- @Override
- public void dozeTimeTick() {
- // No op.
- }
-
- @Override
- public boolean isPowerSaveActive() {
- return false;
- }
-
- @Override
- public boolean isPulsingBlocked() {
- return true;
- }
-
- @Override
- public boolean isProvisioned() {
- return false;
- }
-
- @Override
- public boolean isBlockingDoze() {
- return true;
- }
-
- @Override
- public void extendPulse(int reason) {
- // No op.
- }
-
- @Override
- public void setAnimateWakeup(boolean animateWakeup) {
- // No op.
- }
-
- @Override
- public void setAnimateScreenOff(boolean animateScreenOff) {
- // No op.
- }
-
- @Override
- public void onSlpiTap(float x, float y) {
- // No op.
- }
-
- @Override
- public void setDozeScreenBrightness(int value) {
- // No op.
- }
-
- @Override
- public void prepareForGentleSleep(Runnable onDisplayOffCallback) {
- // No op.
- }
-
- @Override
- public void cancelGentleSleep() {
- // No op.
- }
-
- @Override
- public void onIgnoreTouchWhilePulsing(boolean ignore) {
- // No op.
- }
-
- @Override
- public void stopPulsing() {
- // No op.
- }
-
- @Override
- public boolean isDozeSuppressed() {
- return true;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UserNameViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UserNameViewController.java
deleted file mode 100644
index 1b1a118d6ba1..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UserNameViewController.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.statusbar;
-
-import android.car.Car;
-import android.car.user.CarUserManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.UserInfo;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.util.Log;
-import android.view.View;
-import android.widget.TextView;
-
-import com.android.systemui.R;
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.dagger.SysUISingleton;
-
-import javax.inject.Inject;
-
-/**
- * Controls a TextView with the current driver's username
- */
-@SysUISingleton
-public class UserNameViewController {
- private static final String TAG = "UserNameViewController";
-
- private Context mContext;
- private UserManager mUserManager;
- private CarUserManager mCarUserManager;
- private CarServiceProvider mCarServiceProvider;
- private CarDeviceProvisionedController mCarDeviceProvisionedController;
- private BroadcastDispatcher mBroadcastDispatcher;
- private TextView mUserNameView;
-
- private final BroadcastReceiver mUserUpdateReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- updateUser(mCarDeviceProvisionedController.getCurrentUser());
- }
- };
-
- private boolean mUserLifecycleListenerRegistered = false;
-
- private final CarUserManager.UserLifecycleListener mUserLifecycleListener =
- new CarUserManager.UserLifecycleListener() {
- @Override
- public void onEvent(CarUserManager.UserLifecycleEvent event) {
- if (event.getEventType()
- == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING) {
- updateUser(event.getUserId());
- }
- }
- };
-
- @Inject
- public UserNameViewController(Context context, CarServiceProvider carServiceProvider,
- UserManager userManager, BroadcastDispatcher broadcastDispatcher,
- CarDeviceProvisionedController carDeviceProvisionedController) {
- mContext = context;
- mCarServiceProvider = carServiceProvider;
- mUserManager = userManager;
- mBroadcastDispatcher = broadcastDispatcher;
- mCarDeviceProvisionedController = carDeviceProvisionedController;
- }
-
- /**
- * Find the {@link TextView} for the driver's user name from a view and if found set it with the
- * current driver's user name.
- */
- public void addUserNameView(View v) {
- TextView userNameView = v.findViewById(R.id.user_name_text);
- if (userNameView != null) {
- if (mUserNameView == null) {
- registerForUserChangeEvents();
- }
- mUserNameView = userNameView;
- updateUser(mCarDeviceProvisionedController.getCurrentUser());
- }
- }
-
- /**
- * Clean up the controller and unregister receiver.
- */
- public void removeAll() {
- mUserNameView = null;
- if (mUserLifecycleListenerRegistered) {
- mBroadcastDispatcher.unregisterReceiver(mUserUpdateReceiver);
- if (mCarUserManager != null) {
- mCarUserManager.removeListener(mUserLifecycleListener);
- }
- mUserLifecycleListenerRegistered = false;
- }
- }
-
- private void registerForUserChangeEvents() {
- // Register for user switching
- mCarServiceProvider.addListener(car -> {
- mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE);
- if (mCarUserManager != null) {
- mCarUserManager.addListener(Runnable::run, mUserLifecycleListener);
- mUserLifecycleListenerRegistered = true;
- } else {
- Log.e(TAG, "CarUserManager could not be obtained.");
- }
- });
- // Also register for user info changing
- IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_USER_INFO_CHANGED);
- mBroadcastDispatcher.registerReceiver(mUserUpdateReceiver, filter, /* executor= */ null,
- UserHandle.ALL);
- }
-
- private void updateUser(int userId) {
- if (mUserNameView != null) {
- UserInfo currentUserInfo = mUserManager.getUserInfo(userId);
- mUserNameView.setText(currentUserInfo.name);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/CarStatusBarHeader.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/CarStatusBarHeader.java
deleted file mode 100644
index 0a677bfaa742..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/CarStatusBarHeader.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import android.content.Context;
-import android.graphics.Color;
-import android.graphics.Rect;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.LinearLayout;
-
-import androidx.annotation.IdRes;
-
-import com.android.settingslib.Utils;
-import com.android.systemui.R;
-import com.android.systemui.plugins.DarkIconDispatcher;
-
-/**
- * A view that forms the header of the notification panel. This view will ensure that any
- * status icons that are displayed are tinted accordingly to the current theme.
- */
-public class CarStatusBarHeader extends LinearLayout {
- public CarStatusBarHeader(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
-
- // Set the light/dark theming on the header status UI to match the current theme.
- int colorForeground = Utils.getColorAttrDefaultColor(getContext(),
- android.R.attr.colorForeground);
- float intensity = colorForeground == Color.WHITE ? 0f : 1f;
- Rect tintArea = new Rect(0, 0, 0, 0);
-
- applyDarkness(R.id.clock, tintArea, intensity, colorForeground);
- }
-
- private void applyDarkness(@IdRes int id, Rect tintArea, float intensity, int color) {
- View v = findViewById(id);
- if (v instanceof DarkIconDispatcher.DarkReceiver) {
- ((DarkIconDispatcher.DarkReceiver) v).onDarkChanged(tintArea, intensity, color);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java
deleted file mode 100644
index 3a7fac9c0e79..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullScreenUserSwitcherViewController.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.car.Car;
-import android.car.user.CarUserManager;
-import android.content.Context;
-import android.content.res.Resources;
-import android.view.View;
-
-import androidx.recyclerview.widget.GridLayoutManager;
-
-import com.android.systemui.R;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.window.OverlayViewController;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-
-import javax.inject.Inject;
-
-/**
- * Controller for {@link R.layout#car_fullscreen_user_switcher}.
- */
-@SysUISingleton
-public class FullScreenUserSwitcherViewController extends OverlayViewController {
- private final Context mContext;
- private final Resources mResources;
- private final CarServiceProvider mCarServiceProvider;
- private final int mShortAnimationDuration;
- private CarUserManager mCarUserManager;
- private UserGridRecyclerView mUserGridView;
- private UserGridRecyclerView.UserSelectionListener mUserSelectionListener;
-
- @Inject
- public FullScreenUserSwitcherViewController(
- Context context,
- @Main Resources resources,
- CarServiceProvider carServiceProvider,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
- super(R.id.fullscreen_user_switcher_stub, overlayViewGlobalStateController);
- mContext = context;
- mResources = resources;
- mCarServiceProvider = carServiceProvider;
- mCarServiceProvider.addListener(car -> {
- mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE);
- registerCarUserManagerIfPossible();
- });
- mShortAnimationDuration = mResources.getInteger(android.R.integer.config_shortAnimTime);
- }
-
- @Override
- protected void onFinishInflate() {
- // Initialize user grid.
- mUserGridView = getLayout().findViewById(R.id.user_grid);
- GridLayoutManager layoutManager = new GridLayoutManager(mContext,
- mResources.getInteger(R.integer.user_fullscreen_switcher_num_col));
- mUserGridView.setLayoutManager(layoutManager);
- mUserGridView.buildAdapter();
- mUserGridView.setUserSelectionListener(mUserSelectionListener);
- registerCarUserManagerIfPossible();
- }
-
- @Override
- protected boolean shouldFocusWindow() {
- return false;
- }
-
- @Override
- protected void showInternal() {
- getLayout().setVisibility(View.VISIBLE);
- }
-
- @Override
- protected void hideInternal() {
- // Switching is about to happen, since it takes time, fade out the switcher gradually.
- fadeOut();
- }
-
- private void fadeOut() {
- mUserGridView.animate()
- .alpha(0.0f)
- .setDuration(mShortAnimationDuration)
- .setListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- getLayout().setVisibility(View.GONE);
- mUserGridView.setAlpha(1.0f);
- }
- });
-
- }
-
- /**
- * Set {@link UserGridRecyclerView.UserSelectionListener}.
- */
- void setUserGridSelectionListener(
- UserGridRecyclerView.UserSelectionListener userGridSelectionListener) {
- mUserSelectionListener = userGridSelectionListener;
- }
-
- private void registerCarUserManagerIfPossible() {
- if (mUserGridView != null && mCarUserManager != null) {
- mUserGridView.setCarUserManager(mCarUserManager);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullscreenUserSwitcherViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullscreenUserSwitcherViewMediator.java
deleted file mode 100644
index 165fe63c7f37..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/FullscreenUserSwitcherViewMediator.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import com.android.systemui.car.keyguard.CarKeyguardViewController;
-import com.android.systemui.car.window.OverlayViewMediator;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.statusbar.StatusBarState;
-
-import javax.inject.Inject;
-
-/**
- * Manages the fullscreen user switcher and it's interactions with the keyguard.
- */
-@SysUISingleton
-public class FullscreenUserSwitcherViewMediator implements OverlayViewMediator {
- private static final String TAG = FullscreenUserSwitcherViewMediator.class.getSimpleName();
-
- private final StatusBarStateController mStatusBarStateController;
- private final FullScreenUserSwitcherViewController mFullScreenUserSwitcherViewController;
- private final CarKeyguardViewController mCarKeyguardViewController;
- private final UserSwitchTransitionViewController mUserSwitchTransitionViewController;
-
- @Inject
- public FullscreenUserSwitcherViewMediator(
- StatusBarStateController statusBarStateController,
- CarKeyguardViewController carKeyguardViewController,
- UserSwitchTransitionViewController userSwitchTransitionViewController,
- FullScreenUserSwitcherViewController fullScreenUserSwitcherViewController) {
-
- mStatusBarStateController = statusBarStateController;
- mCarKeyguardViewController = carKeyguardViewController;
- mUserSwitchTransitionViewController = userSwitchTransitionViewController;
- mFullScreenUserSwitcherViewController = fullScreenUserSwitcherViewController;
- }
-
- @Override
- public void registerListeners() {
- registerUserSwitcherHideListeners();
- }
-
- private void registerUserSwitcherHideListeners() {
- mStatusBarStateController.addCallback(new StatusBarStateController.StateListener() {
- @Override
- public void onStateChanged(int newState) {
- if (newState == StatusBarState.FULLSCREEN_USER_SWITCHER) {
- return;
- }
- hide();
- }
- });
- }
-
- @Override
- public void setupOverlayContentViewControllers() {
- mFullScreenUserSwitcherViewController.setUserGridSelectionListener(this::onUserSelected);
- }
-
- /**
- * Every time user clicks on an item in the switcher, we hide the switcher.
- */
- private void onUserSelected(UserGridRecyclerView.UserRecord record) {
- if (record.mType != UserGridRecyclerView.UserRecord.FOREGROUND_USER) {
- mCarKeyguardViewController.hideKeyguardToPrepareBouncer();
- // If guest user, we cannot use record.mInfo.id and should listen to the User lifecycle
- // event instead.
- if (record.mType != UserGridRecyclerView.UserRecord.START_GUEST) {
- mUserSwitchTransitionViewController.handleShow(record.mInfo.id);
- }
- }
-
- hide();
- }
-
- private void hide() {
- mFullScreenUserSwitcherViewController.stop();
- }
-
- private void show() {
- mFullScreenUserSwitcherViewController.start();
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java
deleted file mode 100644
index 6d63e31d79b5..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java
+++ /dev/null
@@ -1,657 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import static android.content.DialogInterface.BUTTON_NEGATIVE;
-import static android.content.DialogInterface.BUTTON_POSITIVE;
-import static android.os.UserManager.DISALLOW_ADD_USER;
-import static android.os.UserManager.SWITCHABILITY_STATUS_OK;
-import static android.view.WindowInsets.Type.statusBars;
-
-import android.annotation.IntDef;
-import android.annotation.Nullable;
-import android.annotation.UserIdInt;
-import android.app.ActivityManager;
-import android.app.AlertDialog;
-import android.app.AlertDialog.Builder;
-import android.app.Dialog;
-import android.car.user.CarUserManager;
-import android.car.user.UserCreationResult;
-import android.car.user.UserSwitchResult;
-import android.car.userlib.UserHelper;
-import android.car.util.concurrent.AsyncFuture;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.UserInfo;
-import android.content.res.Resources;
-import android.graphics.Rect;
-import android.os.AsyncTask;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.sysprop.CarProperties;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.Window;
-import android.view.WindowManager;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import androidx.core.graphics.drawable.RoundedBitmapDrawable;
-import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory;
-import androidx.recyclerview.widget.GridLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.android.internal.util.UserIcons;
-import com.android.systemui.R;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-
-/**
- * Displays a GridLayout with icons for the users in the system to allow switching between users.
- * One of the uses of this is for the lock screen in auto.
- */
-public class UserGridRecyclerView extends RecyclerView {
- private static final String TAG = UserGridRecyclerView.class.getSimpleName();
- private static final int TIMEOUT_MS = CarProperties.user_hal_timeout().orElse(5_000) + 500;
-
- private UserSelectionListener mUserSelectionListener;
- private UserAdapter mAdapter;
- private CarUserManager mCarUserManager;
- private UserManager mUserManager;
- private Context mContext;
- private UserIconProvider mUserIconProvider;
-
- private final BroadcastReceiver mUserUpdateReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- onUsersUpdate();
- }
- };
-
- public UserGridRecyclerView(Context context, AttributeSet attrs) {
- super(context, attrs);
- mContext = context;
- mUserManager = UserManager.get(mContext);
- mUserIconProvider = new UserIconProvider();
-
- addItemDecoration(new ItemSpacingDecoration(mContext.getResources().getDimensionPixelSize(
- R.dimen.car_user_switcher_vertical_spacing_between_users)));
- }
-
- /**
- * Register listener for any update to the users
- */
- @Override
- public void onFinishInflate() {
- super.onFinishInflate();
- registerForUserEvents();
- }
-
- /**
- * Unregisters listener checking for any change to the users
- */
- @Override
- public void onDetachedFromWindow() {
- super.onDetachedFromWindow();
- unregisterForUserEvents();
- }
-
- /**
- * Initializes the adapter that populates the grid layout
- */
- public void buildAdapter() {
- List<UserRecord> userRecords = createUserRecords(getUsersForUserGrid());
- mAdapter = new UserAdapter(mContext, userRecords);
- super.setAdapter(mAdapter);
- }
-
- private List<UserInfo> getUsersForUserGrid() {
- return mUserManager.getAliveUsers()
- .stream()
- .filter(UserInfo::supportsSwitchToByUser)
- .collect(Collectors.toList());
- }
-
- private List<UserRecord> createUserRecords(List<UserInfo> userInfoList) {
- int fgUserId = ActivityManager.getCurrentUser();
- UserHandle fgUserHandle = UserHandle.of(fgUserId);
- List<UserRecord> userRecords = new ArrayList<>();
-
- // If the foreground user CANNOT switch to other users, only display the foreground user.
- if (mUserManager.getUserSwitchability(fgUserHandle) != SWITCHABILITY_STATUS_OK) {
- userRecords.add(createForegroundUserRecord());
- return userRecords;
- }
-
- for (UserInfo userInfo : userInfoList) {
- if (userInfo.isGuest()) {
- // Don't display guests in the switcher.
- continue;
- }
-
- boolean isForeground = fgUserId == userInfo.id;
- UserRecord record = new UserRecord(userInfo,
- isForeground ? UserRecord.FOREGROUND_USER : UserRecord.BACKGROUND_USER);
- userRecords.add(record);
- }
-
- // Add button for starting guest session.
- userRecords.add(createStartGuestUserRecord());
-
- // Add add user record if the foreground user can add users
- if (!mUserManager.hasUserRestriction(DISALLOW_ADD_USER, fgUserHandle)) {
- userRecords.add(createAddUserRecord());
- }
-
- return userRecords;
- }
-
- private UserRecord createForegroundUserRecord() {
- return new UserRecord(mUserManager.getUserInfo(ActivityManager.getCurrentUser()),
- UserRecord.FOREGROUND_USER);
- }
-
- /**
- * Create guest user record
- */
- private UserRecord createStartGuestUserRecord() {
- return new UserRecord(null /* userInfo */, UserRecord.START_GUEST);
- }
-
- /**
- * Create add user record
- */
- private UserRecord createAddUserRecord() {
- return new UserRecord(null /* userInfo */, UserRecord.ADD_USER);
- }
-
- public void setUserSelectionListener(UserSelectionListener userSelectionListener) {
- mUserSelectionListener = userSelectionListener;
- }
-
- /** Sets a {@link CarUserManager}. */
- public void setCarUserManager(CarUserManager carUserManager) {
- mCarUserManager = carUserManager;
- }
-
- private void onUsersUpdate() {
- mAdapter.clearUsers();
- mAdapter.updateUsers(createUserRecords(getUsersForUserGrid()));
- mAdapter.notifyDataSetChanged();
- }
-
- private void registerForUserEvents() {
- IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_USER_REMOVED);
- filter.addAction(Intent.ACTION_USER_ADDED);
- filter.addAction(Intent.ACTION_USER_INFO_CHANGED);
- filter.addAction(Intent.ACTION_USER_SWITCHED);
- mContext.registerReceiverAsUser(
- mUserUpdateReceiver,
- UserHandle.ALL, // Necessary because CarSystemUi lives in User 0
- filter,
- /* broadcastPermission= */ null,
- /* scheduler= */ null);
- }
-
- private void unregisterForUserEvents() {
- mContext.unregisterReceiver(mUserUpdateReceiver);
- }
-
- /**
- * Adapter to populate the grid layout with the available user profiles
- */
- public final class UserAdapter extends RecyclerView.Adapter<UserAdapter.UserAdapterViewHolder>
- implements Dialog.OnClickListener, Dialog.OnCancelListener {
-
- private final Context mContext;
- private List<UserRecord> mUsers;
- private final Resources mRes;
- private final String mGuestName;
- private final String mNewUserName;
- // View that holds the add user button. Used to enable/disable the view
- private View mAddUserView;
- // User record for the add user. Need to call notifyUserSelected only if the user
- // confirms adding a user
- private UserRecord mAddUserRecord;
-
- public UserAdapter(Context context, List<UserRecord> users) {
- mRes = context.getResources();
- mContext = context;
- updateUsers(users);
- mGuestName = mRes.getString(R.string.car_guest);
- mNewUserName = mRes.getString(R.string.car_new_user);
- }
-
- /**
- * Clears list of user records.
- */
- public void clearUsers() {
- mUsers.clear();
- }
-
- /**
- * Updates list of user records.
- */
- public void updateUsers(List<UserRecord> users) {
- mUsers = users;
- }
-
- @Override
- public UserAdapterViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
- View view = LayoutInflater.from(mContext)
- .inflate(R.layout.car_fullscreen_user_pod, parent, false);
- view.setAlpha(1f);
- view.bringToFront();
- return new UserAdapterViewHolder(view);
- }
-
- @Override
- public void onBindViewHolder(UserAdapterViewHolder holder, int position) {
- UserRecord userRecord = mUsers.get(position);
- RoundedBitmapDrawable circleIcon = getCircularUserRecordIcon(userRecord);
- holder.mUserAvatarImageView.setImageDrawable(circleIcon);
- holder.mUserNameTextView.setText(getUserRecordName(userRecord));
-
- holder.mView.setOnClickListener(v -> {
- if (userRecord == null) {
- return;
- }
-
- switch (userRecord.mType) {
- case UserRecord.START_GUEST:
- notifyUserSelected(userRecord);
- UserInfo guest = createNewOrFindExistingGuest(mContext);
- if (guest != null) {
- if (!switchUser(guest.id)) {
- Log.e(TAG, "Failed to switch to guest user: " + guest.id);
- }
- }
- break;
- case UserRecord.ADD_USER:
- // If the user wants to add a user, show dialog to confirm adding a user
- // Disable button so it cannot be clicked multiple times
- mAddUserView = holder.mView;
- mAddUserView.setEnabled(false);
- mAddUserRecord = userRecord;
-
- handleAddUserClicked();
- break;
- default:
- // If the user doesn't want to be a guest or add a user, switch to the user
- // selected
- notifyUserSelected(userRecord);
- if (!switchUser(userRecord.mInfo.id)) {
- Log.e(TAG, "Failed to switch users: " + userRecord.mInfo.id);
- }
- }
- });
-
- }
-
- private void handleAddUserClicked() {
- if (!mUserManager.canAddMoreUsers()) {
- mAddUserView.setEnabled(true);
- showMaxUserLimitReachedDialog();
- } else {
- showConfirmAddUserDialog();
- }
- }
-
- /**
- * Get the maximum number of real (non-guest, non-managed profile) users that can be created
- * on the device. This is a dynamic value and it decreases with the increase of the number
- * of managed profiles on the device.
- *
- * <p> It excludes system user in headless system user model.
- *
- * @return Maximum number of real users that can be created.
- */
- private int getMaxSupportedRealUsers() {
- int maxSupportedUsers = UserManager.getMaxSupportedUsers();
- if (UserManager.isHeadlessSystemUserMode()) {
- maxSupportedUsers -= 1;
- }
-
- List<UserInfo> users = mUserManager.getAliveUsers();
-
- // Count all users that are managed profiles of another user.
- int managedProfilesCount = 0;
- for (UserInfo user : users) {
- if (user.isManagedProfile()) {
- managedProfilesCount++;
- }
- }
-
- return maxSupportedUsers - managedProfilesCount;
- }
-
- private void showMaxUserLimitReachedDialog() {
- AlertDialog maxUsersDialog = new Builder(mContext,
- com.android.internal.R.style.Theme_DeviceDefault_Dialog_Alert)
- .setTitle(R.string.user_limit_reached_title)
- .setMessage(getResources().getQuantityString(
- R.plurals.user_limit_reached_message,
- getMaxSupportedRealUsers(),
- getMaxSupportedRealUsers()))
- .setPositiveButton(android.R.string.ok, null)
- .create();
- // Sets window flags for the SysUI dialog
- applyCarSysUIDialogFlags(maxUsersDialog);
- maxUsersDialog.show();
- }
-
- private void showConfirmAddUserDialog() {
- String message = mRes.getString(R.string.user_add_user_message_setup)
- .concat(System.getProperty("line.separator"))
- .concat(System.getProperty("line.separator"))
- .concat(mRes.getString(R.string.user_add_user_message_update));
-
- AlertDialog addUserDialog = new Builder(mContext,
- com.android.internal.R.style.Theme_DeviceDefault_Dialog_Alert)
- .setTitle(R.string.user_add_user_title)
- .setMessage(message)
- .setNegativeButton(android.R.string.cancel, this)
- .setPositiveButton(android.R.string.ok, this)
- .setOnCancelListener(this)
- .create();
- // Sets window flags for the SysUI dialog
- applyCarSysUIDialogFlags(addUserDialog);
- addUserDialog.show();
- }
-
- private void applyCarSysUIDialogFlags(AlertDialog dialog) {
- final Window window = dialog.getWindow();
- window.setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
- window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
- | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
- window.getAttributes().setFitInsetsTypes(
- window.getAttributes().getFitInsetsTypes() & ~statusBars());
- }
-
- private void notifyUserSelected(UserRecord userRecord) {
- // Notify the listener which user was selected
- if (mUserSelectionListener != null) {
- mUserSelectionListener.onUserSelected(userRecord);
- }
- }
-
- private RoundedBitmapDrawable getCircularUserRecordIcon(UserRecord userRecord) {
- Resources resources = mContext.getResources();
- RoundedBitmapDrawable circleIcon;
- switch (userRecord.mType) {
- case UserRecord.START_GUEST:
- circleIcon = mUserIconProvider.getRoundedGuestDefaultIcon(resources);
- break;
- case UserRecord.ADD_USER:
- circleIcon = getCircularAddUserIcon();
- break;
- default:
- circleIcon = mUserIconProvider.getRoundedUserIcon(userRecord.mInfo, mContext);
- break;
- }
- return circleIcon;
- }
-
- private RoundedBitmapDrawable getCircularAddUserIcon() {
- RoundedBitmapDrawable circleIcon =
- RoundedBitmapDrawableFactory.create(mRes, UserIcons.convertToBitmap(
- mContext.getDrawable(R.drawable.car_add_circle_round)));
- circleIcon.setCircular(true);
- return circleIcon;
- }
-
- private String getUserRecordName(UserRecord userRecord) {
- String recordName;
- switch (userRecord.mType) {
- case UserRecord.START_GUEST:
- recordName = mContext.getString(R.string.start_guest_session);
- break;
- case UserRecord.ADD_USER:
- recordName = mContext.getString(R.string.car_add_user);
- break;
- default:
- recordName = userRecord.mInfo.name;
- break;
- }
- return recordName;
- }
-
- /**
- * Finds the existing Guest user, or creates one if it doesn't exist.
- * @param context App context
- * @return UserInfo representing the Guest user
- */
- @Nullable
- public UserInfo createNewOrFindExistingGuest(Context context) {
- AsyncFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName);
- // CreateGuest will return null if a guest already exists.
- UserInfo newGuest = getUserInfo(future);
- if (newGuest != null) {
- new UserIconProvider().assignDefaultIcon(
- mUserManager, context.getResources(), newGuest);
- return newGuest;
- }
-
- return mUserManager.findCurrentGuestUser();
- }
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if (which == BUTTON_POSITIVE) {
- new AddNewUserTask().execute(mNewUserName);
- } else if (which == BUTTON_NEGATIVE) {
- // Enable the add button only if cancel
- if (mAddUserView != null) {
- mAddUserView.setEnabled(true);
- }
- }
- }
-
- @Override
- public void onCancel(DialogInterface dialog) {
- // Enable the add button again if user cancels dialog by clicking outside the dialog
- if (mAddUserView != null) {
- mAddUserView.setEnabled(true);
- }
- }
-
- @Nullable
- private UserInfo getUserInfo(AsyncFuture<UserCreationResult> future) {
- UserCreationResult userCreationResult;
- try {
- userCreationResult = future.get(TIMEOUT_MS, TimeUnit.MILLISECONDS);
- } catch (Exception e) {
- Log.w(TAG, "Could not create user.", e);
- return null;
- }
-
- if (userCreationResult == null) {
- Log.w(TAG, "Timed out while creating user: " + TIMEOUT_MS + "ms");
- return null;
- }
- if (!userCreationResult.isSuccess() || userCreationResult.getUser() == null) {
- Log.w(TAG, "Could not create user: " + userCreationResult);
- return null;
- }
-
- return userCreationResult.getUser();
- }
-
- private boolean switchUser(@UserIdInt int userId) {
- AsyncFuture<UserSwitchResult> userSwitchResultFuture =
- mCarUserManager.switchUser(userId);
- UserSwitchResult userSwitchResult;
- try {
- userSwitchResult = userSwitchResultFuture.get(TIMEOUT_MS, TimeUnit.MILLISECONDS);
- } catch (Exception e) {
- Log.w(TAG, "Could not switch user.", e);
- return false;
- }
-
- if (userSwitchResult == null) {
- Log.w(TAG, "Timed out while switching user: " + TIMEOUT_MS + "ms");
- return false;
- }
- if (!userSwitchResult.isSuccess()) {
- Log.w(TAG, "Could not switch user: " + userSwitchResult);
- return false;
- }
-
- return true;
- }
-
- // TODO(b/161539497): Replace AsyncTask with standard {@link java.util.concurrent} code.
- private class AddNewUserTask extends AsyncTask<String, Void, UserInfo> {
-
- @Override
- protected UserInfo doInBackground(String... userNames) {
- AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0],
- /* flags= */ 0);
- try {
- UserInfo user = getUserInfo(future);
- if (user != null) {
- UserHelper.setDefaultNonAdminRestrictions(mContext, user,
- /* enable= */ true);
- UserHelper.assignDefaultIcon(mContext, user);
- mAddUserRecord = new UserRecord(user, UserRecord.ADD_USER);
- return user;
- } else {
- Log.e(TAG, "Failed to create user in the background");
- return user;
- }
- } catch (Exception e) {
- if (e instanceof InterruptedException) {
- Thread.currentThread().interrupt();
- }
- Log.e(TAG, "Error creating new user: ", e);
- }
- return null;
- }
-
- @Override
- protected void onPreExecute() {
- }
-
- @Override
- protected void onPostExecute(UserInfo user) {
- if (user != null) {
- notifyUserSelected(mAddUserRecord);
- mAddUserView.setEnabled(true);
- if (!switchUser(user.id)) {
- Log.e(TAG, "Failed to switch to new user: " + user.id);
- }
- }
- if (mAddUserView != null) {
- mAddUserView.setEnabled(true);
- }
- }
- }
-
- @Override
- public int getItemCount() {
- return mUsers.size();
- }
-
- /**
- * An extension of {@link RecyclerView.ViewHolder} that also houses the user name and the
- * user avatar.
- */
- public class UserAdapterViewHolder extends RecyclerView.ViewHolder {
-
- public ImageView mUserAvatarImageView;
- public TextView mUserNameTextView;
- public View mView;
-
- public UserAdapterViewHolder(View view) {
- super(view);
- mView = view;
- mUserAvatarImageView = (ImageView) view.findViewById(R.id.user_avatar);
- mUserNameTextView = (TextView) view.findViewById(R.id.user_name);
- }
- }
- }
-
- /**
- * Object wrapper class for the userInfo. Use it to distinguish if a profile is a
- * guest profile, add user profile, or the foreground user.
- */
- public static final class UserRecord {
- public final UserInfo mInfo;
- public final @UserRecordType int mType;
-
- public static final int START_GUEST = 0;
- public static final int ADD_USER = 1;
- public static final int FOREGROUND_USER = 2;
- public static final int BACKGROUND_USER = 3;
-
- @IntDef({START_GUEST, ADD_USER, FOREGROUND_USER, BACKGROUND_USER})
- @Retention(RetentionPolicy.SOURCE)
- public @interface UserRecordType{}
-
- public UserRecord(@Nullable UserInfo userInfo, @UserRecordType int recordType) {
- mInfo = userInfo;
- mType = recordType;
- }
- }
-
- /**
- * Listener used to notify when a user has been selected
- */
- interface UserSelectionListener {
-
- void onUserSelected(UserRecord record);
- }
-
- /**
- * A {@link RecyclerView.ItemDecoration} that will add spacing between each item in the
- * RecyclerView that it is added to.
- */
- private static class ItemSpacingDecoration extends RecyclerView.ItemDecoration {
- private int mItemSpacing;
-
- private ItemSpacingDecoration(int itemSpacing) {
- mItemSpacing = itemSpacing;
- }
-
- @Override
- public void getItemOffsets(Rect outRect, View view, RecyclerView parent,
- RecyclerView.State state) {
- super.getItemOffsets(outRect, view, parent, state);
- int position = parent.getChildAdapterPosition(view);
-
- // Skip offset for last item except for GridLayoutManager.
- if (position == state.getItemCount() - 1
- && !(parent.getLayoutManager() instanceof GridLayoutManager)) {
- return;
- }
-
- outRect.bottom = mItemSpacing;
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserIconProvider.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserIconProvider.java
deleted file mode 100644
index dc5953e38ccb..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserIconProvider.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import android.annotation.UserIdInt;
-import android.content.Context;
-import android.content.pm.UserInfo;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.Drawable;
-import android.os.UserHandle;
-import android.os.UserManager;
-
-import androidx.core.graphics.drawable.RoundedBitmapDrawable;
-import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory;
-
-import com.android.internal.util.UserIcons;
-import com.android.systemui.R;
-
-/**
- * Simple class for providing icons for users.
- */
-public class UserIconProvider {
- /**
- * Gets a scaled rounded icon for the given user. If a user does not have an icon saved, this
- * method will default to a generic icon and update UserManager to use that icon.
- *
- * @param userInfo User for which the icon is requested.
- * @param context Context to use for resources
- * @return {@link RoundedBitmapDrawable} representing the icon for the user.
- */
- public RoundedBitmapDrawable getRoundedUserIcon(UserInfo userInfo, Context context) {
- UserManager userManager = UserManager.get(context);
- Resources res = context.getResources();
- Bitmap icon = userManager.getUserIcon(userInfo.id);
-
- if (icon == null) {
- icon = assignDefaultIcon(userManager, res, userInfo);
- }
-
- return createScaledRoundIcon(res, icon);
- }
-
- /** Returns a scaled, rounded, default icon for the Guest user */
- public RoundedBitmapDrawable getRoundedGuestDefaultIcon(Resources resources) {
- return createScaledRoundIcon(resources, getGuestUserDefaultIcon(resources));
- }
-
- private RoundedBitmapDrawable createScaledRoundIcon(Resources resources, Bitmap icon) {
- BitmapDrawable scaledIcon = scaleUserIcon(resources, icon);
- RoundedBitmapDrawable circleIcon =
- RoundedBitmapDrawableFactory.create(resources, scaledIcon.getBitmap());
- circleIcon.setCircular(true);
- return circleIcon;
- }
-
- /**
- * Returns a {@link Drawable} for the given {@code icon} scaled to the appropriate size.
- */
- private static BitmapDrawable scaleUserIcon(Resources res, Bitmap icon) {
- int desiredSize = res.getDimensionPixelSize(R.dimen.car_primary_icon_size);
- Bitmap scaledIcon =
- Bitmap.createScaledBitmap(icon, desiredSize, desiredSize, /*filter=*/ true);
- return new BitmapDrawable(res, scaledIcon);
- }
-
- /**
- * Assigns a default icon to a user according to the user's id. Handles Guest icon and non-guest
- * user icons.
- *
- * @param userManager {@link UserManager} to set user icon
- * @param resources {@link Resources} to grab icons from
- * @param userInfo User whose avatar is set to default icon.
- * @return Bitmap of the user icon.
- */
- public Bitmap assignDefaultIcon(
- UserManager userManager, Resources resources, UserInfo userInfo) {
- Bitmap bitmap = userInfo.isGuest()
- ? getGuestUserDefaultIcon(resources)
- : getUserDefaultIcon(resources, userInfo.id);
- userManager.setUserIcon(userInfo.id, bitmap);
- return bitmap;
- }
-
- /**
- * Gets a bitmap representing the user's default avatar.
- *
- * @param resources The resources to pull from
- * @param id The id of the user to get the icon for. Pass {@link UserHandle#USER_NULL} for
- * Guest user.
- * @return Default user icon
- */
- private Bitmap getUserDefaultIcon(Resources resources, @UserIdInt int id) {
- return UserIcons.convertToBitmap(
- UserIcons.getDefaultUserIcon(resources, id, /* light= */ false));
- }
-
- private Bitmap getGuestUserDefaultIcon(Resources resources) {
- return getUserDefaultIcon(resources, UserHandle.USER_NULL);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java
deleted file mode 100644
index 6178cbd3a599..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewController.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import static android.car.settings.CarSettings.Global.ENABLE_USER_SWITCH_DEVELOPER_MESSAGE;
-
-import android.annotation.UserIdInt;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.os.Handler;
-import android.os.RemoteException;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.provider.Settings;
-import android.util.Log;
-import android.view.IWindowManager;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.settingslib.drawable.CircleFramedDrawable;
-import com.android.systemui.R;
-import com.android.systemui.car.window.OverlayViewController;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-
-import javax.inject.Inject;
-
-/**
- * Handles showing and hiding UserSwitchTransitionView that is mounted to SystemUiOverlayWindow.
- */
-@SysUISingleton
-public class UserSwitchTransitionViewController extends OverlayViewController {
- private static final String TAG = "UserSwitchTransition";
- private static final String ENABLE_DEVELOPER_MESSAGE_TRUE = "true";
- private static final boolean DEBUG = false;
-
- private final Context mContext;
- private final Handler mHandler;
- private final Resources mResources;
- private final UserManager mUserManager;
- private final IWindowManager mWindowManagerService;
- private final int mWindowShownTimeoutMs;
- private final Runnable mWindowShownTimeoutCallback = () -> {
- if (DEBUG) {
- Log.w(TAG, "Window was not hidden within " + getWindowShownTimeoutMs() + " ms, so it"
- + "was hidden by mWindowShownTimeoutCallback.");
- }
-
- handleHide();
- };
-
- @GuardedBy("this")
- private boolean mShowing;
- private int mPreviousUserId = UserHandle.USER_NULL;
-
- @Inject
- public UserSwitchTransitionViewController(
- Context context,
- @Main Handler handler,
- @Main Resources resources,
- UserManager userManager,
- IWindowManager windowManagerService,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
-
- super(R.id.user_switching_dialog_stub, overlayViewGlobalStateController);
-
- mContext = context;
- mHandler = handler;
- mResources = resources;
- mUserManager = userManager;
- mWindowManagerService = windowManagerService;
- mWindowShownTimeoutMs = mResources.getInteger(
- R.integer.config_userSwitchTransitionViewShownTimeoutMs);
- }
-
- @Override
- protected int getInsetTypesToFit() {
- return 0;
- }
-
- /**
- * Makes the user switch transition view appear and draws the content inside of it if a user
- * that is different from the previous user is provided and if the dialog is not already
- * showing.
- */
- void handleShow(@UserIdInt int newUserId) {
- if (mPreviousUserId == newUserId || mShowing) return;
- mShowing = true;
- mHandler.post(() -> {
- try {
- mWindowManagerService.setSwitchingUser(true);
- mWindowManagerService.lockNow(null);
- } catch (RemoteException e) {
- Log.e(TAG, "unable to notify window manager service regarding user switch");
- }
-
- start();
- populateDialog(mPreviousUserId, newUserId);
- // next time a new user is selected, this current new user will be the previous user.
- mPreviousUserId = newUserId;
- // In case the window is still showing after WINDOW_SHOWN_TIMEOUT_MS, then hide the
- // window and log a warning message.
- mHandler.postDelayed(mWindowShownTimeoutCallback, mWindowShownTimeoutMs);
- });
- }
-
- void handleHide() {
- if (!mShowing) return;
- mShowing = false;
- mHandler.post(this::stop);
- mHandler.removeCallbacks(mWindowShownTimeoutCallback);
- }
-
- @VisibleForTesting
- int getWindowShownTimeoutMs() {
- return mWindowShownTimeoutMs;
- }
-
- private void populateDialog(@UserIdInt int previousUserId, @UserIdInt int newUserId) {
- drawUserIcon(newUserId);
- populateLoadingText(previousUserId, newUserId);
- }
-
- private void drawUserIcon(int newUserId) {
- Bitmap bitmap = mUserManager.getUserIcon(newUserId);
- if (bitmap != null) {
- CircleFramedDrawable drawable = CircleFramedDrawable.getInstance(mContext, bitmap);
- ((ImageView) getLayout().findViewById(R.id.user_loading_avatar))
- .setImageDrawable(drawable);
- }
- }
-
- private void populateLoadingText(@UserIdInt int previousUserId, @UserIdInt int newUserId) {
- TextView msgView = getLayout().findViewById(R.id.user_loading);
-
- boolean showInfo = ENABLE_DEVELOPER_MESSAGE_TRUE.equals(
- Settings.Global.getString(mContext.getContentResolver(),
- ENABLE_USER_SWITCH_DEVELOPER_MESSAGE));
-
- if (showInfo && mPreviousUserId != UserHandle.USER_NULL) {
- msgView.setText(
- mResources.getString(R.string.car_loading_profile_developer_message,
- previousUserId, newUserId));
- } else {
- msgView.setText(mResources.getString(R.string.car_loading_profile));
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java
deleted file mode 100644
index 7db2823dc3b9..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediator.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import android.car.Car;
-import android.car.user.CarUserManager;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.window.OverlayViewMediator;
-
-import javax.inject.Inject;
-
-/**
- * Registers listeners that subscribe to events that show or hide CarUserSwitchingDialog that is
- * mounted to SystemUiOverlayWindow.
- */
-public class UserSwitchTransitionViewMediator implements OverlayViewMediator,
- CarUserManager.UserSwitchUiCallback {
- private static final String TAG = "UserSwitchTransitionViewMediator";
-
- private final CarServiceProvider mCarServiceProvider;
- private final CarDeviceProvisionedController mCarDeviceProvisionedController;
- private final UserSwitchTransitionViewController mUserSwitchTransitionViewController;
-
- @Inject
- public UserSwitchTransitionViewMediator(
- CarServiceProvider carServiceProvider,
- CarDeviceProvisionedController carDeviceProvisionedController,
- UserSwitchTransitionViewController userSwitchTransitionViewController) {
- mCarServiceProvider = carServiceProvider;
- mCarDeviceProvisionedController = carDeviceProvisionedController;
- mUserSwitchTransitionViewController = userSwitchTransitionViewController;
- }
-
- @Override
- public void registerListeners() {
- mCarServiceProvider.addListener(car -> {
- CarUserManager carUserManager =
- (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE);
-
- if (carUserManager != null) {
- carUserManager.setUserSwitchUiCallback(this);
- carUserManager.addListener(Runnable::run, this::handleUserLifecycleEvent);
- } else {
- Log.e(TAG, "registerListeners: CarUserManager could not be obtained.");
- }
- });
- }
-
- @Override
- public void setupOverlayContentViewControllers() {
- // no-op.
- }
-
- @Override
- public void showUserSwitchDialog(int userId) {
- mUserSwitchTransitionViewController.handleShow(userId);
- }
-
- @VisibleForTesting
- void handleUserLifecycleEvent(CarUserManager.UserLifecycleEvent event) {
- if (event.getEventType() == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_STARTING
- && mCarDeviceProvisionedController.getCurrentUser() == event.getUserId()) {
- mUserSwitchTransitionViewController.handleShow(event.getUserId());
- }
-
- if (event.getEventType() == CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING) {
- mUserSwitchTransitionViewController.handleHide();
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifier.java b/packages/CarSystemUI/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifier.java
deleted file mode 100644
index c054d204af98..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifier.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.voicerecognition;
-
-import android.bluetooth.BluetoothHeadsetClient;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Handler;
-import android.os.UserHandle;
-import android.util.Log;
-import android.widget.Toast;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.systemui.R;
-import com.android.systemui.SysUIToast;
-import com.android.systemui.SystemUI;
-import com.android.systemui.dagger.qualifiers.Main;
-
-import javax.inject.Inject;
-
-/**
- * Controller responsible for showing toast message when voice recognition over bluetooth device
- * getting activated.
- */
-public class ConnectedDeviceVoiceRecognitionNotifier extends SystemUI {
-
- private static final String TAG = "CarVoiceRecognition";
- @VisibleForTesting
- static final int INVALID_VALUE = -1;
- @VisibleForTesting
- static final int VOICE_RECOGNITION_STARTED = 1;
-
- private Handler mHandler;
-
- private final BroadcastReceiver mVoiceRecognitionReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Voice recognition received an intent!");
- }
- if (intent == null
- || intent.getAction() == null
- || !BluetoothHeadsetClient.ACTION_AG_EVENT.equals(intent.getAction())
- || !intent.hasExtra(BluetoothHeadsetClient.EXTRA_VOICE_RECOGNITION)) {
- return;
- }
-
- int voiceRecognitionState = intent.getIntExtra(
- BluetoothHeadsetClient.EXTRA_VOICE_RECOGNITION, INVALID_VALUE);
-
- if (voiceRecognitionState == VOICE_RECOGNITION_STARTED) {
- showToastMessage();
- }
- }
- };
-
- private void showToastMessage() {
- mHandler.post(() -> SysUIToast.makeText(mContext, R.string.voice_recognition_toast,
- Toast.LENGTH_LONG).show());
- }
-
- @Inject
- public ConnectedDeviceVoiceRecognitionNotifier(Context context, @Main Handler handler) {
- super(context);
- mHandler = handler;
- }
-
- @Override
- public void start() {
- }
-
- @Override
- protected void onBootCompleted() {
- IntentFilter filter = new IntentFilter();
- filter.addAction(BluetoothHeadsetClient.ACTION_AG_EVENT);
- mContext.registerReceiverAsUser(mVoiceRecognitionReceiver, UserHandle.ALL, filter,
- /* broadcastPermission= */ null, /* scheduler= */ null);
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogComponent.java b/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogComponent.java
deleted file mode 100644
index 4cdbfa3236c8..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogComponent.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.volume;
-
-import android.content.Context;
-
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.demomode.DemoModeController;
-import com.android.systemui.keyguard.KeyguardViewMediator;
-import com.android.systemui.plugins.VolumeDialog;
-import com.android.systemui.volume.VolumeDialogComponent;
-import com.android.systemui.volume.VolumeDialogControllerImpl;
-
-import javax.inject.Inject;
-
-/**
- * Allows for adding car specific dialog when the volume dialog is created.
- */
-@SysUISingleton
-public class CarVolumeDialogComponent extends VolumeDialogComponent {
-
- private CarVolumeDialogImpl mCarVolumeDialog;
-
- @Inject
- public CarVolumeDialogComponent(Context context, KeyguardViewMediator keyguardViewMediator,
- VolumeDialogControllerImpl volumeDialogController,
- DemoModeController demoModeController,
- CarServiceProvider carServiceProvider) {
- super(context, keyguardViewMediator, volumeDialogController, demoModeController);
- mCarVolumeDialog.setCarServiceProvider(carServiceProvider);
- }
-
- /** This method is called while calling the super constructor. */
- @Override
- protected VolumeDialog createDefault() {
- mCarVolumeDialog = new CarVolumeDialogImpl(mContext);
- return mCarVolumeDialog;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogImpl.java b/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogImpl.java
deleted file mode 100644
index 12818840af9a..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeDialogImpl.java
+++ /dev/null
@@ -1,658 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.volume;
-
-import android.animation.Animator;
-import android.animation.AnimatorInflater;
-import android.animation.AnimatorSet;
-import android.annotation.DrawableRes;
-import android.annotation.Nullable;
-import android.app.Dialog;
-import android.app.KeyguardManager;
-import android.car.Car;
-import android.car.media.CarAudioManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.res.TypedArray;
-import android.content.res.XmlResourceParser;
-import android.graphics.Color;
-import android.graphics.PixelFormat;
-import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.Drawable;
-import android.media.AudioManager;
-import android.os.Debug;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.UserHandle;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.util.SparseArray;
-import android.util.Xml;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.Window;
-import android.view.WindowManager;
-import android.widget.SeekBar;
-import android.widget.SeekBar.OnSeekBarChangeListener;
-
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.android.systemui.R;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.plugins.VolumeDialog;
-import com.android.systemui.volume.Events;
-import com.android.systemui.volume.SystemUIInterpolators;
-import com.android.systemui.volume.VolumeDialogImpl;
-
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Car version of the volume dialog.
- *
- * Methods ending in "H" must be called on the (ui) handler.
- */
-public class CarVolumeDialogImpl implements VolumeDialog {
-
- private static final String TAG = "CarVolumeDialog";
- private static final boolean DEBUG = false;
-
- private static final String XML_TAG_VOLUME_ITEMS = "carVolumeItems";
- private static final String XML_TAG_VOLUME_ITEM = "item";
- private static final int LISTVIEW_ANIMATION_DURATION_IN_MILLIS = 250;
- private static final int DISMISS_DELAY_IN_MILLIS = 50;
- private static final int ARROW_FADE_IN_START_DELAY_IN_MILLIS = 100;
-
- private final Context mContext;
- private final H mHandler = new H();
- // All the volume items.
- private final SparseArray<VolumeItem> mVolumeItems = new SparseArray<>();
- // Available volume items in car audio manager.
- private final List<VolumeItem> mAvailableVolumeItems = new ArrayList<>();
- // Volume items in the RecyclerView.
- private final List<CarVolumeItem> mCarVolumeLineItems = new ArrayList<>();
- private final KeyguardManager mKeyguard;
- private final int mNormalTimeout;
- private final int mHoveringTimeout;
- private final int mExpNormalTimeout;
- private final int mExpHoveringTimeout;
-
- private Window mWindow;
- private CustomDialog mDialog;
- private RecyclerView mListView;
- private CarVolumeItemAdapter mVolumeItemsAdapter;
- private CarAudioManager mCarAudioManager;
- private boolean mHovering;
- private int mCurrentlyDisplayingGroupId;
- private int mPreviouslyDisplayingGroupId;
- private boolean mShowing;
- private boolean mDismissing;
- private boolean mExpanded;
- private View mExpandIcon;
-
- private final CarAudioManager.CarVolumeCallback mVolumeChangeCallback =
- new CarAudioManager.CarVolumeCallback() {
- @Override
- public void onGroupVolumeChanged(int zoneId, int groupId, int flags) {
- // TODO: Include zoneId into consideration.
- // For instance
- // - single display + single-zone, ignore zoneId
- // - multi-display + single-zone, zoneId is fixed, may show volume bar on all
- // displays
- // - single-display + multi-zone, may show volume bar on primary display only
- // - multi-display + multi-zone, may show volume bar on display specified by
- // zoneId
- VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
- int value = getSeekbarValue(mCarAudioManager, groupId);
- // find if the group id for which the volume changed is currently being
- // displayed.
- boolean isShowing = mCarVolumeLineItems.stream().anyMatch(
- item -> item.getGroupId() == groupId);
- // Do not update the progress if it is the same as before. When car audio
- // manager sets
- // its group volume caused by the seekbar progress changed, it also triggers
- // this
- // callback. Updating the seekbar at the same time could block the continuous
- // seeking.
- if (value != volumeItem.mProgress && isShowing) {
- volumeItem.mCarVolumeItem.setProgress(value);
- volumeItem.mProgress = value;
- }
- if ((flags & AudioManager.FLAG_SHOW_UI) != 0) {
- mPreviouslyDisplayingGroupId = mCurrentlyDisplayingGroupId;
- mCurrentlyDisplayingGroupId = groupId;
- mHandler.obtainMessage(H.SHOW,
- Events.SHOW_REASON_VOLUME_CHANGED).sendToTarget();
- }
- }
-
- @Override
- public void onMasterMuteChanged(int zoneId, int flags) {
- // ignored
- }
- };
-
- private final CarServiceProvider.CarServiceOnConnectedListener mCarServiceOnConnectedListener =
- car -> {
- mExpanded = false;
- mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE);
- int volumeGroupCount = mCarAudioManager.getVolumeGroupCount();
- // Populates volume slider items from volume groups to UI.
- for (int groupId = 0; groupId < volumeGroupCount; groupId++) {
- VolumeItem volumeItem = getVolumeItemForUsages(
- mCarAudioManager.getUsagesForVolumeGroupId(groupId));
- mAvailableVolumeItems.add(volumeItem);
- // The first one is the default item.
- if (groupId == 0) {
- clearAllAndSetupDefaultCarVolumeLineItem(0);
- }
- }
-
- // If list is already initiated, update its content.
- if (mVolumeItemsAdapter != null) {
- mVolumeItemsAdapter.notifyDataSetChanged();
- }
- mCarAudioManager.registerCarVolumeCallback(mVolumeChangeCallback);
- };
-
- private final BroadcastReceiver mHomeButtonPressedBroadcastReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (!intent.getAction().equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) {
- return;
- }
-
- dismissH(Events.DISMISS_REASON_VOLUME_CONTROLLER);
- }
- };
-
- public CarVolumeDialogImpl(Context context) {
- mContext = context;
- mKeyguard = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
- mNormalTimeout = mContext.getResources().getInteger(
- R.integer.car_volume_dialog_display_normal_timeout);
- mHoveringTimeout = mContext.getResources().getInteger(
- R.integer.car_volume_dialog_display_hovering_timeout);
- mExpNormalTimeout = mContext.getResources().getInteger(
- R.integer.car_volume_dialog_display_expanded_normal_timeout);
- mExpHoveringTimeout = mContext.getResources().getInteger(
- R.integer.car_volume_dialog_display_expanded_hovering_timeout);
- }
-
- /** Sets a {@link CarServiceProvider} which connects to the audio service. */
- public void setCarServiceProvider(CarServiceProvider carServiceProvider) {
- carServiceProvider.addListener(mCarServiceOnConnectedListener);
- }
-
- private static int getSeekbarValue(CarAudioManager carAudioManager, int volumeGroupId) {
- return carAudioManager.getGroupVolume(volumeGroupId);
- }
-
- private static int getMaxSeekbarValue(CarAudioManager carAudioManager, int volumeGroupId) {
- return carAudioManager.getGroupMaxVolume(volumeGroupId);
- }
-
- /**
- * Build the volume window and connect to the CarService which registers with car audio
- * manager.
- */
- @Override
- public void init(int windowType, Callback callback) {
- initDialog();
-
- mContext.registerReceiverAsUser(mHomeButtonPressedBroadcastReceiver, UserHandle.CURRENT,
- new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), /* broadcastPermission= */
- null, /* scheduler= */ null);
- }
-
- @Override
- public void destroy() {
- mHandler.removeCallbacksAndMessages(/* token= */ null);
-
- mContext.unregisterReceiver(mHomeButtonPressedBroadcastReceiver);
-
- cleanupAudioManager();
- }
-
- /**
- * Reveals volume dialog.
- */
- public void show(int reason) {
- mHandler.obtainMessage(H.SHOW, reason).sendToTarget();
- }
-
- /**
- * Hides volume dialog.
- */
- public void dismiss(int reason) {
- mHandler.obtainMessage(H.DISMISS, reason).sendToTarget();
- }
-
- private void initDialog() {
- loadAudioUsageItems();
- mCarVolumeLineItems.clear();
- mDialog = new CustomDialog(mContext);
-
- mHovering = false;
- mShowing = false;
- mDismissing = false;
- mExpanded = false;
- mWindow = mDialog.getWindow();
- mWindow.requestFeature(Window.FEATURE_NO_TITLE);
- mWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
- mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND
- | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
- mWindow.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
- | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
- | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
- | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
- | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
- | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
- mWindow.setType(WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY);
- mWindow.setWindowAnimations(com.android.internal.R.style.Animation_Toast);
- final WindowManager.LayoutParams lp = mWindow.getAttributes();
- lp.format = PixelFormat.TRANSLUCENT;
- lp.setTitle(VolumeDialogImpl.class.getSimpleName());
- lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
- lp.windowAnimations = -1;
- mWindow.setAttributes(lp);
-
- mDialog.setContentView(R.layout.car_volume_dialog);
- mWindow.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-
- mDialog.setCanceledOnTouchOutside(true);
- mDialog.setOnShowListener(dialog -> {
- mListView.setTranslationY(-mListView.getHeight());
- mListView.setAlpha(0);
- mListView.animate()
- .alpha(1)
- .translationY(0)
- .setDuration(LISTVIEW_ANIMATION_DURATION_IN_MILLIS)
- .setInterpolator(new SystemUIInterpolators.LogDecelerateInterpolator())
- .start();
- });
- mListView = mWindow.findViewById(R.id.volume_list);
- mListView.setOnHoverListener((v, event) -> {
- int action = event.getActionMasked();
- mHovering = (action == MotionEvent.ACTION_HOVER_ENTER)
- || (action == MotionEvent.ACTION_HOVER_MOVE);
- rescheduleTimeoutH();
- return true;
- });
-
- mVolumeItemsAdapter = new CarVolumeItemAdapter(mContext, mCarVolumeLineItems);
- mListView.setAdapter(mVolumeItemsAdapter);
- mListView.setLayoutManager(new LinearLayoutManager(mContext));
- }
-
-
- private void showH(int reason) {
- if (DEBUG) {
- Log.d(TAG, "showH r=" + Events.DISMISS_REASONS[reason]);
- }
-
- mHandler.removeMessages(H.SHOW);
- mHandler.removeMessages(H.DISMISS);
-
- rescheduleTimeoutH();
-
- // Refresh the data set before showing.
- mVolumeItemsAdapter.notifyDataSetChanged();
-
- if (mShowing) {
- if (mPreviouslyDisplayingGroupId == mCurrentlyDisplayingGroupId || mExpanded) {
- return;
- }
-
- clearAllAndSetupDefaultCarVolumeLineItem(mCurrentlyDisplayingGroupId);
- return;
- }
-
- mShowing = true;
- clearAllAndSetupDefaultCarVolumeLineItem(mCurrentlyDisplayingGroupId);
- mDialog.show();
- Events.writeEvent(Events.EVENT_SHOW_DIALOG, reason, mKeyguard.isKeyguardLocked());
- }
-
- private void clearAllAndSetupDefaultCarVolumeLineItem(int groupId) {
- mCarVolumeLineItems.clear();
- VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
- volumeItem.mDefaultItem = true;
- addCarVolumeListItem(volumeItem, /* volumeGroupId = */ groupId,
- R.drawable.car_ic_keyboard_arrow_down, new ExpandIconListener());
- }
-
- protected void rescheduleTimeoutH() {
- mHandler.removeMessages(H.DISMISS);
- final int timeout = computeTimeoutH();
- mHandler.sendMessageDelayed(mHandler
- .obtainMessage(H.DISMISS, Events.DISMISS_REASON_TIMEOUT), timeout);
-
- if (DEBUG) {
- Log.d(TAG, "rescheduleTimeout " + timeout + " " + Debug.getCaller());
- }
- }
-
- private int computeTimeoutH() {
- if (mExpanded) {
- return mHovering ? mExpHoveringTimeout : mExpNormalTimeout;
- } else {
- return mHovering ? mHoveringTimeout : mNormalTimeout;
- }
- }
-
- private void dismissH(int reason) {
- if (DEBUG) {
- Log.d(TAG, "dismissH r=" + Events.DISMISS_REASONS[reason]);
- }
-
- mHandler.removeMessages(H.DISMISS);
- mHandler.removeMessages(H.SHOW);
- if (!mShowing || mDismissing) {
- return;
- }
-
- mDismissing = true;
- mListView.animate()
- .alpha(0)
- .translationY(-mListView.getHeight())
- .setDuration(LISTVIEW_ANIMATION_DURATION_IN_MILLIS)
- .setInterpolator(new SystemUIInterpolators.LogAccelerateInterpolator())
- .withEndAction(() -> mHandler.postDelayed(() -> {
- if (DEBUG) {
- Log.d(TAG, "mDialog.dismiss()");
- }
- mDialog.dismiss();
- mShowing = false;
- mDismissing = false;
- // if mExpandIcon is null that means user never clicked on the expanded arrow
- // which implies that the dialog is still not expanded. In that case we do
- // not want to reset the state
- if (mExpandIcon != null && mExpanded) {
- toggleDialogExpansion(/* isClicked = */ false);
- }
- }, DISMISS_DELAY_IN_MILLIS))
- .start();
-
- Events.writeEvent(Events.EVENT_DISMISS_DIALOG, reason);
- }
-
- private void loadAudioUsageItems() {
- try (XmlResourceParser parser = mContext.getResources().getXml(R.xml.car_volume_items)) {
- AttributeSet attrs = Xml.asAttributeSet(parser);
- int type;
- // Traverse to the first start tag
- while ((type = parser.next()) != XmlResourceParser.END_DOCUMENT
- && type != XmlResourceParser.START_TAG) {
- // Do Nothing (moving parser to start element)
- }
-
- if (!XML_TAG_VOLUME_ITEMS.equals(parser.getName())) {
- throw new RuntimeException("Meta-data does not start with carVolumeItems tag");
- }
- int outerDepth = parser.getDepth();
- int rank = 0;
- while ((type = parser.next()) != XmlResourceParser.END_DOCUMENT
- && (type != XmlResourceParser.END_TAG || parser.getDepth() > outerDepth)) {
- if (type == XmlResourceParser.END_TAG) {
- continue;
- }
- if (XML_TAG_VOLUME_ITEM.equals(parser.getName())) {
- TypedArray item = mContext.getResources().obtainAttributes(
- attrs, R.styleable.carVolumeItems_item);
- int usage = item.getInt(R.styleable.carVolumeItems_item_usage,
- /* defValue= */ -1);
- if (usage >= 0) {
- VolumeItem volumeItem = new VolumeItem();
- volumeItem.mRank = rank;
- volumeItem.mIcon = item.getResourceId(
- R.styleable.carVolumeItems_item_icon, /* defValue= */ 0);
- mVolumeItems.put(usage, volumeItem);
- rank++;
- }
- item.recycle();
- }
- }
- } catch (XmlPullParserException | IOException e) {
- Log.e(TAG, "Error parsing volume groups configuration", e);
- }
- }
-
- private VolumeItem getVolumeItemForUsages(int[] usages) {
- int rank = Integer.MAX_VALUE;
- VolumeItem result = null;
- for (int usage : usages) {
- VolumeItem volumeItem = mVolumeItems.get(usage);
- if (volumeItem.mRank < rank) {
- rank = volumeItem.mRank;
- result = volumeItem;
- }
- }
- return result;
- }
-
- private CarVolumeItem createCarVolumeListItem(VolumeItem volumeItem, int volumeGroupId,
- Drawable supplementalIcon, int seekbarProgressValue,
- @Nullable View.OnClickListener supplementalIconOnClickListener) {
- CarVolumeItem carVolumeItem = new CarVolumeItem();
- carVolumeItem.setMax(getMaxSeekbarValue(mCarAudioManager, volumeGroupId));
- carVolumeItem.setProgress(seekbarProgressValue);
- carVolumeItem.setOnSeekBarChangeListener(
- new CarVolumeDialogImpl.VolumeSeekBarChangeListener(volumeGroupId,
- mCarAudioManager));
- carVolumeItem.setGroupId(volumeGroupId);
-
- int color = mContext.getColor(R.color.car_volume_dialog_tint);
- Drawable primaryIcon = mContext.getDrawable(volumeItem.mIcon);
- primaryIcon.mutate().setTint(color);
- carVolumeItem.setPrimaryIcon(primaryIcon);
- if (supplementalIcon != null) {
- supplementalIcon.mutate().setTint(color);
- carVolumeItem.setSupplementalIcon(supplementalIcon,
- /* showSupplementalIconDivider= */ true);
- carVolumeItem.setSupplementalIconListener(supplementalIconOnClickListener);
- } else {
- carVolumeItem.setSupplementalIcon(/* drawable= */ null,
- /* showSupplementalIconDivider= */ false);
- }
-
- volumeItem.mCarVolumeItem = carVolumeItem;
- volumeItem.mProgress = seekbarProgressValue;
-
- return carVolumeItem;
- }
-
- private CarVolumeItem addCarVolumeListItem(VolumeItem volumeItem, int volumeGroupId,
- int supplementalIconId,
- @Nullable View.OnClickListener supplementalIconOnClickListener) {
- int seekbarProgressValue = getSeekbarValue(mCarAudioManager, volumeGroupId);
- Drawable supplementalIcon = supplementalIconId == 0 ? null : mContext.getDrawable(
- supplementalIconId);
- CarVolumeItem carVolumeItem = createCarVolumeListItem(volumeItem, volumeGroupId,
- supplementalIcon, seekbarProgressValue, supplementalIconOnClickListener);
- mCarVolumeLineItems.add(carVolumeItem);
- return carVolumeItem;
- }
-
- private void cleanupAudioManager() {
- mCarAudioManager.unregisterCarVolumeCallback(mVolumeChangeCallback);
- mCarVolumeLineItems.clear();
- mCarAudioManager = null;
- }
-
- /**
- * Wrapper class which contains information of each volume group.
- */
- private static class VolumeItem {
- private int mRank;
- private boolean mDefaultItem = false;
- @DrawableRes
- private int mIcon;
- private CarVolumeItem mCarVolumeItem;
- private int mProgress;
- }
-
- private final class H extends Handler {
-
- private static final int SHOW = 1;
- private static final int DISMISS = 2;
-
- private H() {
- super(Looper.getMainLooper());
- }
-
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case SHOW:
- showH(msg.arg1);
- break;
- case DISMISS:
- dismissH(msg.arg1);
- break;
- default:
- }
- }
- }
-
- private final class CustomDialog extends Dialog implements DialogInterface {
-
- private CustomDialog(Context context) {
- super(context, com.android.systemui.R.style.qs_theme);
- }
-
- @Override
- public boolean dispatchTouchEvent(MotionEvent ev) {
- rescheduleTimeoutH();
- return super.dispatchTouchEvent(ev);
- }
-
- @Override
- protected void onStart() {
- super.setCanceledOnTouchOutside(true);
- super.onStart();
- }
-
- @Override
- protected void onStop() {
- super.onStop();
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- if (isShowing()) {
- if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
- mHandler.obtainMessage(
- H.DISMISS, Events.DISMISS_REASON_TOUCH_OUTSIDE).sendToTarget();
- return true;
- }
- }
- return false;
- }
- }
-
- private final class ExpandIconListener implements View.OnClickListener {
- @Override
- public void onClick(final View v) {
- mExpandIcon = v;
- toggleDialogExpansion(true);
- rescheduleTimeoutH();
- }
- }
-
- private void toggleDialogExpansion(boolean isClicked) {
- mExpanded = !mExpanded;
- Animator inAnimator;
- if (mExpanded) {
- for (int groupId = 0; groupId < mAvailableVolumeItems.size(); ++groupId) {
- if (groupId != mCurrentlyDisplayingGroupId) {
- VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
- addCarVolumeListItem(volumeItem, groupId, /* supplementalIconId= */ 0,
- /* supplementalIconOnClickListener= */ null);
- }
- }
- inAnimator = AnimatorInflater.loadAnimator(
- mContext, R.anim.car_arrow_fade_in_rotate_up);
-
- } else {
- clearAllAndSetupDefaultCarVolumeLineItem(mCurrentlyDisplayingGroupId);
- inAnimator = AnimatorInflater.loadAnimator(
- mContext, R.anim.car_arrow_fade_in_rotate_down);
- }
-
- Animator outAnimator = AnimatorInflater.loadAnimator(
- mContext, R.anim.car_arrow_fade_out);
- inAnimator.setStartDelay(ARROW_FADE_IN_START_DELAY_IN_MILLIS);
- AnimatorSet animators = new AnimatorSet();
- animators.playTogether(outAnimator, inAnimator);
- if (!isClicked) {
- // Do not animate when the state is called to reset the dialogs view and not clicked
- // by user.
- animators.setDuration(0);
- }
- animators.setTarget(mExpandIcon);
- animators.start();
- mVolumeItemsAdapter.notifyDataSetChanged();
- }
-
- private final class VolumeSeekBarChangeListener implements OnSeekBarChangeListener {
-
- private final int mVolumeGroupId;
- private final CarAudioManager mCarAudioManager;
-
- private VolumeSeekBarChangeListener(int volumeGroupId, CarAudioManager carAudioManager) {
- mVolumeGroupId = volumeGroupId;
- mCarAudioManager = carAudioManager;
- }
-
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- if (!fromUser) {
- // For instance, if this event is originated from AudioService,
- // we can ignore it as it has already been handled and doesn't need to be
- // sent back down again.
- return;
- }
- if (mCarAudioManager == null) {
- Log.w(TAG, "Ignoring volume change event because the car isn't connected");
- return;
- }
- mAvailableVolumeItems.get(mVolumeGroupId).mProgress = progress;
- mAvailableVolumeItems.get(
- mVolumeGroupId).mCarVolumeItem.setProgress(progress);
- mCarAudioManager.setGroupVolume(mVolumeGroupId, progress, 0);
- }
-
- @Override
- public void onStartTrackingTouch(SeekBar seekBar) {
- }
-
- @Override
- public void onStopTrackingTouch(SeekBar seekBar) {
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItem.java b/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItem.java
deleted file mode 100644
index 1e7e5348b7fa..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItem.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.volume;
-
-import android.graphics.drawable.Drawable;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.SeekBar;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.android.systemui.R;
-
-/** Holds all related data to represent a volume group. */
-public class CarVolumeItem {
-
- private Drawable mPrimaryIcon;
- private Drawable mSupplementalIcon;
- private View.OnClickListener mSupplementalIconOnClickListener;
- private boolean mShowSupplementalIconDivider;
- private int mGroupId;
-
- private int mMax;
- private int mProgress;
- private SeekBar.OnSeekBarChangeListener mOnSeekBarChangeListener;
-
- /**
- * Called when {@link CarVolumeItem} is bound to its ViewHolder.
- */
- void bind(CarVolumeItemViewHolder viewHolder) {
- viewHolder.bind(/* carVolumeItem= */ this);
- }
-
- /** Sets progress of seekbar. */
- public void setProgress(int progress) {
- mProgress = progress;
- }
-
- /** Sets max value of seekbar. */
- public void setMax(int max) {
- mMax = max;
- }
-
- /** Sets {@link SeekBar.OnSeekBarChangeListener}. */
- public void setOnSeekBarChangeListener(SeekBar.OnSeekBarChangeListener listener) {
- mOnSeekBarChangeListener = listener;
- }
-
- /** Sets the primary icon. */
- public void setPrimaryIcon(Drawable drawable) {
- mPrimaryIcon = drawable;
- }
-
- /** Sets the supplemental icon and the visibility of the supplemental icon divider. */
- public void setSupplementalIcon(Drawable drawable, boolean showSupplementalIconDivider) {
- mSupplementalIcon = drawable;
- mShowSupplementalIconDivider = showSupplementalIconDivider;
- }
-
- /**
- * Gets the group id associated.
- */
- public int getGroupId() {
- return mGroupId;
- }
-
- /**
- * Sets the group id associated.
- */
- public void setGroupId(int groupId) {
- this.mGroupId = groupId;
- }
-
- /** Sets {@code OnClickListener} for the supplemental icon. */
- public void setSupplementalIconListener(View.OnClickListener listener) {
- mSupplementalIconOnClickListener = listener;
- }
-
- /** Defines the view holder which shows the information held by {@link CarVolumeItem}. */
- public static class CarVolumeItemViewHolder extends RecyclerView.ViewHolder {
-
- private SeekBar mSeekBar;
- private ImageView mPrimaryIcon;
- private View mSupplementalIconDivider;
- private ImageView mSupplementalIcon;
-
- public CarVolumeItemViewHolder(@NonNull View itemView) {
- super(itemView);
-
- mSeekBar = itemView.findViewById(R.id.seek_bar);
- mPrimaryIcon = itemView.findViewById(R.id.primary_icon);
- mSupplementalIcon = itemView.findViewById(R.id.supplemental_icon);
- mSupplementalIconDivider = itemView.findViewById(R.id.supplemental_icon_divider);
- }
-
- /**
- * Binds {@link CarVolumeItem} to the {@link CarVolumeItemViewHolder}.
- */
- void bind(CarVolumeItem carVolumeItem) {
- // Progress bar
- mSeekBar.setMax(carVolumeItem.mMax);
- mSeekBar.setProgress(carVolumeItem.mProgress);
- mSeekBar.setOnSeekBarChangeListener(carVolumeItem.mOnSeekBarChangeListener);
-
- // Primary icon
- mPrimaryIcon.setVisibility(View.VISIBLE);
- mPrimaryIcon.setImageDrawable(carVolumeItem.mPrimaryIcon);
-
- // Supplemental icon
- mSupplementalIcon.setVisibility(View.VISIBLE);
- mSupplementalIconDivider.setVisibility(
- carVolumeItem.mShowSupplementalIconDivider ? View.VISIBLE : View.INVISIBLE);
- mSupplementalIcon.setImageDrawable(carVolumeItem.mSupplementalIcon);
- mSupplementalIcon.setOnClickListener(
- carVolumeItem.mSupplementalIconOnClickListener);
- mSupplementalIcon.setClickable(
- carVolumeItem.mSupplementalIconOnClickListener != null);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItemAdapter.java b/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItemAdapter.java
deleted file mode 100644
index 7f336b5250a7..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/volume/CarVolumeItemAdapter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.volume;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.android.systemui.R;
-
-import java.util.List;
-
-/** The {@link RecyclerView.Adapter} to show the volume items in the sysUI volume dialog. */
-public class CarVolumeItemAdapter extends
- RecyclerView.Adapter<CarVolumeItem.CarVolumeItemViewHolder> {
-
- private final Context mContext;
- private final List<CarVolumeItem> mItems;
-
- public CarVolumeItemAdapter(Context context, List<CarVolumeItem> items) {
- mContext = context;
- mItems = items;
- }
-
- @Override
- public CarVolumeItem.CarVolumeItemViewHolder onCreateViewHolder(ViewGroup parent,
- int viewType) {
- LayoutInflater inflater = LayoutInflater.from(mContext);
- View view = inflater.inflate(R.layout.car_volume_item, parent, false);
- return new CarVolumeItem.CarVolumeItemViewHolder(view);
- }
-
- @Override
- public void onBindViewHolder(CarVolumeItem.CarVolumeItemViewHolder holder, int position) {
- mItems.get(position).bind(holder);
- }
-
- @Override
- public int getItemCount() {
- return mItems.size();
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/volume/VolumeUI.java b/packages/CarSystemUI/src/com/android/systemui/car/volume/VolumeUI.java
deleted file mode 100644
index b0321abfedd4..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/volume/VolumeUI.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.volume;
-
-import android.car.Car;
-import android.car.media.CarAudioManager;
-import android.content.Context;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.os.Handler;
-import android.util.Log;
-
-import com.android.systemui.R;
-import com.android.systemui.SystemUI;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.volume.VolumeDialogComponent;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-
-import javax.inject.Inject;
-
-import dagger.Lazy;
-
-/** The entry point for controlling the volume ui in cars. */
-@SysUISingleton
-public class VolumeUI extends SystemUI {
-
- private static final String TAG = "VolumeUI";
- private final Resources mResources;
- private final Handler mMainHandler;
- private final CarServiceProvider mCarServiceProvider;
- private final Lazy<VolumeDialogComponent> mVolumeDialogComponentLazy;
-
- private final CarAudioManager.CarVolumeCallback mVolumeChangeCallback =
- new CarAudioManager.CarVolumeCallback() {
- @Override
- public void onGroupVolumeChanged(int zoneId, int groupId, int flags) {
- initVolumeDialogComponent();
- }
-
- @Override
- public void onMasterMuteChanged(int zoneId, int flags) {
- initVolumeDialogComponent();
- }
-
- private void initVolumeDialogComponent() {
- if (mVolumeDialogComponent == null) {
- mMainHandler.post(() -> {
- mVolumeDialogComponent = mVolumeDialogComponentLazy.get();
- mVolumeDialogComponent.register();
- });
- mCarAudioManager.unregisterCarVolumeCallback(mVolumeChangeCallback);
- }
- }
- };
-
- private boolean mEnabled;
- private CarAudioManager mCarAudioManager;
- private VolumeDialogComponent mVolumeDialogComponent;
-
- @Inject
- public VolumeUI(
- Context context,
- @Main Resources resources,
- @Main Handler mainHandler,
- CarServiceProvider carServiceProvider,
- Lazy<VolumeDialogComponent> volumeDialogComponentLazy
- ) {
- super(context);
- mResources = resources;
- mMainHandler = mainHandler;
- mCarServiceProvider = carServiceProvider;
- mVolumeDialogComponentLazy = volumeDialogComponentLazy;
- }
-
- @Override
- public void start() {
- boolean enableVolumeUi = mResources.getBoolean(R.bool.enable_volume_ui);
- mEnabled = enableVolumeUi;
- if (!mEnabled) return;
-
- mCarServiceProvider.addListener(car -> {
- if (mCarAudioManager != null) {
- return;
- }
-
- mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE);
- Log.d(TAG, "Registering mVolumeChangeCallback.");
- // This volume call back is never unregistered because CarStatusBar is
- // never destroyed.
- mCarAudioManager.registerCarVolumeCallback(mVolumeChangeCallback);
- });
- }
-
- @Override
- protected void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- if (!mEnabled) return;
- if (mVolumeDialogComponent != null) {
- mVolumeDialogComponent.onConfigurationChanged(newConfig);
- }
- }
-
- @Override
- public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- pw.print("mEnabled="); pw.println(mEnabled);
- if (!mEnabled) return;
- if (mVolumeDialogComponent != null) {
- mVolumeDialogComponent.dump(fd, pw, args);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java
deleted file mode 100644
index 44cb5cf9cb54..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.ValueAnimator;
-import android.annotation.IntDef;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Rect;
-import android.util.Log;
-import android.view.GestureDetector;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewTreeObserver;
-
-import androidx.annotation.CallSuper;
-
-import com.android.systemui.R;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.wm.shell.animation.FlingAnimationUtils;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * The {@link OverlayPanelViewController} provides additional dragging animation capabilities to
- * {@link OverlayViewController}.
- */
-public abstract class OverlayPanelViewController extends OverlayViewController {
-
- /** @hide */
- @IntDef(flag = true, prefix = { "OVERLAY_" }, value = {
- OVERLAY_FROM_TOP_BAR,
- OVERLAY_FROM_BOTTOM_BAR
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface OverlayDirection {}
-
- /**
- * Indicates that the overlay panel should be opened from the top bar and expanded by dragging
- * towards the bottom bar.
- */
- public static final int OVERLAY_FROM_TOP_BAR = 0;
-
- /**
- * Indicates that the overlay panel should be opened from the bottom bar and expanded by
- * dragging towards the top bar.
- */
- public static final int OVERLAY_FROM_BOTTOM_BAR = 1;
-
- private static final boolean DEBUG = false;
- private static final String TAG = "OverlayPanelViewController";
-
- // used to calculate how fast to open or close the window
- protected static final float DEFAULT_FLING_VELOCITY = 0;
- // max time a fling animation takes
- protected static final float FLING_ANIMATION_MAX_TIME = 0.5f;
- // acceleration rate for the fling animation
- protected static final float FLING_SPEED_UP_FACTOR = 0.6f;
-
- protected static final int SWIPE_DOWN_MIN_DISTANCE = 25;
- protected static final int SWIPE_MAX_OFF_PATH = 75;
- protected static final int SWIPE_THRESHOLD_VELOCITY = 200;
- private static final int POSITIVE_DIRECTION = 1;
- private static final int NEGATIVE_DIRECTION = -1;
-
- private final FlingAnimationUtils mFlingAnimationUtils;
- private final CarDeviceProvisionedController mCarDeviceProvisionedController;
- private final View.OnTouchListener mDragOpenTouchListener;
- private final View.OnTouchListener mDragCloseTouchListener;
-
- protected int mAnimateDirection = POSITIVE_DIRECTION;
-
- private final int mSettleClosePercentage;
- private int mPercentageFromEndingEdge;
-
- private boolean mPanelVisible;
- private boolean mPanelExpanded;
-
- private float mOpeningVelocity = DEFAULT_FLING_VELOCITY;
- private float mClosingVelocity = DEFAULT_FLING_VELOCITY;
-
- private boolean mIsAnimating;
- private boolean mIsTracking;
-
- public OverlayPanelViewController(
- Context context,
- @Main Resources resources,
- int stubId,
- OverlayViewGlobalStateController overlayViewGlobalStateController,
- FlingAnimationUtils.Builder flingAnimationUtilsBuilder,
- CarDeviceProvisionedController carDeviceProvisionedController
- ) {
- super(stubId, overlayViewGlobalStateController);
-
- mFlingAnimationUtils = flingAnimationUtilsBuilder
- .setMaxLengthSeconds(FLING_ANIMATION_MAX_TIME)
- .setSpeedUpFactor(FLING_SPEED_UP_FACTOR)
- .build();
- mCarDeviceProvisionedController = carDeviceProvisionedController;
-
- mSettleClosePercentage = resources.getInteger(
- R.integer.notification_settle_close_percentage);
-
- // Attached to a navigation bar to open the overlay panel
- GestureDetector openGestureDetector = new GestureDetector(context,
- new OpenGestureListener() {
- @Override
- protected void open() {
- animateExpandPanel();
- }
- });
-
- // Attached to the other navigation bars to close the overlay panel
- GestureDetector closeGestureDetector = new GestureDetector(context,
- new SystemBarCloseGestureListener() {
- @Override
- protected void close() {
- if (isPanelExpanded()) {
- animateCollapsePanel();
- }
- }
- });
-
- mDragOpenTouchListener = (v, event) -> {
- if (!mCarDeviceProvisionedController.isCurrentUserFullySetup()) {
- return true;
- }
- if (!isInflated()) {
- getOverlayViewGlobalStateController().inflateView(this);
- }
-
- boolean consumed = openGestureDetector.onTouchEvent(event);
- if (consumed) {
- return true;
- }
- maybeCompleteAnimation(event);
- return true;
- };
-
- mDragCloseTouchListener = (v, event) -> {
- if (!isInflated()) {
- return true;
- }
- boolean consumed = closeGestureDetector.onTouchEvent(event);
- if (consumed) {
- return true;
- }
- maybeCompleteAnimation(event);
- return true;
- };
- }
-
- /** Sets the overlay panel animation direction along the x or y axis. */
- public void setOverlayDirection(@OverlayDirection int direction) {
- if (direction == OVERLAY_FROM_TOP_BAR) {
- mAnimateDirection = POSITIVE_DIRECTION;
- } else if (direction == OVERLAY_FROM_BOTTOM_BAR) {
- mAnimateDirection = NEGATIVE_DIRECTION;
- } else {
- throw new IllegalArgumentException("Direction not supported");
- }
- }
-
- /** Toggles the visibility of the panel. */
- public void toggle() {
- if (!isInflated()) {
- getOverlayViewGlobalStateController().inflateView(this);
- }
- if (isPanelExpanded()) {
- animateCollapsePanel();
- } else {
- animateExpandPanel();
- }
- }
-
- /** Checks if a {@link MotionEvent} is an action to open the panel.
- * @param e {@link MotionEvent} to check.
- * @return true only if opening action.
- */
- protected boolean isOpeningAction(MotionEvent e) {
- if (mAnimateDirection == POSITIVE_DIRECTION) {
- return e.getActionMasked() == MotionEvent.ACTION_DOWN;
- }
-
- if (mAnimateDirection == NEGATIVE_DIRECTION) {
- return e.getActionMasked() == MotionEvent.ACTION_UP;
- }
-
- return false;
- }
-
- /** Checks if a {@link MotionEvent} is an action to close the panel.
- * @param e {@link MotionEvent} to check.
- * @return true only if closing action.
- */
- protected boolean isClosingAction(MotionEvent e) {
- if (mAnimateDirection == POSITIVE_DIRECTION) {
- return e.getActionMasked() == MotionEvent.ACTION_UP;
- }
-
- if (mAnimateDirection == NEGATIVE_DIRECTION) {
- return e.getActionMasked() == MotionEvent.ACTION_DOWN;
- }
-
- return false;
- }
-
- /* ***************************************************************************************** *
- * Panel Animation
- * ***************************************************************************************** */
-
- /** Animates the closing of the panel. */
- protected void animateCollapsePanel() {
- if (!shouldAnimateCollapsePanel()) {
- return;
- }
-
- if (!isPanelExpanded() || !isPanelVisible()) {
- return;
- }
-
- onAnimateCollapsePanel();
- animatePanel(mClosingVelocity, /* isClosing= */ true);
- }
-
- /** Determines whether {@link #animateCollapsePanel()} should collapse the panel. */
- protected abstract boolean shouldAnimateCollapsePanel();
-
- /** Called when the panel is beginning to collapse. */
- protected abstract void onAnimateCollapsePanel();
-
- /** Animates the expansion of the panel. */
- protected void animateExpandPanel() {
- if (!shouldAnimateExpandPanel()) {
- return;
- }
-
- if (!mCarDeviceProvisionedController.isCurrentUserFullySetup()) {
- return;
- }
-
- onAnimateExpandPanel();
- setPanelVisible(true);
- animatePanel(mOpeningVelocity, /* isClosing= */ false);
-
- setPanelExpanded(true);
- }
-
- /** Determines whether {@link #animateExpandPanel()}} should expand the panel. */
- protected abstract boolean shouldAnimateExpandPanel();
-
- /** Called when the panel is beginning to expand. */
- protected abstract void onAnimateExpandPanel();
-
- /**
- * Depending on certain conditions, determines whether to fully expand or collapse the panel.
- */
- protected void maybeCompleteAnimation(MotionEvent event) {
- if (isClosingAction(event) && isPanelVisible()) {
- if (mSettleClosePercentage < mPercentageFromEndingEdge) {
- animatePanel(DEFAULT_FLING_VELOCITY, false);
- } else {
- animatePanel(DEFAULT_FLING_VELOCITY, true);
- }
- }
- }
-
- /**
- * Animates the panel from one position to other. This is used to either open or
- * close the panel completely with a velocity. If the animation is to close the
- * panel this method also makes the view invisible after animation ends.
- */
- protected void animatePanel(float velocity, boolean isClosing) {
- float to = getEndPosition(isClosing);
-
- Rect rect = getLayout().getClipBounds();
- if (rect != null) {
- float from = getCurrentStartPosition(rect);
- if (from != to) {
- animate(from, to, velocity, isClosing);
- }
-
- // If we swipe down the notification panel all the way to the bottom of the screen
- // (i.e. from == to), then we have finished animating the panel.
- return;
- }
-
- // We will only be here if the shade is being opened programmatically or via button when
- // height of the layout was not calculated.
- ViewTreeObserver panelTreeObserver = getLayout().getViewTreeObserver();
- panelTreeObserver.addOnGlobalLayoutListener(
- new ViewTreeObserver.OnGlobalLayoutListener() {
- @Override
- public void onGlobalLayout() {
- ViewTreeObserver obs = getLayout().getViewTreeObserver();
- obs.removeOnGlobalLayoutListener(this);
- animate(
- getDefaultStartPosition(),
- getEndPosition(/* isClosing= */ false),
- velocity,
- isClosing
- );
- }
- });
- }
-
- /* Returns the start position if the user has not started swiping. */
- private int getDefaultStartPosition() {
- return mAnimateDirection > 0 ? 0 : getLayout().getHeight();
- }
-
- /** Returns the start position if we are in the middle of swiping. */
- private int getCurrentStartPosition(Rect clipBounds) {
- return mAnimateDirection > 0 ? clipBounds.bottom : clipBounds.top;
- }
-
- private int getEndPosition(boolean isClosing) {
- return (mAnimateDirection > 0 && !isClosing) || (mAnimateDirection == -1 && isClosing)
- ? getLayout().getHeight()
- : 0;
- }
-
- private void animate(float from, float to, float velocity, boolean isClosing) {
- if (mIsAnimating) {
- return;
- }
- mIsAnimating = true;
- mIsTracking = true;
- ValueAnimator animator = ValueAnimator.ofFloat(from, to);
- animator.addUpdateListener(
- animation -> {
- float animatedValue = (Float) animation.getAnimatedValue();
- setViewClipBounds((int) animatedValue);
- });
- animator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- mIsAnimating = false;
- mIsTracking = false;
- mOpeningVelocity = DEFAULT_FLING_VELOCITY;
- mClosingVelocity = DEFAULT_FLING_VELOCITY;
- if (isClosing) {
- setPanelVisible(false);
- getLayout().setClipBounds(null);
- onCollapseAnimationEnd();
- setPanelExpanded(false);
- } else {
- onExpandAnimationEnd();
- setPanelExpanded(true);
- }
- }
- });
- getFlingAnimationUtils().apply(animator, from, to, Math.abs(velocity));
- animator.start();
- }
-
- /**
- * Called in {@link Animator.AnimatorListener#onAnimationEnd(Animator)} when the panel is
- * closing.
- */
- protected abstract void onCollapseAnimationEnd();
-
- /**
- * Called in {@link Animator.AnimatorListener#onAnimationEnd(Animator)} when the panel is
- * opening.
- */
- protected abstract void onExpandAnimationEnd();
-
- /* ***************************************************************************************** *
- * Panel Visibility
- * ***************************************************************************************** */
-
- /** Set the panel view to be visible. */
- protected final void setPanelVisible(boolean visible) {
- mPanelVisible = visible;
- onPanelVisible(visible);
- }
-
- /** Returns {@code true} if panel is visible. */
- public final boolean isPanelVisible() {
- return mPanelVisible;
- }
-
- /** Business logic run when panel visibility is set. */
- @CallSuper
- protected void onPanelVisible(boolean visible) {
- if (DEBUG) {
- Log.e(TAG, "onPanelVisible: " + visible);
- }
-
- if (visible && !getOverlayViewGlobalStateController().isWindowVisible()) {
- getOverlayViewGlobalStateController().showView(/* panelViewController= */ this);
- }
- if (!visible && getOverlayViewGlobalStateController().isWindowVisible()) {
- getOverlayViewGlobalStateController().hideView(/* panelViewController= */ this);
- }
- getLayout().setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
- }
-
- /* ***************************************************************************************** *
- * Panel Expansion
- * ***************************************************************************************** */
-
- /**
- * Set the panel state to expanded. This will expand or collapse the overlay window if
- * necessary.
- */
- protected final void setPanelExpanded(boolean expand) {
- mPanelExpanded = expand;
- onPanelExpanded(expand);
- }
-
- /** Returns {@code true} if panel is expanded. */
- public final boolean isPanelExpanded() {
- return mPanelExpanded;
- }
-
- @CallSuper
- protected void onPanelExpanded(boolean expand) {
- if (DEBUG) {
- Log.e(TAG, "onPanelExpanded: " + expand);
- }
- }
-
- /* ***************************************************************************************** *
- * Misc
- * ***************************************************************************************** */
-
- /**
- * Given the position of the pointer dragging the panel, return the percentage of its closeness
- * to the ending edge.
- */
- protected void calculatePercentageFromEndingEdge(float y) {
- if (getLayout().getHeight() > 0) {
- float height = getVisiblePanelHeight(y);
- mPercentageFromEndingEdge = (int) Math.abs(height / getLayout().getHeight() * 100);
- }
- }
-
- private float getVisiblePanelHeight(float y) {
- return mAnimateDirection > 0 ? y : getLayout().getHeight() - y;
- }
-
- /** Sets the boundaries of the overlay panel that can be seen based on pointer position. */
- protected void setViewClipBounds(int y) {
- // Bound the pointer position to be within the overlay panel.
- y = Math.max(0, Math.min(y, getLayout().getHeight()));
- Rect clipBounds = new Rect();
- int top, bottom;
- if (mAnimateDirection > 0) {
- top = 0;
- bottom = y;
- } else {
- top = y;
- bottom = getLayout().getHeight();
- }
- clipBounds.set(0, top, getLayout().getWidth(), bottom);
- getLayout().setClipBounds(clipBounds);
- onScroll(y);
- }
-
- /**
- * Called while scrolling, this passes the position of the clip boundary that is currently
- * changing.
- */
- protected abstract void onScroll(int y);
-
- /* ***************************************************************************************** *
- * Getters
- * ***************************************************************************************** */
-
- /** Returns the open touch listener. */
- public final View.OnTouchListener getDragOpenTouchListener() {
- return mDragOpenTouchListener;
- }
-
- /** Returns the close touch listener. */
- public final View.OnTouchListener getDragCloseTouchListener() {
- return mDragCloseTouchListener;
- }
-
- /** Gets the fling animation utils used for animating this panel. */
- protected final FlingAnimationUtils getFlingAnimationUtils() {
- return mFlingAnimationUtils;
- }
-
- /** Returns {@code true} if the panel is currently tracking. */
- protected final boolean isTracking() {
- return mIsTracking;
- }
-
- /** Sets whether the panel is currently tracking or not. */
- protected final void setIsTracking(boolean isTracking) {
- mIsTracking = isTracking;
- }
-
- /** Returns {@code true} if the panel is currently animating. */
- protected final boolean isAnimating() {
- return mIsAnimating;
- }
-
- /** Returns the percentage of the panel that is open from the bottom. */
- protected final int getPercentageFromEndingEdge() {
- return mPercentageFromEndingEdge;
- }
-
- /** Returns the percentage at which we've determined whether to open or close the panel. */
- protected final int getSettleClosePercentage() {
- return mSettleClosePercentage;
- }
-
- /* ***************************************************************************************** *
- * Gesture Listeners
- * ***************************************************************************************** */
-
- /** Called when the user is beginning to scroll down the panel. */
- protected abstract void onOpenScrollStart();
-
- /**
- * Only responsible for open hooks. Since once the panel opens it covers all elements
- * there is no need to merge with close.
- */
- protected abstract class OpenGestureListener extends
- GestureDetector.SimpleOnGestureListener {
-
- @Override
- public boolean onScroll(MotionEvent event1, MotionEvent event2, float distanceX,
- float distanceY) {
-
- if (!isPanelVisible()) {
- onOpenScrollStart();
- }
- setPanelVisible(true);
-
- // clips the view for the panel when the user scrolls to open.
- setViewClipBounds((int) event2.getRawY());
-
- // Initially the scroll starts with height being zero. This checks protects from divide
- // by zero error.
- calculatePercentageFromEndingEdge(event2.getRawY());
-
- mIsTracking = true;
- return true;
- }
-
-
- @Override
- public boolean onFling(MotionEvent event1, MotionEvent event2,
- float velocityX, float velocityY) {
- if (mAnimateDirection * velocityY > SWIPE_THRESHOLD_VELOCITY) {
- mOpeningVelocity = velocityY;
- open();
- return true;
- }
- animatePanel(DEFAULT_FLING_VELOCITY, true);
-
- return false;
- }
-
- protected abstract void open();
- }
-
- /** Determines whether the scroll event should allow closing of the panel. */
- protected abstract boolean shouldAllowClosingScroll();
-
- protected abstract class CloseGestureListener extends
- GestureDetector.SimpleOnGestureListener {
-
- @Override
- public boolean onSingleTapUp(MotionEvent motionEvent) {
- if (isPanelExpanded()) {
- animatePanel(DEFAULT_FLING_VELOCITY, true);
- }
- return true;
- }
-
- @Override
- public boolean onScroll(MotionEvent event1, MotionEvent event2, float distanceX,
- float distanceY) {
- if (!shouldAllowClosingScroll()) {
- return false;
- }
- float y = getYPositionOfPanelEndingEdge(event1, event2);
- if (getLayout().getHeight() > 0) {
- mPercentageFromEndingEdge = (int) Math.abs(
- y / getLayout().getHeight() * 100);
- boolean isInClosingDirection = mAnimateDirection * distanceY > 0;
-
- // This check is to figure out if onScroll was called while swiping the card at
- // bottom of the panel. At that time we should not allow panel to
- // close. We are also checking for the upwards swipe gesture here because it is
- // possible if a user is closing the panel and while swiping starts
- // to open again but does not fling. At that time we should allow the
- // panel to close fully or else it would stuck in between.
- if (Math.abs(getLayout().getHeight() - y)
- > SWIPE_DOWN_MIN_DISTANCE && isInClosingDirection) {
- setViewClipBounds((int) y);
- mIsTracking = true;
- } else if (!isInClosingDirection) {
- setViewClipBounds((int) y);
- }
- }
- // if we return true the items in RV won't be scrollable.
- return false;
- }
-
- /**
- * To prevent the jump in the clip bounds while closing the panel we should calculate the y
- * position using the diff of event1 and event2. This will help the panel clip smoothly as
- * the event2 value changes while event1 value will be fixed.
- * @param event1 MotionEvent that contains the position of where the event2 started.
- * @param event2 MotionEvent that contains the position of where the user has scrolled to
- * on the screen.
- */
- private float getYPositionOfPanelEndingEdge(MotionEvent event1, MotionEvent event2) {
- float diff = mAnimateDirection * (event1.getRawY() - event2.getRawY());
- float y = mAnimateDirection > 0 ? getLayout().getHeight() - diff : diff;
- y = Math.max(0, Math.min(y, getLayout().getHeight()));
- return y;
- }
-
- @Override
- public boolean onFling(MotionEvent event1, MotionEvent event2,
- float velocityX, float velocityY) {
- // should not fling if the touch does not start when view is at the end of the list.
- if (!shouldAllowClosingScroll()) {
- return false;
- }
- if (Math.abs(event1.getX() - event2.getX()) > SWIPE_MAX_OFF_PATH
- || Math.abs(velocityY) < SWIPE_THRESHOLD_VELOCITY) {
- // swipe was not vertical or was not fast enough
- return false;
- }
- boolean isInClosingDirection = mAnimateDirection * velocityY < 0;
- if (isInClosingDirection) {
- close();
- return true;
- } else {
- // we should close the shade
- animatePanel(velocityY, false);
- }
- return false;
- }
-
- protected abstract void close();
- }
-
- protected abstract class SystemBarCloseGestureListener extends CloseGestureListener {
- @Override
- public boolean onSingleTapUp(MotionEvent e) {
- mClosingVelocity = DEFAULT_FLING_VELOCITY;
- if (isPanelExpanded()) {
- close();
- }
- return super.onSingleTapUp(e);
- }
-
- @Override
- public boolean onScroll(MotionEvent event1, MotionEvent event2, float distanceX,
- float distanceY) {
- calculatePercentageFromEndingEdge(event2.getRawY());
- setViewClipBounds((int) event2.getRawY());
- return true;
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java
deleted file mode 100644
index b989c421c780..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewController.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import static android.view.WindowInsets.Type.statusBars;
-
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewStub;
-import android.view.WindowInsets;
-
-/**
- * Owns a {@link View} that is present in SystemUIOverlayWindow.
- */
-public class OverlayViewController {
- protected static final int INVALID_INSET_SIDE = -1;
- protected static final int NO_INSET_SIDE = 0;
-
- private final int mStubId;
- private final OverlayViewGlobalStateController mOverlayViewGlobalStateController;
-
- private View mLayout;
-
- public OverlayViewController(int stubId,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
- mLayout = null;
- mStubId = stubId;
- mOverlayViewGlobalStateController = overlayViewGlobalStateController;
- }
-
- /**
- * Shows content of {@link OverlayViewController}.
- *
- * Should be used to show view externally and in particular by {@link OverlayViewMediator}.
- */
- public final void start() {
- mOverlayViewGlobalStateController.showView(/* viewController= */ this, this::show);
- }
-
- /**
- * Hides content of {@link OverlayViewController}.
- *
- * Should be used to hide view externally and in particular by {@link OverlayViewMediator}.
- */
- public final void stop() {
- mOverlayViewGlobalStateController.hideView(/* viewController= */ this, this::hide);
- }
-
- /**
- * Inflate layout owned by controller.
- */
- public final void inflate(ViewGroup baseLayout) {
- ViewStub viewStub = baseLayout.findViewById(mStubId);
- mLayout = viewStub.inflate();
- onFinishInflate();
- }
-
- /**
- * Called once inflate finishes.
- */
- protected void onFinishInflate() {
- // no-op
- }
-
- /**
- * Returns {@code true} if layout owned by controller has been inflated.
- */
- public final boolean isInflated() {
- return mLayout != null;
- }
-
- private void show() {
- if (mLayout == null) {
- // layout must be inflated before show() is called.
- return;
- }
- showInternal();
- }
-
- /**
- * Subclasses should override this method to implement reveal animations and implement logic
- * specific to when the layout owned by the controller is shown.
- *
- * Should only be overridden by Superclass but not called by any {@link OverlayViewMediator}.
- */
- protected void showInternal() {
- mLayout.setVisibility(View.VISIBLE);
- }
-
- private void hide() {
- if (mLayout == null) {
- // layout must be inflated before hide() is called.
- return;
- }
- hideInternal();
- }
-
- /**
- * Subclasses should override this method to implement conceal animations and implement logic
- * specific to when the layout owned by the controller is hidden.
- *
- * Should only be overridden by Superclass but not called by any {@link OverlayViewMediator}.
- */
- protected void hideInternal() {
- mLayout.setVisibility(View.GONE);
- }
-
- /**
- * Provides access to layout owned by controller.
- */
- protected final View getLayout() {
- return mLayout;
- }
-
- /** Returns the {@link OverlayViewGlobalStateController}. */
- protected final OverlayViewGlobalStateController getOverlayViewGlobalStateController() {
- return mOverlayViewGlobalStateController;
- }
-
- /**
- * Returns {@code true} if heads up notifications should be displayed over this view.
- */
- protected boolean shouldShowHUN() {
- return true;
- }
-
- /**
- * Returns {@code true} if navigation bar insets should be displayed over this view. Has no
- * effect if {@link #shouldFocusWindow} returns {@code false}.
- */
- protected boolean shouldShowNavigationBarInsets() {
- return false;
- }
-
- /**
- * Returns {@code true} if status bar insets should be displayed over this view. Has no
- * effect if {@link #shouldFocusWindow} returns {@code false}.
- */
- protected boolean shouldShowStatusBarInsets() {
- return false;
- }
-
- /**
- * Returns {@code true} if this view should be hidden during the occluded state.
- */
- protected boolean shouldShowWhenOccluded() {
- return false;
- }
-
- /**
- * Returns {@code true} if the window should be focued when this view is visible. Note that
- * returning {@code false} here means that {@link #shouldShowStatusBarInsets} and
- * {@link #shouldShowNavigationBarInsets} will have no effect.
- */
- protected boolean shouldFocusWindow() {
- return true;
- }
-
- /**
- * Returns {@code true} if the window should use stable insets. Using stable insets means that
- * even when system bars are temporarily not visible, inset from the system bars will still be
- * applied.
- *
- * NOTE: When system bars are hidden in transient mode, insets from them will not be applied
- * even when the system bars become visible. Setting the return value to {@true} here can
- * prevent the OverlayView from overlapping with the system bars when that happens.
- */
- protected boolean shouldUseStableInsets() {
- return false;
- }
-
- /**
- * Returns the insets types to fit to the sysui overlay window when this
- * {@link OverlayViewController} is in the foreground.
- */
- @WindowInsets.Type.InsetsType
- protected int getInsetTypesToFit() {
- return statusBars();
- }
-
- /**
- * Optionally returns the sides of enabled system bar insets to fit to the sysui overlay window
- * when this {@link OverlayViewController} is in the foreground.
- *
- * For example, if the bottom and left system bars are enabled and this method returns
- * WindowInsets.Side.LEFT, then the inset from the bottom system bar will be ignored.
- *
- * NOTE: By default, this method returns {@link #INVALID_INSET_SIDE}, so insets to fit are
- * defined by {@link #getInsetTypesToFit()}, and not by this method, unless it is overridden
- * by subclasses.
- *
- * NOTE: {@link #NO_INSET_SIDE} signifies no insets from any system bars will be honored. Each
- * {@link OverlayViewController} can first take this value and add sides of the system bar
- * insets to honor to it.
- *
- * NOTE: If getInsetSidesToFit is overridden to return {@link WindowInsets.Side}, it always
- * takes precedence over {@link #getInsetTypesToFit()}. That is, the return value of {@link
- * #getInsetTypesToFit()} will be ignored.
- */
- @WindowInsets.Side.InsetsSide
- protected int getInsetSidesToFit() {
- return INVALID_INSET_SIDE;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java
deleted file mode 100644
index 10f436b5e717..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewGlobalStateController.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import static android.view.WindowInsets.Type.navigationBars;
-import static android.view.WindowInsets.Type.statusBars;
-
-import android.annotation.Nullable;
-import android.util.Log;
-import android.view.WindowInsets;
-import android.view.WindowInsets.Side.InsetsSide;
-import android.view.WindowInsets.Type.InsetsType;
-import android.view.WindowInsetsController;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.systemui.dagger.SysUISingleton;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import javax.inject.Inject;
-
-/**
- * This controller is responsible for the following:
- * <p><ul>
- * <li>Holds the global state for SystemUIOverlayWindow.
- * <li>Allows {@link SystemUIOverlayWindowManager} to register {@link OverlayViewMediator}(s).
- * <li>Enables {@link OverlayViewController)(s) to reveal/conceal themselves while respecting the
- * global state of SystemUIOverlayWindow.
- * </ul>
- */
-@SysUISingleton
-public class OverlayViewGlobalStateController {
- private static final boolean DEBUG = false;
- private static final String TAG = OverlayViewGlobalStateController.class.getSimpleName();
- private static final int UNKNOWN_Z_ORDER = -1;
- private final SystemUIOverlayWindowController mSystemUIOverlayWindowController;
- private final WindowInsetsController mWindowInsetsController;
- @VisibleForTesting
- Map<OverlayViewController, Integer> mZOrderMap;
- @VisibleForTesting
- SortedMap<Integer, OverlayViewController> mZOrderVisibleSortedMap;
- @VisibleForTesting
- Set<OverlayViewController> mViewsHiddenForOcclusion;
- @VisibleForTesting
- OverlayViewController mHighestZOrder;
- private boolean mIsOccluded;
-
- @Inject
- public OverlayViewGlobalStateController(
- SystemUIOverlayWindowController systemUIOverlayWindowController) {
- mSystemUIOverlayWindowController = systemUIOverlayWindowController;
- mSystemUIOverlayWindowController.attach();
- mWindowInsetsController =
- mSystemUIOverlayWindowController.getBaseLayout().getWindowInsetsController();
- mZOrderMap = new HashMap<>();
- mZOrderVisibleSortedMap = new TreeMap<>();
- mViewsHiddenForOcclusion = new HashSet<>();
- }
-
- /**
- * Register {@link OverlayViewMediator} to use in SystemUIOverlayWindow.
- */
- public void registerMediator(OverlayViewMediator overlayViewMediator) {
- Log.d(TAG, "Registering content mediator: " + overlayViewMediator.getClass().getName());
-
- overlayViewMediator.registerListeners();
- overlayViewMediator.setupOverlayContentViewControllers();
- }
-
- /**
- * Show content in Overlay Window using {@link OverlayPanelViewController}.
- *
- * This calls {@link OverlayViewGlobalStateController#showView(OverlayViewController, Runnable)}
- * where the runnable is nullified since the actual showing of the panel is handled by the
- * controller itself.
- */
- public void showView(OverlayPanelViewController panelViewController) {
- showView(panelViewController, /* show= */ null);
- }
-
- /**
- * Show content in Overlay Window using {@link OverlayViewController}.
- */
- public void showView(OverlayViewController viewController, @Nullable Runnable show) {
- debugLog();
- if (mIsOccluded && !viewController.shouldShowWhenOccluded()) {
- mViewsHiddenForOcclusion.add(viewController);
- return;
- }
- if (mZOrderVisibleSortedMap.isEmpty()) {
- setWindowVisible(true);
- }
-
- if (!(viewController instanceof OverlayPanelViewController)) {
- inflateView(viewController);
- }
-
- if (show != null) {
- show.run();
- }
-
- updateInternalsWhenShowingView(viewController);
- refreshUseStableInsets();
- refreshInsetsToFit();
- refreshWindowFocus();
- refreshNavigationBarVisibility();
- refreshStatusBarVisibility();
-
- Log.d(TAG, "Content shown: " + viewController.getClass().getName());
- debugLog();
- }
-
- private void updateInternalsWhenShowingView(OverlayViewController viewController) {
- int zOrder;
- if (mZOrderMap.containsKey(viewController)) {
- zOrder = mZOrderMap.get(viewController);
- } else {
- zOrder = mSystemUIOverlayWindowController.getBaseLayout().indexOfChild(
- viewController.getLayout());
- mZOrderMap.put(viewController, zOrder);
- }
-
- mZOrderVisibleSortedMap.put(zOrder, viewController);
-
- refreshHighestZOrderWhenShowingView(viewController);
- }
-
- private void refreshHighestZOrderWhenShowingView(OverlayViewController viewController) {
- if (mZOrderMap.getOrDefault(mHighestZOrder, UNKNOWN_Z_ORDER) < mZOrderMap.get(
- viewController)) {
- mHighestZOrder = viewController;
- }
- }
-
- /**
- * Hide content in Overlay Window using {@link OverlayPanelViewController}.
- *
- * This calls {@link OverlayViewGlobalStateController#hideView(OverlayViewController, Runnable)}
- * where the runnable is nullified since the actual hiding of the panel is handled by the
- * controller itself.
- */
- public void hideView(OverlayPanelViewController panelViewController) {
- hideView(panelViewController, /* hide= */ null);
- }
-
- /**
- * Hide content in Overlay Window using {@link OverlayViewController}.
- */
- public void hideView(OverlayViewController viewController, @Nullable Runnable hide) {
- debugLog();
- if (mIsOccluded && mViewsHiddenForOcclusion.contains(viewController)) {
- mViewsHiddenForOcclusion.remove(viewController);
- return;
- }
- if (!viewController.isInflated()) {
- Log.d(TAG, "Content cannot be hidden since it isn't inflated: "
- + viewController.getClass().getName());
- return;
- }
- if (!mZOrderMap.containsKey(viewController)) {
- Log.d(TAG, "Content cannot be hidden since it has never been shown: "
- + viewController.getClass().getName());
- return;
- }
- if (!mZOrderVisibleSortedMap.containsKey(mZOrderMap.get(viewController))) {
- Log.d(TAG, "Content cannot be hidden since it isn't currently shown: "
- + viewController.getClass().getName());
- return;
- }
-
- if (hide != null) {
- hide.run();
- }
-
- mZOrderVisibleSortedMap.remove(mZOrderMap.get(viewController));
- refreshHighestZOrderWhenHidingView(viewController);
- refreshUseStableInsets();
- refreshInsetsToFit();
- refreshWindowFocus();
- refreshNavigationBarVisibility();
- refreshStatusBarVisibility();
-
- if (mZOrderVisibleSortedMap.isEmpty()) {
- setWindowVisible(false);
- }
-
- Log.d(TAG, "Content hidden: " + viewController.getClass().getName());
- debugLog();
- }
-
- private void refreshHighestZOrderWhenHidingView(OverlayViewController viewController) {
- if (mZOrderVisibleSortedMap.isEmpty()) {
- mHighestZOrder = null;
- return;
- }
- if (!mHighestZOrder.equals(viewController)) {
- return;
- }
-
- mHighestZOrder = mZOrderVisibleSortedMap.get(mZOrderVisibleSortedMap.lastKey());
- }
-
- private void refreshNavigationBarVisibility() {
- if (mZOrderVisibleSortedMap.isEmpty()) {
- mWindowInsetsController.show(navigationBars());
- return;
- }
-
- // Do not hide navigation bar insets if the window is not focusable.
- if (mHighestZOrder.shouldFocusWindow() && !mHighestZOrder.shouldShowNavigationBarInsets()) {
- mWindowInsetsController.hide(navigationBars());
- } else {
- mWindowInsetsController.show(navigationBars());
- }
- }
-
- private void refreshStatusBarVisibility() {
- if (mZOrderVisibleSortedMap.isEmpty()) {
- mWindowInsetsController.show(statusBars());
- return;
- }
-
- // Do not hide status bar insets if the window is not focusable.
- if (mHighestZOrder.shouldFocusWindow() && !mHighestZOrder.shouldShowStatusBarInsets()) {
- mWindowInsetsController.hide(statusBars());
- } else {
- mWindowInsetsController.show(statusBars());
- }
- }
-
- private void refreshWindowFocus() {
- setWindowFocusable(mHighestZOrder == null ? false : mHighestZOrder.shouldFocusWindow());
- }
-
- private void refreshUseStableInsets() {
- mSystemUIOverlayWindowController.setUsingStableInsets(
- mHighestZOrder == null ? false : mHighestZOrder.shouldUseStableInsets());
- }
-
- /**
- * Refreshes the insets to fit (or honor) either by {@link InsetsType} or {@link InsetsSide}.
- *
- * By default, the insets to fit are defined by the {@link InsetsType}. But if an
- * {@link OverlayViewController} overrides {@link OverlayViewController#getInsetSidesToFit()} to
- * return an {@link InsetsSide}, then that takes precedence over {@link InsetsType}.
- */
- private void refreshInsetsToFit() {
- if (mZOrderVisibleSortedMap.isEmpty()) {
- setFitInsetsTypes(statusBars());
- } else {
- if (mHighestZOrder.getInsetSidesToFit() != OverlayViewController.INVALID_INSET_SIDE) {
- // First fit all system bar insets as setFitInsetsSide defines which sides of system
- // bar insets to actually honor.
- setFitInsetsTypes(WindowInsets.Type.systemBars());
- setFitInsetsSides(mHighestZOrder.getInsetSidesToFit());
- } else {
- setFitInsetsTypes(mHighestZOrder.getInsetTypesToFit());
- }
- }
- }
-
- /** Returns {@code true} is the window is visible. */
- public boolean isWindowVisible() {
- return mSystemUIOverlayWindowController.isWindowVisible();
- }
-
- private void setWindowVisible(boolean visible) {
- mSystemUIOverlayWindowController.setWindowVisible(visible);
- }
-
- /** Sets the insets to fit based on the {@link InsetsType} */
- private void setFitInsetsTypes(@InsetsType int types) {
- mSystemUIOverlayWindowController.setFitInsetsTypes(types);
- }
-
- /** Sets the insets to fit based on the {@link InsetsSide} */
- private void setFitInsetsSides(@InsetsSide int sides) {
- mSystemUIOverlayWindowController.setFitInsetsSides(sides);
- }
-
- /**
- * Sets the {@link android.view.WindowManager.LayoutParams#FLAG_ALT_FOCUSABLE_IM} flag of the
- * sysui overlay window.
- */
- public void setWindowNeedsInput(boolean needsInput) {
- mSystemUIOverlayWindowController.setWindowNeedsInput(needsInput);
- }
-
- /** Returns {@code true} if the window is focusable. */
- public boolean isWindowFocusable() {
- return mSystemUIOverlayWindowController.isWindowFocusable();
- }
-
- /** Sets the focusable flag of the sysui overlawy window. */
- public void setWindowFocusable(boolean focusable) {
- mSystemUIOverlayWindowController.setWindowFocusable(focusable);
- }
-
- /** Inflates the view controlled by the given view controller. */
- public void inflateView(OverlayViewController viewController) {
- if (!viewController.isInflated()) {
- viewController.inflate(mSystemUIOverlayWindowController.getBaseLayout());
- }
- }
-
- /**
- * Return {@code true} if OverlayWindow is in a state where HUNs should be displayed above it.
- */
- public boolean shouldShowHUN() {
- return mZOrderVisibleSortedMap.isEmpty() || mHighestZOrder.shouldShowHUN();
- }
-
- /**
- * Set the OverlayViewWindow to be in occluded or unoccluded state. When OverlayViewWindow is
- * occluded, all views mounted to it that are not configured to be shown during occlusion will
- * be hidden.
- */
- public void setOccluded(boolean occluded) {
- if (occluded) {
- // Hide views before setting mIsOccluded to true so the regular hideView logic is used,
- // not the one used during occlusion.
- hideViewsForOcclusion();
- mIsOccluded = true;
- } else {
- mIsOccluded = false;
- // show views after setting mIsOccluded to false so the regular showView logic is used,
- // not the one used during occlusion.
- showViewsHiddenForOcclusion();
- }
- }
-
- private void hideViewsForOcclusion() {
- HashSet<OverlayViewController> viewsCurrentlyShowing = new HashSet<>(
- mZOrderVisibleSortedMap.values());
- viewsCurrentlyShowing.forEach(overlayController -> {
- if (!overlayController.shouldShowWhenOccluded()) {
- hideView(overlayController, overlayController::hideInternal);
- mViewsHiddenForOcclusion.add(overlayController);
- }
- });
- }
-
- private void showViewsHiddenForOcclusion() {
- mViewsHiddenForOcclusion.forEach(overlayViewController -> {
- showView(overlayViewController, overlayViewController::showInternal);
- });
- mViewsHiddenForOcclusion.clear();
- }
-
- private void debugLog() {
- if (!DEBUG) {
- return;
- }
-
- Log.d(TAG, "mHighestZOrder: " + mHighestZOrder);
- Log.d(TAG, "mZOrderVisibleSortedMap.size(): " + mZOrderVisibleSortedMap.size());
- Log.d(TAG, "mZOrderVisibleSortedMap: " + mZOrderVisibleSortedMap);
- Log.d(TAG, "mZOrderMap.size(): " + mZOrderMap.size());
- Log.d(TAG, "mZOrderMap: " + mZOrderMap);
- Log.d(TAG, "mIsOccluded: " + mIsOccluded);
- Log.d(TAG, "mViewsHiddenForOcclusion: " + mViewsHiddenForOcclusion);
- Log.d(TAG, "mViewsHiddenForOcclusion.size(): " + mViewsHiddenForOcclusion.size());
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewMediator.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewMediator.java
deleted file mode 100644
index 3e7b4a2665ee..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayViewMediator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-/**
- * Controls when to show and hide {@link OverlayViewController}(s).
- */
-public interface OverlayViewMediator {
-
- /**
- * Register listeners that could use ContentVisibilityAdjuster to show/hide content.
- *
- * Note that we do not unregister listeners because SystemUI components are expected to live
- * for the lifecycle of the device.
- */
- void registerListeners();
-
- /**
- * Allows for post-inflation callbacks and listeners to be set inside required {@link
- * OverlayViewController}(s).
- */
- void setupOverlayContentViewControllers();
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayWindowModule.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayWindowModule.java
deleted file mode 100644
index fcbb0b807e74..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayWindowModule.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import com.android.systemui.car.keyguard.CarKeyguardViewMediator;
-import com.android.systemui.car.notification.BottomNotificationPanelViewMediator;
-import com.android.systemui.car.notification.NotificationPanelViewMediator;
-import com.android.systemui.car.notification.TopNotificationPanelViewMediator;
-import com.android.systemui.car.rvc.RearViewCameraViewMediator;
-import com.android.systemui.car.userswitcher.FullscreenUserSwitcherViewMediator;
-import com.android.systemui.car.userswitcher.UserSwitchTransitionViewMediator;
-
-import dagger.Binds;
-import dagger.Module;
-import dagger.multibindings.ClassKey;
-import dagger.multibindings.IntoMap;
-
-/**
- * Dagger injection module for {@link SystemUIOverlayWindowManager}
- */
-@Module
-public abstract class OverlayWindowModule {
-
- /** Injects NotificationPanelViewMediator. */
- @Binds
- @IntoMap
- @ClassKey(NotificationPanelViewMediator.class)
- public abstract OverlayViewMediator bindNotificationPanelViewMediator(
- NotificationPanelViewMediator notificationPanelViewMediator);
-
- /** Injects TopNotificationPanelViewMediator. */
- @Binds
- @IntoMap
- @ClassKey(TopNotificationPanelViewMediator.class)
- public abstract OverlayViewMediator bindTopNotificationPanelViewMediator(
- TopNotificationPanelViewMediator topNotificationPanelViewMediator);
-
- /** Injects BottomNotificationPanelViewMediator. */
- @Binds
- @IntoMap
- @ClassKey(BottomNotificationPanelViewMediator.class)
- public abstract OverlayViewMediator bindBottomNotificationPanelViewMediator(
- BottomNotificationPanelViewMediator bottomNotificationPanelViewMediator);
-
- /** Inject into CarKeyguardViewMediator. */
- @Binds
- @IntoMap
- @ClassKey(CarKeyguardViewMediator.class)
- public abstract OverlayViewMediator bindCarKeyguardViewMediator(
- CarKeyguardViewMediator carKeyguardViewMediator);
-
- /** Injects FullscreenUserSwitcherViewsMediator. */
- @Binds
- @IntoMap
- @ClassKey(FullscreenUserSwitcherViewMediator.class)
- public abstract OverlayViewMediator bindFullscreenUserSwitcherViewsMediator(
- FullscreenUserSwitcherViewMediator overlayViewsMediator);
-
- /** Injects CarUserSwitchingDialogMediator. */
- @Binds
- @IntoMap
- @ClassKey(UserSwitchTransitionViewMediator.class)
- public abstract OverlayViewMediator bindUserSwitchTransitionViewMediator(
- UserSwitchTransitionViewMediator userSwitchTransitionViewMediator);
-
- /** Injects RearViewCameraViewMediator. */
- @Binds
- @IntoMap
- @ClassKey(RearViewCameraViewMediator.class)
- public abstract OverlayViewMediator bindRearViewCameraViewMediator(
- RearViewCameraViewMediator overlayViewsMediator);
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java
deleted file mode 100644
index 0e73f2520a66..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowController.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
-import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
-
-import android.content.Context;
-import android.graphics.PixelFormat;
-import android.os.Binder;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowInsets;
-import android.view.WindowManager;
-
-import com.android.systemui.R;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-
-import javax.inject.Inject;
-
-/**
- * Controls the expansion state of the primary window which will contain all of the fullscreen sysui
- * behavior. This window still has a collapsed state in order to watch for swipe events to expand
- * this window for the notification panel.
- */
-@SysUISingleton
-public class SystemUIOverlayWindowController implements
- ConfigurationController.ConfigurationListener {
-
- private final Context mContext;
- private final WindowManager mWindowManager;
-
- private ViewGroup mBaseLayout;
- private WindowManager.LayoutParams mLp;
- private WindowManager.LayoutParams mLpChanged;
- private boolean mIsAttached = false;
- private boolean mVisible = false;
- private boolean mFocusable = false;
- private boolean mUsingStableInsets = false;
-
- @Inject
- public SystemUIOverlayWindowController(
- Context context,
- WindowManager windowManager,
- ConfigurationController configurationController
- ) {
- mContext = context;
- mWindowManager = windowManager;
-
- mLpChanged = new WindowManager.LayoutParams();
- mBaseLayout = (ViewGroup) LayoutInflater.from(context)
- .inflate(R.layout.sysui_overlay_window, /* root= */ null, false);
-
- configurationController.addCallback(this);
- }
-
- /** Returns the base view of the primary window. */
- public ViewGroup getBaseLayout() {
- return mBaseLayout;
- }
-
- /** Returns {@code true} if the window is already attached. */
- public boolean isAttached() {
- return mIsAttached;
- }
-
- /** Attaches the window to the window manager. */
- public void attach() {
- if (mIsAttached) {
- return;
- }
- mIsAttached = true;
- // Now that the status bar window encompasses the sliding panel and its
- // translucent backdrop, the entire thing is made TRANSLUCENT and is
- // hardware-accelerated.
- mLp = new WindowManager.LayoutParams(
- ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT,
- WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE,
- WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
- | WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
- | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
- | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
- | WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS,
- PixelFormat.TRANSLUCENT);
- mLp.token = new Binder();
- mLp.gravity = Gravity.TOP;
- mLp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
- mLp.setTitle("SystemUIOverlayWindow");
- mLp.packageName = mContext.getPackageName();
- mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
- mLp.insetsFlags.behavior = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
-
- mWindowManager.addView(mBaseLayout, mLp);
- mLpChanged.copyFrom(mLp);
- setWindowVisible(false);
- }
-
- /** Sets the types of insets to fit. Note: This should be rarely used. */
- public void setFitInsetsTypes(@WindowInsets.Type.InsetsType int types) {
- mLpChanged.setFitInsetsTypes(types);
- mLpChanged.setFitInsetsIgnoringVisibility(mUsingStableInsets);
- updateWindow();
- }
-
- /** Sets the sides of system bar insets to fit. Note: This should be rarely used. */
- public void setFitInsetsSides(@WindowInsets.Side.InsetsSide int sides) {
- mLpChanged.setFitInsetsSides(sides);
- mLpChanged.setFitInsetsIgnoringVisibility(mUsingStableInsets);
- updateWindow();
- }
-
- /** Sets the window to the visible state. */
- public void setWindowVisible(boolean visible) {
- mVisible = visible;
- if (visible) {
- mBaseLayout.setVisibility(View.VISIBLE);
- } else {
- mBaseLayout.setVisibility(View.INVISIBLE);
- }
- updateWindow();
- }
-
- /** Sets the window to be focusable. */
- public void setWindowFocusable(boolean focusable) {
- mFocusable = focusable;
- if (focusable) {
- mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
- } else {
- mLpChanged.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
- }
- updateWindow();
- }
-
- /** Sets the window to enable IME. */
- public void setWindowNeedsInput(boolean needsInput) {
- if (needsInput) {
- mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
- } else {
- mLpChanged.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
- }
- updateWindow();
- }
-
- /** Returns {@code true} if the window is visible */
- public boolean isWindowVisible() {
- return mVisible;
- }
-
- public boolean isWindowFocusable() {
- return mFocusable;
- }
-
- protected void setUsingStableInsets(boolean useStableInsets) {
- mUsingStableInsets = useStableInsets;
- }
-
- private void updateWindow() {
- if (mLp != null && mLp.copyFrom(mLpChanged) != 0) {
- if (isAttached()) {
- mLp.insetsFlags.behavior = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
- mWindowManager.updateViewLayout(mBaseLayout, mLp);
- }
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowManager.java b/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowManager.java
deleted file mode 100644
index 6395ebff5a41..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/car/window/SystemUIOverlayWindowManager.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import android.content.Context;
-import android.util.Log;
-
-import com.android.systemui.R;
-import com.android.systemui.SystemUI;
-import com.android.systemui.dagger.SysUISingleton;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Map;
-
-import javax.inject.Inject;
-import javax.inject.Provider;
-
-/**
- * Registers {@link OverlayViewMediator}(s) and synchronizes their calls to hide/show {@link
- * OverlayViewController}(s) to allow for the correct visibility of system bars.
- */
-@SysUISingleton
-public class SystemUIOverlayWindowManager extends SystemUI {
- private static final String TAG = "SystemUIOverlayWM";
- private final Map<Class<?>, Provider<OverlayViewMediator>>
- mContentMediatorCreators;
- private final OverlayViewGlobalStateController mOverlayViewGlobalStateController;
-
- @Inject
- public SystemUIOverlayWindowManager(
- Context context,
- Map<Class<?>, Provider<OverlayViewMediator>> contentMediatorCreators,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
- super(context);
- mContentMediatorCreators = contentMediatorCreators;
- mOverlayViewGlobalStateController = overlayViewGlobalStateController;
- }
-
- @Override
- public void start() {
- String[] names = mContext.getResources().getStringArray(
- R.array.config_carSystemUIOverlayViewsMediators);
- startServices(names);
- }
-
- private void startServices(String[] services) {
- for (String clsName : services) {
- long ti = System.currentTimeMillis();
- try {
- OverlayViewMediator obj = resolveContentMediator(clsName);
- if (obj == null) {
- Constructor constructor = Class.forName(clsName).getConstructor(Context.class);
- obj = (OverlayViewMediator) constructor.newInstance(this);
- }
- mOverlayViewGlobalStateController.registerMediator(obj);
- } catch (ClassNotFoundException
- | NoSuchMethodException
- | IllegalAccessException
- | InstantiationException
- | InvocationTargetException ex) {
- throw new RuntimeException(ex);
- }
-
- // Warn if initialization of component takes too long
- ti = System.currentTimeMillis() - ti;
- if (ti > 200) {
- Log.w(TAG, "Initialization of " + clsName + " took " + ti + " ms");
- }
- }
- }
-
- private OverlayViewMediator resolveContentMediator(String className) {
- return resolve(className, mContentMediatorCreators);
- }
-
- private <T> T resolve(String className, Map<Class<?>, Provider<T>> creators) {
- try {
- Class<?> clazz = Class.forName(className);
- Provider<T> provider = creators.get(clazz);
- return provider == null ? null : provider.get();
- } catch (ClassNotFoundException e) {
- return null;
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/wm/BarControlPolicy.java b/packages/CarSystemUI/src/com/android/systemui/wm/BarControlPolicy.java
deleted file mode 100644
index 0452b83b125f..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/wm/BarControlPolicy.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (C) 2020 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.wm;
-
-import android.car.settings.CarSettings;
-import android.content.Context;
-import android.database.ContentObserver;
-import android.os.Handler;
-import android.os.UserHandle;
-import android.provider.Settings;
-import android.util.ArraySet;
-import android.util.Slog;
-import android.view.WindowInsets;
-
-import androidx.annotation.VisibleForTesting;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/**
- * Util class to load PolicyControl and allow for querying if a package matches immersive filters.
- * Similar to {@link com.android.server.wm.PolicyControl}, but separate due to CarSystemUI needing
- * to set its own policies for system bar visibilities.
- *
- * This forces immersive mode behavior for one or both system bars (based on a package
- * list).
- *
- * Control by setting {@link Settings.Global#POLICY_CONTROL_AUTO} to one or more name-value pairs.
- * e.g.
- * to force immersive mode everywhere:
- * "immersive.full=*"
- * to force hide status bars for com.package1 but not com.package2:
- * "immersive.status=com.package1,-com.package2"
- *
- * Separate multiple name-value pairs with ':'
- * e.g. "immersive.status=com.package:immersive.navigation=*"
- */
-public class BarControlPolicy {
-
- private static final String TAG = "BarControlPolicy";
- private static final boolean DEBUG = false;
-
- private static final String NAME_IMMERSIVE_FULL = "immersive.full";
- private static final String NAME_IMMERSIVE_STATUS = "immersive.status";
- private static final String NAME_IMMERSIVE_NAVIGATION = "immersive.navigation";
-
- @VisibleForTesting
- static String sSettingValue;
- @VisibleForTesting
- static Filter sImmersiveStatusFilter;
- private static Filter sImmersiveNavigationFilter;
-
- /** Loads values from the POLICY_CONTROL setting to set filters. */
- static boolean reloadFromSetting(Context context) {
- if (DEBUG) Slog.d(TAG, "reloadFromSetting()");
- String value = null;
- try {
- value = Settings.Global.getStringForUser(context.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- UserHandle.USER_CURRENT);
- if (sSettingValue == value || sSettingValue != null && sSettingValue.equals(value)) {
- return false;
- }
- setFilters(value);
- sSettingValue = value;
- } catch (Throwable t) {
- Slog.w(TAG, "Error loading policy control, value=" + value, t);
- return false;
- }
- return true;
- }
-
- /** Used in testing to reset BarControlPolicy. */
- @VisibleForTesting
- static void reset() {
- sSettingValue = null;
- sImmersiveStatusFilter = null;
- sImmersiveNavigationFilter = null;
- }
-
- /**
- * Registers a content observer to listen to updates to the SYSTEM_BAR_VISIBILITY_OVERRIDE flag.
- */
- static void registerContentObserver(Context context, Handler handler, FilterListener listener) {
- context.getContentResolver().registerContentObserver(
- Settings.Global.getUriFor(CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE), false,
- new ContentObserver(handler) {
- @Override
- public void onChange(boolean selfChange) {
- if (reloadFromSetting(context)) {
- listener.onFilterUpdated();
- }
- }
- }, UserHandle.USER_ALL);
- }
-
- /**
- * Returns bar visibilities based on POLICY_CONTROL_AUTO filters and window policies.
- * @return int[], where the first value is the inset types that should be shown, and the second
- * is the inset types that should be hidden.
- */
- @WindowInsets.Type.InsetsType
- static int[] getBarVisibilities(String packageName) {
- int hideTypes = 0;
- int showTypes = 0;
- if (matchesStatusFilter(packageName)) {
- hideTypes |= WindowInsets.Type.statusBars();
- } else {
- showTypes |= WindowInsets.Type.statusBars();
- }
- if (matchesNavigationFilter(packageName)) {
- hideTypes |= WindowInsets.Type.navigationBars();
- } else {
- showTypes |= WindowInsets.Type.navigationBars();
- }
-
- return new int[] {showTypes, hideTypes};
- }
-
- private static boolean matchesStatusFilter(String packageName) {
- return sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(packageName);
- }
-
- private static boolean matchesNavigationFilter(String packageName) {
- return sImmersiveNavigationFilter != null
- && sImmersiveNavigationFilter.matches(packageName);
- }
-
- private static void setFilters(String value) {
- if (DEBUG) Slog.d(TAG, "setFilters: " + value);
- sImmersiveStatusFilter = null;
- sImmersiveNavigationFilter = null;
- if (value != null) {
- String[] nvps = value.split(":");
- for (String nvp : nvps) {
- int i = nvp.indexOf('=');
- if (i == -1) continue;
- String n = nvp.substring(0, i);
- String v = nvp.substring(i + 1);
- if (n.equals(NAME_IMMERSIVE_FULL)) {
- Filter f = Filter.parse(v);
- sImmersiveStatusFilter = sImmersiveNavigationFilter = f;
- } else if (n.equals(NAME_IMMERSIVE_STATUS)) {
- Filter f = Filter.parse(v);
- sImmersiveStatusFilter = f;
- } else if (n.equals(NAME_IMMERSIVE_NAVIGATION)) {
- Filter f = Filter.parse(v);
- sImmersiveNavigationFilter = f;
- }
- }
- }
- if (DEBUG) {
- Slog.d(TAG, "immersiveStatusFilter: " + sImmersiveStatusFilter);
- Slog.d(TAG, "immersiveNavigationFilter: " + sImmersiveNavigationFilter);
- }
- }
-
- private static class Filter {
- private static final String ALL = "*";
-
- private final ArraySet<String> mToInclude;
- private final ArraySet<String> mToExclude;
-
- private Filter(ArraySet<String> toInclude, ArraySet<String> toExclude) {
- mToInclude = toInclude;
- mToExclude = toExclude;
- }
-
- boolean matches(String packageName) {
- if (packageName == null) return false;
- if (toExclude(packageName)) return false;
- return toInclude(packageName);
- }
-
- private boolean toExclude(String packageName) {
- return mToExclude.contains(packageName) || mToExclude.contains(ALL);
- }
-
- private boolean toInclude(String packageName) {
- return mToInclude.contains(ALL) || mToInclude.contains(packageName);
- }
-
- void dump(PrintWriter pw) {
- pw.print("Filter[");
- dump("toInclude", mToInclude, pw); pw.print(',');
- dump("toExclude", mToExclude, pw); pw.print(']');
- }
-
- private void dump(String name, ArraySet<String> set, PrintWriter pw) {
- pw.print(name); pw.print("=(");
- int n = set.size();
- for (int i = 0; i < n; i++) {
- if (i > 0) pw.print(',');
- pw.print(set.valueAt(i));
- }
- pw.print(')');
- }
-
- @Override
- public String toString() {
- StringWriter sw = new StringWriter();
- dump(new PrintWriter(sw, true));
- return sw.toString();
- }
-
- // value = comma-delimited list of tokens, where token = (package name|*)
- // e.g. "com.package1", or "com.android.systemui, com.android.keyguard" or "*"
- static Filter parse(String value) {
- if (value == null) return null;
- ArraySet<String> toInclude = new ArraySet<String>();
- ArraySet<String> toExclude = new ArraySet<String>();
- for (String token : value.split(",")) {
- token = token.trim();
- if (token.startsWith("-") && token.length() > 1) {
- token = token.substring(1);
- toExclude.add(token);
- } else {
- toInclude.add(token);
- }
- }
- return new Filter(toInclude, toExclude);
- }
- }
-
- /**
- * Interface to listen for updates to the filter triggered by the content observer listening to
- * the SYSTEM_BAR_VISIBILITY_OVERRIDE flag.
- */
- interface FilterListener {
-
- /** Callback triggered when the content observer updates the filter. */
- void onFilterUpdated();
- }
-
- private BarControlPolicy() {}
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsController.java b/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsController.java
deleted file mode 100644
index f2ca4956be07..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsController.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (C) 2020 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.wm;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.RemoteException;
-import android.util.ArraySet;
-import android.util.Slog;
-import android.util.SparseArray;
-import android.view.IDisplayWindowInsetsController;
-import android.view.IWindowManager;
-import android.view.InsetsController;
-import android.view.InsetsSourceControl;
-import android.view.InsetsState;
-import android.view.WindowInsets;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.wm.shell.common.DisplayController;
-import com.android.wm.shell.common.DisplayImeController;
-import com.android.wm.shell.common.TransactionPool;
-
-import java.util.Objects;
-
-/**
- * Controller that maps between displays and {@link IDisplayWindowInsetsController} in order to
- * give system bar control to SystemUI.
- * {@link R.bool#config_remoteInsetsControllerControlsSystemBars} determines whether this controller
- * takes control or not.
- */
-public class DisplaySystemBarsController extends DisplayImeController {
-
- private static final String TAG = "DisplaySystemBarsController";
-
- private final Context mContext;
- private final DisplayController mDisplayController;
- private final Handler mHandler;
- private SparseArray<PerDisplay> mPerDisplaySparseArray;
-
- public DisplaySystemBarsController(
- Context context,
- IWindowManager wmService,
- DisplayController displayController,
- @Main Handler mainHandler,
- TransactionPool transactionPool) {
- super(wmService, displayController, (r) -> mainHandler.post(r), transactionPool);
- mContext = context;
- mDisplayController = displayController;
- mHandler = mainHandler;
- }
-
- @Override
- public void onDisplayAdded(int displayId) {
- PerDisplay pd = new PerDisplay(displayId);
- try {
- mWmService.setDisplayWindowInsetsController(displayId, pd);
- } catch (RemoteException e) {
- Slog.w(TAG, "Unable to set insets controller on display " + displayId);
- }
- // Lazy loading policy control filters instead of during boot.
- if (mPerDisplaySparseArray == null) {
- mPerDisplaySparseArray = new SparseArray<>();
- BarControlPolicy.reloadFromSetting(mContext);
- BarControlPolicy.registerContentObserver(mContext, mHandler, () -> {
- int size = mPerDisplaySparseArray.size();
- for (int i = 0; i < size; i++) {
- mPerDisplaySparseArray.valueAt(i).modifyDisplayWindowInsets();
- }
- });
- }
- mPerDisplaySparseArray.put(displayId, pd);
- }
-
- @Override
- public void onDisplayRemoved(int displayId) {
- try {
- mWmService.setDisplayWindowInsetsController(displayId, null);
- } catch (RemoteException e) {
- Slog.w(TAG, "Unable to remove insets controller on display " + displayId);
- }
- mPerDisplaySparseArray.remove(displayId);
- }
-
- @VisibleForTesting
- class PerDisplay extends DisplayImeController.PerDisplay {
-
- int mDisplayId;
- InsetsController mInsetsController;
- InsetsState mInsetsState = new InsetsState();
- String mPackageName;
-
- PerDisplay(int displayId) {
- super(displayId, mDisplayController.getDisplayLayout(displayId).rotation());
- mDisplayId = displayId;
- mInsetsController = new InsetsController(
- new DisplaySystemBarsInsetsControllerHost(mHandler, this));
- }
-
- @Override
- public void insetsChanged(InsetsState insetsState) {
- super.insetsChanged(insetsState);
- if (mInsetsState.equals(insetsState)) {
- return;
- }
- mInsetsState.set(insetsState, true /* copySources */);
- mInsetsController.onStateChanged(insetsState);
- if (mPackageName != null) {
- modifyDisplayWindowInsets();
- }
- }
-
- @Override
- public void insetsControlChanged(InsetsState insetsState,
- InsetsSourceControl[] activeControls) {
- super.insetsControlChanged(insetsState, activeControls);
- mInsetsController.onControlsChanged(activeControls);
- }
-
- @Override
- public void hideInsets(@WindowInsets.Type.InsetsType int types, boolean fromIme) {
- if ((types & WindowInsets.Type.ime()) == 0) {
- mInsetsController.hide(types);
- } else {
- super.hideInsets(types, fromIme);
- }
-
- }
-
- @Override
- public void showInsets(@WindowInsets.Type.InsetsType int types, boolean fromIme) {
- if ((types & WindowInsets.Type.ime()) == 0) {
- mInsetsController.show(types);
- } else {
- super.showInsets(types, fromIme);
- }
-
- }
-
- @Override
- public void topFocusedWindowChanged(String packageName) {
- if (Objects.equals(mPackageName, packageName)) {
- return;
- }
- mPackageName = packageName;
- modifyDisplayWindowInsets();
- }
-
- private void modifyDisplayWindowInsets() {
- if (mPackageName == null) {
- return;
- }
- int[] barVisibilities = BarControlPolicy.getBarVisibilities(mPackageName);
- updateInsetsState(barVisibilities[0], /* visible= */ true);
- updateInsetsState(barVisibilities[1], /* visible= */ false);
- showInsets(barVisibilities[0], /* fromIme= */ false);
- hideInsets(barVisibilities[1], /* fromIme= */ false);
- try {
- mWmService.modifyDisplayWindowInsets(mDisplayId, mInsetsState);
- } catch (RemoteException e) {
- Slog.w(TAG, "Unable to update window manager service.");
- }
- }
-
- private void updateInsetsState(@WindowInsets.Type.InsetsType int types, boolean visible) {
- ArraySet<Integer> internalTypes = InsetsState.toInternalType(types);
- for (int i = internalTypes.size() - 1; i >= 0; i--) {
- mInsetsState.getSource(internalTypes.valueAt(i)).setVisible(visible);
- }
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsInsetsControllerHost.java b/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsInsetsControllerHost.java
deleted file mode 100644
index 2f8da44ba851..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/wm/DisplaySystemBarsInsetsControllerHost.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (C) 2020 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.wm;
-
-import android.annotation.NonNull;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.IDisplayWindowInsetsController;
-import android.view.InsetsController;
-import android.view.InsetsState;
-import android.view.SurfaceControl;
-import android.view.SyncRtSurfaceTransactionApplier;
-import android.view.WindowInsets;
-import android.view.WindowInsetsAnimation;
-import android.view.WindowInsetsController;
-import android.view.inputmethod.InputMethodManager;
-
-import java.util.List;
-
-/**
- * Implements {@link InsetsController.Host} for usage by
- * {@link DisplaySystemBarsController.PerDisplay} instances in {@link DisplaySystemBarsController}.
- * @hide
- */
-public class DisplaySystemBarsInsetsControllerHost implements InsetsController.Host {
-
- private static final String TAG = DisplaySystemBarsInsetsControllerHost.class.getSimpleName();
-
- private final Handler mHandler;
- private final IDisplayWindowInsetsController mController;
- private final float[] mTmpFloat9 = new float[9];
-
- public DisplaySystemBarsInsetsControllerHost(
- Handler handler, IDisplayWindowInsetsController controller) {
- mHandler = handler;
- mController = controller;
- }
-
- @Override
- public Handler getHandler() {
- return mHandler;
- }
-
- @Override
- public void notifyInsetsChanged() {
- // no-op
- }
-
- @Override
- public void dispatchWindowInsetsAnimationPrepare(@NonNull WindowInsetsAnimation animation) {
- // no-op
- }
-
- @Override
- public WindowInsetsAnimation.Bounds dispatchWindowInsetsAnimationStart(
- @NonNull WindowInsetsAnimation animation,
- @NonNull WindowInsetsAnimation.Bounds bounds) {
- return null;
- }
-
- @Override
- public WindowInsets dispatchWindowInsetsAnimationProgress(@NonNull WindowInsets insets,
- @NonNull List<WindowInsetsAnimation> runningAnimations) {
- return null;
- }
-
- @Override
- public void dispatchWindowInsetsAnimationEnd(@NonNull WindowInsetsAnimation animation) {
- // no-op
- }
-
- @Override
- public void applySurfaceParams(final SyncRtSurfaceTransactionApplier.SurfaceParams... params) {
- for (int i = params.length - 1; i >= 0; i--) {
- SyncRtSurfaceTransactionApplier.applyParams(
- new SurfaceControl.Transaction(), params[i], mTmpFloat9);
- }
-
- }
-
- @Override
- public void updateCompatSysUiVisibility(
- @InsetsState.InternalInsetsType int type, boolean visible, boolean hasControl) {
- // no-op
- }
-
- @Override
- public void onInsetsModified(InsetsState insetsState) {
- try {
- mController.insetsChanged(insetsState);
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to send insets to controller");
- }
- }
-
- @Override
- public boolean hasAnimationCallbacks() {
- return false;
- }
-
- @Override
- public void setSystemBarsAppearance(
- @WindowInsetsController.Appearance int appearance,
- @WindowInsetsController.Appearance int mask) {
- // no-op
- }
-
- @Override
- public @WindowInsetsController.Appearance int getSystemBarsAppearance() {
- return 0;
- }
-
- @Override
- public void setSystemBarsBehavior(@WindowInsetsController.Behavior int behavior) {
- // no-op
- }
-
- @Override
- public @WindowInsetsController.Behavior int getSystemBarsBehavior() {
- return 0;
- }
-
- @Override
- public void releaseSurfaceControlFromRt(SurfaceControl surfaceControl) {
- surfaceControl.release();
- }
-
- @Override
- public void addOnPreDrawRunnable(Runnable r) {
- mHandler.post(r);
- }
-
- @Override
- public void postInsetsAnimationCallback(Runnable r) {
- mHandler.post(r);
- }
-
- @Override
- public InputMethodManager getInputMethodManager() {
- return null;
- }
-
- @Override
- public String getRootViewTitle() {
- return null;
- }
-
- @Override
- public int dipToPx(int dips) {
- return 0;
- }
-
- @Override
- public IBinder getWindowToken() {
- return null;
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMComponent.java b/packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMComponent.java
deleted file mode 100644
index c6a7fd2f822d..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMComponent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2020 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.wmshell;
-
-import com.android.systemui.dagger.WMComponent;
-import com.android.systemui.dagger.WMSingleton;
-
-import dagger.Subcomponent;
-
-
-/**
- * Dagger Subcomponent for WindowManager.
- */
-@WMSingleton
-@Subcomponent(modules = {CarWMShellModule.class})
-public interface CarWMComponent extends WMComponent {
-
- /**
- * Builder for a SysUIComponent.
- */
- @Subcomponent.Builder
- interface Builder extends WMComponent.Builder {
- CarWMComponent build();
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMShellModule.java b/packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMShellModule.java
deleted file mode 100644
index 27aabffd5090..000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/wmshell/CarWMShellModule.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2020 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.wmshell;
-
-import android.content.Context;
-import android.os.Handler;
-import android.view.IWindowManager;
-
-import com.android.systemui.dagger.WMSingleton;
-import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.wm.DisplaySystemBarsController;
-import com.android.wm.shell.common.DisplayController;
-import com.android.wm.shell.common.DisplayImeController;
-import com.android.wm.shell.common.TransactionPool;
-import com.android.wm.shell.pip.Pip;
-
-import dagger.BindsOptionalOf;
-import dagger.Module;
-import dagger.Provides;
-
-/** Provides dependencies from {@link com.android.wm.shell} for CarSystemUI. */
-@Module(includes = WMShellBaseModule.class)
-public abstract class CarWMShellModule {
- @WMSingleton
- @Provides
- static DisplayImeController provideDisplayImeController(Context context,
- IWindowManager wmService, DisplayController displayController,
- @Main Handler mainHandler, TransactionPool transactionPool) {
- return new DisplaySystemBarsController(context, wmService, displayController,
- mainHandler, transactionPool);
- }
-
- @BindsOptionalOf
- abstract Pip optionalPip();
-}
diff --git a/packages/CarSystemUI/tests/Android.mk b/packages/CarSystemUI/tests/Android.mk
deleted file mode 100644
index 1366568c3a66..000000000000
--- a/packages/CarSystemUI/tests/Android.mk
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright (C) 2019 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_JACK_FLAGS := --multi-dex native
-LOCAL_DX_FLAGS := --multi-dex
-
-LOCAL_PACKAGE_NAME := CarSystemUITests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- CarSystemUI-tests
-
-LOCAL_MULTILIB := both
-
-LOCAL_JNI_SHARED_LIBRARIES := \
- libdexmakerjvmtiagent \
- libmultiplejvmtiagentsinterferenceagent
-
-LOCAL_JAVA_LIBRARIES := \
- android.test.runner \
- telephony-common \
- android.test.base \
-
-LOCAL_AAPT_FLAGS := --extra-packages com.android.systemui
-
-# sign this with platform cert, so this test is allowed to inject key events into
-# UI it doesn't own. This is necessary to allow screenshots to be taken
-LOCAL_CERTIFICATE := platform
-
-# Provide jack a list of classes to exclude from code coverage.
-# This is needed because the CarSystemUITests compile CarSystemUI source directly, rather than using
-# LOCAL_INSTRUMENTATION_FOR := CarSystemUI.
-#
-# We want to exclude the test classes from code coverage measurements, but they share the same
-# package as the rest of SystemUI so they can't be easily filtered by package name.
-#
-# Generate a comma separated list of patterns based on the test source files under src/
-# SystemUI classes are in ../src/ so they won't be excluded.
-# Example:
-# Input files: src/com/android/systemui/Test.java src/com/android/systemui/AnotherTest.java
-# Generated exclude list: com.android.systemui.Test*,com.android.systemui.AnotherTest*
-
-# Filter all src files under src/ to just java files
-local_java_files := $(filter %.java,$(call all-java-files-under, src))
-
-# Transform java file names into full class names.
-# This only works if the class name matches the file name and the directory structure
-# matches the package.
-local_classes := $(subst /,.,$(patsubst src/%.java,%,$(local_java_files)))
-local_comma := ,
-local_empty :=
-local_space := $(local_empty) $(local_empty)
-
-# Convert class name list to jacoco exclude list
-# This appends a * to all classes and replace the space separators with commas.
-jacoco_exclude := $(subst $(space),$(comma),$(patsubst %,%*,$(local_classes)))
-
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.systemui.*,com.android.keyguard.*
-LOCAL_JACK_COVERAGE_EXCLUDE_FILTER := $(jacoco_exclude)
-
-ifeq ($(EXCLUDE_SYSTEMUI_TESTS),)
- include $(BUILD_PACKAGE)
-endif
-
-# Reset variables
-local_java_files :=
-local_classes :=
-local_comma :=
-local_space :=
-jacoco_exclude :=
diff --git a/packages/CarSystemUI/tests/AndroidManifest.xml b/packages/CarSystemUI/tests/AndroidManifest.xml
deleted file mode 100644
index a74bb56d8d75..000000000000
--- a/packages/CarSystemUI/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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.
- -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:sharedUserId="android.uid.system"
- package="com.android.systemui.tests">
-
- <application android:debuggable="true" android:largeHeap="true">
- <uses-library android:name="android.test.runner" />
-
- <provider
- android:name="androidx.lifecycle.ProcessLifecycleOwnerInitializer"
- tools:replace="android:authorities"
- android:authorities="${applicationId}.lifecycle-tests"
- android:exported="false"
- android:enabled="false"
- android:multiprocess="true" />
- </application>
-
- <instrumentation android:name="android.testing.TestableInstrumentation"
- android:targetPackage="com.android.systemui.tests"
- android:label="Tests for CarSystemUI">
- </instrumentation>
-</manifest>
diff --git a/packages/CarSystemUI/tests/AndroidTest.xml b/packages/CarSystemUI/tests/AndroidTest.xml
deleted file mode 100644
index 8685632f2b63..000000000000
--- a/packages/CarSystemUI/tests/AndroidTest.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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.
- -->
-<configuration description="Runs Tests for CarSystemUI.">
- <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
- <option name="test-file-name" value="CarSystemUITests.apk" />
- </target_preparer>
-
- <option name="test-suite-tag" value="apct" />
- <option name="test-suite-tag" value="framework-base-presubmit" />
- <option name="test-tag" value="CarSystemUITests" />
- <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
- <option name="package" value="com.android.systemui.tests" />
- <option name="runner" value="android.testing.TestableInstrumentation" />
- <option name="hidden-api-checks" value="false"/>
- </test>
-</configuration>
diff --git a/packages/CarSystemUI/tests/res/layout/button_role_holder_controller_test.xml b/packages/CarSystemUI/tests/res/layout/button_role_holder_controller_test.xml
deleted file mode 100644
index 25ec2c179c8c..000000000000
--- a/packages/CarSystemUI/tests/res/layout/button_role_holder_controller_test.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:id="@id/nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingStart="20dp"
- android:paddingEnd="20dp"
- android:gravity="center">
-
- <com.android.systemui.car.navigationbar.AssitantButton
- android:id="@+id/assistant_role_button"
- style="@style/NavigationBarButton"
- systemui:icon="@drawable/car_ic_overview"
- systemui:useDefaultAppIconForRole="true"
- />
-
- <com.android.systemui.car.navigationbar.AssitantButton
- android:id="@+id/assistant_role_disabled_button"
- style="@style/NavigationBarButton"
- systemui:icon="@drawable/car_ic_overview"
- />
-
-</LinearLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/tests/res/layout/car_button_selection_state_controller_test.xml b/packages/CarSystemUI/tests/res/layout/car_button_selection_state_controller_test.xml
deleted file mode 100644
index a8e83d6d7717..000000000000
--- a/packages/CarSystemUI/tests/res/layout/car_button_selection_state_controller_test.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<!--
- ~ Copyright (C) 2019 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.
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:id="@id/nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingStart="20dp"
- android:paddingEnd="20dp"
- android:gravity="center">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/detectable_by_component_name"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/detectable_by_category"
- style="@style/NavigationBarButton"
- systemui:categories="android.intent.category.APP_MAPS"
- systemui:icon="@drawable/car_ic_navigation"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MAPS;launchFlags=0x14000000;end"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/detectable_by_package"
- style="@style/NavigationBarButton"
- systemui:icon="@drawable/car_ic_phone"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
- systemui:packages="com.android.car.dialer"
- systemui:highlightWhenSelected="true"
- />
-
-</LinearLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/tests/res/layout/car_navigation_bar_view_test.xml b/packages/CarSystemUI/tests/res/layout/car_navigation_bar_view_test.xml
deleted file mode 100644
index 94edc4b5e245..000000000000
--- a/packages/CarSystemUI/tests/res/layout/car_navigation_bar_view_test.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<com.android.systemui.car.navigationbar.CarNavigationBarView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/system_bar_background"
- android:orientation="vertical">
- <!--The 20dp padding is the difference between the background selected icon size and the ripple
- that was chosen, thus it's a hack to make it look pretty and not an official margin value-->
- <LinearLayout
- android:id="@id/nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingStart="20dp"
- android:paddingEnd="20dp"
- android:gravity="center">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/home"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:highlightWhenSelected="true"
- />
-
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/lock_screen_nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingStart="@dimen/car_keyline_1"
- android:paddingEnd="@dimen/car_keyline_1"
- android:gravity="center"
- android:visibility="gone"
- />
-
-</com.android.systemui.car.navigationbar.CarNavigationBarView>
diff --git a/packages/CarSystemUI/tests/res/layout/car_navigation_button_test.xml b/packages/CarSystemUI/tests/res/layout/car_navigation_button_test.xml
deleted file mode 100644
index 44f834040391..000000000000
--- a/packages/CarSystemUI/tests/res/layout/car_navigation_button_test.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<!--
- ~ Copyright (C) 2019 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.
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res-auto"
- android:id="@id/nav_buttons"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingStart="20dp"
- android:paddingEnd="20dp"
- android:gravity="center">
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/default_no_selection_state"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/app_grid_activity"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
- systemui:icon="@drawable/car_ic_apps"
- systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"
- systemui:selectedIcon="@drawable/car_ic_apps_selected"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/long_click_app_grid_activity"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
- systemui:icon="@drawable/car_ic_apps"
- systemui:longIntent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"
- systemui:selectedIcon="@drawable/car_ic_apps_selected"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/broadcast"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@null"
- systemui:broadcast="true"
- systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/selected_icon_undefined"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/highlightable_no_more_button"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:highlightWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/not_highlightable_more_button"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:showMoreWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/highlightable_more_button"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:highlightWhenSelected="true"
- systemui:showMoreWhenSelected="true"
- />
-
- <com.android.systemui.car.navigationbar.CarNavigationButton
- android:id="@+id/broadcast"
- style="@style/NavigationBarButton"
- systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
- systemui:icon="@drawable/car_ic_overview"
- systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:broadcast="true"
- />
-
- <com.android.systemui.car.navigationbar.AssitantButton
- android:id="@+id/role_based_button"
- style="@style/NavigationBarButton"
- systemui:icon="@drawable/car_ic_overview"
- systemui:selectedIcon="@drawable/car_ic_overview_selected"
- systemui:useDefaultAppIconForRole="true"
- systemui:highlightWhenSelected="true"
- />
-
-</LinearLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/tests/res/layout/overlay_view_controller_stub.xml b/packages/CarSystemUI/tests/res/layout/overlay_view_controller_stub.xml
deleted file mode 100644
index 5e5efe7614fc..000000000000
--- a/packages/CarSystemUI/tests/res/layout/overlay_view_controller_stub.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/overlay_view_controller_test">
-</LinearLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/tests/res/layout/overlay_view_controller_test.xml b/packages/CarSystemUI/tests/res/layout/overlay_view_controller_test.xml
deleted file mode 100644
index 165193e86c96..000000000000
--- a/packages/CarSystemUI/tests/res/layout/overlay_view_controller_test.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<!-- Fullscreen views in sysui should be listed here in increasing Z order. -->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:background="@android:color/transparent"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ViewStub android:id="@+id/overlay_view_controller_stub"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/overlay_view_controller_stub"/>
-
-</FrameLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/tests/res/layout/overlay_view_global_state_controller_test.xml b/packages/CarSystemUI/tests/res/layout/overlay_view_global_state_controller_test.xml
deleted file mode 100644
index 03fe0e4fcf2e..000000000000
--- a/packages/CarSystemUI/tests/res/layout/overlay_view_global_state_controller_test.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 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.
- -->
-
-<!-- Fullscreen views in sysui should be listed here in increasing Z order. -->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:background="@android:color/transparent"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ViewStub android:id="@+id/overlay_view_controller_stub_1"
- android:inflatedId="@+id/overlay_view_controller_1"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/overlay_view_controller_stub"/>
-
- <ViewStub android:id="@+id/overlay_view_controller_stub_2"
- android:inflatedId="@+id/overlay_view_controller_2"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/overlay_view_controller_stub"/>
-
- <ViewStub android:id="@+id/overlay_view_controller_stub_3"
- android:inflatedId="@+id/overlay_view_controller_3"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout="@layout/overlay_view_controller_stub"/>
-
-</FrameLayout> \ No newline at end of file
diff --git a/packages/CarSystemUI/tests/res/values/config.xml b/packages/CarSystemUI/tests/res/values/config.xml
deleted file mode 100644
index 0d08ac26d962..000000000000
--- a/packages/CarSystemUI/tests/res/values/config.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 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>
- <!-- Configure which system ui bars should be displayed.
- These can be overwritten within the tests. -->
- <bool name="config_enableLeftNavigationBar">false</bool>
- <bool name="config_enableRightNavigationBar">false</bool>
- <bool name="config_enableBottomNavigationBar">false</bool>
-</resources>
diff --git a/packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java b/packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
deleted file mode 100644
index 86b86d482eee..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (C) 2019 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;
-
-import static org.hamcrest.Matchers.empty;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-import android.testing.AndroidTestingRunner;
-import android.text.TextUtils;
-import android.util.Log;
-
-import androidx.test.filters.LargeTest;
-import androidx.test.filters.MediumTest;
-import androidx.test.filters.SmallTest;
-import androidx.test.internal.runner.ClassPathScanner;
-import androidx.test.internal.runner.ClassPathScanner.ChainedClassNameFilter;
-import androidx.test.internal.runner.ClassPathScanner.ExternalClassNameFilter;
-
-import com.android.systemui.SysuiBaseFragmentTest;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * This is named AAAPlusPlusVerifySysuiRequiredTestPropertiesTest for two reasons.
- * a) Its so awesome it deserves an AAA++
- * b) It should run first to draw attention to itself.
- *
- * For trues though: this test verifies that all the sysui tests extend the right classes.
- * This matters because including tests with different context implementations in the same
- * test suite causes errors, such as the incorrect settings provider being cached.
- * For an example, see {@link com.android.systemui.DependencyTest}.
- */
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@SmallTest
-public class AAAPlusPlusVerifySysuiRequiredTestPropertiesTest extends SysuiTestCase {
-
- private static final String TAG = "AAA++VerifyTest";
-
- private static final Class[] BASE_CLS_TO_INCLUDE = {
- SysuiTestCase.class,
- SysuiBaseFragmentTest.class,
- };
-
- private static final Class[] SUPPORTED_SIZES = {
- SmallTest.class,
- MediumTest.class,
- LargeTest.class,
- android.test.suitebuilder.annotation.SmallTest.class,
- android.test.suitebuilder.annotation.MediumTest.class,
- android.test.suitebuilder.annotation.LargeTest.class,
- };
-
- @Test
- public void testAllClassInheritance() throws Throwable {
- ArrayList<String> fails = new ArrayList<>();
- for (String className : getClassNamesFromClassPath()) {
- Class<?> cls = Class.forName(className, false, this.getClass().getClassLoader());
- if (!isTestClass(cls)) continue;
-
- boolean hasParent = false;
- for (Class<?> parent : BASE_CLS_TO_INCLUDE) {
- if (parent.isAssignableFrom(cls)) {
- hasParent = true;
- break;
- }
- }
- boolean hasSize = hasSize(cls);
- if (!hasSize) {
- fails.add(cls.getName() + " does not have size annotation, such as @SmallTest");
- }
- if (!hasParent) {
- fails.add(cls.getName() + " does not extend any of " + getClsStr());
- }
- }
-
- assertThat("All sysui test classes must have size and extend one of " + getClsStr(),
- fails, is(empty()));
- }
-
- private boolean hasSize(Class<?> cls) {
- for (int i = 0; i < SUPPORTED_SIZES.length; i++) {
- if (cls.getDeclaredAnnotation(SUPPORTED_SIZES[i]) != null) return true;
- }
- return false;
- }
-
- private Collection<String> getClassNamesFromClassPath() {
- ClassPathScanner scanner = new ClassPathScanner(mContext.getPackageCodePath());
-
- ChainedClassNameFilter filter = new ChainedClassNameFilter();
-
- filter.add(new ExternalClassNameFilter());
- filter.add(s -> s.startsWith("com.android.systemui")
- || s.startsWith("com.android.keyguard"));
-
- try {
- return scanner.getClassPathEntries(filter);
- } catch (IOException e) {
- Log.e(TAG, "Failed to scan classes", e);
- }
- return Collections.emptyList();
- }
-
- private String getClsStr() {
- return TextUtils.join(",", Arrays.asList(BASE_CLS_TO_INCLUDE)
- .stream().map(cls -> cls.getSimpleName()).toArray());
- }
-
- /**
- * Determines if given class is a valid test class.
- *
- * @return <code>true</code> if loadedClass is a test
- */
- private boolean isTestClass(Class<?> loadedClass) {
- try {
- if (Modifier.isAbstract(loadedClass.getModifiers())) {
- logDebug(String.format("Skipping abstract class %s: not a test",
- loadedClass.getName()));
- return false;
- }
- // TODO: try to find upstream junit calls to replace these checks
- if (junit.framework.Test.class.isAssignableFrom(loadedClass)) {
- // ensure that if a TestCase, it has at least one test method otherwise
- // TestSuite will throw error
- if (junit.framework.TestCase.class.isAssignableFrom(loadedClass)) {
- return hasJUnit3TestMethod(loadedClass);
- }
- return true;
- }
- // TODO: look for a 'suite' method?
- if (loadedClass.isAnnotationPresent(RunWith.class)) {
- return true;
- }
- for (Method testMethod : loadedClass.getMethods()) {
- if (testMethod.isAnnotationPresent(Test.class)) {
- return true;
- }
- }
- logDebug(String.format("Skipping class %s: not a test", loadedClass.getName()));
- return false;
- } catch (Exception e) {
- // Defensively catch exceptions - Will throw runtime exception if it cannot load
- // methods.
- // For earlier versions of Android (Pre-ICS), Dalvik might try to initialize a class
- // during getMethods(), fail to do so, hide the error and throw a NoSuchMethodException.
- // Since the java.lang.Class.getMethods does not declare such an exception, resort to a
- // generic catch all.
- // For ICS+, Dalvik will throw a NoClassDefFoundException.
- Log.w(TAG, String.format("%s in isTestClass for %s", e.toString(),
- loadedClass.getName()));
- return false;
- } catch (Error e) {
- // defensively catch Errors too
- Log.w(TAG, String.format("%s in isTestClass for %s", e.toString(),
- loadedClass.getName()));
- return false;
- }
- }
-
- private boolean hasJUnit3TestMethod(Class<?> loadedClass) {
- for (Method testMethod : loadedClass.getMethods()) {
- if (isPublicTestMethod(testMethod)) {
- return true;
- }
- }
- return false;
- }
-
- // copied from junit.framework.TestSuite
- private boolean isPublicTestMethod(Method m) {
- return isTestMethod(m) && Modifier.isPublic(m.getModifiers());
- }
-
- // copied from junit.framework.TestSuite
- private boolean isTestMethod(Method m) {
- return m.getParameterTypes().length == 0 && m.getName().startsWith("test")
- && m.getReturnType().equals(Void.TYPE);
- }
-
- /**
- * Utility method for logging debug messages. Only actually logs a message if TAG is marked
- * as loggable to limit log spam during normal use.
- */
- private void logDebug(String msg) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, msg);
- }
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java
deleted file mode 100644
index fe071d54fb10..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static android.car.VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_DISPLAY_UNITS;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_SET;
-
-import static com.android.systemui.car.hvac.HvacController.convertToCelsius;
-import static com.android.systemui.car.hvac.HvacController.convertToFahrenheit;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.car.Car;
-import android.car.VehicleUnit;
-import android.car.hardware.property.CarPropertyManager;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.widget.TextView;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.concurrent.Executor;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class AdjustableTemperatureViewTest extends SysuiTestCase {
-
- private static final float TEMP_CELSIUS = 22.0f;
- private final String mFormat = getContext().getString(R.string.hvac_temperature_format);
- private AdjustableTemperatureView mAdjustableTemperatureView;
- private HvacController mHvacController;
-
- @Mock
- private Car mCar;
- @Mock
- private CarPropertyManager mCarPropertyManager;
- @Mock
- private Executor mExecutor;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- when(mCar.isConnected()).thenReturn(true);
- when(mCar.getCarManager(Car.PROPERTY_SERVICE)).thenReturn(mCarPropertyManager);
-
- CarServiceProvider carServiceProvider = new CarServiceProvider(mContext, mCar);
- mHvacController = new HvacController(carServiceProvider, mExecutor);
- mHvacController.connectToCarService();
- mAdjustableTemperatureView = new AdjustableTemperatureView(getContext(), /* attrs= */ null);
- mAdjustableTemperatureView.onFinishInflate();
- mAdjustableTemperatureView.setHvacController(mHvacController);
- }
-
- @Test
- public void addTemperatureViewToController_setsTemperatureView() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP_CELSIUS);
-
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- TextView tempText = mAdjustableTemperatureView.findViewById(R.id.hvac_temperature_text);
- assertEquals(tempText.getText(), String.format(mFormat, TEMP_CELSIUS));
- }
-
- @Test
- public void setTemp_tempNaN_setsTextToNaNText() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- Float.NaN);
-
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- TextView tempText = mAdjustableTemperatureView.findViewById(R.id.hvac_temperature_text);
- assertEquals(tempText.getText(),
- getContext().getResources().getString(R.string.hvac_null_temp_text));
- }
-
- @Test
- public void setTemp_tempBelowMin_setsTextToMinTempText() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- getContext().getResources().getFloat(R.dimen.hvac_min_value_celsius));
-
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- TextView tempText = mAdjustableTemperatureView.findViewById(R.id.hvac_temperature_text);
- assertEquals(tempText.getText(),
- getContext().getResources().getString(R.string.hvac_min_text));
- }
-
- @Test
- public void setTemp_tempAboveMax_setsTextToMaxTempText() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- getContext().getResources().getFloat(R.dimen.hvac_max_value_celsius));
-
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- TextView tempText = mAdjustableTemperatureView.findViewById(R.id.hvac_temperature_text);
- assertEquals(tempText.getText(),
- getContext().getResources().getString(R.string.hvac_max_text));
- }
-
- @Test
- public void setTemperatureToFahrenheit_callsViewSetDisplayInFahrenheit() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP_CELSIUS);
- when(mCarPropertyManager.isPropertyAvailable(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(true);
- when(mCarPropertyManager.getIntProperty(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(VehicleUnit.FAHRENHEIT);
-
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- TextView tempText = mAdjustableTemperatureView.findViewById(R.id.hvac_temperature_text);
- assertEquals(tempText.getText(), String.format(mFormat, convertToFahrenheit(TEMP_CELSIUS)));
- }
-
- @Test
- public void adjustableViewIncreaseButton_setsTempWithCarPropertyManager() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP_CELSIUS);
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- mAdjustableTemperatureView.findViewById(R.id.hvac_increase_button).callOnClick();
-
- ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class);
- verify(mExecutor).execute(setTempRunnableCaptor.capture());
- setTempRunnableCaptor.getValue().run();
- verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(),
- eq(TEMP_CELSIUS + 1));
- }
-
- @Test
- public void adjustableViewDecreaseButton_setsTempWithCarPropertyManager() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP_CELSIUS);
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- mAdjustableTemperatureView.findViewById(R.id.hvac_decrease_button).callOnClick();
-
- ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class);
- verify(mExecutor).execute(setTempRunnableCaptor.capture());
- setTempRunnableCaptor.getValue().run();
- verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(),
- eq(TEMP_CELSIUS - 1));
- }
-
- @Test
- public void adjustableViewIncreaseButton_inFahrenheit_setsTempWithCarPropertyManager() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP_CELSIUS);
- when(mCarPropertyManager.isPropertyAvailable(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(true);
- when(mCarPropertyManager.getIntProperty(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(VehicleUnit.FAHRENHEIT);
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- mAdjustableTemperatureView.findViewById(R.id.hvac_increase_button).callOnClick();
-
- ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class);
- verify(mExecutor).execute(setTempRunnableCaptor.capture());
- setTempRunnableCaptor.getValue().run();
- verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(),
- eq(convertToCelsius(convertToFahrenheit(TEMP_CELSIUS) + 1)));
- }
-
- @Test
- public void adjustableViewDecreaseButton_inFahrenheit_setsTempWithCarPropertyManager() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP_CELSIUS);
- when(mCarPropertyManager.isPropertyAvailable(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(true);
- when(mCarPropertyManager.getIntProperty(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(VehicleUnit.FAHRENHEIT);
- mHvacController.addTemperatureViewToController(mAdjustableTemperatureView);
-
- mAdjustableTemperatureView.findViewById(R.id.hvac_decrease_button).callOnClick();
-
- ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class);
- verify(mExecutor).execute(setTempRunnableCaptor.capture());
- setTempRunnableCaptor.getValue().run();
- verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(),
- eq(convertToCelsius(convertToFahrenheit(TEMP_CELSIUS) - 1)));
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java
deleted file mode 100644
index 52f07dfd6b81..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static android.car.VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_DISPLAY_UNITS;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_SET;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyFloat;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.car.Car;
-import android.car.VehicleUnit;
-import android.car.hardware.property.CarPropertyManager;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.util.concurrency.FakeExecutor;
-import com.android.systemui.util.time.FakeSystemClock;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class HvacControllerTest extends SysuiTestCase {
-
- private static final int AREA_ID = 1;
- private static final float TEMP = 72.0f;
-
- private HvacController mHvacController;
-
- @Mock
- private Car mCar;
- @Mock
- private CarPropertyManager mCarPropertyManager;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- when(mCar.isConnected()).thenReturn(true);
- when(mCar.getCarManager(Car.PROPERTY_SERVICE)).thenReturn(mCarPropertyManager);
-
- CarServiceProvider carServiceProvider = new CarServiceProvider(mContext, mCar);
- mHvacController = new HvacController(carServiceProvider,
- new FakeExecutor(new FakeSystemClock()));
- mHvacController.connectToCarService();
- }
-
- @Test
- public void connectToCarService_registersCallback() {
- verify(mCarPropertyManager).registerCallback(any(), eq(HVAC_TEMPERATURE_SET), anyFloat());
- verify(mCarPropertyManager).registerCallback(any(), eq(HVAC_TEMPERATURE_DISPLAY_UNITS),
- anyFloat());
- }
-
- @Test
- public void addTemperatureViewToController_usingTemperatureView_registersView() {
- TemperatureTextView v = setupMockTemperatureTextView(AREA_ID, TEMP);
- mHvacController.addTemperatureViewToController(v);
-
- verify(v).setTemp(TEMP);
- }
-
- @Test
- public void addTemperatureViewToController_usingSameTemperatureView_registersFirstView() {
- TemperatureTextView v = setupMockTemperatureTextView(AREA_ID, TEMP);
- mHvacController.addTemperatureViewToController(v);
- verify(v).setTemp(TEMP);
- resetTemperatureView(v, AREA_ID);
-
- mHvacController.addTemperatureViewToController(v);
- verify(v, never()).setTemp(TEMP);
- }
-
- @Test
- public void addTemperatureViewToController_usingDifferentTemperatureView_registersBothViews() {
- TemperatureTextView v1 = setupMockTemperatureTextView(AREA_ID, TEMP);
- mHvacController.addTemperatureViewToController(v1);
- verify(v1).setTemp(TEMP);
-
- TemperatureTextView v2 = setupMockTemperatureTextView(
- AREA_ID + 1,
- TEMP + 1);
- mHvacController.addTemperatureViewToController(v2);
- verify(v2).setTemp(TEMP + 1);
- }
-
- @Test
- public void setTemperatureToFahrenheit_callsViewSetDisplayInFahrenheit() {
- when(mCarPropertyManager.isPropertyAvailable(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(true);
- when(mCarPropertyManager.getIntProperty(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(VehicleUnit.FAHRENHEIT);
- TemperatureTextView v = setupMockTemperatureTextView(AREA_ID, TEMP);
-
- mHvacController.addTemperatureViewToController(v);
-
- verify(v).setDisplayInFahrenheit(true);
- verify(v).setTemp(TEMP);
- }
-
- private TemperatureTextView setupMockTemperatureTextView(int areaId, float value) {
- TemperatureTextView v = mock(TemperatureTextView.class);
- resetTemperatureView(v, areaId);
- when(mCarPropertyManager.isPropertyAvailable(HVAC_TEMPERATURE_SET, areaId)).thenReturn(
- true);
- when(mCarPropertyManager.getFloatProperty(HVAC_TEMPERATURE_SET, areaId)).thenReturn(value);
- return v;
- }
-
- private void resetTemperatureView(TemperatureTextView view, int areaId) {
- reset(view);
- when(view.getAreaId()).thenReturn(areaId);
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java
deleted file mode 100644
index 3ed811105a54..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.hvac;
-
-import static android.car.VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_DISPLAY_UNITS;
-import static android.car.VehiclePropertyIds.HVAC_TEMPERATURE_SET;
-
-import static com.android.systemui.car.hvac.HvacController.convertToFahrenheit;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.when;
-
-import android.car.Car;
-import android.car.VehicleUnit;
-import android.car.hardware.property.CarPropertyManager;
-import android.content.Context;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.util.concurrency.FakeExecutor;
-import com.android.systemui.util.time.FakeSystemClock;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class TemperatureTextViewTest extends SysuiTestCase {
- private static final float TEMP = 72.0f;
- private final String mFormat = getContext().getString(R.string.hvac_temperature_format);
- private HvacController mHvacController;
- private TemperatureTextView mTextView;
-
- @Mock
- private Context mContext;
-
- @Mock
- private Car mCar;
- @Mock
- private CarPropertyManager mCarPropertyManager;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- when(mCar.isConnected()).thenReturn(true);
- when(mCar.getCarManager(Car.PROPERTY_SERVICE)).thenReturn(mCarPropertyManager);
-
- CarServiceProvider carServiceProvider = new CarServiceProvider(mContext, mCar);
- mHvacController = new HvacController(carServiceProvider,
- new FakeExecutor(new FakeSystemClock()));
- mHvacController.connectToCarService();
- mTextView = new TemperatureTextView(getContext(), /* attrs= */ null);
- }
-
- @Test
- public void addTemperatureViewToController_usingTemperatureView_registersView() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP);
-
- mHvacController.addTemperatureViewToController(mTextView);
-
- assertEquals(mTextView.getText(), String.format(mFormat, TEMP));
- }
-
- @Test
- public void setTemperatureToFahrenheit_callsViewSetDisplayInFahrenheit() {
- when(mCarPropertyManager.isPropertyAvailable(eq(HVAC_TEMPERATURE_SET),
- anyInt())).thenReturn(true);
- when(mCarPropertyManager.getFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt())).thenReturn(
- TEMP);
- when(mCarPropertyManager.isPropertyAvailable(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(true);
- when(mCarPropertyManager.getIntProperty(HVAC_TEMPERATURE_DISPLAY_UNITS,
- VEHICLE_AREA_TYPE_GLOBAL)).thenReturn(VehicleUnit.FAHRENHEIT);
-
- mHvacController.addTemperatureViewToController(mTextView);
-
- assertEquals(mTextView.getText(), String.format(mFormat, convertToFahrenheit(TEMP)));
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java
deleted file mode 100644
index 062ab4115263..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/keyguard/CarKeyguardViewControllerTest.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.keyguard;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.os.Handler;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.view.ViewGroup;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.keyguard.ViewMediatorCallback;
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.car.navigationbar.CarNavigationBarController;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-import com.android.systemui.statusbar.phone.BiometricUnlockController;
-import com.android.systemui.statusbar.phone.KeyguardBouncer;
-import com.android.systemui.statusbar.policy.KeyguardStateController;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class CarKeyguardViewControllerTest extends SysuiTestCase {
-
- private CarKeyguardViewController mCarKeyguardViewController;
-
- @Mock
- private OverlayViewGlobalStateController mOverlayViewGlobalStateController;
- @Mock
- private CarKeyguardViewController.OnKeyguardCancelClickedListener mCancelClickedListener;
- @Mock
- private KeyguardBouncer.Factory mKeyguardBouncerFactory;
- @Mock
- private KeyguardBouncer mBouncer;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
-
- when(mKeyguardBouncerFactory.create(
- any(ViewGroup.class),
- any(KeyguardBouncer.BouncerExpansionCallback.class)))
- .thenReturn(mBouncer);
-
- mCarKeyguardViewController = new CarKeyguardViewController(
- Handler.getMain(),
- mock(CarServiceProvider.class),
- mOverlayViewGlobalStateController,
- mock(KeyguardStateController.class),
- mock(KeyguardUpdateMonitor.class),
- () -> mock(BiometricUnlockController.class),
- mock(ViewMediatorCallback.class),
- mock(CarNavigationBarController.class),
- mKeyguardBouncerFactory
- );
- mCarKeyguardViewController.inflate((ViewGroup) LayoutInflater.from(mContext).inflate(
- R.layout.sysui_overlay_window, /* root= */ null));
- }
-
- @Test
- public void onShow_bouncerIsSecure_showsBouncerWithSecuritySelectionReset() {
- when(mBouncer.isSecure()).thenReturn(true);
- mCarKeyguardViewController.show(/* options= */ null);
-
- verify(mBouncer).show(/* resetSecuritySelection= */ true);
- }
-
- @Test
- public void onShow_bouncerIsSecure_keyguardIsVisible() {
- when(mBouncer.isSecure()).thenReturn(true);
- mCarKeyguardViewController.show(/* options= */ null);
-
- verify(mOverlayViewGlobalStateController).showView(eq(mCarKeyguardViewController), any());
- }
-
- @Test
- public void onShow_bouncerNotSecure_hidesBouncerAndDestroysTheView() {
- when(mBouncer.isSecure()).thenReturn(false);
- mCarKeyguardViewController.show(/* options= */ null);
-
- verify(mBouncer).hide(/* destroyView= */ true);
- }
-
- @Test
- public void onShow_bouncerNotSecure_keyguardIsNotVisible() {
- when(mBouncer.isSecure()).thenReturn(false);
- mCarKeyguardViewController.show(/* options= */ null);
-
- // Here we check for both showView and hideView since the current implementation of show
- // with bouncer being not secure has the following method execution orders:
- // 1) show -> start -> showView
- // 2) show -> reset -> dismissAndCollapse -> hide -> stop -> hideView
- // Hence, we want to make sure that showView is called before hideView and not in any
- // other combination.
- InOrder inOrder = inOrder(mOverlayViewGlobalStateController);
- inOrder.verify(mOverlayViewGlobalStateController).showView(eq(mCarKeyguardViewController),
- any());
- inOrder.verify(mOverlayViewGlobalStateController).hideView(eq(mCarKeyguardViewController),
- any());
- }
-
- @Test
- public void onHide_keyguardShowing_hidesBouncerAndDestroysTheView() {
- when(mBouncer.isSecure()).thenReturn(true);
- mCarKeyguardViewController.show(/* options= */ null);
- mCarKeyguardViewController.hide(/* startTime= */ 0, /* fadeoutDelay= */ 0);
-
- verify(mBouncer).hide(/* destroyView= */ true);
- }
-
- @Test
- public void onHide_keyguardNotShown_doesNotHideOrDestroyBouncer() {
- mCarKeyguardViewController.hide(/* startTime= */ 0, /* fadeoutDelay= */ 0);
-
- verify(mBouncer, never()).hide(anyBoolean());
- }
-
- @Test
- public void onHide_KeyguardNotVisible() {
- when(mBouncer.isSecure()).thenReturn(true);
- mCarKeyguardViewController.show(/* options= */ null);
- mCarKeyguardViewController.hide(/* startTime= */ 0, /* fadeoutDelay= */ 0);
-
- InOrder inOrder = inOrder(mOverlayViewGlobalStateController);
- inOrder.verify(mOverlayViewGlobalStateController).showView(eq(mCarKeyguardViewController),
- any());
- inOrder.verify(mOverlayViewGlobalStateController).hideView(eq(mCarKeyguardViewController),
- any());
- }
-
- @Test
- public void setOccludedFalse_currentlyOccluded_bouncerReset() {
- when(mBouncer.isSecure()).thenReturn(true);
- mCarKeyguardViewController.show(/* options= */ null);
- mCarKeyguardViewController.setOccluded(/* occluded= */ true, /* animate= */ false);
- reset(mBouncer);
-
- mCarKeyguardViewController.setOccluded(/* occluded= */ false, /* animate= */ false);
-
- verify(mBouncer).show(/* resetSecuritySelection= */ true);
- }
-
- @Test
- public void onCancelClicked_callsCancelClickedListener() {
- when(mBouncer.isSecure()).thenReturn(true);
- mCarKeyguardViewController.show(/* options= */ null);
- mCarKeyguardViewController.registerOnKeyguardCancelClickedListener(mCancelClickedListener);
- mCarKeyguardViewController.onCancelClicked();
-
- verify(mCancelClickedListener).onCancelClicked();
- }
-
- @Test
- public void onCancelClicked_hidesBouncerAndDestroysTheView() {
- when(mBouncer.isSecure()).thenReturn(true);
- mCarKeyguardViewController.show(/* options= */ null);
- mCarKeyguardViewController.registerOnKeyguardCancelClickedListener(mCancelClickedListener);
- mCarKeyguardViewController.onCancelClicked();
-
- verify(mBouncer).hide(/* destroyView= */ true);
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java
deleted file mode 100644
index 4b8268052324..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonRoleHolderControllerTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.when;
-
-import android.app.role.RoleManager;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.os.UserHandle;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.widget.LinearLayout;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.tests.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.List;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class ButtonRoleHolderControllerTest extends SysuiTestCase {
- private static final String TEST_VALID_PACKAGE_NAME = "foo";
- private static final String TEST_INVALID_PACKAGE_NAME = "bar";
- private static final UserHandle TEST_CURRENT_USER = UserHandle.of(100);
- private static final UserHandle TEST_NON_CURRENT_USER = UserHandle.of(101);
-
- private LinearLayout mTestView;
- private CarNavigationButton mNavButtonDefaultAppIconForRoleWithEnabled;
- private CarNavigationButton mNavButtonDefaultAppIconForRoleWithDisabled;
- private ButtonRoleHolderController mControllerUnderTest;
- private Drawable mAppIcon;
-
- @Mock
- private RoleManager mRoleManager;
- @Mock
- private CarDeviceProvisionedController mDeviceProvisionedController;
- @Mock
- private PackageManager mPackageManager;
- @Mock
- private ApplicationInfo mApplicationInfo;
-
- @Before
- public void setUp() throws PackageManager.NameNotFoundException {
- MockitoAnnotations.initMocks(this);
-
- mTestView = (LinearLayout) LayoutInflater.from(mContext).inflate(
- R.layout.button_role_holder_controller_test, /* root= */ null);
- mNavButtonDefaultAppIconForRoleWithEnabled = mTestView
- .findViewById(R.id.assistant_role_button);
- mNavButtonDefaultAppIconForRoleWithDisabled = mTestView
- .findViewById(R.id.assistant_role_disabled_button);
- mAppIcon = mContext.getDrawable(R.drawable.car_ic_apps);
- when(mApplicationInfo.loadIcon(any())).thenReturn(mAppIcon);
- doThrow(new PackageManager.NameNotFoundException()).when(mPackageManager)
- .getApplicationInfo(any(), anyInt());
- doReturn(mApplicationInfo).when(mPackageManager)
- .getApplicationInfo(eq(TEST_VALID_PACKAGE_NAME), anyInt());
- when(mDeviceProvisionedController
- .getCurrentUser())
- .thenReturn(TEST_CURRENT_USER.getIdentifier());
- mControllerUnderTest = new ButtonRoleHolderController(mContext,
- mPackageManager, mRoleManager, mDeviceProvisionedController);
- }
-
- @Test
- public void addAllButtonsWithRoleName_roleAssigned_appIconEnabled_useAssignedAppIcon() {
- when(mRoleManager.getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(List.of(TEST_VALID_PACKAGE_NAME));
-
- mControllerUnderTest.addAllButtonsWithRoleName(mTestView);
-
- assertThat(mNavButtonDefaultAppIconForRoleWithEnabled.getAppIcon()).isEqualTo(mAppIcon);
- }
-
- @Test
- public void addAllButtonsWithRoleName_roleUnassigned_appIconEnabled_useDefaultIcon() {
- when(mRoleManager.getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(null);
-
- mControllerUnderTest.addAllButtonsWithRoleName(mTestView);
-
- assertThat(mNavButtonDefaultAppIconForRoleWithEnabled.getAppIcon()).isNull();
- }
-
- @Test
- public void onRoleChanged_currentUser_appIconEnabled_useAssignedAppIcon() {
- when(mRoleManager.getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(null);
- mControllerUnderTest.addAllButtonsWithRoleName(mTestView);
- when(mRoleManager
- .getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(List.of(TEST_VALID_PACKAGE_NAME));
-
- mControllerUnderTest.onRoleChanged(RoleManager.ROLE_ASSISTANT, TEST_CURRENT_USER);
-
- assertThat(mNavButtonDefaultAppIconForRoleWithEnabled.getAppIcon()).isEqualTo(mAppIcon);
- }
-
- @Test
- public void onRoleChanged_nonCurrentUser_appIconEnabled_iconIsNotUpdated() {
- when(mRoleManager
- .getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(null);
- mControllerUnderTest.addAllButtonsWithRoleName(mTestView);
- Drawable beforeIcon = mNavButtonDefaultAppIconForRoleWithEnabled.getAppIcon();
- when(mRoleManager
- .getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(List.of(TEST_VALID_PACKAGE_NAME));
-
- mControllerUnderTest.onRoleChanged(RoleManager.ROLE_ASSISTANT, TEST_NON_CURRENT_USER);
-
- Drawable afterIcon = mNavButtonDefaultAppIconForRoleWithEnabled.getAppIcon();
- assertThat(afterIcon).isEqualTo(beforeIcon);
- }
-
- @Test
- public void onRoleChanged_invalidPackage_useDefaultIcon() {
- when(mRoleManager
- .getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(List.of(TEST_INVALID_PACKAGE_NAME));
-
- mControllerUnderTest.addAllButtonsWithRoleName(mTestView);
-
- assertThat(mNavButtonDefaultAppIconForRoleWithEnabled.getAppIcon()).isNull();
- }
-
- @Test
- public void addAllButtonsWithRoleName_appIconDisabled_useDefaultIcon() {
- when(mRoleManager
- .getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(List.of(TEST_VALID_PACKAGE_NAME));
-
- mControllerUnderTest.addAllButtonsWithRoleName(mTestView);
-
- assertThat(mNavButtonDefaultAppIconForRoleWithDisabled.getAppIcon()).isNull();
- }
-
- @Test
- public void onRoleChanged_roleAssigned_appIconDisabled_useDefaultIcon() {
- when(mRoleManager
- .getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(null);
- mControllerUnderTest.addAllButtonsWithRoleName(mTestView);
- assertThat(mNavButtonDefaultAppIconForRoleWithDisabled.getAppIcon()).isNull();
- when(mRoleManager
- .getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any()))
- .thenReturn(List.of(TEST_VALID_PACKAGE_NAME));
-
- mControllerUnderTest.onRoleChanged(RoleManager.ROLE_ASSISTANT, TEST_CURRENT_USER);
-
- assertThat(mNavButtonDefaultAppIconForRoleWithDisabled.getAppIcon()).isNull();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java
deleted file mode 100644
index bd017cd2835b..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/ButtonSelectionStateControllerTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.app.ActivityTaskManager.RootTaskInfo;
-import android.content.ComponentName;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.widget.LinearLayout;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.tests.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class ButtonSelectionStateControllerTest extends SysuiTestCase {
-
- private static final String TEST_COMPONENT_NAME_PACKAGE = "com.android.car.carlauncher";
- private static final String TEST_COMPONENT_NAME_CLASS = ".CarLauncher";
- private static final String TEST_CATEGORY = "com.google.android.apps.maps";
- private static final String TEST_CATEGORY_CLASS = ".APP_MAPS";
- private static final String TEST_PACKAGE = "com.android.car.dialer";
- private static final String TEST_PACKAGE_CLASS = ".Dialer";
-
- // LinearLayout with CarNavigationButtons with different configurations.
- private LinearLayout mTestView;
- private ButtonSelectionStateController mButtonSelectionStateController;
- private ComponentName mComponentName;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
-
- mTestView = (LinearLayout) LayoutInflater.from(mContext).inflate(
- R.layout.car_button_selection_state_controller_test, /* root= */ null);
- mButtonSelectionStateController = new ButtonSelectionStateController(mContext);
- mButtonSelectionStateController.addAllButtonsWithSelectionState(mTestView);
- }
-
- @Test
- public void onTaskChanged_buttonDetectableByComponentName_selectsAssociatedButton() {
- CarNavigationButton testButton = mTestView.findViewById(R.id.detectable_by_component_name);
- mComponentName = new ComponentName(TEST_COMPONENT_NAME_PACKAGE, TEST_COMPONENT_NAME_CLASS);
- List<RootTaskInfo> testStack = createTestStack(mComponentName);
- testButton.setSelected(false);
- mButtonSelectionStateController.taskChanged(testStack, /* validDisplay= */ -1);
-
- assertbuttonSelected(testButton);
- }
-
- @Test
- public void onTaskChanged_buttonDetectableByCategory_selectsAssociatedButton() {
- CarNavigationButton testButton = mTestView.findViewById(R.id.detectable_by_category);
- mComponentName = new ComponentName(TEST_CATEGORY, TEST_CATEGORY_CLASS);
- List<RootTaskInfo> testStack = createTestStack(mComponentName);
- testButton.setSelected(false);
- mButtonSelectionStateController.taskChanged(testStack, /* validDisplay= */ -1);
-
- assertbuttonSelected(testButton);
- }
-
- @Test
- public void onTaskChanged_buttonDetectableByPackage_selectsAssociatedButton() {
- CarNavigationButton testButton = mTestView.findViewById(R.id.detectable_by_package);
- mComponentName = new ComponentName(TEST_PACKAGE, TEST_PACKAGE_CLASS);
- List<RootTaskInfo> testStack = createTestStack(mComponentName);
- testButton.setSelected(false);
- mButtonSelectionStateController.taskChanged(testStack, /* validDisplay= */ -1);
-
- assertbuttonSelected(testButton);
- }
-
- @Test
- public void onTaskChanged_deselectsPreviouslySelectedButton() {
- CarNavigationButton oldButton = mTestView.findViewById(R.id.detectable_by_component_name);
- mComponentName = new ComponentName(TEST_COMPONENT_NAME_PACKAGE, TEST_COMPONENT_NAME_CLASS);
- List<RootTaskInfo> oldStack = createTestStack(mComponentName);
- oldButton.setSelected(false);
- mButtonSelectionStateController.taskChanged(oldStack, /* validDisplay= */ -1);
-
- mComponentName = new ComponentName(TEST_PACKAGE, TEST_PACKAGE_CLASS);
- List<RootTaskInfo> newStack = createTestStack(mComponentName);
- mButtonSelectionStateController.taskChanged(newStack, /* validDisplay= */ -1);
-
- assertButtonUnselected(oldButton);
- }
-
- // Comparing alpha is a valid way to verify button selection state because all test buttons use
- // highlightWhenSelected = true.
- private void assertbuttonSelected(CarNavigationButton button) {
- assertThat(button.getAlpha()).isEqualTo(CarNavigationButton.DEFAULT_SELECTED_ALPHA);
- }
-
- private void assertButtonUnselected(CarNavigationButton button) {
- assertThat(button.getAlpha()).isEqualTo(CarNavigationButton.DEFAULT_UNSELECTED_ALPHA);
- }
-
- private List<RootTaskInfo> createTestStack(ComponentName componentName) {
- RootTaskInfo validStackInfo = new RootTaskInfo();
- validStackInfo.displayId = -1; // No display is assigned to this test view
- validStackInfo.topActivity = componentName;
-
- List<RootTaskInfo> testStack = new ArrayList<>();
- testStack.add(validStackInfo);
-
- return testStack;
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java
deleted file mode 100644
index 5b0bb35ad491..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarControllerTest.java
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.testing.TestableResources;
-import android.view.View;
-import android.view.ViewGroup;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.car.hvac.HvacController;
-import com.android.systemui.car.statusbar.UserNameViewController;
-import com.android.systemui.plugins.DarkIconDispatcher;
-import com.android.systemui.statusbar.phone.StatusBarIconController;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class CarNavigationBarControllerTest extends SysuiTestCase {
-
- private static final String TOP_NOTIFICATION_PANEL =
- "com.android.systemui.car.notification.TopNotificationPanelViewMediator";
- private static final String BOTTOM_NOTIFICATION_PANEL =
- "com.android.systemui.car.notification.BottomNotificationPanelViewMediator";
- private CarNavigationBarController mCarNavigationBar;
- private NavigationBarViewFactory mNavigationBarViewFactory;
- private TestableResources mTestableResources;
-
- @Mock
- private ButtonSelectionStateController mButtonSelectionStateController;
- @Mock
- private ButtonRoleHolderController mButtonRoleHolderController;
- @Mock
- private HvacController mHvacController;
- @Mock
- private UserNameViewController mUserNameViewController;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- mNavigationBarViewFactory = new NavigationBarViewFactory(mContext);
- mTestableResources = mContext.getOrCreateTestableResources();
-
- // Needed to inflate top navigation bar.
- mDependency.injectMockDependency(DarkIconDispatcher.class);
- mDependency.injectMockDependency(StatusBarIconController.class);
- }
-
- private CarNavigationBarController createNavigationBarController() {
- return new CarNavigationBarController(mContext, mNavigationBarViewFactory,
- mButtonSelectionStateController, () -> mHvacController,
- () -> mUserNameViewController, mButtonRoleHolderController,
- new SystemBarConfigs(mTestableResources.getResources()));
- }
-
- @Test
- public void testConnectToHvac_callsConnect() {
- mCarNavigationBar = createNavigationBarController();
-
- mCarNavigationBar.connectToHvac();
-
- verify(mHvacController).connectToCarService();
- }
-
- @Test
- public void testRemoveAll_callsHvacControllerRemoveAllComponents() {
- mCarNavigationBar = createNavigationBarController();
-
- mCarNavigationBar.removeAll();
-
- verify(mHvacController).removeAllComponents();
- }
-
-
- @Test
- public void testRemoveAll_callsButtonRoleHolderControllerRemoveAll() {
- mCarNavigationBar = createNavigationBarController();
-
- mCarNavigationBar.removeAll();
-
- verify(mButtonRoleHolderController).removeAll();
- }
-
- @Test
- public void testRemoveAll_callsButtonSelectionStateControllerRemoveAll() {
- mCarNavigationBar = createNavigationBarController();
-
- mCarNavigationBar.removeAll();
-
- verify(mButtonSelectionStateController).removeAll();
- }
-
- @Test
- public void testGetTopWindow_topDisabled_returnsNull() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, false);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- // If Top Notification Panel is used but top navigation bar is not enabled, SystemUI is
- // expected to crash.
- mTestableResources.addOverride(R.string.config_notificationPanelViewMediator,
- BOTTOM_NOTIFICATION_PANEL);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getTopWindow();
-
- assertThat(window).isNull();
- }
-
- @Test
- public void testGetTopWindow_topEnabled_returnsWindow() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getTopWindow();
-
- assertThat(window).isNotNull();
- }
-
- @Test
- public void testGetTopWindow_topEnabled_calledTwice_returnsSameWindow() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window1 = mCarNavigationBar.getTopWindow();
- ViewGroup window2 = mCarNavigationBar.getTopWindow();
-
- assertThat(window1).isEqualTo(window2);
- }
-
- @Test
- public void testGetBottomWindow_bottomDisabled_returnsNull() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, false);
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- // If Bottom Notification Panel is used but bottom navigation bar is not enabled,
- // SystemUI is expected to crash.
- mTestableResources.addOverride(R.string.config_notificationPanelViewMediator,
- TOP_NOTIFICATION_PANEL);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getBottomWindow();
-
- assertThat(window).isNull();
- }
-
- @Test
- public void testGetBottomWindow_bottomEnabled_returnsWindow() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getBottomWindow();
-
- assertThat(window).isNotNull();
- }
-
- @Test
- public void testGetBottomWindow_bottomEnabled_calledTwice_returnsSameWindow() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window1 = mCarNavigationBar.getBottomWindow();
- ViewGroup window2 = mCarNavigationBar.getBottomWindow();
-
- assertThat(window1).isEqualTo(window2);
- }
-
- @Test
- public void testGetLeftWindow_leftDisabled_returnsNull() {
- mTestableResources.addOverride(R.bool.config_enableLeftNavigationBar, false);
- mCarNavigationBar = createNavigationBarController();
- ViewGroup window = mCarNavigationBar.getLeftWindow();
- assertThat(window).isNull();
- }
-
- @Test
- public void testGetLeftWindow_leftEnabled_returnsWindow() {
- mTestableResources.addOverride(R.bool.config_enableLeftNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getLeftWindow();
-
- assertThat(window).isNotNull();
- }
-
- @Test
- public void testGetLeftWindow_leftEnabled_calledTwice_returnsSameWindow() {
- mTestableResources.addOverride(R.bool.config_enableLeftNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window1 = mCarNavigationBar.getLeftWindow();
- ViewGroup window2 = mCarNavigationBar.getLeftWindow();
-
- assertThat(window1).isEqualTo(window2);
- }
-
- @Test
- public void testGetRightWindow_rightDisabled_returnsNull() {
- mTestableResources.addOverride(R.bool.config_enableRightNavigationBar, false);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getRightWindow();
-
- assertThat(window).isNull();
- }
-
- @Test
- public void testGetRightWindow_rightEnabled_returnsWindow() {
- mTestableResources.addOverride(R.bool.config_enableRightNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getRightWindow();
-
- assertThat(window).isNotNull();
- }
-
- @Test
- public void testGetRightWindow_rightEnabled_calledTwice_returnsSameWindow() {
- mTestableResources.addOverride(R.bool.config_enableRightNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window1 = mCarNavigationBar.getRightWindow();
- ViewGroup window2 = mCarNavigationBar.getRightWindow();
-
- assertThat(window1).isEqualTo(window2);
- }
-
- @Test
- public void testSetTopWindowVisibility_setTrue_isVisible() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getTopWindow();
- mCarNavigationBar.setTopWindowVisibility(View.VISIBLE);
-
- assertThat(window.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void testSetTopWindowVisibility_setFalse_isGone() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getTopWindow();
- mCarNavigationBar.setTopWindowVisibility(View.GONE);
-
- assertThat(window.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void testSetBottomWindowVisibility_setTrue_isVisible() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getBottomWindow();
- mCarNavigationBar.setBottomWindowVisibility(View.VISIBLE);
-
- assertThat(window.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void testSetBottomWindowVisibility_setFalse_isGone() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getBottomWindow();
- mCarNavigationBar.setBottomWindowVisibility(View.GONE);
-
- assertThat(window.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void testSetLeftWindowVisibility_setTrue_isVisible() {
- mTestableResources.addOverride(R.bool.config_enableLeftNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getLeftWindow();
- mCarNavigationBar.setLeftWindowVisibility(View.VISIBLE);
-
- assertThat(window.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void testSetLeftWindowVisibility_setFalse_isGone() {
- mTestableResources.addOverride(R.bool.config_enableLeftNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getLeftWindow();
- mCarNavigationBar.setLeftWindowVisibility(View.GONE);
-
- assertThat(window.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void testSetRightWindowVisibility_setTrue_isVisible() {
- mTestableResources.addOverride(R.bool.config_enableRightNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getRightWindow();
- mCarNavigationBar.setRightWindowVisibility(View.VISIBLE);
-
- assertThat(window.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void testSetRightWindowVisibility_setFalse_isGone() {
- mTestableResources.addOverride(R.bool.config_enableRightNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- ViewGroup window = mCarNavigationBar.getRightWindow();
- mCarNavigationBar.setRightWindowVisibility(View.GONE);
-
- assertThat(window.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void testRegisterBottomBarTouchListener_createViewFirst_registrationSuccessful() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- View.OnTouchListener controller = bottomBar.getStatusBarWindowTouchListener();
- assertThat(controller).isNull();
- mCarNavigationBar.registerBottomBarTouchListener(mock(View.OnTouchListener.class));
- controller = bottomBar.getStatusBarWindowTouchListener();
-
- assertThat(controller).isNotNull();
- }
-
- @Test
- public void testRegisterBottomBarTouchListener_registerFirst_registrationSuccessful() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- mCarNavigationBar.registerBottomBarTouchListener(mock(View.OnTouchListener.class));
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- View.OnTouchListener controller = bottomBar.getStatusBarWindowTouchListener();
-
- assertThat(controller).isNotNull();
- }
-
- @Test
- public void testRegisterNotificationController_createViewFirst_registrationSuccessful() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- CarNavigationBarController.NotificationsShadeController controller =
- bottomBar.getNotificationsPanelController();
- assertThat(controller).isNull();
- mCarNavigationBar.registerNotificationController(
- mock(CarNavigationBarController.NotificationsShadeController.class));
- controller = bottomBar.getNotificationsPanelController();
-
- assertThat(controller).isNotNull();
- }
-
- @Test
- public void testRegisterNotificationController_registerFirst_registrationSuccessful() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
-
- mCarNavigationBar.registerNotificationController(
- mock(CarNavigationBarController.NotificationsShadeController.class));
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- CarNavigationBarController.NotificationsShadeController controller =
- bottomBar.getNotificationsPanelController();
-
- assertThat(controller).isNotNull();
- }
-
- @Test
- public void testShowAllKeyguardButtons_bottomEnabled_bottomKeyguardButtonsVisible() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- View bottomKeyguardButtons = bottomBar.findViewById(R.id.lock_screen_nav_buttons);
-
- mCarNavigationBar.showAllKeyguardButtons(/* isSetUp= */ true);
-
- assertThat(bottomKeyguardButtons.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void testShowAllKeyguardButtons_bottomEnabled_bottomNavButtonsGone() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- View bottomButtons = bottomBar.findViewById(R.id.nav_buttons);
-
- mCarNavigationBar.showAllKeyguardButtons(/* isSetUp= */ true);
-
- assertThat(bottomButtons.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void testHideAllKeyguardButtons_bottomEnabled_bottomKeyguardButtonsGone() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- View bottomKeyguardButtons = bottomBar.findViewById(R.id.lock_screen_nav_buttons);
-
- mCarNavigationBar.showAllKeyguardButtons(/* isSetUp= */ true);
- assertThat(bottomKeyguardButtons.getVisibility()).isEqualTo(View.VISIBLE);
- mCarNavigationBar.hideAllKeyguardButtons(/* isSetUp= */ true);
-
- assertThat(bottomKeyguardButtons.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void testHideAllKeyguardButtons_bottomEnabled_bottomNavButtonsVisible() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- View bottomButtons = bottomBar.findViewById(R.id.nav_buttons);
-
- mCarNavigationBar.showAllKeyguardButtons(/* isSetUp= */ true);
- assertThat(bottomButtons.getVisibility()).isEqualTo(View.GONE);
- mCarNavigationBar.hideAllKeyguardButtons(/* isSetUp= */ true);
-
- assertThat(bottomButtons.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void testToggleAllNotificationsUnseenIndicator_bottomEnabled_hasUnseen_setCorrectly() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- CarNavigationButton notifications = bottomBar.findViewById(R.id.notifications);
-
- boolean hasUnseen = true;
- mCarNavigationBar.toggleAllNotificationsUnseenIndicator(/* isSetUp= */ true,
- hasUnseen);
-
- assertThat(notifications.getUnseen()).isTrue();
- }
-
- @Test
- public void testToggleAllNotificationsUnseenIndicator_bottomEnabled_noUnseen_setCorrectly() {
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- mCarNavigationBar = createNavigationBarController();
- CarNavigationBarView bottomBar = mCarNavigationBar.getBottomBar(/* isSetUp= */ true);
- CarNavigationButton notifications = bottomBar.findViewById(R.id.notifications);
-
- boolean hasUnseen = false;
- mCarNavigationBar.toggleAllNotificationsUnseenIndicator(/* isSetUp= */ true,
- hasUnseen);
-
- assertThat(notifications.getUnseen()).isFalse();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java
deleted file mode 100644
index 2b5af71dccaa..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarTest.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
-import static android.view.InsetsState.ITYPE_STATUS_BAR;
-import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS;
-import static android.view.WindowInsetsController.APPEARANCE_OPAQUE_STATUS_BARS;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.graphics.Rect;
-import android.os.Handler;
-import android.os.RemoteException;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.testing.TestableResources;
-import android.util.ArrayMap;
-import android.view.Display;
-import android.view.WindowManager;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.internal.statusbar.IStatusBarService;
-import com.android.internal.statusbar.RegisterStatusBarResult;
-import com.android.internal.view.AppearanceRegion;
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.phone.AutoHideController;
-import com.android.systemui.statusbar.phone.LightBarController;
-import com.android.systemui.statusbar.phone.LightBarTransitionsController;
-import com.android.systemui.statusbar.phone.PhoneStatusBarPolicy;
-import com.android.systemui.statusbar.phone.StatusBarIconController;
-import com.android.systemui.statusbar.phone.SysuiDarkIconDispatcher;
-import com.android.systemui.statusbar.policy.KeyguardStateController;
-import com.android.systemui.util.concurrency.FakeExecutor;
-import com.android.systemui.util.time.FakeSystemClock;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class CarNavigationBarTest extends SysuiTestCase {
-
- private CarNavigationBar mCarNavigationBar;
- private TestableResources mTestableResources;
- private Handler mHandler;
-
- @Mock
- private CarNavigationBarController mCarNavigationBarController;
- @Mock
- private LightBarController mLightBarController;
- @Mock
- private SysuiDarkIconDispatcher mStatusBarIconController;
- @Mock
- private LightBarTransitionsController mLightBarTransitionsController;
- @Mock
- private WindowManager mWindowManager;
- @Mock
- private CarDeviceProvisionedController mDeviceProvisionedController;
- @Mock
- private AutoHideController mAutoHideController;
- @Mock
- private ButtonSelectionStateListener mButtonSelectionStateListener;
- @Mock
- private ButtonRoleHolderController mButtonRoleHolderController;
- @Mock
- private IStatusBarService mBarService;
- @Mock
- private KeyguardStateController mKeyguardStateController;
- @Mock
- private ButtonSelectionStateController mButtonSelectionStateController;
- @Mock
- private PhoneStatusBarPolicy mIconPolicy;
- @Mock
- private StatusBarIconController mIconController;
-
- private RegisterStatusBarResult mBarResult;
- private AppearanceRegion[] mAppearanceRegions;
- private FakeExecutor mUiBgExecutor;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- mTestableResources = mContext.getOrCreateTestableResources();
- mHandler = Handler.getMain();
- mUiBgExecutor = new FakeExecutor(new FakeSystemClock());
- when(mStatusBarIconController.getTransitionsController()).thenReturn(
- mLightBarTransitionsController);
- mAppearanceRegions = new AppearanceRegion[] {
- new AppearanceRegion(APPEARANCE_LIGHT_STATUS_BARS, new Rect())
- };
- mBarResult = new RegisterStatusBarResult(
- /* icons= */ new ArrayMap<>(),
- /* disabledFlags1= */ 0,
- /* appearance= */ 0,
- mAppearanceRegions,
- /* imeWindowVis= */ 0,
- /* imeBackDisposition= */ 0,
- /* showImeSwitcher= */ false,
- /* disabledFlags2= */ 0,
- /* imeToken= */ null,
- /* navbarColorMangedByIme= */ false,
- /* appFullscreen= */ false,
- /* appImmersive= */ false,
- /* transientBarTypes= */ new int[]{});
- try {
- when(mBarService.registerStatusBar(any())).thenReturn(mBarResult);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- mCarNavigationBar = new CarNavigationBar(mContext, mTestableResources.getResources(),
- mCarNavigationBarController, mLightBarController, mStatusBarIconController,
- mWindowManager, mDeviceProvisionedController, new CommandQueue(mContext),
- mAutoHideController, mButtonSelectionStateListener, mHandler, mUiBgExecutor,
- mBarService, () -> mKeyguardStateController, () -> mIconPolicy,
- () -> mIconController, new SystemBarConfigs(mTestableResources.getResources()));
- }
-
- @Test
- public void restartNavbars_refreshesTaskChanged() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- ArgumentCaptor<CarDeviceProvisionedController.DeviceProvisionedListener>
- deviceProvisionedCallbackCaptor = ArgumentCaptor.forClass(
- CarDeviceProvisionedController.DeviceProvisionedListener.class);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
- // switching the currentUserSetup value to force restart the navbars.
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(false);
- verify(mDeviceProvisionedController).addCallback(deviceProvisionedCallbackCaptor.capture());
-
- deviceProvisionedCallbackCaptor.getValue().onUserSwitched();
- waitForIdleSync(mHandler);
-
- verify(mButtonSelectionStateListener).onTaskStackChanged();
- }
-
- @Test
- public void restartNavBars_newUserNotSetupWithKeyguardShowing_showsKeyguardButtons() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- ArgumentCaptor<CarDeviceProvisionedController.DeviceProvisionedListener>
- deviceProvisionedCallbackCaptor = ArgumentCaptor.forClass(
- CarDeviceProvisionedController.DeviceProvisionedListener.class);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
- when(mKeyguardStateController.isShowing()).thenReturn(true);
- // switching the currentUserSetup value to force restart the navbars.
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(false);
- verify(mDeviceProvisionedController).addCallback(deviceProvisionedCallbackCaptor.capture());
-
- deviceProvisionedCallbackCaptor.getValue().onUserSwitched();
- waitForIdleSync(mHandler);
-
- verify(mCarNavigationBarController).showAllKeyguardButtons(false);
- }
-
- @Test
- public void restartNavbars_newUserIsSetupWithKeyguardHidden_hidesKeyguardButtons() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- ArgumentCaptor<CarDeviceProvisionedController.DeviceProvisionedListener>
- deviceProvisionedCallbackCaptor = ArgumentCaptor.forClass(
- CarDeviceProvisionedController.DeviceProvisionedListener.class);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
- when(mKeyguardStateController.isShowing()).thenReturn(true);
- // switching the currentUserSetup value to force restart the navbars.
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(false);
- verify(mDeviceProvisionedController).addCallback(deviceProvisionedCallbackCaptor.capture());
- deviceProvisionedCallbackCaptor.getValue().onUserSwitched();
- waitForIdleSync(mHandler);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- when(mKeyguardStateController.isShowing()).thenReturn(false);
-
- deviceProvisionedCallbackCaptor.getValue().onUserSetupChanged();
- waitForIdleSync(mHandler);
-
- verify(mCarNavigationBarController).hideAllKeyguardButtons(true);
- }
-
- @Test
- public void restartNavBars_lightAppearance_darkensAllIcons() {
- mAppearanceRegions[0] = new AppearanceRegion(APPEARANCE_LIGHT_STATUS_BARS, new Rect());
-
- mCarNavigationBar.start();
-
- verify(mLightBarTransitionsController).setIconsDark(
- /* dark= */ true, /* animate= */ false);
- }
-
- @Test
- public void restartNavBars_opaqueAppearance_lightensAllIcons() {
- mAppearanceRegions[0] = new AppearanceRegion(APPEARANCE_OPAQUE_STATUS_BARS, new Rect());
-
- mCarNavigationBar.start();
-
- verify(mLightBarTransitionsController).setIconsDark(
- /* dark= */ false, /* animate= */ false);
- }
-
- @Test
- public void showTransient_wrongDisplayId_transientModeNotUpdated() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
-
- int randomDisplay = Display.DEFAULT_DISPLAY + 10;
- int[] insetTypes = new int[]{};
- mCarNavigationBar.showTransient(randomDisplay, insetTypes);
-
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isFalse();
- }
-
- @Test
- public void showTransient_correctDisplayId_noStatusBarInset_transientModeNotUpdated() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
-
- int[] insetTypes = new int[]{};
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY, insetTypes);
-
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isFalse();
- }
-
- @Test
- public void showTransient_correctDisplayId_statusBarInset_transientModeUpdated() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
-
- int[] insetTypes = new int[]{ITYPE_STATUS_BAR};
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY, insetTypes);
-
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isTrue();
- }
-
- @Test
- public void showTransient_correctDisplayId_noNavBarInset_transientModeNotUpdated() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
-
- int[] insetTypes = new int[]{};
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY, insetTypes);
-
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isFalse();
- }
-
- @Test
- public void showTransient_correctDisplayId_navBarInset_transientModeUpdated() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
-
- int[] insetTypes = new int[]{ITYPE_NAVIGATION_BAR};
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY, insetTypes);
-
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isTrue();
- }
-
- @Test
- public void abortTransient_wrongDisplayId_transientModeNotCleared() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY,
- new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isTrue();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isTrue();
-
- int[] insetTypes = new int[]{};
- int randomDisplay = Display.DEFAULT_DISPLAY + 10;
- mCarNavigationBar.abortTransient(randomDisplay, insetTypes);
-
- // The transient booleans were not cleared.
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isTrue();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isTrue();
- }
-
- @Test
- public void abortTransient_correctDisplayId_noInsets_transientModeNotCleared() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY,
- new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isTrue();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isTrue();
-
- int[] insetTypes = new int[]{};
- mCarNavigationBar.abortTransient(Display.DEFAULT_DISPLAY, insetTypes);
-
- // The transient booleans were not cleared.
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isTrue();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isTrue();
- }
-
- @Test
- public void abortTransient_correctDisplayId_statusBarInset_transientModeCleared() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY,
- new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isTrue();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isTrue();
-
- int[] insetTypes = new int[]{ITYPE_STATUS_BAR};
- mCarNavigationBar.abortTransient(Display.DEFAULT_DISPLAY, insetTypes);
-
- // The transient booleans were cleared.
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isFalse();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isFalse();
- }
-
- @Test
- public void abortTransient_correctDisplayId_navBarInset_transientModeCleared() {
- mTestableResources.addOverride(R.bool.config_enableTopNavigationBar, true);
- mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
- when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
- mCarNavigationBar.start();
- mCarNavigationBar.showTransient(Display.DEFAULT_DISPLAY,
- new int[]{ITYPE_STATUS_BAR, ITYPE_NAVIGATION_BAR});
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isTrue();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isTrue();
-
- int[] insetTypes = new int[]{ITYPE_NAVIGATION_BAR};
- mCarNavigationBar.abortTransient(Display.DEFAULT_DISPLAY, insetTypes);
-
- // The transient booleans were cleared.
- assertThat(mCarNavigationBar.isStatusBarTransientShown()).isFalse();
- assertThat(mCarNavigationBar.isNavBarTransientShown()).isFalse();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java
deleted file mode 100644
index 47fd8201d197..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationBarViewTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.when;
-
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class CarNavigationBarViewTest extends SysuiTestCase {
-
- private CarNavigationBarView mNavBarView;
-
- @Mock
- private CarNavigationBarController.NotificationsShadeController mNotificationsShadeController;
-
- @Mock
- private View.OnTouchListener mNavBarTouchListener;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- }
-
- @After
- public void tearDown() {
- getContext().getOrCreateTestableResources().addOverride(
- R.bool.config_consumeNavigationBarTouchWhenNotificationPanelOpen, false);
- }
-
- @Test
- public void dispatchTouch_shadeOpen_flagOff_doesNotConsumeTouch() {
- getContext().getOrCreateTestableResources().addOverride(
- R.bool.config_consumeNavigationBarTouchWhenNotificationPanelOpen, false);
- when(mNotificationsShadeController.isNotificationPanelOpen()).thenReturn(true);
- mNavBarView = (CarNavigationBarView) LayoutInflater.from(getContext()).inflate(
- R.layout.car_navigation_bar_view_test, /* root= */ null);
- mNavBarView.setNotificationsPanelController(mNotificationsShadeController);
- mNavBarView.setStatusBarWindowTouchListener(mNavBarTouchListener);
-
- boolean consume = mNavBarView.onInterceptTouchEvent(
- MotionEvent.obtain(/* downTime= */ 200, /* eventTime= */ 300,
- MotionEvent.ACTION_MOVE, mNavBarView.getX(),
- mNavBarView.getY(), /* metaState= */ 0));
-
- assertThat(consume).isFalse();
- }
-
- @Test
- public void dispatchTouch_shadeOpen_flagOn_consumesTouch() {
- getContext().getOrCreateTestableResources().addOverride(
- R.bool.config_consumeNavigationBarTouchWhenNotificationPanelOpen, true);
- when(mNotificationsShadeController.isNotificationPanelOpen()).thenReturn(true);
- mNavBarView = (CarNavigationBarView) LayoutInflater.from(getContext()).inflate(
- R.layout.car_navigation_bar_view_test, /* root= */ null);
- mNavBarView.setNotificationsPanelController(mNotificationsShadeController);
- mNavBarView.setStatusBarWindowTouchListener(mNavBarTouchListener);
-
- boolean consume = mNavBarView.onInterceptTouchEvent(
- MotionEvent.obtain(/* downTime= */ 200, /* eventTime= */ 300,
- MotionEvent.ACTION_MOVE, mNavBarView.getX(),
- mNavBarView.getY(), /* metaState= */ 0));
-
- assertThat(consume).isTrue();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java
deleted file mode 100644
index 173f5487c728..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/CarNavigationButtonTest.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.argThat;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-
-import android.app.ActivityManager;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Drawable;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.statusbar.AlphaOptimizedImageView;
-import com.android.systemui.tests.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentMatcher;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class CarNavigationButtonTest extends SysuiTestCase {
-
- private static final String DEFAULT_BUTTON_ACTIVITY_NAME =
- "com.android.car.carlauncher/.CarLauncher";
- private static final String APP_GRID_BUTTON_ACTIVITY_NAME =
- "com.android.car.carlauncher/.AppGridActivity";
- private static final String BROADCAST_ACTION_NAME =
- "android.car.intent.action.TOGGLE_HVAC_CONTROLS";
-
- private ActivityManager mActivityManager;
- // LinearLayout with CarNavigationButtons with different configurations.
- private LinearLayout mTestView;
- // Does not have any selection state which is the default configuration.
- private CarNavigationButton mDefaultButton;
-
- @Before
- public void setUp() {
- mContext = spy(mContext);
- mTestView = (LinearLayout) LayoutInflater.from(mContext).inflate(
- R.layout.car_navigation_button_test, /* root= */ null);
- mDefaultButton = mTestView.findViewById(R.id.default_no_selection_state);
- mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
- }
-
- @Test
- public void onCreate_iconIsVisible() {
- AlphaOptimizedImageView icon = mDefaultButton.findViewById(
- R.id.car_nav_button_icon_image);
-
- assertThat(icon.getDrawable()).isNotNull();
- }
-
- @Test
- public void onSelected_selectedIconDefined_togglesIcon() {
- mDefaultButton.setSelected(true);
- Drawable selectedIconDrawable = ((AlphaOptimizedImageView) mDefaultButton.findViewById(
- R.id.car_nav_button_icon_image)).getDrawable();
-
-
- mDefaultButton.setSelected(false);
- Drawable unselectedIconDrawable = ((AlphaOptimizedImageView) mDefaultButton.findViewById(
- R.id.car_nav_button_icon_image)).getDrawable();
-
- assertThat(selectedIconDrawable).isNotEqualTo(unselectedIconDrawable);
- }
-
- @Test
- public void onSelected_selectedIconUndefined_displaysSameIcon() {
- CarNavigationButton selectedIconUndefinedButton = mTestView.findViewById(
- R.id.selected_icon_undefined);
-
- selectedIconUndefinedButton.setSelected(true);
- Drawable selectedIconDrawable = ((AlphaOptimizedImageView) mDefaultButton.findViewById(
- R.id.car_nav_button_icon_image)).getDrawable();
-
-
- selectedIconUndefinedButton.setSelected(false);
- Drawable unselectedIconDrawable = ((AlphaOptimizedImageView) mDefaultButton.findViewById(
- R.id.car_nav_button_icon_image)).getDrawable();
-
- assertThat(selectedIconDrawable).isEqualTo(unselectedIconDrawable);
- }
-
- @Test
- public void onUnselected_doesNotHighlightWhenSelected_applySelectedAlpha() {
- mDefaultButton.setSelected(false);
-
- assertThat(mDefaultButton.getAlpha()).isEqualTo(
- CarNavigationButton.DEFAULT_SELECTED_ALPHA);
- }
-
- @Test
- public void onSelected_doesNotHighlightWhenSelected_applySelectedAlpha() {
- mDefaultButton.setSelected(true);
-
- assertThat(mDefaultButton.getAlpha()).isEqualTo(
- CarNavigationButton.DEFAULT_SELECTED_ALPHA);
- }
-
- @Test
- public void onUnselected_highlightWhenSelected_applyDefaultUnselectedAlpha() {
- CarNavigationButton highlightWhenSelectedButton = mTestView.findViewById(
- R.id.highlightable_no_more_button);
- highlightWhenSelectedButton.setSelected(false);
-
- assertThat(highlightWhenSelectedButton.getAlpha()).isEqualTo(
- CarNavigationButton.DEFAULT_UNSELECTED_ALPHA);
- }
-
- @Test
- public void onSelected_highlightWhenSelected_applyDefaultSelectedAlpha() {
- CarNavigationButton highlightWhenSelectedButton = mTestView.findViewById(
- R.id.highlightable_no_more_button);
- highlightWhenSelectedButton.setSelected(true);
-
- assertThat(highlightWhenSelectedButton.getAlpha()).isEqualTo(
- CarNavigationButton.DEFAULT_SELECTED_ALPHA);
- }
-
- @Test
- public void onSelected_doesNotShowMoreWhenSelected_doesNotShowMoreIcon() {
- mDefaultButton.setSelected(true);
- AlphaOptimizedImageView moreIcon = mDefaultButton.findViewById(
- R.id.car_nav_button_more_icon);
-
- assertThat(moreIcon.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void onSelected_showMoreWhenSelected_showsMoreIcon() {
- CarNavigationButton showMoreWhenSelected = mTestView.findViewById(
- R.id.not_highlightable_more_button);
- showMoreWhenSelected.setSelected(true);
- AlphaOptimizedImageView moreIcon = showMoreWhenSelected.findViewById(
- R.id.car_nav_button_more_icon);
-
- assertThat(moreIcon.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void onUnselected_showMoreWhenSelected_doesNotShowMoreIcon() {
- CarNavigationButton showMoreWhenSelected = mTestView.findViewById(
- R.id.highlightable_no_more_button);
- showMoreWhenSelected.setSelected(true);
- showMoreWhenSelected.setSelected(false);
- AlphaOptimizedImageView moreIcon = showMoreWhenSelected.findViewById(
- R.id.car_nav_button_more_icon);
-
- assertThat(moreIcon.getVisibility()).isEqualTo(View.GONE);
- }
-
- @Test
- public void onUnselected_withAppIcon_showsAppIcon() {
- CarNavigationButton roleBasedButton = mTestView.findViewById(R.id.role_based_button);
- Drawable appIcon = getContext().getDrawable(R.drawable.ic_android);
-
- roleBasedButton.setSelected(false);
- roleBasedButton.setAppIcon(appIcon);
-
- Drawable currentDrawable = ((AlphaOptimizedImageView) roleBasedButton.findViewById(
- R.id.car_nav_button_icon_image)).getDrawable();
-
- assertThat(currentDrawable).isEqualTo(appIcon);
- }
-
- @Test
- public void onUnselected_withAppIcon_applyUnselectedAlpha() {
- CarNavigationButton roleBasedButton = mTestView.findViewById(R.id.role_based_button);
-
- roleBasedButton.setSelected(false);
- roleBasedButton.setAppIcon(getContext().getDrawable(R.drawable.ic_android));
-
- assertThat(roleBasedButton.getAlpha()).isEqualTo(
- CarNavigationButton.DEFAULT_UNSELECTED_ALPHA);
- }
-
- @Test
- public void onSelected_withAppIcon_showsAppIconWithSelectedAlpha() {
- CarNavigationButton roleBasedButton = mTestView.findViewById(R.id.role_based_button);
- Drawable appIcon = getContext().getDrawable(R.drawable.ic_android);
-
- roleBasedButton.setSelected(true);
- roleBasedButton.setAppIcon(appIcon);
-
- Drawable currentDrawable = ((AlphaOptimizedImageView) roleBasedButton.findViewById(
- R.id.car_nav_button_icon_image)).getDrawable();
-
- assertThat(currentDrawable).isEqualTo(appIcon);
- }
-
- @Test
- public void onSelected_withAppIcon_applySelectedAlpha() {
- CarNavigationButton roleBasedButton = mTestView.findViewById(R.id.role_based_button);
-
- roleBasedButton.setSelected(true);
- roleBasedButton.setAppIcon(getContext().getDrawable(R.drawable.ic_android));
-
- assertThat(roleBasedButton.getAlpha()).isEqualTo(
- CarNavigationButton.DEFAULT_SELECTED_ALPHA);
- }
-
- @Test
- public void onClick_launchesIntentActivity() {
- mDefaultButton.performClick();
-
- assertThat(getCurrentActivityName()).isEqualTo(DEFAULT_BUTTON_ACTIVITY_NAME);
-
- CarNavigationButton appGridButton = mTestView.findViewById(R.id.app_grid_activity);
- appGridButton.performClick();
-
- assertThat(getCurrentActivityName()).isEqualTo(APP_GRID_BUTTON_ACTIVITY_NAME);
- }
-
- @Test
- public void onLongClick_longIntentDefined_launchesLongIntentActivity() {
- mDefaultButton.performClick();
-
- assertThat(getCurrentActivityName()).isEqualTo(DEFAULT_BUTTON_ACTIVITY_NAME);
-
- CarNavigationButton appGridButton = mTestView.findViewById(
- R.id.long_click_app_grid_activity);
- appGridButton.performLongClick();
-
- assertThat(getCurrentActivityName()).isEqualTo(APP_GRID_BUTTON_ACTIVITY_NAME);
- }
-
- @Test
- public void onClick_useBroadcast_broadcastsIntent() {
- CarNavigationButton appGridButton = mTestView.findViewById(R.id.broadcast);
- appGridButton.performClick();
-
- verify(mContext).sendBroadcastAsUser(argThat(new ArgumentMatcher<Intent>() {
- @Override
- public boolean matches(Intent argument) {
- return argument.getAction().equals(BROADCAST_ACTION_NAME);
- }
- }), any());
- }
-
- @Test
- public void onSetUnseen_hasUnseen_showsUnseenIndicator() {
- mDefaultButton.setUnseen(true);
- ImageView hasUnseenIndicator = mDefaultButton.findViewById(R.id.car_nav_button_unseen_icon);
-
- assertThat(hasUnseenIndicator.getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void onSetUnseen_doesNotHaveUnseen_hidesUnseenIndicator() {
- mDefaultButton.setUnseen(false);
- ImageView hasUnseenIndicator = mDefaultButton.findViewById(R.id.car_nav_button_unseen_icon);
-
- assertThat(hasUnseenIndicator.getVisibility()).isEqualTo(View.GONE);
- }
-
- private String getCurrentActivityName() {
- return mActivityManager.getRunningTasks(1).get(0).topActivity.flattenToShortString();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/SystemBarConfigsTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/SystemBarConfigsTest.java
deleted file mode 100644
index 0c62f8b4a22b..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/SystemBarConfigsTest.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.navigationbar;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.when;
-
-import android.content.res.Resources;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.util.ArrayMap;
-import android.view.WindowManager;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.car.notification.NotificationPanelViewController;
-import com.android.systemui.car.notification.NotificationPanelViewMediator;
-import com.android.systemui.car.notification.PowerManagerHelper;
-import com.android.systemui.car.notification.TopNotificationPanelViewMediator;
-import com.android.systemui.statusbar.policy.ConfigurationController;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class SystemBarConfigsTest extends SysuiTestCase {
- private static final int SYSTEM_BAR_GIRTH = 100;
-
- private SystemBarConfigs mSystemBarConfigs;
- @Mock
- private Resources mResources;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- setDefaultValidConfig();
- }
-
- @Test
- public void onInit_allSystemBarsEnabled_eachHasUniqueBarTypes_doesNotThrowException() {
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- }
-
- @Test(expected = RuntimeException.class)
- public void onInit_allSystemBarsEnabled_twoBarsHaveDuplicateType_throwsRuntimeException() {
- when(mResources.getInteger(R.integer.config_topSystemBarType)).thenReturn(0);
- when(mResources.getInteger(R.integer.config_bottomSystemBarType)).thenReturn(0);
-
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- }
-
- @Test
- public void onInit_allSystemBarsEnabled_systemBarSidesSortedByZOrder() {
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- List<Integer> actualOrder = mSystemBarConfigs.getSystemBarSidesByZOrder();
- List<Integer> expectedOrder = new ArrayList<>();
- expectedOrder.add(SystemBarConfigs.LEFT);
- expectedOrder.add(SystemBarConfigs.RIGHT);
- expectedOrder.add(SystemBarConfigs.TOP);
- expectedOrder.add(SystemBarConfigs.BOTTOM);
-
- assertTrue(actualOrder.equals(expectedOrder));
- }
-
- @Test(expected = RuntimeException.class)
- public void onInit_intersectingBarsHaveSameZOrder_throwsRuntimeException() {
- when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(33);
- when(mResources.getInteger(R.integer.config_leftSystemBarZOrder)).thenReturn(33);
-
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- }
-
- @Test(expected = RuntimeException.class)
- public void onInit_hideBottomSystemBarForKeyboardValueDoNotSync_throwsRuntimeException() {
- when(mResources.getBoolean(R.bool.config_hideBottomSystemBarForKeyboard)).thenReturn(false);
- when(mResources.getBoolean(
- com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard)).thenReturn(
- true);
-
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- }
-
- @Test
- public void onInit_topNotifPanelViewMediatorUsed_topBarEnabled_doesNotThrowException() {
- when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(true);
- when(mResources.getString(R.string.config_notificationPanelViewMediator)).thenReturn(
- TestTopNotificationPanelViewMediator.class.getName());
-
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- }
-
- @Test(expected = RuntimeException.class)
- public void onInit_topNotifPanelViewMediatorUsed_topBarNotEnabled_throwsRuntimeException() {
- when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
- when(mResources.getString(R.string.config_notificationPanelViewMediator)).thenReturn(
- TestTopNotificationPanelViewMediator.class.getName());
-
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- }
-
- @Test
- public void onInit_notificationPanelViewMediatorUsed_topBarNotEnabled_doesNotThrowException() {
- when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
- when(mResources.getString(R.string.config_notificationPanelViewMediator)).thenReturn(
- NotificationPanelViewMediator.class.getName());
-
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- }
-
- @Test
- public void getTopSystemBarLayoutParams_topBarEnabled_returnsTopSystemBarLayoutParams() {
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
- SystemBarConfigs.TOP);
-
- assertNotNull(lp);
- }
-
- @Test
- public void getTopSystemBarLayoutParams_topBarNotEnabled_returnsNull() {
- when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
- SystemBarConfigs.TOP);
-
- assertNull(lp);
- }
-
- @Test
- public void getTopSystemBarHideForKeyboard_hideBarForKeyboard_returnsTrue() {
- when(mResources.getBoolean(R.bool.config_hideTopSystemBarForKeyboard)).thenReturn(true);
- mSystemBarConfigs = new SystemBarConfigs(mResources);
-
- boolean hideKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
-
- assertTrue(hideKeyboard);
- }
-
- @Test
- public void getTopSystemBarHideForKeyboard_topBarNotEnabled_returnsFalse() {
- when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(false);
- mSystemBarConfigs = new SystemBarConfigs(mResources);
-
- boolean hideKeyboard = mSystemBarConfigs.getHideForKeyboardBySide(SystemBarConfigs.TOP);
-
- assertFalse(hideKeyboard);
- }
-
- @Test
- public void topSystemBarHasHigherZOrderThanHuns_topSystemBarIsNavigationBarPanelType() {
- when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(
- SystemBarConfigs.getHunZOrder() + 1);
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
- SystemBarConfigs.TOP);
-
- assertEquals(lp.type, WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL);
- }
-
- @Test
- public void topSystemBarHasLowerZOrderThanHuns_topSystemBarIsStatusBarAdditionalType() {
- when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(
- SystemBarConfigs.getHunZOrder() - 1);
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- WindowManager.LayoutParams lp = mSystemBarConfigs.getLayoutParamsBySide(
- SystemBarConfigs.TOP);
-
- assertEquals(lp.type, WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL);
- }
-
- @Test
- public void updateInsetPaddings_overlappingBarWithHigherZOrderDisappeared_removesInset() {
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- CarNavigationBarView leftBar = new CarNavigationBarView(mContext, /* attrs= */ null);
- Map<Integer, Boolean> visibilities = new ArrayMap<>();
- visibilities.put(SystemBarConfigs.TOP, false);
- visibilities.put(SystemBarConfigs.BOTTOM, true);
- visibilities.put(SystemBarConfigs.LEFT, true);
- visibilities.put(SystemBarConfigs.RIGHT, true);
-
- mSystemBarConfigs.updateInsetPaddings(SystemBarConfigs.LEFT, visibilities);
- mSystemBarConfigs.insetSystemBar(SystemBarConfigs.LEFT, leftBar);
-
- assertEquals(0, leftBar.getPaddingTop());
- }
-
- @Test
- public void updateInsetPaddings_overlappingBarWithHigherZOrderReappeared_addsInset() {
- mSystemBarConfigs = new SystemBarConfigs(mResources);
- CarNavigationBarView leftBar = new CarNavigationBarView(mContext, /* attrs= */ null);
- Map<Integer, Boolean> visibilities = new ArrayMap<>();
- visibilities.put(SystemBarConfigs.TOP, false);
- visibilities.put(SystemBarConfigs.BOTTOM, true);
- visibilities.put(SystemBarConfigs.LEFT, true);
- visibilities.put(SystemBarConfigs.RIGHT, true);
-
- mSystemBarConfigs.updateInsetPaddings(SystemBarConfigs.LEFT, visibilities);
- mSystemBarConfigs.insetSystemBar(SystemBarConfigs.LEFT, leftBar);
- visibilities.put(SystemBarConfigs.TOP, true);
- mSystemBarConfigs.updateInsetPaddings(SystemBarConfigs.LEFT, visibilities);
- mSystemBarConfigs.insetSystemBar(SystemBarConfigs.LEFT, leftBar);
-
- assertEquals(SYSTEM_BAR_GIRTH, leftBar.getPaddingTop());
- }
-
- // Set valid config where all system bars are enabled.
- private void setDefaultValidConfig() {
- when(mResources.getBoolean(R.bool.config_enableTopNavigationBar)).thenReturn(true);
- when(mResources.getBoolean(R.bool.config_enableBottomNavigationBar)).thenReturn(true);
- when(mResources.getBoolean(R.bool.config_enableLeftNavigationBar)).thenReturn(true);
- when(mResources.getBoolean(R.bool.config_enableRightNavigationBar)).thenReturn(true);
-
- when(mResources.getDimensionPixelSize(
- com.android.internal.R.dimen.status_bar_height)).thenReturn(SYSTEM_BAR_GIRTH);
- when(mResources.getDimensionPixelSize(
- com.android.internal.R.dimen.navigation_bar_height)).thenReturn(SYSTEM_BAR_GIRTH);
- when(mResources.getDimensionPixelSize(R.dimen.car_left_navigation_bar_width)).thenReturn(
- SYSTEM_BAR_GIRTH);
- when(mResources.getDimensionPixelSize(R.dimen.car_right_navigation_bar_width)).thenReturn(
- SYSTEM_BAR_GIRTH);
-
- when(mResources.getInteger(R.integer.config_topSystemBarType)).thenReturn(0);
- when(mResources.getInteger(R.integer.config_bottomSystemBarType)).thenReturn(1);
- when(mResources.getInteger(R.integer.config_leftSystemBarType)).thenReturn(2);
- when(mResources.getInteger(R.integer.config_rightSystemBarType)).thenReturn(3);
-
- when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(5);
- when(mResources.getInteger(R.integer.config_bottomSystemBarZOrder)).thenReturn(10);
- when(mResources.getInteger(R.integer.config_leftSystemBarZOrder)).thenReturn(2);
- when(mResources.getInteger(R.integer.config_rightSystemBarZOrder)).thenReturn(3);
-
- when(mResources.getBoolean(R.bool.config_hideTopSystemBarForKeyboard)).thenReturn(false);
- when(mResources.getBoolean(
- com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard)).thenReturn(
- false);
- when(mResources.getBoolean(R.bool.config_hideLeftSystemBarForKeyboard)).thenReturn(
- false);
- when(mResources.getBoolean(R.bool.config_hideRightSystemBarForKeyboard)).thenReturn(
- false);
- }
-
- // Intentionally using a subclass of TopNotificationPanelViewMediator for testing purposes to
- // ensure that OEM's will be able to implement and use their own NotificationPanelViewMediator.
- private class TestTopNotificationPanelViewMediator extends
- TopNotificationPanelViewMediator {
- TestTopNotificationPanelViewMediator(
- CarNavigationBarController carNavigationBarController,
- NotificationPanelViewController notificationPanelViewController,
- PowerManagerHelper powerManagerHelper,
- BroadcastDispatcher broadcastDispatcher,
- CarDeviceProvisionedController carDeviceProvisionedController,
- ConfigurationController configurationController) {
- super(carNavigationBarController, notificationPanelViewController, powerManagerHelper,
- broadcastDispatcher, carDeviceProvisionedController, configurationController);
- }
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java
deleted file mode 100644
index 19b7f7baf1c8..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/CarHeadsUpNotificationSystemContainerTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.when;
-
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.View;
-import android.view.WindowManager;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.car.notification.CarNotificationTypeItem;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class CarHeadsUpNotificationSystemContainerTest extends SysuiTestCase {
- private CarHeadsUpNotificationSystemContainer mCarHeadsUpNotificationSystemContainer;
- @Mock
- private CarDeviceProvisionedController mCarDeviceProvisionedController;
- @Mock
- private OverlayViewGlobalStateController mOverlayViewGlobalStateController;
- @Mock
- private WindowManager mWindowManager;
-
- @Mock
- private View mNotificationView;
- @Mock
- private View mNotificationView2;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(/* testClass= */this);
-
- when(mOverlayViewGlobalStateController.shouldShowHUN()).thenReturn(true);
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
-
- mContext.ensureTestableResources();
-
- mCarHeadsUpNotificationSystemContainer = new CarHeadsUpNotificationSystemContainer(mContext,
- mCarDeviceProvisionedController, mWindowManager, mOverlayViewGlobalStateController);
- }
-
- @Test
- public void testDisplayNotification_firstNotification_isVisible() {
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView,
- CarNotificationTypeItem.INBOX);
- assertThat(mCarHeadsUpNotificationSystemContainer.isVisible()).isTrue();
- }
-
- @Test
- public void testRemoveNotification_lastNotification_isInvisible() {
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView,
- CarNotificationTypeItem.INBOX);
- mCarHeadsUpNotificationSystemContainer.removeNotification(mNotificationView);
- assertThat(mCarHeadsUpNotificationSystemContainer.isVisible()).isFalse();
- }
-
- @Test
- public void testRemoveNotification_nonLastNotification_isVisible() {
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView,
- CarNotificationTypeItem.INBOX);
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView2,
- CarNotificationTypeItem.INBOX);
- mCarHeadsUpNotificationSystemContainer.removeNotification(mNotificationView);
- assertThat(mCarHeadsUpNotificationSystemContainer.isVisible()).isTrue();
- }
-
- @Test
- public void testDisplayNotification_userFullySetupTrue_isInvisible() {
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView,
- CarNotificationTypeItem.INBOX);
- assertThat(mCarHeadsUpNotificationSystemContainer.isVisible()).isTrue();
-
- }
-
- @Test
- public void testDisplayNotification_userFullySetupFalse_isInvisible() {
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(false);
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView,
- CarNotificationTypeItem.INBOX);
- assertThat(mCarHeadsUpNotificationSystemContainer.isVisible()).isFalse();
- }
-
- @Test
- public void testDisplayNotification_overlayWindowStateShouldShowHUNFalse_isInvisible() {
- when(mOverlayViewGlobalStateController.shouldShowHUN()).thenReturn(false);
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView,
- CarNotificationTypeItem.INBOX);
- assertThat(mCarHeadsUpNotificationSystemContainer.isVisible()).isFalse();
- }
-
- @Test
- public void testDisplayNotification_overlayWindowStateShouldShowHUNTrue_isVisible() {
- mCarHeadsUpNotificationSystemContainer.displayNotification(mNotificationView,
- CarNotificationTypeItem.INBOX);
- assertThat(mCarHeadsUpNotificationSystemContainer.isVisible()).isTrue();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java
deleted file mode 100644
index d51aeb18135d..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/notification/NotificationVisibilityLoggerTest.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.notification;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.Notification;
-import android.os.RemoteException;
-import android.os.UserHandle;
-import android.service.notification.StatusBarNotification;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.car.notification.AlertEntry;
-import com.android.car.notification.NotificationDataManager;
-import com.android.internal.statusbar.IStatusBarService;
-import com.android.internal.statusbar.NotificationVisibility;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.util.concurrency.FakeExecutor;
-import com.android.systemui.util.time.FakeSystemClock;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.Collections;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class NotificationVisibilityLoggerTest extends SysuiTestCase {
-
- private static final String PKG = "package_1";
- private static final String OP_PKG = "OpPackage";
- private static final int ID = 1;
- private static final String TAG = "Tag";
- private static final int UID = 2;
- private static final int INITIAL_PID = 3;
- private static final String CHANNEL_ID = "CHANNEL_ID";
- private static final String CONTENT_TITLE = "CONTENT_TITLE";
- private static final String OVERRIDE_GROUP_KEY = "OVERRIDE_GROUP_KEY";
- private static final long POST_TIME = 12345L;
- private static final UserHandle USER_HANDLE = new UserHandle(12);
-
- @Mock
- private IStatusBarService mBarService;
- @Mock
- private NotificationDataManager mNotificationDataManager;
-
- private NotificationVisibilityLogger mNotificationVisibilityLogger;
- private FakeExecutor mUiBgExecutor;
- private AlertEntry mMessageNotification;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(/* testClass= */this);
-
- mUiBgExecutor = new FakeExecutor(new FakeSystemClock());
- Notification.Builder mNotificationBuilder1 = new Notification.Builder(mContext, CHANNEL_ID)
- .setContentTitle(CONTENT_TITLE);
- mMessageNotification = new AlertEntry(new StatusBarNotification(PKG, OP_PKG,
- ID, TAG, UID, INITIAL_PID, mNotificationBuilder1.build(), USER_HANDLE,
- OVERRIDE_GROUP_KEY, POST_TIME));
-
- when(mNotificationDataManager.getVisibleNotifications()).thenReturn(
- Collections.singletonList(mMessageNotification));
-
- mNotificationVisibilityLogger = new NotificationVisibilityLogger(
- mUiBgExecutor, mBarService, mNotificationDataManager);
- }
-
- @Test
- public void log_notifiesStatusBarService() throws RemoteException {
- mNotificationVisibilityLogger.log(/* isVisible= */ true);
- mUiBgExecutor.runNextReady();
-
- verify(mBarService).onNotificationVisibilityChanged(
- any(NotificationVisibility[].class), any(NotificationVisibility[].class));
- }
-
- @Test
- public void log_isVisibleIsTrue_notifiesOfNewlyVisibleItems() throws RemoteException {
- ArgumentCaptor<NotificationVisibility[]> newlyVisibleCaptor =
- ArgumentCaptor.forClass(NotificationVisibility[].class);
- ArgumentCaptor<NotificationVisibility[]> previouslyVisibleCaptor =
- ArgumentCaptor.forClass(NotificationVisibility[].class);
-
- mNotificationVisibilityLogger.log(/* isVisible= */ true);
- mUiBgExecutor.runNextReady();
-
- verify(mBarService).onNotificationVisibilityChanged(
- newlyVisibleCaptor.capture(), previouslyVisibleCaptor.capture());
- assertThat(newlyVisibleCaptor.getValue().length).isEqualTo(1);
- assertThat(previouslyVisibleCaptor.getValue().length).isEqualTo(0);
- }
-
- @Test
- public void log_isVisibleIsFalse_notifiesOfPreviouslyVisibleItems() throws RemoteException {
- ArgumentCaptor<NotificationVisibility[]> newlyVisibleCaptor =
- ArgumentCaptor.forClass(NotificationVisibility[].class);
- ArgumentCaptor<NotificationVisibility[]> previouslyVisibleCaptor =
- ArgumentCaptor.forClass(NotificationVisibility[].class);
- mNotificationVisibilityLogger.log(/* isVisible= */ true);
- mUiBgExecutor.runNextReady();
- reset(mBarService);
-
- mNotificationVisibilityLogger.log(/* isVisible= */ false);
- mUiBgExecutor.runNextReady();
-
- verify(mBarService).onNotificationVisibilityChanged(
- newlyVisibleCaptor.capture(), previouslyVisibleCaptor.capture());
- assertThat(previouslyVisibleCaptor.getValue().length).isEqualTo(1);
- assertThat(newlyVisibleCaptor.getValue().length).isEqualTo(0);
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewControllerTest.java
deleted file mode 100644
index a6160ecf1c62..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewControllerTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.rvc;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.verify;
-
-import android.app.ActivityView;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.view.ViewGroup;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-@CarSystemUiTest
-@RunWith(MockitoJUnitRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class RearViewCameraViewControllerTest extends SysuiTestCase {
- private static final String TEST_ACTIVITY_NAME = "testPackage/testActivity";
- private RearViewCameraViewController mRearViewCameraViewController;
-
- @Mock
- private OverlayViewGlobalStateController mOverlayViewGlobalStateController;
- @Mock
- private ActivityView mMockActivityView;
- @Captor
- private ArgumentCaptor<Intent> mIntentCaptor;
-
- private void setUpRearViewCameraViewController(String testActivityName) {
- mContext.getOrCreateTestableResources().addOverride(
- R.string.config_rearViewCameraActivity, testActivityName);
- mRearViewCameraViewController = new RearViewCameraViewController(
- mContext.getOrCreateTestableResources().getResources(),
- mOverlayViewGlobalStateController);
- mRearViewCameraViewController.inflate((ViewGroup) LayoutInflater.from(mContext).inflate(
- R.layout.sysui_overlay_window, /* root= */ null));
- }
-
- @Test
- public void testEmptyResourceDisablesController() {
- setUpRearViewCameraViewController("");
-
- assertThat(mRearViewCameraViewController.isEnabled()).isFalse();
- }
-
- @Test
- public void testNonEmptyResourceEnablesController() {
- setUpRearViewCameraViewController(TEST_ACTIVITY_NAME);
-
- assertThat(mRearViewCameraViewController.isEnabled()).isTrue();
- }
-
- @Test
- public void testShowInternal() {
- setUpRearViewCameraViewController(TEST_ACTIVITY_NAME);
- assertThat(mRearViewCameraViewController.isShown()).isFalse();
- assertThat(mRearViewCameraViewController.mActivityView).isNull();
-
- mRearViewCameraViewController.showInternal();
-
- assertThat(mRearViewCameraViewController.isShown()).isTrue();
- assertThat(mRearViewCameraViewController.mActivityView).isNotNull();
- }
-
- @Test
- public void testHideInternal() {
- setUpRearViewCameraViewController(TEST_ACTIVITY_NAME);
- assertThat(mRearViewCameraViewController.isShown()).isFalse();
- mRearViewCameraViewController.showInternal();
- assertThat(mRearViewCameraViewController.isShown()).isTrue();
-
- mRearViewCameraViewController.hideInternal();
-
- assertThat(mRearViewCameraViewController.isShown()).isFalse();
- assertThat(mRearViewCameraViewController.mActivityView).isNull();
- }
-
- @Test
- public void testOnActivityViewReady_fireIntent() {
- setUpRearViewCameraViewController(TEST_ACTIVITY_NAME);
- mRearViewCameraViewController.mActivityViewCallback.onActivityViewReady(mMockActivityView);
-
- verify(mMockActivityView).startActivity(mIntentCaptor.capture());
- ComponentName expectedComponent = ComponentName.unflattenFromString(TEST_ACTIVITY_NAME);
- assertThat(mIntentCaptor.getValue().getComponent()).isEqualTo(expectedComponent);
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewMediatorTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewMediatorTest.java
deleted file mode 100644
index 5be8f91ff430..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/rvc/RearViewCameraViewMediatorTest.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.rvc;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyFloat;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.car.Car;
-import android.car.VehicleAreaType;
-import android.car.VehicleGear;
-import android.car.VehiclePropertyIds;
-import android.car.hardware.CarPropertyValue;
-import android.car.hardware.property.CarPropertyManager;
-import android.car.hardware.property.CarPropertyManager.CarPropertyEventCallback;
-import android.content.BroadcastReceiver;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.testing.TestableLooper;
-import android.util.Log;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.CarServiceProvider.CarServiceOnConnectedListener;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-@CarSystemUiTest
-@RunWith(MockitoJUnitRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class RearViewCameraViewMediatorTest extends SysuiTestCase {
- private static final String TAG = RearViewCameraViewMediatorTest.class.getSimpleName();
-
- private RearViewCameraViewMediator mRearViewCameraViewMediator;
-
- @Mock
- private CarServiceProvider mCarServiceProvider;
- @Mock
- private Car mCar;
- @Mock
- private CarPropertyManager mCarPropertyManager;
- @Captor
- private ArgumentCaptor<CarPropertyEventCallback> mCarPropertyEventCallbackCaptor;
-
- @Mock
- private BroadcastDispatcher mBroadcastDispatcher;
- @Captor
- private ArgumentCaptor<BroadcastReceiver> mBroadcastReceiverCaptor;
- @Captor
- private ArgumentCaptor<IntentFilter> mIntentFilterCaptor;
-
- @Mock
- private RearViewCameraViewController mRearViewCameraViewController;
-
- @Before
- public void setUp() throws Exception {
- mRearViewCameraViewMediator = new RearViewCameraViewMediator(
- mRearViewCameraViewController, mCarServiceProvider, mBroadcastDispatcher);
- }
-
- public void setUpListener() {
- doAnswer(invocation -> {
- CarServiceOnConnectedListener listener = invocation.getArgument(0);
- listener.onConnected(mCar);
- return null;
- }).when(mCarServiceProvider).addListener(any(CarServiceOnConnectedListener.class));
- when(mCar.getCarManager(Car.PROPERTY_SERVICE)).thenReturn(mCarPropertyManager);
- when(mRearViewCameraViewController.isEnabled()).thenReturn(true);
-
- mRearViewCameraViewMediator.registerListeners();
-
- verify(mCarPropertyManager).registerCallback(mCarPropertyEventCallbackCaptor.capture(),
- eq(VehiclePropertyIds.GEAR_SELECTION), anyFloat());
- verify(mBroadcastDispatcher).registerReceiver(mBroadcastReceiverCaptor.capture(),
- mIntentFilterCaptor.capture(), any(), any());
- assertThat(mIntentFilterCaptor.getValue().getAction(0)).isEqualTo(
- Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
- }
-
- @Test
- public void testDoesnNotRegisterListenersWhenRearViewCameraViewControllerIsDisabled() {
- when(mRearViewCameraViewController.isEnabled()).thenReturn(false);
-
- mRearViewCameraViewMediator.registerListeners();
-
- verify(mCarPropertyManager, never()).registerCallback(any(), anyInt(), anyFloat());
- verify(mBroadcastDispatcher, never()).registerReceiver(any(), any(), any());
- }
-
- @Test
- public void testGearReverseStartsRearViewCamera() {
- setUpListener();
-
- CarPropertyValue<Integer> gearReverse = new CarPropertyValue(
- VehiclePropertyIds.GEAR_SELECTION, VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL,
- VehicleGear.GEAR_REVERSE);
- mCarPropertyEventCallbackCaptor.getValue().onChangeEvent(gearReverse);
-
- verify(mRearViewCameraViewController, times(1)).start();
- }
-
- @Test
- public void testGearNonReverseStopsRearViewCamera() {
- setUpListener();
-
- int[] nonReverseVehicleGears = new int[]{
- VehicleGear.GEAR_NEUTRAL, VehicleGear.GEAR_PARK, VehicleGear.GEAR_DRIVE,
- VehicleGear.GEAR_FIRST
- };
- for (int i = 0; i < nonReverseVehicleGears.length; ++i) {
- Log.i(TAG, "testGearNonReverseStopsRearViewCamera: gear=" + nonReverseVehicleGears[i]);
- CarPropertyValue<Integer> propertyGear = new CarPropertyValue(
- VehiclePropertyIds.GEAR_SELECTION, VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL,
- nonReverseVehicleGears[i]);
- mCarPropertyEventCallbackCaptor.getValue().onChangeEvent(propertyGear);
-
- verify(mRearViewCameraViewController, times(i + 1)).stop();
- }
- }
-
- @Test
- public void testBroadcastIntentStopsRearViewCamera() {
- setUpListener();
- when(mRearViewCameraViewController.isShown()).thenReturn(true);
-
- Intent randomIntent = new Intent(Intent.ACTION_MAIN);
- mBroadcastReceiverCaptor.getValue().onReceive(mContext, randomIntent);
-
- verify(mRearViewCameraViewController, never()).stop();
-
- Intent actionCloseSystemDialogs = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
- mBroadcastReceiverCaptor.getValue().onReceive(mContext, actionCloseSystemDialogs);
-
- verify(mRearViewCameraViewController, times(1)).stop();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java
deleted file mode 100644
index bf9ac3017436..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppDetectorTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.sideloaded;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.when;
-
-import android.app.ActivityTaskManager.RootTaskInfo;
-import android.content.ComponentName;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.InstallSourceInfo;
-import android.content.pm.PackageManager;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.testing.TestableResources;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class SideLoadedAppDetectorTest extends SysuiTestCase {
-
- private static final String SAFE_VENDOR = "com.safe.vendor";
- private static final String UNSAFE_VENDOR = "com.unsafe.vendor";
- private static final String APP_PACKAGE_NAME = "com.test";
- private static final String APP_CLASS_NAME = ".TestClass";
-
- private SideLoadedAppDetector mSideLoadedAppDetector;
-
- @Mock
- private PackageManager mPackageManager;
- @Mock
- private CarDeviceProvisionedController mCarDeviceProvisionedController;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
- TestableResources testableResources = mContext.getOrCreateTestableResources();
- String[] allowedAppInstallSources = new String[] {SAFE_VENDOR};
- testableResources.addOverride(R.array.config_allowedAppInstallSources,
- allowedAppInstallSources);
-
- mSideLoadedAppDetector = new SideLoadedAppDetector(testableResources.getResources(),
- mPackageManager,
- mCarDeviceProvisionedController);
- }
-
- @Test
- public void isSafe_systemApp_returnsTrue() throws Exception {
- RootTaskInfo taskInfo = new RootTaskInfo();
- taskInfo.topActivity = new ComponentName(APP_PACKAGE_NAME, APP_CLASS_NAME);
-
- ApplicationInfo applicationInfo = new ApplicationInfo();
- applicationInfo.packageName = APP_PACKAGE_NAME;
- applicationInfo.flags = ApplicationInfo.FLAG_SYSTEM;
-
- when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any()))
- .thenReturn(applicationInfo);
-
- assertThat(mSideLoadedAppDetector.isSafe(taskInfo)).isTrue();
- }
-
- @Test
- public void isSafe_updatedSystemApp_returnsTrue() throws Exception {
- RootTaskInfo taskInfo = new RootTaskInfo();
- taskInfo.topActivity = new ComponentName(APP_PACKAGE_NAME, APP_CLASS_NAME);
-
- ApplicationInfo applicationInfo = new ApplicationInfo();
- applicationInfo.packageName = APP_PACKAGE_NAME;
- applicationInfo.flags = ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
-
- when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any()))
- .thenReturn(applicationInfo);
-
- assertThat(mSideLoadedAppDetector.isSafe(taskInfo)).isTrue();
- }
-
- @Test
- public void isSafe_nonSystemApp_withSafeSource_returnsTrue() throws Exception {
- InstallSourceInfo sourceInfo = new InstallSourceInfo(SAFE_VENDOR,
- /* initiatingPackageSigningInfo= */null,
- /* originatingPackageName= */ null,
- /* installingPackageName= */ null);
- RootTaskInfo taskInfo = new RootTaskInfo();
- taskInfo.topActivity = new ComponentName(APP_PACKAGE_NAME, APP_CLASS_NAME);
-
- ApplicationInfo applicationInfo = new ApplicationInfo();
- applicationInfo.packageName = APP_PACKAGE_NAME;
-
- when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any()))
- .thenReturn(applicationInfo);
- when(mPackageManager.getInstallSourceInfo(APP_PACKAGE_NAME)).thenReturn(sourceInfo);
-
- assertThat(mSideLoadedAppDetector.isSafe(taskInfo)).isTrue();
- }
-
- @Test
- public void isSafe_nonSystemApp_withUnsafeSource_returnsFalse() throws Exception {
- InstallSourceInfo sourceInfo = new InstallSourceInfo(UNSAFE_VENDOR,
- /* initiatingPackageSigningInfo= */null,
- /* originatingPackageName= */ null,
- /* installingPackageName= */ null);
- RootTaskInfo taskInfo = new RootTaskInfo();
- taskInfo.topActivity = new ComponentName(APP_PACKAGE_NAME, APP_CLASS_NAME);
-
- ApplicationInfo applicationInfo = new ApplicationInfo();
- applicationInfo.packageName = APP_PACKAGE_NAME;
-
- when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any()))
- .thenReturn(applicationInfo);
- when(mPackageManager.getInstallSourceInfo(APP_PACKAGE_NAME)).thenReturn(sourceInfo);
-
- assertThat(mSideLoadedAppDetector.isSafe(taskInfo)).isFalse();
- }
-
- @Test
- public void isSafe_nonSystemApp_withoutSource_returnsFalse() throws Exception {
- InstallSourceInfo sourceInfo = new InstallSourceInfo(null,
- /* initiatingPackageSigningInfo= */null,
- /* originatingPackageName= */ null,
- /* installingPackageName= */ null);
- RootTaskInfo taskInfo = new RootTaskInfo();
- taskInfo.topActivity = new ComponentName(APP_PACKAGE_NAME, APP_CLASS_NAME);
-
- ApplicationInfo applicationInfo = new ApplicationInfo();
- applicationInfo.packageName = APP_PACKAGE_NAME;
-
- when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any()))
- .thenReturn(applicationInfo);
- when(mPackageManager.getInstallSourceInfo(APP_PACKAGE_NAME)).thenReturn(sourceInfo);
-
- assertThat(mSideLoadedAppDetector.isSafe(taskInfo)).isFalse();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java
deleted file mode 100644
index 0b5f68f76ebc..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/SideLoadedAppListenerTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.sideloaded;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.ActivityTaskManager.RootTaskInfo;
-import android.app.IActivityTaskManager;
-import android.content.ComponentName;
-import android.hardware.display.DisplayManager;
-import android.hardware.display.DisplayManagerGlobal;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.Display;
-import android.view.DisplayAdjustments;
-import android.view.DisplayInfo;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class SideLoadedAppListenerTest extends SysuiTestCase {
-
- private static final String APP_PACKAGE_NAME = "com.test";
- private static final String APP_CLASS_NAME = ".TestClass";
-
- private SideLoadedAppListener mSideLoadedAppListener;
-
- @Mock
- private SideLoadedAppDetector mSideLoadedAppDetector;
- @Mock
- private DisplayManager mDisplayManager;
- @Mock
- private IActivityTaskManager mActivityTaskManager;
- @Mock
- private SideLoadedAppStateController mSideLoadedAppStateController;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
- mSideLoadedAppListener = new SideLoadedAppListener(mSideLoadedAppDetector,
- mActivityTaskManager, mDisplayManager, mSideLoadedAppStateController);
- }
-
- @Test
- public void onTaskCreated_safeTask_callsNoMethods() throws Exception {
- int taskId = 999;
- int displayId = 123;
- ComponentName componentName = new ComponentName(APP_PACKAGE_NAME, APP_CLASS_NAME);
-
- RootTaskInfo taskInfo1 = createTask(1, /* isVisible= */ true);
- taskInfo1.childTaskIds = new int[] { 11, 22, 33 };
-
- RootTaskInfo taskInfo2 = createTask(2, /* isVisible= */ true);
- taskInfo2.childTaskIds = new int[] { 111, 222, 333, taskId };
- taskInfo2.displayId = displayId;
-
- List<RootTaskInfo> taskInfoList = Arrays.asList(taskInfo1, taskInfo2);
-
- when(mActivityTaskManager.getAllRootTaskInfos()).thenReturn(taskInfoList);
- when(mSideLoadedAppDetector.isSafe(taskInfo2)).thenReturn(true);
-
- mSideLoadedAppListener.onTaskCreated(taskId, componentName);
-
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo1);
- verify(mSideLoadedAppDetector).isSafe(taskInfo2);
-
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskCreatedOnDisplay(any());
- verify(mSideLoadedAppStateController, never()).onSafeTaskDisplayedOnDisplay(any());
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskDisplayedOnDisplay(any());
- }
-
- @Test
- public void onTaskCreated_unsafeTask_callsUnsafeTaskCreated() throws Exception {
- int taskId = 999;
- int displayId = 123;
- ComponentName componentName = new ComponentName(APP_PACKAGE_NAME, APP_CLASS_NAME);
-
- RootTaskInfo taskInfo1 = createTask(1, /* isVisible= */ true);
- taskInfo1.childTaskIds = new int[] { 11, 22, 33 };
- RootTaskInfo taskInfo2 = createTask(2, /* isVisible= */ true);
- taskInfo2.childTaskIds = new int[] { 111, 222, 333, taskId };
- taskInfo2.displayId = displayId;
- List<RootTaskInfo> taskInfoList = Arrays.asList(taskInfo1, taskInfo2);
-
- Display display = createDisplay(displayId);
-
- when(mActivityTaskManager.getAllRootTaskInfos()).thenReturn(taskInfoList);
- when(mSideLoadedAppDetector.isSafe(taskInfo2)).thenReturn(false);
- when(mDisplayManager.getDisplay(displayId)).thenReturn(display);
-
- mSideLoadedAppListener.onTaskCreated(taskId, componentName);
-
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo1);
- verify(mSideLoadedAppDetector).isSafe(taskInfo2);
-
- verify(mSideLoadedAppStateController).onUnsafeTaskCreatedOnDisplay(display);
- verify(mSideLoadedAppStateController, never()).onSafeTaskDisplayedOnDisplay(any());
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskDisplayedOnDisplay(any());
- }
-
- @Test
- public void onTaskStackChanged_safeTask_callsSafeTaskDisplayed() throws Exception {
- Display display = createDisplay(123);
- RootTaskInfo taskInfo1 = createTask(1, /* isVisible= */ false);
- RootTaskInfo taskInfo2 = createTask(2, /* isVisible= */ true);
- RootTaskInfo taskInfo3 = createTask(3, /* isVisible= */ true);
- List<RootTaskInfo> taskInfoList = Arrays.asList(taskInfo1, taskInfo2, taskInfo3);
-
- when(mActivityTaskManager.getAllRootTaskInfosOnDisplay(display.getDisplayId()))
- .thenReturn(taskInfoList);
- when(mSideLoadedAppDetector.isSafe(taskInfo2)).thenReturn(true);
- when(mDisplayManager.getDisplays()).thenReturn(new Display[] { display });
-
- mSideLoadedAppListener.onTaskStackChanged();
-
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo1);
- verify(mSideLoadedAppDetector).isSafe(taskInfo2);
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo3);
-
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskCreatedOnDisplay(any());
- verify(mSideLoadedAppStateController).onSafeTaskDisplayedOnDisplay(display);
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskDisplayedOnDisplay(any());
- }
-
- @Test
- public void onTaskStackChanged_unsafeTask_callsUnsafeTaskDisplayed() throws Exception {
- Display display = createDisplay(123);
- RootTaskInfo taskInfo1 = createTask(1, /* isVisible= */ false);
- RootTaskInfo taskInfo2 = createTask(2, /* isVisible= */ true);
- RootTaskInfo taskInfo3 = createTask(3, /* isVisible= */ true);
- List<RootTaskInfo> taskInfoList = Arrays.asList(taskInfo1, taskInfo2, taskInfo3);
-
- when(mActivityTaskManager.getAllRootTaskInfosOnDisplay(display.getDisplayId()))
- .thenReturn(taskInfoList);
- when(mSideLoadedAppDetector.isSafe(taskInfo2)).thenReturn(false);
- when(mDisplayManager.getDisplays()).thenReturn(new Display[] { display });
-
- mSideLoadedAppListener.onTaskStackChanged();
-
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo1);
- verify(mSideLoadedAppDetector).isSafe(taskInfo2);
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo3);
-
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskCreatedOnDisplay(any());
- verify(mSideLoadedAppStateController, never()).onSafeTaskDisplayedOnDisplay(any());
- verify(mSideLoadedAppStateController).onUnsafeTaskDisplayedOnDisplay(display);
- }
-
- @Test
- public void onTaskStackChanged_multiDisplay_callsTasksDisplayed() throws Exception {
- Display display1 = createDisplay(1);
- RootTaskInfo taskInfo1 = createTask(1, /* isVisible= */ false);
- RootTaskInfo taskInfo2 = createTask(2, /* isVisible= */ true);
- RootTaskInfo taskInfo3 = createTask(3, /* isVisible= */ true);
- List<RootTaskInfo> display1Tasks = Arrays.asList(taskInfo1, taskInfo2, taskInfo3);
-
- Display display2 = createDisplay(2);
- RootTaskInfo taskInfo4 = createTask(4, /* isVisible= */ true);
- List<RootTaskInfo> display2Tasks = Collections.singletonList(taskInfo4);
-
- Display display3 = createDisplay(3);
- RootTaskInfo taskInfo5 = createTask(5, /* isVisible= */ true);
- List<RootTaskInfo> display3Tasks = Collections.singletonList(taskInfo5);
-
- when(mActivityTaskManager.getAllRootTaskInfosOnDisplay(display1.getDisplayId()))
- .thenReturn(display1Tasks);
- when(mActivityTaskManager.getAllRootTaskInfosOnDisplay(display2.getDisplayId()))
- .thenReturn(display2Tasks);
- when(mActivityTaskManager.getAllRootTaskInfosOnDisplay(display3.getDisplayId()))
- .thenReturn(display3Tasks);
-
- when(mSideLoadedAppDetector.isSafe(taskInfo2)).thenReturn(true);
- when(mSideLoadedAppDetector.isSafe(taskInfo4)).thenReturn(false);
- when(mSideLoadedAppDetector.isSafe(taskInfo5)).thenReturn(true);
-
- when(mDisplayManager.getDisplays())
- .thenReturn(new Display[] { display1, display2, display3});
-
- mSideLoadedAppListener.onTaskStackChanged();
-
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo1);
- verify(mSideLoadedAppDetector).isSafe(taskInfo2);
- verify(mSideLoadedAppDetector, never()).isSafe(taskInfo3);
- verify(mSideLoadedAppDetector).isSafe(taskInfo4);
- verify(mSideLoadedAppDetector).isSafe(taskInfo5);
-
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskCreatedOnDisplay(any());
- verify(mSideLoadedAppStateController).onSafeTaskDisplayedOnDisplay(display1);
- verify(mSideLoadedAppStateController).onUnsafeTaskDisplayedOnDisplay(display2);
- verify(mSideLoadedAppStateController).onSafeTaskDisplayedOnDisplay(display3);
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskDisplayedOnDisplay(display1);
- verify(mSideLoadedAppStateController).onUnsafeTaskDisplayedOnDisplay(display2);
- verify(mSideLoadedAppStateController, never()).onUnsafeTaskDisplayedOnDisplay(display3);
- }
-
- private Display createDisplay(int id) {
- return new Display(DisplayManagerGlobal.getInstance(),
- id,
- new DisplayInfo(),
- DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS);
- }
-
- private RootTaskInfo createTask(int id, boolean isVisible) {
- RootTaskInfo taskInfo = new RootTaskInfo();
- taskInfo.taskId = id;
- taskInfo.visible = isVisible;
- return taskInfo;
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/statusbar/UserNameViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/statusbar/UserNameViewControllerTest.java
deleted file mode 100644
index ac7edd32c14c..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/statusbar/UserNameViewControllerTest.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.statusbar;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-import static org.mockito.Mockito.when;
-
-import android.car.Car;
-import android.car.user.CarUserManager;
-import android.content.BroadcastReceiver;
-import android.content.Intent;
-import android.content.pm.UserInfo;
-import android.os.UserManager;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.View;
-import android.widget.TextView;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.broadcast.BroadcastDispatcher;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class UserNameViewControllerTest extends SysuiTestCase {
-
- private final UserInfo mUserInfo1 = new UserInfo(/* id= */ 0, "Test User Name", /* flags= */ 0);
- private final UserInfo mUserInfo2 = new UserInfo(/* id= */ 1, "Another User", /* flags= */ 0);
- private TextView mTextView;
- private UserNameViewController mUserNameViewController;
-
- @Mock
- private Car mCar;
- @Mock
- private CarUserManager mCarUserManager;
- @Mock
- private UserManager mUserManager;
- @Mock
- private CarDeviceProvisionedController mCarDeviceProvisionedController;
- @Mock
- private BroadcastDispatcher mBroadcastDispatcher;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- when(mUserManager.getUserInfo(mUserInfo1.id)).thenReturn(mUserInfo1);
- when(mUserManager.getUserInfo(mUserInfo2.id)).thenReturn(mUserInfo2);
- when(mCar.isConnected()).thenReturn(true);
- when(mCar.getCarManager(Car.CAR_USER_SERVICE)).thenReturn(mCarUserManager);
-
- CarServiceProvider carServiceProvider = new CarServiceProvider(mContext, mCar);
- mUserNameViewController = new UserNameViewController(getContext(), carServiceProvider,
- mUserManager, mBroadcastDispatcher, mCarDeviceProvisionedController);
-
- mTextView = new TextView(getContext());
- mTextView.setId(R.id.user_name_text);
- }
-
- @Test
- public void addUserNameViewToController_updatesUserNameView() {
- when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(mUserInfo1.id);
-
- mUserNameViewController.addUserNameView(mTextView);
-
- assertEquals(mTextView.getText(), mUserInfo1.name);
- }
-
- @Test
- public void addUserNameViewToController_withNoTextView_doesNotUpdate() {
- View nullView = new View(getContext());
- mUserNameViewController.addUserNameView(nullView);
-
- assertEquals(mTextView.getText(), "");
- verifyZeroInteractions(mCarDeviceProvisionedController);
- verifyZeroInteractions(mCarUserManager);
- verifyZeroInteractions(mUserManager);
- }
-
- @Test
- public void removeAll_withNoRegisteredListener_doesNotUnregister() {
- mUserNameViewController.removeAll();
-
- verifyZeroInteractions(mCarUserManager);
- }
-
- @Test
- public void userLifecycleListener_onUserSwitchLifecycleEvent_updatesUserNameView() {
- ArgumentCaptor<CarUserManager.UserLifecycleListener> userLifecycleListenerArgumentCaptor =
- ArgumentCaptor.forClass(CarUserManager.UserLifecycleListener.class);
- when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(mUserInfo1.id);
- // Add the initial TextView, which registers the UserLifecycleListener
- mUserNameViewController.addUserNameView(mTextView);
- assertEquals(mTextView.getText(), mUserInfo1.name);
- verify(mCarUserManager).addListener(any(), userLifecycleListenerArgumentCaptor.capture());
-
- CarUserManager.UserLifecycleEvent event = new CarUserManager.UserLifecycleEvent(
- CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING, /* from= */ mUserInfo1.id,
- /* to= */ mUserInfo2.id);
- userLifecycleListenerArgumentCaptor.getValue().onEvent(event);
-
- assertEquals(mTextView.getText(), mUserInfo2.name);
- }
-
- @Test
- public void userInfoChangedBroadcast_withoutInitializingUserNameView_doesNothing() {
- getContext().sendBroadcast(new Intent(Intent.ACTION_USER_INFO_CHANGED));
-
- assertEquals(mTextView.getText(), "");
- verifyZeroInteractions(mCarDeviceProvisionedController);
- }
-
- @Test
- public void userInfoChangedBroadcast_withUserNameViewInitialized_updatesUserNameView() {
- ArgumentCaptor<BroadcastReceiver> broadcastReceiverArgumentCaptor = ArgumentCaptor.forClass(
- BroadcastReceiver.class);
- when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(mUserInfo1.id);
- mUserNameViewController.addUserNameView(mTextView);
- assertEquals(mTextView.getText(), mUserInfo1.name);
- verify(mBroadcastDispatcher).registerReceiver(broadcastReceiverArgumentCaptor.capture(),
- any(), any(), any());
-
- reset(mCarDeviceProvisionedController);
- when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(mUserInfo2.id);
- broadcastReceiverArgumentCaptor.getValue().onReceive(getContext(),
- new Intent(Intent.ACTION_USER_INFO_CHANGED));
-
- assertEquals(mTextView.getText(), mUserInfo2.name);
- verify(mCarDeviceProvisionedController).getCurrentUser();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java
deleted file mode 100644
index 2e9d43b595a1..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewControllerTest.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.os.Handler;
-import android.os.UserManager;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.testing.TestableResources;
-import android.view.IWindowManager;
-import android.view.LayoutInflater;
-import android.view.ViewGroup;
-
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.car.window.OverlayViewGlobalStateController;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class UserSwitchTransitionViewControllerTest extends SysuiTestCase {
- private static final int TEST_USER_1 = 100;
- private static final int TEST_USER_2 = 110;
-
- private TestableUserSwitchTransitionViewController mCarUserSwitchingDialogController;
- private TestableResources mTestableResources;
- @Mock
- private OverlayViewGlobalStateController mOverlayViewGlobalStateController;
- @Mock
- private IWindowManager mWindowManagerService;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- mTestableResources = mContext.getOrCreateTestableResources();
- mCarUserSwitchingDialogController = new TestableUserSwitchTransitionViewController(
- mContext,
- Handler.getMain(),
- mTestableResources.getResources(),
- (UserManager) mContext.getSystemService(Context.USER_SERVICE),
- mWindowManagerService,
- mOverlayViewGlobalStateController
- );
-
- mCarUserSwitchingDialogController.inflate((ViewGroup) LayoutInflater.from(mContext).inflate(
- R.layout.sysui_overlay_window, /* root= */ null));
- }
-
- @Test
- public void onHandleShow_newUserSelected_showsDialog() {
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
-
- verify(mOverlayViewGlobalStateController).showView(eq(mCarUserSwitchingDialogController),
- any());
- }
-
- @Test
- public void onHandleShow_alreadyShowing_ignoresRequest() {
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_2);
-
- // Verify that the request was processed only once.
- verify(mOverlayViewGlobalStateController).showView(eq(mCarUserSwitchingDialogController),
- any());
- }
-
- @Test
- public void onHandleShow_sameUserSelected_ignoresRequest() {
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
- mCarUserSwitchingDialogController.handleHide();
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
-
- // Verify that the request was processed only once.
- verify(mOverlayViewGlobalStateController).showView(eq(mCarUserSwitchingDialogController),
- any());
- }
-
- @Test
- public void onHide_currentlyShowing_hidesDialog() {
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
- mCarUserSwitchingDialogController.handleHide();
-
- verify(mOverlayViewGlobalStateController).hideView(eq(mCarUserSwitchingDialogController),
- any());
- }
-
- @Test
- public void onHide_notShowing_ignoresRequest() {
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
- mCarUserSwitchingDialogController.handleHide();
- mCarUserSwitchingDialogController.handleHide();
-
- // Verify that the request was processed only once.
- verify(mOverlayViewGlobalStateController).hideView(eq(mCarUserSwitchingDialogController),
- any());
- }
-
- @Test
- public void onWindowShownTimeoutPassed_viewNotHidden_hidesUserSwitchTransitionView() {
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
- reset(mOverlayViewGlobalStateController);
-
- getContext().getMainThreadHandler().postDelayed(() -> {
- verify(mOverlayViewGlobalStateController).hideView(
- eq(mCarUserSwitchingDialogController), any());
- }, mCarUserSwitchingDialogController.getWindowShownTimeoutMs() + 10);
- }
-
- @Test
- public void onWindowShownTimeoutPassed_viewHidden_doesNotHideUserSwitchTransitionViewAgain() {
- mCarUserSwitchingDialogController.handleShow(/* currentUserId= */ TEST_USER_1);
- mCarUserSwitchingDialogController.handleHide();
- reset(mOverlayViewGlobalStateController);
-
- getContext().getMainThreadHandler().postDelayed(() -> {
- verify(mOverlayViewGlobalStateController, never()).hideView(
- eq(mCarUserSwitchingDialogController), any());
- }, mCarUserSwitchingDialogController.getWindowShownTimeoutMs() + 10);
- }
-
- private final class TestableUserSwitchTransitionViewController extends
- UserSwitchTransitionViewController {
-
- private final Handler mHandler;
-
- TestableUserSwitchTransitionViewController(Context context, Handler handler,
- Resources resources, UserManager userManager,
- IWindowManager windowManagerService,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
- super(context, handler, resources, userManager, windowManagerService,
- overlayViewGlobalStateController);
- mHandler = handler;
- }
-
- @Override
- public void handleShow(int currentUserId) {
- super.handleShow(currentUserId);
- waitForIdleSync(mHandler);
- }
-
- @Override
- public void handleHide() {
- super.handleHide();
- waitForIdleSync(mHandler);
- }
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java
deleted file mode 100644
index 7aeffce7042d..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/userswitcher/UserSwitchTransitionViewMediatorTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.userswitcher;
-
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.car.user.CarUserManager;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarServiceProvider;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class UserSwitchTransitionViewMediatorTest extends SysuiTestCase {
- private static final int TEST_USER = 100;
-
- private UserSwitchTransitionViewMediator mUserSwitchTransitionViewMediator;
- @Mock
- private CarServiceProvider mCarServiceProvider;
- @Mock
- private CarDeviceProvisionedController mCarDeviceProvisionedController;
- @Mock
- private UserSwitchTransitionViewController mUserSwitchTransitionViewController;
- @Mock
- private CarUserManager.UserLifecycleEvent mUserLifecycleEvent;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
-
- mUserSwitchTransitionViewMediator = new UserSwitchTransitionViewMediator(
- mCarServiceProvider, mCarDeviceProvisionedController,
- mUserSwitchTransitionViewController);
- when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(TEST_USER);
- }
-
- @Test
- public void onUserLifecycleEvent_userStarting_isCurrentUser_callsHandleShow() {
- when(mUserLifecycleEvent.getEventType()).thenReturn(
- CarUserManager.USER_LIFECYCLE_EVENT_TYPE_STARTING);
- when(mUserLifecycleEvent.getUserId()).thenReturn(TEST_USER);
-
- mUserSwitchTransitionViewMediator.handleUserLifecycleEvent(mUserLifecycleEvent);
-
- verify(mUserSwitchTransitionViewController).handleShow(TEST_USER);
- }
-
- @Test
- public void onUserLifecycleEvent_userStarting_isNotCurrentUser_doesNotCallHandleShow() {
- when(mUserLifecycleEvent.getEventType()).thenReturn(
- CarUserManager.USER_LIFECYCLE_EVENT_TYPE_STARTING);
- when(mUserLifecycleEvent.getUserId()).thenReturn(TEST_USER);
- when(mCarDeviceProvisionedController.getCurrentUser()).thenReturn(TEST_USER + 1);
-
- mUserSwitchTransitionViewMediator.handleUserLifecycleEvent(mUserLifecycleEvent);
-
- verify(mUserSwitchTransitionViewController, never()).handleShow(TEST_USER);
- }
-
- @Test
- public void onUserLifecycleEvent_userSwitching_callsHandleHide() {
- when(mUserLifecycleEvent.getEventType()).thenReturn(
- CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING);
- mUserSwitchTransitionViewMediator.handleUserLifecycleEvent(mUserLifecycleEvent);
-
- verify(mUserSwitchTransitionViewController).handleHide();
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java
deleted file mode 100644
index f77294e37b98..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/voicerecognition/ConnectedDeviceVoiceRecognitionNotifierTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.voicerecognition;
-
-import static com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier.INVALID_VALUE;
-import static com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier.VOICE_RECOGNITION_STARTED;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothHeadsetClient;
-import android.content.Intent;
-import android.os.Handler;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-// TODO(b/162866441): Refactor to use the Executor pattern instead.
-public class ConnectedDeviceVoiceRecognitionNotifierTest extends SysuiTestCase {
-
- private static final String BLUETOOTH_PERM = android.Manifest.permission.BLUETOOTH;
- private static final String BLUETOOTH_REMOTE_ADDRESS = "00:11:22:33:44:55";
-
- private ConnectedDeviceVoiceRecognitionNotifier mVoiceRecognitionNotifier;
- private TestableLooper mTestableLooper;
- private Handler mHandler;
- private Handler mTestHandler;
- private BluetoothDevice mBluetoothDevice;
-
- @Before
- public void setUp() throws Exception {
- mTestableLooper = TestableLooper.get(this);
- mHandler = new Handler(mTestableLooper.getLooper());
- mTestHandler = spy(mHandler);
- mBluetoothDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(
- BLUETOOTH_REMOTE_ADDRESS);
- mVoiceRecognitionNotifier = new ConnectedDeviceVoiceRecognitionNotifier(
- mContext, mTestHandler);
- mVoiceRecognitionNotifier.onBootCompleted();
- }
-
- @Test
- public void testReceiveIntent_started_showToast() {
- Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AG_EVENT);
- intent.putExtra(BluetoothHeadsetClient.EXTRA_VOICE_RECOGNITION, VOICE_RECOGNITION_STARTED);
- intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
-
- mContext.sendBroadcast(intent, BLUETOOTH_PERM);
- mTestableLooper.processAllMessages();
- waitForIdleSync();
-
- mHandler.post(() -> {
- ArgumentCaptor<Runnable> argumentCaptor = ArgumentCaptor.forClass(Runnable.class);
- verify(mTestHandler).post(argumentCaptor.capture());
- assertThat(argumentCaptor.getValue()).isNotNull();
- assertThat(argumentCaptor.getValue()).isNotEqualTo(this);
- });
- }
-
- @Test
- public void testReceiveIntent_invalidExtra_noToast() {
- Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AG_EVENT);
- intent.putExtra(BluetoothHeadsetClient.EXTRA_VOICE_RECOGNITION, INVALID_VALUE);
- intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
-
- mContext.sendBroadcast(intent, BLUETOOTH_PERM);
- mTestableLooper.processAllMessages();
- waitForIdleSync();
-
- mHandler.post(() -> {
- verify(mTestHandler, never()).post(any());
- });
- }
-
- @Test
- public void testReceiveIntent_noExtra_noToast() {
- Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AG_EVENT);
- intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
-
- mContext.sendBroadcast(intent, BLUETOOTH_PERM);
- mTestableLooper.processAllMessages();
- waitForIdleSync();
-
- mHandler.post(() -> {
- verify(mTestHandler, never()).post(any());
- });
- }
-
- @Test
- public void testReceiveIntent_invalidIntent_noToast() {
- Intent intent = new Intent(BluetoothHeadsetClient.ACTION_AUDIO_STATE_CHANGED);
- intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice);
-
- mContext.sendBroadcast(intent, BLUETOOTH_PERM);
- mTestableLooper.processAllMessages();
- waitForIdleSync();
-
- mHandler.post(() -> {
- verify(mTestHandler, never()).post(any());
- });
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java
deleted file mode 100644
index f5f3ea3030da..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyFloat;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.animation.Animator;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Rect;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarDeviceProvisionedController;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.tests.R;
-import com.android.wm.shell.animation.FlingAnimationUtils;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class OverlayPanelViewControllerTest extends SysuiTestCase {
- private TestOverlayPanelViewController mOverlayPanelViewController;
- private ViewGroup mBaseLayout;
-
- @Mock
- private OverlayViewGlobalStateController mOverlayViewGlobalStateController;
- @Mock
- private FlingAnimationUtils.Builder mFlingAnimationUtilsBuilder;
- @Mock
- private FlingAnimationUtils mFlingAnimationUtils;
- @Mock
- private CarDeviceProvisionedController mCarDeviceProvisionedController;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
-
- mBaseLayout = (ViewGroup) LayoutInflater.from(mContext).inflate(
- R.layout.overlay_view_controller_test, /* root= */ null);
-
- when(mFlingAnimationUtilsBuilder.setMaxLengthSeconds(anyFloat())).thenReturn(
- mFlingAnimationUtilsBuilder);
- when(mFlingAnimationUtilsBuilder.setSpeedUpFactor(anyFloat())).thenReturn(
- mFlingAnimationUtilsBuilder);
- when(mFlingAnimationUtilsBuilder.build()).thenReturn(mFlingAnimationUtils);
- mOverlayPanelViewController = new TestOverlayPanelViewController(
- getContext(),
- getContext().getOrCreateTestableResources().getResources(),
- R.id.overlay_view_controller_stub,
- mOverlayViewGlobalStateController,
- mFlingAnimationUtilsBuilder,
- mCarDeviceProvisionedController);
- }
-
- @Test
- public void toggle_notInflated_inflates() {
- assertThat(mOverlayPanelViewController.isInflated()).isFalse();
-
- mOverlayPanelViewController.toggle();
-
- verify(mOverlayViewGlobalStateController).inflateView(mOverlayPanelViewController);
- }
-
- @Test
- public void toggle_inflated_doesNotInflate() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- assertThat(mOverlayPanelViewController.isInflated()).isTrue();
-
- mOverlayPanelViewController.toggle();
-
- verify(mOverlayViewGlobalStateController, never()).inflateView(mOverlayPanelViewController);
- }
-
- @Test
- public void toggle_notExpanded_panelExpands() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setPanelExpanded(false);
-
- mOverlayPanelViewController.toggle();
-
- assertThat(mOverlayPanelViewController.mAnimateExpandPanelCalled).isTrue();
- }
-
- @Test
- public void toggle_expanded_panelCollapses() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setPanelExpanded(true);
-
- mOverlayPanelViewController.toggle();
-
- assertThat(mOverlayPanelViewController.mAnimateCollapsePanelCalled).isTrue();
- }
-
- @Test
- public void animateCollapsePanel_shouldNotAnimateCollapsePanel_doesNotCollapse() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateCollapsePanel(false);
-
- mOverlayPanelViewController.animateCollapsePanel();
-
- assertThat(mOverlayPanelViewController.mAnimateCollapsePanelCalled).isTrue();
- assertThat(mOverlayPanelViewController.mOnAnimateCollapsePanelCalled).isFalse();
- }
-
- @Test
- public void animateCollapsePanel_isNotExpanded_doesNotCollapse() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateCollapsePanel(true);
- mOverlayPanelViewController.setPanelExpanded(false);
-
- mOverlayPanelViewController.animateCollapsePanel();
-
- assertThat(mOverlayPanelViewController.mAnimateCollapsePanelCalled).isTrue();
- assertThat(mOverlayPanelViewController.mOnAnimateCollapsePanelCalled).isFalse();
- }
-
- @Test
- public void animateCollapsePanel_isNotVisible_doesNotCollapse() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateCollapsePanel(true);
- mOverlayPanelViewController.setPanelExpanded(true);
- mOverlayPanelViewController.setPanelVisible(false);
-
- mOverlayPanelViewController.animateCollapsePanel();
-
- assertThat(mOverlayPanelViewController.mAnimateCollapsePanelCalled).isTrue();
- assertThat(mOverlayPanelViewController.mOnAnimateCollapsePanelCalled).isFalse();
- }
-
- @Test
- public void animateCollapsePanel_collapses() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateCollapsePanel(true);
- mOverlayPanelViewController.setPanelExpanded(true);
- mOverlayPanelViewController.setPanelVisible(true);
-
- mOverlayPanelViewController.animateCollapsePanel();
-
- assertThat(mOverlayPanelViewController.mOnAnimateCollapsePanelCalled).isTrue();
- }
-
- @Test
- public void animateCollapsePanel_withOverlayFromTopBar_collapsesTowardsTopBar() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- // Mock a panel that has layout size 50 and where the panel is opened.
- int size = 50;
- mockPanelWithSize(size);
- mOverlayPanelViewController.getLayout().setClipBounds(
- new Rect(0, 0, size, size));
- mOverlayPanelViewController.setShouldAnimateCollapsePanel(true);
- mOverlayPanelViewController.setPanelExpanded(true);
- mOverlayPanelViewController.setPanelVisible(true);
- mOverlayPanelViewController.setOverlayDirection(
- OverlayPanelViewController.OVERLAY_FROM_TOP_BAR);
-
- mOverlayPanelViewController.animateCollapsePanel();
-
- ArgumentCaptor<Float> endValueCaptor = ArgumentCaptor.forClass(Float.class);
- verify(mFlingAnimationUtils).apply(
- any(Animator.class), anyFloat(), endValueCaptor.capture(), anyFloat());
- assertThat(endValueCaptor.getValue().intValue()).isEqualTo(0);
- }
-
- @Test
- public void animateCollapsePanel_withOverlayFromBottomBar_collapsesTowardsBottomBar() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- // Mock a panel that has layout size 50 and where the panel is opened.
- int size = 50;
- mockPanelWithSize(size);
- mOverlayPanelViewController.getLayout().setClipBounds(
- new Rect(0, 0, size, size));
- mOverlayPanelViewController.setShouldAnimateCollapsePanel(true);
- mOverlayPanelViewController.setPanelExpanded(true);
- mOverlayPanelViewController.setPanelVisible(true);
- mOverlayPanelViewController.setOverlayDirection(
- OverlayPanelViewController.OVERLAY_FROM_BOTTOM_BAR);
-
- mOverlayPanelViewController.animateCollapsePanel();
-
- ArgumentCaptor<Float> endValueCaptor = ArgumentCaptor.forClass(Float.class);
- verify(mFlingAnimationUtils).apply(
- any(Animator.class), anyFloat(), endValueCaptor.capture(), anyFloat());
- assertThat(endValueCaptor.getValue().intValue()).isEqualTo(
- mOverlayPanelViewController.getLayout().getHeight());
- }
-
- @Test
- public void animateExpandPanel_shouldNotAnimateExpandPanel_doesNotExpand() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateExpandPanel(false);
-
- mOverlayPanelViewController.animateExpandPanel();
-
- assertThat(mOverlayPanelViewController.mAnimateExpandPanelCalled).isTrue();
- assertThat(mOverlayPanelViewController.mOnAnimateExpandPanelCalled).isFalse();
- }
-
- @Test
- public void animateExpandPanel_userNotSetup_doesNotExpand() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateExpandPanel(true);
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(false);
-
- mOverlayPanelViewController.animateExpandPanel();
-
- assertThat(mOverlayPanelViewController.mAnimateExpandPanelCalled).isTrue();
- assertThat(mOverlayPanelViewController.mOnAnimateExpandPanelCalled).isFalse();
- }
-
- @Test
- public void animateExpandPanel_expands() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateExpandPanel(true);
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
-
- mOverlayPanelViewController.animateExpandPanel();
-
- assertThat(mOverlayPanelViewController.mOnAnimateExpandPanelCalled).isTrue();
- }
-
- @Test
- public void animateExpandPanel_withOverlayFromTopBar_expandsToBottom() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- // Mock a panel that has layout size 50 and where the panel is not opened.
- int size = 50;
- mockPanelWithSize(size);
- mOverlayPanelViewController.getLayout().setClipBounds(
- new Rect(0, 0, size, 0));
- mOverlayPanelViewController.setShouldAnimateExpandPanel(true);
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
- mOverlayPanelViewController.setOverlayDirection(
- OverlayPanelViewController.OVERLAY_FROM_TOP_BAR);
-
- mOverlayPanelViewController.animateExpandPanel();
-
- ArgumentCaptor<Float> endValueCaptor = ArgumentCaptor.forClass(Float.class);
- verify(mFlingAnimationUtils).apply(
- any(Animator.class), anyFloat(), endValueCaptor.capture(), anyFloat());
- assertThat(endValueCaptor.getValue().intValue()).isEqualTo(
- mOverlayPanelViewController.getLayout().getHeight());
- }
-
- @Test
- public void animateExpandPanel_withOverlayFromBottomBar_expandsToTop() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- // Mock a panel that has layout size 50 and where the panel is not opened.
- int size = 50;
- mockPanelWithSize(size);
- mOverlayPanelViewController.getLayout().setClipBounds(
- new Rect(0, size, size, size));
- mOverlayPanelViewController.setShouldAnimateExpandPanel(true);
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
- mOverlayPanelViewController.setOverlayDirection(
- OverlayPanelViewController.OVERLAY_FROM_BOTTOM_BAR);
-
- mOverlayPanelViewController.animateExpandPanel();
-
- ArgumentCaptor<Float> endValueCaptor = ArgumentCaptor.forClass(Float.class);
- verify(mFlingAnimationUtils).apply(
- any(Animator.class), anyFloat(), endValueCaptor.capture(), anyFloat());
- assertThat(endValueCaptor.getValue().intValue()).isEqualTo(0);
- }
-
- @Test
- public void animateExpandPanel_setsPanelVisible() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateExpandPanel(true);
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
-
- mOverlayPanelViewController.animateExpandPanel();
-
- assertThat(mOverlayPanelViewController.isPanelVisible()).isTrue();
- }
-
- @Test
- public void animateExpandPanel_setsPanelExpanded() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.setShouldAnimateExpandPanel(true);
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
-
- mOverlayPanelViewController.animateExpandPanel();
-
- assertThat(mOverlayPanelViewController.isPanelExpanded()).isTrue();
- }
-
- @Test
- public void setPanelVisible_setTrue_windowNotVisible_setsWindowVisible() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- when(mOverlayViewGlobalStateController.isWindowVisible()).thenReturn(false);
-
- mOverlayPanelViewController.setPanelVisible(true);
-
- verify(mOverlayViewGlobalStateController).showView(mOverlayPanelViewController);
- }
-
- @Test
- public void setPanelVisible_setTrue_windowVisible_doesNotSetWindowVisible() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- when(mOverlayViewGlobalStateController.isWindowVisible()).thenReturn(true);
-
- mOverlayPanelViewController.setPanelVisible(true);
-
- verify(mOverlayViewGlobalStateController, never()).showView(mOverlayPanelViewController);
- }
-
- @Test
- public void setPanelVisible_setTrue_setLayoutVisible() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.getLayout().setVisibility(View.INVISIBLE);
-
- mOverlayPanelViewController.setPanelVisible(true);
-
- assertThat(mOverlayPanelViewController.getLayout().getVisibility()).isEqualTo(View.VISIBLE);
- }
-
- @Test
- public void setPanelVisible_setFalse_windowVisible_setsWindowNotVisible() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- when(mOverlayViewGlobalStateController.isWindowVisible()).thenReturn(true);
-
- mOverlayPanelViewController.setPanelVisible(false);
-
- verify(mOverlayViewGlobalStateController).hideView(mOverlayPanelViewController);
- }
-
- @Test
- public void setPanelVisible_setFalse_windowNotVisible_doesNotSetWindowNotVisible() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- when(mOverlayViewGlobalStateController.isWindowVisible()).thenReturn(false);
-
- mOverlayPanelViewController.setPanelVisible(false);
-
- verify(mOverlayViewGlobalStateController, never()).hideView(mOverlayPanelViewController);
- }
-
- @Test
- public void setPanelVisible_setFalse_setLayoutInvisible() {
- mOverlayPanelViewController.inflate(mBaseLayout);
- mOverlayPanelViewController.getLayout().setVisibility(View.VISIBLE);
-
- mOverlayPanelViewController.setPanelVisible(false);
-
- assertThat(mOverlayPanelViewController.getLayout().getVisibility()).isEqualTo(
- View.INVISIBLE);
- }
-
- @Test
- public void dragOpenTouchListener_isNotInflated_inflatesView() {
- when(mCarDeviceProvisionedController.isCurrentUserFullySetup()).thenReturn(true);
- assertThat(mOverlayPanelViewController.isInflated()).isFalse();
-
- mOverlayPanelViewController.getDragOpenTouchListener().onTouch(/* v= */ null,
- MotionEvent.obtain(/* downTime= */ 200, /* eventTime= */ 300,
- MotionEvent.ACTION_MOVE, /* x= */ 0, /* y= */ 0, /* metaState= */ 0));
-
- verify(mOverlayViewGlobalStateController).inflateView(mOverlayPanelViewController);
- }
-
- private void mockPanelWithSize(int size) {
- mOverlayPanelViewController.getLayout().setLeftTopRightBottom(0, 0, size, size);
- }
-
- private static class TestOverlayPanelViewController extends OverlayPanelViewController {
-
- boolean mOnAnimateCollapsePanelCalled;
- boolean mAnimateCollapsePanelCalled;
- boolean mOnAnimateExpandPanelCalled;
- boolean mAnimateExpandPanelCalled;
- boolean mOnCollapseAnimationEndCalled;
- boolean mOnExpandAnimationEndCalled;
- boolean mOnOpenScrollStartEnd;
- List<Integer> mOnScrollHeights;
- private boolean mShouldAnimateCollapsePanel;
- private boolean mShouldAnimateExpandPanel;
- private boolean mShouldAllowClosingScroll;
-
- TestOverlayPanelViewController(
- Context context,
- Resources resources,
- int stubId,
- OverlayViewGlobalStateController overlayViewGlobalStateController,
- FlingAnimationUtils.Builder flingAnimationUtilsBuilder,
- CarDeviceProvisionedController carDeviceProvisionedController) {
- super(context, resources, stubId, overlayViewGlobalStateController,
- flingAnimationUtilsBuilder,
- carDeviceProvisionedController);
-
- mOnScrollHeights = new ArrayList<>();
- }
-
- public void setShouldAnimateCollapsePanel(boolean shouldAnimate) {
- mShouldAnimateCollapsePanel = shouldAnimate;
- }
-
- @Override
- protected boolean shouldAnimateCollapsePanel() {
- return mShouldAnimateCollapsePanel;
- }
-
- @Override
- protected void animateCollapsePanel() {
- super.animateCollapsePanel();
- mAnimateCollapsePanelCalled = true;
- }
-
- @Override
- protected void onAnimateCollapsePanel() {
- mOnAnimateCollapsePanelCalled = true;
- }
-
- public void setShouldAnimateExpandPanel(boolean shouldAnimate) {
- mShouldAnimateExpandPanel = shouldAnimate;
- }
-
- @Override
- protected boolean shouldAnimateExpandPanel() {
- return mShouldAnimateExpandPanel;
- }
-
- @Override
- protected void animateExpandPanel() {
- super.animateExpandPanel();
- mAnimateExpandPanelCalled = true;
- }
-
- @Override
- protected void onAnimateExpandPanel() {
- mOnAnimateExpandPanelCalled = true;
- }
-
- @Override
- protected void onCollapseAnimationEnd() {
- mOnCollapseAnimationEndCalled = true;
- }
-
- @Override
- protected void onExpandAnimationEnd() {
- mOnExpandAnimationEndCalled = true;
- }
-
- @Override
- protected void onScroll(int height) {
- mOnScrollHeights.add(height);
- }
-
- @Override
- protected void onOpenScrollStart() {
- mOnOpenScrollStartEnd = true;
- }
-
- public void setShouldAllowClosingScroll(boolean shouldAllow) {
- mShouldAllowClosingScroll = shouldAllow;
- }
-
- @Override
- protected boolean shouldAllowClosingScroll() {
- return mShouldAllowClosingScroll;
- }
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java
deleted file mode 100644
index e784761f6d5d..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewControllerTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.verify;
-
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.view.ViewGroup;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.tests.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class OverlayViewControllerTest extends SysuiTestCase {
- private TestOverlayViewController mOverlayViewController;
- private ViewGroup mBaseLayout;
-
- @Mock
- private OverlayViewGlobalStateController mOverlayViewGlobalStateController;
-
- @Captor
- private ArgumentCaptor<Runnable> mRunnableArgumentCaptor;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(/* testClass= */ this);
-
- mOverlayViewController = new TestOverlayViewController(R.id.overlay_view_controller_stub,
- mOverlayViewGlobalStateController);
-
- mBaseLayout = (ViewGroup) LayoutInflater.from(mContext).inflate(
- R.layout.overlay_view_controller_test, /* root= */ null);
- }
-
- @Test
- public void inflate_layoutInitialized() {
- mOverlayViewController.inflate(mBaseLayout);
-
- assertThat(mOverlayViewController.getLayout().getId()).isEqualTo(
- R.id.overlay_view_controller_test);
- }
-
- @Test
- public void inflate_onFinishInflateCalled() {
- mOverlayViewController.inflate(mBaseLayout);
-
- assertThat(mOverlayViewController.mOnFinishInflateCalled).isTrue();
- }
-
- @Test
- public void start_viewInflated_viewShown() {
- mOverlayViewController.inflate(mBaseLayout);
-
- mOverlayViewController.start();
-
- verify(mOverlayViewGlobalStateController).showView(eq(mOverlayViewController),
- mRunnableArgumentCaptor.capture());
-
- mRunnableArgumentCaptor.getValue().run();
-
- assertThat(mOverlayViewController.mShowInternalCalled).isTrue();
- }
-
- @Test
- public void stop_viewInflated_viewHidden() {
- mOverlayViewController.inflate(mBaseLayout);
-
- mOverlayViewController.stop();
-
- verify(mOverlayViewGlobalStateController).hideView(eq(mOverlayViewController),
- mRunnableArgumentCaptor.capture());
-
- mRunnableArgumentCaptor.getValue().run();
-
- assertThat(mOverlayViewController.mHideInternalCalled).isTrue();
- }
-
- @Test
- public void start_viewNotInflated_viewNotShown() {
- mOverlayViewController.start();
-
- verify(mOverlayViewGlobalStateController).showView(eq(mOverlayViewController),
- mRunnableArgumentCaptor.capture());
-
- mRunnableArgumentCaptor.getValue().run();
-
- assertThat(mOverlayViewController.mShowInternalCalled).isFalse();
- }
-
- @Test
- public void stop_viewNotInflated_viewNotHidden() {
- mOverlayViewController.stop();
-
- verify(mOverlayViewGlobalStateController).hideView(eq(mOverlayViewController),
- mRunnableArgumentCaptor.capture());
-
- mRunnableArgumentCaptor.getValue().run();
-
- assertThat(mOverlayViewController.mHideInternalCalled).isFalse();
- }
-
- private static class TestOverlayViewController extends OverlayViewController {
- boolean mOnFinishInflateCalled = false;
- boolean mShowInternalCalled = false;
- boolean mHideInternalCalled = false;
-
- TestOverlayViewController(int stubId,
- OverlayViewGlobalStateController overlayViewGlobalStateController) {
- super(stubId, overlayViewGlobalStateController);
- }
-
- @Override
- protected void onFinishInflate() {
- mOnFinishInflateCalled = true;
- }
-
- @Override
- protected void showInternal() {
- mShowInternalCalled = true;
- }
-
- @Override
- protected void hideInternal() {
- mHideInternalCalled = true;
- }
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java
deleted file mode 100644
index 9c2931a8ad22..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayViewGlobalStateControllerTest.java
+++ /dev/null
@@ -1,985 +0,0 @@
-/*
- * Copyright (C) 2020 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.car.window;
-
-import static android.view.WindowInsets.Type.navigationBars;
-import static android.view.WindowInsets.Type.statusBars;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewStub;
-import android.view.WindowInsets;
-import android.view.WindowInsetsController;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.car.CarSystemUiTest;
-import com.android.systemui.tests.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.Arrays;
-
-@CarSystemUiTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class OverlayViewGlobalStateControllerTest extends SysuiTestCase {
- private static final int OVERLAY_VIEW_CONTROLLER_1_Z_ORDER = 0;
- private static final int OVERLAY_VIEW_CONTROLLER_2_Z_ORDER = 1;
- private static final int OVERLAY_PANEL_VIEW_CONTROLLER_Z_ORDER = 2;
-
- private OverlayViewGlobalStateController mOverlayViewGlobalStateController;
- private ViewGroup mBaseLayout;
-
- @Mock
- private SystemUIOverlayWindowController mSystemUIOverlayWindowController;
- @Mock
- private OverlayViewMediator mOverlayViewMediator;
- @Mock
- private OverlayViewController mOverlayViewController1;
- @Mock
- private OverlayViewController mOverlayViewController2;
- @Mock
- private OverlayPanelViewController mOverlayPanelViewController;
- @Mock
- private Runnable mRunnable;
- @Mock
- private WindowInsetsController mWindowInsetsController;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(/* testClass= */ this);
-
- mBaseLayout = spy((ViewGroup) LayoutInflater.from(mContext).inflate(
- R.layout.overlay_view_global_state_controller_test, /* root= */ null));
-
- when(mBaseLayout.getWindowInsetsController()).thenReturn(mWindowInsetsController);
-
- when(mSystemUIOverlayWindowController.getBaseLayout()).thenReturn(mBaseLayout);
-
- mOverlayViewGlobalStateController = new OverlayViewGlobalStateController(
- mSystemUIOverlayWindowController);
-
- verify(mSystemUIOverlayWindowController).attach();
- }
-
- @Test
- public void registerMediator_overlayViewMediatorListenersRegistered() {
- mOverlayViewGlobalStateController.registerMediator(mOverlayViewMediator);
-
- verify(mOverlayViewMediator).registerListeners();
- }
-
- @Test
- public void registerMediator_overlayViewMediatorViewControllerSetup() {
- mOverlayViewGlobalStateController.registerMediator(mOverlayViewMediator);
-
- verify(mOverlayViewMediator).setupOverlayContentViewControllers();
- }
-
- @Test
- public void showView_nothingVisible_windowNotFocusable_shouldShowNavBar_navBarsVisible() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(navigationBars());
- }
-
- @Test
- public void showView_nothingVisible_windowNotFocusable_shouldHideNavBar_notHidden() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController, never()).hide(navigationBars());
- }
-
- @Test
- public void showView_nothingVisible_windowNotFocusable_shouldShowStatusBar_statusBarsVisible() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(statusBars());
- }
-
- @Test
- public void showView_nothingVisible_windowNotFocusable_shouldHideStatusBar_notHidden() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(false);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController, never()).hide(statusBars());
- }
-
- @Test
- public void showView_nothingAlreadyShown_shouldShowNavBarFalse_navigationBarsHidden() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).hide(navigationBars());
- }
-
- @Test
- public void showView_nothingAlreadyShown_shouldShowNavBarTrue_navigationBarsShown() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(navigationBars());
- }
-
- @Test
- public void showView_nothingAlreadyShown_shouldShowStatusBarFalse_statusBarsHidden() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).hide(statusBars());
- }
-
- @Test
- public void showView_nothingAlreadyShown_shouldShowStatusBarTrue_statusBarsShown() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(statusBars());
- }
-
- @Test
- public void showView_nothingAlreadyShown_fitsNavBarInsets_insetsAdjusted() {
- setupOverlayViewController1();
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(navigationBars());
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
- }
-
- @Test
- public void showView_nothingAlreadyShown_windowIsSetVisible() {
- setupOverlayViewController1();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setWindowVisible(true);
- }
-
- @Test
- public void showView_nothingAlreadyShown_newHighestZOrder() {
- setupOverlayViewController1();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mHighestZOrder).isEqualTo(
- mOverlayViewController1);
- }
-
- @Test
- public void showView_nothingAlreadyShown_newHighestZOrder_isVisible() {
- setupOverlayViewController1();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsKey(
- OVERLAY_VIEW_CONTROLLER_1_Z_ORDER)).isTrue();
- }
-
- @Test
- public void showView_newHighestZOrder() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mHighestZOrder).isEqualTo(
- mOverlayViewController2);
- }
-
- @Test
- public void showView_newHighestZOrder_shouldShowNavBarFalse_navigationBarsHidden() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).hide(navigationBars());
- }
-
- @Test
- public void showView_newHighestZOrder_shouldShowNavBarTrue_navigationBarsShown() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).show(navigationBars());
- }
-
- @Test
- public void showView_newHighestZOrder_shouldShowStatusBarFalse_statusBarsHidden() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).hide(statusBars());
- }
-
- @Test
- public void showView_newHighestZOrder_shouldShowStatusBarTrue_statusBarsShown() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).show(statusBars());
- }
-
- @Test
- public void showView_newHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
- setupOverlayViewController1();
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(statusBars());
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
- when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(navigationBars());
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
- }
-
- @Test
- public void showView_newHighestZOrder_correctViewsShown() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.keySet().toArray())
- .isEqualTo(Arrays.asList(OVERLAY_VIEW_CONTROLLER_1_Z_ORDER,
- OVERLAY_VIEW_CONTROLLER_2_Z_ORDER).toArray());
- }
-
- @Test
- public void showView_oldHighestZOrder() {
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mHighestZOrder).isEqualTo(
- mOverlayViewController2);
- }
-
- @Test
- public void showView_oldHighestZOrder_shouldShowNavBarFalse_navigationBarsHidden() {
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
- when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).hide(navigationBars());
- }
-
- @Test
- public void showView_oldHighestZOrder_shouldShowNavBarTrue_navigationBarsShown() {
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
- when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(navigationBars());
- }
-
- @Test
- public void showView_oldHighestZOrder_shouldShowStatusBarFalse_statusBarsHidden() {
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
- when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).hide(statusBars());
- }
-
- @Test
- public void showView_oldHighestZOrder_shouldShowStatusBarTrue_statusBarsShown() {
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
- when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(statusBars());
- }
-
- @Test
- public void showView_oldHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(statusBars());
- when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(navigationBars());
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
- }
-
- @Test
- public void showView_oldHighestZOrder_correctViewsShown() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.keySet().toArray())
- .isEqualTo(Arrays.asList(OVERLAY_VIEW_CONTROLLER_1_Z_ORDER,
- OVERLAY_VIEW_CONTROLLER_2_Z_ORDER).toArray());
- }
-
- @Test
- public void showView_somethingAlreadyShown_windowVisibleNotCalled() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mSystemUIOverlayWindowController, never()).setWindowVisible(true);
- }
-
- @Test
- public void showView_viewControllerNotInflated_inflateViewController() {
- setupOverlayViewController2();
- when(mOverlayViewController2.isInflated()).thenReturn(false);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mOverlayViewController2).inflate(mBaseLayout);
- }
-
- @Test
- public void showView_viewControllerInflated_inflateViewControllerNotCalled() {
- setupOverlayViewController2();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController2, mRunnable);
-
- verify(mOverlayViewController2, never()).inflate(mBaseLayout);
- }
-
- @Test
- public void showView_panelViewController_inflateViewControllerNotCalled() {
- setupOverlayPanelViewController();
-
- mOverlayViewGlobalStateController.showView(mOverlayPanelViewController, mRunnable);
-
- verify(mOverlayPanelViewController, never()).inflate(mBaseLayout);
- verify(mOverlayPanelViewController, never()).isInflated();
- }
-
- @Test
- public void showView_showRunnableCalled() {
- setupOverlayViewController1();
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mRunnable).run();
- }
-
- @Test
- public void hideView_viewControllerNotInflated_hideRunnableNotCalled() {
- when(mOverlayViewController2.isInflated()).thenReturn(false);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mRunnable, never()).run();
- }
-
- @Test
- public void hideView_nothingShown_hideRunnableNotCalled() {
- when(mOverlayViewController2.isInflated()).thenReturn(true);
- mOverlayViewGlobalStateController.mZOrderMap.clear();
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mRunnable, never()).run();
- }
-
- @Test
- public void hideView_viewControllerNotShown_hideRunnableNotCalled() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController2.isInflated()).thenReturn(true);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mRunnable, never()).run();
- }
-
- @Test
- public void hideView_viewControllerShown_hideRunnableCalled() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mRunnable).run();
- }
-
- @Test
- public void hideView_viewControllerOnlyShown_noHighestZOrder() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mHighestZOrder).isNull();
- }
-
- @Test
- public void hideView_viewControllerOnlyShown_nothingShown() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.isEmpty()).isTrue();
- }
-
- @Test
- public void hideView_viewControllerOnlyShown_viewControllerNotShown() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsKey(
- OVERLAY_VIEW_CONTROLLER_1_Z_ORDER)).isFalse();
- }
-
- @Test
- public void hideView_newHighestZOrder_twoViewsShown() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mHighestZOrder).isEqualTo(
- mOverlayViewController1);
- }
-
- @Test
- public void hideView_newHighestZOrder_threeViewsShown() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- setupOverlayPanelViewController();
- setOverlayViewControllerAsShowing(mOverlayPanelViewController);
-
- mOverlayViewGlobalStateController.hideView(mOverlayPanelViewController, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mHighestZOrder).isEqualTo(
- mOverlayViewController2);
- }
-
- @Test
- public void hideView_newHighestZOrder_shouldShowNavBarFalse_navigationBarHidden() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).hide(navigationBars());
- }
-
- @Test
- public void hideView_newHighestZOrder_shouldShowNavBarTrue_navigationBarShown() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowNavigationBarInsets()).thenReturn(true);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).show(navigationBars());
- }
-
- @Test
- public void hideView_newHighestZOrder_shouldShowStatusBarFalse_statusBarHidden() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).hide(statusBars());
- }
-
- @Test
- public void hideView_newHighestZOrder_shouldShowStatusBarTrue_statusBarShown() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.shouldShowStatusBarInsets()).thenReturn(true);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mWindowInsetsController).show(statusBars());
- }
-
- @Test
- public void hideView_newHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(navigationBars());
- when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(statusBars());
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
- }
-
- @Test
- public void hideView_oldHighestZOrder() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- assertThat(mOverlayViewGlobalStateController.mHighestZOrder).isEqualTo(
- mOverlayViewController2);
- }
-
- @Test
- public void hideView_oldHighestZOrder_shouldShowNavBarFalse_navigationBarHidden() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).hide(navigationBars());
- }
-
- @Test
- public void hideView_oldHighestZOrder_shouldShowNavBarTrue_navigationBarShown() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController2.shouldShowNavigationBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(navigationBars());
- }
-
- @Test
- public void hideView_oldHighestZOrder_shouldShowStatusBarFalse_statusBarHidden() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(false);
- reset(mWindowInsetsController);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).hide(statusBars());
- }
-
- @Test
- public void hideView_oldHighestZOrder_shouldShowStatusBarTrue_statusBarShown() {
- setupOverlayViewController1();
- setupOverlayViewController2();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- when(mOverlayViewController2.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController2.shouldShowStatusBarInsets()).thenReturn(true);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(statusBars());
- }
-
- @Test
- public void hideView_oldHighestZOrder_fitsNavBarInsets_insetsAdjusted() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(statusBars());
- when(mOverlayViewController2.getInsetTypesToFit()).thenReturn(navigationBars());
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(navigationBars());
- }
-
- @Test
- public void hideView_viewControllerNotOnlyShown_windowNotCollapsed() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- setupOverlayViewController2();
- setOverlayViewControllerAsShowing(mOverlayViewController2);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController2, mRunnable);
-
- verify(mSystemUIOverlayWindowController, never()).setWindowVisible(false);
- }
-
- @Test
- public void hideView_viewControllerOnlyShown_navigationBarShown() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(navigationBars());
- }
-
- @Test
- public void hideView_viewControllerOnlyShown_statusBarShown() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldFocusWindow()).thenReturn(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mWindowInsetsController).show(statusBars());
- }
-
- @Test
- public void hideView_viewControllerOnlyShown_insetsAdjustedToDefault() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(statusBars());
- }
-
- @Test
- public void hideView_viewControllerOnlyShown_windowCollapsed() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setWindowVisible(false);
- }
-
- @Test
- public void setOccludedTrue_viewToHideWhenOccludedVisible_viewHidden() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController1.shouldShowWhenOccluded()).thenReturn(false);
-
- mOverlayViewGlobalStateController.setOccluded(true);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsValue(
- mOverlayViewController1)).isFalse();
- }
-
- @Test
- public void setOccludedTrue_viewToNotHideWhenOccludedVisible_viewShown() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController1.shouldShowWhenOccluded()).thenReturn(true);
-
- mOverlayViewGlobalStateController.setOccluded(true);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsValue(
- mOverlayViewController1)).isTrue();
- }
-
- @Test
- public void hideViewAndThenSetOccludedTrue_viewHiddenForOcclusion_viewHiddenAfterOcclusion() {
- setupOverlayViewController1();
- setOverlayViewControllerAsShowing(mOverlayViewController1);
- when(mOverlayViewController1.shouldShowWhenOccluded()).thenReturn(false);
- mOverlayViewGlobalStateController.setOccluded(true);
-
- mOverlayViewGlobalStateController.hideView(mOverlayViewController1, /* runnable= */ null);
- mOverlayViewGlobalStateController.setOccluded(false);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsValue(
- mOverlayViewController1)).isFalse();
- }
-
- @Test
- public void setOccludedTrueAndThenShowView_viewToNotHideForOcclusion_viewShown() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldShowWhenOccluded()).thenReturn(true);
-
- mOverlayViewGlobalStateController.setOccluded(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsValue(
- mOverlayViewController1)).isTrue();
- }
-
- @Test
- public void setOccludedTrueAndThenShowView_viewToHideForOcclusion_viewHidden() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldShowWhenOccluded()).thenReturn(false);
-
- mOverlayViewGlobalStateController.setOccluded(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsValue(
- mOverlayViewController1)).isFalse();
- }
-
- @Test
- public void setOccludedFalse_viewShownAfterSetOccludedTrue_viewToHideForOcclusion_viewShown() {
- setupOverlayViewController1();
- when(mOverlayViewController1.shouldShowWhenOccluded()).thenReturn(false);
- mOverlayViewGlobalStateController.setOccluded(true);
- setOverlayViewControllerAsShowing(mOverlayViewController1);
-
- mOverlayViewGlobalStateController.setOccluded(false);
-
- assertThat(mOverlayViewGlobalStateController.mZOrderVisibleSortedMap.containsValue(
- mOverlayViewController1)).isTrue();
- }
-
- @Test
- public void inflateView_notInflated_inflates() {
- when(mOverlayViewController2.isInflated()).thenReturn(false);
-
- mOverlayViewGlobalStateController.inflateView(mOverlayViewController2);
-
- verify(mOverlayViewController2).inflate(mBaseLayout);
- }
-
- @Test
- public void inflateView_alreadyInflated_doesNotInflate() {
- when(mOverlayViewController2.isInflated()).thenReturn(true);
-
- mOverlayViewGlobalStateController.inflateView(mOverlayViewController2);
-
- verify(mOverlayViewController2, never()).inflate(mBaseLayout);
- }
-
- @Test
- public void showView_setInsetsToFitByType_setsFitInsetsType() {
- int insetTypeToFit = WindowInsets.Type.navigationBars();
- setupOverlayViewController1();
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(insetTypeToFit);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(insetTypeToFit);
- }
-
- @Test
- public void refreshInsetsToFit_setInsetsToFitBySide_setsFitInsetsSides() {
- int insetSidesToFit = WindowInsets.Side.LEFT;
- setupOverlayViewController1();
- when(mOverlayViewController1.getInsetSidesToFit()).thenReturn(insetSidesToFit);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsSides(insetSidesToFit);
- }
-
- @Test
- public void refreshInsetsToFit_setInsetsToFitBySideUsed_firstFitsAllSystemBars() {
- int insetSidesToFit = WindowInsets.Side.LEFT;
- setupOverlayViewController1();
- when(mOverlayViewController1.getInsetSidesToFit()).thenReturn(insetSidesToFit);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsTypes(WindowInsets.Type.systemBars());
- }
-
- @Test
- public void refreshInsetsToFit_bothInsetTypeAndSideDefined_insetSideTakesPrecedence() {
- int insetTypesToFit = WindowInsets.Type.navigationBars();
- int insetSidesToFit = WindowInsets.Side.LEFT;
- setupOverlayViewController1();
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(insetTypesToFit);
- when(mOverlayViewController1.getInsetSidesToFit()).thenReturn(insetSidesToFit);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController).setFitInsetsSides(insetSidesToFit);
- }
-
- @Test
- public void refreshInsetsToFit_bothInsetTypeAndSideDefined_insetTypeIgnored() {
- int insetTypesToFit = WindowInsets.Type.navigationBars();
- int insetSidesToFit = WindowInsets.Side.LEFT;
- setupOverlayViewController1();
- when(mOverlayViewController1.getInsetTypesToFit()).thenReturn(insetTypesToFit);
- when(mOverlayViewController1.getInsetSidesToFit()).thenReturn(insetSidesToFit);
-
- mOverlayViewGlobalStateController.showView(mOverlayViewController1, mRunnable);
-
- verify(mSystemUIOverlayWindowController, never()).setFitInsetsTypes(insetTypesToFit);
- }
-
- private void setupOverlayViewController1() {
- setupOverlayViewController(mOverlayViewController1, R.id.overlay_view_controller_stub_1,
- R.id.overlay_view_controller_1);
- }
-
- private void setupOverlayViewController2() {
- setupOverlayViewController(mOverlayViewController2, R.id.overlay_view_controller_stub_2,
- R.id.overlay_view_controller_2);
- }
-
- private void setupOverlayPanelViewController() {
- setupOverlayViewController(mOverlayPanelViewController, R.id.overlay_view_controller_stub_3,
- R.id.overlay_view_controller_3);
- }
-
- private void setupOverlayViewController(OverlayViewController overlayViewController,
- int stubId, int inflatedId) {
- ViewStub viewStub = mBaseLayout.findViewById(stubId);
- View layout;
- if (viewStub == null) {
- layout = mBaseLayout.findViewById(inflatedId);
- } else {
- layout = viewStub.inflate();
- }
- when(overlayViewController.getLayout()).thenReturn(layout);
- when(overlayViewController.isInflated()).thenReturn(true);
- when(overlayViewController.getInsetSidesToFit()).thenReturn(
- OverlayViewController.INVALID_INSET_SIDE);
- }
-
- private void setOverlayViewControllerAsShowing(OverlayViewController overlayViewController) {
- mOverlayViewGlobalStateController.showView(overlayViewController, /* show= */ null);
- reset(mSystemUIOverlayWindowController);
- when(mSystemUIOverlayWindowController.getBaseLayout()).thenReturn(mBaseLayout);
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/wm/BarControlPolicyTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/wm/BarControlPolicyTest.java
deleted file mode 100644
index da7cb8e4f6ac..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/wm/BarControlPolicyTest.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (C) 2020 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.wm;
-
-import static android.view.WindowInsets.Type.navigationBars;
-import static android.view.WindowInsets.Type.statusBars;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.car.settings.CarSettings;
-import android.provider.Settings;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class BarControlPolicyTest extends SysuiTestCase {
-
- private static final String PACKAGE_NAME = "sample.app";
-
- @Before
- public void setUp() {
- BarControlPolicy.reset();
- }
-
- @After
- public void tearDown() {
- Settings.Global.clearProviderForTest();
- }
-
- @Test
- public void reloadFromSetting_notSet_doesNotSetFilters() {
- BarControlPolicy.reloadFromSetting(mContext);
-
- assertThat(BarControlPolicy.sImmersiveStatusFilter).isNull();
- }
-
- @Test
- public void reloadFromSetting_invalidPolicyControlString_doesNotSetFilters() {
- String text = "sample text";
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- text
- );
-
- BarControlPolicy.reloadFromSetting(mContext);
-
- assertThat(BarControlPolicy.sImmersiveStatusFilter).isNull();
- }
-
- @Test
- public void reloadFromSetting_validPolicyControlString_setsFilters() {
- String text = "immersive.status=" + PACKAGE_NAME;
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- text
- );
-
- BarControlPolicy.reloadFromSetting(mContext);
-
- assertThat(BarControlPolicy.sImmersiveStatusFilter).isNotNull();
- }
-
- @Test
- public void reloadFromSetting_filtersSet_doesNotSetFiltersAgain() {
- String text = "immersive.status=" + PACKAGE_NAME;
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- text
- );
-
- BarControlPolicy.reloadFromSetting(mContext);
-
- assertThat(BarControlPolicy.reloadFromSetting(mContext)).isFalse();
- }
-
- @Test
- public void getBarVisibilities_policyControlNotSet_showsSystemBars() {
- int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
-
- assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
- assertThat(visibilities[1]).isEqualTo(0);
- }
-
- @Test
- public void getBarVisibilities_immersiveStatusForAppAndMatchingApp_hidesStatusBar() {
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- "immersive.status=" + PACKAGE_NAME);
- BarControlPolicy.reloadFromSetting(mContext);
-
- int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
-
- assertThat(visibilities[0]).isEqualTo(navigationBars());
- assertThat(visibilities[1]).isEqualTo(statusBars());
- }
-
- @Test
- public void getBarVisibilities_immersiveStatusForAppAndNonMatchingApp_showsSystemBars() {
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- "immersive.status=" + PACKAGE_NAME);
- BarControlPolicy.reloadFromSetting(mContext);
-
- int[] visibilities = BarControlPolicy.getBarVisibilities("sample2.app");
-
- assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
- assertThat(visibilities[1]).isEqualTo(0);
- }
-
- @Test
- public void getBarVisibilities_immersiveStatusForAppsAndNonApp_showsSystemBars() {
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- "immersive.status=apps");
- BarControlPolicy.reloadFromSetting(mContext);
-
- int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
-
- assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
- assertThat(visibilities[1]).isEqualTo(0);
- }
-
- @Test
- public void getBarVisibilities_immersiveFullForAppAndMatchingApp_hidesSystemBars() {
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- "immersive.full=" + PACKAGE_NAME);
- BarControlPolicy.reloadFromSetting(mContext);
-
- int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
-
- assertThat(visibilities[0]).isEqualTo(0);
- assertThat(visibilities[1]).isEqualTo(statusBars() | navigationBars());
- }
-
- @Test
- public void getBarVisibilities_immersiveFullForAppAndNonMatchingApp_showsSystemBars() {
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- "immersive.full=" + PACKAGE_NAME);
- BarControlPolicy.reloadFromSetting(mContext);
-
- int[] visibilities = BarControlPolicy.getBarVisibilities("sample2.app");
-
- assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
- assertThat(visibilities[1]).isEqualTo(0);
- }
-
- @Test
- public void getBarVisibilities_immersiveFullForAppsAndNonApp_showsSystemBars() {
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- "immersive.full=apps");
- BarControlPolicy.reloadFromSetting(mContext);
-
- int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME);
-
- assertThat(visibilities[0]).isEqualTo(statusBars() | navigationBars());
- assertThat(visibilities[1]).isEqualTo(0);
- }
-}
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/wm/DisplaySystemBarsControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/wm/DisplaySystemBarsControllerTest.java
deleted file mode 100644
index 391f75e35382..000000000000
--- a/packages/CarSystemUI/tests/src/com/android/systemui/wm/DisplaySystemBarsControllerTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2020 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.wm;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.verify;
-
-import android.car.settings.CarSettings;
-import android.os.Handler;
-import android.os.RemoteException;
-import android.provider.Settings;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-import android.view.IWindowManager;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.wm.shell.common.DisplayController;
-import com.android.wm.shell.common.TransactionPool;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-@SmallTest
-public class DisplaySystemBarsControllerTest extends SysuiTestCase {
-
- private DisplaySystemBarsController mController;
-
- private static final int DISPLAY_ID = 1;
-
- @Mock
- private IWindowManager mIWindowManager;
- @Mock
- private DisplayController mDisplayController;
- @Mock
- private Handler mHandler;
- @Mock
- private TransactionPool mTransactionPool;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
-
- mController = new DisplaySystemBarsController(
- mContext,
- mIWindowManager,
- mDisplayController,
- mHandler,
- mTransactionPool
- );
- }
-
- @Test
- public void onDisplayAdded_setsDisplayWindowInsetsControllerOnWMService()
- throws RemoteException {
- mController.onDisplayAdded(DISPLAY_ID);
-
- verify(mIWindowManager).setDisplayWindowInsetsController(
- eq(DISPLAY_ID), any(DisplaySystemBarsController.PerDisplay.class));
- }
-
- @Test
- public void onDisplayAdded_loadsBarControlPolicyFilters() {
- String text = "sample text";
- Settings.Global.putString(
- mContext.getContentResolver(),
- CarSettings.Global.SYSTEM_BAR_VISIBILITY_OVERRIDE,
- text
- );
-
- mController.onDisplayAdded(DISPLAY_ID);
-
- assertThat(BarControlPolicy.sSettingValue).isEqualTo(text);
- }
-
- @Test
- public void onDisplayRemoved_unsetsDisplayWindowInsetsControllerInWMService()
- throws RemoteException {
- mController.onDisplayAdded(DISPLAY_ID);
-
- mController.onDisplayRemoved(DISPLAY_ID);
-
- verify(mIWindowManager).setDisplayWindowInsetsController(
- DISPLAY_ID, /* displayWindowInsetsController= */ null);
- }
-}