Commit Graph

6 Commits

Author SHA1 Message Date
Vincent Wang
818f77cd1f Test Fix SettingRobolectricTest Fail
Bug: b/275023433
Test: NA
Change-Id: If2dcb8f6c196327129ccc9375b190e394c994efa
2023-05-09 06:26:39 +00:00
Adam Bookatz
8311f68065 Fix Settings getProfileIdsWithDisabled usage
In two places, Settings uses getProfileIdsWithDisabled intending to
restrict itself to *managed* profiles, but actually allows for any type
of profile.

Since the declared intent is to only deal with managed profiles, we
update the code to only consider managed profiles.

On devices that only have managed profiles (currently almost all
devices), this cl is a no-op.

Bug: 230495929
Bug: 230534572
Bug: 170249807
Test: com.android.settings.UtilsTest
Test: make RunSettingsRoboTests -j
Change-Id: Id04d45839ef61080b00ca2f91525718cb3a85120
2022-04-27 18:34:07 -07:00
Lifu Tang
885dff9b9a Fix broken test
Bug: 215047319
Test: run test case `LocationInjectedServicesPreferenceControllerTest`
Change-Id: I446f1341042d69ea6657d2f4bf1fbbac48961a4f
2022-01-20 14:23:16 -08:00
Tsung-Mao Fang
69a3271556 Ignore broken tests
Test: run robo tests
Bug: 215047192
Bug: 215047320
Bug: 215047319
Bug: 215046294
Bug: 215046609
Bug: 215047177
Bug: 215046603
Bug: 215046286
Change-Id: I6cfdcde663fa531754ee473421577357890ab540
2022-01-18 12:43:59 +08:00
Tsung-Mao Fang
cbf5ccab0e Fix shifting problem in location services page
Controller generates the injection location settings
in updateState() which happens in onResume.
That's the primary reason why we observed the shifting issue.

In a good practice, we generate preference in displayPreference(),
and then update the setting state in updateState().

In this cl, we create a base controller class to encapsulate
most implementation, and developer need to inject location
services in child class.

Test: Add work profile, and see correct services list.
Bug: 183169265
Change-Id: I5735ba974da87ad83b56791abd8a8637c2317571
2021-06-10 11:26:23 +08:00
Yu-Han Yang
b04a984813 Move injected services for work into a new page
Screenshots: http://shortn/_0BiBfpkHfh

Bug: 180533061
Test: on device
Change-Id: Ie488c80856b4c4cc67789b8239005f6001ed9d87
2021-03-08 13:31:34 -08:00