Java Code Examples for android.content.Intent#ACTION_WALLPAPER_CHANGED

The following examples show how to use android.content.Intent#ACTION_WALLPAPER_CHANGED . 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: WallpaperManagerService.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
private void notifyCallbacksLocked(WallpaperData wallpaper) {
    final int n = wallpaper.callbacks.beginBroadcast();
    for (int i = 0; i < n; i++) {
        try {
            wallpaper.callbacks.getBroadcastItem(i).onWallpaperChanged();
        } catch (RemoteException e) {

            // The RemoteCallbackList will take care of removing
            // the dead object for us.
        }
    }
    wallpaper.callbacks.finishBroadcast();

    final Intent intent = new Intent(Intent.ACTION_WALLPAPER_CHANGED);
    mContext.sendBroadcastAsUser(intent, new UserHandle(mCurrentUserId));
}
 
Example 2
Source File: MainReceiver.java    From GeometricWeather with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();
    if (TextUtils.isEmpty(action)) {
        return;
    }
    switch (action) {
        case Intent.ACTION_BOOT_COMPLETED:
        case Intent.ACTION_WALLPAPER_CHANGED:
            IntentHelper.startAwakeForegroundUpdateService(context);
            break;
    }
}
 
Example 3
Source File: MainActivity.java    From DelegateAdapter with Apache License 2.0 5 votes vote down vote up
@Override
public void onReceive(Context context, Intent intent) {
    switch (intent.getAction()) {
        case Intent.ACTION_WALLPAPER_CHANGED:
            refreshWallpaper();
            break;
        case Finals.ACTION_LOGOUT:

            break;
    }

}