Skip to content

Commit

Permalink
Fix merging some split APKs with no DPI like SoundCloud
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdurazaaqMohammed committed Aug 21, 2024
1 parent 55274a6 commit 983f976
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdk = 4
targetSdk = 35
versionCode = 29
versionName = "1.6.5.5"
versionName = "1.6.5.6"
multiDexEnabled = true
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/reandroid/apk/ApkBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void loadApkDirectory(File dir, boolean recursive, Context context) throw
break;
}
}
if(!hasDpi) throw new MismatchedSplitsException("Error: All DPI/resource splits selected have a mismatched version code.");
if(!hasDpi && !mismatchedDpis.isEmpty()) throw new MismatchedSplitsException("Error: All DPI/resource splits selected have a mismatched version code.");
String s = mismatchedLangs.toString();
if(!TextUtils.isEmpty(s)) {
final CountDownLatch latch = new CountDownLatch(1);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/reandroid/apkeditor/merge/Merger.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import android.content.Context;
import android.net.Uri;
import android.os.Build;

import com.abdurazaaqmohammed.AntiSplit.R;
import com.abdurazaaqmohammed.AntiSplit.main.DeviceSpecsUtil;
Expand Down Expand Up @@ -85,7 +84,8 @@ private static void extractAndLoad(Uri in, File cacheDir, Context context, List<
logMessage(MainActivity.rss.getString(R.string.skipping) + name + MainActivity.rss.getString(R.string.not_apk));
}
bundle.loadApkDirectory(cacheDir, false, context);
} catch (MismatchedSplitsException ignored) {
} catch (MismatchedSplitsException m) {
throw new RuntimeException(m);
} catch (Exception e) {
// If the above failed it probably did not copy any files
// so might as well do it this way instead of trying unreliable methods to see if we need to do this
Expand Down

0 comments on commit 983f976

Please sign in to comment.