| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 | 33 |
| 34 public AboutDialog(final Context context) | 34 public AboutDialog(final Context context) |
| 35 { | 35 { |
| 36 super(context); | 36 super(context); |
| 37 AboutDialog.context = context; | 37 AboutDialog.context = context; |
| 38 } | 38 } |
| 39 | 39 |
| 40 @Override | 40 @Override |
| 41 public void onCreate(final Bundle savedInstanceState) | 41 public void onCreate(final Bundle savedInstanceState) |
| 42 { | 42 { |
| 43 this.requestWindowFeature(Window.FEATURE_NO_TITLE); | 43 requestWindowFeature(Window.FEATURE_NO_TITLE); |
|
Felix Dahlke
2014/04/16 15:24:25
As before, I'm fine with the "final" change, but n
René Jeschke
2014/04/16 17:51:47
Done.
| |
| 44 this.setContentView(R.layout.about); | 44 setContentView(R.layout.about); |
| 45 | 45 |
| 46 // Get package version code and name | 46 // Get package version code and name |
| 47 String versionName = "--"; | 47 String versionName = "--"; |
| 48 int versionCode = -1; | 48 int versionCode = -1; |
| 49 try | 49 try |
| 50 { | 50 { |
| 51 final PackageInfo pi = context.getPackageManager().getPackageInfo(context. getPackageName(), 0); | 51 final PackageInfo pi = context.getPackageManager().getPackageInfo(context. getPackageName(), 0); |
| 52 versionName = pi.versionName; | 52 versionName = pi.versionName; |
| 53 versionCode = pi.versionCode; | 53 versionCode = pi.versionCode; |
| 54 } | 54 } |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 68 info.append(versionName); | 68 info.append(versionName); |
| 69 info.append(" "); | 69 info.append(" "); |
| 70 info.append(context.getString(R.string.build)); | 70 info.append(context.getString(R.string.build)); |
| 71 info.append(" "); | 71 info.append(" "); |
| 72 info.append(versionCode); | 72 info.append(versionCode); |
| 73 info.append("</p>"); | 73 info.append("</p>"); |
| 74 AdblockPlus.appendRawTextFile(context, info, R.raw.info); | 74 AdblockPlus.appendRawTextFile(context, info, R.raw.info); |
| 75 AdblockPlus.appendRawTextFile(context, info, R.raw.legal); | 75 AdblockPlus.appendRawTextFile(context, info, R.raw.legal); |
| 76 | 76 |
| 77 // Show text | 77 // Show text |
| 78 final TextView tv = (TextView)this.findViewById(R.id.about_text); | 78 final TextView tv = (TextView) findViewById(R.id.about_text); |
| 79 tv.setText(Html.fromHtml(info.toString())); | 79 tv.setText(Html.fromHtml(info.toString())); |
| 80 tv.setMovementMethod(LinkMovementMethod.getInstance()); | 80 tv.setMovementMethod(LinkMovementMethod.getInstance()); |
| 81 } | 81 } |
| 82 } | 82 } |
| LEFT | RIGHT |