This works for me:
adb shell setprop debug.layout true adb shell service call activity 1599295570
After we adb shell setprop debug.layout true Show layout bounds using adb shell setprop debug.layout true , we need adb shell setprop debug.layout true to see the changes, like Show QS Tiles layout borders :
@Override public void onClick() { setIsEnabled(getQsTile().getState() == Tile.STATE_INACTIVE); new DevelopmentSettings.SystemPropPoker().execute();
Here's the original method from the AOSP source :
public static class SystemPropPoker extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... params) { String[] services = ServiceManager.listServices(); for (String service : services) { IBinder obj = ServiceManager.checkService(service); if (obj != null) { Parcel data = Parcel.obtain(); try { obj.transact(IBinder.SYSPROPS_TRANSACTION, data, null, 0); } catch (RemoteException e) { } catch (Exception e) { Log.i(TAG, "Someone wrote a bad service '" + service + "' that doesn't like to be poked: " + e); } data.recycle(); } } return null; } }
The number 1599295570 is called SYSPROPS_TRANSACTION
Link: https://github.com/dhelleberg/android-scripts/blob/master/src/devtools.groovy
source share