Allows an app to respond to requests to switch identity.
(String identity, AppIdentitySwitchResultCallback callback)
Called by MAM to notify the app that an incoming intent requires a temporary identity switch on this thread. The application
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.
Service calls will block until the callback is made. For services which run on the UI thread, the callback must be made
before this function returns, otherwise the application will be nonresponsive. If a FAILED result is reported,
then the service operation that initiated the identity switch will be cancelled.
Activities should instead override the three-argument version of this method from
||identity being switched to
||must be called to notify MAM whether to allow the switch.