14372 Commits

Author SHA1 Message Date
Tom O'Neill
2cf8138b91 Merge "Add LocationManager.MODE_CHANGED_ACTION broadcast" into klp-dev 2013-09-04 14:16:12 +00:00
Adam Skory
16731d4dc0 Add provideAssistData attr to public.xml
http://ag/323631 added the provideAssistData
attribute to the Service manifest tag.

It did not, however, add that attribute to
public.xml - making it impossible to actually
build a service that defines said tag.

So, add it.

Now that the attribute is where it should be,
restore @link notation to ServiceInfo.java
without breaking the offline docs build
( see http://ag//340279 ).

Also, make some log warnings related to
providing assist data slightly more verbose.

Bug: 10573008
Change-Id: Ie2bcb411c182d69738a2fa4a74de3171b9b9c455
2013-09-04 12:30:47 +01:00
Tom O'Neill
40a86c24d2 Add LocationManager.MODE_CHANGED_ACTION broadcast
- Currently redundant with PROVIDERS_CHANGED_ACTION, but that may
change in the future

- Part of fix for b/10409275

Change-Id: I12daaf20e6546fd9e9dc71c599967fa0ad95e27f
2013-09-03 18:07:10 -07:00
Craig Mautner
59f6b51056 Merge "Insert home task into history when sending to back." into klp-dev 2013-09-03 21:06:49 +00:00
Craig Mautner
c8143c623d Insert home task into history when sending to back.
- There is an assumption that moving a task to the back moves it
behind the home activity. This fix ensures that the home activity
will be launched by some activity before the task that has been
moved to the back.

- Convert "private final" declarations to private only.

- Convert container tests for size()==0 to isEmpty().

- Remove unused variable.

Fixes bug 10228536.

Change-Id: I51741ee7a09652e27afffcc50c14953bf0aa27ea
2013-09-03 13:14:57 -07:00
Jeff Sharkey
7f15b03d16 Merge "Skip packages with missing metadata." into klp-dev 2013-09-03 19:04:56 +00:00
Jeff Sharkey
5dea7d554a Skip packages with missing metadata.
Otherwise this would result in NPE, and packages.list would never
be updated.

Bug: 10577538
Change-Id: I35a4407dbc283ab20a4c45a2ea1a14b04044c98c
2013-09-03 12:01:20 -07:00
Svetoslav Ganov
ad0ec16fbe Merge "Bug fixes in the printer dialog activity and fused printer loader." into klp-dev 2013-09-03 18:02:58 +00:00
Svetoslav Ganov
e1de4b3216 Merge "Crashes in TouchExplorer on two finger swipe." into klp-dev 2013-09-03 18:02:15 +00:00
Svetoslav Ganov
38c992841b Crashes in TouchExplorer on two finger swipe.
1. The logic for finding the active pointer was incorrect. The code was
   iterating over all pointer ids and taking the minimum, i.e. the pointer
   that first went down. The problem was that the down time for pointers
   that are not down was also considered (set to zero), thus sometimes we
   would consider the first pointer that went down to be a pointer that
   is not down at all. Now we are iterating only over the pointers that
   are down.

2. The batched events while waiting to see if the user is exploring or
   gesturing were added even if we were in touch exploration state at which
   point we do not have to batch. As a result we ended up having lefovers
   from a previous gesture when handling the delayed events and crash.

bug:10312546

Change-Id: I4728541ac12e4da4577d22e4314101dd169a52fb
2013-09-03 09:24:52 -07:00
Svetoslav Ganov
9186d0cb2b Bug fixes in the printer dialog activity and fused printer loader.
1. Fused printers loader was not using the discovered printers to update the
    historical ones. Now if a historical printer is discovered we update its state
    with the discovered, i.e. most recent, information.

2. Fixed a bug in the destination adapter of the print job config dialog that
    was leading to a crash if all printers item is selected when there are no
    discovered printers.

3.  Updated the add printers asset in the all printers screen.

4. Historical printers were not persisted by the print dialog activity.

5. Reduced the number of printers we send per transation to avoid the binder
   transaction size limit. Added sending of printers in chunks in a place
   this was missing.

Change-Id: I88b54888360bc0e53b06bd260c2b832d0d6454b6
2013-09-03 08:42:17 -07:00
Svetoslav Ganov
6bd20bc46c System print service enabled after every system reboot
The system was overriding the user on every boot by turing of all system
print services, i.e. service that are on the system image. Now the system
print service are enabled by default only once per user, the user can later
disable them and the system does not override that. We now have a system
setting with the services we enabled once by default so we never do
default enabling again (unless device is wiped).

bug:10594775

Change-Id: Id3129ccfba95bf57375ea9fec0b5ca0e51bda199
2013-09-02 15:35:06 -07:00
Matthew Williams
9d7c4d4a6e Merge "DO NOT MERGE. Remove service component for KLP." into klp-dev 2013-08-30 21:39:15 +00:00
Matthew Williams
6222288bfb DO NOT MERGE. Remove service component for KLP.
1) As discussed, lack of internal clients -> remove SyncService
component from KLP. This CL reverts that addition.
2) Also includes javadoc cleanup of existing API.
3) Fix naming of allowMetered() -> disallowMetered() in API
4) Removed one-off sync in the future, as it doesn't make sense
for sync adapters.

