There's a bug here because you don't also set this.batteryOverlay to null.  
If the battery is in shutdown state, you see the overlay. Then if you plug in the phone, the overlay goes away, but this.batteryOverlay is still set.  So when you unplug and the phone goes back into shutdown state, we try to display the overlay again, but since it is non-null, we end up trying to destroy it again. But since it is already destroyed, we get an exception (and a message in the logcat) and nothing appears.

So you'll need to fix that.

I'd say that part of the reason for this bug is that you have this other trivial destroyOverlay method you're calling.  Get rid of that method and manage the view directly and your code will be clearer.
```
if (this.batteryOverlay) {
  this.batteryOverlay.destroy();
  this.batteryOverlay = null;
}
```