KeyStore: change migrate to duplicate

After discussion, it was determined that duplicate would be less
disruptive and it still fit in the current HAL model.

Change-Id: I2f9cae48d38ec7146511e876450fa39fc92cda55

Conflicts:
	core/java/android/security/IKeystoreService.java
	keystore/java/android/security/KeyStore.java
	keystore/tests/src/android/security/KeyStoreTest.java
Add interrupter library to simulate EINTR

To check for robustness against EINTR from syscalls, add an
interrupter library that can be preloaded with LD_PRELOAD.

Change-Id: I87ea3cb70920238991b2e5fdcfbf56a837e6beda
Check outInfo is not null

Only call keystore if outInfo is not null

(cherry picked from commit 3b9933d0c2f2b9a2e973dca296ee45a69087e31c)

Bug: 8568820
Change-Id: I764980fd396dbc637732ad290eea2bd11036ec28

Conflicts:
	services/java/com/android/server/pm/PackageManagerService.java
fix build

Change-Id: I1111058863cc50b5932a748fbaa2eec5c2a12bb1
Fixed the problem ime invisible status despite being the icon that appears in the statusbar.

[Reproduce the Path]
Precondition : Set "Auto-rotate screen" option to ENABLE

Calendar App lunch -> Rotate device to "Landscape" -> Touch "+" button(Add new Schedule)
-> Check the ime icons of the Status bar

Ime invisible status despite being the icon that appears in the statusbar.
Displays an icon in the status bar when the ime was actually visible state is modified to check.

Change-Id: I90df3ac7fde24fadf8ff71318a1454a9f08056a2
It helps to catch the right exception.

Bug: 7238149
Change-Id: I5b0ba2adcf22c33b767ec24d913a8bc5ccd0524b