From b5a25c14e262c06fda7ee3bd3f04588129588667 Mon Sep 17 00:00:00 2001 From: Marco Loaiza Date: Fri, 13 Jan 2023 17:17:36 +0000 Subject: [PATCH] Add @TestApi to Context.updateDeviceId CTS tests have already been added in DeviceAssociationTest, but that CL missed adding the annotation in the method. This method, even if @hide, is necessary for key framework behaviors to allow for implicit device associations to work well. Bug: 266091657 Test: atest DeviceAssociationTest Change-Id: I171b14379a21f88f3111206e665c8af41a6957e0 --- core/api/test-current.txt | 1 + core/java/android/content/Context.java | 1 + 2 files changed, 2 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index f7d1fdaadd373..aaaaf48dbc772 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -758,6 +758,7 @@ package android.content { method public int getUserId(); method public void setAutofillOptions(@Nullable android.content.AutofillOptions); method public void setContentCaptureOptions(@Nullable android.content.ContentCaptureOptions); + method public void updateDeviceId(int); field public static final String ATTENTION_SERVICE = "attention"; field public static final String CONTENT_CAPTURE_MANAGER_SERVICE = "content_capture"; field public static final String DEVICE_IDLE_CONTROLLER = "deviceidle"; diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index c8d48c1892470..7fccd31d64b6f 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -7330,6 +7330,7 @@ public abstract class Context { * @see #createDeviceContext(int) * @hide */ + @TestApi public void updateDeviceId(int deviceId) { throw new RuntimeException("Not implemented. Must override in a subclass."); }