DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016 Change-Id: I973d953e4c10365e594ddd68516bdc4d7dd0de1c
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package com.android.messaging.datamodel;
|
package com.android.messaging.datamodel;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
import android.database.ContentObserver;
|
import android.database.ContentObserver;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.provider.Telephony;
|
import android.provider.Telephony;
|
||||||
@@ -308,6 +309,14 @@ public class SyncManager {
|
|||||||
// Primary users default SMS app - don't monitor telephony (most changes from this app)
|
// Primary users default SMS app - don't monitor telephony (most changes from this app)
|
||||||
mNotifyOnChanges = false;
|
mNotifyOnChanges = false;
|
||||||
mSyncOnChanges = false;
|
mSyncOnChanges = false;
|
||||||
|
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) {
|
||||||
|
// This is default SMS app but on Auto platform, even default SMS app needs
|
||||||
|
// to be notified of changes because Bluetooth makes changes to Sms database
|
||||||
|
// (thru ContentProvider). Content Change notifications help the default SMS app
|
||||||
|
// refresh display with changes, whenever Bluetooth changes data in SMS db.
|
||||||
|
mNotifyOnChanges = true;
|
||||||
|
mSyncOnChanges = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mNotifyOnChanges || mSyncOnChanges) {
|
if (mNotifyOnChanges || mSyncOnChanges) {
|
||||||
context.getContentResolver().registerContentObserver(Telephony.MmsSms.CONTENT_URI,
|
context.getContentResolver().registerContentObserver(Telephony.MmsSms.CONTENT_URI,
|
||||||
|
|||||||
Reference in New Issue
Block a user