10541 Commits

Author SHA1 Message Date
Dianne Hackborn
e799175b6b AppOps: fix nested op tracking, new API to get apps using
permissions.

Change-Id: I20c7bd58febc01d6911a90440867eaacd133c464
2013-01-16 18:10:40 -08:00
Victoria Lease
79d59f0968 DO NOT MERGE Prevent OOM death for services under ServiceWatcher's care.
Change-Id: If87be5769b55368edaf4776189e8f6e51a21eb03

Conflicts:

	services/java/com/android/server/ServiceWatcher.java
2013-01-16 17:37:21 -08:00
Victoria Lease
fd08d1ece5 Prevent OOM death for services under ServiceWatcher's care.
Change-Id: If87be5769b55368edaf4776189e8f6e51a21eb03
2013-01-16 16:21:41 -08:00
Amith Yamasani
d4fe37bee7 Merge "Rename bindService to bindServiceAsUser to follow convention." 2013-01-16 23:26:30 +00:00
Amith Yamasani
27b89e6658 Rename bindService to bindServiceAsUser to follow convention.
This is for the multi-user version of bindService, not the original.

Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
2013-01-16 12:30:11 -08:00
Dianne Hackborn
35654b61e8 More work on App Ops service.
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log.  This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service.  The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls...  all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
2013-01-16 12:11:01 -08:00
Sasha Levitskiy
f849124b6b Merge "Removed Throttle Manager as obsolete" 2013-01-15 16:56:30 -08:00
Victoria Lease
ea78b85bb7 fix NPE in updateClientUids
Bug: 8009908
Change-Id: I54d97c587a3fa9d003f654f98fdfdbe21af791d6
2013-01-15 10:39:28 -08:00
Craig Mautner
07f943d417 Merge "Add Overrides, remove trailing whitespace." 2013-01-15 09:10:10 -08:00
Craig Mautner
6cfa7292cf Add Overrides, remove trailing whitespace.
Once and for all.

Change-Id: I0835515696c1a8ec7dff719fb734cbbd0b4252d6
2013-01-15 09:05:42 -08:00
Satoshi Kataoka
8e303cc5dd Refactor utilities for InputMethodManagerSerivce that we want to share with the Settings application
Bug: 7872918

Change-Id: I0bc9954f163a3ec38d08b9ba842a8a31176eb6a6
2013-01-15 12:52:47 +09:00
Sasha Levitskiy
ca6486e7f5 Removed Throttle Manager as obsolete
Change-Id: I63e8514f34c880d0badaab33a347f54a80c84da6
2013-01-14 16:59:33 -08:00
Dianne Hackborn
0d31c74b2e Merge "WorkSource can now track package names." 2013-01-14 10:38:14 -08:00
Dianne Hackborn
002a54e229 WorkSource can now track package names.
Use this to track the package name of applications
accessing GPS.

And now the app ops service can enforce that callers
must provide valid package names.

Change-Id: I842a0abe236ea85f77926d708547f0f95c24bd49
2013-01-11 17:37:04 -08:00
Craig Mautner
5ae8e45ff3 Merge "Make DimLayer track changes to WindowState layer." 2013-01-11 16:41:40 -08:00
Mattias Falk
f60f94a89e Second pass tying into dns cache per interface
Set dns servers for secondary nets and attach the
processes (pids) that are using the secondary nets
to the secondary nets associated dns cache.

Change-Id: Id865c2c3fdc0ec1c3e30c134e9ea4109f4f2fbeb
bug:5465296
2013-01-11 15:47:08 -08:00
Craig Mautner
13131e74ea Make DimLayer track changes to WindowState layer.
The DimLayer behind popups was not changing when the popup layer
changed. It will now.

Fixes bug 7974415.

Change-Id: Ia486efa83d623716a09d73a22493a4222823c573
2013-01-11 11:03:33 -08:00
Christopher Tate
3fef446a14 am ec64c30b: am cc52272b: am a3e79199: Merge "TIME_TICK was not occurred for one hour"
* commit 'ec64c30bfc221fea888efe5eac62f7c5303aeeb0':
  TIME_TICK was not occurred for one hour
2013-01-11 10:54:46 -08:00
Satoshi Kataoka
9062fd8d55 am 50fc82fd: am 30b074fc: am 2495d08a: am 5327322a: Merge "Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"" into jb-mr1.1-dev
* commit '50fc82fdf025bc1fee8f0eb50fa88e4591c8daae':
  Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"
2013-01-11 10:54:31 -08:00
Sascha Prueter
b70d9df780 am 1ec3c2cc: am 28608bbb: am d692ea6d: am b5e4835e: Merge "Improve heuristics for detecting wireless chargers." into jb-mr1.1-dev
* commit '1ec3c2ccedde5cd8ff6e94c9b1566a913d5e8db0':
  Improve heuristics for detecting wireless chargers.
