1 // Copyright 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.base; 6 7 import android.content.BroadcastReceiver; 8 import android.content.Context; 9 import android.content.Intent; 10 11 12 /** 13 * A BroadcastReceiver that listens to changes in power status and notifies 14 * PowerMonitor. 15 * It's instantiated by the framework via the application intent-filter 16 * declared in its manifest. 17 */ 18 public class PowerStatusReceiver extends BroadcastReceiver { 19 @Override onReceive(Context context, Intent intent)20 public void onReceive(Context context, Intent intent) { 21 PowerMonitor.onBatteryChargingChanged(intent); 22 } 23 } 24