Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2391b8ac authored by Kihong Seong's avatar Kihong Seong Committed by Android (Google) Code Review
Browse files

Merge "Add tests for handle methods in BluetoothMapContentObserver" into tm-qpr-dev

parents fc481abf 6497d64f
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -143,17 +143,20 @@ public class BluetoothMapContentObserver {
    private int mMasId;
    private boolean mEnableSmsMms = false;
    private boolean mObserverRegistered = false;
    private BluetoothMapAccountItem mAccount;
    @VisibleForTesting
    BluetoothMapAccountItem mAccount;
    private String mAuthority = null;

    // Default supported feature bit mask is 0x1f
    private int mMapSupportedFeatures = BluetoothMapUtils.MAP_FEATURE_DEFAULT_BITMASK;
    // Default event report version is 1.0
    private int mMapEventReportVersion = BluetoothMapUtils.MAP_EVENT_REPORT_V10;
    @VisibleForTesting
    int mMapEventReportVersion = BluetoothMapUtils.MAP_EVENT_REPORT_V10;

    private BluetoothMapFolderElement mFolders = new BluetoothMapFolderElement("DUMMY", null);
    // Will be set by the MAS when generated.
    private Uri mMessageUri = null;
    @VisibleForTesting
    Uri mMessageUri = null;
    @VisibleForTesting
    Uri mContactUri = null;

@@ -1574,7 +1577,8 @@ public class BluetoothMapContentObserver {
        }
    }

    private void handleMsgListChangesMms() {
    @VisibleForTesting
    void handleMsgListChangesMms() {
        if (V) {
            Log.d(TAG, "handleMsgListChangesMms");
        }
@@ -1584,9 +1588,11 @@ public class BluetoothMapContentObserver {
        Cursor c;
        synchronized (getMsgListMms()) {
            if (mMapEventReportVersion == BluetoothMapUtils.MAP_EVENT_REPORT_V10) {
                c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION_SHORT, null, null, null);
                c = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver,
                        Mms.CONTENT_URI, MMS_PROJECTION_SHORT, null, null, null);
            } else {
                c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION_SHORT_EXT, null, null, null);
                c = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver,
                        Mms.CONTENT_URI, MMS_PROJECTION_SHORT_EXT, null, null, null);
            }

            try {
@@ -1742,7 +1748,8 @@ public class BluetoothMapContentObserver {
        }
    }

    private void handleMsgListChangesMsg(Uri uri) throws RemoteException {
    @VisibleForTesting
    void handleMsgListChangesMsg(Uri uri) throws RemoteException {
        if (V) {
            Log.v(TAG, "handleMsgListChangesMsg uri: " + uri.toString());
        }
@@ -1855,7 +1862,8 @@ public class BluetoothMapContentObserver {
                                        && sentFolder.getFolderId() == folderId
                                        && msg.localInitiatedSend) {
                                    if (msg.transparent) {
                                        mResolver.delete(
                                        BluetoothMethodProxy.getInstance().contentResolverDelete(
                                                mResolver,
                                                ContentUris.withAppendedId(mMessageUri, id), null,
                                                null);
                                    } else {
+516 −58

File changed.

Preview size limit exceeded, changes collapsed.