fix soft reboot caused by KeyStore exception

The Mac handle obtained from AndroidKeyStore is sometimes invalidated by
the AndroidKeyStore based on some LRU technique.

This change make sure that we always get a valid handle.
And adds exception handling to make sure a crash will not happen for the
same reason again.

If KeyStore continuously fails to generate MAC address, we will use
locally generated MAC as it is the next best option.

Bug: 146203882
Test: atest FrameworksWifiTests

Merged-In: I8a3b810ba95898a96d81fe57979db4787e1a46c4
Change-Id: I8a3b810ba95898a96d81fe57979db4787e1a46c4
(cherry-picked from 98337b741c90d895791851bde6a2e66dccb2d938)
4 files changed
tree: 0d3fe84aa36c694b079700a183289e134998df30
  1. service/
  2. PREUPLOAD.cfg