[Android] Read build info in strings, not in assets

Geoffrey Métais git at videolan.org
Tue Feb 10 14:47:53 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb 10 14:47:23 2015 +0100| [fd68f09c96a2b00b02f1d1876e5d1e75c7f9a0ab] | committer: Geoffrey Métais

Read build info in strings, not in assets

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=fd68f09c96a2b00b02f1d1876e5d1e75c7f9a0ab
---

 vlc-android/src/org/videolan/vlc/gui/AboutFragment.java       |    2 +-
 vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java
index 2aaad4e..0bdf1a6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java
@@ -63,7 +63,7 @@ public class AboutFragment extends Fragment {
         mFlingViewGroup = (FlingViewGroup) v.findViewById(R.id.fling_view_group);
 
         WebView t = (WebView)v.findViewById(R.id.webview);
-        String revision = Util.readAsset("revision.txt", "Unknown revision");
+        String revision = getString(R.string.build_revision);
         t.loadData(Util.readAsset("licence.htm", "").replace("!COMMITID!",revision), "text/html", "UTF8");
 
         TextView link = (TextView) v.findViewById(R.id.main_link);
diff --git a/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java b/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
index cd87672..c71022b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
@@ -58,9 +58,9 @@ public class NativeCrashActivity extends Activity {
         mSendLog.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
-                String buildDate = "Build date: " + Util.readAsset("builddate.txt", "Unknown");
-                String builder = "Builder: "  + Util.readAsset("builder.txt", "unknown");
-                String revision = "Revision: " + Util.readAsset("revision.txt", "Unknown revision");
+                String buildDate = "Build date: " + getString(R.string.build_time);
+                String builder = "Builder: "  + getString(R.string.build_host);
+                String revision = "Revision: " + getString(R.string.build_revision);
                 AsyncHttpRequest asyncHttpRequest = new AsyncHttpRequest();
                 asyncHttpRequest.execute(Build.BRAND, Build.MANUFACTURER, Build.PRODUCT, Build.MODEL,
                                          Build.DEVICE, Build.VERSION.RELEASE,



More information about the Android mailing list