/**
   * Set the background to the given color. The timing for when this becomes visible in the app is
   * undefined and may take place after a small delay.
   */
  public void setColor(int color) {
    if (DEBUG) Log.v(TAG, "setColor " + Integer.toHexString(color));

    mBackgroundColor = color;
    mService.setColor(mBackgroundColor);

    if (mColorWrapper != null) {
      mColorWrapper.setColor(mBackgroundColor);
    }
  }
  private void updateImmediate() {
    lazyInit();

    mColorWrapper.setColor(mBackgroundColor);
    if (mDimWrapper != null) {
      mDimWrapper.setAlpha(mBackgroundColor == Color.TRANSPARENT ? 0 : DIM_ALPHA_ON_SOLID);
    }
    showWallpaper(mBackgroundColor == Color.TRANSPARENT);

    mThemeDrawable = getThemeDrawable();
    mLayerDrawable.setDrawableByLayerId(R.id.background_theme, mThemeDrawable);

    if (mBackgroundDrawable == null) {
      mLayerDrawable.setDrawableByLayerId(R.id.background_imagein, createEmptyDrawable());
    } else {
      if (DEBUG) Log.v(TAG, "Background drawable is available");
      mImageInWrapper = new DrawableWrapper(mBackgroundDrawable);
      mLayerDrawable.setDrawableByLayerId(R.id.background_imagein, mBackgroundDrawable);
      if (mDimWrapper != null) {
        mDimWrapper.setAlpha(FULL_ALPHA);
      }
    }
  }