Enable PICK_IMAGES intent from personal to work profile
This is a tmp fix to enable dogfooding the feature until the GEM team enables the intent on their side. Test: N/A Bug: 199068419 Change-Id: I4e902015ec07f8a068d3e873f01a099db096c53b
This commit is contained in:
committed by
Kholoud Mohamed
parent
a1d961e1b7
commit
365e4fc6bf
@@ -199,6 +199,30 @@ public class DefaultCrossProfileIntentFiltersUtils {
|
||||
.addDataType("video/*")
|
||||
.build();
|
||||
|
||||
// TODO(b/199068419): Remove once GEM enables the intent for Googlers
|
||||
/** Pick images can be forwarded to work profile. */
|
||||
private static final DefaultCrossProfileIntentFilter ACTION_PICK_IMAGES_TO_PROFILE =
|
||||
new DefaultCrossProfileIntentFilter.Builder(
|
||||
DefaultCrossProfileIntentFilter.Direction.TO_PROFILE,
|
||||
/* flags= */ 0,
|
||||
/* letsPersonalDataIntoProfile= */ true)
|
||||
.addAction(MediaStore.ACTION_PICK_IMAGES)
|
||||
.addCategory(Intent.CATEGORY_DEFAULT)
|
||||
.build();
|
||||
// TODO(b/199068419): Remove once GEM enables the intent for Googlers
|
||||
/** Pick images can be forwarded to work profile. */
|
||||
private static final DefaultCrossProfileIntentFilter
|
||||
ACTION_PICK_IMAGES_WITH_DATA_TYPES_TO_PROFILE =
|
||||
new DefaultCrossProfileIntentFilter.Builder(
|
||||
DefaultCrossProfileIntentFilter.Direction.TO_PROFILE,
|
||||
/* flags= */ 0,
|
||||
/* letsPersonalDataIntoProfile= */ true)
|
||||
.addAction(MediaStore.ACTION_PICK_IMAGES)
|
||||
.addCategory(Intent.CATEGORY_DEFAULT)
|
||||
.addDataType("image/*")
|
||||
.addDataType("video/*")
|
||||
.build();
|
||||
|
||||
/** Open document intent can be forwarded to parent user. */
|
||||
private static final DefaultCrossProfileIntentFilter OPEN_DOCUMENT =
|
||||
new DefaultCrossProfileIntentFilter.Builder(
|
||||
@@ -312,6 +336,8 @@ public class DefaultCrossProfileIntentFiltersUtils {
|
||||
ACTION_PICK_DATA,
|
||||
ACTION_PICK_IMAGES,
|
||||
ACTION_PICK_IMAGES_WITH_DATA_TYPES,
|
||||
ACTION_PICK_IMAGES_TO_PROFILE,
|
||||
ACTION_PICK_IMAGES_WITH_DATA_TYPES_TO_PROFILE,
|
||||
OPEN_DOCUMENT,
|
||||
GET_CONTENT,
|
||||
USB_DEVICE_ATTACHED,
|
||||
|
||||
Reference in New Issue
Block a user