Skip to content

Commit ca71b87

Browse files
Refactor: Remove SecurityService and FLAG_SECURE
This commit removes the `SecurityService.kt` file and its usage in `MainActivity.kt`. - The `SecurityService` object, which contained checks for debug builds (BuildConfig flag, manifest flag, attached debugger, and debug signature), has been deleted. - Consequently, the logic in `MainActivity.kt` that set `WindowManager.LayoutParams.FLAG_SECURE` based on `SecurityService.isDebugBuild()` has also been removed. Signed-off-by: CreativeCodeCat <wayne6324@gmail.com>
1 parent 167cdf5 commit ca71b87

File tree

2 files changed

+0
-69
lines changed

2 files changed

+0
-69
lines changed

app/src/main/java/com/github/droidworksstudio/mlauncher/MainActivity.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import android.os.Bundle
1212
import android.provider.OpenableColumns
1313
import android.provider.Settings
1414
import android.view.KeyEvent
15-
import android.view.WindowManager
1615
import android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
1716
import androidx.activity.OnBackPressedCallback
1817
import androidx.activity.result.ActivityResultLauncher
@@ -37,7 +36,6 @@ import com.github.droidworksstudio.mlauncher.helper.ismlauncherDefault
3736
import com.github.droidworksstudio.mlauncher.helper.showNavigationBar
3837
import com.github.droidworksstudio.mlauncher.helper.showStatusBar
3938
import com.github.droidworksstudio.mlauncher.helper.utils.AppReloader
40-
import com.github.droidworksstudio.mlauncher.services.SecurityService
4139
import com.github.droidworksstudio.mlauncher.ui.onboarding.OnboardingActivity
4240
import com.squareup.moshi.Moshi
4341
import com.squareup.moshi.Types
@@ -124,13 +122,6 @@ class MainActivity : AppCompatActivity() {
124122
override fun onCreate(savedInstanceState: Bundle?) {
125123
super.onCreate(savedInstanceState)
126124

127-
if (!SecurityService.isDebugBuild(this)) {
128-
window.setFlags(
129-
WindowManager.LayoutParams.FLAG_SECURE,
130-
WindowManager.LayoutParams.FLAG_SECURE
131-
)
132-
}
133-
134125
// Enables edge-to-edge mode
135126
WindowCompat.setDecorFitsSystemWindows(window, false)
136127

app/src/main/java/com/github/droidworksstudio/mlauncher/services/SecurityService.kt

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

0 commit comments

Comments
 (0)