Commit Graph

29 Commits

Author SHA1 Message Date
Jason Chiu
cf13dfd4c6 [Safer intents] Permission controller
To avoid implicit intents, make intents launch explicitly.

Test: build, manual
Bug: 323061508
Change-Id: Ib95b417fc8682f690890fc55f321b4fece2c0369
2024-03-28 17:09:37 +08:00
Kate Montgomery
d79959bd7d Merge "Flag off stickiness of show/hide system setting." into tm-dev 2022-05-18 19:21:45 +00:00
Kate Montgomery
dc67fb3283 Flag off stickiness of show/hide system setting.
Bug: 191503437
Test: atest SettingsRoboTests
Change-Id: I96e287cb870265e6ce379e64d01f134f8b3dde59
2022-05-17 14:24:41 +00:00
Chaohui Wang
f9ebeadb33 Fix flicker in Location page when location is off
Caused by the recent location access preferences not have there initial
visible stats set before creating the view.

Refresh the location stats in displayPreference() for them to fix.

Fix: 232342339
Test: manual visual
Change-Id: I4023fd3a5860490e9c6cb733933a19f96824a53d
2022-05-17 10:36:50 +08:00
Chaohui Wang
37375565e5 Fix sub status of LocationSettings
Fix the followings:
Recent access apps are not displayed after toggling off/on
"Use location".
When "Use location" is enabled, "Location for work profile" switch is
disable and gray out.

Fix: 227621199
Fix: 227265216
Test: manual
Change-Id: I9f955a381827eb020fbd0d6ebeb9fced3dec1dcf
2022-04-17 19:38:39 +08:00
Yi-Ling Chuang
0bf3ed99eb Fix flickers on the Location page
Use the UiBlocker and its delegate method to prevent the flicker.

Fixes: 220837804
Test: Go to Settings > Location and see all items appearing at the same
time.

Change-Id: I2095289b9436ca66970b6a868d5c9780f2b19664
2022-03-28 17:27:34 +08:00
Kate Montgomery
4473f60448 Fix settings page flicker in two ways:
1. On create use UiBlocker as recommended by settings team
2. On resume only update the preferences list if the system setting has
   changed.

Bug: 220837804
Test: manual
Change-Id: Ieebd2e7fd74ab05d4fb73aede6868553d7d84af1
2022-03-17 03:32:03 +00:00
Kate Montgomery
9082be89bf Clear recent access list when fragment is paused.
When the fragment is resumed, the recent access list will be reloaded.
Clearing the list ahead of time results in a nicer animation and matches
the animtion when the fragment is first open.

Bug: 191503437
Test: manual
Change-Id: I91d01057acc601e6b2a40401f8bd69c5f5aa3579
2022-02-05 01:27:06 +00:00
Kate Montgomery
14e6c73687 Make the show/hide system setting for recent location acccesses sticky.
This is in order to align the location indicator with the list of recent
accesses shown in Settings.

Bug: 191503437
Test: manual
Change-Id: I7aaa65390567ca644e7137de15c558cdcdb29935
2022-01-20 21:19:44 +00:00
Jordan Jozwiak
e6835713b6 Use refactored RecentAppOpsAccess
Use the new class in place of the old one.

Bug: 182202223
Test: atest RecentLocationAccessPreferenceControllerTest
Change-Id: If0222e79bf8ba2ebe2b1b0a8c043ce39f5a45596
2021-08-16 13:08:47 -07:00
Yu-Han Yang
9e0f9b1dda Hide "recent access" and "see all" when location off
This CL also does the following:
- Change "past 24 hour access" to "recent access"
- Add timestamp to recent access app
- Remove the summary of "Location Services" button

Bug: 180533061
Test: on device
Change-Id: I0405cb6f363243db9f2c9ccf8ab8788b633d1564
2021-03-17 09:36:56 -07:00
Yu-Han Yang
cdb3551be1 Add "See All" page for Recent Location Access
Screenshots: http://shortn/_UPy8KFSeSj

Bug: 180533061
Test: manual on device
Change-Id: Ib77bc0705835520ed1a2d3b7f662088ed838e53e
2021-03-08 13:27:45 -08:00
Yu-Han Yang
f7513d9821 Add showSystem to RecentLocationAccess (Settings)
Bug: 180533061
Test: on device
Change-Id: Ie232bc84d7875897316e978ed3deac9656ebec5f
2021-03-02 14:05:35 -08:00
Wei Wang
22399153dc Revert "Revert "Use location access for recent location apps.""
This reverts commit 5da4f381a6.

