Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java +4 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public interface QSTile { public boolean isTransient = false; public String expandedAccessibilityClassName; public SlashState slash; public boolean handlesLongClick = true; public boolean copyTo(State other) { if (other == null) throw new IllegalArgumentException(); Loading @@ -133,7 +134,8 @@ public interface QSTile { || !Objects.equals(other.state, state) || !Objects.equals(other.isTransient, isTransient) || !Objects.equals(other.dualTarget, dualTarget) || !Objects.equals(other.slash, slash); || !Objects.equals(other.slash, slash) || !Objects.equals(other.handlesLongClick, handlesLongClick); other.icon = icon; other.iconSupplier = iconSupplier; other.label = label; Loading @@ -146,6 +148,7 @@ public interface QSTile { other.dualTarget = dualTarget; other.isTransient = isTransient; other.slash = slash != null ? slash.copy() : null; other.handlesLongClick = handlesLongClick; return changed; } Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +9 −4 Original line number Diff line number Diff line Loading @@ -194,6 +194,7 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { } setClickable(state.state != Tile.STATE_UNAVAILABLE); setLongClickable(state.handlesLongClick); mIcon.setIcon(state, allowAnimations); setContentDescription(state.contentDescription); Loading Loading @@ -287,10 +288,14 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { info.setText(label); info.setChecked(b); info.setCheckable(true); if (isLongClickable()) { info.addAction( new AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK.getId(), getResources().getString(R.string.accessibility_long_click_tile))); AccessibilityNodeInfo.AccessibilityAction .ACTION_LONG_CLICK.getId(), getResources().getString( R.string.accessibility_long_click_tile))); } } } } Loading packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.qs.tiles; import android.app.ActivityManager; import android.content.Intent; import android.graphics.drawable.Drawable; import android.provider.MediaStore; import android.service.quicksettings.Tile; import android.widget.Switch; Loading Loading @@ -50,7 +49,9 @@ public class FlashlightTile extends QSTileImpl<BooleanState> implements @Override public BooleanState newTileState() { return new BooleanState(); BooleanState state = new BooleanState(); state.handlesLongClick = false; return state; } @Override Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java +4 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public interface QSTile { public boolean isTransient = false; public String expandedAccessibilityClassName; public SlashState slash; public boolean handlesLongClick = true; public boolean copyTo(State other) { if (other == null) throw new IllegalArgumentException(); Loading @@ -133,7 +134,8 @@ public interface QSTile { || !Objects.equals(other.state, state) || !Objects.equals(other.isTransient, isTransient) || !Objects.equals(other.dualTarget, dualTarget) || !Objects.equals(other.slash, slash); || !Objects.equals(other.slash, slash) || !Objects.equals(other.handlesLongClick, handlesLongClick); other.icon = icon; other.iconSupplier = iconSupplier; other.label = label; Loading @@ -146,6 +148,7 @@ public interface QSTile { other.dualTarget = dualTarget; other.isTransient = isTransient; other.slash = slash != null ? slash.copy() : null; other.handlesLongClick = handlesLongClick; return changed; } Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +9 −4 Original line number Diff line number Diff line Loading @@ -194,6 +194,7 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { } setClickable(state.state != Tile.STATE_UNAVAILABLE); setLongClickable(state.handlesLongClick); mIcon.setIcon(state, allowAnimations); setContentDescription(state.contentDescription); Loading Loading @@ -287,10 +288,14 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { info.setText(label); info.setChecked(b); info.setCheckable(true); if (isLongClickable()) { info.addAction( new AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK.getId(), getResources().getString(R.string.accessibility_long_click_tile))); AccessibilityNodeInfo.AccessibilityAction .ACTION_LONG_CLICK.getId(), getResources().getString( R.string.accessibility_long_click_tile))); } } } } Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.qs.tiles; import android.app.ActivityManager; import android.content.Intent; import android.graphics.drawable.Drawable; import android.provider.MediaStore; import android.service.quicksettings.Tile; import android.widget.Switch; Loading Loading @@ -50,7 +49,9 @@ public class FlashlightTile extends QSTileImpl<BooleanState> implements @Override public BooleanState newTileState() { return new BooleanState(); BooleanState state = new BooleanState(); state.handlesLongClick = false; return state; } @Override Loading