Merge "Fix null handling"
This commit is contained in:
committed by
Android (Google) Code Review
commit
844bfb3683
@@ -595,12 +595,13 @@ public class NotificationBackend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public NotificationListenerFilter getListenerFilter(ComponentName cn, int userId) {
|
public NotificationListenerFilter getListenerFilter(ComponentName cn, int userId) {
|
||||||
|
NotificationListenerFilter nlf = null;
|
||||||
try {
|
try {
|
||||||
return sINM.getListenerFilter(cn, userId);
|
nlf = sINM.getListenerFilter(cn, userId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.w(TAG, "Error calling NoMan", e);
|
Log.w(TAG, "Error calling NoMan", e);
|
||||||
}
|
}
|
||||||
return new NotificationListenerFilter();
|
return nlf != null ? nlf : new NotificationListenerFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setListenerFilter(ComponentName cn, int userId, NotificationListenerFilter nlf) {
|
public void setListenerFilter(ComponentName cn, int userId, NotificationListenerFilter nlf) {
|
||||||
|
Reference in New Issue
Block a user