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

Commit 471631de authored by Joel Galenson's avatar Joel Galenson
Browse files

Have the permission toggle screen link to PermissionAppsFragment.

Fixes: 128423838
Test: View screen and click link.
Change-Id: I30aaca4076a88d9d8739a24cac7cd7fd36d0ab59
parent 8bb5b793
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -144,7 +144,15 @@
                    style="@style/FooterText"/>

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

                <TextView
                    android:id="@+id/footer_link_2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="@style/FooterText"
+4 −1
Original line number Diff line number Diff line
@@ -389,7 +389,10 @@
    <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>

    <!-- 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>
    <string name="app_permission_footer_app_permissions_link">See all <xliff:g id="app" example="Maps">%1$s</xliff:g> permissions</string>

    <!-- Text for linking to the page that shows the apps with a given permission [CHAR LIMIT=none] -->
    <string name="app_permission_footer_permission_apps_link">See all apps with the <xliff:g id="perm" example="Location">%1$s</xliff:g> permission</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>
+12 −3
Original line number Diff line number Diff line
@@ -205,10 +205,10 @@ public class AppPermissionFragment extends SettingsWithButtonHeader {
            root.requireViewById(R.id.usage_summary).setVisibility(View.GONE);
        }

        TextView footerLink = root.requireViewById(R.id.footer_link);
        footerLink.setText(context.getString(R.string.app_permission_footer_permission_link,
        TextView footer1Link = root.requireViewById(R.id.footer_link_1);
        footer1Link.setText(context.getString(R.string.app_permission_footer_app_permissions_link,
                appLabel));
        footerLink.setOnClickListener((v) -> {
        footer1Link.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,
@@ -216,6 +216,15 @@ public class AppPermissionFragment extends SettingsWithButtonHeader {
            context.startActivity(intent);
        });

        TextView footer2Link = root.requireViewById(R.id.footer_link_2);
        footer2Link.setText(context.getString(R.string.app_permission_footer_permission_apps_link,
                mGroup.getLabel()));
        footer2Link.setOnClickListener((v) -> {
            Intent intent = new Intent(Intent.ACTION_MANAGE_PERMISSION_APPS);
            intent.putExtra(Intent.EXTRA_PERMISSION_NAME, mGroup.getName());
            context.startActivity(intent);
        });

        mRadioGroup = root.requireViewById(R.id.radiogroup);
        mAlwaysButton = root.requireViewById(R.id.allow_radio_button);
        mForegroundOnlyButton = root.requireViewById(R.id.foreground_only_radio_button);