Remove CaptivePortal deps on @hide MetricEvents
The legacy metrics are deprecated, and CaptivePortal is planned to move to a connectivity-specific jar which cannot reference MetricsEvents. Bug: 171540887 Test: m Change-Id: I409375de3844a7fedef707cf9e19a106d82a8e3a
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package android.net;
|
package android.net;
|
||||||
|
|
||||||
import android.annotation.IntDef;
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.RequiresPermission;
|
import android.annotation.RequiresPermission;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
@@ -24,8 +23,6 @@ import android.os.Parcel;
|
|||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
|
||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class allowing apps handling the {@link ConnectivityManager#ACTION_CAPTIVE_PORTAL_SIGN_IN}
|
* A class allowing apps handling the {@link ConnectivityManager#ACTION_CAPTIVE_PORTAL_SIGN_IN}
|
||||||
* activity to indicate to the system different outcomes of captive portal sign in. This class is
|
* activity to indicate to the system different outcomes of captive portal sign in. This class is
|
||||||
@@ -74,17 +71,6 @@ public class CaptivePortal implements Parcelable {
|
|||||||
|
|
||||||
private final IBinder mBinder;
|
private final IBinder mBinder;
|
||||||
|
|
||||||
/** @hide */
|
|
||||||
@IntDef(value = {
|
|
||||||
MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_ACTIVITY,
|
|
||||||
MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_DISMISSED,
|
|
||||||
MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_UNWANTED,
|
|
||||||
MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_WANTED_AS_IS,
|
|
||||||
MetricsEvent.CAPTIVE_PORTAL_LOGIN_ACTIVITY_SSL_ERROR,
|
|
||||||
})
|
|
||||||
public @interface EventId {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public CaptivePortal(@NonNull IBinder binder) {
|
public CaptivePortal(@NonNull IBinder binder) {
|
||||||
mBinder = binder;
|
mBinder = binder;
|
||||||
@@ -176,7 +162,7 @@ public class CaptivePortal implements Parcelable {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public void logEvent(@EventId int eventId, @NonNull String packageName) {
|
public void logEvent(int eventId, @NonNull String packageName) {
|
||||||
try {
|
try {
|
||||||
ICaptivePortal.Stub.asInterface(mBinder).logEvent(eventId, packageName);
|
ICaptivePortal.Stub.asInterface(mBinder).logEvent(eventId, packageName);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user