Skip to content

Commit c245b49

Browse files
committed
fix: avoid two most frequent crashes
java.lang.IllegalArgumentException in de.szalkowski.activitylauncher.AsyncProvider.onPostExecute java.lang.IllegalArgumentException in com.cyee.theme.ThemePackParser.drawableToBitmap
1 parent cc7ce18 commit c245b49

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

ActivityLauncherApp/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="de.szalkowski.activitylauncher"
4-
android:versionCode="13"
5-
android:versionName="1.8.1" >
4+
android:versionCode="14"
5+
android:versionName="1.8.2" >
66

77
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
88

ActivityLauncherApp/src/main/java/de/szalkowski/activitylauncher/AsyncProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ protected void onPostExecute(ReturnType result) {
5555
}
5656

5757
if (this.progress != null) {
58-
this.progress.dismiss();
58+
try {
59+
this.progress.dismiss();
60+
}
61+
catch (IllegalArgumentException e) { /* ignore */ }
5962
}
6063
}
6164

ActivityLauncherApp/src/main/java/de/szalkowski/activitylauncher/MyActivityInfo.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public class MyActivityInfo implements Comparable<MyActivityInfo> {
2424
this.icon = act.loadIcon(pm);
2525
} catch (ClassCastException e) {
2626
this.icon = pm.getDefaultActivityIcon();
27+
} catch (IllegalArgumentException e) {
28+
this.icon = pm.getDefaultActivityIcon();
2729
}
2830
this.icon_resource = act.getIconResource();
2931
} catch (NameNotFoundException e) {

0 commit comments

Comments
 (0)