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

Commit d4238718 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7277594 from 134e84d9 to mainline-documentsui-release

Change-Id: I735b9c4e1cb763ba663598fda899322d8f361f18
parents 97d79916 134e84d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -51,7 +51,7 @@ public abstract class CaptivePortalDataShimImpl implements CaptivePortalDataShim
    }
    }


    @Override
    @Override
    public String getVenueFriendlyName() {
    public CharSequence getVenueFriendlyName() {
        // Not supported in API level 29
        // Not supported in API level 29
        return null;
        return null;
    }
    }
+1 −2
Original line number Original line Diff line number Diff line
@@ -22,7 +22,6 @@ import android.net.NetworkRequest;
import android.os.Handler;
import android.os.Handler;


import androidx.annotation.NonNull;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;


import com.android.networkstack.apishim.common.ConnectivityManagerShim;
import com.android.networkstack.apishim.common.ConnectivityManagerShim;
import com.android.networkstack.apishim.common.UnsupportedApiLevelException;
import com.android.networkstack.apishim.common.UnsupportedApiLevelException;
@@ -45,7 +44,7 @@ public class ConnectivityManagerShimImpl implements ConnectivityManagerShim {
     */
     */
    @Override
    @Override
    public void requestBackgroundNetwork(@NonNull NetworkRequest request,
    public void requestBackgroundNetwork(@NonNull NetworkRequest request,
            @Nullable Handler handler, @NonNull NetworkCallback networkCallback)
            @NonNull Handler handler, @NonNull NetworkCallback networkCallback)
            throws UnsupportedApiLevelException {
            throws UnsupportedApiLevelException {
        // Not supported for API 29.
        // Not supported for API 29.
        throw new UnsupportedApiLevelException("Not supported in API 29.");
        throw new UnsupportedApiLevelException("Not supported in API 29.");
+49 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2021 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 com.android.networkstack.apishim.api29;

import android.net.NetworkRequest;
import android.util.Range;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.networkstack.apishim.common.NetworkRequestShim;
import com.android.networkstack.apishim.common.UnsupportedApiLevelException;

import java.util.Set;

/**
 * Implementation of {@link NetworkRequestShim} for API 29.
 */
public class NetworkRequestShimImpl implements NetworkRequestShim {
    protected NetworkRequestShimImpl() {}

    /**
     * Get a new instance of {@link NetworkRequestShim}.
     */
    public static NetworkRequestShim newInstance() {
        return new NetworkRequestShimImpl();
    }

    @Override
    public void setUids(@NonNull NetworkRequest.Builder builder,
            @Nullable Set<Range<Integer>> uids) throws UnsupportedApiLevelException {
        // Not supported before API 31.
        throw new UnsupportedApiLevelException("Not supported before API 31.");
    }
}
+1 −2
Original line number Original line Diff line number Diff line
@@ -23,7 +23,6 @@ import android.os.Build;
import android.os.Handler;
import android.os.Handler;


import androidx.annotation.NonNull;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;


import com.android.networkstack.apishim.common.ConnectivityManagerShim;
import com.android.networkstack.apishim.common.ConnectivityManagerShim;
import com.android.networkstack.apishim.common.ShimUtils;
import com.android.networkstack.apishim.common.ShimUtils;
@@ -55,7 +54,7 @@ public class ConnectivityManagerShimImpl
     */
     */
    @Override
    @Override
    public void requestBackgroundNetwork(@NonNull NetworkRequest request,
    public void requestBackgroundNetwork(@NonNull NetworkRequest request,
            @Nullable Handler handler, @NonNull NetworkCallback networkCallback)
            @NonNull Handler handler, @NonNull NetworkCallback networkCallback)
            throws UnsupportedApiLevelException {
            throws UnsupportedApiLevelException {
        // Not supported for API 30.
        // Not supported for API 30.
        throw new UnsupportedApiLevelException("Not supported in API 30.");
        throw new UnsupportedApiLevelException("Not supported in API 30.");
+43 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2021 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 com.android.networkstack.apishim.api30;

import android.os.Build;

import com.android.networkstack.apishim.common.NetworkRequestShim;
import com.android.networkstack.apishim.common.ShimUtils;

/**
 * Implementation of {@link NetworkRequestShim} for API 30.
 */
public class NetworkRequestShimImpl
        extends com.android.networkstack.apishim.api29.NetworkRequestShimImpl {
    protected NetworkRequestShimImpl() {
        super();
    }

    /**
     * Get a new instance of {@link NetworkRequestShim}.
     */
    public static NetworkRequestShim newInstance() {
        if (!ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.Q)) {
            return com.android.networkstack.apishim.api29.NetworkRequestShimImpl
                    .newInstance();
        }
        return new NetworkRequestShimImpl();
    }
}
Loading