Bug 1091087 - Disable MOZ_NATIVE_DEVICES when MOZ_ANDROID_RESOURCE_CONSTRAINED is set. r=glandium

This saves dexing and shipping the Google Play Services and other Google
libraries, which add resources and about 3megs of code.

Due to ordering issues, the relevant flags and toggles were moved to
configure.in and exposed early enough to be used by confvars.sh.
This commit is contained in:
Nick Alexander 2014-11-03 20:04:19 -08:00
parent 736b5a96bd
commit 452c901e08
3 changed files with 29 additions and 22 deletions

View File

@ -412,26 +412,6 @@ case "$target" in
;;
esac
MOZ_ARG_DISABLE_BOOL(android-include-fonts,
[ --disable-android-include-fonts
disable the inclusion of fonts into the final APK],
MOZ_ANDROID_EXCLUDE_FONTS=1)
if test -n "$MOZ_ANDROID_EXCLUDE_FONTS"; then
AC_DEFINE(MOZ_ANDROID_EXCLUDE_FONTS, $MOZ_ANDROID_EXCLUDE_FONTS)
AC_SUBST(MOZ_ANDROID_EXCLUDE_FONTS)
fi
MOZ_ARG_ENABLE_BOOL(android-resource-constrained,
[ --enable-android-resource-constrained
exclude hi-res images and similar from the final APK],
MOZ_ANDROID_RESOURCE_CONSTRAINED=1)
if test -n "$MOZ_ANDROID_RESOURCE_CONSTRAINED"; then
AC_DEFINE(MOZ_ANDROID_RESOURCE_CONSTRAINED, $MOZ_ANDROID_RESOURCE_CONSTRAINED)
AC_SUBST(MOZ_ANDROID_RESOURCE_CONSTRAINED)
fi
MOZ_ARG_WITH_STRING(android-min-sdk,
[ --with-android-min-sdk=[VER] Impose a minimum Firefox for Android SDK version],
[ MOZ_ANDROID_MIN_SDK_VERSION=$withval ])

View File

@ -4094,6 +4094,30 @@ fi
AC_SUBST(MOZ_BING_API_CLIENTID)
AC_SUBST(MOZ_BING_API_KEY)
# Whether to include optional-but-large font files in the final APK.
# We want this in mobile/android/confvars.sh, so it goes early.
MOZ_ARG_DISABLE_BOOL(android-include-fonts,
[ --disable-android-include-fonts
Disable the inclusion of fonts into the final APK],
MOZ_ANDROID_EXCLUDE_FONTS=1)
if test -n "$MOZ_ANDROID_EXCLUDE_FONTS"; then
AC_DEFINE(MOZ_ANDROID_EXCLUDE_FONTS)
fi
AC_SUBST(MOZ_ANDROID_EXCLUDE_FONTS)
# Whether this APK is destined for resource constrained devices.
# We want this in mobile/android/confvars.sh, so it goes early.
MOZ_ARG_ENABLE_BOOL(android-resource-constrained,
[ --enable-android-resource-constrained
Exclude hi-res images and similar from the final APK],
MOZ_ANDROID_RESOURCE_CONSTRAINED=1)
if test -n "$MOZ_ANDROID_RESOURCE_CONSTRAINED"; then
AC_DEFINE(MOZ_ANDROID_RESOURCE_CONSTRAINED)
fi
AC_SUBST(MOZ_ANDROID_RESOURCE_CONSTRAINED)
# Allow the application to influence configure with a confvars.sh script.
AC_MSG_CHECKING([if app-specific confvars.sh exists])
if test -f "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" ; then

View File

@ -66,8 +66,11 @@ MOZ_LOCALE_SWITCHER=1
# Enable second screen and casting support for external devices.
MOZ_DEVICES=1
# Enable second screen using native Android libraries
MOZ_NATIVE_DEVICES=1
# Enable second screen using native Android libraries, provided we're
# not resource constrained.
if test -z "$MOZ_ANDROID_RESOURCE_CONSTRAINED"; then
MOZ_NATIVE_DEVICES=1
fi
# Mark as WebGL conformant
MOZ_WEBGL_CONFORMANT=1