Loading app/build.gradle +7 −3 Original line number Diff line number Diff line Loading @@ -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" } Loading @@ -25,6 +25,10 @@ android { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { applicationIdSuffix ".debug" versionNameSuffix "-dev" } } lintOptions { Loading @@ -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' } app/src/debug/java/net/fabiszewski/ulogger/Logger.java 0 → 100644 +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; } app/src/debug/res/values/strings.xml 0 → 100644 +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 app/src/main/java/net/fabiszewski/ulogger/ListPreferenceWithEditText.java +6 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading app/src/main/java/net/fabiszewski/ulogger/LoggerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -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 + "]"); } Loading Loading @@ -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 Loading
app/build.gradle +7 −3 Original line number Diff line number Diff line Loading @@ -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" } Loading @@ -25,6 +25,10 @@ android { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { applicationIdSuffix ".debug" versionNameSuffix "-dev" } } lintOptions { Loading @@ -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' }
app/src/debug/java/net/fabiszewski/ulogger/Logger.java 0 → 100644 +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; }
app/src/debug/res/values/strings.xml 0 → 100644 +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
app/src/main/java/net/fabiszewski/ulogger/ListPreferenceWithEditText.java +6 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading
app/src/main/java/net/fabiszewski/ulogger/LoggerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -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 + "]"); } Loading Loading @@ -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