[Libreoffice-commits] online.git: android/app

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 20 21:24:31 UTC 2020


 android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f09d71bacab49530ed5c8033858e97bb7a35fb4c
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Mon Apr 13 12:21:43 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Mon Apr 20 23:24:12 2020 +0200

    android: fix missing brand resource
    
    configured with no brand and I get the following error:
    
    ./gradlew assemble
    
    : error: cannot find symbol
            builder .setIcon(BuildConfig.APP_HAS_BRANDING? R.drawable.ic_launcher_brand: R.drawable.lo_icon)
      symbol:   variable ic_launcher_brand
      location: class drawable
    
    Change-Id: Ibf3dcf581f12190ba4664b286710fc5a8ef43fe2
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92120
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

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 89fd32e74..0afad916a 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,9 @@ public class AboutDialogFragment extends DialogFragment {
         vendorView.setText(vendor);
 
         AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-        builder .setIcon(BuildConfig.APP_HAS_BRANDING? R.drawable.ic_launcher_brand: R.drawable.lo_icon)
+        int brandIcon = this.getResources().getIdentifier("ic_launcher_brand", "drawable",
+                this.getActivity().getPackageName());
+        builder .setIcon(BuildConfig.APP_HAS_BRANDING? brandIcon: R.drawable.lo_icon)
                 .setTitle(R.string.app_name)
                 .setView(messageView)
                 .setNegativeButton(R.string.about_license, new DialogInterface.OnClickListener() {


More information about the Libreoffice-commits mailing list