Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 [BUG] Restoring messages from a backup gets stuck if Quik is not the default SMS app #196

Open
adi-vizgan-unplugged opened this issue Dec 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@adi-vizgan-unplugged
Copy link

Describe the bug
Restoring messages from a backup gets stuck if Quik is not the default SMS app.

To Reproduce
Steps to reproduce the behavior:

  1. Install Quik and open it, do not set it as the default SMS app!
  2. Go to 'Backup and restore'
  3. Set up the backup location to some folder
  4. Create a backup and see that it does exist in the folder you set
  5. Click on 'Restore'
  6. Select the backup file you just created
  7. See that it gets stuck on the restore process and doesn't do anything
  8. If you go and set Quik as the default SMS app, the restore process will suddenly finish successfully in a few seconds

Expected behavior
The restore process should finish successfully even if the app is not set as the default SMS app, or if it's not possible due to Android's restrictions then show an error and stop the restore process.

Smartphone (please complete the following information):

  • Device: UP Phone 1
  • OS: Android 13, LibertOS
  • 4.0.8-alpha
@adi-vizgan-unplugged adi-vizgan-unplugged added the bug Something isn't working label Dec 26, 2024
@adi-vizgan-unplugged
Copy link
Author

Forgot to add that even if you try to stop the restore process from the 'Backup and restore' page it doesn't do anything

@adi-vizgan-unplugged
Copy link
Author

This is the stack trace I see when it happens:
java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.MmsProvider uri content://mms/part from pid=23376, uid=10201 requires android.permission.READ_SMS, or grantUriPermission() (Ask Gemini) at android.os.Parcel.createExceptionOrNull(Parcel.java:3011) at android.os.Parcel.createException(Parcel.java:2995) at android.os.Parcel.readException(Parcel.java:2978) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142) at android.content.ContentProviderProxy.query(ContentProviderNative.java:481) at android.content.ContentResolver.query(ContentResolver.java:1219) at android.content.ContentResolver.query(ContentResolver.java:1151) at android.content.ContentResolver.query(ContentResolver.java:1107) at dev.octoshrimpy.quik.mapper.CursorToPartImpl.getPartsCursor(CursorToPartImpl.kt:49) at dev.octoshrimpy.quik.mapper.CursorToPart$DefaultImpls.getPartsCursor$default(CursorToPart.kt:26) at dev.octoshrimpy.quik.repository.SyncRepositoryImpl.syncMessages(SyncRepositoryImpl.kt:110) at dev.octoshrimpy.quik.repository.BackupRepositoryImpl.performRestore(BackupRepositoryImpl.kt:251) at dev.octoshrimpy.quik.feature.backup.RestoreBackupService$start$3.invoke(RestoreBackupService.kt:105) at dev.octoshrimpy.quik.feature.backup.RestoreBackupService$start$3.invoke(RestoreBackupService.kt:105) at dev.octoshrimpy.quik.feature.backup.RestoreBackupService.start$lambda$2(RestoreBackupService.kt:105) at dev.octoshrimpy.quik.feature.backup.RestoreBackupService.$r8$lambda$6VmuNZV126hsPPYCcQ9ay-UBX08(Unknown Source:0) at dev.octoshrimpy.quik.feature.backup.RestoreBackupService$$ExternalSyntheticLambda2.apply(Unknown Source:2) at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:57) at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62) at io.reactivex.internal.operators.observable.ObservableScalarXMap$ScalarDisposable.run(ObservableScalarXMap.java:248) at io.reactivex.internal.operators.observable.ObservableJust.subscribeActual(ObservableJust.java:35) at io.reactivex.Observable.subscribe(Observable.java:12267) at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32) at io.reactivex.Observable.subscribe(Observable.java:12267) at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32) at io.reactivex.Observable.subscribe(Observable.java:12267) at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578) at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012)

So I guess it's a system restriction - you don't get permission to read this data if you are not set as the default SMS app, so there should be an error message presented and not run the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant