src/com/btwiz/library/BTWiz.java
protected static boolean deviceAlreadyInList(BluetoothDevice device) {
		int deviceMajor = device.getBluetoothClass().getMajorDeviceClass();
		String deviceName = device.getName();
		deviceName = deviceName==null ? "" : deviceName;		
		for (BluetoothDevice prior: allDiscoveredDevices) {
			int priorMajor = prior.getBluetoothClass().getMajorDeviceClass();
			String priorName = prior.getName();
			if (deviceMajor != priorMajor) {
				continue;
			}
			if (!deviceName.equals(priorName)) {
				continue;
			}
			// match
			return true;
		}
		return false;
	}
/**
	 * Test for existence of a newly discovered device in the 'discovered' list 
	 * Matched by name & major fields
	 */
Test for existence of a newly discovered device in the 'discovered' list
Matched by name & major fields
Test for existence of a newly discovered device in the ' discovered ' list Matched by name & major fields
protected static boolean deviceAlreadyInList(BluetoothDevice device) {
		int deviceMajor = device.getBluetoothClass().getMajorDeviceClass();
		String deviceName = device.getName();
		deviceName = deviceName==null ? "" : deviceName;		
		for (BluetoothDevice prior: allDiscoveredDevices) {
			int priorMajor = prior.getBluetoothClass().getMajorDeviceClass();
			String priorName = prior.getName();
			if (deviceMajor != priorMajor) {
				continue;
			}
			if (!deviceName.equals(priorName)) {
				continue;
			}
			return true;
		}
		return false;
	}
protected static boolean deviceAlreadyInList ( BluetoothDevice device ) { int deviceMajor = device . getBluetoothClass ( ) . getMajorDeviceClass ( ) ; String deviceName = device . getName ( ) ; deviceName = deviceName == null ? "" : deviceName ; for ( BluetoothDevice prior : allDiscoveredDevices ) { int priorMajor = prior . getBluetoothClass ( ) . getMajorDeviceClass ( ) ; String priorName = prior . getName ( ) ; if ( deviceMajor != priorMajor ) { continue ; } if ( ! deviceName . equals ( priorName ) ) { continue ; } return true ; } return false ; }
Test for existence of a newly discovered device in the 'discovered' list
 Matched by name & major fields
Test for existence of a newly discovered device in the ' discovered ' list Matched by name & major fields
// match