Преглед на файлове

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.
eho преди 7 години
родител
ревизия
7982c08c13
променени са 1 файла, в които са добавени 0 реда и са изтрити 18 реда
  1. 0 18
      src/main/java/com/owncloud/android/ui/activity/Preferences.java

+ 0 - 18
src/main/java/com/owncloud/android/ui/activity/Preferences.java

@@ -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);