Merge the 2019-10-05 SPL branch from AOSP-Partner

* security-aosp-nyc-mr2-release:
  [RESTRICT AUTOMERGE] Pass correct realCallingUid to startActivity() from startActivityInPackage
  Fix Layout.primaryIsTrailingPreviousAllLineOffsets
  HidProfile: sync isPreferred() with HidHostService

Change-Id: I6fc0c440a21181727fc09c25c05bdf32d9b02be8