Move transport client code back to the main target

In ag/9433204 this code was separated into its own library for a feature
that was cancelled. It doesn't make sense to keep it separate anymore.

Test: m
  atest BackupTransportClientTest.java
  atest CtsBackupHostTestCases
Bug: 210083465
Change-Id: I6b5a6bb45563c16b359f0281aac2c28bce03a6fd
This commit is contained in:
Sarp Misoglu
2022-09-15 13:37:53 +01:00
parent 2d8b102ef1
commit b6faae9f7d
14 changed files with 6 additions and 30 deletions

View File

@@ -19,5 +19,5 @@ java_library_static {
defaults: ["platform_service_defaults"],
srcs: [":services.backup-sources"],
libs: ["services.core"],
static_libs: ["backuplib", "app-compat-annotations"],
static_libs: ["app-compat-annotations"],
}

View File

@@ -1,21 +0,0 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
filegroup {
name: "backuplib-sources",
srcs: ["java/**/*.java"],
path: "java",
visibility: ["//frameworks/base/services"],
}
java_library {
name: "backuplib",
srcs: [":backuplib-sources"],
libs: ["services.core"],
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 The Android Open Source Project
* Copyright (C) 2022 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.
@@ -376,7 +376,7 @@ public class BackupTransportClient {
try {
return future.get(600, TimeUnit.SECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException
| CancellationException e) {
| CancellationException e) {
Slog.w(TAG, "Failed to get result from transport:", e);
return null;
} finally {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017 The Android Open Source Project
* Copyright (C) 2022 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.
@@ -11,15 +11,13 @@
* 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
* limitations under the License.
*/
package com.android.server.backup.transport;
import android.annotation.Nullable;
import com.android.server.backup.transport.BackupTransportClient;
/**
* Listener to be called by {@link TransportConnection#connectAsync(TransportConnectionListener,
* String)}.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 The Android Open Source Project
* Copyright (C) 2022 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.

View File

@@ -41,7 +41,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.List;
import java.util.concurrent.CancellationException;
@Presubmit
@RunWith(AndroidJUnit4.class)