-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from DP-3T/feature/fix-check-for-location-ser…
…vices-needed use settings value to check if locationLess scanning is supported
- Loading branch information
Showing
4 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
.../src/androidTest/java/org/dpppt/android/sdk/internal/nearby/LocationLessScanningTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
package org.dpppt.android.sdk.internal.nearby; | ||
|
||
import android.content.Context; | ||
import android.os.Build; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
import androidx.test.platform.app.InstrumentationRegistry; | ||
|
||
import org.dpppt.android.sdk.internal.ErrorHelper; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class LocationLessScanningTest { | ||
|
||
private Context context; | ||
|
||
@Before | ||
public void setup() { | ||
context = InstrumentationRegistry.getInstrumentation().getContext(); | ||
} | ||
|
||
@Test | ||
public void checkLocationLessScanningOnAndroidR(){ | ||
assertEquals(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R, ErrorHelper.deviceSupportsLocationlessScanning(context)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters