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 {