@Override public void run() { Runnable run = new Runnable() { @Override public void run() { try { Log.d("Runnable run", "Thread id = " + Looper.myLooper().getThread().getId()); Thread.sleep(2000); } catch (InterruptedException i) { } } }; executor.execute(run); }
private void shoutDown() { handler.removeCallbacks(handlerRun); executor.shoutDown(); }