MM2-0 / Kvaesitso

A search-focused Android launcher
https://kvaesitso.mm20.de/
GNU General Public License v3.0
2.54k stars 87 forks source link

crashes in secondary profile #1146

Open ihatetheprivacystatement opened 5 days ago

ihatetheprivacystatement commented 5 days ago

Description

Please provide as many information about the crash as possible (What did you do before the crash happened? Steps to reproduce?)

Crashes when trying to use in secondary profile. Below is a crash log from trying to search. It crashes immediately upon typing into the search bar, sorting by a tag, or adding an app to favourites, and says ": Can't access LauncherUserInfo for another user for unrelated profile 0"

java.lang.SecurityException: Can't access LauncherUserInfo for another user for unrelated profile 0 at android.os.Parcel.createExceptionOrNull(Parcel.java:3251) at android.os.Parcel.createException(Parcel.java:3235) at android.os.Parcel.readException(Parcel.java:3211) at android.os.Parcel.readException(Parcel.java:3153) at android.content.pm.ILauncherApps$Stub$Proxy.getLauncherUserInfo(ILauncherApps.java:1112) at android.content.pm.LauncherApps.getLauncherUserInfo(LauncherApps.java:837) at de.mm20.launcher2.applications.LauncherAppDeserializer.deserialize(AppSerialization.kt:69) at de.mm20.launcher2.searchable.SavableSearchableRepositoryImpl.access$fromDatabaseEntity(SavableSearchableRepository.kt:151) at de.mm20.launcher2.searchable.SavableSearchableRepositoryImpl$getByKeys$$inlined$map$1$2.emit(Emitters.kt:111) at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:5) at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:17) at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:1) at kotlinx.coroutines.flow.FlowKtChannelsKt.emitAllImpl$FlowKtChannelsKt(Channels.kt:128) at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt:12) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:111) at android.os.Handler.handleCallback(Handler.java:959) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:317) at android.app.ActivityThread.main(ActivityThread.java:8744) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) at com.android.internal.os.ExecInit.main(ExecInit.java:50) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@564fae8, Dispatchers.Main.immediate] Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.pm.UserManagerService$LocalService.isProfileAccessible(UserManagerService.java:7740) at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.canAccessProfile(LauncherAppsService.java:520) at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.canAccessProfile(LauncherAppsService.java:492) at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.getLauncherUserInfo(LauncherAppsService.java:1708) at android.content.pm.ILauncherApps$Stub.onTransact(ILauncherApps.java:498)

MM2-0 commented 5 days ago

Is there any use in installimg a launcher to a secondary profile?

ihatetheprivacystatement commented 5 days ago

the same as installing one in the owner profile? A secondary profile is different from a work profile, if that's got you confused, so the launcher in the main profile doesn't affect it. It's basically a completely seperate phone on the same device, it's made for letting multiple people share one device.

ihatetheprivacystatement commented 5 days ago

Oops I completed it by accident what

MM2-0 commented 4 days ago

Oh, yeah, alright, I thought you meant a work profile.