Data usage label width, locking, Wi-Fi fixes.
Avoid wrapping sweep labels when underlying string is long, and avoid showing blank "^1" sweep labels. Only offer "restrict data" when mobile networks are present. Add locking around UidDetailProvider. Move to isNetworkSupported() for consistency. Bug: 5492495, 5471602, 5439402, 5373465 Change-Id: I79f5938d45ffbb4c2c242106424a466042a26c1c
This commit is contained in:
@@ -39,14 +39,14 @@ public class UidDetailProvider {
|
||||
mUidDetailCache = new SparseArray<UidDetail>();
|
||||
}
|
||||
|
||||
public void clearCache() {
|
||||
public synchronized void clearCache() {
|
||||
mUidDetailCache.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve best descriptive label for the given UID.
|
||||
*/
|
||||
public UidDetail getUidDetail(int uid, boolean blocking) {
|
||||
public synchronized UidDetail getUidDetail(int uid, boolean blocking) {
|
||||
final UidDetail cached = mUidDetailCache.get(uid);
|
||||
if (cached != null) {
|
||||
return cached;
|
||||
|
Reference in New Issue
Block a user