Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2c8bc6d authored by Mehdi Alizadeh's avatar Mehdi Alizadeh
Browse files

Deprecates ChooserTargetService APIs

Bug: 148416928
Test: Verify it builds
Change-Id: Ica559d5018167b3ac479d80de01dd3b04fcc42e6
parent 1ea91ab3
Loading
Loading
Loading
Loading
+18 −18
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ package android {
    field public static final String BIND_CARRIER_MESSAGING_CLIENT_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_CLIENT_SERVICE";
    field @Deprecated public static final String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
    field public static final String BIND_CARRIER_SERVICES = "android.permission.BIND_CARRIER_SERVICES";
    field public static final String BIND_CHOOSER_TARGET_SERVICE = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
    field @Deprecated public static final String BIND_CHOOSER_TARGET_SERVICE = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
    field public static final String BIND_CONDITION_PROVIDER_SERVICE = "android.permission.BIND_CONDITION_PROVIDER_SERVICE";
    field public static final String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
    field public static final String BIND_DREAM_SERVICE = "android.permission.BIND_DREAM_SERVICE";
@@ -42360,25 +42360,25 @@ package android.service.carrier {
package android.service.chooser {
  public final class ChooserTarget implements android.os.Parcelable {
    ctor public ChooserTarget(CharSequence, android.graphics.drawable.Icon, float, android.content.ComponentName, @Nullable android.os.Bundle);
    method public int describeContents();
    method public android.content.ComponentName getComponentName();
    method public android.graphics.drawable.Icon getIcon();
    method public android.os.Bundle getIntentExtras();
    method public float getScore();
    method public CharSequence getTitle();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.chooser.ChooserTarget> CREATOR;
  @Deprecated public final class ChooserTarget implements android.os.Parcelable {
    ctor @Deprecated public ChooserTarget(CharSequence, android.graphics.drawable.Icon, float, android.content.ComponentName, @Nullable android.os.Bundle);
    method @Deprecated public int describeContents();
    method @Deprecated public android.content.ComponentName getComponentName();
    method @Deprecated public android.graphics.drawable.Icon getIcon();
    method @Deprecated public android.os.Bundle getIntentExtras();
    method @Deprecated public float getScore();
    method @Deprecated public CharSequence getTitle();
    method @Deprecated public void writeToParcel(android.os.Parcel, int);
    field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.service.chooser.ChooserTarget> CREATOR;
  }
  public abstract class ChooserTargetService extends android.app.Service {
    ctor public ChooserTargetService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract java.util.List<android.service.chooser.ChooserTarget> onGetChooserTargets(android.content.ComponentName, android.content.IntentFilter);
    field public static final String BIND_PERMISSION = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
    field public static final String META_DATA_NAME = "android.service.chooser.chooser_target_service";
    field public static final String SERVICE_INTERFACE = "android.service.chooser.ChooserTargetService";
  @Deprecated public abstract class ChooserTargetService extends android.app.Service {
    ctor @Deprecated public ChooserTargetService();
    method @Deprecated public android.os.IBinder onBind(android.content.Intent);
    method @Deprecated public abstract java.util.List<android.service.chooser.ChooserTarget> onGetChooserTargets(android.content.ComponentName, android.content.IntentFilter);
    field @Deprecated public static final String BIND_PERMISSION = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
    field @Deprecated public static final String META_DATA_NAME = "android.service.chooser.chooser_target_service";
    field @Deprecated public static final String SERVICE_INTERFACE = "android.service.chooser.ChooserTargetService";
  }
}
+5 −0
Original line number Diff line number Diff line
@@ -39,7 +39,12 @@ import android.os.Parcelable;
 * <p>Creators of chooser targets should consult the relevant design guidelines for the type
 * of target they are presenting. For example, targets involving people should be presented
 * with a circular icon.</p>
 *
 * @deprecated For publishing direct share targets, please follow the instructions in
 * https://developer.android.com/training/sharing/receive.html#providing-direct-share-targets
 * instead.
 */
@Deprecated
public final class ChooserTarget implements Parcelable {
    private static final String TAG = "ChooserTarget";

+6 −0
Original line number Diff line number Diff line
@@ -72,7 +72,13 @@ import java.util.List;
 *                 android:value=".MyChooserTargetService" />
 *     &lt;/activity>
 * </pre>
 *
 * @deprecated For publishing direct share targets, please follow the instructions in
 * https://developer.android.com/training/sharing/receive.html#providing-direct-share-targets
 * instead.
 */

@Deprecated
public abstract class ChooserTargetService extends Service {
    // TAG = "ChooserTargetService[MySubclass]";
    private final String TAG = ChooserTargetService.class.getSimpleName()
+4 −0
Original line number Diff line number Diff line
@@ -4311,6 +4311,10 @@
         android.service.chooser.ChooserTargetService}, to ensure that
         only the system can bind to it.
         <p>Protection level: signature

         @deprecated For publishing direct share targets, please follow the instructions in
         https://developer.android.com/training/sharing/receive.html#providing-direct-share-targets
         instead.
    -->
    <permission android:name="android.permission.BIND_CHOOSER_TARGET_SERVICE"
        android:protectionLevel="signature" />