code: public static Handler newThread(String name, int priority, Handler.Callback callback) {
          HandlerThread thread = new HandlerThread(name != null ? name : newName(), priority);
          thread.start();
          return new Handler(thread.getLooper(), callback);
      }
docs: Creates new {@link HandlerThread} and returns new {@link Handler} associated with this thread.
  
  @param name     name of thread, in case of null - the default name will be generated
  @param priority one of constants from {@link android.os.Process}
  @param callback message handling callback, may be null
  @return new instance