Don\'t set the text on QS Tiles unless we need to
am: 7435155432
* commit '74351554328e56fdd02eb09d93a98aaf97ccce04':
Don't set the text on QS Tiles unless we need to
This commit is contained in:
@@ -28,6 +28,7 @@ import android.widget.TextView;
|
||||
|
||||
import com.android.systemui.FontSizeUtils;
|
||||
import com.android.systemui.R;
|
||||
import libcore.util.Objects;
|
||||
|
||||
/** View that represents a standard quick settings tile. **/
|
||||
public class QSTileView extends QSTileBaseView {
|
||||
@@ -90,7 +91,9 @@ public class QSTileView extends QSTileBaseView {
|
||||
|
||||
protected void handleStateChanged(QSTile.State state) {
|
||||
super.handleStateChanged(state);
|
||||
mLabel.setText(state.label);
|
||||
if (!Objects.equal(mLabel.getText(), state.label)) {
|
||||
mLabel.setText(state.label);
|
||||
}
|
||||
mLabel.setEnabled(!state.disabledByPolicy);
|
||||
mPadLock.setVisibility(state.disabledByPolicy ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user