diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-08-10 05:08:34 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-08-10 05:08:34 +0000 |
| commit | e4acfba3ced27c1f469550f2e74e4b19b99e2bcb (patch) | |
| tree | bc728cafc96574f79401f6f00497c577a1905f3f /core/java | |
| parent | 584380896658f54c3c5dd1d03e0936b71b758b2a (diff) | |
| parent | 63f9a69c4440ff66e6a6c46f60f79f42df4ca277 (diff) | |
Merge "AdbService sends callback on adb debugging enabled / disabled." am: 6efa908b95 am: 870e9c266b am: c978bf0e0a am: 2e5ca8a73f am: 63f9a69c44
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1775965
Change-Id: Ib215ae3abd3bce5a01244770563e44a1560e909d
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/Android.bp | 17 | ||||
| -rw-r--r-- | core/java/android/debug/IAdbCallback.aidl | 31 | ||||
| -rw-r--r-- | core/java/android/debug/IAdbManager.aidl | 11 |
3 files changed, 59 insertions, 0 deletions
diff --git a/core/java/Android.bp b/core/java/Android.bp index 3a883d8ebfc1..427bbd82f561 100644 --- a/core/java/Android.bp +++ b/core/java/Android.bp @@ -323,6 +323,23 @@ aidl_interface { }, } +aidl_interface { + name: "android.debug_aidl", + unstable: true, + srcs: [ + "android/debug/AdbTransportType.aidl", + "android/debug/FingerprintAndPairDevice.aidl", + "android/debug/IAdbCallback.aidl", + "android/debug/IAdbManager.aidl", + "android/debug/PairDevice.aidl", + ], + backend: { + cpp: { + enabled: true, + }, + }, +} + // Avoid including Parcelable classes as we don't want to have two copies of // Parcelable cross the libraries. This is used by telephony-common (frameworks/opt/telephony) // and TeleService app (packages/services/Telephony). diff --git a/core/java/android/debug/IAdbCallback.aidl b/core/java/android/debug/IAdbCallback.aidl new file mode 100644 index 000000000000..9c8f1cfac527 --- /dev/null +++ b/core/java/android/debug/IAdbCallback.aidl @@ -0,0 +1,31 @@ +/* + * 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 android.debug; + +import android.debug.AdbTransportType; + +/** + * Callback interface of {@link android.debug.IAdbCallbackManager}. + * + * @hide + */ +oneway interface IAdbCallback { + /** + * On debugging enabled, service providing IAdbManager calls this function. + */ + void onDebuggingChanged(boolean enabled, AdbTransportType type); +} diff --git a/core/java/android/debug/IAdbManager.aidl b/core/java/android/debug/IAdbManager.aidl index d858c549c609..314c4058dd06 100644 --- a/core/java/android/debug/IAdbManager.aidl +++ b/core/java/android/debug/IAdbManager.aidl @@ -17,6 +17,7 @@ package android.debug; import android.debug.FingerprintAndPairDevice; +import android.debug.IAdbCallback; /** * Interface to communicate remotely with the {@code AdbService} in the system server. @@ -111,4 +112,14 @@ interface IAdbManager { * QR code. */ boolean isAdbWifiQrSupported(); + + /** + * Register callback for ADB debugging changed notification. + */ + void registerCallback(IAdbCallback callback); + + /** + * Unregister callback for ADB debugging changed notification. + */ + void unregisterCallback(IAdbCallback callback); } |
