0

I have tried the solution from here How do I set the default launcher in an AOSP build?, but it doesn't ork for me an AOSP A11. This is my android.mk file from my PeaceLauncher

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := Peace-Launcher
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := Peace-Launcher.apk
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
LOCAL_MODULE_CLASS := APPS
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)

When I'm using this LOCAL_OVERRIDES_PACKAGES than launcher3Quickstep isn't included in build anymore. But I need it in the background, because Quickstep includes some needed gestures.

So how can I include Launcher3quickstep AND my PeaceLauncher in the build and set PeaceLauncher automatically as default ? I don't want this two choices pop-up where I have to decide which launcher I want to use.

harvey186
  • 25
  • 7
  • You may try set android:priority. See https://developer.android.com/guide/topics/manifest/intent-filter-element#priority. If your launcher activity's priority is higher then Launcher3Quickstep, the choice dialog will not pop-up. – Yong Jul 29 '21 at 02:21
  • if I'm using this in androidManifest.xml im getting at boot 3 options for the launcher. 1 for launcher3quickstep and 2 time my PeaceLauncher --------------------------------------- – harvey186 Jul 29 '21 at 15:03
  • Now I have build and flashed my GSI and the only thing what changed is, that in the pop up my PeaceLauncher is on first place 1. PeaceLauncher 2. Quickstep. But I don't want this pop up. PeaceLaucher should be automatically selected as default launcher – harvey186 Jul 29 '21 at 15:39
  • Only privileged application can set priority. Did you put your launcher in /system/priv-app/. And check whether the priority has bee set by "adb shell dumpsys package your_app_package_name" – Yong Jul 30 '21 at 01:57
  • Yes, it's located in /system/priv-app. in one section I can find a mpriroíty=999 which I have set in AndroidManifest.xml -- full output here https://ghostbin.co/paste/d2358 -- All these informamtions are out of my noob knownledge, sorry – – harvey186 Jul 30 '21 at 08:20
  • You should set priority of "android.intent.category.HOME" not LAUNCHER – Yong Jul 30 '21 at 08:40
  • Thx, that's working ................... but now the gestures of the launcher3Quickstep doesn't work anymore. Could be that 999 is to high ? Launcher3Quickstep includes the 'Home' and 'Recent' button functions which I need. My PeaceLauncher doesn't have them. That's problem. Seems I have to life with this pop-up on first start. Thx anyway – harvey186 Jul 30 '21 at 14:26
  • Launcher3Quickstep run only once, then peacelauncher will be the default launcher? Can you modify the source code of Launcher3Quickstep. Set Launcher3Quickstep's priority to 1, and don't set peacelauncher's priority, and disable itself in Launcher3Quickstep after it firstly run. Set this as an example:https://cs.android.com/android/platform/superproject/+/master:packages/apps/Provision/src/com/android/provision/DefaultActivity.java. Provision will disable itselft after firstly run. – Yong Aug 02 '21 at 02:02
  • OK, I have found the solution. I have to remove only the HOME line in Launcher3Quickstep Manifest – harvey186 Sep 13 '21 at 09:13

0 Answers0