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

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

Merge "Add a refresh button to the Permissions Hub."

parents 50c5c44e 3e561fe1
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
<!--
     Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="?android:attr/colorControlNormal">

    <path
        android:fillColor="#000000"
        android:pathData="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-0.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14 0.69 4.22 1.78L13 11h7V4l-2.35 2.35z" />
    <path
        android:pathData="M0 0h24v24H0z" />
</vector>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -345,6 +345,9 @@
    <!-- Label for sorting usages by the most recent accesses [CHAR LIMIT=30] -->
    <string name="sort_spinner_recent">Recent</string>

    <!-- Label for refreshing the list of permission usages. [CHAR LIMIT=30] -->
    <string name="permission_usage_refresh">Refresh</string>

    <!-- Help URL, permission usage [DO NOT TRANSLATE] -->
    <string name="help_permission_usage" translatable="false"></string>

+8 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public class PermissionUsageFragment extends SettingsWithButtonHeader implements
    static final int SORT_MOST_ACCESSES = 3;

    private static final int MENU_FILTER_BY_PERMISSIONS = MENU_HIDE_SYSTEM + 1;
    private static final int MENU_REFRESH = MENU_HIDE_SYSTEM + 2;

    private static final String KEY_SHOW_SYSTEM_PREFS = "_show_system";
    private static final String SHOW_SYSTEM_KEY = PermissionUsageFragment.class.getName()
@@ -283,6 +284,10 @@ public class PermissionUsageFragment extends SettingsWithButtonHeader implements
        }
        HelpUtils.prepareHelpMenuItem(getActivity(), menu, R.string.help_permission_usage,
                getClass().getName());
        MenuItem refresh = menu.add(Menu.NONE, MENU_REFRESH, Menu.NONE,
                R.string.permission_usage_refresh);
        refresh.setIcon(R.drawable.ic_refresh);
        refresh.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
    }

    @Override
@@ -301,6 +306,9 @@ public class PermissionUsageFragment extends SettingsWithButtonHeader implements
                updateUI();
                updateMenu();
                break;
            case MENU_REFRESH:
                reloadData();
                break;
        }
        return super.onOptionsItemSelected(item);
    }