1
0
mirror of https://github.com/etesync/android synced 2024-11-16 04:49:06 +00:00

Expose appName from App and use it.

This commit is contained in:
Tom Hacohen 2017-04-21 21:19:48 +01:00
parent 51840c3a22
commit 068e0c6b4d
3 changed files with 6 additions and 2 deletions

View File

@ -88,6 +88,9 @@ public class App extends Application {
public static final String OVERRIDE_PROXY_HOST_DEFAULT = "localhost"; public static final String OVERRIDE_PROXY_HOST_DEFAULT = "localhost";
public static final int OVERRIDE_PROXY_PORT_DEFAULT = 8118; public static final int OVERRIDE_PROXY_PORT_DEFAULT = 8118;
@Getter
private static String appName;
@Getter @Getter
private CustomCertManager certManager; private CustomCertManager certManager;
@ -123,6 +126,7 @@ public class App extends Application {
uidGenerator = new UidGenerator(null, android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID)); uidGenerator = new UidGenerator(null, android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID));
appName = getString(R.string.app_name);
accountType = getString(R.string.account_type); accountType = getString(R.string.account_type);
addressBookAccountType = getString(R.string.account_type_address_book); addressBookAccountType = getString(R.string.account_type_address_book);
addressBooksAuthority = getString(R.string.address_books_authority); addressBooksAuthority = getString(R.string.address_books_authority);

View File

@ -41,7 +41,7 @@ public class HttpClient {
static { static {
String date = new SimpleDateFormat("yyyy/MM/dd", Locale.US).format(new Date(BuildConfig.buildTime)); String date = new SimpleDateFormat("yyyy/MM/dd", Locale.US).format(new Date(BuildConfig.buildTime));
userAgent = "EteSync/" + BuildConfig.VERSION_NAME + " (" + date + "; okhttp3) Android/" + Build.VERSION.RELEASE; userAgent = App.getAppName() + "/" + BuildConfig.VERSION_NAME + " (" + date + "; okhttp3) Android/" + Build.VERSION.RELEASE;
} }
private HttpClient() { private HttpClient() {

View File

@ -72,7 +72,7 @@ public class AboutActivity extends AppCompatActivity {
private final static ComponentInfo components[] = { private final static ComponentInfo components[] = {
new ComponentInfo( new ComponentInfo(
"EteSync", BuildConfig.VERSION_NAME, Constants.webUri.toString(), App.getAppName(), BuildConfig.VERSION_NAME, Constants.webUri.toString(),
DateFormatUtils.format(BuildConfig.buildTime, "yyyy") + " Tom Hacohen", DateFormatUtils.format(BuildConfig.buildTime, "yyyy") + " Tom Hacohen",
R.string.about_license_info_no_warranty, "gpl-3.0-standalone.html" R.string.about_license_info_no_warranty, "gpl-3.0-standalone.html"
), new ComponentInfo( ), new ComponentInfo(