Include the source package in the voicemail URI.
This means that the source package can be determined without having to query the database, thus making it easier to short circuit code on voicemails that do not belong to a package. Bug: 19236241 Change-Id: If9c3924a5365d5c3e87bff68609b5e7aee8eb218
This commit is contained in:
@@ -258,7 +258,7 @@ public class VoicemailContract {
|
||||
public static Uri insert(Context context, Voicemail voicemail) {
|
||||
ContentResolver contentResolver = context.getContentResolver();
|
||||
ContentValues contentValues = getContentValues(voicemail);
|
||||
return contentResolver.insert(Voicemails.CONTENT_URI, contentValues);
|
||||
return contentResolver.insert(buildSourceUri(context.getPackageName()), contentValues);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -273,7 +273,7 @@ public class VoicemailContract {
|
||||
int count = voicemails.size();
|
||||
for (int i = 0; i < count; i++) {
|
||||
ContentValues contentValues = getContentValues(voicemails.get(i));
|
||||
contentResolver.insert(Voicemails.CONTENT_URI, contentValues);
|
||||
contentResolver.insert(buildSourceUri(context.getPackageName()), contentValues);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user