1
0
Fork 0
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:
Lars K.W. Gohlke 2016-07-06 02:02:47 +02:00 committed by Felix Ableitner
parent 49d053f6bc
commit 7e4879a26e

View file

@ -2,6 +2,7 @@ package com.nutomic.syncthingandroid.activities;
import android.app.Fragment; import android.app.Fragment;
import android.app.FragmentManager; import android.app.FragmentManager;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import com.nutomic.syncthingandroid.R; import com.nutomic.syncthingandroid.R;
@ -42,7 +43,13 @@ public class SettingsActivity extends SyncthingActivity {
mFragment = fm.getFragment(savedInstanceState, mFragment = fm.getFragment(savedInstanceState,
savedInstanceState.getString("fragment_name")); savedInstanceState.getString("fragment_name"));
} else { } else {
switch (getIntent().getAction()) { String action = getIntent().getAction();
if (action == null) {
action = ACTION_APP_SETTINGS;
}
switch (action) {
case ACTION_APP_SETTINGS: case ACTION_APP_SETTINGS:
setTitle(R.string.settings_title); setTitle(R.string.settings_title);
mFragment = new SettingsFragment(); mFragment = new SettingsFragment();