mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
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:
parent
f150929566
commit
7982c08c13
1 changed files with 0 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue