33164 Commits

Author SHA1 Message Date
Shishir Agrawal
3a86d3d534 DO NOT MERGE : Unhiding MSIM APIs.
1. Unhide MSIM APIs in TelephonyManager that already have non-MSIM equivalent
   APIs public.
2. Make MSIM API naming consistent (overloaded, no suffix).
3. Unhide APIs in SubscriptionManager that are necessary for MSIM.

Bug: 26772894
Change-Id: Ibebab7379ea79c8e4812bbd190342827048e30e2
2016-01-26 09:29:24 -08:00
Adrian Roos
20d7df3c3f Crash dialog improvements, move crash code to AppErrors
Factors out the crash and ANR handling code into separate
class and allows clearing cache and restarting app from
crash dialog.

Bug: 22692162
Change-Id: I2a08a4255ea02ab3c7441d351bf278128fcf5a5d
2016-01-26 09:16:26 -08:00
Andrei Stingaceanu
4ccec532d7 Hide suspended apps from recents
* Introduce a new boolean realActivitySuspended in TaskRecord to
keep track of the suspended state (this also makes sure the
information is persisted across reboots).
* Introduce a new method onPackagesSuspendedChanged
in RecentTasks which flips the realActivitySuspended for each
TaskRecord for the desired user and packages sent
* Register a new broadcast receiver (for SUSPEND/UNSUSPEND)
in ActivityManager#finishBooting which calls
RecentTasks#markPackagesSuspendedStateForUser
* In ActivityManagerService#getRecentTasks filter out
Taskrecords for suspended apps by checking realActivitySuspended

Bug: 22776761
Change-Id: I52e3593ccb2dae223d1ea11d017a6b1626646639
2016-01-26 16:01:30 +00:00
Zoltan Szatmary-Ban
3a8b343ce5 Introduce DEVICESUMMARY access level to NetworkStatsAccess.
Apps with PACKAGE_USAGE_STATS app op or READ_NETWORK_USAGE_HISTORY
granted can query the summarized device data usage (but not individual
uids running in other users or profiles).

Bug:26677052
Change-Id: Id51631638f338a8cf48172c9b41746228a335084
2016-01-26 13:59:52 +00:00
Shreyas Basarge
328d366003 Run PeriodicJobs only if constraints are satisfied
JobScheduler would run periodic jobs when their period
expired irrespective of whether constraints were
satisfied. This behavior is now changed to run periodic
jobs only when its constraints are satisfied.

Bug: 26735826
Change-Id: Iffd3cf7f37f1f1c8ef3a1bf4535d893cd139c158
2016-01-26 13:51:26 +00:00
Clara Bayarri
d1f722d906 Enable enrolling/authenticating a specific work profile.
This change adds support for a separate profile-specific
fingerprint database. This is to be used together with the work
challenge.

Change-Id: I65b3a74a1c887def210d7a6da0b907138f58a5ba
2016-01-26 11:37:48 +00:00
Victor Chang
697815eddb Merge "Launch managed quick contacts without contact id" 2016-01-26 10:37:55 +00:00
Alan Treadway
44a1808154 Merge "Add explicit and persistent user provisioning state." 2016-01-26 09:59:40 +00:00
Benjamin Franz
6563025006 Merge "Add SmallTest annotation to DevicePolicyManagerTest" 2016-01-26 09:52:56 +00:00
Benjamin Franz
6d00903727 Add SmallTest annotation to DevicePolicyManagerTest
Adding this annotation makes sure that the tests get picked up by
continuous integration tests.

Change-Id: Ia9166898803dd0037f6bb20cb6a12333ed347fd3
2016-01-26 09:49:51 +00:00
Jeremy Klein
15f3d21599 Implement ui-based provisioning for the new tether api.
This is dependent on ag/850648 and the Settings changes under the
uiprovisioning topic id.

BUG: 26247383
Change-Id: Ib151d56a1ece5ca3a55219abed965286eac5dd60
2016-01-25 20:02:48 -08:00
Jeremy Klein
0301cd9523 Merge "Expose a simple tethering API which includes provision checks." 2016-01-26 03:59:51 +00:00
Wei Liu
8ab7759567 Add a null check before reference networkInfo. am: b8eaf45e1d am: dca8f10031 am: a12d383117
am: 21e0927b47

* commit '21e0927b474a686d5827e059476291370c0b306e':
  Add a null check before reference networkInfo.
2016-01-26 03:16:28 +00:00
Wei Liu
21e0927b47 Add a null check before reference networkInfo. am: b8eaf45e1d am: dca8f10031
am: a12d383117

* commit 'a12d3831178616a171382f1546812c26245af2d0':
  Add a null check before reference networkInfo.
2016-01-26 03:06:09 +00:00
Wei Liu
a12d383117 Add a null check before reference networkInfo. am: b8eaf45e1d
am: dca8f10031

* commit 'dca8f10031f33c7c85577fa1abcc26d560c90388':
  Add a null check before reference networkInfo.
