14142 Commits

Author SHA1 Message Date
David Christie
40e5782f5c Allow a particular LocationRequest to be excluded from
AppOps monitoring as long as the client as the appropriate
permission (UPDATE_DEVICE_STATS).

Change-Id: I7223a53bc1551e6498302a22eb310c8c5b5684b0
2013-08-01 14:31:48 -07:00
Sascha Prueter
930524ade2 am 95990fe4: am aa268f8f: am d364859c: Merge "Add version identifier to app ops." into jb-mr2-dev
* commit '95990fe4c38641ea574efe9224ae279db61cde0f':
  Add version identifier to app ops.
2013-08-01 13:59:09 -07:00
Sascha Prueter
95990fe4c3 am aa268f8f: am d364859c: Merge "Add version identifier to app ops." into jb-mr2-dev
* commit 'aa268f8fb2855335fc0d4f181cbf91505448e5eb':
  Add version identifier to app ops.
2013-08-01 13:55:43 -07:00
Sascha Prueter
d364859ce6 Merge "Add version identifier to app ops." into jb-mr2-dev 2013-08-01 20:50:02 +00:00
David Christie
e1f886f5e3 Merge "Add new app op to monitor high power location requests." 2013-08-01 19:24:53 +00:00
Dianne Hackborn
483a6bbfc1 Add version identifier to app ops.
All old versions drop their modes except for the notification op
(which is the only one there is currently a user-visible control for).

Change-Id: I9e09cebe63e9ea81f2adc01aef7d1a5a59f57a56
2013-08-01 11:15:04 -07:00
Daniel Sandler
87d01e9e83 am 9e6f26a8: am f3e2f8fe: am 9eb434c3: Allow the user to block notifications for foreground services.
* commit '9e6f26a8e1e69b1c49676d60a5ebe36c0a0f23f9':
  Allow the user to block notifications for foreground services.
2013-08-01 09:35:16 -07:00
Daniel Sandler
9e6f26a8e1 am f3e2f8fe: am 9eb434c3: Allow the user to block notifications for foreground services.
* commit 'f3e2f8feef1a22708cc7ce1a7bc5d914bb53933d':
  Allow the user to block notifications for foreground services.
2013-08-01 09:32:40 -07:00
Jean-Michel Trivi
5813f240ec Merge "Notification muting conditional to exclusive audio focus request" 2013-08-01 16:07:08 +00:00
Lorenzo Colitti
e1cd293151 Merge "Add accessors for all addresses and clarify compare* methods" 2013-08-01 06:44:29 +00:00
Daniel Sandler
9eb434c389 Allow the user to block notifications for foreground services.
Stepping carefully around the fix in change Idc788527, we
perform security (and AppOps, and therefore user block)
checks against the uid passed to enqueueNotificationInternal
rather than the Binder caller.

Bug: 9502541
Change-Id: I91745db92823381df75721c1b8f11013a7fa4ecc
2013-08-01 00:44:57 -04:00
Satoshi Kataoka
fd5d153af8 Merge "Add a debug utility for InputMethodUtils" 2013-08-01 03:12:35 +00:00
Satoshi Kataoka
87c2914215 Add a debug utility for InputMethodUtils
Change-Id: I59f6001bf20640e36e19b09cf117b8579120ba7d
2013-08-01 11:57:27 +09:00
Svetoslav Ganov
53672be110 Merge "Iteration of the print sub-system." 2013-08-01 02:16:20 +00:00
Svetoslav Ganov
55b409a97c Iteration of the print sub-system.
1. Added APIs for adding partially initialized PrintInfo objects
   enabling light-weight lookps for print serivces that want to
   populate the list of available printers without querying each
   of them for its capabilities. This includes APIs for the system
   to request from a print service to update certain printers.

2. Fixed a bug in PrinterId#equals().

3. Added equals and hasCode implementaion to PrinterInfo. Also
   the defaul in PrinterInfo are now an array instead of a
   SparseArray - cheaper.

4. Now PrintJobConfigActivity works with partially specified
   printers. Specifically, if such a printer is selected the
   activity is requesting from the print service to update
   the printer. We are currently not handling the timeout case.
   It also handles udpated pritners.

