https://code.google.com/p/android/issues/detail?id=147662
Actual Behavior: When launching the KeyChain.choosePrivateKeyAlias(...) dialog, if the user does not have PIN/Pattern/Password lockscreen security type set up, they will initially be prompted by a dialog informing them that they need to change their security type to access credential storage, with options "OK" and "Cancel". Choosing "OK" will guide them through a security type change and bring them back to the dialog to select or install a client certificate, after which, the KeyChainAliasCallback.alias(...) method is called (with the alias if chosen, or null if canceled). However, if the user presses "Cancel" on this initial security type dialog, in addition to KeyChainAliasCallback.alias(...) being called with null, the security type dialog immediately reappears. On this second appearance, choosing "OK" still guides them through the security type change, but does NOT return to the select/install client certificate dialog. Choosing "Cancel" dismisses the dialog, but does not call KeyChainAliasCallback.alias(...) a second time. Expected Behavior: Choosing "Cancel" on the initial dialog should dismiss the dialog and NOT reappear. Devices: Moto X 2013 (4.4.4), Samsung Galaxy S4 (4.4.2), Nexus 9 (5.0.1), GenyMotion emulator (4.4.4) Steps to reproduce: >From Chrome App: 1. Ensure lockscreen security is set to None or Slide 2. Open Google Chrome app 3. Enter the url of a service that requires client certificate authentication 4. Chrome should prompt you with the initial lockscreen security type dialog 5. Choose "Cancel" >From code: 1. Ensure lockscreen security is set to None or Slide 2. Make a call to KeyChain.choosePrivateKeyAlias(context, callback, null, null, hostname, -1, null) 3. The initial lockscreen security type dialog should be presented 4. Choose "Cancel" As a side note, the "Select/install client certificate" dialog informs you which app and which hostname are asking you to provide a client certificate. It would be great if that initial lockscreen security type dialog did as well. In our case, we had to precede it with an additional dialog informing the user that their service is requesting a certificate and that's why they will be prompted to change their security type. Thank you! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.