mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-22 22:11:27 +01:00
code cleanup
This commit is contained in:
parent
9f235200fe
commit
c1650fab84
9 changed files with 11 additions and 16 deletions
|
@ -67,7 +67,7 @@ class AppAction(private var appInfo: AppInfo) : Action {
|
|||
|
||||
override fun isAvailable(context: Context): Boolean {
|
||||
// check if app is installed
|
||||
return DetailedAppInfo.fromAppInfo(appInfo, context) != null;
|
||||
return DetailedAppInfo.fromAppInfo(appInfo, context) != null
|
||||
}
|
||||
|
||||
override fun bindToGesture(editor: SharedPreferences.Editor, id: String) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package de.jrpie.android.launcher.actions
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.admin.DeviceAdminReceiver
|
||||
import android.app.admin.DevicePolicyManager
|
||||
import android.content.ComponentName
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package de.jrpie.android.launcher.apps
|
||||
|
||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||
import java.util.*
|
||||
import java.util.Locale
|
||||
import kotlin.text.Regex.Companion.escapeReplacement
|
||||
|
||||
class AppFilter(
|
||||
|
@ -33,7 +33,7 @@ class AppFilter(
|
|||
return text.lowercase(Locale.ROOT).replace(disallowedCharsRegex, "")
|
||||
}
|
||||
if (search.isEmpty()) {
|
||||
return apps;
|
||||
return apps
|
||||
} else {
|
||||
val r: MutableList<DetailedAppInfo> = ArrayList()
|
||||
val appsSecondary: MutableList<DetailedAppInfo> = ArrayList()
|
||||
|
@ -49,7 +49,7 @@ class AppFilter(
|
|||
}
|
||||
r.addAll(appsSecondary)
|
||||
|
||||
return r;
|
||||
return r
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.app.Service
|
|||
import android.content.Context
|
||||
import android.content.pm.LauncherActivityInfo
|
||||
import android.content.pm.LauncherApps
|
||||
import android.util.Log
|
||||
import de.jrpie.android.launcher.getUserFromId
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,9 @@ import de.jrpie.android.launcher.preferences.migratePreferencesToNewVersion
|
|||
import de.jrpie.android.launcher.preferences.resetPreferences
|
||||
import de.jrpie.android.launcher.ui.tutorial.TutorialActivity
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
import java.util.Timer
|
||||
import kotlin.concurrent.fixedRateTimer
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
|
|
|
@ -261,12 +261,12 @@ class AppsRecyclerAdapter(
|
|||
}
|
||||
|
||||
fun setFavoritesVisibility(v: AppFilter.Companion.AppSetVisibility) {
|
||||
appFilter.favoritesVisibility = v;
|
||||
appFilter.favoritesVisibility = v
|
||||
updateAppsList()
|
||||
}
|
||||
|
||||
fun setHiddenAppsVisibility(v: AppFilter.Companion.AppSetVisibility) {
|
||||
appFilter.hiddenVisibility = v;
|
||||
appFilter.hiddenVisibility = v
|
||||
updateAppsList()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package de.jrpie.android.launcher.ui.settings
|
||||
|
||||
import android.animation.AnimatorListenerAdapter
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.graphics.Canvas
|
||||
|
@ -8,9 +7,6 @@ import android.graphics.Paint
|
|||
import android.graphics.Rect
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.view.animation.AccelerateInterpolator
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
import de.jrpie.android.launcher.preferences.LauncherPreferences
|
||||
|
||||
/*
|
||||
|
@ -47,7 +43,7 @@ class GestureAreaIndicatorOverlayView(context: Context?, attrs: AttributeSet?) :
|
|||
}
|
||||
|
||||
|
||||
constructor(context: Context) : this(context, null) { }
|
||||
constructor(context: Context) : this(context, null)
|
||||
|
||||
private val overlayPaint = Paint()
|
||||
init {
|
||||
|
|
|
@ -11,7 +11,6 @@ import android.view.ViewGroup
|
|||
import android.widget.Button
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<device-admin xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<device-admin>
|
||||
<uses-policies>
|
||||
<force-lock />
|
||||
</uses-policies>
|
||||
|
|
Loading…
Add table
Reference in a new issue