public abstract class

MAMExpandableListActivity

extends ExpandableListActivity
implements HookedActivity
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ android.app.ExpandableListActivity
             ↳ com.microsoft.intune.mam.client.app.MAMExpandableListActivity

Class Overview

Managed version of android.app.ExpandableListActivity.

Summary

[Expand]
Inherited Constants
From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2
[Expand]
Inherited Fields
From class android.app.Activity
Public Constructors
MAMExpandableListActivity()
Public Methods
static void defaultOnMAMIdentitySwitchRequired(Activity activity, String identity, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)
Expose default behavior for notifying the app that an incoming intent requires an identity switch for this Activity.
boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas)
View onCreateView(View parent, String name, Context context, AttributeSet attrs)
void onMAMActivityResult(int requestCode, int resultCode, Intent data)
MAM version of onActivityResult.
void onMAMCompanyPortalRequired(String identity)
Called by MAM to notify the app that this activity is being blocked from displaying data because the Company Portal is required for the identity currently in use.
void onMAMCreate(Bundle savedInstanceState)
MAM version of onCreate.
View onMAMCreateView(View parent, String name, Context context, AttributeSet attrs)
MAM version of onCreateView.
void onMAMDestroy()
MAM version of onDestroy.
void onMAMIdentitySwitchRequired(String identity, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)
Called by MAM to notify the app that an incoming intent requires an identity switch for this Activity.
void onMAMNewIntent(Intent intent)
MAM version of onNewIntent.
void onMAMPause()
MAM version of onPause.
boolean onMAMPictureInPictureRequested()
MAM version of onPictureInPictureRequested.
void onMAMPostCreate(Bundle savedInstanceState)
MAM version of onPostCreate.
void onMAMPostResume()
MAM version of onPostResume.
boolean onMAMPrepareOptionsMenu(Menu menu)
MAM version of onPrepareOptionsMenu.
void onMAMProvideAssistContent(AssistContent content)
MAM version of onProvideAssistContent.
Uri onMAMProvideReferrer()
MAM version on onProviderReferrer.
final void onMAMRawProvideAssistContent(Object content)
MAM version of onProvideAssistContent.
final boolean onMAMRawSearchRequested(Object event)
MAM version of onSearchRequested.
void onMAMResume()
MAM version of onResume.
void onMAMSaveInstanceState(Bundle outState)
MAM version of onSaveInstanceState.
boolean onMAMSearchRequested(SearchEvent event)
MAM version of onSearchRequested.
void onMAMStateNotSaved()
MAM Version of onStateNotSaved.
void onMAMUserLeaveHint()
MAM version of onUserLeaveHint.
boolean onPictureInPictureRequested()
boolean onPictureInPictureRequestedReal()
final boolean onPrepareOptionsMenu(Menu menu)
final void onProvideAssistContent(AssistContent content)
Uri onProvideReferrer()
final void onSaveInstanceState(Bundle outState)
final boolean onSearchRequested(SearchEvent event)
void onStateNotSaved()
void onSwitchMAMIdentityComplete(MAMIdentitySwitchResult result)
Called by MAM to notify the app that the identity switch for this Activity has completed.
void startActivities(Intent[] intents, Bundle options)
void startActivityForResult(Intent intent, int requestCode)
void startActivityForResult(Intent intent, int requestCode, Bundle options)
void startActivityFromFragment(Fragment fragment, Intent intent, int requestCode)
void startActivityFromFragment(Fragment fragment, Intent intent, int requestCode, Bundle options)
boolean startActivityIfNeeded(Intent intent, int requestCode)
boolean startActivityIfNeeded(Intent intent, int requestCode, Bundle options)
final void switchMAMIdentity(String newIdentity, EnumSet<IdentitySwitchOption> options)
Set new identity.
final void switchMAMIdentity(String newIdentity)
Set new identity.
Protected Methods
void attachBaseContext(Context context)
final void onActivityResult(int requestCode, int resultCode, Intent data)
final void onCreate(Bundle savedInstanceState)
final void onDestroy()
final void onNewIntent(Intent intent)
final void onPause()
final void onPostCreate(Bundle savedInstanceState)
final void onPostResume()
final void onResume()
void onUserLeaveHint()
[Expand]
Inherited Methods
From class android.app.ExpandableListActivity
From class android.app.Activity
From class android.view.ContextThemeWrapper
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface android.view.KeyEvent.Callback
From interface android.view.LayoutInflater.Factory
From interface android.view.LayoutInflater.Factory2
From interface android.view.View.OnCreateContextMenuListener
From interface android.view.Window.Callback
From interface android.widget.ExpandableListView.OnChildClickListener
From interface android.widget.ExpandableListView.OnGroupCollapseListener
From interface android.widget.ExpandableListView.OnGroupExpandListener
From interface com.microsoft.intune.mam.client.app.HookedActivity
From interface com.microsoft.intune.mam.client.app.MAMActivityBlockingListener
From interface com.microsoft.intune.mam.client.app.MAMActivityIdentityRequirementListener
From interface com.microsoft.intune.mam.client.app.MAMActivityIdentitySwitchListener

Public Constructors

public MAMExpandableListActivity ()

Public Methods

public static void defaultOnMAMIdentitySwitchRequired (Activity activity, String identity, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)

Expose default behavior for notifying the app that an incoming intent requires an identity switch for this Activity. The Activity will be checked if it is MAM-integrated and, if so, the default onMAMIdentitySwitchRequired behavior will be called.

Parameters
activity The activity to perform an identity switch for.
identity identity being switched to
reason reason identity is being switched.
callback must be called to notify MAM whether to allow the switch.

public boolean onCreateThumbnail (Bitmap outBitmap, Canvas canvas)

public View onCreateView (View parent, String name, Context context, AttributeSet attrs)

public void onMAMActivityResult (int requestCode, int resultCode, Intent data)

MAM version of onActivityResult.

Parameters
requestCode Request code.
resultCode Result code.
data Intent data.

public void onMAMCompanyPortalRequired (String identity)

Called by MAM to notify the app that this activity is being blocked from displaying data because the Company Portal is required for the identity currently in use. The app may wish to use this notification to prompt the user to remove the account if the user doesn't want to install the Company Portal. This may be called before onMAMCreate. If the app changes the activity identity or finishes the activity, the blocking UI will not be displayed. If the app wishes to display UI to the user in response to this event, it must either use a different activity or change the identity of this one (and avoid displaying information from the potentially corporate identity).

Parameters
identity UPN being blocked. This is the same as the activity's current identity.

public void onMAMCreate (Bundle savedInstanceState)

MAM version of onCreate.

Parameters
savedInstanceState Saved instance state.

public View onMAMCreateView (View parent, String name, Context context, AttributeSet attrs)

MAM version of onCreateView. See Android documentation for more info.

Parameters
parent parent
name name
context context
attrs attrs
Returns
  • view

public void onMAMDestroy ()

MAM version of onDestroy.

public void onMAMIdentitySwitchRequired (String identity, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)

Called by MAM to notify the app that an incoming intent requires an identity switch for this Activity. This can occur during activity creation or when a new intent is sent to an existing activity. The application must call callback.reportIdentitySwitchResult to tell MAM whether the identity switch is allowed. In general, applications should allow identity switches. The default implementation allows all identity switches. When using the build plugin, the default implementation can be accessed by calling MAMctivity.defaultOnMAMIdentitySwitchRequired. The most common case for this method to be called is before onMAMCreate. The application is allowed to show UI to confirm the identity switch, but it must show the UI using a different activity as onMAMCreate will not be called for this activity until the identity switch is allowed. Special care must be taken with single-top activities when a new intent can cause an identity switch. If a new intent causes an identity switch, after the switch is approved by this method, onMAMNewIntent will be called and then recreate() will be called which is necessary to enforce screenshot restrictions from the new policy. It is strongly recommended that the implementation of onMAMNewIntent call setIntent, as otherwise the following recreate may cause the original intent rather than the new intent to be displayed.

