Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
eDrive
Commits
7474a8cd
Commit
7474a8cd
authored
Dec 16, 2019
by
vince-bourgmayer
Browse files
add Author, remove unused import in Initializer and createInitialRemoteFoldersService
parent
eba29294
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/backgroundServices/CreateInitialRemoteFoldersIntentService.java
View file @
7474a8cd
/*
* Copyright © Vincent Bourgmayer (/e/ foundation).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
package
foundation.e.drive.backgroundServices
;
import
android.accounts.Account
;
...
...
@@ -20,7 +28,6 @@ import java.util.List;
import
foundation.e.drive.database.DbHelper
;
import
foundation.e.drive.models.SyncedFolder
;
import
foundation.e.drive.utils.AppConstants
;
import
foundation.e.drive.utils.CommonUtils
;
import
static
com
.
owncloud
.
android
.
lib
.
resources
.
files
.
FileUtils
.
PATH_SEPARATOR
;
...
...
@@ -28,9 +35,11 @@ import static foundation.e.drive.utils.AppConstants.ACCOUNT_KEY_CODE;
import
static
foundation
.
e
.
drive
.
utils
.
AppConstants
.
resultCodeKey
;
import
static
foundation
.
e
.
drive
.
utils
.
AppConstants
.
resultIntentActionKey
;
//https://developer.android.com/training/run-background-service/report-status.html
//https://developer.android.com/guide/components/services.html#ExtendingIntentService
/**
* @author Vincent Bourgmayer
*/
public
class
CreateInitialRemoteFoldersIntentService
extends
IntentService
{
private
static
final
String
TAG
=
CreateInitialRemoteFoldersIntentService
.
class
.
getSimpleName
();
...
...
@@ -39,7 +48,6 @@ public class CreateInitialRemoteFoldersIntentService extends IntentService {
*/
public
CreateInitialRemoteFoldersIntentService
()
{
super
(
TAG
);
}
@Override
protected
void
onHandleIntent
(
Intent
workIntent
)
{
if
(
workIntent
==
null
||
workIntent
.
getExtras
()
==
null
)
return
;
...
...
@@ -51,7 +59,6 @@ public class CreateInitialRemoteFoldersIntentService extends IntentService {
LocalBroadcastManager
.
getInstance
(
this
).
sendBroadcast
(
doMission
(
client
));
}
/**
* @TODO: rename it
* @return Intent the result intent to send to launcher service
...
...
@@ -140,7 +147,6 @@ public class CreateInitialRemoteFoldersIntentService extends IntentService {
}
return
mSyncedFolders
;
}
private
String
getExternalFolder
(
String
directory
){
return
CommonUtils
.
getLocalPath
(
Environment
.
getExternalStoragePublicDirectory
(
directory
))+
PATH_SEPARATOR
;
}
...
...
app/src/main/java/foundation/e/drive/services/InitializerService.java
View file @
7474a8cd
...
...
@@ -17,16 +17,12 @@ import android.content.Intent;
import
android.content.IntentFilter
;
import
android.content.SharedPreferences
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.IBinder
;
import
android.support.annotation.Nullable
;
import
android.support.v4.content.LocalBroadcastManager
;
import
android.util.Log
;
import
com.owncloud.android.lib.common.OwnCloudClient
;
import
java.util.List
;
import
foundation.e.drive.backgroundServices.CreateInitialRemoteFoldersIntentService
;
import
foundation.e.drive.models.SyncedFolder
;
import
foundation.e.drive.receivers.ScreenOffReceiver
;
import
foundation.e.drive.utils.AppConstants
;
import
foundation.e.drive.utils.CommonUtils
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment