Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62fce79a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make links to Permissions Hub only show last day."

parents 40e9c22f 03729e78
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
                });
    }
+2 −1
Original line number Diff line number Diff line
@@ -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 */);
    }