mirror of
https://github.com/nextcloud/android.git
synced 2024-12-19 23:42:03 +03:00
handle Nougat and wallpaper app
This commit is contained in:
parent
58c9a7ddc7
commit
01761718d9
2 changed files with 85 additions and 67 deletions
|
@ -1,23 +1,22 @@
|
||||||
/**
|
/**
|
||||||
* ownCloud Android client application
|
* ownCloud Android client application
|
||||||
*
|
|
||||||
* @author masensio
|
|
||||||
* @author David A. Velasco
|
|
||||||
* @author Juan Carlos González Cabrero
|
|
||||||
* Copyright (C) 2015 ownCloud Inc.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2,
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
*
|
||||||
|
* @author masensio
|
||||||
|
* @author David A. Velasco
|
||||||
|
* @author Juan Carlos González Cabrero
|
||||||
|
* Copyright (C) 2015 ownCloud Inc.
|
||||||
|
* <p>
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2,
|
||||||
|
* as published by the Free Software Foundation.
|
||||||
|
* <p>
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* <p>
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.owncloud.android.ui.helpers;
|
package com.owncloud.android.ui.helpers;
|
||||||
|
@ -29,12 +28,14 @@ import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Parcelable;
|
import android.os.Build;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.support.v4.content.FileProvider;
|
||||||
import android.webkit.MimeTypeMap;
|
import android.webkit.MimeTypeMap;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.owncloud.android.MainApp;
|
||||||
import com.owncloud.android.R;
|
import com.owncloud.android.R;
|
||||||
import com.owncloud.android.authentication.AccountUtils;
|
import com.owncloud.android.authentication.AccountUtils;
|
||||||
import com.owncloud.android.datamodel.OCFile;
|
import com.owncloud.android.datamodel.OCFile;
|
||||||
|
@ -70,7 +71,7 @@ import java.util.regex.Pattern;
|
||||||
public class FileOperationsHelper {
|
public class FileOperationsHelper {
|
||||||
|
|
||||||
private static final String TAG = FileOperationsHelper.class.getSimpleName();
|
private static final String TAG = FileOperationsHelper.class.getSimpleName();
|
||||||
|
|
||||||
private static final String FTAG_CHOOSER_DIALOG = "CHOOSER_DIALOG";
|
private static final String FTAG_CHOOSER_DIALOG = "CHOOSER_DIALOG";
|
||||||
|
|
||||||
protected FileActivity mFileActivity = null;
|
protected FileActivity mFileActivity = null;
|
||||||
|
@ -78,21 +79,21 @@ public class FileOperationsHelper {
|
||||||
/// Identifier of operation in progress which result shouldn't be lost
|
/// Identifier of operation in progress which result shouldn't be lost
|
||||||
private long mWaitingForOpId = Long.MAX_VALUE;
|
private long mWaitingForOpId = Long.MAX_VALUE;
|
||||||
|
|
||||||
private static final Pattern mPatternUrl = Pattern.compile("^URL=(.+)$");
|
private static final Pattern mPatternUrl = Pattern.compile("^URL=(.+)$");
|
||||||
private static final Pattern mPatternString = Pattern.compile("<string>(.+)</string>");
|
private static final Pattern mPatternString = Pattern.compile("<string>(.+)</string>");
|
||||||
|
|
||||||
public FileOperationsHelper(FileActivity fileActivity) {
|
public FileOperationsHelper(FileActivity fileActivity) {
|
||||||
mFileActivity = fileActivity;
|
mFileActivity = fileActivity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private String getUrlFromFile(String storagePath, Pattern pattern) {
|
private String getUrlFromFile(String storagePath, Pattern pattern) {
|
||||||
String url = null;
|
String url = null;
|
||||||
|
|
||||||
InputStreamReader fr = null;
|
InputStreamReader fr = null;
|
||||||
BufferedReader br = null;
|
BufferedReader br = null;
|
||||||
try {
|
try {
|
||||||
fr = new InputStreamReader(new FileInputStream(storagePath), "UTF8");
|
fr = new InputStreamReader(new FileInputStream(storagePath), "UTF8");
|
||||||
br = new BufferedReader(fr);
|
br = new BufferedReader(fr);
|
||||||
|
|
||||||
String line;
|
String line;
|
||||||
|
@ -104,7 +105,7 @@ public class FileOperationsHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log_OC.d(TAG, e.getMessage());
|
Log_OC.d(TAG, e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
if (br != null) {
|
if (br != null) {
|
||||||
try {
|
try {
|
||||||
|
@ -123,20 +124,20 @@ public class FileOperationsHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private Intent createIntentFromFile(String storagePath) {
|
private Intent createIntentFromFile(String storagePath) {
|
||||||
String url = null;
|
String url = null;
|
||||||
int lastIndexOfDot = storagePath.lastIndexOf('.');
|
int lastIndexOfDot = storagePath.lastIndexOf('.');
|
||||||
if (lastIndexOfDot >= 0) {
|
if (lastIndexOfDot >= 0) {
|
||||||
String fileExt = storagePath.substring(lastIndexOfDot + 1);
|
String fileExt = storagePath.substring(lastIndexOfDot + 1);
|
||||||
if (fileExt.equalsIgnoreCase("url") ||fileExt.equalsIgnoreCase("desktop")) {
|
if (fileExt.equalsIgnoreCase("url") || fileExt.equalsIgnoreCase("desktop")) {
|
||||||
// Windows internet shortcut file .url
|
// Windows internet shortcut file .url
|
||||||
// Ubuntu internet shortcut file .desktop
|
// Ubuntu internet shortcut file .desktop
|
||||||
url = getUrlFromFile(storagePath, mPatternUrl);
|
url = getUrlFromFile(storagePath, mPatternUrl);
|
||||||
} else if (fileExt.equalsIgnoreCase("webloc")) {
|
} else if (fileExt.equalsIgnoreCase("webloc")) {
|
||||||
// mac internet shortcut file .webloc
|
// mac internet shortcut file .webloc
|
||||||
url = getUrlFromFile(storagePath, mPatternString);
|
url = getUrlFromFile(storagePath, mPatternString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,7 +165,7 @@ public class FileOperationsHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(openFileWithIntent == null) {
|
if (openFileWithIntent == null) {
|
||||||
openFileWithIntent = createIntentFromFile(storagePath);
|
openFileWithIntent = createIntentFromFile(storagePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +182,7 @@ public class FileOperationsHelper {
|
||||||
List<ResolveInfo> launchables = mFileActivity.getPackageManager().
|
List<ResolveInfo> launchables = mFileActivity.getPackageManager().
|
||||||
queryIntentActivities(openFileWithIntent, PackageManager.GET_INTENT_FILTERS);
|
queryIntentActivities(openFileWithIntent, PackageManager.GET_INTENT_FILTERS);
|
||||||
|
|
||||||
if(launchables != null && launchables.size() > 0) {
|
if (launchables != null && launchables.size() > 0) {
|
||||||
try {
|
try {
|
||||||
mFileActivity.startActivity(
|
mFileActivity.startActivity(
|
||||||
Intent.createChooser(
|
Intent.createChooser(
|
||||||
|
@ -249,7 +250,7 @@ public class FileOperationsHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getFileWithLink(OCFile file){
|
public void getFileWithLink(OCFile file) {
|
||||||
if (isSharedSupported()) {
|
if (isSharedSupported()) {
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
|
mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
|
||||||
|
@ -286,7 +287,7 @@ public class FileOperationsHelper {
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
// TODO check capability?
|
// TODO check capability?
|
||||||
mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
|
mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
|
||||||
getString(R.string.wait_a_moment));
|
getString(R.string.wait_a_moment));
|
||||||
|
|
||||||
Intent service = new Intent(mFileActivity, OperationsService.class);
|
Intent service = new Intent(mFileActivity, OperationsService.class);
|
||||||
service.setAction(OperationsService.ACTION_CREATE_SHARE_WITH_SHAREE);
|
service.setAction(OperationsService.ACTION_CREATE_SHARE_WITH_SHAREE);
|
||||||
|
@ -334,7 +335,7 @@ public class FileOperationsHelper {
|
||||||
queueShareIntent(unshareService);
|
queueShareIntent(unshareService);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unshareFileWithUserOrGroup(OCFile file, ShareType shareType, String userOrGroup){
|
public void unshareFileWithUserOrGroup(OCFile file, ShareType shareType, String userOrGroup) {
|
||||||
|
|
||||||
// Unshare the file: Create the intent
|
// Unshare the file: Create the intent
|
||||||
Intent unshareService = new Intent(mFileActivity, OperationsService.class);
|
Intent unshareService = new Intent(mFileActivity, OperationsService.class);
|
||||||
|
@ -348,7 +349,7 @@ public class FileOperationsHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void queueShareIntent(Intent shareIntent){
|
private void queueShareIntent(Intent shareIntent) {
|
||||||
if (isSharedSupported()) {
|
if (isSharedSupported()) {
|
||||||
// Unshare the file
|
// Unshare the file
|
||||||
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().
|
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().
|
||||||
|
@ -372,10 +373,10 @@ public class FileOperationsHelper {
|
||||||
*
|
*
|
||||||
* @param file File to share or unshare.
|
* @param file File to share or unshare.
|
||||||
*/
|
*/
|
||||||
public void showShareFile(OCFile file){
|
public void showShareFile(OCFile file) {
|
||||||
Intent intent = new Intent(mFileActivity, ShareActivity.class);
|
Intent intent = new Intent(mFileActivity, ShareActivity.class);
|
||||||
intent.putExtra(mFileActivity.EXTRA_FILE, (Parcelable) file);
|
intent.putExtra(FileActivity.EXTRA_FILE, file);
|
||||||
intent.putExtra(mFileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount());
|
intent.putExtra(FileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount());
|
||||||
mFileActivity.startActivity(intent);
|
mFileActivity.startActivity(intent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -503,8 +504,8 @@ public class FileOperationsHelper {
|
||||||
// set MimeType
|
// set MimeType
|
||||||
sendIntent.setType(file.getMimetype());
|
sendIntent.setType(file.getMimetype());
|
||||||
sendIntent.putExtra(
|
sendIntent.putExtra(
|
||||||
Intent.EXTRA_STREAM,
|
Intent.EXTRA_STREAM,
|
||||||
file.getExposedFileUri(mFileActivity)
|
file.getExposedFileUri(mFileActivity)
|
||||||
);
|
);
|
||||||
sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action
|
sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action
|
||||||
|
|
||||||
|
@ -519,7 +520,7 @@ public class FileOperationsHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void syncFiles(Collection<OCFile> files) {
|
public void syncFiles(Collection<OCFile> files) {
|
||||||
for (OCFile file: files) {
|
for (OCFile file : files) {
|
||||||
syncFile(file);
|
syncFile(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -527,13 +528,29 @@ public class FileOperationsHelper {
|
||||||
public void setPictureAs(OCFile file) {
|
public void setPictureAs(OCFile file) {
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
if (file.isDown()) {
|
if (file.isDown()) {
|
||||||
File externalFile = new File(file.getStoragePath());
|
Context context = MainApp.getAppContext();
|
||||||
Uri sendUri = Uri.fromFile(externalFile);
|
|
||||||
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
|
try {
|
||||||
intent.setDataAndType(sendUri, file.getMimetype());
|
File externalFile = new File(file.getStoragePath());
|
||||||
intent.putExtra("mimeType", file.getMimetype());
|
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
|
||||||
mFileActivity.startActivityForResult(Intent.createChooser(intent,
|
Uri sendUri;
|
||||||
mFileActivity.getString(R.string.set_as)), 200);
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
sendUri = FileProvider.getUriForFile(context,
|
||||||
|
context.getResources().getString(R.string.file_provider_authority), externalFile);
|
||||||
|
} else {
|
||||||
|
sendUri = Uri.fromFile(externalFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
intent.setDataAndType(sendUri, file.getMimetype());
|
||||||
|
intent.putExtra("mimeType", file.getMimetype());
|
||||||
|
mFileActivity.startActivityForResult(Intent.createChooser(intent,
|
||||||
|
mFileActivity.getString(R.string.set_as)), 200);
|
||||||
|
|
||||||
|
} catch (ActivityNotFoundException exception) {
|
||||||
|
Toast.makeText(context, R.string.picture_set_as_no_app, Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log_OC.wtf(TAG, "Trying to send a NULL OCFile");
|
Log_OC.wtf(TAG, "Trying to send a NULL OCFile");
|
||||||
|
@ -546,7 +563,7 @@ public class FileOperationsHelper {
|
||||||
* @param file The file or folder to synchronize
|
* @param file The file or folder to synchronize
|
||||||
*/
|
*/
|
||||||
public void syncFile(OCFile file) {
|
public void syncFile(OCFile file) {
|
||||||
if (!file.isFolder()){
|
if (!file.isFolder()) {
|
||||||
Intent intent = new Intent(mFileActivity, OperationsService.class);
|
Intent intent = new Intent(mFileActivity, OperationsService.class);
|
||||||
intent.setAction(OperationsService.ACTION_SYNC_FILE);
|
intent.setAction(OperationsService.ACTION_SYNC_FILE);
|
||||||
intent.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
|
intent.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
|
||||||
|
@ -554,8 +571,8 @@ public class FileOperationsHelper {
|
||||||
intent.putExtra(OperationsService.EXTRA_SYNC_FILE_CONTENTS, true);
|
intent.putExtra(OperationsService.EXTRA_SYNC_FILE_CONTENTS, true);
|
||||||
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(intent);
|
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(intent);
|
||||||
mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
|
mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
|
||||||
getString(R.string.wait_a_moment));
|
getString(R.string.wait_a_moment));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Intent intent = new Intent(mFileActivity, OperationsService.class);
|
Intent intent = new Intent(mFileActivity, OperationsService.class);
|
||||||
intent.setAction(OperationsService.ACTION_SYNC_FOLDER);
|
intent.setAction(OperationsService.ACTION_SYNC_FOLDER);
|
||||||
|
@ -568,37 +585,37 @@ public class FileOperationsHelper {
|
||||||
|
|
||||||
public void toggleFavoriteFiles(Collection<OCFile> files, boolean shouldBeFavorite) {
|
public void toggleFavoriteFiles(Collection<OCFile> files, boolean shouldBeFavorite) {
|
||||||
List<OCFile> alreadyRightStateList = new ArrayList<>();
|
List<OCFile> alreadyRightStateList = new ArrayList<>();
|
||||||
for(OCFile file : files) {
|
for (OCFile file : files) {
|
||||||
if(file.getIsFavorite() == shouldBeFavorite) {
|
if (file.getIsFavorite() == shouldBeFavorite) {
|
||||||
alreadyRightStateList.add(file);
|
alreadyRightStateList.add(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
files.removeAll(alreadyRightStateList);
|
files.removeAll(alreadyRightStateList);
|
||||||
|
|
||||||
for (OCFile file: files) {
|
for (OCFile file : files) {
|
||||||
toggleFavoriteFile(file, shouldBeFavorite);
|
toggleFavoriteFile(file, shouldBeFavorite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleFavoriteFile(OCFile file, boolean shouldBeFavorite) {
|
public void toggleFavoriteFile(OCFile file, boolean shouldBeFavorite) {
|
||||||
if(file.getIsFavorite() != shouldBeFavorite) {
|
if (file.getIsFavorite() != shouldBeFavorite) {
|
||||||
EventBus.getDefault().post(new FavoriteEvent(file.getRemotePath(), shouldBeFavorite, file.getRemoteId()));
|
EventBus.getDefault().post(new FavoriteEvent(file.getRemotePath(), shouldBeFavorite, file.getRemoteId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void toogleOfflineFiles(Collection<OCFile> files, boolean isAvailableOffline){
|
public void toogleOfflineFiles(Collection<OCFile> files, boolean isAvailableOffline) {
|
||||||
List<OCFile> alreadyRightStateList = new ArrayList<>();
|
List<OCFile> alreadyRightStateList = new ArrayList<>();
|
||||||
for(OCFile file : files) {
|
for (OCFile file : files) {
|
||||||
if(file.isAvailableOffline() == isAvailableOffline) {
|
if (file.isAvailableOffline() == isAvailableOffline) {
|
||||||
alreadyRightStateList.add(file);
|
alreadyRightStateList.add(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
files.removeAll(alreadyRightStateList);
|
files.removeAll(alreadyRightStateList);
|
||||||
|
|
||||||
for (OCFile file: files) {
|
for (OCFile file : files) {
|
||||||
toggleOfflineFile(file, isAvailableOffline);
|
toggleOfflineFile(file, isAvailableOffline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -623,7 +640,7 @@ public class FileOperationsHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renameFile(OCFile file, String newFilename) {
|
public void renameFile(OCFile file, String newFilename) {
|
||||||
// RenameFile
|
// RenameFile
|
||||||
Intent service = new Intent(mFileActivity, OperationsService.class);
|
Intent service = new Intent(mFileActivity, OperationsService.class);
|
||||||
|
@ -632,7 +649,7 @@ public class FileOperationsHelper {
|
||||||
service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
|
service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
|
||||||
service.putExtra(OperationsService.EXTRA_NEWNAME, newFilename);
|
service.putExtra(OperationsService.EXTRA_NEWNAME, newFilename);
|
||||||
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
||||||
|
|
||||||
mFileActivity.showLoadingDialog(mFileActivity.getString(R.string.wait_a_moment));
|
mFileActivity.showLoadingDialog(mFileActivity.getString(R.string.wait_a_moment));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,7 +671,7 @@ public class FileOperationsHelper {
|
||||||
service.putExtra(OperationsService.EXTRA_REMOVE_ONLY_LOCAL, onlyLocalCopy);
|
service.putExtra(OperationsService.EXTRA_REMOVE_ONLY_LOCAL, onlyLocalCopy);
|
||||||
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
||||||
}
|
}
|
||||||
|
|
||||||
mFileActivity.showLoadingDialog(mFileActivity.getString(R.string.wait_a_moment));
|
mFileActivity.showLoadingDialog(mFileActivity.getString(R.string.wait_a_moment));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,8 +683,8 @@ public class FileOperationsHelper {
|
||||||
service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
|
service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
|
||||||
service.putExtra(OperationsService.EXTRA_REMOTE_PATH, remotePath);
|
service.putExtra(OperationsService.EXTRA_REMOTE_PATH, remotePath);
|
||||||
service.putExtra(OperationsService.EXTRA_CREATE_FULL_PATH, createFullPath);
|
service.putExtra(OperationsService.EXTRA_CREATE_FULL_PATH, createFullPath);
|
||||||
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
||||||
|
|
||||||
mFileActivity.showLoadingDialog(mFileActivity.getString(R.string.wait_a_moment));
|
mFileActivity.showLoadingDialog(mFileActivity.getString(R.string.wait_a_moment));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -765,7 +782,7 @@ public class FileOperationsHelper {
|
||||||
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
|
||||||
|
|
||||||
mFileActivity.showLoadingDialog(
|
mFileActivity.showLoadingDialog(
|
||||||
mFileActivity.getString(R.string.wait_checking_credentials)
|
mFileActivity.getString(R.string.wait_checking_credentials)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -662,6 +662,7 @@
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="new_notification_received">New notification received</string>
|
<string name="new_notification_received">New notification received</string>
|
||||||
<string name="drawer_logout">Logout</string>
|
<string name="drawer_logout">Logout</string>
|
||||||
|
<string name="picture_set_as_no_app">No app found to set a picture with!</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue