Preferences: Don't launch a new intent when hitting the back button.

It doesn't really make sense to launch a hard coded activity when navigating back from the Preferences activity. The expected behavior is probably to return the user to the previous activity rather than always throwing them back to the FileDisplayActivity.
This commit is contained in:
eho 2018-04-24 20:20:32 +02:00 committed by tobiasKaminsky
parent f150929566
commit 7982c08c13
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -838,24 +838,6 @@ public class Preferences extends PreferenceActivity
return true;
}
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
super.onMenuItemSelected(featureId, item);
Intent intent;
switch (item.getItemId()) {
case android.R.id.home:
intent = new Intent(getBaseContext(), FileDisplayActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
break;
default:
Log_OC.w(TAG, "Unknown menu item triggered");
return false;
}
return true;
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);