Commit 84266f3f authored by Bartek Fabiszewski's avatar Bartek Fabiszewski
Browse files

Update target sdk, fix minor lint warnings

parent f4939e1e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -10,12 +10,12 @@
apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    compileSdkVersion 28

    defaultConfig {
        applicationId "net.fabiszewski.ulogger"
        minSdkVersion 14
        targetSdkVersion 27
        targetSdkVersion 28
        versionCode 202
        versionName "2.2"
    }
@@ -25,6 +25,10 @@ android {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            applicationIdSuffix ".debug"
            versionNameSuffix "-dev"
        }
    }

    lintOptions {
@@ -36,5 +40,5 @@ android {
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:appcompat-v7:28.0.0'
}
+14 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018 Bartek Fabiszewski
 * http://www.fabiszewski.net
 *
 * This file is part of μlogger-android.
 * Licensed under GPL, either version 3, or any later.
 * See <http://www.gnu.org/licenses/>
 */

package net.fabiszewski.ulogger;

class Logger {
    static final boolean DEBUG = true;
}
+13 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2018 Bartek Fabiszewski
  ~ http://www.fabiszewski.net
  ~
  ~ This file is part of μlogger-android.
  ~ Licensed under GPL, either version 3, or any later.
  ~ See <http://www.gnu.org/licenses/>
  -->

<resources>
    <string name="app_name" translatable="false">μlogger-dev</string>
</resources>
 No newline at end of file
+6 −3
Original line number Diff line number Diff line
@@ -88,13 +88,17 @@ class ListPreferenceWithEditText extends ListPreference implements Preference.On
                preference.getTitle(),
                R.layout.other_dialog);
        final TextView textView = dialog.findViewById(R.id.other_textview);
        final EditText editText = dialog.findViewById(R.id.other_edittext);
        final Button submit = dialog.findViewById(R.id.other_button_submit);
        final Button cancel = dialog.findViewById(R.id.other_button_cancel);
        if (textView == null || editText == null || submit == null || cancel == null) {
            return;
        }
        textView.setText(otherSummary);
        textView.setContentDescription(otherSummary);
        final EditText editText = dialog.findViewById(R.id.other_edittext);
        final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
        editText.setText(prefs.getString(key, ""));
        editText.setHint(prefs.getString(key, ""));
        final Button submit = dialog.findViewById(R.id.other_button_submit);
        submit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
@@ -110,7 +114,6 @@ class ListPreferenceWithEditText extends ListPreference implements Preference.On
            }
        });

        final Button cancel = dialog.findViewById(R.id.other_button_cancel);
        cancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
+2 −1
Original line number Diff line number Diff line
@@ -331,6 +331,7 @@ public class LoggerService extends Service {
     *
     * @param mId Notification Id
     */
    @SuppressWarnings("SameParameterValue")
    private Notification showNotification(int mId) {
        if (Logger.DEBUG) { Log.d(TAG, "[showNotification " + mId + "]"); }

@@ -476,7 +477,7 @@ public class LoggerService extends Service {
                        statusString = "unknown";
                        break;
                }
                if (Logger.DEBUG) { Log.d(TAG, "[location status for " + provider + " changed: " + statusString + "]"); }
                Log.d(TAG, "[location status for " + provider + " changed: " + statusString + "]");
            }
        }
    }
Loading