Removed unnecessary calls and creations of Binder
The previous behavior registered HotspotController to the WifiManager every time a callback was added in order to trigger an update in the number of current connections. This caused two things: * Every registering with WifiManager creates a new Binder object (see WifiManager#registerSoftApCallback) * Every callback added triggered Callback#onHotspotChanged on all the current callbacks This removes both behaviors while maintaining the information sent to the callback on addCallback by posting an update. We assume that the information currently in HotspotController is up to date, if not, there would be a callback. Test: atest Test: manual (opening and closing QS) Fixes: 123546508 Change-Id: Ica73082beb752a7c20e11b2b2a441fa84bf948a1
Loading
Please register or sign in to comment