Messaging: Use ActivityResultContracts for media and contacts
Instead of handling showing and picking the media ourselves, use existing AcitivityResultContracts to pick images, videos or contacts Change-Id: I20079ad94882cc6bbfeae8d57ca0e4aa30612c01
This commit is contained in:
@@ -27,7 +27,6 @@ import androidx.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.android.messaging.Factory;
|
||||
import com.android.messaging.datamodel.GalleryBoundCursorLoader;
|
||||
import com.android.messaging.datamodel.MediaScratchFileProvider;
|
||||
import com.android.messaging.util.Assert.DoesNotRunOnMainThread;
|
||||
import com.google.common.io.ByteStreams;
|
||||
@@ -136,18 +135,6 @@ public class UriUtil {
|
||||
TextUtils.equals(MEDIA_STORE_URI_KLP, uriAuthority));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the content:// style URI for the given MediaStore row Id in the files table on the
|
||||
* external volume.
|
||||
*
|
||||
* @param id the MediaStore row Id to get the URI for
|
||||
* @return the URI to the files table on the external storage.
|
||||
*/
|
||||
public static Uri getContentUriForMediaStoreId(final long id) {
|
||||
return MediaStore.Files.getContentUri(
|
||||
GalleryBoundCursorLoader.MEDIA_SCANNER_VOLUME_EXTERNAL, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the size in bytes for the content uri. Currently we only support content in the
|
||||
* scratch space.
|
||||
|
||||
Reference in New Issue
Block a user