Commit Graph

5858 Commits

Author SHA1 Message Date
android-build-team Robot
579300b00c Merge "Show Option of "Screen lock options" on SUW pattern screen page" 2018-05-09 19:09:08 +00:00
Beverly
17c6de8e68 DO NOT MERGE Clear deprecated effects when saving zen policy
- Deprecated effects are set in NotificationManagerService,
so unset them before setting the NotificationPolicy
- When user clicks on Custom, they are brought to the custom vis effects
page instead of resetting custom values to presets

Fixes: 79383781
Test: manual
Test: NotificationManagerServiceTest testSetNotificationPolicy_preP_setOldNewFields
Change-Id: Id6db9ce2aaeed6321389f8dbfbea65eda30c74ad
2018-05-09 18:50:48 +00:00
android-build-team Robot
02ec86a17b Merge "Establish permanently unavailable settings" 2018-05-09 18:14:32 +00:00
android-build-team Robot
c0e0262f9c Merge "Rename SubSettingLauncher.setTitle, add java doc" 2018-05-09 18:01:10 +00:00
android-build-team Robot
27f1e8e1e9 Merge "Don't check battery usage in excessive bg anomaly" into pi-dev 2018-05-09 17:54:30 +00:00
Matthew Fritze
bd376296cd Establish permanently unavailable settings
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Fixes: 79245656
Test: robotests
Change-Id: I42c2cedab66be2d76999795f46470a079cc1ec71
Merged-In: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-05-09 10:03:40 -07:00
Matthew Fritze
ff865c898f Remove the Settings search keywords from Slices
The keywords used for settings search are good when we are highly
confident the user is searching for as setting (settings search),
but not effective in a more general search setting (launcher,
an assistant). Thus, we should not index these keywords as Slice
keywords, and rely on the setting title and screen title as baseline
keywords.

Change-Id: I99e44834454b5949c4883f877e02be47498e06e2
Fixes: 78911847
Test: robotests
2018-05-09 09:01:58 -07:00
Matthew Fritze
f87a1f3f41 Establish permanently unavailable settings
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-05-09 08:36:59 -07:00
Chilun
d3358d8a6f Add index for Hotspot settings page into search
Added index provider into TetherSettings and WifiTetherSettings pages.
Added robotests to check the keys returned by getNonIndexableKeys.
Move repeated code into utility class.

Bug: 74777873
Test: make -j RunSettingsRoboTests
Test: atest UniquePreferenceTest
Change-Id: I6cb09d735afa4867d25a79de733ce8c59634e49b
2018-05-09 14:05:15 +08:00
Hugh Chen
32adc82c8a Merge "Change the title when in call/media state" into pi-dev 2018-05-09 03:06:04 +00:00
android-build-team Robot
d284fe11aa Merge "Prevent crashes on null intent in Slice Builder" into pi-dev am: 69fce6df71
am: 46dd838e8d

Change-Id: I2048cd12599e9d2ad115f2e6b1a6371feb2e72ae
2018-05-08 19:32:29 -07:00
android-build-team Robot
69fce6df71 Merge "Prevent crashes on null intent in Slice Builder" into pi-dev 2018-05-09 02:22:17 +00:00
hughchen
50d5c0a544 Change the title when in call/media state
* Change the title when in call/media state.
  Example: call state show "Available call devices"
           media state show "Available media devices"
* Use isAudioModeOngoingCall() utility function for checking if it is in call status
* Add register test to verify when in onStart() and onStop()
  the BluetoothCallback can be register and unregister.
* Add title string test to verify when in call or media state,
  the title can be changed to corresponding string

Bug: 78150641
Test: make -j40 RunSettingsRoboTests
Change-Id: I6be72cf0cae75525084ac3c5be8524c709f51f7d
Merged-In: I6be72cf0cae75525084ac3c5be8524c709f51f7d
2018-05-09 02:03:38 +00:00
hjchangliao
e86eec0c07 Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.

Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
2018-05-09 10:00:05 +08:00
Hugh Chen
66ec6d48a2 Merge "Change the title when in call/media state" 2018-05-09 01:43:53 +00:00
android-build-team Robot
ea2bace446 Merge "Update strings for summary tip." into pi-dev am: 0e7cff80ef
am: 171ec14458

