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

Commit 67aea826 authored by Jeremy Joslin's avatar Jeremy Joslin Committed by Joe LaPenna
Browse files

Remove request recommendation from AIDL files.

Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.netrec.NetRecHostTest
Bug: 37357264

Change-Id: Id75938c1e3358444a9f42e12e2b293bad6559fb3
parent b1a01395
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
package android.net;

import android.net.NetworkKey;
import android.net.RecommendationRequest;
import android.os.IRemoteCallback;

/**
 * The service responsible for answering network recommendation requests.
@@ -26,20 +24,6 @@ import android.os.IRemoteCallback;
 */
oneway interface INetworkRecommendationProvider {

    /**
     * Request a recommendation for the best network to connect to
     * taking into account the inputs from the {@link RecommendationRequest}.
     *
     * @param request a {@link RecommendationRequest} instance containing the details of the request
     * @param callback a {@link IRemoteCallback} instance to invoke when the recommendation
     *                 is available
     * @param sequence an internal number used for tracking the request
     * @hide
     */
    void requestRecommendation(in RecommendationRequest request,
                               in IRemoteCallback callback,
                               int sequence);

    /**
     * Request scoring for networks.
     *
+1 −21
Original line number Diff line number Diff line
@@ -83,10 +83,7 @@ public abstract class NetworkRecommendationProvider {
     *                 {@link ResultCallback#onResult(RecommendationResult)}.
     * @deprecated to be removed.
     */
    public void onRequestRecommendation(RecommendationRequest request,
            ResultCallback callback) {
        callback.onResult(RecommendationResult.createDoNotConnectRecommendation());
    }
    public void onRequestRecommendation(RecommendationRequest request, ResultCallback callback) {}

    /**
     * Invoked when network scores have been requested.
@@ -184,23 +181,6 @@ public abstract class NetworkRecommendationProvider {
            mHandler = null;
        }

        @Override
        public void requestRecommendation(final RecommendationRequest request,
                final IRemoteCallback callback, final int sequence) throws RemoteException {
            enforceCallingPermission();
            if (VERBOSE) Log.v(TAG, "requestRecommendation(seq=" + sequence + ")");
            execute(new Runnable() {
                @Override
                public void run() {
                    if (VERBOSE) {
                        Log.v(TAG, "requestRecommendation(seq=" + sequence + ") running...");
                    }
                    ResultCallback resultCallback = new ResultCallback(callback, sequence);
                    onRequestRecommendation(request, resultCallback);
                }
            });
        }

        @Override
        public void requestScores(final NetworkKey[] networks) throws RemoteException {
            enforceCallingPermission();
+0 −19
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.net;

parcelable RecommendationRequest;
+0 −19
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.net;

parcelable RecommendationResult;