Merge pull request #2649 from nextcloud/finishPreferences

Explicitly finish preferences
This commit is contained in:
Mario Đanić 2018-06-05 07:53:40 +02:00 committed by GitHub
commit 648b02ee8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,6 +52,7 @@ import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate; import android.support.v7.app.AppCompatDelegate;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.URLUtil; import android.webkit.URLUtil;
@ -742,6 +743,12 @@ public class Preferences extends PreferenceActivity
return temp; return temp;
} }
@Override
public boolean onOptionsItemSelected(MenuItem item) {
finish();
return super.onOptionsItemSelected(item);
}
private void setupActionBar() { private void setupActionBar() {
ActionBar actionBar = getDelegate().getSupportActionBar(); ActionBar actionBar = getDelegate().getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true);