android: Fix app icon on Android versions < 5.0
XML resources are apparently not supported there. Moving the icon to the mipmap folders should fix that. Aliases are defined for the icons on Android < 8.0.
This commit is contained in:
@@ -66,7 +66,7 @@ public class MainActivity extends AppCompatActivity implements OnVpnProfileSelec
|
|||||||
ActionBar bar = getSupportActionBar();
|
ActionBar bar = getSupportActionBar();
|
||||||
bar.setDisplayShowHomeEnabled(true);
|
bar.setDisplayShowHomeEnabled(true);
|
||||||
bar.setDisplayShowTitleEnabled(false);
|
bar.setDisplayShowTitleEnabled(false);
|
||||||
bar.setIcon(R.drawable.ic_launcher);
|
bar.setIcon(R.mipmap.ic_app);
|
||||||
|
|
||||||
/* load CA certificates in a background task */
|
/* load CA certificates in a background task */
|
||||||
new LoadCertificatesTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new LoadCertificatesTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
|||||||
+1
-1
@@ -202,7 +202,7 @@ public class TrustedCertificateImportActivity extends AppCompatActivity
|
|||||||
certificate = (X509Certificate)getArguments().getSerializable(VpnProfileDataSource.KEY_CERTIFICATE);
|
certificate = (X509Certificate)getArguments().getSerializable(VpnProfileDataSource.KEY_CERTIFICATE);
|
||||||
|
|
||||||
return new AlertDialog.Builder(getActivity())
|
return new AlertDialog.Builder(getActivity())
|
||||||
.setIcon(R.drawable.ic_launcher)
|
.setIcon(R.mipmap.ic_app)
|
||||||
.setTitle(R.string.import_certificate)
|
.setTitle(R.string.import_certificate)
|
||||||
.setMessage(certificate.getSubjectDN().toString())
|
.setMessage(certificate.getSubjectDN().toString())
|
||||||
.setPositiveButton(R.string.import_certificate, new DialogInterface.OnClickListener()
|
.setPositiveButton(R.string.import_certificate, new DialogInterface.OnClickListener()
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2018 Tobias Brunner
|
|
||||||
HSR Hochschule fuer Technik Rapperswil
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
-->
|
|
||||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:drawable="@drawable/ic_launcher" />
|
|
||||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
+5
-3
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2018 Tobias Brunner
|
Copyright (C) 2020 Tobias Brunner
|
||||||
HSR Hochschule fuer Technik Rapperswil
|
HSR Hochschule fuer Technik Rapperswil
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
@@ -13,5 +13,7 @@
|
|||||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
for more details.
|
for more details.
|
||||||
-->
|
-->
|
||||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
<resources>
|
||||||
android:drawable="@drawable/ic_launcher" />
|
<mipmap name="ic_launcher">@mipmap/ic_app</mipmap>
|
||||||
|
<mipmap name="ic_shortcut">@mipmap/ic_app</mipmap>
|
||||||
|
</resources>
|
||||||
Reference in New Issue
Block a user