am 312c1e79: Merge "Add padding when both data icon and wifi icon is visible" into lmp-mr1-dev
* commit '312c1e79d49a1ce7f7202f3bedb3a8d1fa110e4d': Add padding when both data icon and wifi icon is visible
This commit is contained in:
@@ -49,7 +49,6 @@ public class SignalClusterView
|
|||||||
private boolean mIsAirplaneMode = false;
|
private boolean mIsAirplaneMode = false;
|
||||||
private int mAirplaneIconId = 0;
|
private int mAirplaneIconId = 0;
|
||||||
private String mWifiDescription, mMobileDescription, mMobileTypeDescription;
|
private String mWifiDescription, mMobileDescription, mMobileTypeDescription;
|
||||||
private boolean mRoaming;
|
|
||||||
private boolean mIsMobileTypeIconWide;
|
private boolean mIsMobileTypeIconWide;
|
||||||
|
|
||||||
ViewGroup mWifiGroup, mMobileGroup;
|
ViewGroup mWifiGroup, mMobileGroup;
|
||||||
@@ -143,14 +142,12 @@ public class SignalClusterView
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon,
|
public void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon,
|
||||||
String contentDescription, String typeContentDescription, boolean roaming,
|
String contentDescription, String typeContentDescription, boolean isTypeIconWide) {
|
||||||
boolean isTypeIconWide) {
|
|
||||||
mMobileVisible = visible;
|
mMobileVisible = visible;
|
||||||
mMobileStrengthId = strengthIcon;
|
mMobileStrengthId = strengthIcon;
|
||||||
mMobileTypeId = typeIcon;
|
mMobileTypeId = typeIcon;
|
||||||
mMobileDescription = contentDescription;
|
mMobileDescription = contentDescription;
|
||||||
mMobileTypeDescription = typeContentDescription;
|
mMobileTypeDescription = typeContentDescription;
|
||||||
mRoaming = roaming;
|
|
||||||
mIsMobileTypeIconWide = isTypeIconWide;
|
mIsMobileTypeIconWide = isTypeIconWide;
|
||||||
|
|
||||||
apply();
|
apply();
|
||||||
@@ -244,7 +241,7 @@ public class SignalClusterView
|
|||||||
mWifiAirplaneSpacer.setVisibility(View.GONE);
|
mWifiAirplaneSpacer.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mRoaming && mMobileVisible && mWifiVisible) {
|
if (mMobileVisible && mMobileTypeId != 0 && mWifiVisible) {
|
||||||
mWifiSignalSpacer.setVisibility(View.VISIBLE);
|
mWifiSignalSpacer.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
mWifiSignalSpacer.setVisibility(View.GONE);
|
mWifiSignalSpacer.setVisibility(View.GONE);
|
||||||
@@ -257,7 +254,7 @@ public class SignalClusterView
|
|||||||
(mMobileVisible ? "VISIBLE" : "GONE"),
|
(mMobileVisible ? "VISIBLE" : "GONE"),
|
||||||
mMobileStrengthId, mMobileTypeId));
|
mMobileStrengthId, mMobileTypeId));
|
||||||
|
|
||||||
mMobileType.setVisibility((mRoaming || mMobileTypeId != 0) ? View.VISIBLE : View.GONE);
|
mMobileType.setVisibility(mMobileTypeId != 0 ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,8 +164,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
|||||||
public interface SignalCluster {
|
public interface SignalCluster {
|
||||||
void setWifiIndicators(boolean visible, int strengthIcon, String contentDescription);
|
void setWifiIndicators(boolean visible, int strengthIcon, String contentDescription);
|
||||||
void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon,
|
void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon,
|
||||||
String contentDescription, String typeContentDescription, boolean roaming,
|
String contentDescription, String typeContentDescription, boolean isTypeIconWide);
|
||||||
boolean isTypeIconWide);
|
|
||||||
void setIsAirplaneMode(boolean is, int airplaneIcon);
|
void setIsAirplaneMode(boolean is, int airplaneIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,7 +385,6 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
|||||||
mDataTypeIconId,
|
mDataTypeIconId,
|
||||||
mContentDescriptionWimax,
|
mContentDescriptionWimax,
|
||||||
mContentDescriptionDataType,
|
mContentDescriptionDataType,
|
||||||
mDataTypeIconId == TelephonyIcons.ROAMING_ICON,
|
|
||||||
false /* isTypeIconWide */ );
|
false /* isTypeIconWide */ );
|
||||||
} else {
|
} else {
|
||||||
// normal mobile data
|
// normal mobile data
|
||||||
@@ -396,7 +394,6 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
|||||||
mDataTypeIconId,
|
mDataTypeIconId,
|
||||||
mContentDescriptionPhoneSignal,
|
mContentDescriptionPhoneSignal,
|
||||||
mContentDescriptionDataType,
|
mContentDescriptionDataType,
|
||||||
mDataTypeIconId == TelephonyIcons.ROAMING_ICON,
|
|
||||||
isTypeIconWide(mDataTypeIconId));
|
isTypeIconWide(mDataTypeIconId));
|
||||||
}
|
}
|
||||||
cluster.setIsAirplaneMode(mAirplaneMode, mAirplaneIconId);
|
cluster.setIsAirplaneMode(mAirplaneMode, mAirplaneIconId);
|
||||||
@@ -1606,7 +1603,6 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
|||||||
mDemoDataTypeIconId,
|
mDemoDataTypeIconId,
|
||||||
"Demo",
|
"Demo",
|
||||||
"Demo",
|
"Demo",
|
||||||
mDemoDataTypeIconId == TelephonyIcons.ROAMING_ICON,
|
|
||||||
isTypeIconWide(mDemoDataTypeIconId));
|
isTypeIconWide(mDemoDataTypeIconId));
|
||||||
}
|
}
|
||||||
refreshViews();
|
refreshViews();
|
||||||
|
|||||||
Reference in New Issue
Block a user