Loading packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ public class CustomTile extends QSTileImpl<State> implements TileChangeListener return ComponentName.unflattenFromString(action); } public static QSTile create(QSTileHost host, String spec) { public static CustomTile create(QSTileHost host, String spec) { if (spec == null || !spec.startsWith(PREFIX) || !spec.endsWith(")")) { throw new IllegalArgumentException("Bad custom tile spec: " + spec); } Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,14 @@ public class QSFactoryImpl implements QSFactory { } public QSTile createTile(String tileSpec) { QSTileImpl tile = createTileInternal(tileSpec); if (tile != null) { tile.handleStale(); // Tile was just created, must be stale. } return tile; } private QSTileImpl createTileInternal(String tileSpec) { if (tileSpec.equals("wifi")) return new WifiTile(mHost); else if (tileSpec.equals("bt")) return new BluetoothTile(mHost); else if (tileSpec.equals("cell")) return new CellularTile(mHost); Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile { protected QSTileImpl(QSHost host) { mHost = host; mContext = host.getContext(); handleStale(); // Tile was just created, must be stale. } /** Loading packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +0 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,6 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { @Override public void handleSetListening(boolean listening) { if (mController == null) return; if (listening) { mController.addCallback(mCallback); } else { Loading packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java +0 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,6 @@ public class CastTile extends QSTileImpl<BooleanState> { @Override public void handleSetListening(boolean listening) { if (mController == null) return; if (DEBUG) Log.d(TAG, "handleSetListening " + listening); if (listening) { mController.addCallback(mCallback); Loading @@ -98,7 +97,6 @@ public class CastTile extends QSTileImpl<BooleanState> { @Override protected void handleUserSwitch(int newUserId) { super.handleUserSwitch(newUserId); if (mController == null) return; mController.setCurrentUserId(newUserId); } Loading Loading
packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ public class CustomTile extends QSTileImpl<State> implements TileChangeListener return ComponentName.unflattenFromString(action); } public static QSTile create(QSTileHost host, String spec) { public static CustomTile create(QSTileHost host, String spec) { if (spec == null || !spec.startsWith(PREFIX) || !spec.endsWith(")")) { throw new IllegalArgumentException("Bad custom tile spec: " + spec); } Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,14 @@ public class QSFactoryImpl implements QSFactory { } public QSTile createTile(String tileSpec) { QSTileImpl tile = createTileInternal(tileSpec); if (tile != null) { tile.handleStale(); // Tile was just created, must be stale. } return tile; } private QSTileImpl createTileInternal(String tileSpec) { if (tileSpec.equals("wifi")) return new WifiTile(mHost); else if (tileSpec.equals("bt")) return new BluetoothTile(mHost); else if (tileSpec.equals("cell")) return new CellularTile(mHost); Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ public abstract class QSTileImpl<TState extends State> implements QSTile { protected QSTileImpl(QSHost host) { mHost = host; mContext = host.getContext(); handleStale(); // Tile was just created, must be stale. } /** Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +0 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,6 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { @Override public void handleSetListening(boolean listening) { if (mController == null) return; if (listening) { mController.addCallback(mCallback); } else { Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java +0 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,6 @@ public class CastTile extends QSTileImpl<BooleanState> { @Override public void handleSetListening(boolean listening) { if (mController == null) return; if (DEBUG) Log.d(TAG, "handleSetListening " + listening); if (listening) { mController.addCallback(mCallback); Loading @@ -98,7 +97,6 @@ public class CastTile extends QSTileImpl<BooleanState> { @Override protected void handleUserSwitch(int newUserId) { super.handleUserSwitch(newUserId); if (mController == null) return; mController.setCurrentUserId(newUserId); } Loading