Skip to content

Commit

Permalink
Fixed dock icons not updating, added progress notifications, moved st…
Browse files Browse the repository at this point in the history
…uff around
  • Loading branch information
zaguragit committed Mar 10, 2021
1 parent adc7c3d commit f37263f
Show file tree
Hide file tree
Showing 40 changed files with 710 additions and 534 deletions.
63 changes: 16 additions & 47 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,6 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/hometheme">
<!--
<meta-data
android:name="xyz.paphonb.quickstepswitcher.minSdk"
android:value="29"/>
<meta-data
android:name="xyz.paphonb.quickstepswitcher.maxSdk"
android:value="29"/>
<service
android:name="posidon.launcher.external.quickstep.QuickStepService"
android:permission="android.permission.STATUS_BAR_SERVICE"
android:directBootAware="true"
tools:targetApi="q">
<intent-filter>
<action android:name="android.intent.action.QUICKSTEP_SERVICE" />
</intent-filter>
</service>
<activity android:name="posidon.launcher.external.quickstep.QuickStepActivity"
android:exported="true"
android:excludeFromRecents="true"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:screenOrientation="unspecified"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize"
tools:targetApi="q"/>-->

<receiver android:name=".external.widgets.ClockWidget" android:label="Minimal date">
<intent-filter><action android:name="android.appwidget.action.APPWIDGET_UPDATE" /></intent-filter>
Expand Down Expand Up @@ -117,7 +90,7 @@
android:theme="@style/hometheme" />

<activity
android:name=".customizations.Customizations"
android:name=".customizations.settingScreens.Customizations"
android:icon="@drawable/customizations"
android:label="@string/settings_title"
android:taskAffinity="posidon.launcher.Customizations"
Expand All @@ -128,7 +101,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomDrawer"
android:name=".customizations.settingScreens.CustomDrawer"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -137,7 +110,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomHome"
android:name=".customizations.settingScreens.CustomHome"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -146,7 +119,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomNews"
android:name=".customizations.settingScreens.CustomNews"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -155,7 +128,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomNotifications"
android:name=".customizations.settingScreens.CustomNotifications"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -164,7 +137,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomDock"
android:name=".customizations.settingScreens.CustomDock"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -181,7 +154,7 @@
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />
<activity
android:name=".customizations.CustomFolders"
android:name=".customizations.settingScreens.CustomFolders"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -190,7 +163,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomSearch"
android:name=".customizations.settingScreens.CustomSearch"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -199,7 +172,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomTheme"
android:name=".customizations.settingScreens.CustomTheme"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -208,7 +181,7 @@
</intent-filter>
</activity>
<activity
android:name=".customizations.CustomGestures"
android:name=".customizations.settingScreens.CustomGestures"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings">
<intent-filter>
Expand All @@ -221,27 +194,23 @@
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />
<activity
android:name=".customizations.CustomHiddenApps"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />
<activity
android:name=".customizations.CustomHiddenAppNotifications"
android:name=".customizations.settingScreens.CustomHiddenApps"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />
<activity
android:name=".customizations.CustomOther"
android:name=".customizations.settingScreens.CustomHiddenAppNotifications"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />
<activity
android:name=".customizations.CustomQuickStep"
android:name=".customizations.settingScreens.CustomOther"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />
<activity
android:name=".customizations.CustomDev"
android:name=".customizations.settingScreens.CustomDev"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />
<activity
android:name=".customizations.About"
android:name=".customizations.settingScreens.About"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/settings" />

Expand Down Expand Up @@ -336,7 +305,7 @@
android:theme="@style/settings"/>


<activity android:name=".items.users.CustomAppIcon" android:configChanges="keyboardHidden|screenSize|orientation" />
<activity android:name=".items.users.customAppIcon.CustomAppIcon" android:configChanges="keyboardHidden|screenSize|orientation" />
<meta-data android:name="preloaded_fonts" android:resource="@array/preloaded_fonts" />
</application>
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/java/posidon/launcher/LauncherMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import android.view.Gravity
import android.view.View
import android.view.Window
import android.view.animation.PathInterpolator
import posidon.launcher.customizations.Customizations
import posidon.launcher.customizations.settingScreens.Customizations
import posidon.launcher.external.Kustom
import posidon.launcher.feed.order.FeedOrderActivity
import posidon.launcher.storage.Settings
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.app.Activity
import android.app.ActivityOptions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.os.Bundle
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.os.Bundle
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.os.Bundle
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.os.Bundle
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.os.Bundle
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.os.Build
import posidon.launcher.customizations.settingScreens.general.AppTickingActivity
import posidon.launcher.items.App
import posidon.launcher.storage.Settings
import posidon.launcher.tools.Sort
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.content.Context
import android.content.pm.LauncherApps
import android.os.UserManager
import posidon.launcher.Home
import posidon.launcher.customizations.settingScreens.general.AppTickingActivity
import posidon.launcher.items.App
import posidon.launcher.storage.Settings
import posidon.launcher.tools.Sort
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.content.Intent
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.content.Intent
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.content.Intent
import android.os.Bundle
Expand All @@ -21,8 +21,12 @@ class CustomNotifications : AppCompatActivity() {
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS)
findViewById<View>(R.id.settings).setPadding(0, 0, 0, Tools.navbarHeight)

