Merge "NotificationService causes watchdog issues and improves performance" am: 9e55959a8a am: 2f34d0ec1b
Change-Id: Iec23886357b1262b2f53ab38c1fe397ac0be4fa3
This commit is contained in:
@@ -23,7 +23,6 @@ import android.content.BroadcastReceiver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.telecom.TelecomManager;
|
import android.telecom.TelecomManager;
|
||||||
|
|
||||||
import com.android.internal.util.NotificationMessagingUtil;
|
import com.android.internal.util.NotificationMessagingUtil;
|
||||||
@@ -55,14 +54,9 @@ public class NotificationComparator
|
|||||||
final boolean isLeftHighImportance = leftImportance >= IMPORTANCE_DEFAULT;
|
final boolean isLeftHighImportance = leftImportance >= IMPORTANCE_DEFAULT;
|
||||||
final boolean isRightHighImportance = rightImportance >= IMPORTANCE_DEFAULT;
|
final boolean isRightHighImportance = rightImportance >= IMPORTANCE_DEFAULT;
|
||||||
|
|
||||||
// With new interruption model, prefer importance bucket above all other criteria
|
if (isLeftHighImportance != isRightHighImportance) {
|
||||||
// (to ensure buckets are contiguous)
|
// by importance bucket, high importance higher than low importance
|
||||||
if (Settings.Secure.getInt(mContext.getContentResolver(),
|
return -1 * Boolean.compare(isLeftHighImportance, isRightHighImportance);
|
||||||
Settings.Secure.NOTIFICATION_NEW_INTERRUPTION_MODEL, 1) == 1) {
|
|
||||||
if (isLeftHighImportance != isRightHighImportance) {
|
|
||||||
// by importance bucket, high importance higher than low importance
|
|
||||||
return -1 * Boolean.compare(isLeftHighImportance, isRightHighImportance);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// first all colorized notifications
|
// first all colorized notifications
|
||||||
|
|||||||
Reference in New Issue
Block a user