mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Merge pull request #766 from owncloud/feedbackWithVersionNumber
Email from feedback contains version number
This commit is contained in:
commit
4e2f886b44
1 changed files with 14 additions and 9 deletions
|
@ -119,7 +119,18 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
|
|||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Load package info
|
||||
String temp;
|
||||
try {
|
||||
PackageInfo pkg = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
temp = pkg.versionName;
|
||||
} catch (NameNotFoundException e) {
|
||||
temp = "";
|
||||
Log_OC.e(TAG, "Error while showing about dialog", e);
|
||||
}
|
||||
final String appVersion = temp;
|
||||
|
||||
// Register context menu for list of preferences.
|
||||
registerForContextMenu(getListView());
|
||||
|
||||
|
@ -208,7 +219,7 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
|
|||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
String feedbackMail =(String) getText(R.string.mail_feedback);
|
||||
String feedback =(String) getText(R.string.prefs_feedback);
|
||||
String feedback =(String) getText(R.string.prefs_feedback) + " - android v" + appVersion;
|
||||
Intent intent = new Intent(Intent.ACTION_SENDTO);
|
||||
intent.setType("text/plain");
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, feedback);
|
||||
|
@ -286,13 +297,7 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
|
|||
pAboutApp = (Preference) findPreference("about_app");
|
||||
if (pAboutApp != null) {
|
||||
pAboutApp.setTitle(String.format(getString(R.string.about_android), getString(R.string.app_name)));
|
||||
PackageInfo pkg;
|
||||
try {
|
||||
pkg = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
pAboutApp.setSummary(String.format(getString(R.string.about_version), pkg.versionName));
|
||||
} catch (NameNotFoundException e) {
|
||||
Log_OC.e(TAG, "Error while showing about dialog", e);
|
||||
}
|
||||
pAboutApp.setSummary(String.format(getString(R.string.about_version), appVersion));
|
||||
}
|
||||
|
||||
loadInstantUploadPath();
|
||||
|
|
Loading…
Reference in a new issue