From ad95626619567170bb1482f6664d32843d94187a Mon Sep 17 00:00:00 2001 From: Andries Smit Date: Thu, 13 Jan 2022 11:16:26 +0100 Subject: [PATCH] Wear: remove tile debug log --- core/src/main/res/values/strings.xml | 11 ----------- .../interaction/actions/TempTargetActivity.java | 2 -- .../java/info/nightscout/androidaps/tile/TileBase.kt | 11 +++-------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 4713c3d553..e0c2c022a0 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -558,15 +558,4 @@ %1$d minutes - - Temptarget unknown preset: %1$s - Cancelling running Temp-Targets? - Different units used on watch and phone! - Zero-Temp-Target - cancelling running Temp-Targets? - Min-BG out of range! - Max-BG out of range! - Temptarget:\nMin: %1$s\nMax: %2$s\nDuration: %3$s - Temptarget:\nTarget: %1$s\nDuration: %2$s - Temptarget:\Reason: %1$s\nTarget: %2$s\nDuration: %3$s - \ No newline at end of file diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.java b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.java index e255b65579..8c761f898b 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.java +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.java @@ -4,7 +4,6 @@ import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.wearable.view.GridPagerAdapter; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -48,7 +47,6 @@ public class TempTargetActivity extends ViewSelectorActivity { String actionString = extras.getString("actionString", ""); boolean inBackground = extras.getBoolean("inBackground", false); if (inBackground) { - Log.i("ASTAG", "TempTargetActivity.onCreate: " + actionString); ListenerService.initiateAction(this, actionString); confirmAction(this, R.string.action_tempt_confirmation); finishAffinity(); diff --git a/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt b/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt index 8cf823ea2d..400b73b071 100644 --- a/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt +++ b/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.tile -import android.util.Log import android.content.SharedPreferences import androidx.annotation.DrawableRes import androidx.annotation.StringRes @@ -80,7 +79,6 @@ abstract class TileBase : TileService() { override fun onTileRequest( requestParams: RequestBuilders.TileRequest ): ListenableFuture = serviceScope.future { - Log.i(TAG, "onTileRequest: ") val actionsSelected = getSelectedActions() val wearControl = getWearControl() @@ -99,7 +97,6 @@ abstract class TileBase : TileService() { override fun onResourcesRequest( requestParams: ResourcesRequest ): ListenableFuture = serviceScope.future { - Log.i(TAG, "onResourcesRequest: ") Resources.Builder() .setVersion(resourceVersion) .apply { @@ -232,7 +229,9 @@ abstract class TileBase : TileService() { private fun getWearControl(): WearControl { val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this) - if (!sharedPrefs.contains("wearcontrol")) return WearControl.NO_DATA; + if (!sharedPrefs.contains("wearcontrol")) { + return WearControl.NO_DATA + } val wearControlPref = sharedPrefs.getBoolean("wearcontrol", false) if (wearControlPref) { return WearControl.ENABLED @@ -251,9 +250,7 @@ abstract class TileBase : TileService() { actionList.add(action) } } - Log.i(TAG, this::class.java.name + ".getSelectedActions: " + actionList.size + " " + actionList.toString()) if (actionList.isEmpty()) { - Log.i(TAG, "getSelectedActions: default") return source.getActions().take(4) } return actionList @@ -268,10 +265,8 @@ abstract class TileBase : TileService() { val defaults = source.getDefaultConfig() val firstKey = defaults.firstNotNullOf { settings -> settings.key } if (!sharedPrefs.contains(firstKey)) { - Log.i(TAG, "setDefaultSettings: set defaults") val editor = sharedPrefs.edit() for ((key, value) in defaults) { - // println("$key = $value") editor.putString(key, value) } editor.apply()