2013-01-11 10:53:49 -08:00
Dianne Hackborn
885bfcd523 am 9e6575bc: am 854458f4: am 0287ca3c: am e62fa825: Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
* commit '9e6575bc52f421484fe262aff224db247e70d830':
  Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
2013-01-11 10:53:19 -08:00
Christopher Tate
ec64c30bfc am cc52272b: am a3e79199: Merge "TIME_TICK was not occurred for one hour"
* commit 'cc52272b4fa27ab36ba20e22a53f872fedc8bb45':
  TIME_TICK was not occurred for one hour
2013-01-11 08:58:34 -08:00
Christopher Tate
cc52272b4f am a3e79199: Merge "TIME_TICK was not occurred for one hour"
* commit 'a3e7919932199e2178792cbae8870e9b48c57523':
  TIME_TICK was not occurred for one hour
2013-01-10 18:26:50 -08:00
Satoshi Kataoka
50fc82fdf0 am 30b074fc: am 2495d08a: am 5327322a: Merge "Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"" into jb-mr1.1-dev
* commit '30b074fcbff6263db4044ff4e8f36eb5d4e136eb':
  Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"
2013-01-10 18:20:56 -08:00
Satoshi Kataoka
30b074fcbf am 2495d08a: am 5327322a: Merge "Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"" into jb-mr1.1-dev
* commit '2495d08a5c06556deb7c3993add337037b8b492e':
  Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"
2013-01-10 18:17:35 -08:00
Satoshi Kataoka
5327322ab9 Merge "Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"" into jb-mr1.1-dev 2013-01-10 18:12:44 -08:00
Craig Mautner
b5eb550fb1 Call assignLayersLocked when InputMethod is moved.
Call was removed by over-ambitious editing in CL 259410.

Fixes bug 7966824.

Change-Id: I9feb2ec27907f4e03b9424710adc2743a8b512d8
2013-01-10 17:29:30 -08:00
Sascha Prueter
1ec3c2cced am 28608bbb: am d692ea6d: am b5e4835e: Merge "Improve heuristics for detecting wireless chargers." into jb-mr1.1-dev
* commit '28608bbb2fb6daf3d261cb10eaeb1849781cf77d':
  Improve heuristics for detecting wireless chargers.
2013-01-10 11:19:20 -08:00
Sascha Prueter
28608bbb2f am d692ea6d: am b5e4835e: Merge "Improve heuristics for detecting wireless chargers." into jb-mr1.1-dev
* commit 'd692ea6dd297fbd39885525a29bdf6637a3640f2':
  Improve heuristics for detecting wireless chargers.
2013-01-10 11:16:51 -08:00
Sascha Prueter
b5e4835e3a Merge "Improve heuristics for detecting wireless chargers." into jb-mr1.1-dev 2013-01-10 11:11:20 -08:00
Jeff Brown
3b971598ed Improve heuristics for detecting wireless chargers.
On some devices, we need to apply heuristics to determine whether
the device is docked on a wireless charger because the charging
circuits do not provide sufficient information to know whether
the device is on the charger unless it is actually receiving
power.

The previous heuristics only considered the battery level to
suppress spurious dock signals.

The new heuristics also take into account whether the device
appears to have moved from its previous position on the dock.

Bug: 7744185
Change-Id: I5ba885dac25b37840b6db46b8a0f30968a06776c
2013-01-10 10:01:56 -08:00
Satoshi Kataoka
9d08143fa7 Revert "Fix a bug where disabled auxilialy IME is unexpectedly re-enabled"
This reverts commit 32b812054cce27d1c70b53ba8ac729c7186b105e

Bug: 7976890

Change-Id: I75ab60734153719b199cf7281d23f5eb1ad2d1bc
2013-01-10 17:42:56 +09:00
Sungmin Choi
563914a9a1 TIME_TICK was not occurred for one hour
TIME_TICK was not occurred at the end of DST for one hour

Step to reproduce:
1. Settings -> Date & time
2. uncheck Automatic date & time and Automatic time zone
3. select Time zone -> select Brussels
4. set date -> Oct. 28. 2012
5. set time -> 1:59 AM

Bug: 7922117
Change-Id: I2e78bd97b508d6a38471425cfbaca45fb4b89c1e
2013-01-10 17:33:26 +09:00
Dianne Hackborn
9e6575bc52 am 854458f4: am 0287ca3c: am e62fa825: Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
* commit '854458f4d52937f9a1385559d759bd8019eb3294':
  Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
2013-01-09 19:01:26 -08:00
Dianne Hackborn
854458f4d5 am 0287ca3c: am e62fa825: Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
* commit '0287ca3ca36ad98004ddabfa189105e6324a820e':
  Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
2013-01-09 19:00:06 -08:00
Dianne Hackborn
e62fa82579 Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
The volume panel now forces us out of the UI modes while it
is up.

