Fix NPE for uninstall of extension
This commit is contained in:
parent
c5ae43d66c
commit
886c67e452
@ -27,6 +27,7 @@ import android.app.ProgressDialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
@ -74,8 +75,11 @@ public class InstallExtensionDialogActivity extends FragmentActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
File apkFile = new File(getIntent().getData().getPath());
|
Uri dataUri = getIntent().getData();
|
||||||
apkPath = apkFile.getAbsolutePath();
|
if (dataUri != null) {
|
||||||
|
File apkFile = new File(dataUri.getPath());
|
||||||
|
apkPath = apkFile.getAbsolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
switch (getIntent().getAction()) {
|
switch (getIntent().getAction()) {
|
||||||
case ACTION_UNINSTALL:
|
case ACTION_UNINSTALL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user