Disable Bluetooth Tile in Quick Settings Panel

1.2k views Asked by At

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.

2

There are 2 answers

2
Rick Sanchez On BEST ANSWER

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

0
Prasanna Kulkarni On

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

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