Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Secret Android build process

The Android (Open Source Project) native launcher source code seems to be missing the following required XML layout parameters in some of its published resource files: layout_height and layout_width

Missing attributes

  • AppsCustomizeTabHost in apps_customize_pane.xml
  • Workspace in workspace.xml
  • there are 13 more, including duplicates in screen-size-specific layout resources

Compile-time exceptions

This breaks launcher compilation, at least independent compilation, throwing errors such as:

  • 'layout-width' attribute should be defined
  • 'layout-height' attribute should be defined

Note: there are many other issues that need to be resolved in order compile Android launcher2, this question is about these specific missing attributes and how come they are missing?

How does Google compile its launcher and what are the LayoutParams values?

So how is Google able to compile the code when these required attributes are missing?

Furthermore, what are the values that should be used, should they be:

android:layout_width="fill_parent"
android:layout_height="fill_parent"

or wrap_content, or specific pixel values - in other words, where can I get this kind of information / what is the secret build process?

like image 721
Cel Avatar asked Jan 02 '13 13:01

Cel


People also ask

Where are secret keys stored android?

A public/private key RSA pair is generated, which is stored in the Android device's keystore and protected usually by the device PIN. An AES-based symmetric key is also generated, which is used to encrypt and decrypt the secrets.

What is BuildConfig flavor?

BuildConfig.FLAVOR gives you combined product flavor. So if you have only one flavor dimension: productFlavors { normal { } admin { } } Then you can just check it: if (BuildConfig. FLAVOR.


1 Answers

We do not compile Android with Eclipse+ADT but with make. The compilers do not check for layout_width and layout_height at build time. When these attributes are missing a runtime error is generated. But Launcher2 is built so that these attributes are not needed (using code to generate layout params for instance.) There is nothing secret about it :)

like image 151
Romain Guy Avatar answered Sep 20 '22 18:09

Romain Guy