--- a/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
+++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
@@ -44,6 +44,8 @@ import com.android.systemui.qs.tiles.WorkModeTile;
import com.android.systemui.qs.QSTileHost;
import com.android.systemui.util.leak.GarbageMonitor;
+import android.os.SystemProperties;
+
public class QSFactoryImpl implements QSFactory {
private static final String TAG = "QSFactory";
@@ -62,14 +64,29 @@ public class QSFactoryImpl implements QSFactory {
}
private QSTileImpl createTileInternal(String tileSpec) {
+ boolean isbluetooth = SystemProperties.get("persist.sys.blueth").equals("1") ? true : false;
+ boolean iswifiable = SystemProperties.get("persist.sys.wifiable").equals("1") ? true : false;
+ boolean isdataable = SystemProperties.get("persist.sys.dataable").equals("1") ? true : false;
// Stock tiles.
switch (tileSpec) {
case "wifi":
- return new WifiTile(mHost);
+ if(isbluetooth){
+ return null;
+ }else{
+ return new WifiTile(mHost);
+ }
case "bt":
- return new BluetoothTile(mHost);
+ if(iswifiable){
+ return null;
+ }else{
+ return new BluetoothTile(mHost);
+ }
case "cell":
- return new CellularTile(mHost);
+ if(isdataable){
+ return null;
+ }else{
+ return new CellularTile(mHost);
+ }
case "dnd":