Change-Id: I1b17094e6edafb2955cdfb99f39b44274fbe86f9
2013-08-30 21:28:53 +00:00
Zhentao Sun
ef9778ba39 Merge "Fixed b/10512887." into klp-dev 2013-08-30 19:11:29 +00:00
Matthew Williams
fda4698c25 Merge "Turn off debugging in SyncManager" into klp-dev 2013-08-30 00:24:11 +00:00
Zhentao Sun
d535ead295 Fixed b/10512887.
This is an issue caused by multi-threading. If geofence provider service
is connected and disconnected immediately, the ServiceWatcher can return a
null service handle to the private thread used by GeofenceProxy, and
this can cause NPE and system crash.
This CL also fixed a hidden race conditions bug where mGeofenceHardware
is not synchronized between two threads.

Change-Id: I824642cd638fbb1e6799a5a1220b047ebc2556a1
2013-08-29 16:56:19 -07:00
Svetoslav Ganov
86d2db9750 Merge "Print spooler security and some new print service facing APIs." into klp-dev 2013-08-29 22:59:08 +00:00
Svetoslav Ganov
d26d4898fc Print spooler security and some new print service facing APIs.
1. Updated the security mode of the print spooler. Now the spooler
   is not signed with the system key, it is not a privileged app so if
   it gets compromised (PDF rendering is a potential attack vector)
   it cannot access dangerous permissions. Also only the system
   can bind to the spooler.

2. Added APIs for asking a print service to start and stop tracking
   a given printer. This is need for the case when the user selects
   the printer and the print service should do a best effort to keep
   the system updated for the current state of the printer.

3. Added APIs for putting a print job in a blocked state. A print
   service would report the print job as blocked if for some reason
   the printer cannot proceed, e.g. 99 pages are printed but there
   is no paper for the last one. The user has to add more paper
   and the print service can resume the job.

4. Changed the read/write APIs to use ParcelFileDescriptor instead
   of FileDescriptor since the latter does not have a clean API for
   detaching the wrapped Linux file descriptor when one wants to
   push it to native.

5. Added API for getting the size of the printed document so the
   print service can avoid handling big filed over cellular network
   or ask the user if needed.

6. Now the print services that are preinstalled on the system image
   are automatically enabled.

Change-Id: Ia06c311d3d21cabb9e1368f13928e11cd0030918
2013-08-29 15:39:44 -07:00
Matthew Williams
28b1fc6422 Turn off debugging in SyncManager
Bug: 10549076
Change-Id: I63ad8af5fbe8736eb7ca8307a4beef5310a1c10c
2013-08-29 22:30:43 +00:00
Wink Saville
35bd30b184 Merge "Merge commit '270226b0' into manualmerge" into klp-dev 2013-08-29 22:10:52 +00:00
Wink Saville
7788c61af5 Merge commit '270226b0' into manualmerge
* commit '270226b0':
  Add support for handling mobile provisioning networks.

