1
0
mirror of https://github.com/etesync/android synced 2024-12-24 07:28:09 +00:00

Lower target SDK to 22 (pre-M) to fixes crashes on Android 6; new permissions model will be implemented later

This commit is contained in:
Ricki Hirner 2015-10-20 12:56:48 +02:00
parent 3e2459c85c
commit 0f5f39a9fe
No known key found for this signature in database
GPG Key ID: C4A212CF0B2B4566
3 changed files with 15 additions and 10 deletions

View File

@ -15,7 +15,7 @@ android {
defaultConfig {
applicationId "at.bitfire.davdroid"
minSdkVersion 14
targetSdkVersion 23
targetSdkVersion 22
versionCode 79
versionName "0.9.0.1"
@ -39,6 +39,7 @@ android {
disable 'InconsistentLayout'
disable 'MergeRootFrame'
disable 'MissingTranslation'
disable 'OldTargetApi'
disable 'RtlEnabled'
disable 'Typos'
}

View File

@ -11,23 +11,26 @@
package="at.bitfire.davdroid"
android:installLocation="internalOnly">
<!-- normal permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<!-- legacy permissions -->
<!-- for writing external log files; permission only required for SDK <= 18 because since then,
writing to app-private directory doesn't require extra permissions -->
writing to app-private directory doesn't require extra permissions -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="18" tools:ignore="UnusedAttribute"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" tools:ignore="UnusedAttribute"/>
<uses-permission android:name="org.dmfs.permission.READ_TASKS" />
<uses-permission android:name="org.dmfs.permission.WRITE_TASKS" />
<!-- other permissions -->
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" /> <!-- android.permission-group.CONTACTS -->
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" /> <!-- android.permission-group.CALENDAR -->
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<!-- ical4android declares task access permissions -->
<application
android:allowBackup="true" android:fullBackupContent="false" tools:ignore="UnusedAttribute"

View File

@ -20,6 +20,7 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
@ -46,7 +47,7 @@ public class SSLSocketFactoryCompat extends SSLSocketFactory {
// - remove all SSL versions (especially SSLv3) because they're insecure now
List<String> protocols = new LinkedList<>();
for (String protocol : socket.getSupportedProtocols())
if (!protocol.toUpperCase().contains("SSL"))
if (!protocol.toUpperCase(Locale.US).contains("SSL"))
protocols.add(protocol);
Constants.log.debug("Setting allowed TLS protocols: " + TextUtils.join(", ", protocols));
SSLSocketFactoryCompat.protocols = protocols.toArray(new String[protocols.size()]);