Cherish: Implement HideAppFromRecents (HAFR) Settings
Change-Id: I1afcab02d4daa1f2f01bc537fca9878a1eb0ad6b Signed-off-by: Adin Kwok <adin.kwok@carbonrom.org> Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
committed by
Hưng Phan
parent
ab991e3db7
commit
cebca8ba7d
31
res/drawable/ic_hafr.xml
Normal file
31
res/drawable/ic_hafr.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<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:pathData="M0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="@color/white"
|
||||
android:pathData="M9 7H7v2h2V7zm0 4H7v2h2v-2zm0-8c-1.11 0-2 .9-2 2h2V3zm4
|
||||
12h-2v2h2v-2zm6-12v2h2c0-1.1-.9-2-2-2zm-6 0h-2v2h2V3zM9 17v-2H7c0 1.1 .89 2 2
|
||||
2zm10-4h2v-2h-2v2zm0-4h2V7h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zM5 7H3v12c0 1.1 .89 2 2
|
||||
2h12v-2H5V7zm10-2h2V3h-2v2zm0 12h2v-2h-2v2z" />
|
||||
</vector>
|
||||
BIN
res/drawable/ic_search.png
Normal file
BIN
res/drawable/ic_search.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
48
res/layout/dialog_app_chooser_list.xml
Normal file
48
res/layout/dialog_app_chooser_list.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="48dp" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/searchText"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_toLeftOf="@+id/searchButton"
|
||||
android:ems="10"
|
||||
android:hint="@android:string/search_go" >
|
||||
|
||||
</EditText>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/searchButton"
|
||||
style="@android:style/Widget.Holo.Button.Borderless"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_search" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar1"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0" >
|
||||
</ListView>
|
||||
|
||||
</LinearLayout>
|
||||
61
res/layout/view_app_list.xml
Normal file
61
res/layout/view_app_list.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2006 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:id="@+android:id/widget_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="48dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+android:id/icon"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/LinearLayout1"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_marginLeft="2dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+android:id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
66
res/layout/view_package_list.xml
Normal file
66
res/layout/view_package_list.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2006 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:id="@+android:id/widget_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="48dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+android:id/icon"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:padding="6dp"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_marginLeft="2dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="none"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+android:id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/removeButton"
|
||||
style="@android:style/Widget.Holo.Button.Borderless"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_cancel" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1321,4 +1321,10 @@
|
||||
<!-- SearchBar Style -->
|
||||
<string name="search_bar_style_title">Use Android 12 Search Bar</string>
|
||||
<string name="search_bar_style_summary">Toggle to use Android 12 style searchbar in Settings app. Settings app needs to be manually restarted for the change to take effect.</string>
|
||||
|
||||
<!-- Hide Apps from Recents -->
|
||||
<string name="hide_apps_from_recents_title">Hide apps from recents</string>
|
||||
<string name="hide_apps_from_recents_summary">Prevent apps from appearing in recents</string>
|
||||
<string name="hide_from_recents_add_app">Add app</string>
|
||||
<string name="title_activity_spark_recents_settings">Recents</string>
|
||||
</resources>
|
||||
|
||||
@@ -122,6 +122,14 @@
|
||||
android:icon="@drawable/ic_alarm"
|
||||
android:summary="@string/alarm_blocker_summary"
|
||||
android:fragment="com.cherish.settings.fragments.AlarmBlocker" />
|
||||
|
||||
<PreferenceScreen
|
||||
android:title="@string/hide_apps_from_recents_title"
|
||||
android:summary="@string/hide_apps_from_recents_summary" >
|
||||
<intent android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="com.android.settings"
|
||||
android:targetClass="com.cherish.settings.fragments.HAFRAppListActivity" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="corners_category"
|
||||
|
||||
Reference in New Issue
Block a user