Reason for revert: Fixed the crash and roll forward

Test: Manual - tested with work profile.
Change-Id: I8b500b8fddc58cc0d0e5e7f4e54d8bb5cb6b3022
2021-02-24 00:08:04 -08:00
Wei Wang
5da4f381a6 Revert "Use location access for recent location apps."
This reverts commit f383cb44b4.

Reason for revert: crashes on work profiles (http://b/180516388)

Change-Id: Iff499e6a1439b6ecb524a61a9a88fe253799a131
2021-02-18 17:18:20 +00:00
Wei Wang
f383cb44b4 Use location access for recent location apps.
Bug: 177685444
Test: Manual

Change-Id: Id22ce156b20b66cf0607879ea0f9f874b621894d
2021-02-16 12:27:10 -08:00
Joel Galenson
2118f8a63f Revert "Remove Permissions Hub."
This reverts commit 1e7c172ad5.

Bug: 132292477
Test: None.
Change-Id: Icae2cd4edbb22e2f3ea72e20f0ebd818f1ac6629
2019-05-31 07:55:19 -07:00
Joel Galenson
1e7c172ad5 Remove Permissions Hub.
Bug: 132292477
Test: View all related screens.
Change-Id: Ic0e890e04f210f3be3eb80c95e398a40a8062001
2019-05-30 08:30:49 -07:00
Lifu Tang
c359536d0b Add timestamp to recent used apps
Bug: 129354132
Test: build, flash, and test manually
Change-Id: If8e657460da45db019633e95e77dffb1493997c0
2019-04-25 12:47:42 -07:00
Svet Ganov
864765f8b4 Update Settings to use the proper DeviceConfig API.
Exempt-From-Owner-Approval: carry over approval from ag/6908306

bug:124769181

Change-Id: If18d0dc5e55dabf82b7c7a2b6df240fb8b24f736
2019-04-07 22:37:02 -07:00
Joel Galenson
73f089333b Pass the location permission not group to MANAGE_APP_PERMISSION.
I changed the API to support passing in a permission.

Test: Click on entry and open its permission toggle screen.
Test: atest RecentLocationAccessPreferenceControllerTest
Change-Id: I0f789c9e2a05f4b5b03efab6a7dcdb218e565b52
2019-03-20 09:32:50 -07:00
TreeHugger Robot
20886072af Merge changes I85ca2b69,Ibd7a47cb,I79522aab
* changes:
  Update strings for scanning settings
  Display empty message if no recent location access
  Add comment to help translator with plural forms
2019-03-15 21:36:41 +00:00
Lifu Tang
ecea9e96d9 Display empty message if no recent location access
Bug: 120873123
Test: build, flash, and test manually
Change-Id: Ibd7a47cb814fe16ecb1c017865ab28862e17ddcc
2019-03-15 11:43:00 -07:00
Lifu Tang
1328b1f30d Add links to app location permission page
Bug: 121271387
Test: build, flash, and test manually
Change-Id: I188b7113c2421c66b03e8330f141f514991450fe
2019-03-14 16:12:20 -07:00
Fan Zhang
7db118e367 Mass clean up: don't cast class when not needed.
Bug: none
Test: rebuild
Change-Id: Ie3f58a3d5ae99ade28a33dcac80c18de90d4d5b2
2019-02-14 12:26:09 -08:00
Joel Galenson
6bf75d288d Check a flag to see whether or not to show permission usage information.
Bug: 122615235
Test: Manually set/unset flag, see/don't see usage information.
Change-Id: I2d743fc28c5676a2304dac73ae96734241f3fe1d
2019-01-31 10:20:05 -08:00
Joel Galenson
03729e780d Make links to Permissions Hub only show last day.
Default to showing only the last day of accesses.

Also fix a bug caused by the API changing from seconds to
milliseconds.

Test: Click links and see correct filter.
Change-Id: I8456723a434c7144e9115e1834f48d3c1da24d4b
2019-01-22 14:56:51 -08:00
tmfang
3bb1439894 Use new interface for setAppEntity
The interface was changed in SettingsLib,
so we also need to update the usage for setAppEntity.

Test: visual, robotest
Change-Id: I89644c4a7d6aac9cb9a8784b1f91656c8d7d6d26
Bug: 121271387
2019-01-16 16:02:23 +08:00
Lifu Tang
811d95c373 Display recent location access in the widget
Bug: 120239674
Test: manually
Change-Id: Iaf899486bf27c55189eea4c0e913ff1baaf529e5
2018-12-17 20:21:35 -08:00