[Libreoffice-commits] online.git: android/app configure.ac loleaflet/Makefile.am
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 6 14:46:22 UTC 2019
android/app/appSettings.gradle.in | 1 +
android/app/build.gradle | 2 ++
android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java | 2 +-
configure.ac | 3 +++
loleaflet/Makefile.am | 1 +
5 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 1c8a31b33ed5813f99a86c2671a4cb04a9a099b9
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Dec 6 14:49:44 2019 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Dec 6 15:46:04 2019 +0100
android: Brand also the shell's About dialog.
Change-Id: I63b668ad92c688ec69818c058a787dbd94b5cc8b
Reviewed-on: https://gerrit.libreoffice.org/84630
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/android/app/appSettings.gradle.in b/android/app/appSettings.gradle.in
index e1f9662bc..4ce26c221 100644
--- a/android/app/appSettings.gradle.in
+++ b/android/app/appSettings.gradle.in
@@ -5,6 +5,7 @@ ext {
liboVendor = '@VENDOR@'
liboInfoURL = '@INFO_URL@'
liboLauncherIcon = '@mipmap/@APP_IC_LAUNCHER@'
+ liboHasBranding = '@APP_HAS_BRANDING@'
}
android.defaultConfig {
applicationId '@ANDROID_PACKAGE_NAME@'
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 80fe4a55a..98ace7fb8 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -16,6 +16,7 @@ android {
resValue "string", "vendor", "${liboVendor}"
resValue "string", "info_url", "${liboInfoURL}"
manifestPlaceholders = [ appIcon: "${liboLauncherIcon}" ]
+ buildConfigField "boolean", "APP_HAS_BRANDING", "${liboHasBranding}"
ndk {
//abiFilters "x86", "armeabi-v7a", "armeabi"
abiFilters "armeabi-v7a"
@@ -29,6 +30,7 @@ android {
resValue "string", "vendor", "${liboVendor}"
resValue "string", "info_url", "${liboInfoURL}"
manifestPlaceholders = [ appIcon: "${liboLauncherIcon}" ]
+ buildConfigField "boolean", "APP_HAS_BRANDING", "${liboHasBranding}"
ndk {
abiFilters "armeabi-v7a"
}
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java b/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java
index 3875674cf..89fd32e74 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java
@@ -82,7 +82,7 @@ public class AboutDialogFragment extends DialogFragment {
vendorView.setText(vendor);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
- builder .setIcon(R.drawable.lo_icon)
+ builder .setIcon(BuildConfig.APP_HAS_BRANDING? R.drawable.ic_launcher_brand: R.drawable.lo_icon)
.setTitle(R.string.app_name)
.setView(messageView)
.setNegativeButton(R.string.about_license, new DialogInterface.OnClickListener() {
diff --git a/configure.ac b/configure.ac
index 04c2e1816..4109b14fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -849,12 +849,15 @@ AC_LINK_FILES([loleaflet/archived-packages], [loleaflet/archived-packages])
APP_BRANDING_DIR=
APP_IC_LAUNCHER="ic_launcher"
+APP_HAS_BRANDING="false"
if test "$with_app_branding" != no -a -d "$with_app_branding"; then
APP_BRANDING_DIR="$with_app_branding"
APP_IC_LAUNCHER="ic_launcher_brand"
+ APP_HAS_BRANDING="true"
fi
AC_SUBST(APP_BRANDING_DIR)
AC_SUBST(APP_IC_LAUNCHER)
+AC_SUBST(APP_HAS_BRANDING)
AS_IF([test "$ENABLE_IOSAPP" = "true"],
[
diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index e903d59fd..e829b9956 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -168,6 +168,7 @@ if ENABLE_ANDROIDAPP
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)"/images/*.svg $(abs_top_srcdir)/android/lib/src/main/assets/dist/images/ ; fi
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)/images/toolbar-bg-logo.svg" $(abs_top_srcdir)/android/lib/src/main/assets/dist/images/toolbar-bg.svg ; fi
@if test -d "$(APP_BRANDING_DIR)/android" ; then for I in `cd "$(APP_BRANDING_DIR)/android" && find . -type f` ; do mkdir -p $(abs_top_srcdir)/android/lib/src/main/res/`dirname $$I` ; cp -a "$(APP_BRANDING_DIR)/android/$$I" "$(abs_top_srcdir)/android/app/src/main/res/$$I" ; done ; fi
+ @touch "$(abs_top_srcdir)/android/app/src/main/res/drawable/ic_launcher_brand.xml" # to avoid problems with a missing resource in the non-branded builds
@echo
@echo "Copied JS, HTML and CSS to the Android project (android/lib/src/main/assets/dist)."
@echo
More information about the Libreoffice-commits
mailing list