MediaRouter: don't scanPackages if unnecessary
scanPackages was called whenever it receives a broadcast, which could be duplicated. This CL adds a boolean variable (mScanPackagesScheduled) not to scan packages if it is scheduled. Bug: 153527463 Test: cts test, atest mediarouertest and check MediaRouteProvider#onBind, #onUnbind are called when a new provider is installed. Confirm # of calls is reduced (3 -> 1). Change-Id: Iaa423b7d1b2b2a97aebed0001b4077bdf95b1d54
Loading
Please register or sign in to comment