Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: device/battery/android/java/src/org/chromium/device/battery/BatteryMonitorFactory.java

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.device.battery; 5 package org.chromium.device.battery;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.util.Log; 8 import android.util.Log;
9 9
10 import org.chromium.base.ThreadUtils; 10 import org.chromium.base.ThreadUtils;
11 import org.chromium.device.BatteryMonitor; 11 import org.chromium.device.BatteryMonitor;
12 import org.chromium.device.BatteryStatus; 12 import org.chromium.device.BatteryStatus;
13 import org.chromium.device.battery.BatteryStatusManager.BatteryStatusCallback; 13 import org.chromium.device.battery.BatteryStatusManager.BatteryStatusCallback;
14 import org.chromium.services.shell.InterfaceFactory; 14 import org.chromium.services.service_manager.InterfaceFactory;
15 15
16 import java.util.HashSet; 16 import java.util.HashSet;
17 17
18 /** 18 /**
19 * Factory that creates instances of BatteryMonitor implementations and notifies them about battery 19 * Factory that creates instances of BatteryMonitor implementations and notifies them about battery
20 * status changes. 20 * status changes.
21 */ 21 */
22 public class BatteryMonitorFactory implements InterfaceFactory<BatteryMonitor> { 22 public class BatteryMonitorFactory implements InterfaceFactory<BatteryMonitor> {
23 static final String TAG = "BatteryMonitorFactory"; 23 static final String TAG = "BatteryMonitorFactory";
24 24
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void unsubscribe(BatteryMonitorImpl monitor) { 62 void unsubscribe(BatteryMonitorImpl monitor) {
63 ThreadUtils.assertOnUiThread(); 63 ThreadUtils.assertOnUiThread();
64 64
65 assert mSubscribedMonitors.contains(monitor); 65 assert mSubscribedMonitors.contains(monitor);
66 mSubscribedMonitors.remove(monitor); 66 mSubscribedMonitors.remove(monitor);
67 if (mSubscribedMonitors.isEmpty()) { 67 if (mSubscribedMonitors.isEmpty()) {
68 mManager.stop(); 68 mManager.stop();
69 } 69 }
70 } 70 }
71 } 71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698