Fixes #1949253. Prevents NPE on startup.
This commit is contained in:
@@ -255,6 +255,12 @@ public class Home extends Activity {
|
|||||||
private void bindFavorites(boolean isLaunching) {
|
private void bindFavorites(boolean isLaunching) {
|
||||||
if (!isLaunching || mFavorites == null) {
|
if (!isLaunching || mFavorites == null) {
|
||||||
|
|
||||||
|
if (mFavorites == null) {
|
||||||
|
mFavorites = new LinkedList<ApplicationInfo>();
|
||||||
|
} else {
|
||||||
|
mFavorites.clear();
|
||||||
|
}
|
||||||
|
|
||||||
FileReader favReader;
|
FileReader favReader;
|
||||||
|
|
||||||
// Environment.getRootDirectory() is a fancy way of saying ANDROID_ROOT or "/system".
|
// Environment.getRootDirectory() is a fancy way of saying ANDROID_ROOT or "/system".
|
||||||
@@ -266,12 +272,6 @@ public class Home extends Activity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mFavorites == null) {
|
|
||||||
mFavorites = new LinkedList<ApplicationInfo>();
|
|
||||||
} else {
|
|
||||||
mFavorites.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
final Intent intent = new Intent(Intent.ACTION_MAIN, null);
|
final Intent intent = new Intent(Intent.ACTION_MAIN, null);
|
||||||
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user