Merge pull request #2461 from ByteHamster/fix-debug-provider
Fix install of debug version by using unique provider
This commit is contained in:
commit
ee24c39fca
|
@ -72,6 +72,7 @@ android {
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
|
resValue "string", "provider_authority", "de.danoeh.antennapod.debug.provider"
|
||||||
buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey
|
buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey
|
||||||
buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret
|
buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,7 +373,7 @@
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:authorities="de.danoeh.antennapod.provider"
|
android:authorities="@string/provider_authority"
|
||||||
android:name="android.support.v4.content.FileProvider"
|
android:name="android.support.v4.content.FileProvider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
|
|
|
@ -454,7 +454,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
|
||||||
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "AntennaPod Crash Report");
|
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "AntennaPod Crash Report");
|
||||||
emailIntent.putExtra(Intent.EXTRA_TEXT, "Please describe what you were doing when the app crashed");
|
emailIntent.putExtra(Intent.EXTRA_TEXT, "Please describe what you were doing when the app crashed");
|
||||||
// the attachment
|
// the attachment
|
||||||
Uri fileUri = FileProvider.getUriForFile(context, "de.danoeh.antennapod.provider",
|
Uri fileUri = FileProvider.getUriForFile(context, context.getString(R.string.provider_authority),
|
||||||
CrashReportWriter.getFile());
|
CrashReportWriter.getFile());
|
||||||
emailIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
emailIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||||
emailIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
emailIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class ShareUtils {
|
||||||
public static void shareFeedItemFile(Context context, FeedMedia media) {
|
public static void shareFeedItemFile(Context context, FeedMedia media) {
|
||||||
Intent i = new Intent(Intent.ACTION_SEND);
|
Intent i = new Intent(Intent.ACTION_SEND);
|
||||||
i.setType(media.getMime_type());
|
i.setType(media.getMime_type());
|
||||||
Uri fileUri = FileProvider.getUriForFile(context, "de.danoeh.antennapod.provider",
|
Uri fileUri = FileProvider.getUriForFile(context, context.getString(R.string.provider_authority),
|
||||||
new File(media.getLocalMediaUrl()));
|
new File(media.getLocalMediaUrl()));
|
||||||
i.putExtra(Intent.EXTRA_STREAM, fileUri);
|
i.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||||
i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
@ -84,6 +84,6 @@ public class ShareUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
context.startActivity(Intent.createChooser(i, context.getString(R.string.share_file_label)));
|
context.startActivity(Intent.createChooser(i, context.getString(R.string.share_file_label)));
|
||||||
Log.e(TAG, "Foo");
|
Log.e(TAG, "shareFeedItemFile called");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
<!-- Activitiy and fragment titles -->
|
<!-- Activitiy and fragment titles -->
|
||||||
<string name="app_name" translate="false">AntennaPod</string>
|
<string name="app_name" translate="false">AntennaPod</string>
|
||||||
|
<string name="provider_authority" translate="false">de.danoeh.antennapod.provider</string>
|
||||||
<string name="feeds_label">Feeds</string>
|
<string name="feeds_label">Feeds</string>
|
||||||
<string name="statistics_label">Statistics</string>
|
<string name="statistics_label">Statistics</string>
|
||||||
<string name="add_feed_label">Add Podcast</string>
|
<string name="add_feed_label">Add Podcast</string>
|
||||||
|
|
Loading…
Reference in New Issue