Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Refactor: cleaned up HomeFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
CreativeCodeCat committed Nov 21, 2024
1 parent 967513d commit 1aae3bd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,12 @@ class HomeFragment : Fragment(), View.OnClickListener, View.OnLongClickListener
requireActivity().runOnUiThread {
try {
deviceManager.lockNow()
} catch (e: SecurityException) {
} catch (_: SecurityException) {
showToastLong(
requireContext(),
"App does not have the permission to lock the device"
)
} catch (e: Exception) {
} catch (_: Exception) {
showToastLong(
requireContext(),
"mLauncher failed to lock device.\nPlease check your app settings."
Expand Down

0 comments on commit 1aae3bd

Please sign in to comment.