Skip to content
Snippets Groups Projects
Commit 93b7516d authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

photobooth: catch ActivityNotFound exception

Change-Id: I06d4a5df383737d65de1f0dbbe3a0ec332f018df
parent bc5d2354
Branches
Tags
No related merge requests found
...@@ -22,6 +22,7 @@ package cx.ring.account; ...@@ -22,6 +22,7 @@ package cx.ring.account;
import android.Manifest; import android.Manifest;
import android.app.Activity; import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
...@@ -203,10 +204,12 @@ public class ProfileCreationFragment extends BaseSupportFragment<ProfileCreation ...@@ -203,10 +204,12 @@ public class ProfileCreationFragment extends BaseSupportFragment<ProfileCreation
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri); intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
tmpProfilePhotoUri = uri; tmpProfilePhotoUri = uri;
startActivityForResult(intent, REQUEST_CODE_PHOTO);
} catch (IOException e) { } catch (IOException e) {
Log.e(TAG, "Can't create temp file", e); Log.e(TAG, "Can't create temp file", e);
} catch (ActivityNotFoundException e) {
Log.e(TAG, "Could not start activity");
} }
startActivityForResult(intent, REQUEST_CODE_PHOTO);
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment