public abstract class

MAMContentProvider

extends ContentProvider
implements HookedContentProvider
java.lang.Object
   ↳ android.content.ContentProvider
     ↳ com.microsoft.intune.mam.client.content.MAMContentProvider

Class Overview

MAM version of ContentProvider.

Summary

[Expand]
Inherited Constants
From interface android.content.ComponentCallbacks2
Public Constructors
MAMContentProvider()
Constructor.
Public Methods
final ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations)
final ContentProviderResult[] applyBatch(String authority, ArrayList<ContentProviderOperation> operations)
ContentProviderResult[] applyBatchMAM(String authority, ArrayList<ContentProviderOperation> operations)
ContentProviderResult[] applyBatchMAM(ArrayList<ContentProviderOperation> operations)
void attachInfo(Context context, ProviderInfo info)
void attachInfoMAM(Context context, ProviderInfo info)
final int bulkInsert(Uri uri, ContentValues[] values)
int bulkInsertMAM(Uri uri, ContentValues[] values)
final Bundle call(String authority, String method, String arg, Bundle extras)
final Bundle call(String method, String arg, Bundle extras)
Bundle callMAM(String authority, String method, String arg, Bundle extras)
Bundle callMAM(String method, String arg, Bundle extras)
final int delete(Uri uri, String selection, String[] selectionArgs)
final int delete(Uri uri, Bundle extras)
int deleteMAM(Uri uri, Bundle extras)
final Uri insert(Uri uri, ContentValues values, Bundle extras)
final Uri insert(Uri uri, ContentValues values)
Uri insertMAM(Uri uri, ContentValues values, Bundle extras)
final boolean isProvideContentAllowed(String contentIdentity)
This method is deprecated. Use isProvideContentAllowedForOID(String).
static boolean isProvideContentAllowed(ContentProvider provider, String contentIdentity)
final boolean isProvideContentAllowedForOID(String oid)
A multi-identity aware app MUST use this method to determine whether policy allows sharing of content to another app.
static boolean isProvideContentAllowedForOid(ContentProvider provider, String oid)
Like the instance-method isProvideContentAllowed above, but static.
final AssetFileDescriptor openAssetFile(Uri uri, String mode, CancellationSignal signal)
final AssetFileDescriptor openAssetFile(Uri uri, String mode)
AssetFileDescriptor openAssetFileMAM(Uri uri, String mode, CancellationSignal signal)
AssetFileDescriptor openAssetFileMAM(Uri uri, String mode)
final ParcelFileDescriptor openFile(Uri uri, String mode, CancellationSignal signal)
final ParcelFileDescriptor openFile(Uri uri, String mode)
ParcelFileDescriptor openFileMAM(Uri uri, String mode)
ParcelFileDescriptor openFileMAM(Uri uri, String mode, CancellationSignal signal)
final AssetFileDescriptor openTypedAssetFile(Uri uri, String mimeTypeFilter, Bundle opts)
final AssetFileDescriptor openTypedAssetFile(Uri uri, String mimeTypeFilter, Bundle opts, CancellationSignal signal)
AssetFileDescriptor openTypedAssetFileMAM(Uri uri, String mimeTypeFilter, Bundle opts)
AssetFileDescriptor openTypedAssetFileMAM(Uri uri, String mimeTypeFilter, Bundle opts, CancellationSignal signal)
final Cursor query(Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal)
final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal)
final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
Cursor queryMAM(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal)
Cursor queryMAM(Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal)
final int update(Uri uri, ContentValues values, Bundle extras)
final int update(Uri uri, ContentValues values, String selection, String[] selectionArgs)
int updateMAM(Uri uri, ContentValues values, Bundle extras)
[Expand]
Inherited Methods
From class android.content.ContentProvider
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface com.microsoft.intune.mam.client.app.MAMIdentityRequirementListener
From interface com.microsoft.intune.mam.client.content.HookedContentProvider

Public Constructors

public MAMContentProvider ()

Constructor.

Public Methods

public final ContentProviderResult[] applyBatch (ArrayList<ContentProviderOperation> operations)

Throws
OperationApplicationException

public final ContentProviderResult[] applyBatch (String authority, ArrayList<ContentProviderOperation> operations)

Throws
OperationApplicationException

public ContentProviderResult[] applyBatchMAM (String authority, ArrayList<ContentProviderOperation> operations)

Throws
OperationApplicationException

public ContentProviderResult[] applyBatchMAM (ArrayList<ContentProviderOperation> operations)

Throws
OperationApplicationException

public void attachInfo (Context context, ProviderInfo info)

public void attachInfoMAM (Context context, ProviderInfo info)

public final int bulkInsert (Uri uri, ContentValues[] values)

public int bulkInsertMAM (Uri uri, ContentValues[] values)

public final Bundle call (String authority, String method, String arg, Bundle extras)

public final Bundle call (String method, String arg, Bundle extras)

public Bundle callMAM (String authority, String method, String arg, Bundle extras)

