Home | History | Annotate | Download | only in shadows
      1 package com.xtremelabs.robolectric.shadows;
      2 
      3 import com.xtremelabs.robolectric.internal.Implementation;
      4 import com.xtremelabs.robolectric.internal.Implements;
      5 import com.xtremelabs.robolectric.internal.RealObject;
      6 
      7 import android.os.Bundle;
      8 import android.os.Handler;
      9 import android.os.Message;
     10 import android.os.Messenger;
     11 import android.os.RemoteException;
     12 
     13 @Implements(Messenger.class)
     14 public class ShadowMessenger {
     15 
     16     private Handler handler;
     17 
     18     public void __constructor__(Handler handler) {
     19         this.handler = handler;
     20     }
     21 
     22     @Implementation
     23     public void send(Message message) throws RemoteException {
     24         message.setTarget(handler);
     25         message.sendToTarget();
     26     }
     27 }
     28