Conflicts:
	core/java/android/net/CaptivePortalTracker.java
	core/java/android/net/ConnectivityManager.java
	core/java/android/net/IConnectivityManager.aidl
	core/java/android/net/MobileDataStateTracker.java
	core/res/AndroidManifest.xml
	services/java/com/android/server/ConnectivityService.java

Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 14:57:08 -07:00
Amith Yamasani
79a45c6f18 Merge "Improve Intent disambig dialog behavior" into klp-dev 2013-08-29 21:45:04 +00:00
Craig Mautner
a78d9a24d9 Merge "Reset activity's "return to home" flag on relaunch" into klp-dev 2013-08-29 21:14:31 +00:00
Craig Mautner
e12a4a6810 Reset activity's "return to home" flag on relaunch
When relaunching an activity re-evaluate the flag that determines
whether to return to the next activity on the stack or to the home
activity upon return.

Fixes bug 10545580.

Change-Id: I5868ce1b494afffcc5afc22abe3b65aa339827bb
2013-08-29 12:24:56 -07:00
Wink Saville
270226b0dd am 8cb2f42e: am 948282b0: Add support for handling mobile provisioning networks.
* commit '8cb2f42eea2ef3b249528aa7913fc7a6dfc6b741':
  Add support for handling mobile provisioning networks.
2013-08-29 10:26:06 -07:00
Geoffrey Borggaard
15b8b2c068 UserManagerService upgrades users on first restart.
This causes all restriction pins to be reset.

Bug: 10535070
Change-Id: Ia2abf904505514d7e555b420c2b032a0094e0643
2013-08-29 13:07:49 -04:00
Wink Saville
948282b0e6 Add support for handling mobile provisioning networks.
When a sim is new or it has expired it needs to be provisioned
with the carrier. Basically provisioning is associating a sim with
a user account. When a sim isn't provisioned then operators will
restrict access to the network and only allow certain addresses
or services to be used.

This set of changes allows two types of provisioning networks to be
recognized. The first is a network that causes all DNS lookups to be
redirected to a different address than was intended. This is exemplified
by how T-Mobile works.

The second technique uses a special apn for provisioning. An example is
AT&T where lwaactivate is the provisioning apn and broadband is the
normal apn. We first try broadband and if we are unable to connect we
try lwaactivate. When we see the activate we identify it as special and
the ApnContext.isProvisioningApn will return true.

In the future our plan is to create a new network type that can be added
to the apn list, but for now it identified by name.

Here is a list of significant changes:

 - CaptivePortalTracker now only test WiFi networks instead of all networks
 - checkMobileProvisioning checks for provisioning networks and doesn't
   try to ping.
 - IConnectivityManager.aidl changes:
   * getProvisioningOrActiveNetworkInfo was added to and used by Manage
     mobile plan in WirelessSettings so even when there is no active
     network it will still allow provisioning. Otherwise it would report
     no internet connection.
   * setSignInErrorNotificationVisible is used by both
     CaptiviePortalTracker and checkMobileProvisioning so they use the
     same code for the notifications.
   * checkMobileProvisioning was simplified to have only a timeout as
     returning the result is now harder as we abort simultaneous call
     otherwise we'd could get into loops because we now check every time
     we connect to mobile.
 - Enhanced MDST to handle the provisioning network.
 - Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new
   state so we don't announce to the world we're connected.
 - TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN
   is sent by the low level data connection code to notify Connectivity
   Service that a provisioning apn has connected. This allows CS to
   handle the connection differently than a normal connection.

Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 08:55:16 -07:00
Jason Monk
1f809c7761 Merge "Don't clear Global Proxy on boot." into klp-dev 2013-08-28 14:41:15 +00:00
Amith Yamasani
e9ecc8b499 Improve Intent disambig dialog behavior
Keep track of last chosen activity for a particular intent, similar
to how it is tracked for "Always" choices.
Pre-select the last chosen activity if previously the user picked
"Just once".
Downgrade "Always" to "Last chosen" if there's a new kid on the block,
instead of removing it entirely.
Add methods to set and get last chosen entry.

