fix: 설정 화면 진입 시 크래시 수정
- AppDatabase.kt 누락된 닫는 괄호 추가 - PermissionHelper.canInstallUnknownApps() SecurityException 처리 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -61,4 +61,5 @@ abstract class AppDatabase : RoomDatabase() {
|
||||
db.execSQL("ALTER TABLE hot_deals ADD COLUMN isFavorite INTEGER NOT NULL DEFAULT 0")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,12 @@ object PermissionHelper {
|
||||
*/
|
||||
fun canInstallUnknownApps(context: Context): Boolean {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
try {
|
||||
context.packageManager.canRequestPackageInstalls()
|
||||
} catch (e: SecurityException) {
|
||||
// REQUEST_INSTALL_PACKAGES 권한이 없으면 false 반환
|
||||
false
|
||||
}
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user