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

Commit ae2f2b52 authored by fanzhang172's avatar fanzhang172 Committed by Fan Zhang
Browse files

Add recent apps in app & notification

- Introduce a RecentAppsPreferenceControler, which queries
  UsageStatsManager and displays a list of recently used apps.

- Add a control flag for this feature, intially set to false.

- Make ManageApplications a static pref item instead of dynamic one.
  This makes the RecentAppController easier to control "See all"
  preference, which is backed by ManageApplications.

- Also adjust app_items.xml layout to make app item UI consistent with
  preference item.

Change-Id: I0b9e1784faed32b3055ebf96ef98b6a5e422de50
Fix: 33265548
Test: robotests
parent c9050262
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -958,11 +958,6 @@
                <category android:name="android.intent.category.VOICE_LAUNCH" />
                <category android:name="com.android.settings.SHORTCUT" />
            </intent-filter>
            <intent-filter android:priority="200">
                <action android:name="com.android.settings.action.SETTINGS" />
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                android:value="com.android.settings.category.ia.apps" />
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.applications.ManageApplications" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+27 −0
Original line number Diff line number Diff line
<!--
  Copyright (C) 2017 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:autoMirrored="true"
    android:height="24dp"
    android:width="24dp"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0"
    android:tint="?android:attr/colorControlNormal">
    <path android:fillColor="#FF000000"
          android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z" />
</vector>
+4 −4
Original line number Diff line number Diff line
@@ -18,16 +18,16 @@
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="72dp"
    android:paddingTop="16dp"
    android:paddingBottom="16dp"
    android:paddingTop="12dp"
    android:paddingBottom="12dp"
    android:gravity="top"
    android:columnCount="3"
    android:duplicateParentState="true">

    <ImageView
        android:id="@android:id/icon"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_gravity="center"
        android:scaleType="fitXY"
        android:layout_marginEnd="16dip"
+3 −0
Original line number Diff line number Diff line
@@ -105,4 +105,7 @@
    <!-- Whether or not we should tint the icon color on setting pages. -->
    <bool name="config_tintSettingIcon">true</bool>

    <!-- Whether or not App & Notification screen should display recently used apps -->
    <bool name="config_display_recent_apps">false</bool>

</resources>
+4 −0
Original line number Diff line number Diff line
@@ -3470,6 +3470,10 @@
    <string name="install_applications">Unknown sources</string>
    <!-- Applications settings screen, setting check box title. If checked, the system allows installation of applications that are downloaded from random places, such as web sites.  [CHAR LIMIT=30] -->
    <string name="install_applications_title">Allow all app sources</string>
    <!-- Category title listing recently used apps [CHAR_LIMIT=50]-->
    <string name="recent_app_category_title">Recently used apps</string>
    <!-- Preference title for showing all apps on device [CHAR_LIMIT=50]-->
    <string name="see_all_apps_title">See all apps</string>
    <!-- Warning that appears below the unknown sources switch in settings -->
    <string name="install_all_warning" product="tablet">
Loading