mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Using SharedPrefenrece.apply instead of commit to prevent disk IO on main thread" into ub-launcher3-burnaby-polish
This commit is contained in:
@@ -82,7 +82,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
|
||||
strings = new HashSet<String>(strings);
|
||||
}
|
||||
strings.add(encoded);
|
||||
sharedPrefs.edit().putStringSet(APPS_PENDING_INSTALL, strings).commit();
|
||||
sharedPrefs.edit().putStringSet(APPS_PENDING_INSTALL, strings).apply();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
|
||||
newStringsIter.remove();
|
||||
}
|
||||
}
|
||||
sp.edit().putStringSet(APPS_PENDING_INSTALL, newStrings).commit();
|
||||
sp.edit().putStringSet(APPS_PENDING_INSTALL, newStrings).apply();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
|
||||
infos.add(info);
|
||||
}
|
||||
}
|
||||
sharedPrefs.edit().putStringSet(APPS_PENDING_INSTALL, new HashSet<String>()).commit();
|
||||
sharedPrefs.edit().putStringSet(APPS_PENDING_INSTALL, new HashSet<String>()).apply();
|
||||
return infos;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user