예제 #1
0
 @Override
 public void dispatchWallpaperCommand(
     String action, int x, int y, int z, Bundle extras, boolean sync) {
   synchronized (mLock) {
     if (DEBUG) Log.v(TAG, "Dispatch wallpaper command: " + x + ", " + y);
     WallpaperCommand cmd = new WallpaperCommand();
     cmd.action = action;
     cmd.x = x;
     cmd.y = y;
     cmd.z = z;
     cmd.extras = extras;
     cmd.sync = sync;
     Message msg = mCaller.obtainMessage(MSG_WALLPAPER_COMMAND);
     msg.obj = cmd;
     mCaller.sendMessage(msg);
   }
 }
예제 #2
0
 @Override
 public void dispatchWallpaperOffsets(
     float x, float y, float xStep, float yStep, boolean sync) {
   synchronized (mLock) {
     if (DEBUG) Log.v(TAG, "Dispatch wallpaper offsets: " + x + ", " + y);
     mPendingXOffset = x;
     mPendingYOffset = y;
     mPendingXOffsetStep = xStep;
     mPendingYOffsetStep = yStep;
     if (sync) {
       mPendingSync = true;
     }
     if (!mOffsetMessageEnqueued) {
       mOffsetMessageEnqueued = true;
       Message msg = mCaller.obtainMessage(MSG_WALLPAPER_OFFSETS);
       mCaller.sendMessage(msg);
     }
   }
 }
예제 #3
0
    IWallpaperEngineWrapper(
        WallpaperService context,
        IWallpaperConnection conn,
        IBinder windowToken,
        int windowType,
        boolean isPreview,
        int reqWidth,
        int reqHeight) {
      if (DEBUG && mCallbackLooper != null) {
        mCallbackLooper.setMessageLogging(new LogPrinter(Log.VERBOSE, TAG));
      }
      mCaller =
          new HandlerCaller(
              context, mCallbackLooper != null ? mCallbackLooper : context.getMainLooper(), this);
      mConnection = conn;
      mWindowToken = windowToken;
      mWindowType = windowType;
      mIsPreview = isPreview;
      mReqWidth = reqWidth;
      mReqHeight = reqHeight;

      Message msg = mCaller.obtainMessage(DO_ATTACH);
      mCaller.sendMessage(msg);
    }
예제 #4
0
 public void unbindInput() {
   mCaller.executeOrSendMessage(mCaller.obtainMessage(DO_UNSET_INPUT_CONTEXT));
 }
 @Override
 public void destroy() {
   mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_DESTROY));
 }
 @Override
 public void closeSystemDialogs() {
   mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_CLOSE_SYSTEM_DIALOGS));
 }
예제 #7
0
 @Override
 public void onUpdateSurface() {
   Message msg = mCaller.obtainMessage(MSG_UPDATE_SURFACE);
   mCaller.sendMessage(msg);
 }
예제 #8
0
 @Override
 public void onRelayoutContainer() {
   Message msg = mCaller.obtainMessage(MSG_UPDATE_SURFACE);
   mCaller.sendMessage(msg);
 }
예제 #9
0
 public void destroy() {
   Message msg = mCaller.obtainMessage(DO_DETACH);
   mCaller.sendMessage(msg);
 }
 public void onInterrupt() {
   Message message = mCaller.obtainMessage(DO_ON_INTERRUPT);
   mCaller.sendMessage(message);
 }
예제 #11
0
 private void sendOnAllPrintJobsHandled() {
   Message message =
       mHandlerCaller.obtainMessage(HandlerCallerCallback.MSG_ON_ALL_PRINT_JOBS_HANDLED);
   mHandlerCaller.executeOrSendMessage(message);
 }