mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +00:00
fix NPE, when pressing back button on LogActivity (fixes #604)
This commit is contained in:
parent
49d053f6bc
commit
7e4879a26e
1 changed files with 8 additions and 1 deletions
|
@ -2,6 +2,7 @@ package com.nutomic.syncthingandroid.activities;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
|
@ -42,7 +43,13 @@ public class SettingsActivity extends SyncthingActivity {
|
|||
mFragment = fm.getFragment(savedInstanceState,
|
||||
savedInstanceState.getString("fragment_name"));
|
||||
} else {
|
||||
switch (getIntent().getAction()) {
|
||||
String action = getIntent().getAction();
|
||||
|
||||
if (action == null) {
|
||||
action = ACTION_APP_SETTINGS;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case ACTION_APP_SETTINGS:
|
||||
setTitle(R.string.settings_title);
|
||||
mFragment = new SettingsFragment();
|
||||
|
|
Loading…
Reference in a new issue