@@ -679,7 +679,7 @@ private void initViews(Bundle savedInstanceState) {
679679 mBottomNavigationView .setUseElevation (true );
680680 mBottomNavigationView .setTitleState (AHBottomNavigation .TitleState .ALWAYS_SHOW );
681681
682- int [] res = {R .attr .actionBarSize };
682+ int [] res = {android . R .attr .actionBarSize };
683683 TypedArray typedArray = obtainStyledAttributes (res );
684684 mActionBarSize = typedArray .getDimensionPixelSize (0 , 56 ) +
685685 (int ) TypedValue .applyDimension (TypedValue .COMPLEX_UNIT_DIP , 24 , getResources ().getDisplayMetrics ());
@@ -1002,9 +1002,10 @@ private void initGalleryToolbarViews() {
10021002 }
10031003
10041004 private void openSystemGalleryApp () {
1005- Intent galleyIntent = new Intent (Intent .ACTION_PICK );
1005+ Intent galleyIntent = new Intent (Intent .ACTION_OPEN_DOCUMENT );
10061006 galleyIntent .setType ("image/*" );
10071007 galleyIntent .putExtra (Intent .EXTRA_ALLOW_MULTIPLE , mCanSelectMultipleInGallery );
1008+ galleyIntent .addFlags (Intent .FLAG_GRANT_READ_URI_PERMISSION );
10081009 startActivityForResult (galleyIntent , REQ_CODE_PICK_BY_GALLEY );
10091010 }
10101011
@@ -1445,6 +1446,10 @@ public int getGalleryItemSelectionCount() {
14451446 public void imageUpdated (String newFilePath , int editedImagePosition ) {
14461447 if (mGalleryAdapter != null ) {
14471448 mGalleryAdapter .getItem (editedImagePosition ).setPath (newFilePath );
1449+ mGalleryAdapter .getItem (editedImagePosition )
1450+ .setUri (FileProvider .getUriForFile (getApplicationContext (),
1451+ getPackageName ()+".sfb_provider" ,new File (newFilePath )));
1452+
14481453 if (Build .VERSION .SDK_INT < 21 ) {
14491454 mGalleryAdapter .notifyItemChanged (editedImagePosition );
14501455 }
0 commit comments