Browse Source

Fix codacy stuff

Mario Danic 8 years ago
parent
commit
a7eab02d08

+ 3 - 2
src/main/java/com/owncloud/android/datamodel/ArbitraryDataProvider.java

@@ -1,9 +1,10 @@
 /**
  * Nextcloud Android client application
- * <p>
+ *
  * Copyright (C) 2017 Tobias Kaminsky
+ * Copyright (C) 2017 Mario Danic
  * Copyright (C) 2017 Nextcloud.
- * <p>
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  * License as published by the Free Software Foundation; either

+ 0 - 3
src/main/java/com/owncloud/android/ui/activity/ContactsPreferenceActivity.java

@@ -33,7 +33,6 @@ import com.evernote.android.job.JobManager;
 import com.evernote.android.job.JobRequest;
 import com.evernote.android.job.util.support.PersistableBundleCompat;
 import com.owncloud.android.R;
-import com.owncloud.android.datamodel.ArbitraryDataProvider;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.services.ContactsBackupJob;
@@ -56,8 +55,6 @@ public class ContactsPreferenceActivity extends FileActivity implements FileFrag
     public static final String PREFERENCE_CONTACTS_AUTOMATIC_BACKUP = "PREFERENCE_CONTACTS_AUTOMATIC_BACKUP";
     public static final String PREFERENCE_CONTACTS_LAST_BACKUP = "PREFERENCE_CONTACTS_LAST_BACKUP";
 
-    private ArbitraryDataProvider arbitraryDataProvider;
-
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

+ 3 - 3
src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactsBackupFragment.java

@@ -117,7 +117,7 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
         onCheckedChangeListener = new CompoundButton.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-                if (checkAndAskForContactsReadPermission(PermissionUtil.PERMISSIONS_READ_CONTACTS_AUTOMATIC)) {
+                if (checkAndAskForContactsReadPermission()) {
                     if (isChecked) {
                         setAutomaticBackup(true);
                     } else {
@@ -243,7 +243,7 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
 
     @OnClick(R.id.contacts_backup_now)
     public void backupContacts() {
-        if (checkAndAskForContactsReadPermission(PermissionUtil.PERMISSIONS_READ_CONTACTS_MANUALLY)) {
+        if (checkAndAskForContactsReadPermission()) {
             startContactsBackupJob();
         }
     }
@@ -284,7 +284,7 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
                 String.valueOf(bool));
     }
 
-    private boolean checkAndAskForContactsReadPermission(final int permission) {
+    private boolean checkAndAskForContactsReadPermission() {
         final ContactsPreferenceActivity contactsPreferenceActivity = (ContactsPreferenceActivity) getActivity();
 
         // check permissions