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

Commit 8bb5b793 authored by Joel Galenson's avatar Joel Galenson
Browse files

Have the permission toggle screen link to AppPermissionsFragment.

Change the link from AppPermissionUsageFragment to
AppPermissionsFragment.

Fixes: 128423838
Test: View screen and click link.
Change-Id: Ie050ddba855d6a2995e7e2cad1d126b49454a355
parent 94f927f5
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -144,13 +144,12 @@
                    style="@style/FooterText"/>

                <TextView
                    android:id="@+id/usage_link"
                    android:id="@+id/footer_link"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="@style/FooterText"
                    android:textColor="?android:attr/colorAccent"
                    android:clickable="true"
                    android:text="@string/app_permission_footer_usage_link"/>
                    android:clickable="true"/>

            </LinearLayout>

+2 −2
Original line number Diff line number Diff line
@@ -388,8 +388,8 @@
    <!-- Summary for showing a single permission access that has not accessed the permission [CHAR LIMIT=60] -->
    <string name="app_permission_footer_no_usages"><xliff:g id="app" example="Maps">%1$s</xliff:g> has not accessed your <xliff:g id="perm" example="location">%2$s</xliff:g>.</string>

    <!-- Summary for linking to the page that shows an app's use of permissions [CHAR LIMIT=none] -->
    <string name="app_permission_footer_usage_link">View detailed permissions usage</string>
    <!-- Text for linking to the page that shows an app's permissions [CHAR LIMIT=none] -->
    <string name="app_permission_footer_permission_link">See all <xliff:g id="app" example="Maps">%1$s</xliff:g> permissions</string>

    <!-- Summary for showing the time and/or date of the most recent access of a permission by an app [CHAR LIMIT=60] -->
    <string name="app_permission_most_recent_summary">Last access: <xliff:g id="time_date" example="12:42 PM">%1$s</xliff:g></string>
+5 −2
Original line number Diff line number Diff line
@@ -205,8 +205,11 @@ public class AppPermissionFragment extends SettingsWithButtonHeader {
            root.requireViewById(R.id.usage_summary).setVisibility(View.GONE);
        }

        root.requireViewById(R.id.usage_link).setOnClickListener((v) -> {
            Intent intent = new Intent(Intent.ACTION_REVIEW_APP_PERMISSION_USAGE);
        TextView footerLink = root.requireViewById(R.id.footer_link);
        footerLink.setText(context.getString(R.string.app_permission_footer_permission_link,
                appLabel));
        footerLink.setOnClickListener((v) -> {
            Intent intent = new Intent(Intent.ACTION_MANAGE_APP_PERMISSIONS);
            intent.putExtra(Intent.EXTRA_PACKAGE_NAME, mGroup.getApp().packageName);
            intent.putExtra(Intent.EXTRA_USER,
                    UserHandle.getUserHandleForUid(mGroup.getApp().applicationInfo.uid));