removed old logging

This commit is contained in:
Josia Pietsch 2024-09-11 11:55:00 +02:00
parent f788a11489
commit 9a3957be36
Signed by: jrpie
GPG key ID: E70B571D66986A2D
5 changed files with 7 additions and 13 deletions

View file

@ -230,7 +230,6 @@ fun uninstallApp(packageName: String, user: Int?, activity: Activity) {
}
fun launchApp(packageName: String, user: Int?, context: Context, rect: Rect? = null) {
Log.i("Launcher", "Starting: " + packageName + " (user " +user.toString()+ ")")
if (user != null && user != INVALID_USER) {
val launcherApps = context.getSystemService(Service.LAUNCHER_APPS_SERVICE) as LauncherApps
getLauncherActivityInfo(packageName,user,context)?.let {

View file

@ -2,7 +2,6 @@ package de.jrpie.android.launcher
import android.app.Activity
import android.content.Context
import android.util.Log
import de.jrpie.android.launcher.preferences.LauncherPreferences
/**
@ -144,7 +143,6 @@ enum class Gesture (val id: String, private val labelResource: Int,
operator fun invoke(activity: Activity) {
val app = this.getApp(activity)
Log.d("LAUNCHER", "Launching ${app.first} (user: ${app.second}) ${this.toString()}")
launch(app.first, app.second, activity, this.animationIn, this.animationOut)
}

View file

@ -4,7 +4,6 @@ import android.content.Intent
import android.content.res.Resources
import android.os.AsyncTask
import android.os.Bundle
import android.util.Log
import android.view.GestureDetector
import android.view.KeyEvent
import android.view.MotionEvent
@ -163,8 +162,6 @@ class HomeActivity: UIObject, AppCompatActivity(),
val width = displayMetrics!!.widthPixels
val height = displayMetrics!!.heightPixels
Log.i("LAUNCHER", "width: $width, height: $height, ${e1.x}, ${e1.y}, ${e2.x}, ${e2.y}")
val diffX = e1.x - e2.x
val diffY = e1.y - e2.y

View file

@ -14,6 +14,7 @@ import de.jrpie.android.launcher.preferences.theme.ColorTheme
*/
const val PREFERENCE_VERSION = 1
const val UNKNOWN_PREFERENCE_VERSION = -1
private const val TAG = "Launcher - Preferences"
private fun migrateStringPreference(oldPrefs: SharedPreferences, newPreferences: SharedPreferences.Editor, oldKey: String, newKey: String, default: String) {
@ -34,7 +35,7 @@ fun migratePreferencesToNewVersion(context: Context) {
// Check versions, make sure transitions between versions go well
PREFERENCE_VERSION -> { /* the version installed and used previously are the same */ }
UNKNOWN_PREFERENCE_VERSION -> { /* still using the old preferences file */
Log.i("Launcher", "Unknown preference version, trying to restore preferences from old version.")
Log.i(TAG, "Unknown preference version, trying to restore preferences from old version.")
val oldPrefs = context.getSharedPreferences(
@ -42,7 +43,7 @@ fun migratePreferencesToNewVersion(context: Context) {
Context.MODE_PRIVATE
)
if(!oldPrefs.contains("startedBefore")) {
Log.i("Launcher", "No old preferences found.")
Log.i(TAG, "No old preferences found.")
return
}
val newPrefs = LauncherPreferences.getSharedPreferences().edit()
@ -121,7 +122,7 @@ fun migratePreferencesToNewVersion(context: Context) {
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
Log.i("Launcher", "migration of preferences complete.")
Log.i(TAG, "migration of preferences complete.")
// show the new tutorial
// context.startActivity(Intent(context, TutorialActivity::class.java))
@ -131,7 +132,7 @@ fun migratePreferencesToNewVersion(context: Context) {
}
fun resetPreferences(context: Context) {
Log.i("Launcher", "resetting preferences")
Log.i(TAG, "resetting preferences")
LauncherPreferences.clear()
LauncherPreferences.internal().versionCode(PREFERENCE_VERSION)
val editor = LauncherPreferences.getSharedPreferences().edit()

View file

@ -11,7 +11,6 @@ import de.jrpie.android.launcher.list.ListActivity
import android.app.Activity
import android.content.Intent
import android.content.SharedPreferences
import android.util.Log
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView