Commit 4711e63a authored by Bartek Fabiszewski's avatar Bartek Fabiszewski
Browse files

Fix minor lint issues

parent 36a5df5f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ class LocationHelper {
     *
     * @return True if permission granted, false otherwise
     */
    @SuppressWarnings("BooleanMethodIsAlwaysInverted")
    boolean canAccessBackgroundLocation() {
        boolean ret = true;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+1 −2
Original line number Diff line number Diff line
@@ -134,8 +134,7 @@ public class MainFragment extends Fragment {
        if (context instanceof OnFragmentInteractionListener) {
            mListener = (OnFragmentInteractionListener) context;
        } else {
            throw new RuntimeException(context.toString()
                    + " must implement OnFragmentInteractionListener");
            throw new RuntimeException(context + " must implement OnFragmentInteractionListener");
        }
    }

+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@

package net.fabiszewski.ulogger;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
@@ -122,6 +123,7 @@ public class ProviderPreferenceDialogFragment extends ListPreferenceDialogWithMe
     * Get default layout for single choice dialog
     * @return Layout resource id
     */
    @SuppressLint("PrivateResource")
    private int getSingleChoiceLayoutResource() {
        int resId = android.R.layout.select_dialog_singlechoice;
        final Context context = getContext();
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static net.fabiszewski.ulogger.SettingsActivity.KEY_PROVIDER;
import static net.fabiszewski.ulogger.SettingsActivity.KEY_USERNAME;

import android.Manifest;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
@@ -277,6 +278,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
     * @param context Context
     * @return Localized label
     */
    @SuppressLint("AppBundleLocaleChanges")
    @RequiresApi(api = Build.VERSION_CODES.R)
    private CharSequence getBackgroundPermissionOptionLabel(Context context) {
        CharSequence label = context.getPackageManager().getBackgroundPermissionOptionLabel();
+0 −1
Original line number Diff line number Diff line
@@ -347,7 +347,6 @@ class WebHelper {

    /**
     * Get text/plain parameters as part of multipart form
     * @param out Output stream
     * @param params Parameters
     * @return Multipart body for text parameters
     * @throws IOException Exception on failure
Loading