Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,9 @@ class NotificationTest : BaseTestHelper() {
device: UiDevice,
context: Context
) {
val o1 = device.findObject(By.desc(context.getString(R.string.taken)))
while (device.findObject(By.text(context.getString(R.string.snooze))) != null) {
try {
o1.click()
device.findObject(By.desc(context.getString(R.string.taken)))?.click()
} catch (_: StaleObjectException) {
// Ignore
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,11 @@ class AlarmFragment(

private fun closeWithIntent(pendingIntent: PendingIntent) {
pendingIntent.send()
requireActivity().supportFragmentManager.beginTransaction().remove(this).commit()
requireActivity().finishAndRemoveTask()
}

override fun onDestroyView() {
super.onDestroyView()
Log.d(ALARM, "Closing activity")
requireActivity().finishAndRemoveTask()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,17 @@ class ReminderAlarmActivity : AppCompatActivity() {
return true
}

override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
addAlarmFragment(intent)
}

private fun addAlarmFragment(intent: Intent?) {
if (intent != null) {
Log.d(LogTags.ALARM, "Adding alarm fragment")
supportFragmentManager.beginTransaction()
.add(R.id.alarmFragmentContainer, AlarmFragment::class.java, intent.extras).commit()
.replace(R.id.alarmFragmentContainer, AlarmFragment::class.java, intent.extras).commit()
}
}

Expand Down
Loading