[英]How are the default AOSP launcher shortcuts installed in a ROM build?
I'm building my own version of AOSP (using code from the Code Aurora repos for a custom device) and trying to determine how shortcuts to certain apps are being added automatically to the launcher's db (Launcher3 on Marshmallow to be more specific). 我正在构建自己的AOSP版本(使用来自自定义设备的Code Aurora存储库中的代码 ),并尝试确定如何将某些应用程序的快捷方式自动添加到启动器的db中(更具体地说,棉花糖上的Launcher3)。 I want to change these around and remove/reposition some of them. 我想更改这些位置并删除/重新放置其中的一些位置。 (In this particular instance the apps in question are those from the GMS suite.) (在此特定情况下,所涉及的应用是GMS套件中的应用。)
I understand that apps can try to get their shortcuts onto the launcher's workspace by sending a ACTION_CREATE_SHORTCUT intent. 我了解,应用可以尝试通过发送ACTION_CREATE_SHORTCUT目的将其快捷方式带入启动器的工作空间。 Are some of these apps sending these intents after first boot but before the launcher launches for the first time? 这些应用中的某些是否在首次启动后但在启动器首次启动之前发送这些意图?
I couldn't find any steps or code that adds these values to the db as a prestep at build time. 在构建时,我找不到将这些值添加到db的任何步骤或代码。
What you're looking for is the " workspace
" of the launcher which located under platform/packages/apps/Launcher3/res/xml/default_workspace_*.xml
.( here ) 您正在寻找的是启动器的“ workspace
”,位于platform/packages/apps/Launcher3/res/xml/default_workspace_*.xml
。( 此处 )
You will notice there are different workspace for different screen sizes (eg 4X4 / 5X5 / 5X6). 您会注意到,不同的屏幕尺寸(例如4X4 / 5X5 / 5X6)有不同的工作空间。
To add new apps just add the next tag: 要添加新应用,只需添加下一个标记:
<favorite
launcher:packageName="com.android.gallery3d" //Your app name
launcher:className="com.android.gallery3d.app.Gallery" // Your launcher Activity
launcher:screen="3" // The screen number
launcher:x="1" // X Location on screen
launcher:y="3" /> // Y Location on screen
Xml tags - Xml标签-
1. favorite
- Specific app. 1. favorite
-特定应用。
2. resolve
- Resolve default app (eg default messages app) 2. resolve
-解决默认应用程序(例如,默认消息应用程序)
3. appwidget
- Widget... 3. appwidget
小部件...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.