예제 #1
0
파일: Handler.cs 프로젝트: lijint/DHRQ
 public Handler()
 {
     mLooper = Looper.MyLooper();
     if (mLooper == null)
     {
         throw new Exception("Can't create handler inside thread that has not called Looper.prepare()");
     }
     mQueue = mLooper.Queue;
 }
예제 #2
0
 private void StartLoop()
 {
     Looper.Prepare();
     lock (this)
     {
         mLooper = Looper.MyLooper();
         mEvent.Set();
     }
     Looper.Loop();
 }