-
-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Foldable support, Edge-to-Edge, and Fixes #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fcc28f4
6fbb698
86147f8
9fa8787
1b1e2ce
f788e90
38ac8be
3a23ed9
84ec545
af5c027
c09613d
59b9d82
351829b
c3354fc
b391937
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| .idea | ||
| .gradle | ||
| local.properties | ||
| build/ | ||
| .kotlin/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,12 @@ class BootReceiver : BroadcastReceiver() { | |
|
|
||
| override fun onReceive(context: Context, intent: Intent) { | ||
| if (intent.action == Intent.ACTION_BOOT_COMPLETED) { | ||
| VolumeService.start(context) | ||
| val prefs = context.getSharedPreferences(VolumeService.APP_SHARED_PREFERENCES, Context.MODE_PRIVATE) | ||
| val locks = prefs.getString(VolumeService.LOCKS_KEY, "") | ||
|
|
||
| if (!locks.isNullOrEmpty() && locks != "{}") { | ||
| VolumeService.start(context) | ||
| } | ||
|
Comment on lines
+12
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Find all references to LOCKS_KEY to understand usage patterns
rg -n 'LOCKS_KEY' --type kotlin -B 2 -A 2Repository: jonathanklee/VolumeLockr Length of output: 2392 Remove redundant null check. Since 🤖 Prompt for AI Agents |
||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| package com.klee.volumelockr.ui | ||
|
|
||
| import android.os.Bundle | ||
| import android.view.LayoutInflater | ||
| import android.view.View | ||
| import android.view.ViewGroup | ||
| import androidx.fragment.app.Fragment | ||
| import androidx.recyclerview.widget.GridLayoutManager | ||
| import androidx.recyclerview.widget.RecyclerView | ||
| import com.klee.volumelockr.R | ||
| import com.mikepenz.aboutlibraries.LibsBuilder | ||
|
|
||
| class AboutFragment : Fragment() { | ||
|
|
||
| override fun onCreateView( | ||
| inflater: LayoutInflater, | ||
| container: ViewGroup?, | ||
| savedInstanceState: Bundle? | ||
| ): View { | ||
| return inflater.inflate(R.layout.fragment_about, container, false) | ||
| } | ||
|
|
||
| override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
| super.onViewCreated(view, savedInstanceState) | ||
|
|
||
| if (savedInstanceState == null) { | ||
| val libsFragment = LibsBuilder() | ||
| .supportFragment() | ||
|
|
||
| childFragmentManager.beginTransaction() | ||
| .add(R.id.about_libs_container, libsFragment) | ||
| .commit() | ||
| } | ||
|
|
||
| view.post { | ||
| val recyclerView = findRecyclerView(view) | ||
| recyclerView?.let { rv -> | ||
| val spanCount = if (resources.getBoolean(R.bool.use_two_columns)) 2 else 1 | ||
| if (spanCount > 1) { | ||
| rv.layoutManager = GridLayoutManager(requireContext(), spanCount) | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private fun findRecyclerView(view: View): RecyclerView? { | ||
| if (view is RecyclerView) return view | ||
| if (view is ViewGroup) { | ||
| for (i in 0 until view.childCount) { | ||
| val child = view.getChildAt(i) | ||
| val rv = findRecyclerView(child) | ||
| if (rv != null) return rv | ||
| } | ||
| } | ||
| return null | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.klee.volumelockr.ui | ||
|
|
||
| import android.app.AlertDialog | ||
| import android.app.Dialog | ||
| import android.content.Intent | ||
| import android.os.Build | ||
| import android.os.Bundle | ||
| import android.provider.Settings | ||
| import androidx.annotation.RequiresApi | ||
| import androidx.fragment.app.DialogFragment | ||
| import com.klee.volumelockr.R | ||
|
|
||
| class PolicyAccessDialog : DialogFragment() { | ||
| companion object { | ||
| const val TAG = "PolicyAccessDialog" | ||
| } | ||
|
|
||
| @RequiresApi(Build.VERSION_CODES.M) | ||
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog = | ||
| AlertDialog.Builder(requireContext()) | ||
| .setMessage(getString(R.string.dialog_policy_access_title)) | ||
| .setCancelable(false) | ||
| .setPositiveButton(getString(R.string.dialog_allow)) { _, _ -> | ||
| startActivity(Intent(Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS)) | ||
| } | ||
| .create() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
androidx.security security-crypto latest stable version 1.1.0-alpha06 production ready💡 Result:
No — 1.1.0-alpha06 is an alpha (pre‑release) and not intended for production. The stable 1.1.0 release was published on July 30, 2025; prefer that (or a later stable) for production. Note: the security-crypto artifacts have been marked deprecated — consider following the deprecation guidance in the release notes. [1][2]
Sources:
[1] AndroidX Security release notes (shows 1.1.0 release on July 30, 2025 and alpha/rc history).
[2] AndroidX versions/all-channel & deprecation note for security-crypto.
🏁 Script executed:
Repository: jonathanklee/VolumeLockr
Length of output: 129
🏁 Script executed:
Repository: jonathanklee/VolumeLockr
Length of output: 387
🏁 Script executed:
Repository: jonathanklee/VolumeLockr
Length of output: 199
Upgrade security-crypto version and address library deprecation.
The dependency uses version
1.1.0-alpha06, an alpha pre-release. A stable version1.1.0has been available since July 30, 2025 and should be used for production.More importantly,
androidx.security:security-cryptohas been deprecated. Follow the deprecation guidance in the AndroidX Security release notes to migrate to the recommended alternative.Update
gradle/libs.versions.tomlline withsecurityCrypto = "1.1.0"at minimum, and plan migration away from the deprecated library.