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

Commit 581950cd authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Deprecates classes associated with old ContextHubManager APIs

Bug: 67734082
Bug: 69270990
Test: make update-api and make
Change-Id: I1e10eebb56175843c01d86004efbc3846af76b76
parent 61823f3a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1448,7 +1448,7 @@ package android.hardware.location {
    method public abstract void onMessageReceipt(int, int, android.hardware.location.ContextHubMessage);
  }

  public class ContextHubMessage {
  public deprecated class ContextHubMessage {
    ctor public ContextHubMessage(int, int, byte[]);
    method public int describeContents();
    method public byte[] getData();
@@ -1579,7 +1579,7 @@ package android.hardware.location {
    field public static final android.os.Parcelable.Creator<android.hardware.location.MemoryRegion> CREATOR;
  }

  public class NanoApp {
  public deprecated class NanoApp {
    ctor public NanoApp();
    ctor public deprecated NanoApp(int, byte[]);
    ctor public NanoApp(long, byte[]);
@@ -1627,7 +1627,7 @@ package android.hardware.location {
    field public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppBinary> CREATOR;
  }

  public class NanoAppFilter {
  public deprecated class NanoAppFilter {
    ctor public NanoAppFilter(long, int, int, long);
    method public int describeContents();
    method public boolean testMatch(android.hardware.location.NanoAppInstanceInfo);
@@ -1642,7 +1642,7 @@ package android.hardware.location {
    field public static final int VENDOR_ANY = -1; // 0xffffffff
  }

  public class NanoAppInstanceInfo {
  public deprecated class NanoAppInstanceInfo {
    ctor public NanoAppInstanceInfo();
    method public int describeContents();
    method public long getAppId();
+7 −2
Original line number Diff line number Diff line
@@ -19,14 +19,20 @@ package android.hardware.location;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;

import java.util.Arrays;

/**
 * @deprecated Use {@link android.hardware.location.NanoAppMessage} instead to send messages with
 *             {@link android.hardware.location.ContextHubClient#sendMessageToNanoApp(
 *             NanoAppMessage)} and receive messages with
 *             {@link android.hardware.location.ContextHubClientCallback#onMessageFromNanoApp(
 *             ContextHubClient, NanoAppMessage)}.
 *
 * @hide
 */
@SystemApi
@Deprecated
public class ContextHubMessage {
    private int mType;
    private int mVersion;
@@ -34,7 +40,6 @@ public class ContextHubMessage {

    private static final String TAG = "ContextHubMessage";


    /**
     * Get the message type
     *
+5 −0
Original line number Diff line number Diff line
@@ -28,9 +28,14 @@ import android.util.Log;
 * Nano apps are expected to be used only by bundled apps only
 * at this time.
 *
 * @deprecated Use {@link android.hardware.location.NanoAppBinary} instead to load a nanoapp with
 *             {@link android.hardware.location.ContextHubManager#loadNanoApp(
 *             ContextHubInfo, NanoAppBinary)}.
 *
 * @hide
 */
@SystemApi
@Deprecated
public class NanoApp {
    private final String TAG = "NanoApp";

+4 −1
Original line number Diff line number Diff line
@@ -16,15 +16,18 @@

package android.hardware.location;


import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * @deprecated Use {@link android.hardware.location.ContextHubManager#queryNanoApps(ContextHubInfo)}
 *             to find loaded nanoapps, which doesn't require using this class as a parameter.
 *
 * @hide
 */
@SystemApi
@Deprecated
public class NanoAppFilter {

    private static final String TAG = "NanoAppFilter";
+3 −0
Original line number Diff line number Diff line
@@ -28,9 +28,12 @@ import libcore.util.EmptyArray;
 *
 * TODO(b/69270990) Remove this class once the old API is deprecated.
 *
 * @deprecated Use {@link android.hardware.location.NanoAppState} instead.
 *
 * @hide
 */
@SystemApi
@Deprecated
public class NanoAppInstanceInfo {
    private String mPublisher = "Unknown";
    private String mName = "Unknown";