From 72014e2b0523c72ba34ca43d91bc4e8be104d95a Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Mon, 11 May 2015 18:39:47 -0700 Subject: [PATCH] Catch an exception when updating incoming message status Note: this change does not fix the root cause for Bug 16042763, but addresses an issue that could be triggered within the same context as Bug 16042763. Bug: 16042763 Change-Id: Ib56894f3fa3b7754d1d3f3214a923d9d0a23eb80 --- src/com/android/bluetooth/map/BluetoothMapObexServer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/bluetooth/map/BluetoothMapObexServer.java b/src/com/android/bluetooth/map/BluetoothMapObexServer.java index 04a79e21..dc9bc43e 100644 --- a/src/com/android/bluetooth/map/BluetoothMapObexServer.java +++ b/src/com/android/bluetooth/map/BluetoothMapObexServer.java @@ -674,6 +674,9 @@ public class BluetoothMapObexServer extends ServerRequestHandler { } catch (NumberFormatException e) { Log.w(TAG, "Wrongly formatted message handle: " + msgHandle); return ResponseCodes.OBEX_HTTP_PRECON_FAILED; + } catch (IllegalArgumentException e) { + Log.w(TAG, "Message type not found in handle string: " + msgHandle); + return ResponseCodes.OBEX_HTTP_PRECON_FAILED; } if( indicator == BluetoothMapAppParams.STATUS_INDICATOR_DELETED) { -- 2.11.0