StrictMode.ThreadPolicy.Builder

Creates StrictMode.ThreadPolicy instances. Methods whose names start with detect
specify what problems we should look for. Methods whose names start with penalty
specify what we should do when we detect a problem.

You can call as many detect and penalty methods as you like. Currently
order is insignificant: all penalties apply to all detected problems.

Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.

For example, a strict mode violation would be thrown when calling TypedArray.getInt(int, int) on an index that contains a
String-type resource. If the string value can be parsed as an integer, this method
call will return a value without crashing; however, the developer should format the
resource as an integer to avoid unnecessary type conversion.