/** Synchronizes state when the owning Activity is resumed. */
 void onActivityResume() {
   if (mService == null) {
     return;
   }
   if (mLayerDrawable == null) {
     if (DEBUG) Log.v(TAG, "onActivityResume: released state, syncing with service");
     syncWithService();
   } else {
     if (DEBUG)
       Log.v(
           TAG,
           "onActivityResume: updating service color "
               + mBackgroundColor
               + " drawable "
               + mBackgroundDrawable);
     mService.setColor(mBackgroundColor);
     mService.setDrawable(mBackgroundDrawable);
   }
 }
 private void attachToView(View sceneRoot) {
   mBgView = sceneRoot;
   mAttached = true;
   syncWithService();
 }