Skip to content

Commit

Permalink
nullable check
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhengyin committed Oct 10, 2022
1 parent 4c44f3b commit e5bc3d8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,12 @@ protected void onSaveInstanceState(@NonNull Bundle outState) {
mSelectedCollection.onSaveInstanceState(outState);
mAlbumCollection.onSaveInstanceState(outState);
outState.putBoolean("checkState", mOriginalEnable);
outState.putString("path", mMediaStoreCompat.getCurrentPhotoPath());
outState.putString("uri", mMediaStoreCompat.getCurrentPhotoUri().toString());
Uri currentPhotoUri = mMediaStoreCompat.getCurrentPhotoUri();
String currentPhotoPath = mMediaStoreCompat.getCurrentPhotoPath();
if (currentPhotoUri != null && currentPhotoPath != null) {
outState.putString("path", currentPhotoPath);
outState.putString("uri", currentPhotoUri.toString());
}
}

@Override
Expand Down

0 comments on commit e5bc3d8

Please sign in to comment.