فهرست منبع

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