Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #248 from tommythorsen/master
Browse files Browse the repository at this point in the history
Add myself to the CONTRIBUTORS file and fix a few issues.
  • Loading branch information
schilit committed Jun 28, 2015
2 parents 3cd7a15 + be65978 commit a41a1cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ collinmast
corymast
bobkressin
harshadsabne
tommythorsen
4 changes: 1 addition & 3 deletions android-uribeacon/blescan/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ android {
sourceSets {
main {
manifest.srcFile 'src/androidTest/AndroidManifest.xml'
java {
srcDirs = ['src/main/java/org/uribeacon/scan']
}
}
}
}
Expand All @@ -46,4 +43,5 @@ makeJar.dependsOn(clearJar, build)

dependencies {
compile 'com.android.support:support-v4:21.0.3'
androidTestCompile 'org.mockito:mockito-core:2.0.5-beta'
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import android.bluetooth.BluetoothManager;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Build;
import android.test.AndroidTestCase;

import org.uribeacon.scan.compat.BluetoothLeScannerCompat;
Expand Down Expand Up @@ -97,10 +98,14 @@ public void testManagersRequired() {
assertNull(BluetoothLeScannerCompatProvider.getBluetoothLeScannerCompat(
context, canUseNativeApi));

bluetoothManager = (BluetoothManager) getContext().getSystemService(BLUETOOTH_SERVICE);
alarmManager = null;
assertNull(BluetoothLeScannerCompatProvider.getBluetoothLeScannerCompat(
context, canUseNativeApi));
// The alarm manager is not mandatory for creating a bluetooth scanner on
// LOLLIPOP (at least not if the right hardware features are supported.)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
bluetoothManager = (BluetoothManager) getContext().getSystemService(BLUETOOTH_SERVICE);
alarmManager = null;
assertNull(BluetoothLeScannerCompatProvider.getBluetoothLeScannerCompat(
context, canUseNativeApi));
}

bluetoothManager = null;
alarmManager = (AlarmManager) getContext().getSystemService(ALARM_SERVICE);
Expand Down

0 comments on commit a41a1cd

Please sign in to comment.