Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ plugins {
android {
namespace 'com.chronoscoper.android.securescreen'

compileSdk = 34
compileSdk = 36
defaultConfig {
applicationId "com.chronoscoper.android.securescreen"
minSdk 23
targetSdk 34
targetSdk 35
versionCode 18
versionName "1.8"
resourceConfigurations += ['ja']
Expand All @@ -32,11 +32,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = "17"
}
lint {
checkReleaseBuilds false
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2024 Koki Fukuda
* Copyright 2019-2025 Koki Fukuda
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,6 @@ import android.app.Application
import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.os.Build

class App : Application() {
Expand All @@ -30,7 +29,7 @@ class App : Application() {
override fun onCreate() {
super.onCreate()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
(getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager)
(getSystemService(NOTIFICATION_SERVICE) as NotificationManager)
.createNotificationChannel(
NotificationChannel(
NC_DEFAULT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2024 Koki Fukuda
* Copyright 2017-2025 Koki Fukuda
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2024 Koki Fukuda
* Copyright 2017-2025 Koki Fukuda
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.chronoscoper.android.securescreen

import android.content.Intent
import android.os.Build
import android.os.IBinder
import android.service.quicksettings.TileService
import androidx.annotation.RequiresApi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2024 Koki Fukuda
* Copyright 2017-2025 Koki Fukuda
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,9 +15,7 @@
*/
package com.chronoscoper.android.securescreen

import android.app.Activity
import android.app.ActivityManager
import android.content.Context
import android.os.Build
import android.os.Bundle
import android.os.Handler
Expand All @@ -39,15 +37,16 @@ class SecureActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
binding = ActivitySecureBinding.inflate(layoutInflater)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
@Suppress("DEPRECATION")
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out)
} else {
overrideActivityTransition(
Activity.OVERRIDE_TRANSITION_OPEN,
OVERRIDE_TRANSITION_OPEN,
android.R.anim.fade_in,
android.R.anim.fade_out
)
overrideActivityTransition(
Activity.OVERRIDE_TRANSITION_CLOSE,
OVERRIDE_TRANSITION_CLOSE,
android.R.anim.fade_in,
android.R.anim.fade_out
)
Expand Down Expand Up @@ -111,7 +110,7 @@ class SecureActivity : AppCompatActivity() {
}

private fun isInLockTask(): Boolean {
val activityManager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
val activityManager = getSystemService(ACTIVITY_SERVICE) as ActivityManager
return activityManager.lockTaskModeState != ActivityManager.LOCK_TASK_MODE_NONE
}

Expand All @@ -127,6 +126,7 @@ class SecureActivity : AppCompatActivity() {
override fun finish() {
super.finish()
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
@Suppress("DEPRECATION")
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2024 Koki Fukuda
* Copyright 2017-2025 Koki Fukuda
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,4 +83,4 @@ class SecureScreenNotification {
}

}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2024 Koki Fukuda
* Copyright 2017-2025 Koki Fukuda
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,6 +34,8 @@ import androidx.core.content.ContextCompat
import androidx.preference.PreferenceManager
import com.chronoscoper.android.securescreen.databinding.ActivitySettingsBinding
import com.chronoscoper.library.licenseviewer.LicenseViewer
import androidx.core.net.toUri
import androidx.core.content.edit

class SettingsActivity : AppCompatActivity() {
companion object {
Expand Down Expand Up @@ -146,21 +148,21 @@ class SettingsActivity : AppCompatActivity() {
private fun setupStartOnBootSwitch() = binding.startOnBoot.apply {
isChecked = preferences.getBoolean("start_on_boot", false)
setOnCheckedChangeListener { _, isChecked ->
preferences.edit().putBoolean("start_on_boot", isChecked).apply()
preferences.edit { putBoolean("start_on_boot", isChecked) }
}
}

private fun setupFinishOnBackPressedSwitch() = binding.finishOnBackPressed.apply {
isChecked = preferences.getBoolean("finish_on_back_pressed", false)
setOnCheckedChangeListener { _, isChecked ->
preferences.edit().putBoolean("finish_on_back_pressed", isChecked).apply()
preferences.edit { putBoolean("finish_on_back_pressed", isChecked) }
}
}

private fun setupFinishButtonSwitch() = binding.finishButton.apply {
isChecked = preferences.getBoolean("finish_button", true)
setOnCheckedChangeListener { _, isChecked ->
preferences.edit().putBoolean("finish_button", isChecked).apply()
preferences.edit { putBoolean("finish_button", isChecked) }
}
}

Expand All @@ -169,21 +171,21 @@ class SettingsActivity : AppCompatActivity() {
try {
startActivity(
Intent(
Intent.ACTION_VIEW, Uri.parse(GITHUB_REPO_URL)
Intent.ACTION_VIEW, GITHUB_REPO_URL.toUri()
)
)
} catch (ignore: ActivityNotFoundException) {
} catch (_: ActivityNotFoundException) {
}
}
binding.version.text = BuildConfig.VERSION_NAME
binding.developer.setOnClickListener {
try {
startActivity(
Intent(
Intent.ACTION_VIEW, Uri.parse(DEVELOPER_WEB_ADDRESS)
Intent.ACTION_VIEW, DEVELOPER_WEB_ADDRESS.toUri()
)
)
} catch (ignore: ActivityNotFoundException) {
} catch (_: ActivityNotFoundException) {
}
}
binding.ossLicense.setOnClickListener {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/animator/card_elevation_animator.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/card_button.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/card_button_deactivate.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/finish_button.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_secure.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2017-2024 Koki Fukuda
Copyright 2017-2025 Koki Fukuda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[versions]
agp = "8.5.2"
appcompat = "1.7.0"
agp = "8.12.0"
appcompat = "1.7.1"
cardview = "1.0.0"
kotlin = "1.9.0"
kotlin = "2.2.0"
junit = "4.13.2"
espressoCore = "3.6.1"
kotlinStdlibJdk7 = "1.9.20"
espressoCore = "3.7.0"
kotlinStdlibJdk7 = "2.1.20"
licenseviewer = "1.6.5"
material = "1.12.0"
preferenceKtx = "1.2.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip