Browse Source

Enable auto upload on Android 6+ only :-/

Mario Danic 8 years ago
parent
commit
91c28ee158

+ 1 - 1
src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java

@@ -58,7 +58,7 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
 
     @Override
     public void onReceive(Context context, Intent intent) {
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
             Log_OC.d(TAG, "Received: " + intent.getAction());
             if (intent.getAction().equals(NEW_PHOTO_ACTION_UNOFFICIAL)) {
                 handleNewPictureAction(context, intent);

+ 2 - 2
src/com/owncloud/android/ui/activity/DrawerActivity.java

@@ -175,8 +175,8 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
 
             setupQuotaElement();
 
-            // show folder sync menu item only for Android 5+
-            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
+            // show folder sync menu item only for Android 6+
+            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
                 mNavigationView.getMenu().removeItem(R.id.nav_folder_sync);
             }
         }

+ 1 - 1
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -257,7 +257,7 @@ public class FileDisplayActivity extends HookActivity
      */
     private void upgradeNotificationForInstantUpload() {
         // check for Android 5+ if legacy instant upload is activated --> disable + show info
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
                 (PreferenceManager.instantPictureUploadEnabled(this) ||
                         PreferenceManager.instantPictureUploadEnabled(this))) {
 

+ 2 - 2
src/com/owncloud/android/ui/activity/Preferences.java

@@ -368,8 +368,8 @@ public class Preferences extends PreferenceActivity
 
         mPrefInstantUploadCategory = (PreferenceCategory) findPreference("instant_uploading_category");
 
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
-            // Instant upload via preferences on pre pre Lollipop
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+            // Instant upload via preferences on pre pre M
             mPrefInstantUploadPath = findPreference("instant_upload_path");
             if (mPrefInstantUploadPath != null) {