Skip to content

Commit 59ef76a

Browse files
committed
feature: remove shaker mode
1 parent 7ec5adc commit 59ef76a

8 files changed

Lines changed: 1 addition & 96 deletions

File tree

panel-core/src/main/kotlin/com/redmadrobot/debug/core/DebugPanel.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ public object DebugPanel {
2121
public fun initialize(
2222
application: Application,
2323
plugins: List<Plugin>,
24-
config: DebugPanelConfig = DebugPanelConfig.defaultConfig
2524
) {
2625
createDebugPanelInstance(application, plugins)
27-
ApplicationLifecycleHandler(application, config.shakerMode).start()
26+
ApplicationLifecycleHandler(application).start()
2827
}
2928

3029
public fun subscribeToEvents(lifecycleOwner: LifecycleOwner, onEvent: (DebugEvent) -> Unit) {

panel-core/src/main/kotlin/com/redmadrobot/debug/core/DebugPanelConfig.kt

Lines changed: 0 additions & 9 deletions
This file was deleted.

panel-core/src/main/kotlin/com/redmadrobot/debug/core/inapp/shake/ShakeController.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

panel-core/src/main/kotlin/com/redmadrobot/debug/core/inapp/shake/ShakeListener.kt

Lines changed: 0 additions & 38 deletions
This file was deleted.

panel-core/src/main/kotlin/com/redmadrobot/debug/core/util/ApplicationLifecycleHandler.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,18 @@ import android.content.BroadcastReceiver
66
import android.content.IntentFilter
77
import androidx.activity.ComponentActivity
88
import androidx.core.content.ContextCompat
9-
import com.redmadrobot.debug.core.inapp.shake.ShakeController
109
import timber.log.Timber
1110

1211
internal class ApplicationLifecycleHandler(
1312
private val application: Application,
14-
private val shakerMode: Boolean,
1513
) {
1614
// open Activity counter
1715
private var openActivityCount = 0
1816

19-
private var shakeController: ShakeController? = null
2017
private var debugPanelBroadcastReceiver: BroadcastReceiver? = null
2118
private val debugPanelNotification = DebugPanelNotification(application.applicationContext)
2219

2320
fun start() {
24-
if (shakerMode) {
25-
shakeController = ShakeController(application.applicationContext)
26-
}
2721
registerActivityLifecycleCallback()
2822
}
2923

@@ -34,8 +28,6 @@ internal class ApplicationLifecycleHandler(
3428
if (openActivityCount == 0) onAppResumed()
3529
++openActivityCount
3630

37-
shakeController?.register(activity)
38-
3931
// register BroadcastReceiver for debug panel inner actions
4032
debugPanelBroadcastReceiver = DebugPanelBroadcastReceiver(activity)
4133
val filter = IntentFilter(DebugPanelBroadcastReceiver.ACTION_OPEN_DEBUG_PANEL)
@@ -61,7 +53,6 @@ internal class ApplicationLifecycleHandler(
6153

6254
private fun onAppPaused() {
6355
debugPanelNotification.hide()
64-
shakeController?.unregister()
6556
}
6657

6758
private fun onAppResumed() {

panel-no-op/src/main/kotlin/com/redmadrobot/debug/noop/core/DebugPanel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ object DebugPanel {
1313
fun initialize(
1414
application: Application,
1515
plugins: List<Any>,
16-
config: DebugPanelConfig = DebugPanelConfig.defaultConfig
1716
) = Unit
1817

1918
fun subscribeToEvents(lifecycleOwner: LifecycleOwner, onEvent: (DebugEvent) -> Unit) = Unit

panel-no-op/src/main/kotlin/com/redmadrobot/debug/noop/core/DebugPanelConfig.kt

Lines changed: 0 additions & 9 deletions
This file was deleted.

sample/src/main/kotlin/com/redmadrobot/debug_sample/App.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.redmadrobot.debug_sample
22

33
import android.app.Application
44
import com.redmadrobot.debug.core.DebugPanel
5-
import com.redmadrobot.debug.core.DebugPanelConfig
65
import com.redmadrobot.debug.plugin.aboutapp.AboutAppPlugin
76
import com.redmadrobot.debug.plugin.konfeature.KonfeatureDebugPanelInterceptor
87
import com.redmadrobot.debug.plugin.konfeature.KonfeaturePlugin
@@ -19,7 +18,6 @@ class App : Application() {
1918

2019
DebugPanel.initialize(
2120
application = this,
22-
config = DebugPanelConfig(shakerMode = false),
2321
plugins = listOf(
2422
ServersPlugin(
2523
preInstalledServers = DebugServersProvider().provideData()

0 commit comments

Comments
 (0)