From e49288d5b13f33172eadd068d1ef1eb89295f78f Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 21 Jun 2013 16:34:44 -0700 Subject: Add SMS Middleware layer. Add fix so ordered broadcasts are delivered to system apps first in the event of a tie. This works around the issue where terrible apps steal SMS notifications from the broadcast queue to simply prevent notifications that could otherwise be removed by a toggle. Change-Id: I4fff0c584f8fce9c5f2f4fe86a82fe6480c307c7 --- services/java/com/android/server/IntentResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/java/com/android/server/IntentResolver.java') diff --git a/services/java/com/android/server/IntentResolver.java b/services/java/com/android/server/IntentResolver.java index 9b19008..8f703f0 100644 --- a/services/java/com/android/server/IntentResolver.java +++ b/services/java/com/android/server/IntentResolver.java @@ -609,7 +609,7 @@ public abstract class IntentResolver { public int compare(Object o1, Object o2) { final int q1 = ((IntentFilter) o1).getPriority(); final int q2 = ((IntentFilter) o2).getPriority(); - return (q1 > q2) ? -1 : ((q1 < q2) ? 1 : 0); + return (q1 > q2) ? -1 : ((q1 < q2) ? 1 : ((IntentFilter) o1).onCompareTie((IntentFilter) o2)); } }; -- cgit v1.1