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

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

Merge changes I30aaca40,Ie050ddba

* changes:
  Have the permission toggle screen link to PermissionAppsFragment.
  Have the permission toggle screen link to AppPermissionsFragment.
parents 3760f907 471631de
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -144,13 +144,20 @@
                    style="@style/FooterText"/>

                <TextView
                    android:id="@+id/usage_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"
                    android:text="@string/app_permission_footer_usage_link"/>
                    android:clickable="true"/>

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

            </LinearLayout>

+5 −2
Original line number Diff line number Diff line
@@ -388,8 +388,11 @@
    <!-- 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_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>
+14 −2
Original line number Diff line number Diff line
@@ -205,14 +205,26 @@ public class AppPermissionFragment extends SettingsWithLargeHeader {
            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 footer1Link = root.requireViewById(R.id.footer_link_1);
        footer1Link.setText(context.getString(R.string.app_permission_footer_app_permissions_link,
                appLabel));
        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,
                    UserHandle.getUserHandleForUid(mGroup.getApp().applicationInfo.uid));
            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);