From 289f3cca27f1efaedc723adcfe8f375dfbe48eec Mon Sep 17 00:00:00 2001 From: kangyuri1114 Date: Sun, 31 Dec 2023 15:48:39 +0900 Subject: [PATCH 01/16] =?UTF-8?q?[feat]:=20=EB=84=98=EB=B2=84=ED=94=BC?= =?UTF-8?q?=EC=BB=A4=20=EC=BD=94=EB=93=9C=20=EC=9D=B4=EB=8F=99=20=ED=9B=84?= =?UTF-8?q?=20=EC=A0=91=EA=B7=BC=EA=B6=8C=ED=95=9C=20=ED=97=88=EC=9A=A9?= =?UTF-8?q?=EC=9A=A9=20=EC=98=A8=EB=B3=B4=EB=94=A9=20=EB=B7=B0=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/onboarding/OnBoardingActivity.kt | 4 ++++ .../src/main/res/layout/activity_on_boarding.xml | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt b/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt index 00e84cf4..c2c5dc70 100644 --- a/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt +++ b/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt @@ -11,6 +11,10 @@ class OnBoardingActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(binding.root) + + } + + private fun numberPickerTest() { binding.run { numberPicker.npCustomHours.minValue = 1 numberPicker.npCustomHours.maxValue = 6 diff --git a/feature/onboarding/src/main/res/layout/activity_on_boarding.xml b/feature/onboarding/src/main/res/layout/activity_on_boarding.xml index 4339e9b8..0f2fb988 100644 --- a/feature/onboarding/src/main/res/layout/activity_on_boarding.xml +++ b/feature/onboarding/src/main/res/layout/activity_on_boarding.xml @@ -6,11 +6,13 @@ xmlns:app="http://schemas.android.com/apk/res-auto" tools:context=".OnBoardingActivity"> - - + app:layout_constraintEnd_toEndOf="parent" + android:layout_marginBottom="30dp" + android:text="권한 허용하러 가기" + /> \ No newline at end of file From 4790d2914a02138fcb9a9c3b9128304e848b860e Mon Sep 17 00:00:00 2001 From: kangyuri1114 Date: Sun, 31 Dec 2023 15:49:20 +0900 Subject: [PATCH 02/16] =?UTF-8?q?[delete]:=20=EB=84=98=EB=B2=84=ED=94=BC?= =?UTF-8?q?=EC=BB=A4=20=EC=A3=BC=EC=84=9D=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hamyeonham/feature/onboarding/OnBoardingActivity.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt b/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt index c2c5dc70..9c2fb04b 100644 --- a/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt +++ b/feature/onboarding/src/main/java/com/hmh/hamyeonham/feature/onboarding/OnBoardingActivity.kt @@ -16,10 +16,10 @@ class OnBoardingActivity : AppCompatActivity() { private fun numberPickerTest() { binding.run { - numberPicker.npCustomHours.minValue = 1 - numberPicker.npCustomHours.maxValue = 6 - numberPicker.npCustomMinutes.minValue = 1 - numberPicker.npCustomMinutes.maxValue = 59 +// numberPicker.npCustomHours.minValue = 1 +// numberPicker.npCustomHours.maxValue = 6 +// numberPicker.npCustomMinutes.minValue = 1 +// numberPicker.npCustomMinutes.maxValue = 59 } } } From 1b23b555bc7e865a9f071358c149711c8648b45e Mon Sep 17 00:00:00 2001 From: kangyuri1114 Date: Mon, 1 Jan 2024 02:57:51 +0900 Subject: [PATCH 03/16] =?UTF-8?q?[feat]:=20=EC=82=AC=EC=9A=A9=20=EA=B8=B0?= =?UTF-8?q?=EB=A1=9D=EC=97=90=20=EC=95=A1=EC=84=B8=EC=8A=A4=20=ED=97=88?= =?UTF-8?q?=EC=9A=A9=EC=9D=B4=20=EB=90=98=EC=96=B4=EC=9E=88=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=80=20=EA=B2=BD=EC=9A=B0=20=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=ED=97=88=EC=9A=A9=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=20=ED=95=98=EB=8A=94=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onboarding/src/main/AndroidManifest.xml | 2 + .../feature/onboarding/OnBoardingActivity.kt | 51 +++++++++++++++++++ .../main/res/layout/activity_on_boarding.xml | 1 + .../res/layout/dialog_numberpicker_custom.xml | 1 - 4 files changed, 54 insertions(+), 1 deletion(-) diff --git a/feature/onboarding/src/main/AndroidManifest.xml b/feature/onboarding/src/main/AndroidManifest.xml index 0a100119..ba938b68 100644 --- a/feature/onboarding/src/main/AndroidManifest.xml +++ b/feature/onboarding/src/main/AndroidManifest.xml @@ -1,6 +1,8 @@ + + = Build.VERSION_CODES.Q) { + appOps.unsafeCheckOpNoThrow( + AppOpsManager.OPSTR_GET_USAGE_STATS, + android.os.Process.myUid(), + packageName, + ) + } else { + appOps.checkOpNoThrow( + AppOpsManager.OPSTR_GET_USAGE_STATS, + android.os.Process.myUid(), + packageName, + ) + } + return mode == AppOpsManager.MODE_ALLOWED + } + private fun isAccessibilityServiceEnabled(service: Class): Boolean { + val expectedId = packageName + "/" + service.canonicalName + val enabledServicesSetting = Settings.Secure.getString( + contentResolver, + Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, + ) ?: return false + Log.d("TAG", "enabledServicesSetting: $enabledServicesSetting") + return enabledServicesSetting.split(':').any { it.equals(expectedId, ignoreCase = true) } } private fun numberPickerTest() { diff --git a/feature/onboarding/src/main/res/layout/activity_on_boarding.xml b/feature/onboarding/src/main/res/layout/activity_on_boarding.xml index 0f2fb988..191bd5b1 100644 --- a/feature/onboarding/src/main/res/layout/activity_on_boarding.xml +++ b/feature/onboarding/src/main/res/layout/activity_on_boarding.xml @@ -7,6 +7,7 @@ tools:context=".OnBoardingActivity">