Change-Id: I5e83e924ef597c9e22cbd06a971d4f4d3bd3a9c1
2013-07-31 18:59:53 -07:00
Svetoslav Ganov
9f1ef00265 Merge "Iteration on the print sub-system." 2013-08-01 00:13:44 +00:00
Wink Saville
552436d17b Merge "Fix excessive log spew." 2013-07-31 23:27:34 +00:00
Wink Saville
1aef7fc81a Fix excessive log spew.
Bug: 10115060
Change-Id: I61fd83071da1224f38757b8d90f58c8d6c41d36b
2013-07-31 15:49:04 -07:00
Jean-Michel Trivi
2380566deb Notification muting conditional to exclusive audio focus request
Summary of feature:
Do not mute notifications when speech recognition recording is
  active, but when an app has requested audio focus with
  AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE.

Implementation:
Move definition of AUDIOFOCUS_NONE to AudioManager where other
  audio focus codes are defined.
Add support for querying the current audio focus type.
When audio focus is requested as GAIN_TRANSIENT_EXCLUSIVE, make
  the corresponding loss by LOSS_TRANSIENT.
Before playing a notification, check whether GAIN_TRANSIENT_EXCLUSIVE
  has been requested.

Bug 8251963

Change-Id: I41edc77326b70639d2fdcb4642c53109995b72a8
2013-07-31 14:37:19 -07:00
Dianne Hackborn
5b45f2366e am bd61ba5b: am a99cb5bc: (DO NOT MERGE) Fix pub issue #58043: Copy crash in Android 4.3...
* commit 'bd61ba5b22f55a70615e128310d365c6175a0a4e':
  (DO NOT MERGE) Fix pub issue #58043: Copy crash in Android 4.3...
2013-07-31 14:18:06 -07:00
Dianne Hackborn
a99cb5bc41 (DO NOT MERGE) Fix pub issue #58043: Copy crash in Android 4.3...
...when clipboard listener attached

We need to clear the calling identity before dispatching change
notifications.  Also make this more robust, so that in the face
of any failure we will clean up the broadcast state.

Integrated from master.

Change-Id: I05e1f76ffd486439535631fe4062dabe94bd2ccf
2013-07-31 13:48:39 -07:00
Christopher Tate
20f170d6af Don't try to do the work if there isn't any data.
Bug 10056484

Change-Id: I527f592b0bb91bfbfff1d52c3327fe9e2ac53471
2013-07-31 13:01:02 -07:00
Lorenzo Colitti
d1e0fae2bc Add accessors for all addresses and clarify compare* methods
1. Add a method to return all addresses and all LinkAddresses on
   all links (both base links and stacked links). We already had
   one for routes, but did not yet have any for addresses.
2. Rename compareRoutes to compareAllRoutes, because unlike the
   other compare* methods, it looks at all interfaces. Update
   what appears to be its only caller.
