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

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

Merge "Add the recently used widget to the list of permissions."

parents f5006d90 d8c2eef7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ LOCAL_STATIC_ANDROID_LIBRARIES += \
    SettingsLibSettingsSpinner \
    SettingsLibLayoutPreference \
    SettingsLibActionButtonsPreference \
    SettingsLibBarChartPreference
    SettingsLibBarChartPreference \
    SettingsLibEntityHeaderWidgets

LOCAL_STATIC_JAVA_LIBRARIES := \
    androidx.annotation_annotation
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  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.
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <include layout="@layout/app_entities_header" />

    <View
        android:id="@+id/divider"
        android:layout_width="match_parent"
        android:layout_height=".75dp"
        android:layout_marginTop="@dimen/app_permission_divider_margin_top"
        android:layout_marginBottom="@dimen/app_permission_divider_margin_bottom"
        android:background="?android:attr/dividerHorizontal"/>

</LinearLayout>
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -126,6 +126,12 @@
    <!-- Summary of number of apps currently granted a single permission [CHAR LIMIT=45] -->
   <string name="app_permissions_group_summary"><xliff:g id="count" example="10">%1$d</xliff:g> of <xliff:g id="count" example="10">%2$d</xliff:g> apps allowed</string>

    <!-- The header for the widget showing recent permission usage [CHAR LIMIT=50] -->
    <string name="permission_usage_header">Recent usage</string>

    <!-- The button to bring the user to view the details of recent permission accesses [CHAR LIMIT=30] -->
    <string name="permission_usage_view_details">View details</string>

   <!-- [CHAR LIMIT=NONE] Menu for manage permissions to control whether system apps are shown -->
   <string name="menu_show_system">Show system</string>
   <!-- [CHAR LIMIT=NONE] Menu for manage permissions to control whether system apps are hidden -->
+4 −0
Original line number Diff line number Diff line
@@ -176,6 +176,10 @@ public class AppPermissionUsageFragment extends SettingsWithButtonHeader {
                continue;
            }
            final AppPermissionGroup group = groupUsage.getGroup();
            // STOPSHIP: Ignore {READ,WRITE}_EXTERNAL_STORAGE since they're going away.
            if (group.getLabel().equals("Storage")) {
                continue;
            }
            Preference pref = new PermissionControlPreference(context, group);
            pref.setTitle(groupUsage.getGroup().getLabel());
            if (groupUsage.getAccessDuration() == 0) {
+1 −1
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ public final class AppPermissionsFragment extends SettingsWithButtonHeader {
            preference.setTitle(group.getLabel());
            String timeDiffStr = Utils.getLastUsageString(context,
                    PermissionUsages.loadLastGroupUsage(context, group));
            // Ignore {READ,WRITE}_EXTERNAL_STORAGE since they're going away.
            // STOPSHIP: Ignore {READ,WRITE}_EXTERNAL_STORAGE since they're going away.
            if (timeDiffStr != null && !group.getLabel().equals("Storage")) {
                preference.setSummary(
                        context.getString(R.string.app_permission_most_recent_summary,
Loading