1
0
mirror of https://github.com/etesync/android synced 2024-11-15 20:38:58 +00:00

Fix lint warnings, don't require external storage permission for SDK >18

This commit is contained in:
Ricki Hirner 2015-10-19 11:57:43 +02:00
parent 82f80fed1c
commit da9410c1b5
No known key found for this signature in database
GPG Key ID: C4A212CF0B2B4566
3 changed files with 8 additions and 4 deletions

View File

@ -41,7 +41,6 @@ android {
disable 'MissingTranslation'
disable 'RtlEnabled'
disable 'Typos'
disable 'UnusedAttribute'
}
packagingOptions {
exclude 'LICENSE'

View File

@ -20,13 +20,17 @@
<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" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
<!-- for writing external log files; permission only required for SDK <= 18 because since then,
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" />
<application
android:allowBackup="true" android:fullBackupContent="false"
android:allowBackup="true" android:fullBackupContent="false" tools:ignore="UnusedAttribute"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
@ -110,7 +114,7 @@
<activity
android:name=".ui.settings.AccountActivity"
android:label="@string/settings_title"
android:parentActivityName=".ui.settings.SettingsActivity" >
android:parentActivityName=".ui.settings.SettingsActivity" tools:ignore="UnusedAttribute">
</activity>
<!-- MemorizingTrustManager -->

View File

@ -96,6 +96,7 @@ public class LocalTaskList extends AndroidTaskList implements LocalCollection {
@Override
@SuppressWarnings("Recycle")
public String getCTag() throws CalendarStorageException {
try {
@Cleanup Cursor cursor = provider.client.query(taskListSyncUri(), new String[] { COLUMN_CTAG }, null, null, null);