Change-Id: I564c2f2099bfba4ba9a8327d7b426365bb4f7bd9
2018-05-08 17:57:04 -07:00
android-build-team Robot
0e7cff80ef Merge "Update strings for summary tip." into pi-dev 2018-05-09 00:44:18 +00:00
Lei Yu
06efc034e6 Don't check battery usage in excessive bg anomaly
We don't need it anymore because we don't auto restrict this
anomaly.

Bug: 79210436
Test: robo test still pass
Change-Id: I186213a57f9bf54a0e19985f2c92169c6dc0571c
2018-05-08 16:29:25 -07:00
Lei Yu
db5c1cef71 Merge "Fix crash in anomaly job service" into pi-dev 2018-05-08 22:52:59 +00:00
Lei Yu
adddc30c64 Update strings for summary tip.
1. Strings for the tip preference
2. Strings for the tip dialog

Change-Id: I59c371328ec735a0b22f707d440f3be85cf59c77
Fixes: 79171948
Test: Manual & RunSettingsRoboTests
2018-05-08 15:46:07 -07:00
Matthew Fritze
c301964167 Prevent crashes on null intent in Slice Builder
Change-Id: Ia429dd00fce785bc9d23ac8cf15f6855d7fca7c2
Fixes: 79147458
Test: Robotests
2018-05-08 15:37:42 -07:00
android-build-team Robot
714b15cbdf Merge "Use ListFormatter to join strings" 2018-05-08 20:20:28 +00:00
hughchen
f431088f9d Change the title when in call/media state
* For fix the "Automatic merge failed" in pi-dev, cherry pick the ag/3909960 in
  master. Change android.support.* to androidx.*
* Change the title when in call/media state.
  Example: call state show "Available call devices"
           media state show "Available media devices"
* Use isAudioModeOngoingCall() utility function for checking if it is in call status
* Add register test to verify when in onStart() and onStop()
  the BluetoothCallback can be register and unregister.
* Add title string test to verify when in call or media state,
  the title can be changed to corresponding string

Bug: 78150641
Test: make -j40 RunSettingsRoboTests
Change-Id: I6be72cf0cae75525084ac3c5be8524c709f51f7d
2018-05-08 17:14:59 +08:00
Lei Yu
162c81e1d5 Fix crash in anomaly job service
If job has been stopped by any reason, we should cancel the background
thread, otherwise it will throw SecurityException when dequeuing from
JobParams.

This CL adds a lock to synchronize the method and stops dequeue work
if job has been canceled.

Change-Id: I7732b7f7d444a55a4b4ba6645cd2c16b6f840a6c
Merged-In: I7732b7f7d444a55a4b4ba6645cd2c16b6f840a6c
Fixes: 77968649
Test: RunSettingsRoboTests
2018-05-07 15:19:28 -07:00
Salvador Martinez
d86cbe36b0 Hide hidden network spinner for non-hidden networks
We only want to show this when a user is manually adding a
network. This CL hides it when the user is adding a network
from the detected wifi list.

Test: robotests
Bug: 78436456
Change-Id: I81d738267d4cb21d6b7722ec619faaf8ef1fc965
2018-05-07 14:46:56 -07:00
Julia Reynolds
e9211d58d2 Merge "DO NOT MERGE DND settings redesign" into pi-dev 2018-05-07 18:25:52 +00:00
Christine Franks
a1c70443be Merge "Add night display pref controllers and change UX" into pi-dev 2018-05-07 18:20:25 +00:00
Doris Ling
1e9a979edd Fix improper dismiss of suggestion.
- when handling dismiss of suggestion card, need to check if the
dismissed suggestion can actually be removed from the current
suggestion list before trying to refresh the list.

