diff options
| author | Jason Monk <jmonk@google.com> | 2017-03-31 09:26:27 -0400 |
|---|---|---|
| committer | Jason Monk <jmonk@google.com> | 2017-03-31 09:26:27 -0400 |
| commit | 213eb4f162b55f4ae5efd52aefb7bad5cfe73663 (patch) | |
| tree | 8b3e2d1fac3b8e7bb8fc7fd393f2151847126089 /core/java/android | |
| parent | 76d779374a92f502579e72f822cf815e54be33ea (diff) | |
Add test API for if the device supports QS
Test: cts-tradefed run cts-dev -m CtsSystemUiHostTestCases
Change-Id: Ib2dbbab8c4d0b7bae912f29f417e7e245bfd5b71
Fixes: 36363728
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/service/quicksettings/TileService.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/service/quicksettings/TileService.java b/core/java/android/service/quicksettings/TileService.java index 8e0103078a42..56b267fb2c9d 100644 --- a/core/java/android/service/quicksettings/TileService.java +++ b/core/java/android/service/quicksettings/TileService.java @@ -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; @@ -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 @@ -425,6 +429,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. * * This method is only applicable to tiles that have {@link #META_DATA_ACTIVE_TILE} defined |
