Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
remove ; and use non null context
  • Loading branch information
reidbaker committed May 12, 2023
commit d6af6373b6c02ba4f6bd14969b8195c7acefca70
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ class BatteryPlusPlugin : MethodCallHandler, EventChannel.StreamHandler, Flutter
override fun onListen(arguments: Any?, events: EventSink) {
chargingStateChangeReceiver = createChargingStateChangeReceiver(events)
ContextCompat.registerReceiver(
applicationContext?,
applicationContext!,
chargingStateChangeReceiver,
IntentFilter(Intent.ACTION_BATTERY_CHANGED),
ContextCompat.RECEIVER_EXPORTED);
ContextCompat.RECEIVER_EXPORTED)
val status = getBatteryStatus()
publishBatteryStatus(events, status)
}
Expand Down