Loading .idea/misc.xml +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ </value> </option> </component> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/build/classes" /> </component> <component name="ProjectType"> Loading app/src/main/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ http://www.gnu.org/licenses/gpl.html android:enabled="true" android:exported="true"> <intent-filter> <action android:name="drive.services.InitializerService" /> <!-- @TODO replace initializer by Initializer and ask Nihar to report the change to accountManager --> <action android:name="drive.services.InitializerService" /> </intent-filter> </service> Loading app/src/main/java/io/eelo/drive/services/InitializerService.java +3 −4 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ public class InitializerService extends Service implements OnRemoteOperationList SharedPreferences prefs = this.getSharedPreferences( AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE ); if( prefs.getBoolean( AppConstants.INITIALIZATION_HAS_BEEN_DONE, false ) ) { //JobUtils.scheduleScannerJob(this, 120000); JobUtils.scheduleScannerJob(this, 120000); Log.w(TAG, "Initializer has already been run"); stopSelf(); //@TODO, do not keep it when you'll enable initializer job because, it will kill running process at the same time. //stopSelf(); //@TODO, do not keep it when you'll enable initializer job because, it will kill running process at the same time. }else{ String accountName = prefs.getString( AccountManager.KEY_ACCOUNT_NAME, "" ); String accountType = prefs.getString( AccountManager.KEY_ACCOUNT_TYPE, "" ); Loading Loading @@ -127,8 +127,6 @@ public class InitializerService extends Service implements OnRemoteOperationList stopSelf(); } Log.d(TAG, mCloudClient.getBaseUri().toString()); //Get categories of element to sync List<String> mSyncCategories = new ArrayList<>(); Loading Loading @@ -290,6 +288,7 @@ public class InitializerService extends Service implements OnRemoteOperationList //all folder have been created //JobUtils.stopScheduledJob(appContext, JobUtils.InitializerJobId); JobUtils.scheduleScannerJob(getApplicationContext(), JobUtils.ScannerJobId); stopSelf(); } Loading app/src/main/java/io/eelo/drive/utils/JobUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,8 @@ public abstract class JobUtils { .build(); JobScheduler jobScheduler = context.getSystemService( JobScheduler.class ); int result = jobScheduler.schedule( job ); if ( result == JobScheduler.RESULT_SUCCESS ) { if ( jobScheduler.schedule( job ) == JobScheduler.RESULT_SUCCESS ) { Log.d(TAG, "Scheduled job created"); } else { Log.e(TAG, "Scheduled job not created"); Loading Loading
.idea/misc.xml +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ </value> </option> </component> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/build/classes" /> </component> <component name="ProjectType"> Loading
app/src/main/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ http://www.gnu.org/licenses/gpl.html android:enabled="true" android:exported="true"> <intent-filter> <action android:name="drive.services.InitializerService" /> <!-- @TODO replace initializer by Initializer and ask Nihar to report the change to accountManager --> <action android:name="drive.services.InitializerService" /> </intent-filter> </service> Loading
app/src/main/java/io/eelo/drive/services/InitializerService.java +3 −4 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ public class InitializerService extends Service implements OnRemoteOperationList SharedPreferences prefs = this.getSharedPreferences( AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE ); if( prefs.getBoolean( AppConstants.INITIALIZATION_HAS_BEEN_DONE, false ) ) { //JobUtils.scheduleScannerJob(this, 120000); JobUtils.scheduleScannerJob(this, 120000); Log.w(TAG, "Initializer has already been run"); stopSelf(); //@TODO, do not keep it when you'll enable initializer job because, it will kill running process at the same time. //stopSelf(); //@TODO, do not keep it when you'll enable initializer job because, it will kill running process at the same time. }else{ String accountName = prefs.getString( AccountManager.KEY_ACCOUNT_NAME, "" ); String accountType = prefs.getString( AccountManager.KEY_ACCOUNT_TYPE, "" ); Loading Loading @@ -127,8 +127,6 @@ public class InitializerService extends Service implements OnRemoteOperationList stopSelf(); } Log.d(TAG, mCloudClient.getBaseUri().toString()); //Get categories of element to sync List<String> mSyncCategories = new ArrayList<>(); Loading Loading @@ -290,6 +288,7 @@ public class InitializerService extends Service implements OnRemoteOperationList //all folder have been created //JobUtils.stopScheduledJob(appContext, JobUtils.InitializerJobId); JobUtils.scheduleScannerJob(getApplicationContext(), JobUtils.ScannerJobId); stopSelf(); } Loading
app/src/main/java/io/eelo/drive/utils/JobUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,8 @@ public abstract class JobUtils { .build(); JobScheduler jobScheduler = context.getSystemService( JobScheduler.class ); int result = jobScheduler.schedule( job ); if ( result == JobScheduler.RESULT_SUCCESS ) { if ( jobScheduler.schedule( job ) == JobScheduler.RESULT_SUCCESS ) { Log.d(TAG, "Scheduled job created"); } else { Log.e(TAG, "Scheduled job not created"); Loading