Java Code Examples for android.accounts.AccountManager#LOGIN_ACCOUNTS_CHANGED_ACTION
The following examples show how to use
android.accounts.AccountManager#LOGIN_ACCOUNTS_CHANGED_ACTION .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ADMProviderImpl.java From OPFPush with Apache License 2.0 | 6 votes |
@Override public void checkManifest(@Nullable final CheckManifestHandler checkManifestHandler) { OPFLog.logMethod(); super.checkManifest(checkManifestHandler); final Context context = getContext(); ADMManifest.checkManifestAuthoredProperly(context); CheckUtils.checkPermission(context, PERMISSION_RECEIVE_MESSAGES, checkManifestHandler); final String admMessagePermission = context.getPackageName() + RECEIVE_MESSAGE_PERMISSION_SUFFIX; CheckUtils.checkPermission(context, admMessagePermission, checkManifestHandler); CheckUtils.checkService(context, new ComponentName(context, ADMService.class), checkManifestHandler); final Intent registrationBroadcastIntent = new Intent(ACTION_APP_REGISTRATION_EVENT); final Intent receiveBroadcastIntent = new Intent(ACTION_RECEIVE_ADM_MESSAGE); final Intent loginChangedBroadcastIntent = new Intent(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION); final String admReceiverName = ADMReceiver.class.getName(); CheckUtils.checkReceiver(context, admReceiverName, registrationBroadcastIntent, ADMManifest.PERMISSION_SEND_MESSAGES, checkManifestHandler); CheckUtils.checkReceiver(context, admReceiverName, receiveBroadcastIntent, ADMManifest.PERMISSION_SEND_MESSAGES, checkManifestHandler); CheckUtils.checkReceiver(context, LoginAccountsChangedReceiver.class.getName(), loginChangedBroadcastIntent, checkManifestHandler); }
Example 2
Source File: VAccountManagerService.java From container with GNU General Public License v3.0 | 4 votes |
private void sendAccountsChangedBroadcast(int userId) { Intent intent = new Intent(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION); VActivityManager.get().sendBroadcast(intent, userId); broadcastCheckInNow(userId); }