2016-01-26 01:57:31 +00:00
Wei Liu
dca8f10031 Add a null check before reference networkInfo.
am: b8eaf45e1d

* commit 'b8eaf45e1df007fc4f5a11bb58491abaef39cd57':
  Add a null check before reference networkInfo.
2016-01-26 01:52:12 +00:00
Jae Seo
9df90a5ab6 Merge "TIF: Recording API" 2016-01-26 01:39:05 +00:00
Jeremy Klein
36c7aa0325 Expose a simple tethering API which includes provision checks.
This CL exposes startTethering and stopTethering functions which also
encapsulate all provisioning check logic. Right now, only silent checks
are implemented, but UI checks will come in a follow-up CL. GTS tests
and Settings changes are under the same topic ID.

BUG: 26247383
Change-Id: I65f61d899594cb3f9035d8496366af17a57a090f
2016-01-25 16:37:09 -08:00
Jae Seo
a826d0172a TIF: Recording API
Bug: 23786643
Change-Id: Ie26e8944312048bc865b4506aa49fced15360fe4
2016-01-25 16:30:51 -08:00
Lifu Tang
30f95a7d67 Supported GNSS multi-constellation in frameworks
Change-Id: I82574afd3697c47e806d2cfaedc33756d0353b73
2016-01-25 15:15:14 -08:00
Wale Ogunwale
cc25a8a24e Send notification we attempted to start an already running pinned acitvity
API will be used by Android TV sys-ui to decide what to do next with the
Pinned activity.

Bug: 26452296
Change-Id: I5411515d079468616422ba9e5093164a924cd6a2
2016-01-25 15:14:26 -08:00
Vladislav Kaznacheev
92b26c5bff Merge "Restore correct mouse pointer after drag and drop" 2016-01-25 22:09:38 +00:00
Philipp Weiß
28950ae525 Merge "Make API createAndManageUser public" 2016-01-25 21:39:27 +00:00
phweiss
a92e1216ca Make API createAndManageUser public
Remove @hide, and add parameter for specifying profile owner. The PO
has to live in the same package as the device owner.

Bug: 25288732
Bug: 25860170
Change-Id: I40e8984a71ee9d1ff74e57d4e79e298deef9bc35
2016-01-25 22:33:52 +01:00
Victor Chang
97bdacc6d1 Launch managed quick contacts without contact id
set contact id to enterprise base contact id if it's enterprise uri

BUG=26176780

Change-Id: Ie1160bef22d44c90eb4015783fafdafd160bcdd8
2016-01-25 21:32:44 +00:00
Dianne Hackborn
bfb94e21d3 Merge "Add and implement JobScheduler content observer APIs." 2016-01-25 20:34:41 +00:00
Sandra Kwan
1ebdb21753 Merge "AccountManager: add finishSessionAsUser api." 2016-01-25 18:40:51 +00:00
Wei Liu
b8eaf45e1d Add a null check before reference networkInfo.
b/26758858

Change-Id: If335ece223114dbfb6b08391f18a09467f377cf1
2016-01-25 10:34:27 -08:00
Wale Ogunwale
2ced3d531c Merge "Don't keep visible windows in pinned stack on screen when app dies" 2016-01-25 18:24:58 +00:00
Wale Ogunwale
3fd20fe8d8 Don't keep visible windows in pinned stack on screen when app dies
We previously introduced logic that keeps an apps visible windows on
screen when the app dies. This was to help with the situation where
freeform apps might be killed by the low memory killer and we want
to preserve the space on screen and relaunch the app when the user
interacts with the window again.
However, this doesn't work for windows in the pinned stack since
they an normally not focusable/interactable.
We no longer do this for windows in the pinned stack.

Bug: 24913379
Bug: 26609941
Change-Id: Ie2e7f7d7c7a8c0ef6c1662517f558c385201c433
2016-01-25 18:20:40 +00:00
Sandra Kwan
0b84b456a7 AccountManager: add finishSessionAsUser api.
Change-Id: I9a08d957a9b25be4c6cf12e4ed35cdc0bfbb8605
2016-01-25 10:09:20 -08:00
Robin Lee
ab83fd5739 Merge "DPMS organisation API - Add a missing checkNotNull" 2016-01-25 18:02:40 +00:00
Philipp Weiß
5f09616e6b Merge "Add new API function createAndManageUser" 2016-01-25 18:00:27 +00:00
Rubin Xu
e6e907ea09 Merge "Show dialog when launching work apps is not possible." 2016-01-25 17:51:22 +00:00
Robin Lee
d48788c101 DPMS organisation API - Add a missing checkNotNull
Corrects a failing test.

Change-Id: I6be8a23caef53d1e9681733e5b340237952bd3e5
2016-01-25 17:49:35 +00:00
Rubin Xu
795c458c89 Merge "Turn off profile by stopping the user." 2016-01-25 17:33:43 +00:00
Svetoslav Ganov
a3a1ea3dbe Merge "Clear binder calling identity before mutating secure settings." 2016-01-25 17:24:02 +00:00
Adrian Roos
4afbe99127 Merge "Improved trust error messaging (1/2)" 2016-01-25 17:20:11 +00:00
Svet Ganov
81fcf7037b Clear binder calling identity before mutating secure settings.
The accessibility manager service changes secure settings without
clearing binder calling identnty. Luckily it worked for a long
time as the calls resulting in a secure setting change were not
made on a binder thread. Now we clear calling identity before
mutating secure settings - note that we alsways do this after
a security check, hece it is safe.

bug:26766532

Change-Id: Icb188e6de1a134f38de0bdb23c67fa4ff2806ba4
2016-01-25 09:12:44 -08:00
Rubin Xu
f13c980169 Turn off profile by stopping the user.
Bug: 22541941
Change-Id: I713ab9b87f3dd1b7bd6206af137562d20a44d76d
2016-01-25 16:29:29 +00:00
Adrian Roos
67a55fdb05 Merge "Prevent crash and ANR dialogs in VR mode" 2016-01-25 16:24:24 +00:00
Adrian Roos
c13723f22e Improved trust error messaging (1/2)
Tracks why trust agents are disabled and shows
a generic message on the keyguard. Dedicated strings
in follow-up.

Bug: 22704995
Change-Id: Ibb4fd9c9386c4dc12f0734004502b9a9cc6ded79
2016-01-25 08:04:42 -08:00
Alan Treadway
afad878369 Add explicit and persistent user provisioning state.
Add explicit modelling of provisioning state so that integration
of management provisioning flows with packages such as setup-wizard
are cleaner, and can be more direct. Previously we relied upon
USER_SETUP_COMPLETE secure setting and HOME intents to signal intent,
but this is not very clear and can be fragile.

Bug: 25858670
Change-Id: Idc56a040f710c3aee281db420f21717da3960722
2016-01-25 15:46:30 +00:00
phweiss
343fb33a9b Add new API function createAndManageUser
This is a reduced version of the (deprecated) function
createAndInitializeUser, that allows the device owner to create a
new user and pass a bundle with information for initialization. The
new version of the function has the same functionality, but the
profile owner of the new user is always the device owner.

A flag can be specified to skip the setup wizard for the new user.

The new user is not started in the background, as opposed to how
createAndInitializeUser did it. Instead, the bundle with
initialization information is stored and will be broadcast when the
user is started for the first time.

Bug: 25288732, 25860170
Change-Id: I4e1aea6d2b7821b412c131e88454dff5934192aa
2016-01-25 16:33:34 +01:00
Esteban Talavera
fe434a15d6 Merge "Add additional APIs supported work on the parent DPM instance" 2016-01-25 15:19:06 +00:00
Bartosz Fabianowski
4c052f237a Implement user affiliation
A user/profile is considered affiliated if it is managed by the same
entity as the device. This is determined by having the device owner and
profile owners specify a set of opaque affiliation ids each. If the sets
intersect, they must have come from the same source, which means that the
device owner and profile owner are controlled by the same entity.

BUG=25599229

Change-Id: I393fe0de70272307ed3c811aaba4b48a5109c562
2016-01-25 14:18:43 +01:00
Esteban Talavera
6239991850 Add additional APIs supported work on the parent DPM instance
Bug: 22543972
Change-Id: I05061e34d120c64d5c49ca6b7b4014d7dadb68f4
2016-01-25 12:57:12 +00:00
Carlos Valdivia
918c55a67c Permissions: Get rid of GET_ACCOUNTS
Bug: 21901286

Change-Id: Id2c42f4d449a32c88078d80dcf952d15e67d536c
2016-01-24 14:57:03 -08:00
Casey Burkhardt
86b867fd45 Adds Settings.System.FONT_SCALE observer to ActivityManagerService
Changes to Settings.System.FONT_SCALE were not being handled by any service,
which required a device reboot for any changes to take effect.  Changes to
this field by the Settings app worked as expected only because it is able to
poke ActivityManager with an updated configuration, whereas unbundled
applications cannot.

This also ensures the setting value is backed up and doesn't conflict with
a configured value from accessibility onboarding during restore.

Bug:23033258
Change-Id: I98d4aed2f9f5893d054e6b10c4dfda406de8eba2
2016-01-24 04:21:36 -08:00
Amith Yamasani
0af6fa7015 Voice Interaction from within an Activity
This allows an app to show a voice search button
and invoke a voice interaction session for use
within the activity. Once the activity exits, the
session is stopped.

Test application has a new activity that
demonstrates it with the test voice interaction
service.

This initial version is functional enough for
an integration test, with some more tests
and improvements to come later.

Bug: 22791070
Change-Id: Ib1e5bc8cae1fde40570c999b9cf4bb29efe4916d
2016-01-23 21:25:50 -08:00