3. Update the documentation of the compare* methods to match
   reality (they don't return lists) and clarify whether they
   look at all links or only the base link.

Change-Id: Ie22e6c7f163d5de8e407248b45171dc28382d2d3
2013-08-01 00:21:24 +09:00
Satoshi Kataoka
0766eb045c Small refactor on InputMethodUtils
Change-Id: Ie4f797508c02abb13c7fe1be162ec4dc18829925
2013-07-31 18:33:48 +09:00
Dianne Hackborn
2841e0afac Merge "If you set an alarm before the epoch, you're gonna have a bad time" 2013-07-31 02:07:26 +00:00
Christopher Tate
5f221e8f93 If you set an alarm before the epoch, you're gonna have a bad time
For apps build against the KLP+ SDK, this will now throw an illegal argument
exception.  Legacy apps will simply see the alarm delivered immediately.

Bug 9965704

Change-Id: Ia103d9529d32640098be324820fe228efa95431d
2013-07-30 18:55:01 -07:00
Svetoslav Ganov
85b1f88305 Iteration on the print sub-system.
1.  API changes: Moved copies API from PrintAttributes to PrintJobInfo;
    Changed the PageRange list to an array in PrintDocumentAdapter#onWrite;
    Added onCancelled method to the layout and write callbacks.

2.  Refactored the serialization of remote layout and write commands. Now
    the commands are serialized by the code in the client instead in the spooler.
    The benefit is simple code since the client has to do a serialization to delegate
    to the main thread anyway. The increased IPC found is fine since these calls
    are quite unfrequent.

3.  Removed an unused file: IPrintSpoolerObserver.aidl

4.  Added equals and hasCode implementation to PageRange, PrintAttributes,
    MediaSize, Resolution, Margins, Tray, PrintDocumentInfo.

5.  Added shortcut path for query APIs on PrintJob that return cached values
    if the print job is in a uncuttable state, i.e. completed or cancelled. Failed
    print jobs can be restarted.

6.  PrintJobInfo was not properly serialized.

7.  Updated the look of the print dialog to be stable if there is and there isn't
    currently selected printer.

8.  PrintJobCOnfigActivity now calls onLayout on every print attributes change
    but requests a write only on print preview or print button press. Also if the
    layout did not change the content and it is already written no subsequent
    call is made. Also if the selected pages change and we already have them
    no subsequent call to write is made. Also the app is called with print preview
    attribute set when performing layout and with it cleared after the print button
    is pressed. A lot of changes making sure that only valid actions are enabled
    in the activity (looks like a dialog) at a given time frame. The print job config
    activity is also hidden after we got all the data, i.e. layout and write are done.

9.  The callback from the print spooler to the system are scheduled via messages
    to avoid lock being held during the call. It was hard to guarantee that since a
    method holding a lock may be calling one that would like to release the lock
    at some point to make the callbacks.

10. Print spooler state is persisted only if something changes in a completed
    print job, i.e. not one that is being constructed due the print job config dialog.

11. Fixed a potential race in the RemotePrintSpooler where it was possible that
    a client that got a handle to the remote spooler calls into an unbound spooler.
    E.g: the client gets the remote interface with a lock held, now the client releases
    the lock to avoid IPC with a lock, during the IPC scheduling the spooler has
    notified the system that it is done and the system unbinds from it, now the
    client's IPC is made to a spooler that is disconnected.

Change-Id: Ie9c42255940a27ecaed21a4d326a663a4788ac9d
2013-07-30 17:15:11 -07:00
David Christie
0b83745019 Add new app op to monitor high power location requests.
This is a new op parallel to the existing OP_MONITOR_LOCATION
but only tracks those requests deemed to be above a
power threshold.

Change-Id: I76fe4d9d2e550293b9da6d5cf902a5b4dd499f0f
2013-07-30 14:59:33 -07:00
Dianne Hackborn
805f52d4cf Report more memory tuning info.
Change-Id: I243d67189e325eba5ea22e79937f5a858dfceeed
2013-07-30 12:48:12 -07:00
Lorenzo Colitti
cc4bee55fa am 8fcad020: Merge "Make legacy VPN work over stacked interfaces."
* commit '8fcad020e0c256be1948e42df19d43f53f9f5804':
  Make legacy VPN work over stacked interfaces.
2013-07-30 09:57:21 -07:00
Lorenzo Colitti
6c3e7b5f05 am 15884007: Merge "464xlat: use a gatewayed route, not point-to-point"
* commit '158840079a501784c76e9816b215b3a1839074ef':
  464xlat: use a gatewayed route, not point-to-point
2013-07-30 09:57:18 -07:00
Lorenzo Colitti
bc8f82fb1f Make legacy VPN work over stacked interfaces.
On stacked interfaces like 464xlat, Legacy VPN can't find the
default gateway because it uses getRoutes, which only returns
routes for the base link and not for the stacked links. It also
assumes that the interface that the default route points to is
the interface for the base link (e.g., rmnet0) instead of the
interface the route actually points to (e.g., clat4).

Fix this by calling getAllRoutes to find the default IPv4 route,
and get the interface name from the route we find instead of
assuming it's the base interface.

Bug: 9597516
Change-Id: Ia6ce0b6258a421cd22f60dedca7e94176b32176b
2013-07-31 01:14:30 +09:00
Lorenzo Colitti
efa73c05f7 464xlat: use a gatewayed route, not point-to-point
Various applications such as Skype and our legacy VPN code
do not understand routes pointed directly at point-to-point
interfaces and require a default gateway IPv4 address in
order to function.

Grudgingly accept that routes without default gateways Are Hard
and use gatewayed routes instead. This causes routing to go from:

default dev clat4  scope link

to:

default via 192.0.0.4 dev clat4  scope link
192.0.0.4 dev clat4  scope link

and those apps now work.

Bug: 9597256
Bug: 9597516
Change-Id: I7b7890873802d3cb99affd6eb70b8ab75e7a2cf6
2013-07-31 01:09:53 +09:00
Matthew Williams
8ac59af92c Merge "Fix of RTE from SyncOperation.compare()" 2013-07-30 15:57:19 +00:00
Matthew Williams
7986fe490d Fix of RTE from SyncOperation.compare()
Change-Id: I2e291b0c0bb9ae6a190d6cdfa9aef8b4bf33d617
2013-07-30 08:52:31 -07:00
Dianne Hackborn
821a90df96 Merge "Fix pub issue #58043: Copy crash in Android 4.3..." 2013-07-30 01:46:30 +00:00
Jonathan Dixon
a75246951f Merge "Make WebViewProvider constants private" 2013-07-30 01:22:18 +00:00
Dianne Hackborn
f0989840a0 Fix pub issue #58043: Copy crash in Android 4.3...
...when clipboard listener attached

We need to clear the calling identity before dispatching change
notifications.  Also make this more robust, so that in the face
of any failure we will clean up the broadcast state.

Change-Id: I305a8a62738595f1fe5643a063099de5ed7cb062
2013-07-29 18:11:02 -07:00
Christopher Tate
37987ef17a Merge "Fix permission privilege w.r.t. updated system apps" 2013-07-30 00:49:11 +00:00
Dianne Hackborn
6077115d74 Merge "Fix some oom tuning and display size stuff." 2013-07-30 00:45:37 +00:00
Dianne Hackborn
635a6d5a0b Fix some oom tuning and display size stuff.
Fix a problem where we would not respect the device's
override display density/size if those had been reset at
some point (to an empty string).

Tweak the tuning of low RAM devices to consider 480x800 as
the base line resolution.  That is our target these days.

Improve output of oom and meminfo to include this tuning
information.

Change-Id: Ic9a85b0391b075178c4ac17e64086ef21889f430
2013-07-29 17:17:31 -07:00
Christopher Tate
072252cd48 Fix permission privilege w.r.t. updated system apps
Note that it is *intentional* that even a privileged app cannot
add new privileged permissions via unbundled update.  The set of
privileged permissions granted is strictly limited to those used
by the apk file installed as privileged.

Bug 10027033

Change-Id: I974bae0671c1962e4526d51dd9a0c53bcd27323e
2013-07-29 17:13:35 -07:00
Todd Poynor
26faecc85e BatteryService use IBatteryProperties interfaces, drop JNI
IBatteryPropertiesListener binder interface to deliver notifications of
changed battery/power status from healthd system health daemon.  healthd
watches uevents from power_supply.

Change-Id: I1ab38622baf28356a6627fe2354b77e2ef99d838
2013-07-30 00:02:04 +00:00
Jonathan Dixon
09397ba3d5 Make WebViewProvider constants private
In preperation for DEFAULT_TO_EXPERIMENTAL_WEBVIEW flag-flip, make this
field and WEBVIEW_EXPERIMENTAL_PROPERTY private so we know all users are
querying the property in a consistent way.

Change-Id: Iabaffb8ac5a34e323b170339d47f872eb4c83042
2013-07-29 16:42:42 -07:00
Christopher Tate
e339319258 Merge "Turn off Alarm Manager logspew pending a more friendly implementation" 2013-07-29 23:31:55 +00:00
Christopher Tate
cdccf6423d Turn off Alarm Manager logspew pending a more friendly implementation
Bug 10055940

Change-Id: I75bcbdf6177f5faa41f420518513a22f47bcac5e
2013-07-29 16:23:05 -07:00
Wink Saville
5e56bc5437 Add network type TYPE_MOBILE_IA.
Add a network type for establishing connections to the apn used for
the initial connection.

Enable some debug for now.

Bug: 8733613
Change-Id: Ia627ac0cf5715660b6d02bb13a83d46ec1727b87
2013-07-29 15:02:29 -07:00
Dianne Hackborn
bf36ee2b0c Allow services to execute in the background scheduling group.
If a service is being executed due to a call from a background
process, there is no reason for its process to be brought up
to the foreground scheduling group to do its work.  So, don't.

Change-Id: I0f4f9f2fdcc3481ca4ad2e4e3deb43b8edbbd897
2013-07-29 13:50:52 -07:00
Colin Cross
ddb1428ab6 Merge "set the extra_free_kbytes kernel vm tunable" 2013-07-26 23:09:09 +00:00
Colin Cross
59d80a5270 set the extra_free_kbytes kernel vm tunable
Set the sys.sysctl.extra_free_kbytes property, which will proxy
through init to the /proc/sys/vm/extra_free_kbytes tunable (on
kernels where it exists).  This will ask the kernel to keep
more memory free, causing lowmemorykiller to fire earlier and
allocations to succeed faster.

The size is set to 3 full screen 32bpp buffers.  Products can
override the size with an absolute or adjustment value using
overlays config_extraFreeKbytesAbsolute and
config_extraFreeKbytesAdjust.

Bug: 10024467
Change-Id: Ib4d4507513ec3c1f4d4ceeb81ed632d1ad643437
2013-07-26 16:06:45 -07:00