Merge "revert recent changes around system listener registrations" into nyc-dev
am: 46820517e4
* commit '46820517e449de678ac103a39b69276efe412eed':
revert recent changes around system listener registrations
This commit is contained in:
@@ -119,7 +119,13 @@ public abstract class NotificationRankerService extends NotificationListenerServ
|
||||
@Override
|
||||
public void registerAsSystemService(Context context, ComponentName componentName,
|
||||
int currentUser) {
|
||||
throw new IllegalStateException("the ranker may not start itself.");
|
||||
throw new UnsupportedOperationException("the ranker lifecycle is managed by the system.");
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@Override
|
||||
public void unregisterAsSystemService() {
|
||||
throw new UnsupportedOperationException("the ranker lifecycle is managed by the system.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1444,16 +1444,7 @@ public class NotificationManagerService extends SystemService {
|
||||
*/
|
||||
@Override
|
||||
public void unregisterListener(INotificationListener token, int userid) {
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if(mRankerServices.checkServiceTokenLocked(token) != null) {
|
||||
mRankerServices.unregisterService(token, userid);
|
||||
} else {
|
||||
mListeners.unregisterService(token, userid);
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
mListeners.unregisterService(token, userid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user