diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-20 09:06:22 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-20 09:06:22 -0700 |
commit | a5ca3425f9cbb930dc62559893590432ed29c961 (patch) | |
tree | 76aa5e00c32b01348aefcb667927751d31019135 | |
parent | eb2c314b4d31c44af8a27ef51120b33290e65837 (diff) | |
parent | 58ff0217a617d5b03d18f0ef532f254f8ba6de2b (diff) | |
download | frameworks_base-a5ca3425f9cbb930dc62559893590432ed29c961.zip frameworks_base-a5ca3425f9cbb930dc62559893590432ed29c961.tar.gz frameworks_base-a5ca3425f9cbb930dc62559893590432ed29c961.tar.bz2 |
Merge change 2017 into donut
* changes:
Increment BatteryStatsImpl's VERSION. That'll make it stop trying to interpret older records with the new format. Also applied other comments involving name changes to remove un-needed 'Wifi' labels in WifiManager API, etc.
-rw-r--r-- | core/java/com/android/internal/os/BatteryStatsImpl.java | 2 | ||||
-rw-r--r-- | services/java/com/android/server/WifiService.java | 28 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/IWifiManager.aidl | 6 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiManager.java | 16 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 4 |
5 files changed, 28 insertions, 28 deletions
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java index edc9ec9..bf9bc4e 100644 --- a/core/java/com/android/internal/os/BatteryStatsImpl.java +++ b/core/java/com/android/internal/os/BatteryStatsImpl.java @@ -55,7 +55,7 @@ public final class BatteryStatsImpl extends BatteryStats { private static final int MAGIC = 0xBA757475; // 'BATSTATS' // Current on-disk Parcel version - private static final int VERSION = 34; + private static final int VERSION = 35; private final File mFile; private final File mBackupFile; diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java index 90ab270..5fa8701 100644 --- a/services/java/com/android/server/WifiService.java +++ b/services/java/com/android/server/WifiService.java @@ -96,8 +96,8 @@ public class WifiService extends IWifiManager.Stub { private int mScanLocksAcquired; private int mScanLocksReleased; - private final List<WifiMulticaster> mMulticasters = - new ArrayList<WifiMulticaster>(); + private final List<Multicaster> mMulticasters = + new ArrayList<Multicaster>(); private int mMulticastEnabled; private int mMulticastDisabled; @@ -1744,7 +1744,7 @@ public class WifiService extends IWifiManager.Stub { } } - private class WifiLock extends WifiDeathRecipient { + private class WifiLock extends DeathRecipient { WifiLock(int lockMode, String tag, IBinder binder) { super(lockMode, tag, binder); } @@ -1887,13 +1887,13 @@ public class WifiService extends IWifiManager.Stub { return hadLock; } - private abstract class WifiDeathRecipient + private abstract class DeathRecipient implements IBinder.DeathRecipient { String mTag; int mMode; IBinder mBinder; - WifiDeathRecipient(int mode, String tag, IBinder binder) { + DeathRecipient(int mode, String tag, IBinder binder) { super(); mTag = tag; mMode = mode; @@ -1906,13 +1906,13 @@ public class WifiService extends IWifiManager.Stub { } } - private class WifiMulticaster extends WifiDeathRecipient { - WifiMulticaster(String tag, IBinder binder) { + private class Multicaster extends DeathRecipient { + Multicaster(String tag, IBinder binder) { super(Binder.getCallingUid(), tag, binder); } public void binderDied() { - Log.e(TAG, "WifiMulticaster binderDied"); + Log.e(TAG, "Multicaster binderDied"); synchronized (mMulticasters) { int i = mMulticasters.indexOf(this); if (i != -1) { @@ -1922,7 +1922,7 @@ public class WifiService extends IWifiManager.Stub { } public String toString() { - return "WifiMulticaster{" + mTag + " binder=" + mBinder + "}"; + return "Multicaster{" + mTag + " binder=" + mBinder + "}"; } public int getUid() { @@ -1930,12 +1930,12 @@ public class WifiService extends IWifiManager.Stub { } } - public void enableWifiMulticast(IBinder binder, String tag) { + public void enableMulticast(IBinder binder, String tag) { enforceChangePermission(); synchronized (mMulticasters) { mMulticastEnabled++; - mMulticasters.add(new WifiMulticaster(tag, binder)); + mMulticasters.add(new Multicaster(tag, binder)); // Note that we could call stopPacketFiltering only when // our new size == 1 (first call), but this function won't // be called often and by making the stopPacket call each @@ -1953,7 +1953,7 @@ public class WifiService extends IWifiManager.Stub { } } - public void disableWifiMulticast() { + public void disableMulticast() { enforceChangePermission(); int uid = Binder.getCallingUid(); @@ -1961,7 +1961,7 @@ public class WifiService extends IWifiManager.Stub { mMulticastDisabled++; int size = mMulticasters.size(); for (int i = size - 1; i >= 0; i--) { - WifiMulticaster m = mMulticasters.get(i); + Multicaster m = mMulticasters.get(i); if ((m != null) && (m.getUid() == uid)) { removeMulticasterLocked(i, uid); } @@ -1985,7 +1985,7 @@ public class WifiService extends IWifiManager.Stub { } } - public boolean isWifiMulticastEnabled() { + public boolean isMulticastEnabled() { enforceAccessPermission(); synchronized (mMulticasters) { diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl index 00829d6..7c3af69 100644 --- a/wifi/java/android/net/wifi/IWifiManager.aidl +++ b/wifi/java/android/net/wifi/IWifiManager.aidl @@ -70,10 +70,10 @@ interface IWifiManager boolean releaseWifiLock(IBinder lock); - boolean isWifiMulticastEnabled(); + boolean isMulticastEnabled(); - void enableWifiMulticast(IBinder binder, String tag); + void enableMulticast(IBinder binder, String tag); - void disableWifiMulticast(); + void disableMulticast(); } diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 658a7b2..1a7caef 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -831,9 +831,9 @@ public class WifiManager { * * @hide pending API council approval */ - public boolean isWifiMulticastEnabled() { + public boolean isMulticastEnabled() { try { - return mService.isWifiMulticastEnabled(); + return mService.isMulticastEnabled(); } catch (RemoteException e) { return false; } @@ -851,13 +851,13 @@ public class WifiManager { * * @return true on success * - * @see #disableWifiMulticast + * @see #disableMulticast * * @hide pending API council approval */ - public boolean enableWifiMulticast(String tag) { + public boolean enableMulticast(String tag) { try { - mService.enableWifiMulticast(new Binder(), tag); + mService.enableMulticast(new Binder(), tag); return true; } catch (RemoteException e) { return false; @@ -872,13 +872,13 @@ public class WifiManager { * * @return true on success * - * @see #enableWifiMulticast + * @see #enableMulticast * * @hide pending API council approval */ - public boolean disableWifiMulticast() { + public boolean disableMulticast() { try { - mService.disableWifiMulticast(); + mService.disableMulticast(); return true; } catch (RemoteException e) { return false; diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 4073ddc..6771136 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -747,8 +747,8 @@ public class WifiStateTracker extends NetworkStateTracker { * first and then off.. if nobody else wants it on it'll be * off then and it's all synchronized within the API. */ - mWM.enableWifiMulticast("WifiStateTracker"); - mWM.disableWifiMulticast(); + mWM.enableMulticast("WifiStateTracker"); + mWM.disableMulticast(); if (mBluetoothA2dp == null) { mBluetoothA2dp = new BluetoothA2dp(mContext); |