Loading android/app/src/com/android/bluetooth/pbap/BluetoothPbapMethodProxy.java→android/app/src/com/android/bluetooth/BluetoothMethodProxy.java +8 −9 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.bluetooth.pbap; package com.android.bluetooth; import android.content.ContentResolver; import android.content.Context; Loading @@ -22,7 +22,6 @@ import android.database.Cursor; import android.net.Uri; import android.util.Log; import com.android.bluetooth.Utils; import com.android.internal.annotations.VisibleForTesting; import com.android.obex.HeaderSet; Loading @@ -31,22 +30,22 @@ import java.io.IOException; /** * Proxy class for method calls to help with unit testing */ public class BluetoothPbapMethodProxy { private static final String TAG = BluetoothPbapMethodProxy.class.getSimpleName(); private static BluetoothPbapMethodProxy sInstance; public class BluetoothMethodProxy { private static final String TAG = BluetoothMethodProxy.class.getSimpleName(); private static BluetoothMethodProxy sInstance; private static final Object INSTANCE_LOCK = new Object(); private BluetoothPbapMethodProxy() {} private BluetoothMethodProxy() {} /** * Get the singleton instance of proxy * * @return the singleton instance, guaranteed not null */ public static BluetoothPbapMethodProxy getInstance() { public static BluetoothMethodProxy getInstance() { synchronized (INSTANCE_LOCK) { if (sInstance == null) { sInstance = new BluetoothPbapMethodProxy(); sInstance = new BluetoothMethodProxy(); } } return sInstance; Loading @@ -58,7 +57,7 @@ public class BluetoothPbapMethodProxy { * @param proxy a test instance of the BluetoothPbapMethodCallProxy */ @VisibleForTesting public static void setInstanceForTesting(BluetoothPbapMethodProxy proxy) { public static void setInstanceForTesting(BluetoothMethodProxy proxy) { Utils.enforceInstrumentationTestMode(); synchronized (INSTANCE_LOCK) { Log.d(TAG, "setInstanceForTesting(), set to " + proxy); Loading android/app/src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposer.java +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.provider.CallLog.Calls; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.bluetooth.R; import com.android.internal.annotations.VisibleForTesting; import com.android.vcard.VCardBuilder; Loading Loading @@ -107,7 +108,7 @@ public class BluetoothPbapCallLogComposer { return false; } mCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( mCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContext.getContentResolver(), contentUri, projection, selection, selectionArgs, sortOrder); Loading android/app/src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java +3 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import android.provider.CallLog.Calls; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.internal.annotations.VisibleForTesting; import com.android.obex.ApplicationParameter; import com.android.obex.HeaderSet; Loading Loading @@ -242,7 +243,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler { private PbapStateMachine mStateMachine; private BluetoothPbapMethodProxy mPbapMethodProxy; private BluetoothMethodProxy mPbapMethodProxy; private enum ContactsType { TYPE_PHONEBOOK , TYPE_SIM ; Loading Loading @@ -272,7 +273,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler { mVcardManager = new BluetoothPbapVcardManager(mContext); mVcardSimManager = new BluetoothPbapSimVcardManager(mContext); mStateMachine = stateMachine; mPbapMethodProxy = BluetoothPbapMethodProxy.getInstance(); mPbapMethodProxy = BluetoothMethodProxy.getInstance(); } @Override Loading android/app/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManager.java +17 −23 Original line number Diff line number Diff line Loading @@ -15,41 +15,35 @@ */ package com.android.bluetooth.pbap; import com.android.bluetooth.R; import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteException; import android.net.Uri; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.Contacts; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.bluetooth.R; import com.android.internal.annotations.VisibleForTesting; import com.android.obex.Operation; import com.android.obex.ResponseCodes; import com.android.obex.ServerOperation; import com.android.vcard.VCardBuilder; import com.android.vcard.VCardConfig; import com.android.vcard.VCardConstants; import com.android.vcard.VCardUtils; import android.content.ContentValues; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.text.TextUtils; import android.util.Log; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Collections; import java.util.Comparator; import com.android.obex.Operation; import com.android.obex.ResponseCodes; import com.android.obex.ServerOperation; import java.util.List; /** * VCard composer especially for Call Log used in Bluetooth. Loading Loading @@ -119,7 +113,7 @@ public class BluetoothPbapSimVcardManager { } //checkpoint Figure out if we can apply selection, projection and sort order. mCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mContentResolver, mCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mContentResolver, contentUri, SIM_PROJECTION, null, null, sortOrder); if (mCursor == null) { Loading Loading @@ -273,7 +267,7 @@ public class BluetoothPbapSimVcardManager { int size = 0; Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContentResolver, SIM_URI, SIM_PROJECTION, null,null, null); if (contactCursor != null) { size = contactCursor.getCount(); Loading @@ -293,7 +287,7 @@ public class BluetoothPbapSimVcardManager { ArrayList<String> allnames = new ArrayList<String>(); Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContentResolver, SIM_URI, SIM_PROJECTION, null,null,null); if (contactCursor != null) { for (contactCursor.moveToFirst(); !contactCursor.isAfterLast(); contactCursor Loading Loading @@ -334,7 +328,7 @@ public class BluetoothPbapSimVcardManager { Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContentResolver, SIM_URI, SIM_PROJECTION, null, null, null); if (contactCursor != null) { Loading android/app/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java +11 −10 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.bluetooth.R; import com.android.bluetooth.util.DevicePolicyUtils; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -182,7 +183,7 @@ public class BluetoothPbapVcardManager { selectionClause = Phone.STARRED + " = 1"; } try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, new String[]{Phone.CONTACT_ID}, selectionClause, null, Phone.CONTACT_ID); if (contactCursor == null) { Loading @@ -209,7 +210,7 @@ public class BluetoothPbapVcardManager { int size = 0; Cursor callCursor = null; try { callCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, null, selection, null, CallLog.Calls.DEFAULT_SORT_ORDER); if (callCursor != null) { size = callCursor.getCount(); Loading Loading @@ -243,7 +244,7 @@ public class BluetoothPbapVcardManager { Cursor callCursor = null; ArrayList<String> list = new ArrayList<String>(); try { callCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, projection, selection, null, CALLLOG_SORT_ORDER); if (callCursor != null) { for (callCursor.moveToFirst(); !callCursor.isAfterLast(); callCursor.moveToNext()) { Loading Loading @@ -295,7 +296,7 @@ public class BluetoothPbapVcardManager { if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_ALPHABETICAL) { orderBy = Phone.DISPLAY_NAME; } contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, null, null, orderBy); if (contactCursor != null) { appendDistinctNameIdList(nameList, mContext.getString(android.R.string.unknownName), Loading Loading @@ -354,7 +355,7 @@ public class BluetoothPbapVcardManager { final Uri myUri = DevicePolicyUtils.getEnterprisePhoneUri(mContext); Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, null, null, Phone.CONTACT_ID); Loading Loading @@ -443,7 +444,7 @@ public class BluetoothPbapVcardManager { } try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, uri, projection, null, null, Phone.CONTACT_ID); if (contactCursor != null) { Loading Loading @@ -478,7 +479,7 @@ public class BluetoothPbapVcardManager { long primaryVcMsb = 0; ArrayList<String> list = new ArrayList<String>(); try { callCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, null, selection, null, null); while (callCursor != null && callCursor.moveToNext()) { count = count + 1; Loading Loading @@ -522,7 +523,7 @@ public class BluetoothPbapVcardManager { long endPointId = 0; try { // Need test to see if order by _ID is ok here, or by date? callsCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callsCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, CALLLOG_PROJECTION, typeSelection, null, CALLLOG_SORT_ORDER); if (callsCursor != null) { Loading Loading @@ -596,7 +597,7 @@ public class BluetoothPbapVcardManager { } try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, selectionClause, null, Phone.CONTACT_ID); if (contactCursor != null) { Loading Loading @@ -640,7 +641,7 @@ public class BluetoothPbapVcardManager { if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_ALPHABETICAL) { orderBy = Phone.DISPLAY_NAME; } contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, null, null, orderBy); } catch (CursorWindowAllocationException e) { Log.e(TAG, "CursorWindowAllocationException while composing phonebook one vcard"); Loading Loading
android/app/src/com/android/bluetooth/pbap/BluetoothPbapMethodProxy.java→android/app/src/com/android/bluetooth/BluetoothMethodProxy.java +8 −9 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.bluetooth.pbap; package com.android.bluetooth; import android.content.ContentResolver; import android.content.Context; Loading @@ -22,7 +22,6 @@ import android.database.Cursor; import android.net.Uri; import android.util.Log; import com.android.bluetooth.Utils; import com.android.internal.annotations.VisibleForTesting; import com.android.obex.HeaderSet; Loading @@ -31,22 +30,22 @@ import java.io.IOException; /** * Proxy class for method calls to help with unit testing */ public class BluetoothPbapMethodProxy { private static final String TAG = BluetoothPbapMethodProxy.class.getSimpleName(); private static BluetoothPbapMethodProxy sInstance; public class BluetoothMethodProxy { private static final String TAG = BluetoothMethodProxy.class.getSimpleName(); private static BluetoothMethodProxy sInstance; private static final Object INSTANCE_LOCK = new Object(); private BluetoothPbapMethodProxy() {} private BluetoothMethodProxy() {} /** * Get the singleton instance of proxy * * @return the singleton instance, guaranteed not null */ public static BluetoothPbapMethodProxy getInstance() { public static BluetoothMethodProxy getInstance() { synchronized (INSTANCE_LOCK) { if (sInstance == null) { sInstance = new BluetoothPbapMethodProxy(); sInstance = new BluetoothMethodProxy(); } } return sInstance; Loading @@ -58,7 +57,7 @@ public class BluetoothPbapMethodProxy { * @param proxy a test instance of the BluetoothPbapMethodCallProxy */ @VisibleForTesting public static void setInstanceForTesting(BluetoothPbapMethodProxy proxy) { public static void setInstanceForTesting(BluetoothMethodProxy proxy) { Utils.enforceInstrumentationTestMode(); synchronized (INSTANCE_LOCK) { Log.d(TAG, "setInstanceForTesting(), set to " + proxy); Loading
android/app/src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposer.java +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.provider.CallLog.Calls; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.bluetooth.R; import com.android.internal.annotations.VisibleForTesting; import com.android.vcard.VCardBuilder; Loading Loading @@ -107,7 +108,7 @@ public class BluetoothPbapCallLogComposer { return false; } mCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( mCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContext.getContentResolver(), contentUri, projection, selection, selectionArgs, sortOrder); Loading
android/app/src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java +3 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import android.provider.CallLog.Calls; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.internal.annotations.VisibleForTesting; import com.android.obex.ApplicationParameter; import com.android.obex.HeaderSet; Loading Loading @@ -242,7 +243,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler { private PbapStateMachine mStateMachine; private BluetoothPbapMethodProxy mPbapMethodProxy; private BluetoothMethodProxy mPbapMethodProxy; private enum ContactsType { TYPE_PHONEBOOK , TYPE_SIM ; Loading Loading @@ -272,7 +273,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler { mVcardManager = new BluetoothPbapVcardManager(mContext); mVcardSimManager = new BluetoothPbapSimVcardManager(mContext); mStateMachine = stateMachine; mPbapMethodProxy = BluetoothPbapMethodProxy.getInstance(); mPbapMethodProxy = BluetoothMethodProxy.getInstance(); } @Override Loading
android/app/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManager.java +17 −23 Original line number Diff line number Diff line Loading @@ -15,41 +15,35 @@ */ package com.android.bluetooth.pbap; import com.android.bluetooth.R; import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteException; import android.net.Uri; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.Contacts; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.bluetooth.R; import com.android.internal.annotations.VisibleForTesting; import com.android.obex.Operation; import com.android.obex.ResponseCodes; import com.android.obex.ServerOperation; import com.android.vcard.VCardBuilder; import com.android.vcard.VCardConfig; import com.android.vcard.VCardConstants; import com.android.vcard.VCardUtils; import android.content.ContentValues; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.text.TextUtils; import android.util.Log; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Collections; import java.util.Comparator; import com.android.obex.Operation; import com.android.obex.ResponseCodes; import com.android.obex.ServerOperation; import java.util.List; /** * VCard composer especially for Call Log used in Bluetooth. Loading Loading @@ -119,7 +113,7 @@ public class BluetoothPbapSimVcardManager { } //checkpoint Figure out if we can apply selection, projection and sort order. mCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mContentResolver, mCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mContentResolver, contentUri, SIM_PROJECTION, null, null, sortOrder); if (mCursor == null) { Loading Loading @@ -273,7 +267,7 @@ public class BluetoothPbapSimVcardManager { int size = 0; Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContentResolver, SIM_URI, SIM_PROJECTION, null,null, null); if (contactCursor != null) { size = contactCursor.getCount(); Loading @@ -293,7 +287,7 @@ public class BluetoothPbapSimVcardManager { ArrayList<String> allnames = new ArrayList<String>(); Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContentResolver, SIM_URI, SIM_PROJECTION, null,null,null); if (contactCursor != null) { for (contactCursor.moveToFirst(); !contactCursor.isAfterLast(); contactCursor Loading Loading @@ -334,7 +328,7 @@ public class BluetoothPbapSimVcardManager { Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery( contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery( mContentResolver, SIM_URI, SIM_PROJECTION, null, null, null); if (contactCursor != null) { Loading
android/app/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java +11 −10 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.BluetoothMethodProxy; import com.android.bluetooth.R; import com.android.bluetooth.util.DevicePolicyUtils; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -182,7 +183,7 @@ public class BluetoothPbapVcardManager { selectionClause = Phone.STARRED + " = 1"; } try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, new String[]{Phone.CONTACT_ID}, selectionClause, null, Phone.CONTACT_ID); if (contactCursor == null) { Loading @@ -209,7 +210,7 @@ public class BluetoothPbapVcardManager { int size = 0; Cursor callCursor = null; try { callCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, null, selection, null, CallLog.Calls.DEFAULT_SORT_ORDER); if (callCursor != null) { size = callCursor.getCount(); Loading Loading @@ -243,7 +244,7 @@ public class BluetoothPbapVcardManager { Cursor callCursor = null; ArrayList<String> list = new ArrayList<String>(); try { callCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, projection, selection, null, CALLLOG_SORT_ORDER); if (callCursor != null) { for (callCursor.moveToFirst(); !callCursor.isAfterLast(); callCursor.moveToNext()) { Loading Loading @@ -295,7 +296,7 @@ public class BluetoothPbapVcardManager { if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_ALPHABETICAL) { orderBy = Phone.DISPLAY_NAME; } contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, null, null, orderBy); if (contactCursor != null) { appendDistinctNameIdList(nameList, mContext.getString(android.R.string.unknownName), Loading Loading @@ -354,7 +355,7 @@ public class BluetoothPbapVcardManager { final Uri myUri = DevicePolicyUtils.getEnterprisePhoneUri(mContext); Cursor contactCursor = null; try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, null, null, Phone.CONTACT_ID); Loading Loading @@ -443,7 +444,7 @@ public class BluetoothPbapVcardManager { } try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, uri, projection, null, null, Phone.CONTACT_ID); if (contactCursor != null) { Loading Loading @@ -478,7 +479,7 @@ public class BluetoothPbapVcardManager { long primaryVcMsb = 0; ArrayList<String> list = new ArrayList<String>(); try { callCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, null, selection, null, null); while (callCursor != null && callCursor.moveToNext()) { count = count + 1; Loading Loading @@ -522,7 +523,7 @@ public class BluetoothPbapVcardManager { long endPointId = 0; try { // Need test to see if order by _ID is ok here, or by date? callsCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, callsCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, CALLLOG_PROJECTION, typeSelection, null, CALLLOG_SORT_ORDER); if (callsCursor != null) { Loading Loading @@ -596,7 +597,7 @@ public class BluetoothPbapVcardManager { } try { contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, selectionClause, null, Phone.CONTACT_ID); if (contactCursor != null) { Loading Loading @@ -640,7 +641,7 @@ public class BluetoothPbapVcardManager { if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_ALPHABETICAL) { orderBy = Phone.DISPLAY_NAME; } contactCursor = BluetoothPbapMethodProxy.getInstance().contentResolverQuery(mResolver, contactCursor = BluetoothMethodProxy.getInstance().contentResolverQuery(mResolver, myUri, PHONES_CONTACTS_PROJECTION, null, null, orderBy); } catch (CursorWindowAllocationException e) { Log.e(TAG, "CursorWindowAllocationException while composing phonebook one vcard"); Loading