@@ -73,7 +73,7 @@ public class DeviceControlActivity extends Activity {
7373 TextView mDataAsArray ;
7474 private BluetoothGattCharacteristic mNotifyCharacteristic ;
7575 private BluetoothLeService mBluetoothLeService ;
76- private List <List <BluetoothGattCharacteristic >> mGattCharacteristics = new ArrayList <List < BluetoothGattCharacteristic > >();
76+ private List <List <BluetoothGattCharacteristic >> mGattCharacteristics = new ArrayList <>();
7777 // If a given GATT characteristic is selected, check for supported features. This sample
7878 // demonstrates 'Read' and 'Notify' features. See
7979 // http://d.android.com/reference/android/bluetooth/BluetoothGatt.html for the complete
@@ -177,26 +177,26 @@ private void displayGattServices(final List<BluetoothGattService> gattServices)
177177 String uuid = null ;
178178 final String unknownServiceString = getResources ().getString (R .string .unknown_service );
179179 final String unknownCharaString = getResources ().getString (R .string .unknown_characteristic );
180- final List <Map <String , String >> gattServiceData = new ArrayList <Map < String , String > >();
181- final List <List <Map <String , String >>> gattCharacteristicData = new ArrayList <List < Map < String , String >> >();
182- mGattCharacteristics = new ArrayList <List < BluetoothGattCharacteristic > >();
180+ final List <Map <String , String >> gattServiceData = new ArrayList <>();
181+ final List <List <Map <String , String >>> gattCharacteristicData = new ArrayList <>();
182+ mGattCharacteristics = new ArrayList <>();
183183
184184 // Loops through available GATT Services.
185185 for (final BluetoothGattService gattService : gattServices ) {
186- final Map <String , String > currentServiceData = new HashMap <String , String >();
186+ final Map <String , String > currentServiceData = new HashMap <>();
187187 uuid = gattService .getUuid ().toString ();
188188 currentServiceData .put (LIST_NAME , GattAttributeResolver .getAttributeName (uuid , unknownServiceString ));
189189 currentServiceData .put (LIST_UUID , uuid );
190190 gattServiceData .add (currentServiceData );
191191
192- final List <Map <String , String >> gattCharacteristicGroupData = new ArrayList <Map < String , String > >();
192+ final List <Map <String , String >> gattCharacteristicGroupData = new ArrayList <>();
193193 final List <BluetoothGattCharacteristic > gattCharacteristics = gattService .getCharacteristics ();
194- final List <BluetoothGattCharacteristic > charas = new ArrayList <BluetoothGattCharacteristic >();
194+ final List <BluetoothGattCharacteristic > charas = new ArrayList <>();
195195
196196 // Loops through available Characteristics.
197197 for (final BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics ) {
198198 charas .add (gattCharacteristic );
199- final Map <String , String > currentCharaData = new HashMap <String , String >();
199+ final Map <String , String > currentCharaData = new HashMap <>();
200200 uuid = gattCharacteristic .getUuid ().toString ();
201201 currentCharaData .put (LIST_NAME , GattAttributeResolver .getAttributeName (uuid , unknownCharaString ));
202202 currentCharaData .put (LIST_UUID , uuid );
0 commit comments