Android 9.0 GMS 桌面布局修改

先看下CDD文件的要求

Android 9.0 GMS 桌面布局修改_第1张图片

Android 9.0 GMS 桌面布局修改_第2张图片

 

集成了GMS给的partner_gms包后,发现Hotseat的排列并没直接像文档上要求的那样。

Android 9.0 GMS 桌面布局修改_第3张图片

少了chrome,我就去launcher3中打开配置dw_phone_hotseat.xml,添加修改

  

编译,刷机后发现还是没改变,之后就各种打印log各种修改laucher3,结果悲催呀,都不生效。

没办法把GMS包去掉,编译后发现改dw_phone_hotseat.xml是生效的,这就日了狗了。定位到问题应该是GMS包中有相关配置,笨办法grep搜,因为hotseat下日期之前是没出现过的,就grep -nr "calendar",结果还真搜到了

位置也对上,那就是在GmsSampleIntegration中,哈哈,找到就好办改配置文件就可以,不过要注意GmsSampleIntegration中的android.mk,因为GmsSampleIntegration下的res配置有几个,看下你需要编译哪个。

我修改的是res_dhs_full/xml/partner_default_layout.xml




  
  
  
  
  
  
  
  
  
  
  
    
    
    
    
    
    
    
    
    
    
  
  

android.mk修改前:

###############################################################################
# Various GMS Sample Integration targets
LOCAL_PATH:= $(call my-dir)

# GmsSampleIntegration
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsSampleIntegration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_full $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsSampleIntegrationGo
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsSampleIntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType1Integration (No GSA, No Chrome)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType1Integration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_min $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType1IntegrationGo (No GSA, No Chrome)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType1IntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_min_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType2Integration (No GSA, Chrome)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType2Integration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_no_gsa $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType2IntegrationGo (No GSA, Chrome)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType2IntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_no_search_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType3aIntegration (GSA, No Chrome, no placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType3aIntegration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_min $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType3aIntegrationGo (GSA, No Chrome, no placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType3aIntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_min_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType3bIntegration (GSA, No Chrome, search placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType3bIntegration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_no_chrome $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType3bIntegrationGo (GSA, No Chrome, search placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType3bIntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_no_chrome_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType4aIntegration (GSA, Chrome, no placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType4aIntegration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_min $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType4aIntegrationGo (GSA, Chrome, no placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType4aIntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_min_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType4bIntegration (GSA, Chrome, search placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType4bIntegration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_no_chrome $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType4bIntegrationGo (GSA, Chrome, search placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType4bIntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_no_chrome_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType4cIntegration (GSA, Chrome, search+chrome placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType4cIntegration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_full $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

# GmsEEAType4cIntegrationGo (GSA, Chrome, search+chrome placement)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsEEAType4cIntegrationGo
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_go $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

修改后:

###############################################################################
# Various GMS Sample Integration targets
LOCAL_PATH:= $(call my-dir)

# GmsSampleIntegration
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := GmsSampleIntegration
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res_dhs_full $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)

编译后刷机,解决问题

Android 9.0 GMS 桌面布局修改_第4张图片

 

 

 

你可能感兴趣的:(Android,GMS)