Merge "Crash when enabling show_operator_name_in_statusbar_bool"
This commit is contained in:
@@ -78,7 +78,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:clipChildren="false">
|
android:clipChildren="false">
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/operator_name"
|
android:id="@+id/operator_name_stub"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout="@layout/operator_name" />
|
android:layout="@layout/operator_name" />
|
||||||
|
|||||||
@@ -636,9 +636,9 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
|
|||||||
private void initOperatorName() {
|
private void initOperatorName() {
|
||||||
int subId = SubscriptionManager.getDefaultDataSubscriptionId();
|
int subId = SubscriptionManager.getDefaultDataSubscriptionId();
|
||||||
if (mCarrierConfigTracker.getShowOperatorNameInStatusBarConfig(subId)) {
|
if (mCarrierConfigTracker.getShowOperatorNameInStatusBarConfig(subId)) {
|
||||||
ViewStub stub = mStatusBar.findViewById(R.id.operator_name);
|
View view = mStatusBar.findViewById(R.id.operator_name);
|
||||||
mOperatorNameViewController =
|
mOperatorNameViewController =
|
||||||
mOperatorNameViewControllerFactory.create((OperatorNameView) stub.inflate());
|
mOperatorNameViewControllerFactory.create((OperatorNameView) view);
|
||||||
mOperatorNameViewController.init();
|
mOperatorNameViewController.init();
|
||||||
// This view should not be visible on lock-screen
|
// This view should not be visible on lock-screen
|
||||||
if (mKeyguardStateController.isShowing()) {
|
if (mKeyguardStateController.isShowing()) {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package com.android.systemui.statusbar.phone.fragment.dagger;
|
package com.android.systemui.statusbar.phone.fragment.dagger;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewStub;
|
||||||
|
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.battery.BatteryMeterView;
|
import com.android.systemui.battery.BatteryMeterView;
|
||||||
@@ -95,7 +96,7 @@ public interface StatusBarFragmentModule {
|
|||||||
@StatusBarFragmentScope
|
@StatusBarFragmentScope
|
||||||
@Named(OPERATOR_NAME_VIEW)
|
@Named(OPERATOR_NAME_VIEW)
|
||||||
static View provideOperatorNameView(@RootView PhoneStatusBarView view) {
|
static View provideOperatorNameView(@RootView PhoneStatusBarView view) {
|
||||||
return view.findViewById(R.id.operator_name);
|
return ((ViewStub) view.findViewById(R.id.operator_name_stub)).inflate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
|
|||||||
Reference in New Issue
Block a user