Avoid NPE by proper initialization instead of null check later on
This commit is contained in:
parent
833adc732e
commit
c7c21cb602
1 changed files with 3 additions and 5 deletions
|
@ -104,6 +104,8 @@ public class UpgradeDatabases extends K9Activity {
|
|||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
decodeExtras();
|
||||
|
||||
// If the databases have already been upgraded there's no point in displaying this activity.
|
||||
if (K9.areDatabasesUpToDate()) {
|
||||
launchOriginalActivity();
|
||||
|
@ -114,8 +116,6 @@ public class UpgradeDatabases extends K9Activity {
|
|||
|
||||
initializeLayout();
|
||||
|
||||
decodeExtras();
|
||||
|
||||
setupBroadcastReceiver();
|
||||
}
|
||||
|
||||
|
@ -180,9 +180,7 @@ public class UpgradeDatabases extends K9Activity {
|
|||
*/
|
||||
private void launchOriginalActivity() {
|
||||
finish();
|
||||
if (mStartIntent != null) {
|
||||
startActivity(mStartIntent);
|
||||
}
|
||||
startActivity(mStartIntent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue