Merge branch 'lint-errors-2' into 'master'

Lint errors round 2

There are only a few errors left, which I've either logged as issues or reported upstream:

* #580
* #581
* #582
* https://github.com/rtyley/spongycastle/issues/7#issuecomment-189299020

I've also done a bunch of warnings that were just too easy to leave alone.

See merge request !215
This commit is contained in:
Hans-Christoph Steiner 2016-02-26 21:15:56 +00:00
commit 94e3cf85ba
13 changed files with 23 additions and 21 deletions

View File

@ -48,6 +48,6 @@
android:layout_marginStart="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left" />
android:layout_gravity="top|start" />
</view>

View File

@ -29,9 +29,7 @@
android:id="@+id/perm_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:scaleType="fitCenter" />
@ -43,7 +41,6 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
>
<TextView
@ -52,14 +49,12 @@
android:textSize="16sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<ImageView
android:id="@+id/perm_money_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="@+id/perm_money_label"
android:scaleType="fitCenter"
@ -73,10 +68,8 @@
android:textColor="@color/perms_costs_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/perm_money_icon"
android:layout_toEndOf="@id/perm_money_icon"
android:layout_below="@id/perm_name"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:text="@string/perm_costs_money" />
</RelativeLayout>

View File

@ -41,6 +41,7 @@
android:baselineAligned="false"
android:orientation="vertical"
android:layout_toRightOf="@id/icon"
android:layout_toEndOf="@id/icon"
android:paddingLeft="16dp"
android:paddingStart="16dp"
android:paddingRight="16dp"

View File

@ -46,6 +46,6 @@
android:layout_marginStart="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left" />
android:layout_gravity="top|start" />
</view>

View File

@ -5,7 +5,9 @@
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeight"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:paddingEnd="?attr/listPreferredItemPaddingRight"
android:baselineAligned="false">
<ImageView
@ -38,7 +40,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:paddingEnd="?attr/listPreferredItemPaddingRight"
android:layout_gravity="center_vertical"
android:gravity="start"
android:textAlignment="viewStart"
@ -74,7 +78,9 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:paddingEnd="?attr/listPreferredItemPaddingRight"
android:gravity="start"
android:textAlignment="viewStart"
tools:text="Application manager" />

View File

@ -104,7 +104,6 @@
android:showDividers="beginning">
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@ -124,7 +123,7 @@
android:layout_weight="1"
android:text="@string/cancel"
android:maxLines="2"
style="?android:attr/buttonBarButtonStyle" />
/>
<Button android:id="@+id/ok_button"
android:layout_width="0dip"
@ -134,7 +133,7 @@
android:text="@string/next"
android:maxLines="2"
android:filterTouchesWhenObscured="true"
style="?android:attr/buttonBarButtonStyle" />
/>
<LinearLayout android:id="@+id/rightSpacer"
android:layout_width="0dip"

View File

@ -5,7 +5,9 @@
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:paddingEnd="?attr/listPreferredItemPaddingRight"
android:descendantFocusability="blocksDescendants">
<!--
descendantFocusability is here because if you have a child that responds

View File

@ -8,7 +8,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:paddingEnd="?attr/listPreferredItemPaddingRight"
android:orientation="vertical">
<!-- URL of this repo -->

View File

@ -2,7 +2,6 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
@ -37,7 +36,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/swap_light_blue"
app:backgroundTint="@color/swap_light_blue"
android:textColor="@android:color/white"
android:text="@string/menu_install"
tools:ignore="UnusedAttribute" />

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.ConfirmReceive xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
@ -57,7 +56,6 @@
android:id="@+id/no_button"
android:text="@string/no"
android:backgroundTint="@color/swap_deny"
app:backgroundTint="@color/swap_deny"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="25dp"
@ -69,7 +67,6 @@
android:id="@+id/yes_button"
android:text="@string/yes"
android:backgroundTint="@color/swap_light_blue"
app:backgroundTint="@color/swap_light_blue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="UnusedAttribute" />

View File

@ -3,7 +3,6 @@
<org.fdroid.fdroid.views.swap.SwapConnecting
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -41,11 +40,10 @@
android:layout_height="wrap_content"
android:id="@+id/back"
android:backgroundTint="@color/swap_light_blue"
app:backgroundTint="@color/swap_light_blue"
android:textColor="@android:color/white"
android:layout_gravity="center_horizontal"
android:visibility="gone"
android:text="@string/back"
tools:ignore="UnusedAttribute" />
</org.fdroid.fdroid.views.swap.SwapConnecting>
</org.fdroid.fdroid.views.swap.SwapConnecting>

View File

@ -194,7 +194,7 @@
<string name="system_install_installing">Instalando…</string>
<string name="system_install_installing_rebooting">Instalando e reiniciando…</string>
<string name="system_install_uninstalling">Desinstalando…</string>
<string name="system_install_warning">Levará máis de 10 segundos...</string>
<string name="system_install_warning">Levará máis de 10 segundos</string>
<string name="system_install_warning_lollipop">Levará máis de 10 segundos e o dispositivo será <b>reiniciado</b> a continuación.</string>
<string name="system_uninstall">Desexas desinstalar F-Droid Privileged Extension?</string>
<string name="system_uninstall_button">Desinstalar</string>

View File

@ -1,7 +1,9 @@
package org.fdroid.fdroid.data;
import android.annotation.TargetApi;
import android.content.ContentValues;
import android.database.Cursor;
import android.os.Build;
import org.fdroid.fdroid.Utils;
@ -145,7 +147,11 @@ public class Apk extends ValueObject implements Comparable<Apk> {
}
@Override
@TargetApi(19)
public int compareTo(Apk apk) {
if (Build.VERSION.SDK_INT < 19) {
return Integer.valueOf(vercode).compareTo(apk.vercode);
}
return Integer.compare(vercode, apk.vercode);
}