findViewById<Spinner>(R.id.notificationGrouping).data = resources.getStringArray(R.array.notificationGrouping)
findViewById<Spinner>(R.id.notificationGrouping).selectionI = when (Settings["notifications:groupingType", "os"]) { "os" -> 0; "byApp" -> 1; else -> 2 }
findViewById<Spinner>(R.id.notificationGrouping).run {
data = resources.getStringArray(R.array.notificationGrouping)
selectionI = when (Settings["notifications:groupingType", "os"]) {
"os" -> 0; "byApp" -> 1; else -> 2
}
}

Global.customized = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.app.Activity
import android.content.ComponentName
Expand All @@ -12,6 +12,7 @@ import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import posidon.launcher.Global
import posidon.launcher.R
import posidon.launcher.customizations.FakeLauncherActivity
import posidon.launcher.storage.Settings
import posidon.launcher.tools.Tools
import posidon.launcher.tools.applyFontSetting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.os.Bundle
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.app.Dialog
import android.content.Intent
Expand All @@ -12,6 +12,7 @@ import androidx.appcompat.app.AppCompatActivity
import posidon.launcher.Global
import posidon.launcher.Home
import posidon.launcher.R
import posidon.launcher.customizations.IconPackPicker
import posidon.launcher.storage.Settings
import posidon.launcher.tools.Tools
import posidon.launcher.tools.applyFontSetting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens

import android.app.ActivityOptions
import android.content.Intent
Expand Down Expand Up @@ -45,7 +45,6 @@ class Customizations : AppCompatActivity() {
fun openFolders (v: View) = startActivity(Intent(this, CustomFolders ::class.java))
fun openTheme (v: View) = startActivity(Intent(this, CustomTheme ::class.java))
fun openGestures(v: View) = startActivity(Intent(this, CustomGestures ::class.java))
fun openQStep (v: View) = startActivity(Intent(this, CustomQuickStep ::class.java))
fun openOther (v: View) = startActivity(Intent(this, CustomOther ::class.java))
fun openDev (v: View) = startActivity(Intent(this, CustomDev ::class.java))
fun openAbout (v: View) = startActivity(Intent(this, About ::class.java))
Expand Down Expand Up @@ -77,8 +76,8 @@ class Customizations : AppCompatActivity() {
override fun onResume() {
super.onResume()
findViewById<View>(R.id.devoptions).visibility =
if (Settings["dev:enabled", false]) View.VISIBLE
else View.GONE
if (Settings["dev:enabled", false]) View.VISIBLE
else View.GONE
cardThing()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package posidon.launcher.customizations
package posidon.launcher.customizations.settingScreens.general

import android.os.Bundle
import android.text.Editable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import android.app.PendingIntent
import android.graphics.drawable.Drawable

class Notification(
val title: CharSequence?,
val text: CharSequence?,
val isSummary: Boolean,
val bigPic: Drawable?,
val icon: Drawable?,
val actions: Array<Notification.Action>?,
private val contentIntent: PendingIntent?,
val key: String,
val progress: Int
val title: CharSequence?,
val text: CharSequence?,
val isSummary: Boolean,
val bigPic: Drawable?,
val icon: Drawable?,
val actions: Array<Notification.Action>?,
private val contentIntent: PendingIntent?,
val key: String,
val progress: Float
) {
fun open() {
try { contentIntent?.send() }
Expand All @@ -40,7 +40,7 @@ class Notification(
result = 31 * result + (actions?.contentHashCode() ?: 0)
result = 31 * result + (contentIntent?.hashCode() ?: 0)
result = 31 * result + key.hashCode()
result = 31 * result + progress
result = 31 * result + progress.toInt()
return result
}
}
Loading

0 comments on commit f37263f

Please sign in to comment.