extract authority to image_cache_provider_authority

This commit is contained in:
tobiasKaminsky 2017-10-24 14:22:53 +02:00 committed by AndyScherzinger
parent a636e38529
commit 6574af5435
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 5 additions and 4 deletions

View file

@ -187,7 +187,7 @@
<provider
android:name=".providers.DiskLruImageCacheFileProvider"
android:authorities="org.nextcloud.imageCache.provider"
android:authorities="@string/image_cache_provider_authority"
android:exported="true">
</provider>

View file

@ -42,7 +42,6 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
public class DiskLruImageCacheFileProvider extends ContentProvider {
public static final String AUTHORITY = "org.nextcloud.imageCache.provider";
public static final String TAG = DiskLruImageCacheFileProvider.class.getSimpleName();
@Override

View file

@ -44,7 +44,6 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.providers.DiskLruImageCacheFileProvider;
import com.owncloud.android.services.OperationsService;
import com.owncloud.android.services.observer.FileObserverService;
import com.owncloud.android.ui.activity.FileActivity;
@ -498,10 +497,12 @@ public class FileOperationsHelper {
public void sendCachedImage(OCFile file) {
if (file != null) {
Context context = MainApp.getAppContext();
Intent sendIntent = new Intent(Intent.ACTION_SEND);
// set MimeType
sendIntent.setType(file.getMimetype());
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://" + DiskLruImageCacheFileProvider.AUTHORITY +
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://" +
context.getResources().getString(R.string.image_cache_provider_authority) +
file.getRemotePath()));
sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action

View file

@ -11,6 +11,7 @@
<string name="users_and_groups_share_with">com.nextcloud.android.providers.UsersAndGroupsSearchProvider.action.SHARE_WITH</string>
<string name="document_provider_authority">org.nextcloud.documents</string>
<string name="file_provider_authority">org.nextcloud.files</string>
<string name="image_cache_provider_authority">org.nextcloud.imageCache.provider</string>
<string name ="db_file">nextcloud.db</string>
<string name ="db_name">nextcloud</string>
<string name ="data_folder">nextcloud</string>