private class StableState extends State {
@Override
public void enter() {
- infoLog("Entering Off State");
+ infoLog("StableState(): Entering Off State");
}
@Override
@Override
public boolean processMessage(Message msg) {
+ if (msg.what == SM_QUIT_CMD) {
+ Log.d(TAG, "PendingCommandState(): Received quit request...");
+ return false;
+ }
+
BluetoothDevice dev = (BluetoothDevice)msg.obj;
boolean result = false;
if (mDevices.contains(dev) &&
}
}
- BluetoothOppShareInfo info = mBatch.getPendingShare();
+ BluetoothOppShareInfo info = null;
+ if (mBatch == null) {
+ return;
+ }
+ info = mBatch.getPendingShare();
while (info != null) {
if (info.mStatus < 200) {
info.mStatus = failReason;
/* update a trivial field of a share to notify Provider the batch status change */
private void tickShareStatus(BluetoothOppShareInfo share) {
+ if (share == null) {
+ Log.d(TAG,"Share is null");
+ return;
+ }
Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + share.mId);
ContentValues updateValues = new ContentValues();
updateValues.put(BluetoothShare.DIRECTION, share.mDirection);