From 4bed49217951271d02527bb070dc2e7df3d4586e Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Tue, 22 Jan 2019 10:56:10 -0800 Subject: [PATCH] Show only recent accesses Pass an argument to the Permissions Hub telling it to show only accesses in the last minute. Test: Open this dialog, click the button, ensure last minute is selected in the Permissions Hub. Change-Id: I55a11248ba3f08723628cb38861c86254d8e9e11 --- .../src/com/android/systemui/privacy/OngoingPrivacyDialog.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyDialog.kt b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyDialog.kt index 77e25e3249152..26c6d501f2cb2 100644 --- a/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyDialog.kt +++ b/packages/SystemUI/src/com/android/systemui/privacy/OngoingPrivacyDialog.kt @@ -30,6 +30,7 @@ import android.widget.TextView import com.android.systemui.Dependency import com.android.systemui.R import com.android.systemui.plugins.ActivityStarter +import java.util.concurrent.TimeUnit class OngoingPrivacyDialog constructor( val context: Context, @@ -60,7 +61,8 @@ class OngoingPrivacyDialog constructor( setNegativeButton(R.string.ongoing_privacy_dialog_cancel, null) setPositiveButton(R.string.ongoing_privacy_dialog_open_settings, object : DialogInterface.OnClickListener { - val intent = Intent(Intent.ACTION_REVIEW_PERMISSION_USAGE) + val intent = Intent(Intent.ACTION_REVIEW_PERMISSION_USAGE).putExtra( + Intent.EXTRA_DURATION_MILLIS, TimeUnit.MINUTES.toMillis(1)) @Suppress("DEPRECATION") override fun onClick(dialog: DialogInterface?, which: Int) {