Change-Id: If39fa33b1c52579bf5d376ce4722408cee3ca951
2013-01-09 18:51:51 -08:00
Nick Kralevich
6b0fb36870 Merge "Revert "App home directories are now 0700 for targetSdkVersion > 17"" 2013-01-09 16:10:14 -08:00
Nick Kralevich
1506921e8e Revert "App home directories are now 0700 for targetSdkVersion > 17"
This reverts commit 92091fa9636403728fe94cc83400495a8612c2d3.

Bug: 7966399
Bug: 7208882
2013-01-09 15:54:56 -08:00
Dianne Hackborn
a06de0f29b New "app ops" service.
Initial implementation, tracking use of the vibrator, GPS,
and location reports.

Also includes an update to battery stats to also keep track of
vibrator usage (since I had to be in the vibrator code anyway
to instrument it).

The service itself is only half-done.  Currently no API to
retrieve the data (which once there will allow us to show you
which apps are currently causing the GPS to run and who has
recently accessed your location), it doesn't persist its data
like it should, and no way to tell it to reject app requests
for various operations.

But hey, it's a start!

Change-Id: I05b8d76cc4a4f7f37bc758c1701f51f9e0550e15
2013-01-09 12:47:47 -08:00
Craig Mautner
c34bc1178b Turn off debug logging.
Change-Id: I8dcfbb1f91d63e9126822a0c45b34cb21c09fa2a
2013-01-08 15:02:13 -08:00
Craig Mautner
ef6550195f Release Session earlier, release Session later.
For finishDrawingWindow queue the performLayoutAndPlaceSurfaces call
and return immediately.

For setTransparentRegionHint call the WindowStateAnimator method
immediately, removing the previous queueing of it.

Fixes bug 7174665.

Change-Id: Ia52f9a6685842220e4ffca6e214ee366470ff666
2013-01-08 00:36:16 -08:00
Craig Mautner
73164dc7bc Merge "Combine DimAnimator and DimSurface into DimLayer" 2013-01-08 00:23:46 -08:00
Craig Mautner
1420b93fa5 Combine DimAnimator and DimSurface into DimLayer
Replace two classes that did similar things in a complicated manner
with one class that does it more simply.

Bug 7064755 fixed.

Change-Id: I8c415671f60d1d2ece9da5916421f4d24aed2d65
2013-01-08 00:22:22 -08:00
Craig Mautner
581068131c Remove some TODOs.
Change-Id: I52f5a8a76593dde177c2e931f656b13134a3bd2b
2013-01-07 23:39:11 -08:00
Craig Mautner
9a29a5d679 Convert three booleans into single state variable.
Make app transition states easier to understand.
Remove unnecessary dependence on ActivityOptions.

Change-Id: If3942133e919a4121340f8ef5ca1c50df22f370d
2013-01-07 23:39:10 -08:00
Craig Mautner
4b71aa1f8a Move app transition constants
Move app transition constants from WindowManagerPolicy to
AppTransition.

Change-Id: I8ae6c4d0da1db826c44eb4ea0c6b85016b50b1a3
2013-01-07 23:38:57 -08:00
Victoria Lease
5cd731a233 prevent concurrency issues during LocationManager init
systemReady() was returning before the LocationManagerService was
actually ready. Applications making LocationManager transactions
during their startup could possibly hit a race condition with the
yet-uninitialised LocationManagerService.

To guarantee that LocationManagerService is actually ready before
returning from systemReady(), we simply do the startup work on the
thread that called systemReady(), rather than spin up a secondary
thread to do the work asynchronously.

LocationWorkerHandler still needs a thread to do its work on, so
rather than have it run on the secondary thread that was
previously used for systemReady()'s work, we create a HandlerThread
for it.

Additionally, LocationManagerService.init() really needed to grab
lock for some of the things it was doing. I moved all of the code
that could benefit from mutex protection to a single section of
systemReady() and wrapped it up with a lock while I was at it.

Bug: 7723944
Change-Id: I51d480e2781622c3a14769c3a2019a2407dcfd8a
2013-01-02 13:25:57 -08:00
Irfan Sheriff
fa28d45d59 am 7f93e7d2: am 88fe4ebc: Merge "NsdService: Clear client info after resolution request is serviced."
* commit '7f93e7d265509d4ae18f99cbc9a45cca087c4b71':
  NsdService: Clear client info after resolution request is serviced.
2012-12-28 09:47:03 -08:00
Craig Mautner
273fa2708a Merge "Fixes to clean up icon launching during animations." 2012-12-26 11:56:30 -08:00
Irfan Sheriff
7f93e7d265 am 88fe4ebc: Merge "NsdService: Clear client info after resolution request is serviced."
* commit '88fe4ebc0b6e0499f247b5d896778dd72304bf9f':
  NsdService: Clear client info after resolution request is serviced.
2012-12-21 10:07:24 -08:00