close a potential race condition in registerAsSystemService

Bug: 27555424
Change-Id: I1537fd1aae3dba83de22d1b245bddd0a3922d289
This commit is contained in:
Chris Wren
2016-04-29 10:07:48 -04:00
parent 9de0f87e97
commit b66a16d975

View File

@@ -764,9 +764,9 @@ public abstract class NotificationListenerService extends Service {
}
mSystemContext = context;
INotificationManager noMan = getNotificationInterface();
noMan.registerListener(mWrapper, componentName, currentUser);
mCurrentUser = currentUser;
mHandler = new MyHandler(context.getMainLooper());
mCurrentUser = currentUser;
noMan.registerListener(mWrapper, componentName, currentUser);
}
/**