Parameters
identity identity being switched to
reason reason identity is being switched
callback must be called to notify MAM whether to allow the switch.

public void onMAMNewIntent (Intent intent)

MAM version of onNewIntent.

Parameters
intent intent to process

public void onMAMPause ()

MAM version of onPause.

public boolean onMAMPictureInPictureRequested ()

MAM version of onPictureInPictureRequested.

Returns
  • true if the activity received this callback regardless of if it acts on it or not. If false, the framework will assume the app hasn't been updated to leverage this callback and will in turn send a legacy callback of onUserLeaveHint() for the app to enter picture-in-picture mode.

public void onMAMPostCreate (Bundle savedInstanceState)

MAM version of onPostCreate.

Parameters
savedInstanceState Saved instance state.

public void onMAMPostResume ()

MAM version of onPostResume.

public boolean onMAMPrepareOptionsMenu (Menu menu)

MAM version of onPrepareOptionsMenu.

Parameters
menu menu
Returns
  • true to display the menu

public void onMAMProvideAssistContent (AssistContent content)

MAM version of onProvideAssistContent.

Parameters
content content

public Uri onMAMProvideReferrer ()

MAM version on onProviderReferrer.

Returns
  • URI representing referrer.

public final void onMAMRawProvideAssistContent (Object content)

MAM version of onProvideAssistContent.

Parameters
content AssistContent. We use raw object type, otherwise InterProxy will throw class not found errors on downlevel devices.

public final boolean onMAMRawSearchRequested (Object event)

MAM version of onSearchRequested.

Parameters
event SearchEvent. We use raw object type, otherwise InterProxy will throw class not found errors on downlevel devices.
Returns
  • false if activity blocks the search.

public void onMAMResume ()

MAM version of onResume.

public void onMAMSaveInstanceState (Bundle outState)

MAM version of onSaveInstanceState.

Parameters
outState Out state.

public boolean onMAMSearchRequested (SearchEvent event)

MAM version of onSearchRequested.

Parameters
event event
Returns
  • true if the search request is allowed

public void onMAMStateNotSaved ()

MAM Version of onStateNotSaved.

public void onMAMUserLeaveHint ()

MAM version of onUserLeaveHint.

public boolean onPictureInPictureRequested ()

public boolean onPictureInPictureRequestedReal ()

public final boolean onPrepareOptionsMenu (Menu menu)

public final void onProvideAssistContent (AssistContent content)

public Uri onProvideReferrer ()

public final void onSaveInstanceState (Bundle outState)

public final boolean onSearchRequested (SearchEvent event)

public void onStateNotSaved ()

public void onSwitchMAMIdentityComplete (MAMIdentitySwitchResult result)

Called by MAM to notify the app that the identity switch for this Activity has completed.

Parameters
result Result of the MAM identity switch.

public void startActivities (Intent[] intents, Bundle options)

public void startActivityForResult (Intent intent, int requestCode)

public void startActivityForResult (Intent intent, int requestCode, Bundle options)

public void startActivityFromFragment (Fragment fragment, Intent intent, int requestCode)

public void startActivityFromFragment (Fragment fragment, Intent intent, int requestCode, Bundle options)

public boolean startActivityIfNeeded (Intent intent, int requestCode)

public boolean startActivityIfNeeded (Intent intent, int requestCode, Bundle options)

public final void switchMAMIdentity (String newIdentity, EnumSet<IdentitySwitchOption> options)

Set new identity.

Parameters
newIdentity New identity
options Identity switch options.

public final void switchMAMIdentity (String newIdentity)

Set new identity.

Parameters
newIdentity New identity

Protected Methods

protected void attachBaseContext (Context context)

protected final void onActivityResult (int requestCode, int resultCode, Intent data)

protected final void onCreate (Bundle savedInstanceState)

protected final void onDestroy ()

protected final void onNewIntent (Intent intent)

protected final void onPause ()

protected final void onPostCreate (Bundle savedInstanceState)

protected final void onPostResume ()

protected final void onResume ()

protected void onUserLeaveHint ()