近期做了一个Q 非go版本的软件,发现了一个问题,由于非go所使用的Launcher是GMS包里面的SearchLauncher,按照正常的方法在gms.mk中添加SearchLauncher进行编译,编译OK后发现QSB所处位置在屏幕下方也就是host区域。
按照使用美观话最好放在屏幕的上方,下面是处理该问题的方法。
修改目录:vendor/partner_gms/apps/SearchLauncher/Android.mk
--- a/alps/vendor/partner_gms/apps/SearchLauncher/Android.mk
+++ b/alps/vendor/partner_gms/apps/SearchLauncher/Android.mk
@@ -37,18 +37,18 @@ else
endif
LOCAL_SRC_FILES := \
- $(call all-java-files-under, quickstep/src) \
$(call all-java-files-under, $(LAUNCHER_PATH)/quickstep/src) \
$(call all-java-files-under, $(LAUNCHER_PATH)/src_shortcuts_overrides) \
$(call all-java-files-under, src) \
+ $(call all-java-files-under, src_flags) \
$(call all-java-files-under, $(LAUNCHER_PATH)/src) \
$(call all-java-files-under, $(LAUNCHER_PATH)/quickstep/recents_ui_overrides/src)
LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/quickstep/res \
$(LOCAL_PATH)/res \
$(LOCAL_PATH)/$(LAUNCHER_PATH)/quickstep/res \
$(LOCAL_PATH)/$(LAUNCHER_PATH)/quickstep/recents_ui_overrides/res
LOCAL_PROGUARD_ENABLED := disabled
@@ -58,7 +58,7 @@ LOCAL_AAPT2_ONLY := true
LOCAL_PACKAGE_NAME := SearchLauncherQRef
LOCAL_PRODUCT_MODULE := true
LOCAL_PRIVILEGED_MODULE := true
-LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep MtkLauncher3 MtkLauncher3GoIconRecents
+LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep MtkLauncher3 MtkLauncher3GoIconRecents MtkLauncher3QuickStep
LOCAL_REQUIRED_MODULES := privapp_permissions_searchlauncher SearchLauncherConfigOverlay
LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*
添加新目录src_flags
SearchLauncher\src_flags\com\android\launcher3\config\FeatureFlags.java