Skip to content
This repository was archived by the owner on Jun 14, 2022. It is now read-only.
This repository was archived by the owner on Jun 14, 2022. It is now read-only.

andOTP locked after opening, closing, connecting or disconnecting a keyboard #592

@cameel

Description

@cameel

General information

  • andOTP 0.7.1.1
  • F-Droid
  • Android 9
  • LIneageOS 16

Expected result

On a phone with a physical slide-out keyboard the application requires authentication every time you slide it in or out. It's different from #152 since it happens no matter whether screen orientation changes in the process or not.

Also the message displayed on screen is a bit different. Normally it says "Please authenticate to start andOTP!" but in this case it's "Please confirm your authentication to generate the new encryption key!". I'm not sure what new encryption key it refers to.

I tried this also with a full keyboard connected via USB and behavior is very similar. When you connect or disconnect it, the application gets locked and requires authentication. The only difference is that it requires you to enter the PIN twice - first press of the "Unlock" button makes the authentication screen immediately appear again, with cleared PIN textbox and you need to enter it again. I think that I've seen situations where it needs to be entered even more than twice or when "Please authenticate to start andOTP!" screen appears too but I could not reliably reproduce it. I have a feeling that in some cases several authentication screens get "stacked" in the background.

This behavior does not happen when just connecting to the computer via a USB cable, only if it's a keyboard being connected.

Logcat

Closing the built-in keyboard

06-21 16:59:15.167   752   778 I LightService: setKeyboardBacklightLocked: mSliderOpen=false mLcdBacklightOn=true
06-21 16:59:15.169  1342  1591 D WindowManager: Sending cover change broadcast, mLidState=0
06-21 16:59:15.179  1342  1591 I ActivityManager: Config changes=20 {1.0 ?mcc?mnc [en_US] ldltr sw514dp w980dp h490dp 336dpi lrg long land finger qwerty/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 2160, 1080) mAppBounds=Rect(0, 0 - 2059, 1080) mWindowingMode=fullscreen mActivityType=undefined} s.456}
06-21 16:59:15.223 18709 18709 I InputAttributes: InputType.TYPE_NULL is specified
06-21 16:59:15.234  1342  1591 I ActivityManager: Override config changes=20 {1.0 ?mcc?mnc [en_US] ldltr sw514dp w980dp h490dp 336dpi lrg long land finger qwerty/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 2160, 1080) mAppBounds=Rect(0, 0 - 2059, 1080) mWindowingMode=fullscreen mActivityType=undefined} s.456} for displayId=0
06-21 16:59:15.256   796   796 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
06-21 16:59:15.266  1342  1591 V LightsService: setLight #2: color=#ffffffff: brightnessMode=0
06-21 16:59:15.257   796   796 I chatty  : uid=1000(system) /system/bin/surfaceflinger identical 2 lines
06-21 16:59:15.257   796   796 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
06-21 16:59:15.266  1342  1591 I LightsService: setLight_native: light=2 colorARGB=ffffffff flashMode=0 onMS=0 offMS=0 brightnessMode=0 brightnessLevel=0
06-21 16:59:15.266  1342  1591 E LightsService: Light requested not available on this device. 2
06-21 16:59:15.322  1342  1342 D NotificationService: handleSavePolicyFile
06-21 16:59:15.332  1342 10514 I ActivityManager: START u0 {cmp=org.shadowice.flocke.andotp/.Activities.AuthenticateActivity (has extras)} from uid 10090
06-21 16:59:15.361 19305 19305 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@8666977
06-21 16:59:15.366   796  1298 W SurfaceFlinger: Attempting to destroy on removed layer: 330a727 DockedStackDivider#0
06-21 16:59:15.380 11823 11823 W StaticLayout: maxLineHeight should not be -1.  maxLines:1 lineCount:1
06-21 16:59:15.404  1342  1543 I WindowManager: Screen frozen for +158ms due to Window{e500bc8 u0 StatusBar}
06-21 16:59:15.380 11823 11823 W StaticLayout: maxLineHeight should not be -1.  maxLines:1 lineCount:1
06-21 16:59:15.405   796  1298 D SurfaceFlinger: duplicate layer name: changing BlackSurface to BlackSurface#1
06-21 16:59:15.406   796   858 D SurfaceFlinger: duplicate layer name: changing BlackSurface to BlackSurface#2
06-21 16:59:15.407   796  1298 D SurfaceFlinger: duplicate layer name: changing BlackSurface to BlackSurface#3
06-21 16:59:15.758   796   796 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0

Opening the built-in keyboard:

06-21 17:01:24.177   752   778 I LightService: setKeyboardBacklightLocked: mSliderOpen=true mLcdBacklightOn=true
06-21 17:01:24.178  1342  1591 D WindowManager: Sending cover change broadcast, mLidState=1
06-21 17:01:24.184  1342  1591 I ActivityManager: Config changes=20 {1.0 ?mcc?mnc [en_US] ldltr sw514dp w980dp h490dp 336dpi lrg long land finger qwerty/v/v -nav/h winConfig={ mBounds=Rect(0, 0 - 2160, 1080) mAppBounds=Rect(0, 0 - 2059, 1080) mWindowingMode=fullscreen mActivityType=undefined} s.459}
06-21 17:01:24.231 18709 18709 I InputAttributes: InputType.TYPE_NULL is specified
06-21 17:01:24.243  1342  1591 I ActivityManager: Override config changes=20 {1.0 ?mcc?mnc [en_US] ldltr sw514dp w980dp h490dp 336dpi lrg long land finger qwerty/v/v -nav/h winConfig={ mBounds=Rect(0, 0 - 2160, 1080) mAppBounds=Rect(0, 0 - 2059, 1080) mWindowingMode=fullscreen mActivityType=undefined} s.459} for displayId=0
06-21 17:01:24.260   796   796 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
06-21 17:01:24.344  1342  1342 D NotificationService: handleSavePolicyFile
06-21 17:01:24.356  1342  1342 D NotificationService: handleSavePolicyFile
06-21 17:01:24.361  1342 10219 I ActivityManager: START u0 {cmp=org.shadowice.flocke.andotp/.Activities.AuthenticateActivity (has extras)} from uid 10090
06-21 17:01:24.261   796   796 I chatty  : uid=1000(system) /system/bin/surfaceflinger identical 2 lines
06-21 17:01:24.261   796   796 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
06-21 17:01:24.376 11823 11823 W StaticLayout: maxLineHeight should not be -1.  maxLines:1 lineCount:1
06-21 17:01:24.377 11823 11823 W StaticLayout: maxLineHeight should not be -1.  maxLines:1 lineCount:1
06-21 17:01:24.385 19305 19305 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@dd5709b
06-21 17:01:24.393  1342  1543 I WindowManager: Screen frozen for +141ms due to Window{e500bc8 u0 StatusBar}
06-21 17:01:24.395   796  1298 D SurfaceFlinger: duplicate layer name: changing BlackSurface to BlackSurface#1
06-21 17:01:24.396   796  1298 D SurfaceFlinger: duplicate layer name: changing BlackSurface to BlackSurface#2
06-21 17:01:24.397   796  1298 D SurfaceFlinger: duplicate layer name: changing BlackSurface to BlackSurface#3
06-21 17:01:24.480 18709 18709 I LatinIME: Starting input. Cursor position = 0,0
06-21 17:01:24.884   796   796 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0

Steps to reproduce

  • Start the application and go to the list of OTPs
  • Slide out or in the built-in keyboard. Or connect/disconnect a full keyboard via USB.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions