mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-15 12:07:42 +00:00
Merge pull request #7603 from keymanapp/fix/android/package-activity-cleanup
fix(android/app): Add check if bundle to PackageActivity is null
This commit is contained in:
commit
c8259b4d29
1 changed files with 14 additions and 11 deletions
|
|
@ -59,17 +59,20 @@ public class PackageActivity extends AppCompatActivity implements
|
|||
|
||||
final Context context = this;
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
if (bundle != null) {
|
||||
kmpFile = new File(bundle.getString("kmpFile"));
|
||||
if (!kmpFile.exists()) {
|
||||
showErrorToast(kmpFile.getAbsolutePath() + " not found. Unable to extract");
|
||||
return;
|
||||
}
|
||||
installMode = KmpInstallMode.fromString(bundle.getString("installMode"));
|
||||
languageID = bundle.getString("language", null);
|
||||
if (languageID != null && !languageID.isEmpty()) {
|
||||
languageList.add(languageID);
|
||||
}
|
||||
if (bundle == null) {
|
||||
showErrorToast("No bundle for PackageActivity");
|
||||
return;
|
||||
}
|
||||
|
||||
kmpFile = new File(bundle.getString("kmpFile"));
|
||||
if (!kmpFile.exists()) {
|
||||
showErrorToast(kmpFile.getAbsolutePath() + " not found. Unable to extract");
|
||||
return;
|
||||
}
|
||||
installMode = KmpInstallMode.fromString(bundle.getString("installMode"));
|
||||
languageID = bundle.getString("language", null);
|
||||
if (languageID != null && !languageID.isEmpty()) {
|
||||
languageList.add(languageID);
|
||||
}
|
||||
|
||||
File resourceRoot = new File(context.getDir("data", Context.MODE_PRIVATE).toString() + File.separator);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue