[One (M8) Q&A, Help & Troubleshooting] kbitz:
Ok, I think I fixed it.

I converted the services.jar file to smali using dex2jar's tools and edited the smali.

Here's what I did to the smali in a diff format (The diff includes the equivalent of what I did in Java as reported by jd-gui for illumination):

diff -Naur original/services-out/com/android/server/notification/ValidateNotificationPeople$LookupResult.smali new/services-out/com/android/server/notification/ValidateNotificationPeople$LookupResult.smali
--- original/services-out/com/android/server/notification/ValidateNotificationPeople$LookupResult.smali	2016-01-05 21:04:09.625160000 -0500
+++ new/services-out/com/android/server/notification/ValidateNotificationPeople$LookupResult.smali	2016-01-05 20:27:34.464017000 -0500
@@ -198,8 +198,9 @@
:L3
.line 425
.end local v4
- sget-boolean v8, Lcom/android/server/notification/NotificationManagerService;->SENSE_STOCK:Z
- if-nez v8, :L8
+# sget-boolean v8, Lcom/android/server/notification/NotificationManagerService;->SENSE_STOCK:Z
+# if-nez v8, :L8
+ goto :L8
.line 426
const-string v8, "vip"
invoke-interface { p1, v8 }, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
diff -Naur original/services-out/com/android/server/notification/ValidateNotificationPeople.smali new/services-out/com/android/server/notification/ValidateNotificationPeople.smali
--- original/services-out/com/android/server/notification/ValidateNotificationPeople.smali	2016-01-05 21:04:09.625160000 -0500
+++ new/services-out/com/android/server/notification/ValidateNotificationPeople.smali	2016-01-05 20:44:14.816246000 -0500
@@ -92,13 +92,14 @@
:L1
sput-boolean v0, Lcom/android/server/notification/ValidateNotificationPeople;->DEBUG:Z
.line 61
- new-array v0, v3, [Ljava/lang/String;
+# new-array v0, v3, [Ljava/lang/String;
+ new-array v0, v4, [Ljava/lang/String;
const-string v3, "_id"
aput-object v3, v0, v1
const-string v1, "starred"
aput-object v1, v0, v2
- const-string v1, "vip"
- aput-object v1, v0, v4
+# const-string v1, "vip"
+# aput-object v1, v0, v4
sput-object v0, Lcom/android/server/notification/ValidateNotificationPeople;->LOOKUP_PROJECTION:[Ljava/lang/String;
return-void
:L2
diff -Naur original/ValidateNotificationPeople.java new/ValidateNotificationPeople.java
--- original/ValidateNotificationPeople.java	2016-01-05 21:01:51.739384000 -0500
+++ new/ValidateNotificationPeople.java	2016-01-05 21:01:10.120056000 -0500
@@ -59,7 +59,7 @@
for (boolean bool = true;; bool = false)
{
DEBUG = bool;
- LOOKUP_PROJECTION = new String[] { "_id", "starred", "vip" };
+ LOOKUP_PROJECTION = new String[] { "_id", "starred" };
return;
}
}
@@ -515,10 +515,8 @@

public void mergeContact(Cursor paramCursor)
{
- boolean bool2 = false;
this.mAffinity = Math.max(this.mAffinity, 0.5F);
int i = paramCursor.getColumnIndex("_id");
- boolean bool1;
if (i >= 0)
{
i = paramCursor.getInt(i);
@@ -527,63 +525,31 @@
}
i = paramCursor.getColumnIndex("starred");
if (i < 0) {
- break label243;
+ break label154;
}
if (paramCursor.getInt(i) == 0) {
- break label238;
+ break label149;
}
- bool1 = true;
- label93:
- if (bool1) {
+ bool = true;
+ if (bool) {
this.mAffinity = Math.max(this.mAffinity, 1.0F);
}
if (ValidateNotificationPeople.DEBUG) {
- Slog.d("ValidateNoPeople", "contact STARRED is: " + bool1);
- }
- label140:
- if (!NotificationManagerService.SENSE_STOCK)
- {
- i = paramCursor.getColumnIndex("vip");
- if (i < 0) {
- break label265;
- }
- if (paramCursor.getInt(i) == 0) {
- break label260;
- }
- bool1 = true;
- if (bool1)
- {
- if ((bool1) || (this.mException)) {
- bool2 = true;
- }
- this.mException = bool2;
- }
- if (ValidateNotificationPeople.DEBUG) {
- Slog.d("ValidateNoPeople", "contact VIP is: " + bool1);
- }
+ Slog.d("ValidateNoPeople", "contact STARRED is: " + bool);
}
}
- label238:
- label243:
- label260:
- label265:
+ label149:
+ label154:
while (!ValidateNotificationPeople.DEBUG) {
for (;;)
{
return;
Slog.i("ValidateNoPeople", "invalid cursor: no _ID");
break;
- bool1 = false;
- break label93;
- if (!ValidateNotificationPeople.DEBUG) {
- break label140;
- }
- Slog.d("ValidateNoPeople", "invalid cursor: no STARRED");
- break label140;
- bool1 = false;
+ boolean bool = false;
}
}
- Slog.d("ValidateNoPeople", "invalid cursor: no VIP");
+ Slog.d("ValidateNoPeople", "invalid cursor: no STARRED");
}
}

If I can figure out how to attach files I'll attach my diff and my new jar. I used jd-gui to sort of guide me and to check my work. I think it's right.

Then I rebooted to recovery, mounted system, backed up my existing /system/framework/services.jar, and replaced it with the new one. I matched the ownership and permissions of the original.

Then I wiped cache and dalvik.

Then I rebooted.

The phone did the "Android is starting..." thing and "optimized" my apps. This step is slow :(

Testing:

I believe I need to test these six cases:

Starred contact text . . .

Unstarred contact text . . .

Non-contact text . . .

Starred contact call . . .

Unstarred contact call . . .

Non-contact call . . .

In priority mode with these 9 configurations:

anyone for calls and anyone for texts

anyone for calls and contacts for texts

anyone for calls and starred for texts

contacts for calls and anyone for texts

contacts for calls and contacts for texts

contacts for calls and starred for texts

starred for calls and anyone for texts

contacts for calls and contacts for texts

contacts for calls and starred for texts

Then repeat the original six cases for Alarms Only, Total Silence, and Do Not Disturb Off, to make sure there's no regressions there either.

I can confirm that when in priority mode, starred-only, when my one Starred contact texts me it rings, and when an unstarred contact texts me it doesn't. When I switched to contacts-only, the unstarred would ring (in contacts, but not starred). The logcat doesn't show the earlier error. I take all that as a pretty solid sign that it's fixed.

I'll start proper testing of this in the morning and see what I come up with. I'll have to find some friends with known and unknown numbers to help :) If you can think of test cases I'm missing, let me know.

Regardless of testing results I recommend against just throwing the .jar file that I made on your phone. I made this on the VZW M8, which uses a different rom from the standard M8. I have no idea if it would break something to do it. I'd recommend using dex2jar to convert the services.jar file to smali and then edit the smali the way I did, then convert back to a .dex, and rezip the .dex. I know it's kind of a pain, but I don't have one of your devices to test on. :/ Alternatively, post your original /system/framework/services.jar and we'll diff it with the original from the VZW ROM. If they're the same you should be good to go with the new one.

Once testing is done, we confirm no breakage, and we confirm that the original services.jar files are identical between our ROMs, then we should figure out how to make a flashable zip and distribute it here and back to the ROM maintainers.