Change-Id: Ia07b4cb76ef6c61a7d27184c3cba9d99fcc90bb3
Fixes: 76094746
Test: RunSettingsRoboTests
2018-05-04 12:29:20 -07:00
Julia Reynolds
cb6fe394d0 DO NOT MERGE DND settings redesign
Test: robotests
Change-Id: I7b980218feea28e945994c8b7f8a934df6bc11f9
Bug: 78447976
2018-05-04 14:45:43 -04:00
Christine Franks
77df09244e Add night display pref controllers and change UX
- Convert NightDisplaySettings to a DashboardFragment
- Add preference controllers for all Night Display settings
- Change UX for activation from a toggle to a button

Bug: 73739388
Bug: 69912911
Test: make -j100 and make RunSettingsRoboTests -j100
Change-Id: Ia173f16207ba59bf57eb7546cbb1e2dbca67b063
Merged-In: Ia173f16207ba59bf57eb7546cbb1e2dbca67b063
2018-05-04 09:35:29 -07:00
pastychang
aea3e0b205 Show Option of "Screen lock options" on SUW pattern screen page
Add more check for stages of Patern input. Make sure that button "Screen lock options" is visiable.

Test: atest SetupChooseLockPatternTest
Bug: 76431549
Change-Id: Iec7d0eb4a3c16ebd2a504fbbc6de465c341ca43a
2018-05-04 17:31:41 +08:00
android-build-team Robot
7309dddaa3 Merge "Refactor badging notification preference controller." into pi-dev 2018-05-04 05:18:34 +00:00
android-build-team Robot
23474e93f1 Merge "Refactor badging notification preference controller." 2018-05-04 04:17:09 +00:00
Doris Ling
4db6f3dfb5 Fix line break in Opening links app list summary.
- the installed app list is using the app preference layout, which has
the appendix field to the right of the app title and summary. The
appendix and title/summary each has weight 1 to take up half of the
screen width. However, the appendix field is not used in the Opening
links page at all, so that field should be set to GONE to let the
title/summary takes up the whole available width.

Change-Id: Ia066a60dcd0a4c1d8562bd47e173378b49912d18
Fixes: 77954267
Test: visual and make RunSettingsRoboTests
2018-05-03 15:43:58 -07:00
Christine Franks
a9565419b3 Merge "Add night display pref controllers and change UX" 2018-05-03 15:37:37 +00:00
Julia Reynolds
c196a69129 Merge "Update onboarding" 2018-05-03 14:09:33 +00:00
Julia Reynolds
6eabafeacd Update onboarding
Change text and add 'repeat callers'

Test: robotests
Change-Id: I4b7125a2a9d70cf5ec7e4d184528a444d7d2bcf1
Fixes: 78448988
2018-05-03 13:10:15 +00:00
Chuck Liao
a7c14d474a Refactor badging notification preference controller.
- Convert inheritance from AbstractPreferenceController to TogglePreferenceController.
- Register BadgingNotificationPreferenceController in XML.
- Add RoboTests test cases for BadgingNotificationPreferenceController.

Fixes: 67997784
Test: RunSettingsRoboTests
Change-Id: If10744c067f065e7c2465ca1fff66895d7dc1c56
Merged-In: If10744c067f065e7c2465ca1fff66895d7dc1c56
2018-05-03 09:35:18 +00:00
Chuck Liao
6f4d440414 Refactor badging notification preference controller.
- Convert inheritance from AbstractPreferenceController to TogglePreferenceController.
- Register BadgingNotificationPreferenceController in XML.
- Add RoboTests test cases for BadgingNotificationPreferenceController.

Fixes: 67997784
Test: RunSettingsRoboTests
Change-Id: If10744c067f065e7c2465ca1fff66895d7dc1c56
2018-05-03 16:50:12 +08:00
Chalard Jean
0e8e89f576 Show the status of private DNS. am: f249555f97
am: 43a42e4592

Change-Id: I7ba6ec19ab4f373d6d78609f5a8a6bd76749ead7
2018-05-02 22:13:37 -07:00
Chalard Jean
f249555f97 Show the status of private DNS.
This works as follows :
Off → "Off"
Opportunistic, inactive → "Automatic"
Opportunistic, active → "On"
  (stealing a string from notifications for this)
