Skip to content

Commit

Permalink
add Storage Scopes link to "All files access" screen
Browse files Browse the repository at this point in the history
  • Loading branch information
muhomorr authored and thestinger committed May 1, 2023
1 parent 12f9637 commit e5012f3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.android.settings.applications.appinfo;

import android.app.AppOpsManager;
import android.app.StorageScope;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.os.Bundle;
Expand Down Expand Up @@ -68,6 +69,8 @@ public void onCreate(Bundle savedInstanceState) {

mMetricsFeatureProvider =
FeatureFactory.getFactory(getContext()).getMetricsFeatureProvider();

addStorageScopesLink();
}

@Override
Expand Down Expand Up @@ -176,4 +179,11 @@ private static CharSequence getSummary(Context context, PermissionState state) {
? R.string.app_permission_summary_allowed
: R.string.app_permission_summary_not_allowed);
}

private void addStorageScopesLink() {
Preference p = new Preference(requireContext());
p.setTitle(R.string.storage_scopes);
p.setIntent(StorageScope.createConfigActivityIntent(mPackageName));
getPreferenceScreen().addPreference(p);
}
}

0 comments on commit e5012f3

Please sign in to comment.