island icon indicating copy to clipboard operation
island copied to clipboard

6.0.5版在Android 12.1 中无法添加快捷方式

Open TrayBer opened this issue 2 years ago • 10 comments

版本:v6.0.5 Android :Android 12.1(PixelExperience-12.1)

问题及疑问: 1、在壶中界中对单个App设置【创建“解冻并启动”快捷方式】,导致pixel启动器崩溃,添加快捷方式失败。尝试在 Google play 安装微软启动器,添加快捷方式仍然失败。

2、设置-分空间的独立设置-壶中界,选择【更名】,更名无效。

3、桌面浏览器搜索Google play 中的 Island,显示更新日期是2022年3月1日,手机 Google play 最新版是2021年5月24日,这是为什么?以后Google play更新后,可以覆盖掉在 GitHub 下载的版本么?对已安装的岛内应用使用有没有影响?

TrayBer avatar Apr 02 '22 00:04 TrayBer

  1. 能否提供一下崩溃时的 logcat 或者 bugreport?
  2. 具体表现是?更名后在上述设置界面的标题栏显示的是否是新名称?Island 主界面的 tab 中显示的是否是新名称?
  3. 因为 6.0.5 更新正在推送过程中,尚未全量发布。GitHub 版本与 Google Play 版本无差别,可以互相覆盖升级。

oasisfeng avatar Apr 07 '22 08:04 oasisfeng

Failed to initiate app search for shortcut package com.oasisfeng.island user 10
java.lang.RuntimeException: Resetting app search failed
	at com.android.internal.util.ConcurrentUtils.waitForFutureNoInterrupt(ConcurrentUtils.java:91)
	at com.android.server.pm.ShortcutPackage.awaitInAppSearch(ShortcutPackage.java:2610)
	at com.android.server.pm.ShortcutPackage.awaitInAppSearch(ShortcutPackage.java:2593)
	at com.android.server.pm.ShortcutPackage.forEachShortcutStopWhen(ShortcutPackage.java:2542)
	at com.android.server.pm.ShortcutPackage.forEachShortcutStopWhen(ShortcutPackage.java:2524)
	at com.android.server.pm.ShortcutPackage.hasNoShortcut(ShortcutPackage.java:1725)
	at com.android.server.pm.ShortcutPackage.saveToXml(ShortcutPackage.java:1738)
	at com.android.server.pm.ShortcutPackageItem.saveToFile(ShortcutPackageItem.java:167)
	at com.android.server.pm.ShortcutUser.saveShortcutPackageItem(ShortcutUser.java:409)
	at com.android.server.pm.ShortcutUser.saveToXml(ShortcutUser.java:387)
	at com.android.server.pm.ShortcutService.saveUserInternalLocked(ShortcutService.java:1084)
	at com.android.server.pm.ShortcutService.saveUserLocked(ShortcutService.java:1056)
	at com.android.server.pm.ShortcutService.saveDirtyInfo(ShortcutService.java:1201)
	at com.android.server.pm.ShortcutService$$ExternalSyntheticLambda0.run(Unknown Source:2)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: SecurityException: Requested user, UserHandle{10}, is not the same as the calling user, UserHandle{0}.
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:361)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1923)
	at com.android.internal.util.ConcurrentUtils.waitForFutureNoInterrupt(ConcurrentUtils.java:86)
	... 18 more
Caused by: java.lang.RuntimeException: SecurityException: Requested user, UserHandle{10}, is not the same as the calling user, UserHandle{0}.
	at com.android.server.pm.ShortcutUser.lambda$getAppSearch$7(ShortcutUser.java:735)
	at com.android.server.pm.ShortcutUser$$ExternalSyntheticLambda1.accept(Unknown Source:4)
	at android.app.appsearch.AppSearchSession$1.lambda$onResult$0$AppSearchSession$1(AppSearchSession.java:105)
	at android.app.appsearch.AppSearchSession$1$$ExternalSyntheticLambda0.run(Unknown Source:6)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.os.HandlerThread.run(HandlerThread.java:67)
	at com.android.server.ServiceThread.run(ServiceThread.java:44)

proletarius101 avatar Apr 08 '22 02:04 proletarius101

Any reasons not using ShortcutManagerCompat for Android O+ consistently as described in https://developer.android.com/guide/topics/ui/shortcuts/creating-shortcuts?hl=en#dynamic?

proletarius101 avatar Apr 11 '22 14:04 proletarius101

修复的版本什么时候可以发布呢?

buttonfly1000 avatar May 18 '22 15:05 buttonfly1000

After a bit more research, maybe we just need to change mobile/src/main/java/com/oasisfeng/island/shortcut/IslandAppShortcut.kt from

	@OwnerUser @JvmStatic fun requestPin(context: Context, app: ApplicationInfo) {
		val dynamic = isDynamicLabelEnabled(context)
		val profile = app.user
		if (IslandManager.isReady(context, profile))
			Shuttle(context, profile).launchNoThrows { requestPinAsUser(this, app, dynamic) }
			 requestPinAsUser(context, app, dynamic)
		else requestPinAsUser(context, app, dynamic)    // Create cross-profile shortcut in Mainland if Island is not ready (probably deactivated)
	}

to

	@OwnerUser @JvmStatic fun requestPin(context: Context, app: ApplicationInfo) {
		val dynamic = isDynamicLabelEnabled(context)
		val profile = app.user
		requestPinAsUser(context, app, dynamic)
	}

proletarius101 avatar May 28 '22 02:05 proletarius101

修复的版本什么时候可以发布呢?

You may check https://cloudflare.f-droid.org/en/packages/com.oasisfeng.island.fdroid/ directly for the fixed usable version

proletarius101 avatar Jun 06 '22 01:06 proletarius101

修复的版本什么时候可以发布呢?

You may check https://cloudflare.f-droid.org/en/packages/com.oasisfeng.island.fdroid/ directly for the fixed usable version

Is it ok to overwrite the installation? Or do I have to uninstall island and regenerate the working profile ?

TrayBer avatar Jun 09 '22 13:06 TrayBer

没法覆盖更新,我试过了。

buttonfly1000 avatar Jun 10 '22 01:06 buttonfly1000

已经使用了 @proletarius101 推荐的 F-Droid 版,确实修复了添加快捷方式的bug。

我习惯把使用频率高的app,通过【创建“解冻并启动”快捷方式】放在桌面,使用起来非常方便,所以如果这个bug能够修复最好了。大佬 @oasisfeng 什么时候更新修复的版本?

TrayBer avatar Aug 15 '22 08:08 TrayBer

Maybe it's similar to https://github.com/zeapo/Android-Password-Store/issues/300: the lack of max dynamic shortcuts bound checking causes the crash

proletarius101 avatar Sep 12 '22 23:09 proletarius101