Skip to content

Commit

Permalink
Add USE_EXACT_ALARM permission in manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
SM2A authored and hannesa2 committed Jan 17, 2024
1 parent de8f7d9 commit fb45fe7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ import androidx.test.espresso.screenshot.captureToBitmap
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.rule.GrantPermissionRule
import info.hannes.timber.DebugFormatTree
import info.mqtt.android.extsample.MainActivity
import android.Manifest
import info.mqtt.android.extsample.R
import info.mqtt.android.extsample.room.AppDatabase
import org.junit.Before
Expand All @@ -36,9 +34,6 @@ class ExtendedMainTest {
@get:Rule
val activityScenarioRule = activityScenarioRule<MainActivity>()

@get:Rule
val runtimePermission: GrantPermissionRule = GrantPermissionRule.grant(Manifest.permission.SCHEDULE_EXACT_ALARM)

@Before
fun setUp() {
Timber.plant(DebugFormatTree())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.espresso.screenshot.captureToBitmap
import androidx.test.ext.junit.rules.activityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.rule.GrantPermissionRule
import com.moka.lib.assertions.WaitingAssertion
import info.hannes.timber.DebugFormatTree
import info.mqtt.android.extsample.MainActivity
import android.Manifest
import info.mqtt.android.extsample.R
import org.hamcrest.CoreMatchers.not
import org.junit.Before
Expand All @@ -39,9 +37,6 @@ class ExtendedPublishTest {
@get:Rule
val activityScenarioRule = activityScenarioRule<MainActivity>()

@get:Rule
val runtimePermission: GrantPermissionRule = GrantPermissionRule.grant(Manifest.permission.SCHEDULE_EXACT_ALARM)

@Before
fun setUp() {
Timber.plant(DebugFormatTree())
Expand Down
1 change: 1 addition & 0 deletions serviceLibrary/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />

Expand Down

0 comments on commit fb45fe7

Please sign in to comment.