Make TTS language setting track system language.

TTS engine default locale is set independently from the system locale.
If TTS engine default locale is not set, it defaults to the system locale.
If user decides to set TTS locale, ability to default to the current system
locale is lost (until device is wiped).

This change makes settings wipe the TTS engine default locale value if user
selects language that is system language. This allows TTS to track system
language if user changes it.

If system language is not available in TTS, language field is set to
"language not selected" value.

This change require a small change in framework/base to make previously
private method public (TtsEngines.getDefaultLocale).

+ Selected language is displayed in language preference summary (matches
all other language preferences)
+ Removing and then adding "language" and 'install languages' preferences
looks glitchy, not they are disabled (grayed out) if unavailable.

Bug: 8613986
Change-Id: Ic4bde97ef7406adb64cc03efbe660275360ba3af
merge in master-release history after reset to master
merge in jb-mr2-release history after reset to jb-mr2-dev
Reconcile with jb-mr2-release - do not merge

Change-Id: I6a178af29be7f1d227b667ec84312f5d0c2fdadd
am 7e18ed8c: (-s ours) Reconcile with jb-mr2-release - do not merge

* commit '7e18ed8c14ca2047a5f82f2eb8bcab93d673d730':
Write restriction bundle right away for required apps.

User shouldn't have to go tap on the settings icon for an app that is ON by default
in a restricted profile. This way apps can write some defaults to the restricted
profile when it is created.

The app entry is also automatically removed from the list if there are no visible
restrictions.

Bug: 9074051

Also fix an incorrect dialog label. Bug: 9068877

Change-Id: I2a7ddc31fe695f58611d2ba36a8bf541b7817b10
am 0b2781ae: Write restriction bundle right away for required apps.

* commit '0b2781ae537e6d3d27863080eea0a0a5fa6c83b8':
  Write restriction bundle right away for required apps.
am 18d44684: am 0b2781ae: Write restriction bundle right away for required apps.

* commit '18d44684d3d384cc1eed114808c3870c7738e352':
  Write restriction bundle right away for required apps.
merge in jb-mr2-release history after reset to jb-mr2-dev
Reconcile with jb-mr2-release - do not merge

Change-Id: I2a202b7c38568ae9ca45a38cc01f08be05ab5d23
am ae006e70: (-s ours) Reconcile with jb-mr2-release - do not merge

* commit 'ae006e7077c9937bd90d08f7eea7fb7e580b1d57':
merge in master-release history after reset to master
Ensure all active Device Admins are listed.

Bug: 9074296
Change-Id: Ifb70c12ccea6628042b98a18186816887cb4477b
Fix issue #9074296: Device Admins can activate in a way...

...that makes it impossible to deactive/uninstall them

Don't allow device admins to directly launch the add UI if
they are malformed.

Change-Id: I0d3140222d8015f680e1f199bddae2221ee0e726
Update strings for clarity about restricted profiles

Bug: 9051422
Bug: 9051178
Change-Id: I1b88286fdd0db27bb6980d0ebbc846370fd0082e
am 8274b677: Fix issue #9074296: Device Admins can activate in a way...

* commit '8274b6770219a469ab8a5254206d0d81bd5c96d3':
  Fix issue #9074296: Device Admins can activate in a way...
am eeeccdc6: am 8274b677: Fix issue #9074296: Device Admins can activate in a way...

* commit 'eeeccdc6a3ab5640233ff46dc8864c1235687f09':
  Fix issue #9074296: Device Admins can activate in a way...
Merge "Ensure all active Device Admins are listed." into jb-mr2-dev
am 7229e29f: Merge "Ensure all active Device Admins are listed." into jb-mr2-dev

* commit '7229e29f1749ae10bd92b59ec3d663698a5045e7':
  Ensure all active Device Admins are listed.
am 1eb2064f: am 7229e29f: Merge "Ensure all active Device Admins are listed." into jb-mr2-dev

* commit '1eb2064ff495b60bbf5db1a188adcad2e677742b':
  Ensure all active Device Admins are listed.