public abstract class QSTile<TState extends QSTile.State> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QSTile.AirplaneBooleanState |
protected class |
QSTile.AnimationIcon |
static class |
QSTile.BooleanState |
static interface |
QSTile.Callback |
static interface |
QSTile.DetailAdapter |
static class |
QSTile.DrawableIcon |
protected class |
QSTile.H |
static interface |
QSTile.Host |
static class |
QSTile.Icon |
static class |
QSTile.ResourceIcon |
static class |
QSTile.SignalState |
static class |
QSTile.State |
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEBUG |
protected Context |
mContext |
protected QSTile.H |
mHandler |
protected QSTile.Host |
mHost |
protected TState |
mState |
protected Handler |
mUiHandler |
protected String |
TAG |
Modifier | Constructor and Description |
---|---|
protected |
QSTile(QSTile.Host host) |
Modifier and Type | Method and Description |
---|---|
void |
addCallback(QSTile.Callback callback) |
protected void |
checkIfRestrictionEnforcedByAdminOnly(QSTile.State state,
String userRestriction) |
void |
clearState() |
void |
click() |
protected String |
composeChangeAnnouncement() |
QSIconView |
createTileView(Context context) |
void |
destroy() |
void |
fireScanStateChanged(boolean state) |
void |
fireToggleStateChanged(boolean state) |
QSTile.DetailAdapter |
getDetailAdapter() |
QSTile.Host |
getHost() |
abstract Intent |
getLongClickIntent() |
abstract int |
getMetricsCategory()
Declare the category of this tile.
|
TState |
getState() |
abstract CharSequence |
getTileLabel() |
String |
getTileSpec() |
protected void |
handleClearState() |
protected abstract void |
handleClick() |
protected void |
handleDestroy() |
protected void |
handleLongClick() |
protected void |
handleRefreshState(Object arg) |
protected void |
handleSecondaryClick() |
protected abstract void |
handleUpdateState(TState state,
Object arg) |
protected void |
handleUserSwitch(int newUserId) |
boolean |
isAvailable()
Is a startup check whether this device currently supports this tile.
|
void |
longClick() |
abstract TState |
newTileState() |
void |
refreshState() |
protected void |
refreshState(Object arg) |
void |
removeCallback(QSTile.Callback callback) |
void |
removeCallbacks() |
void |
secondaryClick() |
void |
setDetailListening(boolean listening) |
protected abstract void |
setListening(boolean listening) |
void |
setListening(Object listener,
boolean listening)
Adds or removes a listening client for the tile.
|
void |
setTileSpec(String tileSpec) |
protected boolean |
shouldAnnouncementBeDelayed() |
void |
showDetail(boolean show) |
void |
userSwitch(int newUserId) |
protected final String TAG
protected static final boolean DEBUG
protected final QSTile.Host mHost
protected final Context mContext
protected final QSTile.H mHandler
protected final Handler mUiHandler
protected TState extends QSTile.State mState
protected QSTile(QSTile.Host host)
public abstract TState newTileState()
protected abstract void handleClick()
public abstract int getMetricsCategory()
com.android.internal.logging.MetricsProto.MetricsEvent
by editing frameworks/base/proto/src/metrics_constants.proto.public void setListening(Object listener, boolean listening)
public String getTileSpec()
public void setTileSpec(String tileSpec)
public QSTile.Host getHost()
public QSIconView createTileView(Context context)
public QSTile.DetailAdapter getDetailAdapter()
public boolean isAvailable()
public void addCallback(QSTile.Callback callback)
public void removeCallback(QSTile.Callback callback)
public void removeCallbacks()
public void click()
public void secondaryClick()
public void longClick()
public void showDetail(boolean show)
public final void refreshState()
protected final void refreshState(Object arg)
public final void clearState()
public void userSwitch(int newUserId)
public void fireToggleStateChanged(boolean state)
public void fireScanStateChanged(boolean state)
public void destroy()
public TState getState()
public void setDetailListening(boolean listening)
protected void handleSecondaryClick()
protected void handleLongClick()
public abstract Intent getLongClickIntent()
protected void handleClearState()
protected void handleRefreshState(Object arg)
protected boolean shouldAnnouncementBeDelayed()
protected String composeChangeAnnouncement()
protected void handleUserSwitch(int newUserId)
protected abstract void setListening(boolean listening)
protected void handleDestroy()
protected void checkIfRestrictionEnforcedByAdminOnly(QSTile.State state, String userRestriction)
public abstract CharSequence getTileLabel()