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; }
private void StartLoop() { Looper.Prepare(); lock (this) { mLooper = Looper.MyLooper(); mEvent.Set(); } Looper.Loop(); }