don't crash when launching an app that isn't installed
This fixes the following crash: * Install an app form F-Droid * go to home screen * uninstall app * quickly switch to F-Droid the button will still show 'run' for a few seconds * launch the app you just uninstalled
This commit is contained in:
parent
9ffab6db0c
commit
f32ed1eaed
@ -736,7 +736,12 @@ public class AppDetails2 extends AppCompatActivity
|
||||
@Override
|
||||
public void launchApk() {
|
||||
Intent intent = getPackageManager().getLaunchIntentForPackage(app.packageName);
|
||||
if (intent != null) {
|
||||
startActivity(intent);
|
||||
} else {
|
||||
// This can happen when the app was just uninstalled.
|
||||
Toast.makeText(this, R.string.app_not_installed, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user