Commit Graph

5858 Commits

Author SHA1 Message Date
Eran Messeri
f61ccf3fa3 Require work profile to be unlocked for changing notification settings in a different way
Rather than check for the state of the work profile in
LockScreenNotificationPreferenceController#handlePreferenceTreeClick, do so in
the RestrictedListPreference#performClick.
The drawback of checking the state in handlePreferenceTreeClick is that the
preferences are displayed first and then the requirement to unlock/enable the
work profile is displayed on top of it.

This is rather poor UX, so switch to doing the check in performClick and
returning early if the work profile needs to be unlocked/enabled.
This is similar to Patchset 1 from ag/3805482.
The main difference is that the user is returned to the settings screen
both after enabling the work profile and unlocking it.

Test: Manually with TestDPC
Test: atest SettingsRoboTests:RestrictedListPreferenceTest
Bug: 77408805
Merged-In: Id168911b082fffac193cd7c7a658ab92d6ce2c15
Change-Id: I0a3a4ec4dda78e28ee88a11d383eda49e9cf50a6
2018-05-01 21:55:56 +01:00
Eran Messeri
7b36ccdd9b Merge "Require work profile to be unlocked for changing notification settings in a different way" 2018-05-01 20:51:39 +00:00
Doris Ling
61909b5af1 Merge "Fix crash in ExternalSourceDetailPreferenceController." into pi-dev am: 5ddff9371d
am: 674fec7f3c

Change-Id: I0c9610bb467a9443480def643bb96135478473e5
2018-05-01 13:10:23 -07:00
Doris Ling
5ddff9371d Merge "Fix crash in ExternalSourceDetailPreferenceController." into pi-dev 2018-05-01 19:58:56 +00:00
Fan Zhang
10b4bc01f1 Merge "Add a test to verify lifecycle events are triggered" into pi-dev am: 139ebd91c0
am: cd3e50d4a5

Change-Id: I01d49c423c5ef56d59a51a2f03b4f11d956e19bc
2018-05-01 12:33:06 -07:00
Fan Zhang
139ebd91c0 Merge "Add a test to verify lifecycle events are triggered" into pi-dev 2018-05-01 19:04:44 +00:00
Julia Reynolds
5c19e7b6b0 Update zen onboarding ui am: 29ba3601b0
am: fa6482c4a4

Change-Id: I9010987409185d91ff039657cf2b20aeaefd01ad
2018-05-01 11:05:14 -07:00
Julia Reynolds
29ba3601b0 Update zen onboarding ui
Test: robotests
Bug: 78448988
Change-Id: I1e70bf8d28f392b93bb102622340da0af65f4718
2018-05-01 15:11:03 +00:00
android-build-team Robot
d3ff522a0b Merge "Fix a NPE where developer options page crash sometimes." into pi-dev am: d940a680a5
am: aee1191c72

Change-Id: Iac0d2a8551d9c1ba230890dadb1bdf2b6edb12b9
2018-04-30 20:51:39 -07:00
android-build-team Robot
6451b7b91b Merge "Migrate PaymentSettings to DashboardFragment" 2018-05-01 01:37:34 +00:00
Fan Zhang
1f1c7042f5 Add a test to verify lifecycle events are triggered
- Added a footer in feature flags, displaying "Experimental" during
  onStart.
- Ui test to verify the text shows correctly.

Change-Id: Ibf4f79cb3c12e460384e83201a16005a18d6437d
Fixes: 78887450
Test: atest
2018-05-01 01:32:49 +00:00
Doris Ling
c3e4619af1 Fix crash in ExternalSourceDetailPreferenceController.
- Add null check for the package info when trying to retrieve the
install app state. During package update, the package info might becomes
null. The App info activity will finish in that case, but this method
might be called before the activity actually finishes.

Change-Id: I18ff448666dfb403bb6693fccd3e54276db36f37
Fixes: 78257414
Test: make RunSettingsRoboTests
2018-04-30 17:38:29 -07:00
chiujason
ff244c0e40 Migrate PaymentSettings to DashboardFragment
- Move preference related logic to controllers.
- Add some test cases for controllers.

Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.nfc
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
      atest SettingsGatewayTest UniquePreferenceTest
Change-Id: I061a194c170f63fab51974f26c24be43d67d6f6f
2018-04-30 17:24:58 -07:00
Fan Zhang
ecadd0119d Fix a NPE where developer options page crash sometimes.
Developer options page crash for restricted users because the page
removes all preferences while DashboardFeatureProvider tries to
manipulate preferences on screen.

Added a null check to skip changin prefs in DashboardFeatureProvider
because the pref is going to be removed either way.

Change-Id: Ic83fd0dfb2a906605fb1d992d7b36c2163630e89
Fixes: 78655710
Test: robotests
2018-04-30 16:54:10 -07:00
android-build-team Robot
bd825f408b Merge "Fix NPE during unit test" 2018-04-30 23:44:27 +00:00
Fan Zhang
16de45d8ec Fix NPE during unit test
As of ag/3932176 the slice indexer now queries getSummary() for each
controller. So we need to create all necessary objects before
getSummary(). In this case, the PSCD object.

Change-Id: I0162996be37d740f1e450880bf4698acd94ca0ad
Fixes: 78897071
Test: atest
2018-04-30 15:17:22 -07:00
Fan Zhang
7987ccfffd Reset development tile values when turning off dev option.
Change-Id: Ib2e8ea3bfcffca5b2ee3d0ebd3c0c524239d2145
Fixes: 78654641
Test: robotest
2018-04-30 20:27:52 +00:00
Eran Messeri
d204af1aa8 Require work profile to be unlocked for changing notification settings in a different way
Rather than check for the state of the work profile in
LockScreenNotificationPreferenceController#handlePreferenceTreeClick, do so in
the RestrictedListPreference#performClick.
The drawback of checking the state in handlePreferenceTreeClick is that the
preferences are displayed first and then the requirement to unlock/enable the
work profile is displayed on top of it.

This is rather poor UX, so switch to doing the check in performClick and
returning early if the work profile needs to be unlocked/enabled.
This is similar to Patchset 1 from ag/3805482.
The main difference is that the user is returned to the settings screen
both after enabling the work profile and unlocking it.

Test: Manually with TestDPC
Test: atest SettingsRoboTests:RestrictedListPreferenceTest
Bug: 77408805
Change-Id: Id168911b082fffac193cd7c7a658ab92d6ce2c15
2018-04-30 11:29:36 +01:00
android-build-team Robot
167612df0e Merge "Migrate ChooseAccountActivity to DashboardFragment" 2018-04-28 06:10:25 +00:00
Emily Chuang
b279b1c025 Migrate ChooseAccountActivity to DashboardFragment
- Build a controller to generate/manage a list of preferences.
- Move some logics to the controller and add tests.
- Rename to ChooseAccountFragment.

Bug: 73899467
Test: make RunSettingsRoboTests -j
      atest UniquePreferenceTest SettingsGatewayTest
Change-Id: Id2906c4b922ef159d08c803b976671264c54665f
2018-04-27 22:17:23 -07:00
android-build-team Robot
f2dd6d74ac Merge "Remove the gear icon and change tapping event" 2018-04-27 17:13:13 +00:00
android-build-team Robot
f64597b367 Merge "Remove wrapper for LocationManager" 2018-04-27 16:36:54 +00:00
Julia Reynolds
ea360d687d Merge "Redesign zen visual effects screens" into pi-dev 2018-04-27 12:41:58 +00:00
Julia Reynolds
4cf8bfd5b2 Redesign zen visual effects screens
Test: robotests
Bug: 78448988
Change-Id: I3040c1103d76c75601e82e3660a2ace202837ec2
Merged-In: I3040c1103d76c75601e82e3660a2ace202837ec2
2018-04-27 11:12:34 +00:00
Julia Reynolds
302b27ab9a Merge "Redesign zen visual effects screens" 2018-04-27 11:08:57 +00:00
hughchen
7ef4fd8085 Remove the gear icon and change tapping event
* For fix the conflicts in pi-dev, cherry pick the ag/3944480 in
  master and merge the conflict.
* 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.
* Add test to verify when ConnectedBluetoothDeviceUpdater add preference
  the shouldHideSecondTarget() is return true.

Bug: 78490845
Test: make -j40 RunSettingsRoboTests
Change-Id: I25f8455def3c38e24dea9af9e9e29ba37c250f67
2018-04-27 16:35:09 +08:00
TreeHugger Robot
8f73818b03 Merge "Fix crash in anomaly job service" 2018-04-27 03:57:57 +00:00
hjchangliao
6bc467a252 Remove wrapper for LocationManager
Remove LocationManagerWrapper from SettingsLib

Bug: 76167422
Test: RunSettingsRoboTests
Change-Id: I4ee5de7f6a59468e35ab0bfa2845022b7d7efb3a
2018-04-27 03:32:04 +00:00
Ivan Chiang
121d53072e Merge changes I3dd31855,Id5a75217 into pi-dev am: 720a224e00
am: e598b1ae03

Change-Id: I715f7dba77f7ba10314ed4114b9eda1019171253
2018-04-26 19:13:07 -07:00
TreeHugger Robot
720a224e00 Merge changes I3dd31855,Id5a75217 into pi-dev
* changes:
  Show docks on previously connected devices page
  Show Dock devices in Connected devices page
