diff options
author | Raj Yengisetty <rajesh@cyngn.com> | 2015-03-25 09:48:36 -0700 |
---|---|---|
committer | Rajesh Yengisetty <rajesh@cyngn.com> | 2015-03-25 17:19:46 +0000 |
commit | 42427c9b63936e82f9fbe934bddb376074a8e331 (patch) | |
tree | d82c92ea0f139e4ccd0b0cf3b753c0958cda8cb7 /src/com/android/launcher3/Folder.java | |
parent | 04ad82dca0800bbd262a253eb4f32ffd3a5b57fb (diff) | |
download | android_packages_apps_Trebuchet-42427c9b63936e82f9fbe934bddb376074a8e331.tar.gz android_packages_apps_Trebuchet-42427c9b63936e82f9fbe934bddb376074a8e331.tar.bz2 android_packages_apps_Trebuchet-42427c9b63936e82f9fbe934bddb376074a8e331.zip |
ProtectedApps: Fix protecting shortcuts with no ComponentNames
Repro:
- Create a shortcut using the contacts widget
- Add to a folder and open app protection screen
- Observe: Trebuchet force closes
Change-Id: I76f6a8b1d024beb36fa804bb3a866913edc335c1
(cherry picked from commit d8bdb0eef3f1799e8b829bcf114f1c3573bce8d6)
Diffstat (limited to 'src/com/android/launcher3/Folder.java')
-rw-r--r-- | src/com/android/launcher3/Folder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index e4f935cf3..692526062 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -299,7 +299,9 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList public void modifyProtectedApps(boolean protect) { ArrayList<ComponentName> components = new ArrayList<ComponentName>(); for (Pair<ComponentName, CharSequence> item : getComponents()) { - components.add(item.first); + if (item.first != null) { + components.add(item.first); + } } Intent intent = new Intent(); |