launcher3: Improve SimpleBroadcastReceiver.
Unless explicitly annotated, parameters in java are by default nullable. There are a few cases where a null context may be passed to the unregisterReceiverSafely function of SimpleBroadcastReceiver. To mitigate misuses or incorrect contexts being passed for register vs unregister, keep the context as a strong reference in the constructor. Also added NonNull annotations for any public callsites to enforce behavior. Bug: 395019017, 395966395 Flag: NONE - bug fixed Test: manual - presubmit Change-Id: Ie371fa45cadceaf51cf184b446df9123ef27c337
Loading
Please register or sign in to comment