summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-10 10:35:00 -0800
committerAdnan <adnan@cyngn.com>2014-11-19 15:53:56 -0800
commit4e4db4563a7ddf262993a9312781c66d34485ea4 (patch)
treeafdcf8ce885b656e42e062faca390fba0fb9c484 /res
parentc2e0e2b87255a1fb002eadf7735e99614b7de656 (diff)
downloadandroid_packages_apps_Trebuchet-4e4db4563a7ddf262993a9312781c66d34485ea4.tar.gz
android_packages_apps_Trebuchet-4e4db4563a7ddf262993a9312781c66d34485ea4.tar.bz2
android_packages_apps_Trebuchet-4e4db4563a7ddf262993a9312781c66d34485ea4.zip
Protected App [3/3] Trebuchet - Protected Apps - Build fixed to work with LOCAL_SDK_VERSION - Fixed adding components to protected folders and adding protected folders to other folders - Fixed issues with EditText for FolderName - Adding support for Settings hooks - Uses Setting's LockPattern for Protected Apps - Add Read from Settings Secure DB (DO NOT WRITE!) - Protecting a folder updates Launcher without restart - Batch send component visibility
Conflicts: AndroidManifest.xml res/values/preferences_defaults.xml src/com/android/launcher3/AppsCustomizePagedView.java src/com/android/launcher3/Folder.java src/com/android/launcher3/FolderIcon.java src/com/android/launcher3/Launcher.java src/com/android/launcher3/LauncherModel.java src/com/android/launcher3/LauncherProvider.java src/com/android/launcher3/OverviewSettingsPanel.java Change-Id: I41c295e7f2c9abc9b2e77e6e3d39b7ca60d47139
Diffstat (limited to 'res')
-rw-r--r--res/drawable-hdpi/folder_lock.pngbin0 -> 459 bytes
-rw-r--r--res/drawable-hdpi/folder_lock_light.pngbin0 -> 461 bytes
-rw-r--r--res/drawable-hdpi/folder_unlock.pngbin0 -> 480 bytes
-rw-r--r--res/drawable-mdpi/folder_lock.pngbin0 -> 376 bytes
-rw-r--r--res/drawable-mdpi/folder_lock_light.pngbin0 -> 372 bytes
-rw-r--r--res/drawable-mdpi/folder_unlock.pngbin0 -> 383 bytes
-rw-r--r--res/drawable-xhdpi/folder_lock.pngbin0 -> 601 bytes
-rw-r--r--res/drawable-xhdpi/folder_lock_light.pngbin0 -> 601 bytes
-rw-r--r--res/drawable-xhdpi/folder_unlock.pngbin0 -> 613 bytes
-rw-r--r--res/drawable-xxhdpi/folder_lock.pngbin0 -> 750 bytes
-rw-r--r--res/drawable-xxhdpi/folder_lock_light.pngbin0 -> 746 bytes
-rw-r--r--res/drawable-xxhdpi/folder_unlock.pngbin0 -> 775 bytes
-rw-r--r--res/drawable/lock.pngbin19461 -> 0 bytes
-rw-r--r--res/layout/hidden_folder.xml51
-rw-r--r--res/layout/hidden_folder_apps_list_item.xml28
-rw-r--r--res/layout/user_folder.xml50
-rw-r--r--res/values/cm_strings.xml8
-rw-r--r--res/values/dimens.xml1
-rw-r--r--res/values/preferences_defaults.xml2
19 files changed, 123 insertions, 17 deletions
diff --git a/res/drawable-hdpi/folder_lock.png b/res/drawable-hdpi/folder_lock.png
new file mode 100644
index 000000000..9d5ac426d
--- /dev/null
+++ b/res/drawable-hdpi/folder_lock.png
Binary files differ
diff --git a/res/drawable-hdpi/folder_lock_light.png b/res/drawable-hdpi/folder_lock_light.png
new file mode 100644
index 000000000..ca849e8d7
--- /dev/null
+++ b/res/drawable-hdpi/folder_lock_light.png
Binary files differ
diff --git a/res/drawable-hdpi/folder_unlock.png b/res/drawable-hdpi/folder_unlock.png
new file mode 100644
index 000000000..58524209c
--- /dev/null
+++ b/res/drawable-hdpi/folder_unlock.png
Binary files differ
diff --git a/res/drawable-mdpi/folder_lock.png b/res/drawable-mdpi/folder_lock.png
new file mode 100644
index 000000000..c44921a29
--- /dev/null
+++ b/res/drawable-mdpi/folder_lock.png
Binary files differ
diff --git a/res/drawable-mdpi/folder_lock_light.png b/res/drawable-mdpi/folder_lock_light.png
new file mode 100644
index 000000000..293444ec8
--- /dev/null
+++ b/res/drawable-mdpi/folder_lock_light.png
Binary files differ
diff --git a/res/drawable-mdpi/folder_unlock.png b/res/drawable-mdpi/folder_unlock.png
new file mode 100644
index 000000000..93e60fc45
--- /dev/null
+++ b/res/drawable-mdpi/folder_unlock.png
Binary files differ
diff --git a/res/drawable-xhdpi/folder_lock.png b/res/drawable-xhdpi/folder_lock.png
new file mode 100644
index 000000000..5d8610b2f
--- /dev/null
+++ b/res/drawable-xhdpi/folder_lock.png
Binary files differ
diff --git a/res/drawable-xhdpi/folder_lock_light.png b/res/drawable-xhdpi/folder_lock_light.png
new file mode 100644
index 000000000..4342c50f6
--- /dev/null
+++ b/res/drawable-xhdpi/folder_lock_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/folder_unlock.png b/res/drawable-xhdpi/folder_unlock.png
new file mode 100644
index 000000000..a5b99c376
--- /dev/null
+++ b/res/drawable-xhdpi/folder_unlock.png
Binary files differ
diff --git a/res/drawable-xxhdpi/folder_lock.png b/res/drawable-xxhdpi/folder_lock.png
new file mode 100644
index 000000000..16726d395
--- /dev/null
+++ b/res/drawable-xxhdpi/folder_lock.png
Binary files differ
diff --git a/res/drawable-xxhdpi/folder_lock_light.png b/res/drawable-xxhdpi/folder_lock_light.png
new file mode 100644
index 000000000..4226f6af8
--- /dev/null
+++ b/res/drawable-xxhdpi/folder_lock_light.png
Binary files differ
diff --git a/res/drawable-xxhdpi/folder_unlock.png b/res/drawable-xxhdpi/folder_unlock.png
new file mode 100644
index 000000000..95c18cbc2
--- /dev/null
+++ b/res/drawable-xxhdpi/folder_unlock.png
Binary files differ
diff --git a/res/drawable/lock.png b/res/drawable/lock.png
deleted file mode 100644
index 132ad858a..000000000
--- a/res/drawable/lock.png
+++ /dev/null
Binary files differ
diff --git a/res/layout/hidden_folder.xml b/res/layout/hidden_folder.xml
new file mode 100644
index 000000000..ca06f6e48
--- /dev/null
+++ b/res/layout/hidden_folder.xml
@@ -0,0 +1,51 @@
+<?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:background="@color/settings_bg_color"
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/overview_panel_button_spacing"
+ android:paddingRight="@dimen/overview_panel_button_spacing"
+ android:paddingTop="@dimen/overview_panel_bottom_padding"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:clickable="true" >
+
+ <RelativeLayout
+ android:id="@+id/folder_title_lock"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+ <ImageView
+ android:id="@+id/folder_lock_icon"
+ android:layout_width="25dp"
+ android:layout_height="25dp"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:src="@drawable/folder_unlock"
+ android:background="@drawable/listitem_bg" />
+
+ <EditText
+ android:id="@+id/folder_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:paddingBottom="@dimen/folder_name_padding"
+ android:paddingTop="@dimen/folder_name_padding"
+ android:hint="@string/folder_hint_text"
+ android:textColor="@android:color/white"
+ android:textSize="20sp"
+ android:textColorHighlight="#ffCCCCCC"
+ android:textCursorDrawable="@null"
+ android:singleLine="true"
+ android:background="#00000000" />
+ </RelativeLayout>
+
+ <ListView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/hidden_apps_list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="5dp" />
+
+</LinearLayout>
diff --git a/res/layout/hidden_folder_apps_list_item.xml b/res/layout/hidden_folder_apps_list_item.xml
new file mode 100644
index 000000000..13441941e
--- /dev/null
+++ b/res/layout/hidden_folder_apps_list_item.xml
@@ -0,0 +1,28 @@
+<?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="wrap_content"
+ android:minHeight="48dp"
+ android:gravity="center_vertical"
+ android:paddingRight="?android:attr/scrollbarSize"
+ android:background="?android:attr/selectableItemBackground"
+ android:descendantFocusability="blocksDescendants">
+
+ <ImageView android:id="@+id/icon"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_gravity="center" />
+
+ <TextView android:id="@+id/title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="15dip"
+ android:layout_marginRight="6dip"
+ android:layout_marginTop="6dip"
+ android:layout_marginBottom="6dip"
+ android:layout_weight="1"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal" />
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml
index 4e5303ac0..3b1e5be7c 100644
--- a/res/layout/user_folder.xml
+++ b/res/layout/user_folder.xml
@@ -34,21 +34,41 @@
android:hapticFeedbackEnabled="false" />
</ScrollView>
- <com.android.launcher3.FolderEditText
- android:id="@+id/folder_name"
+ <RelativeLayout
+ android:id="@+id/folder_title_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:paddingTop="@dimen/folder_name_padding"
- android:paddingBottom="@dimen/folder_name_padding"
- android:background="#00000000"
- android:hint="@string/folder_hint_text"
- android:textSize="14sp"
- android:textColor="#ff777777"
- android:textColorHighlight="#ffCCCCCC"
- android:textCursorDrawable="@null"
- android:gravity="center_horizontal"
- android:singleLine="true"
- android:imeOptions="flagNoExtractUi"
- android:fontFamily="sans-serif-condensed"/>
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:id="@+id/folder_lock"
+ android:layout_width="@dimen/folder_lock_icon"
+ android:layout_height="@dimen/folder_lock_icon"
+ android:paddingBottom="@dimen/folder_name_padding"
+ android:paddingTop="@dimen/folder_name_padding"
+ android:adjustViewBounds="true"
+ android:layout_alignParentRight="true"
+ android:src="@drawable/folder_unlock" />
+
+ <com.android.launcher3.FolderEditText
+ android:id="@+id/folder_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:background="#00000000"
+ android:fontFamily="sans-serif-condensed"
+ android:gravity="center_horizontal"
+ android:hint="@string/folder_hint_text"
+ android:imeOptions="flagNoExtractUi"
+ android:paddingBottom="@dimen/folder_name_padding"
+ android:paddingTop="@dimen/folder_name_padding"
+ android:singleLine="true"
+ android:textColor="#ff777777"
+ android:textColorHighlight="#ffCCCCCC"
+ android:textCursorDrawable="@null"
+ android:layout_alignParentLeft="true"
+ android:layout_toLeftOf="@id/folder_lock"
+ android:textSize="16sp" />
+ </RelativeLayout>
+
</com.android.launcher3.Folder>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index 2fe669727..23077db1e 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -99,8 +99,6 @@
<!-- Hidden apps -->
<string name="hidden_apps_title">Hidden apps</string>
-
- <!-- Settings -->
<string name="launcher_settings">LAUNCHER SETTINGS</string>
<string name="home_screen_settings">HOME SCREEN SETTINGS</string>
<string name="drawer_settings">DRAWER SETTINGS</string>
@@ -114,8 +112,14 @@
<string name="larger_icons_text">Larger icons</string>
<!-- Text for hiding icon labels -->
<string name="hide_icon_labels">Hide icon labels</string>
+ <!-- Protected Apps -->
+ <string name="protected_app_settings">Protected apps</string>
<!-- Settings states -->
<string name="setting_state_on">ON</string>
<string name="setting_state_off">OFF</string>
<string name="themes_button_text">Themes</string>
+
+ <!-- Hidden states -->
+ <string name="hidden_folder">locked</string>
+ <string name="unhidden_folder">unlocked</string>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ce24d60b8..29a6c39e2 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -99,6 +99,7 @@
<!-- The amount that the preview contents are inset from the preview background -->
<dimen name="folder_preview_padding">4dp</dimen>
<dimen name="folder_name_padding">10dp</dimen>
+ <dimen name="folder_lock_icon">50dp</dimen>
<!-- Sizes for managed profile badges -->
<dimen name="profile_badge_size">24dp</dimen>
diff --git a/res/values/preferences_defaults.xml b/res/values/preferences_defaults.xml
index 6d6d1b29e..d60c0611e 100644
--- a/res/values/preferences_defaults.xml
+++ b/res/values/preferences_defaults.xml
@@ -8,6 +8,8 @@
<bool name="preferences_interface_homescreen_hide_icon_labels_default">false</bool>
<string name="preferences_interface_drawer_scrolling_transition_effect">stack</string>
<bool name="preferences_interface_drawer_scrolling_fade_adjacent_default">false</bool>
+ <bool name="preferences_interface_drawer_remove_hidden_apps_shortcuts_default">true</bool>
+ <bool name="preferences_interface_drawer_remove_hidden_apps_widgets_default">true</bool>
<bool name="preferences_interface_drawer_hide_icon_labels_default">false</bool>
<bool name="preferences_interface_general_icons_large_default">@bool/config_largeIcons</bool>
<string name="preferences_interface_general_icons_text_font_family_default">sans-serif-condensed</string>