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

Commit 3a247b19 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Removes EphemrealResolverService and related"

parents b78bb44a 5564f880
Loading
Loading
Loading
Loading
+0 −50
Original line number Diff line number Diff line
package android.app {

  public abstract deprecated class EphemeralResolverService extends android.app.InstantAppResolverService {
    ctor public EphemeralResolverService();
    method public android.os.Looper getLooper();
    method public abstract deprecated java.util.List<android.content.pm.EphemeralResolveInfo> onEphemeralResolveInfoList(int[], int);
    method public android.content.pm.EphemeralResolveInfo onGetEphemeralIntentFilter(java.lang.String);
    method public java.util.List<android.content.pm.EphemeralResolveInfo> onGetEphemeralResolveInfo(int[]);
  }

  public class Notification implements android.os.Parcelable {
    method public static java.lang.Class<? extends android.app.Notification.Style> getNotificationStyleClass(java.lang.String);
  }
@@ -31,10 +23,7 @@ package android.content {

  public class Intent implements java.lang.Cloneable android.os.Parcelable {
    field public static final deprecated java.lang.String ACTION_DEVICE_INITIALIZATION_WIZARD = "android.intent.action.DEVICE_INITIALIZATION_WIZARD";
    field public static final deprecated java.lang.String ACTION_EPHEMERAL_RESOLVER_SETTINGS = "android.intent.action.EPHEMERAL_RESOLVER_SETTINGS";
    field public static final deprecated java.lang.String ACTION_INSTALL_EPHEMERAL_PACKAGE = "android.intent.action.INSTALL_EPHEMERAL_PACKAGE";
    field public static final deprecated java.lang.String ACTION_MASTER_CLEAR = "android.intent.action.MASTER_CLEAR";
    field public static final deprecated java.lang.String ACTION_RESOLVE_EPHEMERAL_PACKAGE = "android.intent.action.RESOLVE_EPHEMERAL_PACKAGE";
    field public static final deprecated java.lang.String ACTION_SERVICE_STATE = "android.intent.action.SERVICE_STATE";
    field public static final deprecated java.lang.String EXTRA_CDMA_DEFAULT_ROAMING_INDICATOR = "cdmaDefaultRoamingIndicator";
    field public static final deprecated java.lang.String EXTRA_CDMA_ROAMING_INDICATOR = "cdmaRoamingIndicator";
@@ -62,45 +51,6 @@ package android.content {

}

package android.content.pm {

  public final deprecated class EphemeralIntentFilter implements android.os.Parcelable {
    ctor public EphemeralIntentFilter(java.lang.String, java.util.List<android.content.IntentFilter>);
    method public int describeContents();
    method public java.util.List<android.content.IntentFilter> getFilters();
    method public java.lang.String getSplitName();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.EphemeralIntentFilter> CREATOR;
  }

  public final deprecated class EphemeralResolveInfo implements android.os.Parcelable {
    ctor public deprecated EphemeralResolveInfo(android.net.Uri, java.lang.String, java.util.List<android.content.IntentFilter>);
    ctor public deprecated EphemeralResolveInfo(android.content.pm.EphemeralResolveInfo.EphemeralDigest, java.lang.String, java.util.List<android.content.pm.EphemeralIntentFilter>);
    ctor public EphemeralResolveInfo(android.content.pm.EphemeralResolveInfo.EphemeralDigest, java.lang.String, java.util.List<android.content.pm.EphemeralIntentFilter>, int);
    ctor public EphemeralResolveInfo(java.lang.String, java.lang.String, java.util.List<android.content.pm.EphemeralIntentFilter>);
    method public int describeContents();
    method public byte[] getDigestBytes();
    method public int getDigestPrefix();
    method public deprecated java.util.List<android.content.IntentFilter> getFilters();
    method public java.util.List<android.content.pm.EphemeralIntentFilter> getIntentFilters();
    method public java.lang.String getPackageName();
    method public int getVersionCode();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.EphemeralResolveInfo> CREATOR;
    field public static final java.lang.String SHA_ALGORITHM = "SHA-256";
  }

  public static final class EphemeralResolveInfo.EphemeralDigest implements android.os.Parcelable {
    ctor public EphemeralResolveInfo.EphemeralDigest(java.lang.String);
    method public int describeContents();
    method public byte[][] getDigestBytes();
    method public int[] getDigestPrefix();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.pm.EphemeralResolveInfo.EphemeralDigest> CREATOR;
  }

}

package android.media.tv {

  public final class TvInputManager {
+0 −104
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.app;

import android.annotation.SystemApi;
import android.content.pm.EphemeralResolveInfo;
import android.content.pm.InstantAppResolveInfo;
import android.os.Build;
import android.os.Looper;
import android.util.Log;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Base class for implementing the resolver service.
 * @hide
 * @removed
 * @deprecated use InstantAppResolverService instead
 */
@Deprecated
@SystemApi
public abstract class EphemeralResolverService extends InstantAppResolverService {
    private static final boolean DEBUG_EPHEMERAL = Build.IS_DEBUGGABLE;
    private static final String TAG = "PackageManager";

    /**
     * Called to retrieve resolve info for ephemeral applications.
     *
     * @param digestPrefix The hash prefix of the ephemeral's domain.
     * @param prefixMask A mask that was applied to each digest prefix. This should
     *      be used when comparing against the digest prefixes as all bits might
     *      not be set.
     * @deprecated use {@link #onGetEphemeralResolveInfo(int[])} instead
     */
    @Deprecated
    public abstract List<EphemeralResolveInfo> onEphemeralResolveInfoList(
            int digestPrefix[], int prefix);

    /**
     * Called to retrieve resolve info for ephemeral applications.
     *
     * @param digestPrefix The hash prefix of the ephemeral's domain.
     */
    public List<EphemeralResolveInfo> onGetEphemeralResolveInfo(int digestPrefix[]) {
        return onEphemeralResolveInfoList(digestPrefix, 0xFFFFF000);
    }

    /**
     * Called to retrieve intent filters for ephemeral applications.
     *
     * @param hostName The name of the host to get intent filters for.
     */
    public EphemeralResolveInfo onGetEphemeralIntentFilter(String hostName) {
        throw new IllegalStateException("Must define");
    }

    @Override
    public Looper getLooper() {
        return super.getLooper();
    }

    void _onGetInstantAppResolveInfo(int[] digestPrefix, String token,
            InstantAppResolutionCallback callback) {
        if (DEBUG_EPHEMERAL) {
            Log.d(TAG, "Legacy resolver; getInstantAppResolveInfo;"
                    + " prefix: " + Arrays.toString(digestPrefix));
        }
        final List<EphemeralResolveInfo> response = onGetEphemeralResolveInfo(digestPrefix);
        final int responseSize = response == null ? 0 : response.size();
        final List<InstantAppResolveInfo> resultList = new ArrayList<>(responseSize);
        for (int i = 0; i < responseSize; i++) {
            resultList.add(response.get(i).getInstantAppResolveInfo());
        }
        callback.onInstantAppResolveInfo(resultList);
    }

    void _onGetInstantAppIntentFilter(int[] digestPrefix, String token,
            String hostName, InstantAppResolutionCallback callback) {
        if (DEBUG_EPHEMERAL) {
            Log.d(TAG, "Legacy resolver; getInstantAppIntentFilter;"
                    + " prefix: " + Arrays.toString(digestPrefix));
        }
        final EphemeralResolveInfo response = onGetEphemeralIntentFilter(hostName);
        final List<InstantAppResolveInfo> resultList = new ArrayList<>(1);
        resultList.add(response.getInstantAppResolveInfo());
        callback.onInstantAppResolveInfo(resultList);
    }
}
+5 −5
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ import java.util.List;
 */
@SystemApi
public abstract class InstantAppResolverService extends Service {
    private static final boolean DEBUG_EPHEMERAL = Build.IS_DEBUGGABLE;
    private static final boolean DEBUG_INSTANT = Build.IS_DEBUGGABLE;
    private static final String TAG = "PackageManager";

    /** @hide */
@@ -133,7 +133,7 @@ public abstract class InstantAppResolverService extends Service {
            @Override
            public void getInstantAppResolveInfoList(Intent sanitizedIntent, int[] digestPrefix,
                    String token, int sequence, IRemoteCallback callback) {
                if (DEBUG_EPHEMERAL) {
                if (DEBUG_INSTANT) {
                    Slog.v(TAG, "[" + token + "] Phase1 called; posting");
                }
                final SomeArgs args = SomeArgs.obtain();
@@ -148,7 +148,7 @@ public abstract class InstantAppResolverService extends Service {
            @Override
            public void getInstantAppIntentFilterList(Intent sanitizedIntent,
                    int[] digestPrefix, String token, IRemoteCallback callback) {
                if (DEBUG_EPHEMERAL) {
                if (DEBUG_INSTANT) {
                    Slog.v(TAG, "[" + token + "] Phase2 called; posting");
                }
                final SomeArgs args = SomeArgs.obtain();
@@ -203,7 +203,7 @@ public abstract class InstantAppResolverService extends Service {
                    final String token = (String) args.arg3;
                    final Intent intent = (Intent) args.arg4;
                    final int sequence = message.arg1;
                    if (DEBUG_EPHEMERAL) {
                    if (DEBUG_INSTANT) {
                        Slog.d(TAG, "[" + token + "] Phase1 request;"
                                + " prefix: " + Arrays.toString(digestPrefix));
                    }
@@ -217,7 +217,7 @@ public abstract class InstantAppResolverService extends Service {
                    final int[] digestPrefix = (int[]) args.arg2;
                    final String token = (String) args.arg3;
                    final Intent intent = (Intent) args.arg4;
                    if (DEBUG_EPHEMERAL) {
                    if (DEBUG_INSTANT) {
                        Slog.d(TAG, "[" + token + "] Phase2 request;"
                                + " prefix: " + Arrays.toString(digestPrefix));
                    }
+0 −30
Original line number Diff line number Diff line
@@ -1553,16 +1553,6 @@ public class Intent implements Parcelable, Cloneable {
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_INSTALL_FAILURE = "android.intent.action.INSTALL_FAILURE";

    /**
     * @hide
     * @removed
     * @deprecated Do not use. This will go away.
     *     Replace with {@link #ACTION_INSTALL_INSTANT_APP_PACKAGE}.
     */
    @SystemApi
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_INSTALL_EPHEMERAL_PACKAGE
            = "android.intent.action.INSTALL_EPHEMERAL_PACKAGE";
    /**
     * Activity Action: Launch instant application installer.
     * <p class="note">
@@ -1576,16 +1566,6 @@ public class Intent implements Parcelable, Cloneable {
    public static final String ACTION_INSTALL_INSTANT_APP_PACKAGE
            = "android.intent.action.INSTALL_INSTANT_APP_PACKAGE";

    /**
     * @hide
     * @removed
     * @deprecated Do not use. This will go away.
     *     Replace with {@link #ACTION_RESOLVE_INSTANT_APP_PACKAGE}.
     */
    @SystemApi
    @SdkConstant(SdkConstantType.SERVICE_ACTION)
    public static final String ACTION_RESOLVE_EPHEMERAL_PACKAGE
            = "android.intent.action.RESOLVE_EPHEMERAL_PACKAGE";
    /**
     * Service Action: Resolve instant application.
     * <p>
@@ -1600,16 +1580,6 @@ public class Intent implements Parcelable, Cloneable {
    public static final String ACTION_RESOLVE_INSTANT_APP_PACKAGE
            = "android.intent.action.RESOLVE_INSTANT_APP_PACKAGE";

    /**
     * @hide
     * @removed
     * @deprecated Do not use. This will go away.
     *     Replace with {@link #ACTION_INSTANT_APP_RESOLVER_SETTINGS}.
     */
    @SystemApi
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_EPHEMERAL_RESOLVER_SETTINGS
            = "android.intent.action.EPHEMERAL_RESOLVER_SETTINGS";
    /**
     * Activity Action: Launch instant app settings.
     *
+0 −85
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.content.pm;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.IntentFilter;
import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Information about an ephemeral application intent filter.
 * @hide
 * @removed
 */
@Deprecated
@SystemApi
public final class EphemeralIntentFilter implements Parcelable {
    private final InstantAppIntentFilter mInstantAppIntentFilter;

    public EphemeralIntentFilter(@Nullable String splitName, @NonNull List<IntentFilter> filters) {
        mInstantAppIntentFilter = new InstantAppIntentFilter(splitName, filters);
    }

    EphemeralIntentFilter(@NonNull InstantAppIntentFilter intentFilter) {
        mInstantAppIntentFilter = intentFilter;
    }

    EphemeralIntentFilter(Parcel in) {
        mInstantAppIntentFilter = in.readParcelable(null /*loader*/);
    }

    public String getSplitName() {
        return mInstantAppIntentFilter.getSplitName();
    }

    public List<IntentFilter> getFilters() {
        return mInstantAppIntentFilter.getFilters();
    }

    /** @hide */
    InstantAppIntentFilter getInstantAppIntentFilter() {
        return mInstantAppIntentFilter;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel out, int flags) {
        out.writeParcelable(mInstantAppIntentFilter, flags);
    }

    public static final Parcelable.Creator<EphemeralIntentFilter> CREATOR
            = new Parcelable.Creator<EphemeralIntentFilter>() {
        @Override
        public EphemeralIntentFilter createFromParcel(Parcel in) {
            return new EphemeralIntentFilter(in);
        }
        @Override
        public EphemeralIntentFilter[] newArray(int size) {
            return new EphemeralIntentFilter[size];
        }
    };
}
Loading