Every 2nd install from F-Droid crashed Last Launcher on my phone. Also during some nights the installs of apps from Play Store removed Last Launcher as default launcher. After installing the debug version on my phone I saw the ConcurrentModificationException in the crash log files: 2022-10-23 18-19-33_crash.txt
In the debugger I saw that LauncherActivity.loadApps() is called twice for each program installation. Afterwards SortTask.onPostExecute() is called async. My assumption is that during the first execution of SortTask.onPostExecute() the second call of LauncherActivity.loadApps() happened and changed the mAppsList while the for loop in SortTask.onPostExecute() was still ongoing.
After using LauncherActivity.loadApps() and synchronized (mAppsList) for each for loop Last Launcher was running without a crash for a few days and 20+ program installation.
Every 2nd install from F-Droid crashed Last Launcher on my phone. Also during some nights the installs of apps from Play Store removed Last Launcher as default launcher. After installing the debug version on my phone I saw the ConcurrentModificationException in the crash log files: 2022-10-23 18-19-33_crash.txt
In the debugger I saw that LauncherActivity.loadApps() is called twice for each program installation. Afterwards SortTask.onPostExecute() is called async. My assumption is that during the first execution of SortTask.onPostExecute() the second call of LauncherActivity.loadApps() happened and changed the mAppsList while the for loop in SortTask.onPostExecute() was still ongoing.
After using LauncherActivity.loadApps() and synchronized (mAppsList) for each for loop Last Launcher was running without a crash for a few days and 20+ program installation.