Commit Graph

20 Commits

Author SHA1 Message Date
Joel Galenson
1e7c172ad5 Remove Permissions Hub.
Bug: 132292477
Test: View all related screens.
Change-Id: Ic0e890e04f210f3be3eb80c95e398a40a8062001
2019-05-30 08:30:49 -07:00
Joel Galenson
2102faf3e3 Do not special case the storage permission group.
We are now not showing storage usages in Permission Controller,
including in the API Settings uses.  We can thus remove this code so
that Settings will reflect what Permissions Hub shows.

Bug: 130567526
Test: See the same graph here and in the dashboard.
Change-Id: Iaa7d95b05f4321543ed42833ac3a7babdb9914f0
2019-04-16 15:44:52 -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
TreeHugger Robot
0a214d31f4 Merge "When filtering permission usages by a single permission, default to last day." 2019-03-28 20:27:50 +00:00
Joel Galenson
9a2017ef57 When filtering permission usages by a single permission, default to last day.
The general link to the dashboard shows only the last day, but
clicking on an individual permission did not.

Fixes: 129471807
Test: Click on permission.
Change-Id: Ice3b5b1ac6e2cb5a49cabf3c56167c9d39d3c3a1
2019-03-28 16:07:54 +00:00
Joel Galenson
2512aa1ed6 Add tiebreak rules for bar chart permissions.
If multiple permissions have been used by the same number of apps, we
apply a stable tiebreak so we can be consistent in different places.
We prefer location, then microphone, then camera, and everything else
is alphabetical.

Test: View chart with ties.
Test: atest PermissionBarChartPreferenceControllerTest
Change-Id: I035ac19391788cc720e1c832bf8bd5a60d31e8ad
2019-03-28 08:38:30 -07:00
Joel Galenson
22ab71c7c6 Change the permission bar chart to use the new design
- Each bar is now labeled with the permission name and the subtitle is
slightly different.
- Change some string for new design

Test: View screen.
Test: atest PermissionBarChartPreferenceControllerTest
Change-Id: Ia82f9cbb6255d93c38a27b038ae5af3f066eec28
2019-03-26 13:50:35 +08:00
Joel Galenson
f5c985fc65 RuntimePermissionUsageInfo.getName() now returns a String.
Fixes: 128994612
Test: View the bar chart.
Test: atest PermissionBarChartPreferenceControllerTest
Change-Id: I2f21dfae533544e99495bbfab5d1b5eb3e9282fe
2019-03-20 12:19:25 -07:00
Joel Galenson
ca75538d0c Allow Talkback to speak the permission name in the bar chart.
Bug: 127237805
Test: Enable Talkback, click on access
Change-Id: Ib8d5d3b0fe25e1d3ea4f0b969ff03b663ce716f4
2019-03-05 14:16:24 -08:00
tmfang
44e5aeca65 Bar chart preserves data before rotating device
We saw chart view is gone while rotating device.

Fow now, we save the old permission data before
fragment was recreated.
Then, we can initialize the view quickly with
old data.

Test: robotest, visual
Fixes: 123539793
Change-Id: I230fecc6001a17a0c0205f2a1dcb5dd79f32e744
2019-02-27 11:25:35 +08:00
TreeHugger Robot
9e9dc49cb8 Merge "Add progress bar for Privacy screen" 2019-02-18 03:04:05 +00:00
tmfang
64f5b796c2 Add progress bar for Privacy screen
We show up top linear progress bar
when Settings is querying permission usage data.

Test: visual, robotest
Fixes: 123539793
Change-Id: I350068856d1708eb054d2a205d9ca857214891ce
2019-02-15 11:01:10 +08: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
TreeHugger Robot
caecbc30fa Merge "Show permission group icons in dark mode." 2019-02-05 15:23:50 +00:00
Joel Galenson
e59a5102ab Show permission group icons in dark mode.
Apply the proper tint so that the permission group icons appear in
dark mode.

Change-Id: Ief36e69ed8ae70608f1df79a0e2a17eb79b9f467
Fixes: 123750886
Test: Can see icons in light and dark mode.
2019-02-04 10:09:03 -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
TreeHugger Robot
6bccb4fb14 Merge "Ignore the storage group in the Privacy bar chart." 2019-01-24 16:42:30 +00:00
Joel Galenson
4fa8a61fdf Ignore the storage group in the Privacy bar chart.
We already filter out the storage group in the Permissions Hub because
it's going away and it produces false events.  This also filters it
out in the privacy bar chart so the two are consistent.

Test: Do not see the storage group in the privacy bar chart.
Change-Id: I6d6bc5a767db06a738ae978cb086dad685cff386
2019-01-23 15:28:30 -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
d62afd3700 Create a permission bar chart in Privacy page
Using PermissionControllerManager to get the apps
usage of different permission groups.

And then we visualize the result with bar chart.

Test: visual, robotest
Fixes: 116628158
Change-Id: I0442a04c35d74f715418fac0279bb8f36f6d64df
2019-01-17 21:29:25 +08:00