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
This commit is contained in:
@@ -76,6 +76,7 @@ public class PermissionBarChartPreferenceController extends BasePreferenceContro
|
||||
.setEmptyText(R.string.permission_bar_chart_empty_text)
|
||||
.setDetailsOnClickListener((View v) -> {
|
||||
final Intent intent = new Intent(Intent.ACTION_REVIEW_PERMISSION_USAGE);
|
||||
intent.putExtra(Intent.EXTRA_DURATION_MILLIS, DAYS.toMillis(1));
|
||||
mContext.startActivity(intent);
|
||||
})
|
||||
.build();
|
||||
@@ -102,7 +103,7 @@ public class PermissionBarChartPreferenceController extends BasePreferenceContro
|
||||
|
||||
private void retrievePermissionUsageData() {
|
||||
mContext.getSystemService(PermissionControllerManager.class).getPermissionUsages(
|
||||
false /* countSystem */, (int) DAYS.toSeconds(1),
|
||||
false /* countSystem */, (int) DAYS.toMillis(1),
|
||||
mContext.getMainExecutor() /* executor */, this /* callback */);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user