1

I want to disable Bluetooth tile from the quick settings panel. I am using android 9 and I want to do it on a system app. So if there are some changes to be made in source, I would be happy to know it.

I have found many solutions telling how to add a new custom tile via TileService, but I need to disable tiles that are already present (like Bluetooth tile).

Note: I do not want the feature itself to be disabled, i.e. the user would be able to enable disable feature from the settings app itself. I just want to disable the qs tile.

Abdullah Riaz
  • 536
  • 5
  • 19

2 Answers2

3

Searched a bit on cs.android.com and this seems to be the relevant class.

frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java

From there you can handle click ( or not handle it actually), or show a "disabled" icon etc.

If you want to "remove" it, then frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java seems to be the class that adds them. It reads from Settings.Secure.QS_TILES

Rick Sanchez
  • 4,528
  • 2
  • 27
  • 53
  • I have been through these classes. It seems, changing the source is the only solution to disable the tile. If there were some settings like sysui_qs_tiles in Settings.Secure, it would have been a lot easier. – Abdullah Riaz Dec 30 '19 at 05:48
  • Yes, modifying BluetoothTile itself looks like the only way to do it. – Rick Sanchez Dec 30 '19 at 14:36
0

frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java

yes, This file we can edit and remove unwanted tiles.