浏览代码

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes (codacy)

AndyScherzinger 8 年之前
父节点
当前提交
b44320076b

+ 7 - 7
src/main/java/com/owncloud/android/files/InstantUploadBroadcastReceiver.java

@@ -56,6 +56,13 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
     // http://developer.android.com/reference/android/hardware/Camera.html#ACTION_NEW_VIDEO
     private static final String NEW_VIDEO_ACTION = "android.hardware.action.NEW_VIDEO";
 
+    /**
+     * Because we support NEW_PHOTO_ACTION and NEW_PHOTO_ACTION_UNOFFICIAL it can happen that
+     * handleNewPictureAction is called twice for the same photo. Use this simple static variable to
+     * remember last uploaded photo to filter duplicates. Must not be null!
+     */
+    static String lastUploadedPhotoPath = "";
+
     @Override
     public void onReceive(Context context, Intent intent) {
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
@@ -75,13 +82,6 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
         }
     }
 
-    /**
-     * Because we support NEW_PHOTO_ACTION and NEW_PHOTO_ACTION_UNOFFICIAL it can happen that
-     * handleNewPictureAction is called twice for the same photo. Use this simple static variable to
-     * remember last uploaded photo to filter duplicates. Must not be null!
-     */
-    static String lastUploadedPhotoPath = "";
-
     private void handleNewPictureAction(Context context, Intent intent) {
         Cursor c = null;
         String file_path = null;

+ 2 - 3
src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java

@@ -49,6 +49,8 @@ public class CreateFolderDialogFragment
     
     public static final String CREATE_FOLDER_FRAGMENT = "CREATE_FOLDER_FRAGMENT";
 
+    private OCFile mParentFolder;
+
     /**
      * Public factory method to create new CreateFolderDialogFragment instances.
      *
@@ -63,9 +65,6 @@ public class CreateFolderDialogFragment
         return frag;
         
     }
-
-    private OCFile mParentFolder;
-    
     
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {

+ 2 - 2
src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java

@@ -54,6 +54,8 @@ public class RenameFileDialogFragment
 
     private static final String ARG_TARGET_FILE = "TARGET_FILE";
 
+    private OCFile mTargetFile;
+
     /**
      * Public factory method to create new RenameFileDialogFragment instances.
      * 
@@ -69,8 +71,6 @@ public class RenameFileDialogFragment
         
     }
 
-    private OCFile mTargetFile;
-    
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
         mTargetFile = getArguments().getParcelable(ARG_TARGET_FILE);