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:
Joel Galenson
2019-01-22 11:19:42 -08:00
parent d3be363004
commit 03729e780d
2 changed files with 5 additions and 1 deletions

View File

@@ -13,6 +13,8 @@
*/
package com.android.settings.location;
import static java.util.concurrent.TimeUnit.DAYS;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
@@ -74,6 +76,7 @@ public class RecentLocationAccessPreferenceController extends AbstractPreference
final Intent intent = new Intent(Intent.ACTION_REVIEW_PERMISSION_USAGE);
intent.putExtra(Intent.EXTRA_PERMISSION_NAME,
Manifest.permission.ACCESS_FINE_LOCATION);
intent.putExtra(Intent.EXTRA_DURATION_MILLIS, DAYS.toMillis(1));
mContext.startActivity(intent);
});
}