Pass the location permission not group to MANAGE_APP_PERMISSION.

I changed the API to support passing in a permission.

Test: Click on entry and open its permission toggle screen.
Test: atest RecentLocationAccessPreferenceControllerTest
Change-Id: I0f789c9e2a05f4b5b03efab6a7dcdb218e565b52
This commit is contained in:
Joel Galenson
2019-03-20 09:28:35 -07:00
parent cd829aced1
commit 73f089333b

View File

@@ -104,7 +104,7 @@ public class RecentLocationAccessPreferenceController extends AbstractPreference
.setOnClickListener((v) -> {
final Intent intent = new Intent(Intent.ACTION_MANAGE_APP_PERMISSION);
intent.putExtra(Intent.EXTRA_PERMISSION_NAME,
Manifest.permission_group.LOCATION);
Manifest.permission.ACCESS_FINE_LOCATION);
intent.putExtra(Intent.EXTRA_PACKAGE_NAME, access.packageName);
intent.putExtra(Intent.EXTRA_USER, access.userHandle);
mContext.startActivity(intent);