UI - switch from Grid to List.

Bug: 9958096

Change-Id: Ied57147739a3ade1d36c3a7ec1e8ce77e5c5bb16
2013-08-27 18:05:00 -07:00
Craig Mautner
61f0f9ada5 Merge "When adding a window evaluate all tasks." into klp-dev 2013-08-27 21:20:52 +00:00
Craig Mautner
018be3da7b When adding a window evaluate all tasks.
Previously the code was adding a window based only on the tasks on
the stack belonging to the window being added. But if a window from
another stack was on top the window would be added out of order.

In particular when there was a dialog over the launcher app and the
device was rotated, the launcher window was being added over the
dialog. This caused the launcher icons to obscure the dialog and for
the dialog buttons to be untouchable.

Fixes bug 9984067.

Change-Id: I9a57eb641d118f4a90e98af8ca77127ab5364e79
2013-08-27 13:25:17 -07:00
John Spurlock
ef4adae5de Allow wallpaper to extend into the entire screen.
Previously it was constrained to displayInfo.appWidth/appHeight
which comes from PWM.getNonDecorDisplayWidth/Height, which includes
the nav bar.

Also adjust window layout to entire screen.

This allows wallpaper to extend into the navigation bar region,
important if the nav bar is hidden or transparent.

Bug:10505328
Change-Id: Ia6057b9c57b476a48f3b2d8b6368fd631e944a3e
2013-08-27 12:56:41 -04:00
Jason Monk
a8220a73c5 Don't clear Global Proxy on boot.
Doesn't clear the global proxy when a deprecated one is not found because
there still may be a non-deprecated global proxy present.

Bug: 10457179
Change-Id: I68e6d5aee7b4940f9315484060c7d82cb8ccfa70
2013-08-27 10:51:24 -04:00
Lorenzo Colitti
703187f765 Merge "Add a simple test for NetworkManagementService." into klp-dev 2013-08-27 04:08:54 +00:00
Wink Saville
59adfca65d am 33283a97: am dce52cdb: DO NOT MERGE: MDST is not ready until connected to DcTracker.
* commit '33283a9726a29b5a79d7885fe194d52c0ebe7450':
  DO NOT MERGE: MDST is not ready until connected to DcTracker.
2013-08-26 11:50:10 -07:00
Wink Saville
4e6e1749ed am b42beeaf: am e63411f2: In isMobileOk don\'t execute finally if mobile data is not supported.
* commit 'b42beeafcf8117fb4ac41dd91fc9e6113c0d6aae':
  In isMobileOk don't execute finally if mobile data is not supported.
2013-08-26 11:43:25 -07:00
Jim Miller
14cabdabac Merge "Add setting to disable keyguard widgets" into klp-dev 2013-08-24 01:28:28 +00:00
destradaa
9e73cce6ac Merge "Fix leaks of JNI objects in the local reference table" into klp-dev 2013-08-24 00:44:37 +00:00
Jim Miller
f45bb40388 Add setting to disable keyguard widgets
This allows disabling keyguard widgets through Settings.
On new devices, the setting is turned off by default.  If the
user currently has widgets in keyguard, then we keep them
and re-enable the setting.

Change-Id: I7258921231d439925ac8627105710efa99309094
2013-08-23 17:36:30 -07:00
destradaa
b75cb3aeb4 Fix leaks of JNI objects in the local reference table
Change-Id: I769502f8b13e0025707abdf98c24f2cac0604602
2013-08-23 17:26:16 -07:00
Chong Zhang
5de1faca16 Merge "wifi-display: add certification options" into klp-dev 2013-08-23 23:18:52 +00:00
Jeff Sharkey
98d6212327 Merge "Add CancellationSignal support to file operations." into klp-dev 2013-08-23 23:17:47 +00:00
Chong Zhang
1f3ecaae63 wifi-display: add certification options
When certification mode is enabled:

