diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-19 09:12:05 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-26 10:27:36 +0100 |
commit | 6debb045a05983a12cc74f3d8e8d7739f8b018e4 (patch) | |
tree | 1ee7e0ce9d8599e78e0728db2027a101d330bb98 /android | |
parent | e05367207e1c651a0f0d3ea59d6d807ccc21da08 (diff) |
android: show vendor in LOAbout
Change-Id: Iddcf953718083b218d41fcb895d28adb5808a8f4
Diffstat (limited to 'android')
4 files changed, 21 insertions, 7 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared index ee50d1f331f4..33326465a680 100644 --- a/android/Bootstrap/Makefile.shared +++ b/android/Bootstrap/Makefile.shared @@ -182,7 +182,7 @@ copy-stuff: echo 'BuildVersion=' >> assets/program/versionrc echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' >> assets/program/versionrc echo 'ReferenceOOoMajorMinor=4.1' >> assets/program/versionrc - sed -i 's|android:versionName=".*"|android:versionName="$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%H)"|' AndroidManifest.xml + sed -i 's|android:versionName=".*"|android:versionName="$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%H)/$(OOO_VENDOR)"|' AndroidManifest.xml # # .res files mkdir -p assets/program/resource diff --git a/android/experimental/LOAndroid3/res/layout/about.xml b/android/experimental/LOAndroid3/res/layout/about.xml index c15f0cc83267..49f707a7145b 100644 --- a/android/experimental/LOAndroid3/res/layout/about.xml +++ b/android/experimental/LOAndroid3/res/layout/about.xml @@ -34,4 +34,12 @@ android:textColor="@android:color/secondary_text_light" android:textSize="18dip"/> + <TextView + android:id="@+id/about_vendor" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textIsSelectable="true" + android:text="@string/app_vendor" + android:textColor="@android:color/secondary_text_light" + android:textSize="18sp"/> </LinearLayout> diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml index 7cd74232dc20..5e5e80ea628a 100644 --- a/android/experimental/LOAndroid3/res/values/strings.xml +++ b/android/experimental/LOAndroid3/res/values/strings.xml @@ -7,6 +7,7 @@ <string name="app_version">Version: $VERSION\nBuild ID: $BUILDID</string> <string name="app_description">LibreOffice Viewer is a document viewer based on LibreOffice.</string> <string name="app_credits">http://www.libreoffice.org</string> + <string name="app_vendor">This release was supplied by $VENDOR.</string> <string name="about_license">Show License</string> <string name="about_notice">Show Notice</string> diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOAbout.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOAbout.java index 1aca1c6c8b98..27bb50aaa8de 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOAbout.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOAbout.java @@ -59,25 +59,30 @@ public abstract class LOAbout extends Activity { int defaultColor = textView.getTextColors().getDefaultColor(); textView.setTextColor(defaultColor); - // Take care of placeholders in the version text view. - textView = (TextView)messageView.findViewById(R.id.about_version); + // Take care of placeholders in the version and vendor text views. + TextView versionView = (TextView)messageView.findViewById(R.id.about_version); + TextView vendorView = (TextView)messageView.findViewById(R.id.about_vendor); try { String versionName = getPackageManager().getPackageInfo(getPackageName(), 0).versionName; String[] tokens = versionName.split("/"); - if (tokens.length == 2) + if (tokens.length == 3) { - String version = textView.getText().toString(); + String version = versionView.getText().toString(); + String vendor = vendorView.getText().toString(); version = version.replace("$VERSION", tokens[0]); version = version.replace("$BUILDID", tokens[1]); - textView.setText(version); + vendor = vendor.replace("$VENDOR", tokens[2]); + versionView.setText(version); + vendorView.setText(vendor); } else throw new NameNotFoundException(); } catch (NameNotFoundException e) { - textView.setText(""); + versionView.setText(""); + vendorView.setText(""); } |