Loading android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapEmailProvider.java +11 −11 Original line number Diff line number Diff line Loading @@ -72,14 +72,14 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param out the FileOurputStream to write to. * @throws IOException */ abstract protected void WriteMessageToStream(long accountId, long messageId, protected abstract void WriteMessageToStream(long accountId, long messageId, boolean includeAttachment, boolean download, FileOutputStream out) throws IOException; /** * @return the CONTENT_URI exposed. This will be used to send out notifications. */ abstract protected Uri getContentUri(); protected abstract Uri getContentUri(); /** * Implementation is provided by the parent class. Loading Loading @@ -170,7 +170,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param accountId the accountId * @param messageId ID of the message to update */ abstract protected void UpdateMimeMessageFromStream(FileInputStream input, long accountId, protected abstract void UpdateMimeMessageFromStream(FileInputStream input, long accountId, long messageId) throws IOException; public class PipeWriter implements PipeDataWriter<Cursor> { Loading Loading @@ -421,7 +421,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param messageId the ID of the message to delete. * @return the number of messages deleted - 0 if the message was not found. */ abstract protected int deleteMessage(String accountId, String messageId); protected abstract int deleteMessage(String accountId, String messageId); /** * Insert is used to add new messages to the data base. Loading Loading @@ -469,7 +469,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param folderId the ID of the folder to create a new message in. * @return the message id as a string */ abstract protected String insertMessage(String accountId, String folderId); protected abstract String insertMessage(String accountId, String folderId); /** * Utility function to build a projection based on a projectionMap. Loading Loading @@ -525,7 +525,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param sortOrder * @return a cursor to the accounts that are subject to exposure over BT. */ abstract protected Cursor queryAccount(String[] projection, String selection, String[] selectionArgs, protected abstract Cursor queryAccount(String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading @@ -538,7 +538,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param sortOrder * @return */ abstract protected Cursor queryFolder(String accountId, String[] projection, String selection, String[] selectionArgs, protected abstract Cursor queryFolder(String accountId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** * For the message table the selection (where clause) can only include the following columns: Loading @@ -558,7 +558,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param sortOrder * @return a cursor to query result */ abstract protected Cursor queryMessage(String accountId, String[] projection, String selection, String[] selectionArgs, protected abstract Cursor queryMessage(String accountId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading Loading @@ -623,7 +623,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param flagExpose the updated value. * @return the number of entries changed - 0 if account not found or value cannot be changed. */ abstract protected int updateAccount(String accountId, int flagExpose); protected abstract int updateAccount(String accountId, int flagExpose); /** * Update an entry in the message table. Loading @@ -633,7 +633,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param flagRead the new flagRead value to set - ignore if null. * @return */ abstract protected int updateMessage(String accountId, Long messageId, Long folderId, Boolean flagRead); protected abstract int updateMessage(String accountId, Long messageId, Long folderId, Boolean flagRead); @Override Loading Loading @@ -671,7 +671,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param folderId the ID of the folder. * @return 0 at success */ abstract protected int syncFolder(long accountId, long folderId); protected abstract int syncFolder(long accountId, long folderId); /** * Need this to suppress warning in unit tests. Loading android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapIMProvider.java +12 −12 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { /** * @return the CONTENT_URI exposed. This will be used to send out notifications. */ abstract protected Uri getContentUri(); protected abstract Uri getContentUri(); /** * Implementation is provided by the parent class. Loading Loading @@ -222,7 +222,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param messageId the ID of the message to delete. * @return the number of messages deleted - 0 if the message was not found. */ abstract protected int deleteMessage(String accountId, String messageId); protected abstract int deleteMessage(String accountId, String messageId); /** * Insert is used to add new messages to the data base. Loading Loading @@ -270,7 +270,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param folderId the ID of the folder to create a new message in. * @return the message id as a string */ abstract protected String insertMessage(String accountId, ContentValues values); protected abstract String insertMessage(String accountId, ContentValues values); /** * Utility function to build a projection based on a projectionMap. Loading Loading @@ -359,7 +359,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder * @return a cursor to the accounts that are subject to exposure over BT. */ abstract protected Cursor queryAccount(String[] projection, String selection, protected abstract Cursor queryAccount(String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading @@ -378,7 +378,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder * @return a cursor to query result */ abstract protected Cursor queryMessage(String accountId, String[] projection, String selection, protected abstract Cursor queryMessage(String accountId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading Loading @@ -426,7 +426,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder the sort order * @return a Cursor representing the query result. */ abstract protected Cursor queryConversation(String accountId, Long threadId, Boolean read, protected abstract Cursor queryConversation(String accountId, Long threadId, Boolean read, Long periodEnd, Long periodBegin, String searchString, String[] projection, String sortOrder); Loading @@ -450,7 +450,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder * @return a cursor to query result */ abstract protected Cursor queryConvoContact(String accountId, Long contactId, protected abstract Cursor queryConvoContact(String accountId, Long contactId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading Loading @@ -534,7 +534,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param flagExpose the updated value. * @return the number of entries changed - 0 if account not found or value cannot be changed. */ abstract protected int updateAccount(String accountId, Integer flagExpose); protected abstract int updateAccount(String accountId, Integer flagExpose); /** * Update an entry in the message table. Loading @@ -544,7 +544,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param flagRead the new flagRead value to set - ignore if null. * @return */ abstract protected int updateMessage(String accountId, Long messageId, Long folderId, protected abstract int updateMessage(String accountId, Long messageId, Long folderId, Boolean flagRead); /** Loading Loading @@ -637,7 +637,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param folderId the ID of the folder. * @return 0 at success */ abstract protected int syncFolder(long accountId, long folderId); protected abstract int syncFolder(long accountId, long folderId); /** * Set the properties that should change presence or chat state of owner Loading @@ -650,7 +650,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param convoId ID to the conversation to change * @return 0 at success */ abstract protected int setOwnerStatus(int presenceState, String presenceStatus, protected abstract int setOwnerStatus(int presenceState, String presenceStatus, long lastActive, int chatState, String convoId); /** Loading @@ -658,7 +658,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param bluetoothState 'on' of 'off' * @return 0 at success */ abstract protected int setBluetoothStatus(boolean bluetoothState); protected abstract int setBluetoothStatus(boolean bluetoothState); Loading android/app/src/com/android/bluetooth/ObexRejectServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -42,8 +42,8 @@ public class ObexRejectServer extends ServerRequestHandler implements Callback { private final int mResult; private final HandlerThread mHandlerThread; private final Handler mMessageHandler; private final static int MSG_ID_TIMEOUT = 0x01; private final static int TIMEOUT_VALUE = 5*1000; // ms private static final int MSG_ID_TIMEOUT = 0x01; private static final int TIMEOUT_VALUE = 5*1000; // ms private final BluetoothSocket mSocket; /** Loading android/app/src/com/android/bluetooth/ObexServerSockets.java +4 −4 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class ObexServerSockets { * Set state to accept new incoming connection. Will cause the next incoming connection to be * Signaled through {@link IObexConnectionValidator#onConnect()}; */ synchronized public void prepareForNewConnect() { public synchronized void prepareForNewConnect() { if(D) Log.d(TAG, "prepareForNewConnect()"); mConAccepted = false; } Loading @@ -226,7 +226,7 @@ public class ObexServerSockets { * @param conSocket the socket associated with the connection. * @return true if the connection is accepted, false otherwise. */ synchronized private boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { private synchronized boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { if(D) Log.d(TAG, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(mConAccepted == false && mConHandler.onConnect(device, conSocket) == true) { mConAccepted = true; // TODO: Reset this when ready to accept new connection Loading @@ -240,7 +240,7 @@ public class ObexServerSockets { /** * Signal to the {@link IObexConnectionHandler} that an error have occurred. */ synchronized private void onAcceptFailed() { private synchronized void onAcceptFailed() { shutdown(false); BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter(); if ((mAdapter != null) && (mAdapter.getState() == BluetoothAdapter.STATE_ON)) { Loading @@ -254,7 +254,7 @@ public class ObexServerSockets { * @param block Set true to block the calling thread until the AcceptThreads * has ended execution */ synchronized public void shutdown(boolean block) { public synchronized void shutdown(boolean block) { if(D) Log.d(TAG, "shutdown(block = " + block + ")"); if(mRfcommThread != null) { mRfcommThread.shutdown(); Loading android/app/src/com/android/bluetooth/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import java.util.concurrent.TimeUnit; * @hide */ final public class Utils { public final class Utils { private static final String TAG = "BluetoothUtils"; private static final int MICROS_PER_UNIT = 625; Loading Loading
android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapEmailProvider.java +11 −11 Original line number Diff line number Diff line Loading @@ -72,14 +72,14 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param out the FileOurputStream to write to. * @throws IOException */ abstract protected void WriteMessageToStream(long accountId, long messageId, protected abstract void WriteMessageToStream(long accountId, long messageId, boolean includeAttachment, boolean download, FileOutputStream out) throws IOException; /** * @return the CONTENT_URI exposed. This will be used to send out notifications. */ abstract protected Uri getContentUri(); protected abstract Uri getContentUri(); /** * Implementation is provided by the parent class. Loading Loading @@ -170,7 +170,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param accountId the accountId * @param messageId ID of the message to update */ abstract protected void UpdateMimeMessageFromStream(FileInputStream input, long accountId, protected abstract void UpdateMimeMessageFromStream(FileInputStream input, long accountId, long messageId) throws IOException; public class PipeWriter implements PipeDataWriter<Cursor> { Loading Loading @@ -421,7 +421,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param messageId the ID of the message to delete. * @return the number of messages deleted - 0 if the message was not found. */ abstract protected int deleteMessage(String accountId, String messageId); protected abstract int deleteMessage(String accountId, String messageId); /** * Insert is used to add new messages to the data base. Loading Loading @@ -469,7 +469,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param folderId the ID of the folder to create a new message in. * @return the message id as a string */ abstract protected String insertMessage(String accountId, String folderId); protected abstract String insertMessage(String accountId, String folderId); /** * Utility function to build a projection based on a projectionMap. Loading Loading @@ -525,7 +525,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param sortOrder * @return a cursor to the accounts that are subject to exposure over BT. */ abstract protected Cursor queryAccount(String[] projection, String selection, String[] selectionArgs, protected abstract Cursor queryAccount(String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading @@ -538,7 +538,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param sortOrder * @return */ abstract protected Cursor queryFolder(String accountId, String[] projection, String selection, String[] selectionArgs, protected abstract Cursor queryFolder(String accountId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** * For the message table the selection (where clause) can only include the following columns: Loading @@ -558,7 +558,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param sortOrder * @return a cursor to query result */ abstract protected Cursor queryMessage(String accountId, String[] projection, String selection, String[] selectionArgs, protected abstract Cursor queryMessage(String accountId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading Loading @@ -623,7 +623,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param flagExpose the updated value. * @return the number of entries changed - 0 if account not found or value cannot be changed. */ abstract protected int updateAccount(String accountId, int flagExpose); protected abstract int updateAccount(String accountId, int flagExpose); /** * Update an entry in the message table. Loading @@ -633,7 +633,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param flagRead the new flagRead value to set - ignore if null. * @return */ abstract protected int updateMessage(String accountId, Long messageId, Long folderId, Boolean flagRead); protected abstract int updateMessage(String accountId, Long messageId, Long folderId, Boolean flagRead); @Override Loading Loading @@ -671,7 +671,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { * @param folderId the ID of the folder. * @return 0 at success */ abstract protected int syncFolder(long accountId, long folderId); protected abstract int syncFolder(long accountId, long folderId); /** * Need this to suppress warning in unit tests. Loading
android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapIMProvider.java +12 −12 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { /** * @return the CONTENT_URI exposed. This will be used to send out notifications. */ abstract protected Uri getContentUri(); protected abstract Uri getContentUri(); /** * Implementation is provided by the parent class. Loading Loading @@ -222,7 +222,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param messageId the ID of the message to delete. * @return the number of messages deleted - 0 if the message was not found. */ abstract protected int deleteMessage(String accountId, String messageId); protected abstract int deleteMessage(String accountId, String messageId); /** * Insert is used to add new messages to the data base. Loading Loading @@ -270,7 +270,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param folderId the ID of the folder to create a new message in. * @return the message id as a string */ abstract protected String insertMessage(String accountId, ContentValues values); protected abstract String insertMessage(String accountId, ContentValues values); /** * Utility function to build a projection based on a projectionMap. Loading Loading @@ -359,7 +359,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder * @return a cursor to the accounts that are subject to exposure over BT. */ abstract protected Cursor queryAccount(String[] projection, String selection, protected abstract Cursor queryAccount(String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading @@ -378,7 +378,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder * @return a cursor to query result */ abstract protected Cursor queryMessage(String accountId, String[] projection, String selection, protected abstract Cursor queryMessage(String accountId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading Loading @@ -426,7 +426,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder the sort order * @return a Cursor representing the query result. */ abstract protected Cursor queryConversation(String accountId, Long threadId, Boolean read, protected abstract Cursor queryConversation(String accountId, Long threadId, Boolean read, Long periodEnd, Long periodBegin, String searchString, String[] projection, String sortOrder); Loading @@ -450,7 +450,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param sortOrder * @return a cursor to query result */ abstract protected Cursor queryConvoContact(String accountId, Long contactId, protected abstract Cursor queryConvoContact(String accountId, Long contactId, String[] projection, String selection, String[] selectionArgs, String sortOrder); /** Loading Loading @@ -534,7 +534,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param flagExpose the updated value. * @return the number of entries changed - 0 if account not found or value cannot be changed. */ abstract protected int updateAccount(String accountId, Integer flagExpose); protected abstract int updateAccount(String accountId, Integer flagExpose); /** * Update an entry in the message table. Loading @@ -544,7 +544,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param flagRead the new flagRead value to set - ignore if null. * @return */ abstract protected int updateMessage(String accountId, Long messageId, Long folderId, protected abstract int updateMessage(String accountId, Long messageId, Long folderId, Boolean flagRead); /** Loading Loading @@ -637,7 +637,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param folderId the ID of the folder. * @return 0 at success */ abstract protected int syncFolder(long accountId, long folderId); protected abstract int syncFolder(long accountId, long folderId); /** * Set the properties that should change presence or chat state of owner Loading @@ -650,7 +650,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param convoId ID to the conversation to change * @return 0 at success */ abstract protected int setOwnerStatus(int presenceState, String presenceStatus, protected abstract int setOwnerStatus(int presenceState, String presenceStatus, long lastActive, int chatState, String convoId); /** Loading @@ -658,7 +658,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { * @param bluetoothState 'on' of 'off' * @return 0 at success */ abstract protected int setBluetoothStatus(boolean bluetoothState); protected abstract int setBluetoothStatus(boolean bluetoothState); Loading
android/app/src/com/android/bluetooth/ObexRejectServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -42,8 +42,8 @@ public class ObexRejectServer extends ServerRequestHandler implements Callback { private final int mResult; private final HandlerThread mHandlerThread; private final Handler mMessageHandler; private final static int MSG_ID_TIMEOUT = 0x01; private final static int TIMEOUT_VALUE = 5*1000; // ms private static final int MSG_ID_TIMEOUT = 0x01; private static final int TIMEOUT_VALUE = 5*1000; // ms private final BluetoothSocket mSocket; /** Loading
android/app/src/com/android/bluetooth/ObexServerSockets.java +4 −4 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class ObexServerSockets { * Set state to accept new incoming connection. Will cause the next incoming connection to be * Signaled through {@link IObexConnectionValidator#onConnect()}; */ synchronized public void prepareForNewConnect() { public synchronized void prepareForNewConnect() { if(D) Log.d(TAG, "prepareForNewConnect()"); mConAccepted = false; } Loading @@ -226,7 +226,7 @@ public class ObexServerSockets { * @param conSocket the socket associated with the connection. * @return true if the connection is accepted, false otherwise. */ synchronized private boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { private synchronized boolean onConnect(BluetoothDevice device, BluetoothSocket conSocket) { if(D) Log.d(TAG, "onConnect() socket: " + conSocket + " mConAccepted = " + mConAccepted); if(mConAccepted == false && mConHandler.onConnect(device, conSocket) == true) { mConAccepted = true; // TODO: Reset this when ready to accept new connection Loading @@ -240,7 +240,7 @@ public class ObexServerSockets { /** * Signal to the {@link IObexConnectionHandler} that an error have occurred. */ synchronized private void onAcceptFailed() { private synchronized void onAcceptFailed() { shutdown(false); BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter(); if ((mAdapter != null) && (mAdapter.getState() == BluetoothAdapter.STATE_ON)) { Loading @@ -254,7 +254,7 @@ public class ObexServerSockets { * @param block Set true to block the calling thread until the AcceptThreads * has ended execution */ synchronized public void shutdown(boolean block) { public synchronized void shutdown(boolean block) { if(D) Log.d(TAG, "shutdown(block = " + block + ")"); if(mRfcommThread != null) { mRfcommThread.shutdown(); Loading
android/app/src/com/android/bluetooth/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import java.util.concurrent.TimeUnit; * @hide */ final public class Utils { public final class Utils { private static final String TAG = "BluetoothUtils"; private static final int MICROS_PER_UNIT = 625; Loading