Skip to content

Commit

Permalink
Foreground KeyCachingService again after POST_NOTIFICATION check
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Nov 29, 2024
1 parent 6d55459 commit fed6dbd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package org.thoughtcrime.securesms.registration.ui.grantpermissions

import android.app.Activity
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
Expand All @@ -28,6 +29,7 @@ import org.thoughtcrime.securesms.registration.fragments.WelcomePermissions
import org.thoughtcrime.securesms.registration.ui.RegistrationCheckpoint
import org.thoughtcrime.securesms.registration.ui.RegistrationViewModel
import org.thoughtcrime.securesms.restore.RestoreActivity
import org.thoughtcrime.securesms.service.KeyCachingService
import org.thoughtcrime.securesms.util.BackupUtil
import org.thoughtcrime.securesms.util.navigation.safeNavigate

Expand Down Expand Up @@ -97,6 +99,11 @@ class GrantPermissionsFragment : ComposeFragment() {
}
sharedViewModel.maybePrefillE164(requireContext())
sharedViewModel.setRegistrationCheckpoint(RegistrationCheckpoint.PERMISSIONS_GRANTED)
// MOLLY: Repost LOCKED_STATUS notification; run even if POST_NOTIFICATION is denied
val intent = Intent(requireContext(), KeyCachingService::class.java).apply {
action = KeyCachingService.LOCALE_CHANGE_EVENT
}
requireContext().startService(intent)
proceedToNextScreen()
}

Expand Down

0 comments on commit fed6dbd

Please sign in to comment.