From 9dd03cd82e098ad8dfc5afec2681bbdab2940ee0 Mon Sep 17 00:00:00 2001 From: Anurag Kanojiya Date: Sat, 11 May 2024 18:22:48 +0530 Subject: [PATCH] Added intent for ACTION_POWER_USAGE_SUMMARY --- .../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) + } } }