diff options
Diffstat (limited to 'core/java/android/app/ContextImpl.java')
-rw-r--r-- | core/java/android/app/ContextImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index 1c02102..f444680 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -82,6 +82,7 @@ import android.net.wifi.hotspot.WifiHotspotManager; import android.net.wifi.p2p.IWifiP2pManager; import android.net.wifi.p2p.WifiP2pManager; import android.nfc.NfcManager; +import android.os.BatteryManager; import android.os.Binder; import android.os.Bundle; import android.os.Debug; @@ -404,6 +405,11 @@ class ContextImpl extends Context { return new DownloadManager(ctx.getContentResolver(), ctx.getPackageName()); }}); + registerService(BATTERY_SERVICE, new ServiceFetcher() { + public Object createService(ContextImpl ctx) { + return new BatteryManager(); + }}); + registerService(NFC_SERVICE, new ServiceFetcher() { public Object createService(ContextImpl ctx) { return new NfcManager(ctx); |