From 33b3e53faa8b9b774fba9a4417bea854bc881a99 Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Thu, 25 Feb 2021 14:43:21 +0900 Subject: [PATCH] Use the R checkAndNoteWriteSettingsOperation method. In S, there is a new overload that takes an attribution tag as well. Don't use this method yet, and add a TODO to call it via a shim. Bug: 167645754 Test: m com.android.tethering Ignore-AOSP-First: needed to sync mainline-prod with AOSP Change-Id: Ib49a73aa28d3abfc1b8f1cdad84abb022c49efe8 Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef --- .../com/android/networkstack/tethering/TetheringService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tethering/src/com/android/networkstack/tethering/TetheringService.java b/Tethering/src/com/android/networkstack/tethering/TetheringService.java index f3cd549186..1622175809 100644 --- a/Tethering/src/com/android/networkstack/tethering/TetheringService.java +++ b/Tethering/src/com/android/networkstack/tethering/TetheringService.java @@ -302,8 +302,10 @@ public class TetheringService extends Service { boolean checkAndNoteWriteSettingsOperation(@NonNull Context context, int uid, @NonNull String callingPackage, @Nullable String callingAttributionTag, boolean throwException) { + // TODO: on S and above, pass the attribution tag to Settings instead of throwing it away. + // This will likely require a SettingsShim class. return Settings.checkAndNoteWriteSettingsOperation(context, uid, callingPackage, - callingAttributionTag, throwException); + throwException); } /**