From 60f7aa1bd897e0aa5159c97e60aad35017e4f1c1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 23 Jan 2026 15:05:01 -0500 Subject: [PATCH] Adjust the ignore tags in the auth snippets to make them look more complete. --- .../com/example/wear/snippets/auth/WristDetectionUtility.kt | 2 +- .../com/example/wear/snippets/datalayer/DataLayerService.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wear/src/main/java/com/example/wear/snippets/auth/WristDetectionUtility.kt b/wear/src/main/java/com/example/wear/snippets/auth/WristDetectionUtility.kt index 12a636aa5..24baf9a07 100644 --- a/wear/src/main/java/com/example/wear/snippets/auth/WristDetectionUtility.kt +++ b/wear/src/main/java/com/example/wear/snippets/auth/WristDetectionUtility.kt @@ -24,7 +24,6 @@ private const val PIXEL_WRIST_AUTOLOCK_SETTING_STATE = "wrist_detection_auto_loc // [START android_wear_auth_wrist_detection] fun isWristDetectionAutoLockingEnabled(context: Context): Boolean { - // [END android_wear_auth_wrist_detection] // Use the keyguard manager to check for the presence of a lock mechanism val keyguardManager = context.getSystemService() val isSecured = keyguardManager?.isDeviceSecure == true @@ -37,3 +36,4 @@ fun isWristDetectionAutoLockingEnabled(context: Context): Boolean { return isSecured && isWristDetectionOn } +// [END android_wear_auth_wrist_detection] diff --git a/wear/src/main/java/com/example/wear/snippets/datalayer/DataLayerService.kt b/wear/src/main/java/com/example/wear/snippets/datalayer/DataLayerService.kt index 5197db3ae..6b818c108 100644 --- a/wear/src/main/java/com/example/wear/snippets/datalayer/DataLayerService.kt +++ b/wear/src/main/java/com/example/wear/snippets/datalayer/DataLayerService.kt @@ -72,15 +72,16 @@ class AuthDataListenerService : WearableListenerService() { .getString("token") // Display an interstitial screen to notify the user that they're being signed // in. Then, store the token and use it in network requests. -// [END android_wear_datalayer_auth_token_sharing_listener] handleSignInSequence(token) } } } } + /** placeholder sign in handler. */ fun handleSignInSequence(token: String?) {} } +// [END android_wear_datalayer_auth_token_sharing_listener] // [START android_wear_datalayer_ondatachangedlisteneer] class MainActivity : Activity(), DataClient.OnDataChangedListener {