Loading core/api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -40195,12 +40195,14 @@ package android.service.quicksettings { public final class Tile implements android.os.Parcelable { method public int describeContents(); method @Nullable public android.app.PendingIntent getActivityLaunchForClick(); method public CharSequence getContentDescription(); method public android.graphics.drawable.Icon getIcon(); method public CharSequence getLabel(); method public int getState(); method @Nullable public CharSequence getStateDescription(); method @Nullable public CharSequence getSubtitle(); method public void setActivityLaunchForClick(@Nullable android.app.PendingIntent); method public void setContentDescription(CharSequence); method public void setIcon(android.graphics.drawable.Icon); method public void setLabel(CharSequence); Loading Loading @@ -40229,6 +40231,7 @@ package android.service.quicksettings { method public static final void requestListeningState(android.content.Context, android.content.ComponentName); method public final void showDialog(android.app.Dialog); method public final void startActivityAndCollapse(android.content.Intent); method public final void startActivityAndCollapse(@NonNull android.app.PendingIntent); method public final void unlockAndRun(Runnable); field public static final String ACTION_QS_TILE = "android.service.quicksettings.action.QS_TILE"; field public static final String ACTION_QS_TILE_PREFERENCES = "android.service.quicksettings.action.QS_TILE_PREFERENCES"; core/java/android/service/quicksettings/Tile.java +0 −2 Original line number Diff line number Diff line Loading @@ -227,7 +227,6 @@ public final class Tile implements Parcelable { /** * Gets the Activity {@link PendingIntent} to be launched when the tile is clicked. * @hide */ @Nullable public PendingIntent getActivityLaunchForClick() { Loading @@ -243,7 +242,6 @@ public final class Tile implements Parcelable { * (This is the default behavior if this method is never called.) * @param pendingIntent a PendingIntent for an activity to be launched onclick, or {@code null} * to handle the clicks in the `TileService`. * @hide */ public void setActivityLaunchForClick(@Nullable PendingIntent pendingIntent) { if (pendingIntent != null && !pendingIntent.isActivity()) { Loading core/java/android/service/quicksettings/TileService.java +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package android.service.quicksettings; import android.annotation.NonNull; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; Loading @@ -41,6 +42,8 @@ import android.view.WindowManager; import com.android.internal.R; import java.util.Objects; /** * 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 @@ -341,9 +344,9 @@ public class TileService extends Service { * Will collapse Quick Settings after launching. * * @param pendingIntent A PendingIntent for an Activity to be launched immediately. * @hide */ public void startActivityAndCollapse(PendingIntent pendingIntent) { public final void startActivityAndCollapse(@NonNull PendingIntent pendingIntent) { Objects.requireNonNull(pendingIntent); try { mService.startActivity(mTileToken, pendingIntent); } catch (RemoteException e) { Loading Loading
core/api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -40195,12 +40195,14 @@ package android.service.quicksettings { public final class Tile implements android.os.Parcelable { method public int describeContents(); method @Nullable public android.app.PendingIntent getActivityLaunchForClick(); method public CharSequence getContentDescription(); method public android.graphics.drawable.Icon getIcon(); method public CharSequence getLabel(); method public int getState(); method @Nullable public CharSequence getStateDescription(); method @Nullable public CharSequence getSubtitle(); method public void setActivityLaunchForClick(@Nullable android.app.PendingIntent); method public void setContentDescription(CharSequence); method public void setIcon(android.graphics.drawable.Icon); method public void setLabel(CharSequence); Loading Loading @@ -40229,6 +40231,7 @@ package android.service.quicksettings { method public static final void requestListeningState(android.content.Context, android.content.ComponentName); method public final void showDialog(android.app.Dialog); method public final void startActivityAndCollapse(android.content.Intent); method public final void startActivityAndCollapse(@NonNull android.app.PendingIntent); method public final void unlockAndRun(Runnable); field public static final String ACTION_QS_TILE = "android.service.quicksettings.action.QS_TILE"; field public static final String ACTION_QS_TILE_PREFERENCES = "android.service.quicksettings.action.QS_TILE_PREFERENCES";
core/java/android/service/quicksettings/Tile.java +0 −2 Original line number Diff line number Diff line Loading @@ -227,7 +227,6 @@ public final class Tile implements Parcelable { /** * Gets the Activity {@link PendingIntent} to be launched when the tile is clicked. * @hide */ @Nullable public PendingIntent getActivityLaunchForClick() { Loading @@ -243,7 +242,6 @@ public final class Tile implements Parcelable { * (This is the default behavior if this method is never called.) * @param pendingIntent a PendingIntent for an activity to be launched onclick, or {@code null} * to handle the clicks in the `TileService`. * @hide */ public void setActivityLaunchForClick(@Nullable PendingIntent pendingIntent) { if (pendingIntent != null && !pendingIntent.isActivity()) { Loading
core/java/android/service/quicksettings/TileService.java +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package android.service.quicksettings; import android.annotation.NonNull; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; Loading @@ -41,6 +42,8 @@ import android.view.WindowManager; import com.android.internal.R; import java.util.Objects; /** * 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 @@ -341,9 +344,9 @@ public class TileService extends Service { * Will collapse Quick Settings after launching. * * @param pendingIntent A PendingIntent for an Activity to be launched immediately. * @hide */ public void startActivityAndCollapse(PendingIntent pendingIntent) { public final void startActivityAndCollapse(@NonNull PendingIntent pendingIntent) { Objects.requireNonNull(pendingIntent); try { mService.startActivity(mTileToken, pendingIntent); } catch (RemoteException e) { Loading