Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ee40790 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

clean InitializerService.java

- remove useless comment
- remove useless import
parent 18d4cd54
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import foundation.e.drive.receivers.ScreenOffReceiver;
import foundation.e.drive.utils.AppConstants;
import foundation.e.drive.utils.CommonUtils;
import foundation.e.drive.utils.JobUtils;
import foundation.e.drive.utils.ServiceExceptionHandler;

import static com.owncloud.android.lib.resources.files.FileUtils.PATH_SEPARATOR;
import static foundation.e.drive.utils.AppConstants.INITIALFOLDERS_NUMBER;
@@ -50,9 +49,9 @@ import androidx.annotation.Nullable;
 */
public class InitializerService extends Service implements OnRemoteOperationListener {
    final private String TAG = InitializerService.class.getSimpleName();
    //Complex properties
    private int existingRemoteFolderCounter; //@dev-only; Temporarily used to know if all remotePath exist
    private List<SyncedFolder> mSyncedFolders; //syncedFolders

    private int existingRemoteFolderCounter; //Temporarily used to know if all remotePath exist
    private List<SyncedFolder> mSyncedFolders;
    private OwnCloudClient mCloudClient;
    private Handler mHandler;
    private Account mAccount;
@@ -63,7 +62,6 @@ public class InitializerService extends Service implements OnRemoteOperationList
        Log.i(TAG, "onCreate()");
        super.onCreate();
        this.existingRemoteFolderCounter = 0;
        //JobUtils.scheduleInitializerJob(getApplicationContext());
    }

    @Override
@@ -86,7 +84,6 @@ public class InitializerService extends Service implements OnRemoteOperationList
                accountName = intent.getExtras().getString( AccountManager.KEY_ACCOUNT_NAME, "" );
                accountType = intent.getExtras().getString( AccountManager.KEY_ACCOUNT_TYPE, "" );

                //If data come from intent, store them into pref because there aren't stored
                prefs.edit().putString( AccountManager.KEY_ACCOUNT_NAME, accountName )
                        .putString( AccountManager.KEY_ACCOUNT_TYPE, accountType )
                        .apply();
@@ -94,7 +91,6 @@ public class InitializerService extends Service implements OnRemoteOperationList

            if(accountName.isEmpty() ) {
                Log.w(TAG, "Account's name not found. Neither in shared prefs nor in intent's extras");
                //JobUtils.stopScheduledJob(getApplicationContext(), JobUtils.InitializerJobId);
                stopSelf();
            }else{
                this.mAccount = CommonUtils.getAccount( accountName, accountType, AccountManager.get(this) );
@@ -123,7 +119,6 @@ public class InitializerService extends Service implements OnRemoteOperationList
            return;
        }

        //Get categories of element to sync
        List<String> syncCategories = new ArrayList<>();

        if (CommonUtils.isMediaSyncEnabled(mAccount)) {
@@ -134,7 +129,6 @@ public class InitializerService extends Service implements OnRemoteOperationList
            syncCategories.addAll(Arrays.asList(SETTINGS_SYNCABLE_CATEGORIES));
        }

        //Get SyncedFolders
        getInitialSyncedFolders(syncCategories);

        this.existingRemoteFolderCounter = 0;
@@ -213,7 +207,6 @@ public class InitializerService extends Service implements OnRemoteOperationList
        this.restartFolderCreationCounter = 0;

        if( this.mSyncedFolders == null || this.mSyncedFolders.isEmpty() ){
            //JobUtils.stopScheduledJob(getApplicationContext(), JobUtils.InitializerJobId);
            this.stopSelf();
        }