Loading packages/SystemUI/res/layout/status_bar_expanded.xml +15 −5 Original line number Diff line number Diff line Loading @@ -40,10 +40,11 @@ android:visibility="invisible" /> <FrameLayout <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginBottom="@dimen/close_handle_underlap" android:orientation="vertical" > <include layout="@layout/status_bar_expanded_header" Loading @@ -51,13 +52,22 @@ android:layout_height="@dimen/notification_panel_header_height" /> <TextView android:id="@+id/emergency_calls_only" android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:layout_height="wrap_content" android:layout_width="match_parent" android:paddingBottom="4dp" android:gravity="center" android:visibility="gone" /> <ScrollView android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" android:fadingEdge="none" android:overScrollMode="ifContentScrolls" android:layout_marginTop="@dimen/notification_panel_header_height" android:overScrollMode="always" > <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@+id/latestItems" Loading @@ -66,7 +76,7 @@ systemui:rowHeight="@dimen/notification_row_min_height" /> </ScrollView> </FrameLayout> </LinearLayout> <com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close" android:layout_width="match_parent" Loading packages/SystemUI/res/values/styles.xml +3 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ <item name="android:textColor">#999999</item> </style> <style name="TextAppearance.StatusBar.Expanded.Network.EmergencyOnly"> </style> <style name="Animation" /> <style name="Animation.ShirtPocketPanel"> Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +28 −14 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ public class PhoneStatusBar extends BaseStatusBar { private TextView mCarrierLabel; private boolean mCarrierLabelVisible = false; private int mCarrierLabelHeight; private TextView mEmergencyCallLabel; // drag bar CloseDragHandle mCloseView; Loading Loading @@ -409,14 +410,6 @@ public class PhoneStatusBar extends BaseStatusBar { mPile = (NotificationRowLayout)mStatusBarWindow.findViewById(R.id.latestItems); mPile.setLayoutTransitionsEnabled(false); mPile.setLongPressListener(getNotificationLongClicker()); if (SHOW_CARRIER_LABEL) { mPile.setOnSizeChangedListener(new OnSizeChangedListener() { @Override public void onSizeChanged(View view, int w, int h, int oldw, int oldh) { updateCarrierLabelVisibility(false); } }); } mExpandedContents = mPile; // was: expanded.findViewById(R.id.notificationLinearLayout); mClearButton = mStatusBarWindow.findViewById(R.id.clear_all_button); Loading @@ -429,9 +422,6 @@ public class PhoneStatusBar extends BaseStatusBar { mSettingsButton.setOnClickListener(mSettingsButtonListener); mRotationButton = (RotationToggle) mStatusBarWindow.findViewById(R.id.rotation_lock_button); mCarrierLabel = (TextView)mStatusBarWindow.findViewById(R.id.carrier_label); mCarrierLabel.setVisibility(mCarrierLabelVisible ? View.VISIBLE : View.INVISIBLE); mScrollView = (ScrollView)mStatusBarWindow.findViewById(R.id.scroll); mScrollView.setVerticalScrollBarEnabled(false); // less drawing during pulldowns Loading Loading @@ -460,7 +450,21 @@ public class PhoneStatusBar extends BaseStatusBar { mNetworkController.addSignalCluster(signalCluster); signalCluster.setNetworkController(mNetworkController); mEmergencyCallLabel = (TextView)mStatusBarWindow.findViewById(R.id.emergency_calls_only); if (mEmergencyCallLabel != null) { mNetworkController.addEmergencyLabelView(mEmergencyCallLabel); mEmergencyCallLabel.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { updateCarrierLabelVisibility(false); }}); } if (SHOW_CARRIER_LABEL) { mCarrierLabel = (TextView)mStatusBarWindow.findViewById(R.id.carrier_label); mCarrierLabel.setVisibility(mCarrierLabelVisible ? View.VISIBLE : View.INVISIBLE); // for mobile devices, we always show mobile connection info here (SPN/PLMN) // for other devices, we show whatever network is connected if (mNetworkController.hasMobileDataFeature()) { Loading @@ -468,6 +472,14 @@ public class PhoneStatusBar extends BaseStatusBar { } else { mNetworkController.addCombinedLabelView(mCarrierLabel); } // set up the dynamic hide/show of the label mPile.setOnSizeChangedListener(new OnSizeChangedListener() { @Override public void onSizeChanged(View view, int w, int h, int oldw, int oldh) { updateCarrierLabelVisibility(false); } }); } // final ImageView wimaxRSSI = Loading Loading @@ -920,8 +932,10 @@ public class PhoneStatusBar extends BaseStatusBar { mPile.getHeight(), mScrollView.getHeight(), mCarrierLabelHeight)); } final boolean emergencyCallsShownElsewhere = mEmergencyCallLabel != null; final boolean makeVisible = mPile.getHeight() < (mScrollView.getHeight() - mCarrierLabelHeight); !(emergencyCallsShownElsewhere && mNetworkController.isEmergencyOnly()) && mPile.getHeight() < (mScrollView.getHeight() - mCarrierLabelHeight); if (force || mCarrierLabelVisible != makeVisible) { mCarrierLabelVisible = makeVisible; Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +23 −1 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ public class NetworkController extends BroadcastReceiver { ArrayList<TextView> mCombinedLabelViews = new ArrayList<TextView>(); ArrayList<TextView> mMobileLabelViews = new ArrayList<TextView>(); ArrayList<TextView> mWifiLabelViews = new ArrayList<TextView>(); ArrayList<TextView> mEmergencyLabelViews = new ArrayList<TextView>(); ArrayList<SignalCluster> mSignalClusters = new ArrayList<SignalCluster>(); int mLastPhoneSignalIconId = -1; int mLastDataDirectionIconId = -1; Loading Loading @@ -246,6 +247,10 @@ public class NetworkController extends BroadcastReceiver { return mHasMobileDataFeature; } public boolean isEmergencyOnly() { return (mServiceState != null && mServiceState.isEmergencyOnly()); } public void addPhoneSignalIconView(ImageView v) { mPhoneSignalIconViews.add(v); } Loading Loading @@ -285,6 +290,10 @@ public class NetworkController extends BroadcastReceiver { mWifiLabelViews.add(v); } public void addEmergencyLabelView(TextView v) { mEmergencyLabelViews.add(v); } public void addSignalCluster(SignalCluster cluster) { mSignalClusters.add(cluster); refreshSignalCluster(cluster); Loading Loading @@ -920,7 +929,7 @@ public class NetworkController extends BroadcastReceiver { String wifiLabel = ""; String mobileLabel = ""; int N; final boolean emergencyOnly = (mServiceState != null && mServiceState.isEmergencyOnly()); final boolean emergencyOnly = isEmergencyOnly(); if (!mHasMobileDataFeature) { mDataSignalIconId = mPhoneSignalIconId = 0; Loading Loading @@ -1082,6 +1091,7 @@ public class NetworkController extends BroadcastReceiver { + " combinedActivityIconId=0x" + Integer.toHexString(combinedActivityIconId) + " mobileLabel=" + mobileLabel + " wifiLabel=" + wifiLabel + " emergencyOnly=" + emergencyOnly + " combinedLabel=" + combinedLabel + " mAirplaneMode=" + mAirplaneMode + " mDataActivity=" + mDataActivity Loading Loading @@ -1247,6 +1257,18 @@ public class NetworkController extends BroadcastReceiver { v.setVisibility(View.VISIBLE); } } // e-call label N = mEmergencyLabelViews.size(); for (int i=0; i<N; i++) { TextView v = mEmergencyLabelViews.get(i); if (!emergencyOnly) { v.setVisibility(View.GONE); } else { v.setText(mobileLabel); // comes from the telephony stack v.setVisibility(View.VISIBLE); } } } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading Loading
packages/SystemUI/res/layout/status_bar_expanded.xml +15 −5 Original line number Diff line number Diff line Loading @@ -40,10 +40,11 @@ android:visibility="invisible" /> <FrameLayout <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginBottom="@dimen/close_handle_underlap" android:orientation="vertical" > <include layout="@layout/status_bar_expanded_header" Loading @@ -51,13 +52,22 @@ android:layout_height="@dimen/notification_panel_header_height" /> <TextView android:id="@+id/emergency_calls_only" android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:layout_height="wrap_content" android:layout_width="match_parent" android:paddingBottom="4dp" android:gravity="center" android:visibility="gone" /> <ScrollView android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" android:fadingEdge="none" android:overScrollMode="ifContentScrolls" android:layout_marginTop="@dimen/notification_panel_header_height" android:overScrollMode="always" > <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@+id/latestItems" Loading @@ -66,7 +76,7 @@ systemui:rowHeight="@dimen/notification_row_min_height" /> </ScrollView> </FrameLayout> </LinearLayout> <com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close" android:layout_width="match_parent" Loading
packages/SystemUI/res/values/styles.xml +3 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ <item name="android:textColor">#999999</item> </style> <style name="TextAppearance.StatusBar.Expanded.Network.EmergencyOnly"> </style> <style name="Animation" /> <style name="Animation.ShirtPocketPanel"> Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +28 −14 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ public class PhoneStatusBar extends BaseStatusBar { private TextView mCarrierLabel; private boolean mCarrierLabelVisible = false; private int mCarrierLabelHeight; private TextView mEmergencyCallLabel; // drag bar CloseDragHandle mCloseView; Loading Loading @@ -409,14 +410,6 @@ public class PhoneStatusBar extends BaseStatusBar { mPile = (NotificationRowLayout)mStatusBarWindow.findViewById(R.id.latestItems); mPile.setLayoutTransitionsEnabled(false); mPile.setLongPressListener(getNotificationLongClicker()); if (SHOW_CARRIER_LABEL) { mPile.setOnSizeChangedListener(new OnSizeChangedListener() { @Override public void onSizeChanged(View view, int w, int h, int oldw, int oldh) { updateCarrierLabelVisibility(false); } }); } mExpandedContents = mPile; // was: expanded.findViewById(R.id.notificationLinearLayout); mClearButton = mStatusBarWindow.findViewById(R.id.clear_all_button); Loading @@ -429,9 +422,6 @@ public class PhoneStatusBar extends BaseStatusBar { mSettingsButton.setOnClickListener(mSettingsButtonListener); mRotationButton = (RotationToggle) mStatusBarWindow.findViewById(R.id.rotation_lock_button); mCarrierLabel = (TextView)mStatusBarWindow.findViewById(R.id.carrier_label); mCarrierLabel.setVisibility(mCarrierLabelVisible ? View.VISIBLE : View.INVISIBLE); mScrollView = (ScrollView)mStatusBarWindow.findViewById(R.id.scroll); mScrollView.setVerticalScrollBarEnabled(false); // less drawing during pulldowns Loading Loading @@ -460,7 +450,21 @@ public class PhoneStatusBar extends BaseStatusBar { mNetworkController.addSignalCluster(signalCluster); signalCluster.setNetworkController(mNetworkController); mEmergencyCallLabel = (TextView)mStatusBarWindow.findViewById(R.id.emergency_calls_only); if (mEmergencyCallLabel != null) { mNetworkController.addEmergencyLabelView(mEmergencyCallLabel); mEmergencyCallLabel.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { updateCarrierLabelVisibility(false); }}); } if (SHOW_CARRIER_LABEL) { mCarrierLabel = (TextView)mStatusBarWindow.findViewById(R.id.carrier_label); mCarrierLabel.setVisibility(mCarrierLabelVisible ? View.VISIBLE : View.INVISIBLE); // for mobile devices, we always show mobile connection info here (SPN/PLMN) // for other devices, we show whatever network is connected if (mNetworkController.hasMobileDataFeature()) { Loading @@ -468,6 +472,14 @@ public class PhoneStatusBar extends BaseStatusBar { } else { mNetworkController.addCombinedLabelView(mCarrierLabel); } // set up the dynamic hide/show of the label mPile.setOnSizeChangedListener(new OnSizeChangedListener() { @Override public void onSizeChanged(View view, int w, int h, int oldw, int oldh) { updateCarrierLabelVisibility(false); } }); } // final ImageView wimaxRSSI = Loading Loading @@ -920,8 +932,10 @@ public class PhoneStatusBar extends BaseStatusBar { mPile.getHeight(), mScrollView.getHeight(), mCarrierLabelHeight)); } final boolean emergencyCallsShownElsewhere = mEmergencyCallLabel != null; final boolean makeVisible = mPile.getHeight() < (mScrollView.getHeight() - mCarrierLabelHeight); !(emergencyCallsShownElsewhere && mNetworkController.isEmergencyOnly()) && mPile.getHeight() < (mScrollView.getHeight() - mCarrierLabelHeight); if (force || mCarrierLabelVisible != makeVisible) { mCarrierLabelVisible = makeVisible; Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +23 −1 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ public class NetworkController extends BroadcastReceiver { ArrayList<TextView> mCombinedLabelViews = new ArrayList<TextView>(); ArrayList<TextView> mMobileLabelViews = new ArrayList<TextView>(); ArrayList<TextView> mWifiLabelViews = new ArrayList<TextView>(); ArrayList<TextView> mEmergencyLabelViews = new ArrayList<TextView>(); ArrayList<SignalCluster> mSignalClusters = new ArrayList<SignalCluster>(); int mLastPhoneSignalIconId = -1; int mLastDataDirectionIconId = -1; Loading Loading @@ -246,6 +247,10 @@ public class NetworkController extends BroadcastReceiver { return mHasMobileDataFeature; } public boolean isEmergencyOnly() { return (mServiceState != null && mServiceState.isEmergencyOnly()); } public void addPhoneSignalIconView(ImageView v) { mPhoneSignalIconViews.add(v); } Loading Loading @@ -285,6 +290,10 @@ public class NetworkController extends BroadcastReceiver { mWifiLabelViews.add(v); } public void addEmergencyLabelView(TextView v) { mEmergencyLabelViews.add(v); } public void addSignalCluster(SignalCluster cluster) { mSignalClusters.add(cluster); refreshSignalCluster(cluster); Loading Loading @@ -920,7 +929,7 @@ public class NetworkController extends BroadcastReceiver { String wifiLabel = ""; String mobileLabel = ""; int N; final boolean emergencyOnly = (mServiceState != null && mServiceState.isEmergencyOnly()); final boolean emergencyOnly = isEmergencyOnly(); if (!mHasMobileDataFeature) { mDataSignalIconId = mPhoneSignalIconId = 0; Loading Loading @@ -1082,6 +1091,7 @@ public class NetworkController extends BroadcastReceiver { + " combinedActivityIconId=0x" + Integer.toHexString(combinedActivityIconId) + " mobileLabel=" + mobileLabel + " wifiLabel=" + wifiLabel + " emergencyOnly=" + emergencyOnly + " combinedLabel=" + combinedLabel + " mAirplaneMode=" + mAirplaneMode + " mDataActivity=" + mDataActivity Loading Loading @@ -1247,6 +1257,18 @@ public class NetworkController extends BroadcastReceiver { v.setVisibility(View.VISIBLE); } } // e-call label N = mEmergencyLabelViews.size(); for (int i=0; i<N; i++) { TextView v = mEmergencyLabelViews.get(i); if (!emergencyOnly) { v.setVisibility(View.GONE); } else { v.setText(mobileLabel); // comes from the telephony stack v.setVisibility(View.VISIBLE); } } } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading