[manager] Fix null pointer (#55)
This commit is contained in:
parent
cd38c8dda8
commit
aadf2f54b7
|
|
@ -33,20 +33,23 @@ public class MainActivity extends BaseActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
// make sure the versions are consistent
|
// make sure the versions are consistent
|
||||||
Version managerVersion = new Version(BuildConfig.VERSION_NAME);
|
String coreVersionStr = Constants.getXposedVersion();
|
||||||
Version coreVersion = new Version(Constants.getXposedVersion());
|
|
||||||
|
|
||||||
if (!managerVersion.equals(coreVersion)) {
|
if (coreVersionStr != null) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
Version managerVersion = new Version(BuildConfig.VERSION_NAME);
|
||||||
builder.setMessage(R.string.outdated_manager)
|
Version coreVersion = new Version(coreVersionStr);
|
||||||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
if (!managerVersion.equals(coreVersion)) {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
android.os.Process.killProcess(android.os.Process.myPid());
|
builder.setMessage(R.string.outdated_manager)
|
||||||
}
|
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
})
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
.setCancelable(false);
|
android.os.Process.killProcess(android.os.Process.myPid());
|
||||||
Dialog dlg = builder.create();
|
}
|
||||||
dlg.show();
|
})
|
||||||
|
.setCancelable(false);
|
||||||
|
Dialog dlg = builder.create();
|
||||||
|
dlg.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding = ActivityMainBinding.inflate(getLayoutInflater());
|
binding = ActivityMainBinding.inflate(getLayoutInflater());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue