Skip to content

Commit

Permalink
feat: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
agronick committed Dec 15, 2023
1 parent bef456e commit be6eaae
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 30 deletions.
11 changes: 7 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.agronick.launcher">

<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />


<application
android:name="com.agronick.launcher.Launcher"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand All @@ -28,12 +31,12 @@

<activity
android:name=".MainActivity"
android:launchMode="singleInstance"
android:theme="@style/Theme.Wearable.Modal"
android:exported="true"
android:taskAffinity="com.agronick.launcher">
android:taskAffinity="com.agronick.launcher"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/agronick/launcher/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class App(val pkgInfo: PInfo, var size: Int) {
var left = 0.0f
var top = 0.0f
var hidden = false
public var assignedPos: Pair<Int, Int>? = null
var assignedPos: Pair<Int, Int>? = null
private var lastCircle: Circle? = null

fun copy(): App {
Expand Down Expand Up @@ -84,6 +84,7 @@ class App(val pkgInfo: PInfo, var size: Int) {
val F = R - kotlin.math.sqrt(R * R - lAB * lAB * 0.25f)
Vector2(mAB.x - uAB.y * F, mAB.y + uAB.x * F)
}

else -> null
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/agronick/launcher/AppListProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.io.FileReader
import java.io.FileWriter


class AppListProvider(val appList: List<PInfo>, context: Context) {
class AppListProvider(appList: List<PInfo>, context: Context) {

val positions = HashMap<Int, HashMap<Int, PInfo?>>().withDefault { HashMap() }
val filePath = "${context.dataDir}/appPositions.json"
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/java/com/agronick/launcher/Container.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ class Container(val appList: AppListProvider, density: Float) {

private var equalizerOffset = 1.1f

companion object {
private const val tag = "Container"
}

init {
/*
Tries to set up a rough circle shape
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/java/com/agronick/launcher/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ class MainActivity : Activity(), GestureDetector.OnGestureListener {
}

override fun onLongPress(e: MotionEvent) {
if (e != null) {
mainView.handleLongPress(e)
}
mainView.handleLongPress(e)
}

override fun onFling(
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/agronick/launcher/Reorderer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.agronick.launcher
import android.animation.AnimatorSet
import android.animation.ValueAnimator
import androidx.core.animation.doOnEnd
import kotlinx.coroutines.GlobalScope
import util.geometry.Circle
import util.geometry.Vector2

Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/agronick/launcher/StaticValues.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ class StaticValues {
val durationRise = 300L
val durationSwap = 300L
val durationOpen = 600L
val tag = "Flattery"
}
}
15 changes: 0 additions & 15 deletions app/src/main/res/layout/activity_main.xml

This file was deleted.

0 comments on commit be6eaae

Please sign in to comment.