remove unnecessary switchUser call
If userId doesn't change, no need to do switchuser.or it will introduce some tweak for gps modules in quick off/on because they need cost time in off/on. Change-Id: Ie5e408dc8be69c8a63a18bcb2cfe478cef4d70e6 Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
This commit is contained in:
@@ -452,6 +452,9 @@ public class LocationManagerService extends ILocationManager.Stub {
|
||||
* @param userId the new active user's UserId
|
||||
*/
|
||||
private void switchUser(int userId) {
|
||||
if (mCurrentUserId == userId) {
|
||||
return;
|
||||
}
|
||||
mBlacklist.switchUser(userId);
|
||||
mLocationHandler.removeMessages(MSG_LOCATION_CHANGED);
|
||||
synchronized (mLock) {
|
||||
|
||||
Reference in New Issue
Block a user