[manager] Fix null pointer (#55)
This commit is contained in:
parent
cd38c8dda8
commit
aadf2f54b7
|
|
@ -33,9 +33,11 @@ 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 (coreVersionStr != null) {
|
||||||
|
Version managerVersion = new Version(BuildConfig.VERSION_NAME);
|
||||||
|
Version coreVersion = new Version(coreVersionStr);
|
||||||
if (!managerVersion.equals(coreVersion)) {
|
if (!managerVersion.equals(coreVersion)) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setMessage(R.string.outdated_manager)
|
builder.setMessage(R.string.outdated_manager)
|
||||||
|
|
@ -48,6 +50,7 @@ public class MainActivity extends BaseActivity {
|
||||||
Dialog dlg = builder.create();
|
Dialog dlg = builder.create();
|
||||||
dlg.show();
|
dlg.show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
binding = ActivityMainBinding.inflate(getLayoutInflater());
|
binding = ActivityMainBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue