mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
parent
2a1ce859c4
commit
e0603abdd3
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<paths>
|
<paths>
|
||||||
<external-cache-path name="external_cache" path="." />
|
<external-cache-path name="external_cache" path="." />
|
||||||
|
<external-files-path name="external_files" path="." />
|
||||||
|
|
||||||
<external-path name="external_pictures" path="Pictures"/>
|
<external-path name="external_pictures" path="Pictures"/>
|
||||||
<external-path name="external_video" path="Movies"/>
|
<external-path name="external_video" path="Movies"/>
|
||||||
|
@ -14,6 +14,7 @@ import android.support.v4.app.NotificationCompat;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.R;
|
import org.thoughtcrime.securesms.R;
|
||||||
|
import org.thoughtcrime.securesms.util.FileProviderUtil;
|
||||||
import org.thoughtcrime.securesms.util.FileUtils;
|
import org.thoughtcrime.securesms.util.FileUtils;
|
||||||
import org.thoughtcrime.securesms.util.Hex;
|
import org.thoughtcrime.securesms.util.Hex;
|
||||||
import org.thoughtcrime.securesms.util.ServiceUtil;
|
import org.thoughtcrime.securesms.util.ServiceUtil;
|
||||||
@ -55,7 +56,7 @@ public class UpdateApkReadyListener extends BroadcastReceiver {
|
|||||||
|
|
||||||
private void displayInstallNotification(Context context, Uri uri) {
|
private void displayInstallNotification(Context context, Uri uri) {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
intent.setDataAndType(uri, "application/vnd.android.package-archive");
|
intent.setDataAndType(uri, "application/vnd.android.package-archive");
|
||||||
|
|
||||||
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
|
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
|
||||||
@ -87,7 +88,7 @@ public class UpdateApkReadyListener extends BroadcastReceiver {
|
|||||||
|
|
||||||
if (localUri != null) {
|
if (localUri != null) {
|
||||||
File localFile = new File(Uri.parse(localUri).getPath());
|
File localFile = new File(Uri.parse(localUri).getPath());
|
||||||
return Uri.fromFile(localFile);
|
return FileProviderUtil.getUriFor(context, localFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user