Deprecate implicit Handler constructors
These have been the cause of bugs in the past, such as b/10150258, because it's not always obvious or guaranteed that a calling thread will always have a looper, or that it's actually the looper you want. Specifying the looper explicitly, even if it's just Looper.myLooper(), makes the code clearer. Since callback APIs generally should have Executor variants added, it might be nice to also deprecate the constructors or options that rely on the calling thread's looper, but since I don't have an inventory of all those I'm starting with this. Bug: 144042891 Test: No behavior changes Change-Id: I0e7ba80d6b89a866ea715c790dd602ef728bf5bd
Loading
Please register or sign in to comment