From a19cf8b7f766fa86da42d270f13978e3e61f34cb Mon Sep 17 00:00:00 2001 From: Anurag <144598258+anuragkanojiya1@users.noreply.github.com> Date: Sat, 11 May 2024 20:00:18 +0530 Subject: [PATCH] Feat: Added intent for ACTION_POWER_USAGE_SUMMARY (#504) --- .../droidworksstudio/mlauncher/helper/BatteryReceiver.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/droidworksstudio/mlauncher/helper/BatteryReceiver.kt b/app/src/main/java/com/github/droidworksstudio/mlauncher/helper/BatteryReceiver.kt index 8ff70eaa..bbc41eff 100644 --- a/app/src/main/java/com/github/droidworksstudio/mlauncher/helper/BatteryReceiver.kt +++ b/app/src/main/java/com/github/droidworksstudio/mlauncher/helper/BatteryReceiver.kt @@ -73,7 +73,10 @@ class BatteryReceiver : BroadcastReceiver() { val textView = (contextBattery)?.findViewById(R.id.batteryText) textView?.text = "$batteryLevel%" - + textView?.setOnClickListener { + val powerUsageIntent = Intent(Intent.ACTION_POWER_USAGE_SUMMARY) + context.startActivity(powerUsageIntent) + } } }