BluetoothHealthCallback.java revision fb658c72a3a76dac334c39070d1501a2575c1069
1fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh/* 2fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * Copyright (C) 2011 The Android Open Source Project 3fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * 4fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * Licensed under the Apache License, Version 2.0 (the "License"); 5fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * you may not use this file except in compliance with the License. 6fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * You may obtain a copy of the License at 7fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * 8fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * http://www.apache.org/licenses/LICENSE-2.0 9fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * 10fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * Unless required by applicable law or agreed to in writing, software 11fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * distributed under the License is distributed on an "AS IS" BASIS, 12fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * See the License for the specific language governing permissions and 14fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * limitations under the License. 15fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh */ 16fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh 17fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh 18fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganeshpackage android.bluetooth; 19fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh 20fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganeshimport android.os.ParcelFileDescriptor; 21fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganeshimport android.util.Log; 22fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh 23fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh/** 24fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * This class is used for all the {@link BluetoothHealth} callbacks. 25fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh * @hide 26fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh */ 27fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganeshpublic abstract class BluetoothHealthCallback { 28fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh 29fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh private static final String TAG = "BluetoothHealthCallback"; 30fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh 31fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh public void onHealthAppConfigurationStatusChange(BluetoothHealthAppConfiguration config, 32fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh int status) { 33fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh Log.d(TAG, "onHealthAppConfigurationStatusChange: " + config + " Status:" + status); 34fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh } 35fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh 36fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh public void onHealthChannelStateChange(BluetoothHealthAppConfiguration config, 37fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh BluetoothDevice device, int prevState, int newState, 38fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh ParcelFileDescriptor fd) { 39fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh Log.d(TAG, "onHealthChannelStateChange: " + config + " Device:" + device + 40fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh "PrevState:" + prevState + "NewState:" + newState + "FileDescriptor:" + fd); 41fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh } 42fb658c72a3a76dac334c39070d1501a2575c1069Jaikumar Ganesh} 43