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

Commit a3dd979b authored by Kihong Seong's avatar Kihong Seong Committed by Automerger Merge Worker
Browse files

Merge "Add tests for handle methods in BluetoothMapContentObserver" into tm-qpr-dev am: 2391b8ac

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


    // Default supported feature bit mask is 0x1f
    // Default supported feature bit mask is 0x1f
    private int mMapSupportedFeatures = BluetoothMapUtils.MAP_FEATURE_DEFAULT_BITMASK;
    private int mMapSupportedFeatures = BluetoothMapUtils.MAP_FEATURE_DEFAULT_BITMASK;
    // Default event report version is 1.0
    // 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);
    private BluetoothMapFolderElement mFolders = new BluetoothMapFolderElement("DUMMY", null);
    // Will be set by the MAS when generated.
    // Will be set by the MAS when generated.
    private Uri mMessageUri = null;
    @VisibleForTesting
    Uri mMessageUri = null;
    @VisibleForTesting
    @VisibleForTesting
    Uri mContactUri = null;
    Uri mContactUri = null;


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


    private void handleMsgListChangesMms() {
    @VisibleForTesting
    void handleMsgListChangesMms() {
        if (V) {
        if (V) {
            Log.d(TAG, "handleMsgListChangesMms");
            Log.d(TAG, "handleMsgListChangesMms");
        }
        }
@@ -1584,9 +1588,11 @@ public class BluetoothMapContentObserver {
        Cursor c;
        Cursor c;
        synchronized (getMsgListMms()) {
        synchronized (getMsgListMms()) {
            if (mMapEventReportVersion == BluetoothMapUtils.MAP_EVENT_REPORT_V10) {
            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 {
            } 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 {
            try {
@@ -1742,7 +1748,8 @@ public class BluetoothMapContentObserver {
        }
        }
    }
    }


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

File changed.

Preview size limit exceeded, changes collapsed.