Strict, not resolved and/or not validated → "Couldn't connect"
Strict, resolved and validated → Set up hostname

Bug: 73641539
Test: manual, and updated tests pass
Change-Id: Id1132467288d51aa9cb81a04db65dee438ddfad9
2018-05-03 05:04:47 +00:00
Christine Franks
d67ec89c4b Add night display pref controllers and change UX
- Convert NightDisplaySettings to a DashboardFragment
- Add preference controllers for all Night Display settings
- Change UX for activation from a toggle to a button

Bug: 73739388
Bug: 69912911
Test: make -j100 and make RunSettingsRoboTests -j100
Change-Id: Ia173f16207ba59bf57eb7546cbb1e2dbca67b063
2018-05-02 13:12:26 -07:00
Yueming Wang
4c89530ff2 Merge "Policy transparency dialog should be shown when SwitchBar is restricted." into pi-dev 2018-05-02 14:58:47 +00:00
Julia Reynolds
d521588510 Merge "DO NOT MERGE Update onboarding" into pi-dev 2018-05-02 13:46:17 +00:00
Eran Messeri
a6d36c4e2e Merge "Require work profile to be unlocked for changing notification settings in a different way" into pi-dev 2018-05-02 13:44:48 +00:00
yuemingw
01816f4cbb Policy transparency dialog should be shown when SwitchBar is restricted.
After ag/3818911, touch event of Switchbar is delegated to the switch.
When the SwithBar is disabled by admin, switch is GONE and restricted icon
is VISIBLE instead. We should let touch event be delegaed to restricted
icon and show policy transparency dialog when it's clicked in this case.

Bug: 77898233
Bug: 70206452
Test: Manually via setting disallow_share_location in TestDPC.

Merged-In: Ifa4fa6ebbe7986277f5cd0951a399ea2377a39f9

Change-Id: If4a5349134e6f0e064561b4860966f950ce423b3
2018-05-02 13:38:12 +01:00
Julia Reynolds
16bafbbc74 DO NOT MERGE Update onboarding
Change text and add 'repeat callers'

Test: robotests
Change-Id: I4b7125a2a9d70cf5ec7e4d184528a444d7d2bcf1
Fixes: 78448988
2018-05-02 12:28:33 +00:00
yuemingw
69fa9e0d49 Policy transparency dialog should be shown when SwitchBar is restricted.
After ag/3818911, touch event of Switchbar is delegated to the switch.
When the SwithBar is disabled by admin, switch is GONE and restricted icon
is VISIBLE instead. We should let touch event be delegaed to restricted
icon and show policy transparency dialog when it's clicked in this case.

Cherry-picked from ag/3924516.

Bug: 77898233
Bug: 70206452
Test: Manually via setting disallow_share_location in TestDPC.

Change-Id: Ifa4fa6ebbe7986277f5cd0951a399ea2377a39f9
2018-05-02 09:40:21 +00:00
hughchen
8dcd550d36 Remove the gear icon and change tapping event
* Remove the gear icon in "currently connected" section.
* Change the tapping event in "currently connected" section.
  When tapping device in this section, take user to device detail page.

Bug: 78490845
Test: make -j40 RunSettingsRoboTests
Change-Id: I25f8455def3c38e24dea9af9e9e29ba37c250f67
Merged-In: I25f8455def3c38e24dea9af9e9e29ba37c250f67
2018-05-02 07:15:35 +00:00
jyhshiangwang
4d015b17b3 Use ListFormatter to join strings
Currently in Settings we are using R.string.join_many_items_first, R.string.join_many_items_middle and R.string.join_many_items_last to manually join strings. The join code is messy and the joined string is incorrect in some languages, so we migrate all string join to just use ListFormatter.getInstance().format().

Bug: b/78248791
Test: robotests
Change-Id: I898339978e6e2027587e28994b0280fa46821fd6
2018-05-02 11:15:32 +08:00