public Bundle callMAM (String method, String arg, Bundle extras)

public final int delete (Uri uri, String selection, String[] selectionArgs)

public final int delete (Uri uri, Bundle extras)

public int deleteMAM (Uri uri, Bundle extras)

public final Uri insert (Uri uri, ContentValues values, Bundle extras)

public final Uri insert (Uri uri, ContentValues values)

public Uri insertMAM (Uri uri, ContentValues values, Bundle extras)

public final boolean isProvideContentAllowed (String contentIdentity)

This method is deprecated.
Use isProvideContentAllowedForOID(String).

A multi-identity aware app MUST use this method to determine whether policy allows sharing of content to another app. This method may be called only from the implementation of a MAMContentProvider method (callqueryMAM, callMAM, etc). It allows the app to determine whether the content it is about to return to the app which invoked the content provider is allowed to be provided. If this method returns false, the content must not be provided. It is not necessary to use this method for content which can never contain corporate data. It is also not necessary to use this method when returning a ParcelFileDescriptor through openFileMAM, openAssetFileMAM, or openTypedAssetFileMAM as the underlying file is required to already be tagged with the correct identity.

Parameters
contentIdentity UPN representing the owner of the content.
Returns
  • true if the content is allowed to be provided, false if it is not

public static boolean isProvideContentAllowed (ContentProvider provider, String contentIdentity)

This method is deprecated.
Use isProvideContentAllowedForOid(ContentProvider, String).

Like the instance-method isProvideContentAllowed above, but static. Allows usage of isProvideContentAllowed from a ContentProvider which is intended to be processed by the MAM build plugin rather than inheriting MAMContentProvider in source.

Parameters
provider provider to use for the check
contentIdentity UPN representing the owner of the content.
Returns
  • true if the content is allowed to be provided, false if it is not

public final boolean isProvideContentAllowedForOID (String oid)

A multi-identity aware app MUST use this method to determine whether policy allows sharing of content to another app. This method may be called only from the implementation of a MAMContentProvider method (callqueryMAM, callMAM, etc). It allows the app to determine whether the content it is about to return to the app which invoked the content provider is allowed to be provided. If this method returns false, the content must not be provided. It is not necessary to use this method for content which can never contain corporate data. It is also not necessary to use this method when returning a ParcelFileDescriptor through openFileMAM, openAssetFileMAM, or openTypedAssetFileMAM as the underlying file is required to already be tagged with the correct identity.

Parameters
oid OID representing the owner of the content.
Returns
  • true if the content is allowed to be provided, false if it is not

public static boolean isProvideContentAllowedForOid (ContentProvider provider, String oid)

Like the instance-method isProvideContentAllowed above, but static. Allows usage of isProvideContentAllowed from a ContentProvider which is intended to be processed by the MAM build plugin rather than inheriting MAMContentProvider in source.

Parameters
provider provider to use for the check
oid OID representing the owner of the content.
Returns
  • true if the content is allowed to be provided, false if it is not

public final AssetFileDescriptor openAssetFile (Uri uri, String mode, CancellationSignal signal)

Throws
FileNotFoundException

public final AssetFileDescriptor openAssetFile (Uri uri, String mode)

Throws
FileNotFoundException

public AssetFileDescriptor openAssetFileMAM (Uri uri, String mode, CancellationSignal signal)

Throws
FileNotFoundException

public AssetFileDescriptor openAssetFileMAM (Uri uri, String mode)

Throws
FileNotFoundException

public final ParcelFileDescriptor openFile (Uri uri, String mode, CancellationSignal signal)

Throws
FileNotFoundException

public final ParcelFileDescriptor openFile (Uri uri, String mode)

Throws
FileNotFoundException

public ParcelFileDescriptor openFileMAM (Uri uri, String mode)

Throws
FileNotFoundException

public ParcelFileDescriptor openFileMAM (Uri uri, String mode, CancellationSignal signal)

Throws
FileNotFoundException

public final AssetFileDescriptor openTypedAssetFile (Uri uri, String mimeTypeFilter, Bundle opts)

Throws
FileNotFoundException

public final AssetFileDescriptor openTypedAssetFile (Uri uri, String mimeTypeFilter, Bundle opts, CancellationSignal signal)

Throws
FileNotFoundException

public AssetFileDescriptor openTypedAssetFileMAM (Uri uri, String mimeTypeFilter, Bundle opts)

Throws
FileNotFoundException

public AssetFileDescriptor openTypedAssetFileMAM (Uri uri, String mimeTypeFilter, Bundle opts, CancellationSignal signal)

Throws
FileNotFoundException

public final Cursor query (Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal)

public final Cursor query (Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal)

public final Cursor query (Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)

public Cursor queryMAM (Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal)

public Cursor queryMAM (Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal)

public final int update (Uri uri, ContentValues values, Bundle extras)

public final int update (Uri uri, ContentValues values, String selection, String[] selectionArgs)

public int updateMAM (Uri uri, ContentValues values, Bundle extras)