Loading api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -37527,6 +37527,7 @@ package android.service.quicksettings { ctor public TileService(); method public final android.service.quicksettings.Tile getQsTile(); method public final boolean isLocked(); method public static boolean isQuickSettingsSupported(); method public final boolean isSecure(); method public android.os.IBinder onBind(android.content.Intent); method public void onClick(); core/java/android/service/quicksettings/TileService.java +13 −0 Original line number Diff line number Diff line Loading @@ -19,11 +19,13 @@ import android.Manifest; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; import android.annotation.TestApi; import android.app.Dialog; import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Icon; import android.os.Handler; import android.os.IBinder; Loading @@ -34,6 +36,8 @@ import android.view.View; import android.view.View.OnAttachStateChangeListener; import android.view.WindowManager; import com.android.internal.R; /** * A TileService provides the user a tile that can be added to Quick Settings. * Quick Settings is a space provided that allows the user to change settings and Loading Loading @@ -424,6 +428,15 @@ public class TileService extends Service { } } /** * @return True if the device supports quick settings and its assocated APIs. * @hide */ @TestApi public static boolean isQuickSettingsSupported() { return Resources.getSystem().getBoolean(R.bool.config_quickSettingsSupported); } /** * Requests that a tile be put in the listening state so it can send an update. * Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2819,4 +2819,7 @@ density will be scaled accordingly to maintain aspect ratio. A value of 0 indicates no constraint will be enforced. --> <integer name="config_maxUiWidth">0</integer> <!-- Whether the device supports quick settings and its associated APIs --> <bool name="config_quickSettingsSupported">true</bool> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2955,4 +2955,5 @@ <java-symbol type="string" name="etws_primary_default_message_test" /> <java-symbol type="string" name="etws_primary_default_message_others" /> <java-symbol type="bool" name="config_quickSettingsSupported" /> </resources> services/core/java/com/android/server/statusbar/StatusBarShellCommand.java +9 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.server.statusbar; import android.content.ComponentName; import android.os.RemoteException; import android.os.ShellCommand; import android.service.quicksettings.TileService; import com.android.internal.statusbar.IStatusBarService; import java.io.PrintWriter; Loading Loading @@ -48,6 +50,10 @@ public class StatusBarShellCommand extends ShellCommand { return runRemoveTile(); case "click-tile": return runClickTile(); case "check-support": final PrintWriter pw = getOutPrintWriter(); pw.println(String.valueOf(TileService.isQuickSettingsSupported())); return 0; default: return handleDefaultCommands(cmd); } Loading Loading @@ -113,5 +119,8 @@ public class StatusBarShellCommand extends ShellCommand { pw.println(" click-tile COMPONENT"); pw.println(" Click on a TileService of the specified component"); pw.println(""); pw.println(" check-support"); pw.println(" Check if this device supports QS + APIs"); pw.println(""); } } Loading
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -37527,6 +37527,7 @@ package android.service.quicksettings { ctor public TileService(); method public final android.service.quicksettings.Tile getQsTile(); method public final boolean isLocked(); method public static boolean isQuickSettingsSupported(); method public final boolean isSecure(); method public android.os.IBinder onBind(android.content.Intent); method public void onClick();
core/java/android/service/quicksettings/TileService.java +13 −0 Original line number Diff line number Diff line Loading @@ -19,11 +19,13 @@ import android.Manifest; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; import android.annotation.TestApi; import android.app.Dialog; import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Icon; import android.os.Handler; import android.os.IBinder; Loading @@ -34,6 +36,8 @@ import android.view.View; import android.view.View.OnAttachStateChangeListener; import android.view.WindowManager; import com.android.internal.R; /** * A TileService provides the user a tile that can be added to Quick Settings. * Quick Settings is a space provided that allows the user to change settings and Loading Loading @@ -424,6 +428,15 @@ public class TileService extends Service { } } /** * @return True if the device supports quick settings and its assocated APIs. * @hide */ @TestApi public static boolean isQuickSettingsSupported() { return Resources.getSystem().getBoolean(R.bool.config_quickSettingsSupported); } /** * Requests that a tile be put in the listening state so it can send an update. * Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2819,4 +2819,7 @@ density will be scaled accordingly to maintain aspect ratio. A value of 0 indicates no constraint will be enforced. --> <integer name="config_maxUiWidth">0</integer> <!-- Whether the device supports quick settings and its associated APIs --> <bool name="config_quickSettingsSupported">true</bool> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2955,4 +2955,5 @@ <java-symbol type="string" name="etws_primary_default_message_test" /> <java-symbol type="string" name="etws_primary_default_message_others" /> <java-symbol type="bool" name="config_quickSettingsSupported" /> </resources>
services/core/java/com/android/server/statusbar/StatusBarShellCommand.java +9 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.server.statusbar; import android.content.ComponentName; import android.os.RemoteException; import android.os.ShellCommand; import android.service.quicksettings.TileService; import com.android.internal.statusbar.IStatusBarService; import java.io.PrintWriter; Loading Loading @@ -48,6 +50,10 @@ public class StatusBarShellCommand extends ShellCommand { return runRemoveTile(); case "click-tile": return runClickTile(); case "check-support": final PrintWriter pw = getOutPrintWriter(); pw.println(String.valueOf(TileService.isQuickSettingsSupported())); return 0; default: return handleDefaultCommands(cmd); } Loading Loading @@ -113,5 +119,8 @@ public class StatusBarShellCommand extends ShellCommand { pw.println(" click-tile COMPONENT"); pw.println(" Click on a TileService of the specified component"); pw.println(""); pw.println(" check-support"); pw.println(" Check if this device supports QS + APIs"); pw.println(""); } }