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

Commit 584b2b2b authored by Jason Monk's avatar Jason Monk
Browse files

Make notifications app list use new manage apps

The designs for Settings have the notification app list using the
same UI as the Manage Apps list, so switch the notification app
list over to the ManageApplications fragment.  This involves
adding some notification based filters and connecting the data
from the Notification Backend to ApplicationsState.

Bug: 19443900
Change-Id: I5e5cdb16890d536613ee59292b89a89b6fb9e2e6
parent becc984a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2084,7 +2084,7 @@
                android:exported="true"
                android:taskAffinity="">
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.notification.NotificationAppList" />
                android:value="com.android.settings.applications.ManageApplications" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/notification_settings" />
        </activity>
+0 −43
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2014 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="match_parent"
    android:orientation="vertical">

    <ListView
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingStart="@dimen/settings_side_margin"
        android:paddingEnd="@dimen/settings_side_margin"
        android:divider="#0000"
        android:dividerHeight="0px"
        android:fastScrollEnabled="true"
        android:listSelector="#0000"
        android:scrollbarStyle="outsideInset" />

    <TextView
        android:id="@android:id/empty"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="@string/loading_notification_apps"
        android:textAppearance="?android:attr/textAppearanceMedium" />

</LinearLayout>
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -6103,6 +6103,12 @@
    <string name="filter_personal_apps">Personal</string>
    <!-- Label for showing work apps in list [CHAR LIMIT=30] -->
    <string name="filter_work_apps">Work</string>
    <!-- Label for showing apps with blocked notifications in list [CHAR LIMIT=30] -->
    <string name="filter_notif_blocked_apps">Blocked</string>
    <!-- Label for showing apps with priority notifications in list [CHAR LIMIT=30] -->
    <string name="filter_notif_priority_apps">Priority</string>
    <!-- Label for showing apps with sensitive notifications in list [CHAR LIMIT=30] -->
    <string name="filter_notif_sensitive_apps">Sensitive</string>

    <!-- Description for advanced menu option to reset app preferences [CHAR LIMIT=NONE] -->
    <string name="reset_app_preferences_description">Reset preferences across all apps to defaults</string>
+5 −1
Original line number Diff line number Diff line
@@ -114,7 +114,11 @@
        <PreferenceScreen
                android:key="app_notifications"
                android:title="@string/app_notifications_title"
                android:fragment="com.android.settings.notification.NotificationAppList" />
                android:fragment="com.android.settings.applications.ManageApplications">
                <extra
                    android:name="classname"
                    android:value="com.android.settings.Settings$NotificationAppListActivity" />
        </PreferenceScreen>

        <!-- Notification access -->
        <Preference
+2 −2
Original line number Diff line number Diff line
@@ -118,10 +118,10 @@ public class AppPicker extends ListActivity {
            holder.appName.setText(info.label);
            if (info.info != null) {
                holder.appIcon.setImageDrawable(info.info.loadIcon(getPackageManager()));
                holder.appSize.setText(info.info.packageName);
                holder.summary.setText(info.info.packageName);
            } else {
                holder.appIcon.setImageDrawable(null);
                holder.appSize.setText("");
                holder.summary.setText("");
            }
            holder.disabled.setVisibility(View.GONE);
            holder.checkBox.setVisibility(View.GONE);
Loading