- Pass wfd session info to wifi display settings

- Allow sink to connect to source

- Add interface in display manager for pausing/resuming session

- Add interface in WifiP2pManager for setting lc, oc and starting
  autonomous GO

Note that we're compliant regardless of certification mode, but
some confusing options (eg. allowing incoming connection from
sink) we want to hide when not being tested.

Bug: 9371882
Change-Id: Icc7dcae4e046453796cfa03f5f197055fabf234b
2013-08-23 16:02:09 -07:00
Svetoslav Ganov
44720af55a Print UI bug fixing and printer discovery refactoring.
1. Added support for selecting a printer from the all printers activity
   that is not in the initial printer selection drop down. The user
   initially sees a sub set of the printers in the drop down and the
   last option is to see all printers in a separate activity. Some
   of the printers in the all printers activity are not shown in the
   initial drop down.

2. Refactored printer discovery by adding (private for now) printer
   discovery app facing APIs. These APIs are needed to support multiple
   printer selection activities (print dialog and all printers activities)
   and also the settings for showing all printers for a service.

   Now multiple apps can request observing for printers and there is
   a centralized mediator that ensures the same printer discovery
   session is used. The mediator dispatches printer discovery specific
   requests to print services. It also aggregates discovered printers
   and delivers them to the interested apps. The mediator minimizes
   printer discovery session creation and starting and stopping discovery
   by sharing the same discovery session and discovery window with
   multiple apps. Lastly, the mediator takes care of print services
   enabled during discovery by bringing them up to the current
   discovery state (create discovery session and start discovery if
   needed). The mediator also reports disappearing of the printers
   of a service removed during discovery and notifies a newly
   registered observers for the currnet printers if the observers are
   added during an active printer discovery session.

3. Fixed bugs in the print UI and implemented some UX tweaks.

Change-Id: I4d0b0c5a6c6f1809b2ba5dbc8e9d63ab3d48f1ef
2013-08-23 18:36:33 +00:00
Jeff Sharkey
bd3b902567 Add CancellationSignal support to file operations.
Since ContentProvider file operations can end up doing substantial
network I/O before returning the file, allow clients to cancel their
file requests with CancellationSignal.

Ideally this would only be needed for openFile(), but ContentResolver
heavily relies on openAssetFile() and openTypedAssetFile() for common
cases.

Also improve documentation to mention reliable ParcelFileDescriptors
and encourage developers to move away from "rw" combination modes,
since they restrict provider flexibility.  Mention more about places
where pipes or socket pairs could be returned.

Improve DocumentsContract documentation.

Bug: 10329944
Change-Id: I49b2825ea433eb051624c4da3b77612fe3ffc99c
2013-08-23 11:27:25 -07:00
Jason Monk
4359d56420 Merge "System binds PAC Local Proxy instead of self start" into klp-dev 2013-08-23 17:53:33 +00:00
Satoshi Kataoka
d866f5002a Merge "Add new API shouldOfferSwitchingToNextInputMethod" into klp-dev 2013-08-23 09:31:51 +00:00
Lorenzo Colitti
7421a01f18 Add a simple test for NetworkManagementService.
For now, this only tests network observers. It works by starting
NetworkManagementService with a fake netd socket, feeding it
inputs, and seeing if the appropriate observer methods are
called.

Bug: 10232006
Change-Id: I827681575642a4ee13ae48b81272521544b676bd
2013-08-23 18:30:19 +09:00
Jeff Brown
0b31d812ab Drop touch events when no window was touched.
Prevent spurious ANRs in the case where an input event is simply
undeliverable because there is no window at the touched location.
Previously, we would assume that we were just waiting for an
application to start and become available to handle the event but
this assumption is no longer valid.

Monkeys in particular have a tendency to inject events outside
of the boundaries of the display which results in spurious ANRs.
So we should just reject them.

Bug: 9774124
Change-Id: I5c40ce4c942f0557593a229dc5253a0e0bdb8466
2013-08-22 20:07:08 -07:00