2018-04-27 01:59:16 +00:00
TreeHugger Robot
0e6977da39 Merge "Slices feature supports firmware version." 2018-04-27 01:10:09 +00:00
Maurice Lam
cd26201845 Merge "Hide cancel button in Confirm Lock Pattern" into pi-dev am: fd45210510
am: 160ffd6c4c

Change-Id: Ie21d2b916927cd200eaf1195647dd983ac7594c4
2018-04-26 16:30:58 -07:00
TreeHugger Robot
fd45210510 Merge "Hide cancel button in Confirm Lock Pattern" into pi-dev 2018-04-26 22:58:37 +00:00
Lei Yu
34b82a3505 Merge "Don't show high usage tip when device is charing" into pi-dev am: 3f34ce9a5b
am: 9de539ff0f

Change-Id: I661e0cecc068f56dbd3fa1a0de32a639432a79de
2018-04-26 15:39:52 -07:00
Lei Yu
aff80459f2 Merge "Hook up Adaptive Battery to new flag." into pi-dev am: d2e9b56996
am: 59ba07c2da

Change-Id: I875f0264133f8358b4f85ccba18b672c0a05015f
2018-04-26 15:39:01 -07:00
Lei Yu
1c95856977 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-04-26 15:23:33 -07:00
tmfang
1f37d190c0 Slices feature supports firmware version.
- Migrate FirmwareVersionPreferenceController to BasePreferenceController class.
- Because slices feature needs an unique uri,
  we should avoid same firmware key in my_device_info.xml and device_info_settings.xml.
- Modify test case for new firmware version controller.

Test: slice uri > content://android.settings.slices/intent/my_device_firmware_version
Test: make RunSettingsRoboTests -j
      atest UniquePreferenceTest SettingsGatewayTest
Change-Id: If516bbdb3ddb823db9909123ef694a2beaf5dc66
2018-04-26 15:22:01 -07:00
Lei Yu
3f34ce9a5b Merge "Don't show high usage tip when device is charing" into pi-dev 2018-04-26 22:08:55 +00:00
Lei Yu
d2e9b56996 Merge "Hook up Adaptive Battery to new flag." into pi-dev 2018-04-26 22:07:53 +00:00
Salvador Martinez
60c513d908 Merge "Only start tether when not already enabled" into pi-dev am: f62f91b0b6
am: 964d107491

Change-Id: I0d325498e2ea8526fbc4e6ec4bf579331bf0848b
2018-04-26 14:30:25 -07:00
Jason Monk
0d3322a57b Merge "Push full slice index to device index" into pi-dev am: 3d29ca2893
am: 2332aad2a6

Change-Id: I3563eb7ed2ab93b35b1a950d89ca2466abaa59e3
2018-04-26 14:26:38 -07:00
TreeHugger Robot
f62f91b0b6 Merge "Only start tether when not already enabled" into pi-dev 2018-04-26 20:57:57 +00:00
Jason Monk
3d29ca2893 Merge "Push full slice index to device index" into pi-dev 2018-04-26 20:48:41 +00:00
Matthew Fritze
8c9e0354b4 Merge "Index database before getting Uri Descendants" into pi-dev am: a7fd137e2d
am: 03f1fafaaf

Change-Id: I700fd063084ad0e41289feb552b3a1bfafd3cd57
2018-04-26 13:36:00 -07:00
Matthew Fritze
a7fd137e2d Merge "Index database before getting Uri Descendants" into pi-dev 2018-04-26 20:14:53 +00:00
Fan Zhang
117c0fb6e6 Merge "InputMethodAndSubtypeEnabler use DashboardFragment" 2018-04-26 19:12:11 +00:00
Oscar Shu
f64502ea86 Merge "Hide apps with NETWORK_SETTINGS from special wifi settings" into pi-dev am: 0b302499cd
am: 1635941c9a

Change-Id: Ic13938e0f4e876e3dfaea2049f2a7650b53fa8e1
2018-04-26 11:40:09 -07:00
Oscar Shu
0b302499cd Merge "Hide apps with NETWORK_SETTINGS from special wifi settings" into pi-dev 2018-04-26 18:16:49 +00:00
Julia Reynolds
4aa42fed67 Redesign zen visual effects screens
Test: robotests
Bug: 78448988
Change-Id: I3040c1103d76c75601e82e3660a2ace202837ec2
2018-04-26 18:12:38 +00:00
TreeHugger Robot
5f6937dd88 Merge "Hiding data remaining text when available space is too small." into pi-dev 2018-04-26 17:33:53 +00:00