Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java +8 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -308,6 +309,7 @@ class QuickSettingsModel implements BluetoothStateChangeCallback, refreshBluetoothTile(); refreshBrightnessTile(); refreshRotationLockTile(); refreshRssiTile(); } // Settings Loading Loading @@ -501,6 +503,12 @@ class QuickSettingsModel implements BluetoothStateChangeCallback, } } void refreshRssiTile() { // We reinflate the original view due to potential styling changes that may have // taken place due to a configuration change. mRSSITile.reinflateContent(LayoutInflater.from(mContext)); } // Bluetooth void addBluetoothTile(QuickSettingsTileView view, RefreshCallback cb) { mBluetoothTile = view; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsTileView.java +14 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; Loading @@ -26,13 +27,16 @@ import android.widget.FrameLayout; * */ class QuickSettingsTileView extends FrameLayout { private static final String TAG = "QuickSettingsTileView"; private int mContentLayoutId; private int mColSpan; private int mRowSpan; public QuickSettingsTileView(Context context, AttributeSet attrs) { super(context, attrs); mContentLayoutId = -1; mColSpan = 1; mRowSpan = 1; } Loading @@ -46,9 +50,19 @@ class QuickSettingsTileView extends FrameLayout { } void setContent(int layoutId, LayoutInflater inflater) { mContentLayoutId = layoutId; inflater.inflate(layoutId, this); } void reinflateContent(LayoutInflater inflater) { if (mContentLayoutId != -1) { removeAllViews(); setContent(mContentLayoutId, inflater); } else { Log.e(TAG, "Not reinflating content: No layoutId set"); } } @Override public void setVisibility(int vis) { if (QuickSettings.DEBUG_GONE_TILES) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java +8 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -308,6 +309,7 @@ class QuickSettingsModel implements BluetoothStateChangeCallback, refreshBluetoothTile(); refreshBrightnessTile(); refreshRotationLockTile(); refreshRssiTile(); } // Settings Loading Loading @@ -501,6 +503,12 @@ class QuickSettingsModel implements BluetoothStateChangeCallback, } } void refreshRssiTile() { // We reinflate the original view due to potential styling changes that may have // taken place due to a configuration change. mRSSITile.reinflateContent(LayoutInflater.from(mContext)); } // Bluetooth void addBluetoothTile(QuickSettingsTileView view, RefreshCallback cb) { mBluetoothTile = view; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsTileView.java +14 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; Loading @@ -26,13 +27,16 @@ import android.widget.FrameLayout; * */ class QuickSettingsTileView extends FrameLayout { private static final String TAG = "QuickSettingsTileView"; private int mContentLayoutId; private int mColSpan; private int mRowSpan; public QuickSettingsTileView(Context context, AttributeSet attrs) { super(context, attrs); mContentLayoutId = -1; mColSpan = 1; mRowSpan = 1; } Loading @@ -46,9 +50,19 @@ class QuickSettingsTileView extends FrameLayout { } void setContent(int layoutId, LayoutInflater inflater) { mContentLayoutId = layoutId; inflater.inflate(layoutId, this); } void reinflateContent(LayoutInflater inflater) { if (mContentLayoutId != -1) { removeAllViews(); setContent(mContentLayoutId, inflater); } else { Log.e(TAG, "Not reinflating content: No layoutId set"); } } @Override public void setVisibility(int vis) { if (QuickSettings.DEBUG_GONE_TILES) { Loading