Implement screen on hack for wireless chargers.

We can't accurately detect whether the device is resting
on a wireless charger unless it is actually charging.
So we need to tweak the screen on when plugged / unplugged
policy accordingly to avoid spurious wakeups.

Bug: 7234284
Change-Id: I624b559e2e92b8813b12090bc20eca5f5158997e
diff --git a/services/java/com/android/server/BatteryService.java b/services/java/com/android/server/BatteryService.java
index 4b20a53..0045f4a 100644
--- a/services/java/com/android/server/BatteryService.java
+++ b/services/java/com/android/server/BatteryService.java
@@ -197,6 +197,15 @@
     }
 
     /**
+     * Returns the current plug type.
+     */
+    public int getPlugType() {
+        synchronized (mLock) {
+            return mPlugType;
+        }
+    }
+
+    /**
      * Returns battery level as a percentage.
      */
     public int getBatteryLevel() {