Fix issue when free app was previously installed.
This commit is contained in:
parent
e43d8ed9d1
commit
110e5c3753
|
@ -326,7 +326,7 @@
|
||||||
/>
|
/>
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="app.fedilab.android.fileProvider"
|
android:authorities="${applicationId}.fileProvider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|
|
@ -1013,9 +1013,16 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
||||||
}
|
}
|
||||||
// Continue only if the File was successfully created
|
// Continue only if the File was successfully created
|
||||||
if (photoFile != null) {
|
if (photoFile != null) {
|
||||||
photoFileUri = FileProvider.getUriForFile(this,
|
if(BuildConfig.DONATIONS) {
|
||||||
"app.fedilab.android.fileProvider",
|
photoFileUri = FileProvider.getUriForFile(this,
|
||||||
photoFile);
|
"fr.gouv.etalab.mastodon.fileProvider",
|
||||||
|
photoFile);
|
||||||
|
}else{
|
||||||
|
photoFileUri = FileProvider.getUriForFile(this,
|
||||||
|
"app.fedilab.android.fileProvider",
|
||||||
|
photoFile);
|
||||||
|
}
|
||||||
|
|
||||||
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoFileUri);
|
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoFileUri);
|
||||||
startActivityForResult(takePictureIntent, TAKE_PHOTO);
|
startActivityForResult(takePictureIntent, TAKE_PHOTO);
|
||||||
}
|
}
|
||||||
|
@ -2538,9 +2545,15 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
||||||
while ((read = tempInput.read(buff)) > 0) {
|
while ((read = tempInput.read(buff)) > 0) {
|
||||||
tempOut.write(buff, 0, read);
|
tempOut.write(buff, 0, read);
|
||||||
}
|
}
|
||||||
uri = FileProvider.getUriForFile(this,
|
if(BuildConfig.DONATIONS) {
|
||||||
"app.fedilab.android.fileProvider",
|
uri = FileProvider.getUriForFile(this,
|
||||||
file);
|
"fr.gouv.etalab.mastodon.fileProvider",
|
||||||
|
file);
|
||||||
|
}else{
|
||||||
|
uri = FileProvider.getUriForFile(this,
|
||||||
|
"app.fedilab.android.fileProvider",
|
||||||
|
file);
|
||||||
|
}
|
||||||
tempInput.close();
|
tempInput.close();
|
||||||
tempOut.close();
|
tempOut.close();
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue