Loading core/java/android/bluetooth/BluetoothGattServer.java +4 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,10 @@ public final class BluetoothGattServer implements BluetoothProfile { BluetoothGattService service = characteristic.getService(); if (service == null) return false; if (characteristic == null || characteristic.getValue() == null) { return false; } try { mService.sendNotification(mServerIf, device.getAddress(), service.getType(), service.getInstanceId(), Loading core/java/android/bluetooth/BluetoothHidDevice.java +16 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,18 @@ public final class BluetoothHidDevice implements BluetoothProfile { public static final byte REPORT_TYPE_OUTPUT = (byte) 2; public static final byte REPORT_TYPE_FEATURE = (byte) 3; /** * Constants representing error response for Set Report. * * @see BluetoothHidDeviceCallback#onSetReport(byte, byte, byte[]) */ public static final byte ERROR_RSP_SUCCESS = (byte) 0; public static final byte ERROR_RSP_NOT_READY = (byte) 1; public static final byte ERROR_RSP_INVALID_RPT_ID = (byte) 2; public static final byte ERROR_RSP_UNSUPPORTED_REQ = (byte) 3; public static final byte ERROR_RSP_INVALID_PARAM = (byte) 4; public static final byte ERROR_RSP_UNKNOWN = (byte) 14; /** * Constants representing protocol mode used set by host. Default is always * {@link #PROTOCOL_REPORT_MODE} unless notified otherwise. Loading Loading @@ -386,16 +398,17 @@ public final class BluetoothHidDevice implements BluetoothProfile { * Sends error handshake message as reply for invalid SET_REPORT request * from {@link BluetoothHidDeviceCallback#onSetReport(byte, byte, byte[])}. * * @param error Error to be sent for SET_REPORT via HANDSHAKE. * @return */ public boolean reportError() { Log.v(TAG, "reportError()"); public boolean reportError(byte error) { Log.v(TAG, "reportError(): error = " + error); boolean result = false; if (mService != null) { try { result = mService.reportError(); result = mService.reportError(error); } catch (RemoteException e) { Log.e(TAG, e.toString()); } Loading core/java/android/bluetooth/BluetoothLwPwrProximityMonitor.java +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter. private final Object mStateLock = new Object(); /* This timer is triggered in case that BluetoothGatt does not callback when we perform connect/disconnect */ private Timer mTimer = null; private final int mTimeOutValue = 10*1000; private final int mTimeOutValue = 30*1000; private final class ConnectTimeOutTask extends TimerTask { public void run() { if (DBG) Log.d(TAG, "connect timer triggered!"); Loading Loading @@ -147,6 +147,7 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter. setTimer(BluetoothLwPwrProximityMonitor.this.new DisconnectTimeOutTask(), mTimeOutValue); } } else { mState = MONITOR_STATE_IDLE; stop = true; } } Loading core/java/android/bluetooth/IBluetoothHidDevice.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ interface IBluetoothHidDevice { boolean unregisterApp(in BluetoothHidDeviceAppConfiguration config); boolean sendReport(in int id, in byte[] data); boolean replyReport(in byte type, in byte id, in byte[] data); boolean reportError(); boolean reportError(byte error); boolean unplug(); boolean connect(); boolean disconnect(); Loading core/java/android/webkit/WebChromeClient.java +16 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,22 @@ public class WebChromeClient { uploadFile.onReceiveValue(null); } /** * Tell the client to show a file chooser. * @param uploadFilePaths A ValueCallback to set paths of the files to upload. * onReceiveValue must be called to wake up the thread.a * @param acceptType The value of the 'accept' attribute of the input tag * associated with this file picker. * @param capture Whether the 'capture' attribute exists in the input tag * associated with this file picker. * @hide */ public void showFileChooser(ValueCallback<String[]> uploadFilePaths, String acceptTypes, boolean capture) { uploadFilePaths.onReceiveValue(null); } /** * Tell the client that the page being viewed has an autofillable * form and the user would like to set a profile up. Loading Loading
core/java/android/bluetooth/BluetoothGattServer.java +4 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,10 @@ public final class BluetoothGattServer implements BluetoothProfile { BluetoothGattService service = characteristic.getService(); if (service == null) return false; if (characteristic == null || characteristic.getValue() == null) { return false; } try { mService.sendNotification(mServerIf, device.getAddress(), service.getType(), service.getInstanceId(), Loading
core/java/android/bluetooth/BluetoothHidDevice.java +16 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,18 @@ public final class BluetoothHidDevice implements BluetoothProfile { public static final byte REPORT_TYPE_OUTPUT = (byte) 2; public static final byte REPORT_TYPE_FEATURE = (byte) 3; /** * Constants representing error response for Set Report. * * @see BluetoothHidDeviceCallback#onSetReport(byte, byte, byte[]) */ public static final byte ERROR_RSP_SUCCESS = (byte) 0; public static final byte ERROR_RSP_NOT_READY = (byte) 1; public static final byte ERROR_RSP_INVALID_RPT_ID = (byte) 2; public static final byte ERROR_RSP_UNSUPPORTED_REQ = (byte) 3; public static final byte ERROR_RSP_INVALID_PARAM = (byte) 4; public static final byte ERROR_RSP_UNKNOWN = (byte) 14; /** * Constants representing protocol mode used set by host. Default is always * {@link #PROTOCOL_REPORT_MODE} unless notified otherwise. Loading Loading @@ -386,16 +398,17 @@ public final class BluetoothHidDevice implements BluetoothProfile { * Sends error handshake message as reply for invalid SET_REPORT request * from {@link BluetoothHidDeviceCallback#onSetReport(byte, byte, byte[])}. * * @param error Error to be sent for SET_REPORT via HANDSHAKE. * @return */ public boolean reportError() { Log.v(TAG, "reportError()"); public boolean reportError(byte error) { Log.v(TAG, "reportError(): error = " + error); boolean result = false; if (mService != null) { try { result = mService.reportError(); result = mService.reportError(error); } catch (RemoteException e) { Log.e(TAG, e.toString()); } Loading
core/java/android/bluetooth/BluetoothLwPwrProximityMonitor.java +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter. private final Object mStateLock = new Object(); /* This timer is triggered in case that BluetoothGatt does not callback when we perform connect/disconnect */ private Timer mTimer = null; private final int mTimeOutValue = 10*1000; private final int mTimeOutValue = 30*1000; private final class ConnectTimeOutTask extends TimerTask { public void run() { if (DBG) Log.d(TAG, "connect timer triggered!"); Loading Loading @@ -147,6 +147,7 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter. setTimer(BluetoothLwPwrProximityMonitor.this.new DisconnectTimeOutTask(), mTimeOutValue); } } else { mState = MONITOR_STATE_IDLE; stop = true; } } Loading
core/java/android/bluetooth/IBluetoothHidDevice.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ interface IBluetoothHidDevice { boolean unregisterApp(in BluetoothHidDeviceAppConfiguration config); boolean sendReport(in int id, in byte[] data); boolean replyReport(in byte type, in byte id, in byte[] data); boolean reportError(); boolean reportError(byte error); boolean unplug(); boolean connect(); boolean disconnect(); Loading
core/java/android/webkit/WebChromeClient.java +16 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,22 @@ public class WebChromeClient { uploadFile.onReceiveValue(null); } /** * Tell the client to show a file chooser. * @param uploadFilePaths A ValueCallback to set paths of the files to upload. * onReceiveValue must be called to wake up the thread.a * @param acceptType The value of the 'accept' attribute of the input tag * associated with this file picker. * @param capture Whether the 'capture' attribute exists in the input tag * associated with this file picker. * @hide */ public void showFileChooser(ValueCallback<String[]> uploadFilePaths, String acceptTypes, boolean capture) { uploadFilePaths.onReceiveValue(null); } /** * Tell the client that the page being viewed has an autofillable * form and the user would like to set a profile up. Loading