16733 Commits

Author SHA1 Message Date
John Spurlock
10459a5411 Merge "Move notification listener management into helper." 2014-04-24 14:32:41 +00:00
John Spurlock
b408e8ecd2 Move notification listener management into helper.
Part of a larger effort to reuse service management code.  This is
mostly algebraic, simply move code related to listener management
into a new helper, and cut the backreference to NoMan.  Put
user-profile code into reusable inner helper, and common uid-checking
code into a new static util helper.

Resist the urge to rewrite / reformat, but replace HashSet with
ArraySet.

Bug:13743109
Change-Id: I59e0131f632c3bbf555b5276dc5092422113cdc3
2014-04-23 21:12:45 -04:00
Winson Chung
1b244f44a7 Merge "Piping through ability for an Activity to remove its own task. (Bug 13735914)" 2014-04-23 21:35:33 +00:00
Winson Chung
3b3f464445 Piping through ability for an Activity to remove its own task. (Bug 13735914)
Change-Id: Iefcd4fbe68748195de8ee37ee2b6edef55276603
2014-04-23 13:57:06 -07:00
Emily Bernier
8a0fa6e823 Merge "Allow device or profile owner app to modify user restrictions." 2014-04-23 18:27:45 +00:00
Emily Bernier
7a2b4d11c7 Allow device or profile owner app to modify user restrictions.
Currently this is gated on being a system or root app with the
MANAGE_USERS permission; third-party MDM apps set as device or profile
owner should have this ability as well.

Bug: 13585295

Change-Id: I61d21b13b9ec66fc0cb497ec2007ee732461d448
2014-04-23 14:20:15 -04:00
Neil Fuller
ceb5d17f6a am d720ef54: am caf6497b: am 683cf1bf: Merge "Changes to support asynchronous close interruption"
* commit 'd720ef541d06be87de3b3e03c1e7fb349299a21f':
  Changes to support asynchronous close interruption
2014-04-23 16:51:47 +00:00
Neil Fuller
d720ef541d am caf6497b: am 683cf1bf: Merge "Changes to support asynchronous close interruption"
* commit 'caf6497b9a0347da7d5acbe678adc2c8187176c0':
  Changes to support asynchronous close interruption
2014-04-23 16:48:34 +00:00
Neil Fuller
caf6497b9a am 683cf1bf: Merge "Changes to support asynchronous close interruption"
* commit '683cf1bffe33f49f26d46201f96cd2eff60e8192':
  Changes to support asynchronous close interruption
2014-04-23 16:45:15 +00:00
Neil Fuller
43582df3db Changes to support asynchronous close interruption
This change contains fixes to base from libcore change
I37de3e7d1a005a73821221e6156d10b95c595d7a

Bug: 13927110

Change-Id: I2d96e50307611c269dcf47886cd4d976854da8fc
2014-04-23 16:40:35 +00:00
Jeff Sharkey
21de56a946 Add directory selection to DocumentsProvider.
Introduce new ACTION_PICK_DIRECTORY that allows users to grant access
to an entire document subtree.  Instead of requiring grants for each
individual document, this leverages new prefix URI permission grants
by defining new "via"-style URIs:

content://com.example/via/12/document/24/

This references document 24 by using a prefix grant given for
document 12.  Internally, we use isChildDocument() to enforce that
24 is actually a descendant (child, grandchild, etc) of 12.  Since
this is an optional API, providers indicate support with
Root.FLAG_SUPPORTS_DIR_SELECTION.

Extend DocumentsUI to support picking directories.  Expose
createDocument() API to work with returned directories.

Offer to canonicalize via-style URIs into direct URIs, generating
exact permission grants along the way.  Override openAssetFile()
to pass through CancellationSignal.  Move testing code into ApiDemos.

Bug: 10607375
Change-Id: Ifffc1cff878870f8152eb6ca0199c5d014b9cb07
2014-04-22 22:18:21 -07:00
Jeff Sharkey
846318a325 Allow prefix-based Uri permission grants.
Define new FLAG_GRANT_PREFIX_URI_PERMISSION which indicates that a
Uri permission grant should also apply to any other Uris that have
matching scheme, authority, and path segments.  For example, a prefix
grant for /foo/ would allow /foo/bar/ but not /foo2/.

Allow persistable and prefix grants to be issued directly through
grantUriPermission().  Relaxing persistable is fine, since it still
requires the receiver to actively take the permission.

Since exact- and prefix-match grants for the same Uri can coexist,
we track them separately using a new UriGrant key.  (Consider the
case where an app separately extends READ|PREFIX and WRITE for
the same Uri: we can't let that become READ|WRITE|PREFIX.)

Fix revoke to always take away persisted permissions.  Move prefix
matching logic to Uri and add tests.  Add new flags to "am" tool, and
various internal uses around Intent and Context.  Switch some lagging
users to ArraySet.

Bug: 10607375
Change-Id: Ia8ce2b88421ff9f2fe5a979a27a026fc445d46f1
2014-04-22 21:06:49 -07:00
Jeff Brown
caeaa37594 am 62271b95: am 3af39267: Merge "Fix HDMI hotplug display blanking behavior." into klp-modular-dev
* commit '62271b95222c5d67868ac1b3bbd8851d4fa18454':
  Fix HDMI hotplug display blanking behavior.
2014-04-23 01:25:40 +00:00
Jeff Brown
62271b9522 am 3af39267: Merge "Fix HDMI hotplug display blanking behavior." into klp-modular-dev
* commit '3af392674969b17cd3719f49ae597c7dc6ee6614':
  Fix HDMI hotplug display blanking behavior.
2014-04-23 01:22:26 +00:00
Jeff Brown
3af3926749 Merge "Fix HDMI hotplug display blanking behavior." into klp-modular-dev 2014-04-23 01:20:01 +00:00
Jeff Brown
44b1f76474 Fix HDMI hotplug display blanking behavior.
Bug: 14109146
Change-Id: Ie7de4fb05da210e8c74c795f7896cf9951701aeb
2014-04-22 18:07:24 -07:00
Ying Wang
96997a6148 am d12bf275: am d0dc8981: Merge "Javac (at least for 1.7.0_51 on Mac) wants fully qualified class name" into klp-modular-dev
* commit 'd12bf27575bc2df114abc0aadd1a62ff476b5a42':
  Javac (at least for 1.7.0_51 on Mac) wants fully qualified class name
2014-04-23 00:15:52 +00:00
Ying Wang
d12bf27575 am d0dc8981: Merge "Javac (at least for 1.7.0_51 on Mac) wants fully qualified class name" into klp-modular-dev
* commit 'd0dc898119fc43de89ff41e39d37961dacab4eaa':
  Javac (at least for 1.7.0_51 on Mac) wants fully qualified class name
2014-04-23 00:11:52 +00:00
Ying Wang
b081a59a0f Javac (at least for 1.7.0_51 on Mac) wants fully qualified class name
It looks like a Javac bug.

Bug: 14255510
Change-Id: Id3899994226049ff77854fd2a13a6d1b687a0392
2014-04-22 15:20:16 -07:00
Nick Kralevich
9a492393df am 5246f459: am d267c1a0: Merge "remove unneeded import statements."
* commit '5246f4599a0c9978012ffb1049307704b5027a0b':
  remove unneeded import statements.
2014-04-22 21:15:10 +00:00
Nick Kralevich
d236d625b4 am 3ab7882a: am a67d4a6e: Merge "remove unused import."
* commit '3ab7882a57d3c7a0e13f58837cd02138df43f301':
  remove unused import.
2014-04-22 21:14:59 +00:00
Ruchi Kandoi
62b8a49856 Adds Content Observer for the Low power mode in developer options.
Change-Id: Ibed319e734340dfd5348dbeb8fe20c01b1adaac5
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2014-04-22 20:55:31 +00:00
Nick Kralevich
5246f4599a am d267c1a0: Merge "remove unneeded import statements."
* commit 'd267c1a06fc91dc300d5c5f8b7ef9bd44825c34e':
  remove unneeded import statements.
2014-04-22 19:52:21 +00:00
Nick Kralevich
3ab7882a57 am a67d4a6e: Merge "remove unused import."
* commit 'a67d4a6e4da1eb02a15a1048a26329cfed312938':
  remove unused import.
2014-04-22 19:52:18 +00:00
Nick Kralevich
d267c1a06f Merge "remove unneeded import statements." 2014-04-22 19:24:47 +00:00
Nick Kralevich
c826257bf3 remove unneeded import statements.
Internal master is out of sync with AOSP. Resync.

Change-Id: Ia3105a4b6eb835f719471a26ae4cb33962c5b19e
2014-04-22 12:17:51 -07:00
Nick Kralevich
8cb5abcfde remove unused import.
This change resynchronizes AOSP with internal master.
The import line is unused.

Change-Id: I98bef1f88dee758f5bdcec35fba204f793d4028e
2014-04-22 12:10:24 -07:00
Ji-Hwan Lee
87e7ba4f45 Merge "Add config resource to add inital mock location providers" 2014-04-22 17:17:29 +00:00
John Spurlock
860107a2cc Merge "Do not disturb: persist user config." 2014-04-22 15:03:08 +00:00
John Spurlock
056c519df1 Do not disturb: persist user config.
Load and store user configuration for do not disturb.  Separate
out service-related aspects into new helper.  Make config availble
over NoMan for settings.

Implement phone + message based filtering (package whitelist for now).

Implement automatic enter/exit zen mode overnight scheduler.

Bug:14211946
Change-Id: Ib28aab0e4c5c9a5fd0b950b2884b1ab618fdfeca
2014-04-22 11:01:24 -04:00
Craig Mautner
6c83b77b87 am 43c6a98f: am 6985badc: Fix black ActivityView
* commit '43c6a98f0ffe079429735a485acaa81841740fac':
  Fix black ActivityView
2014-04-22 13:33:08 +00:00
Craig Mautner
7ad27288f1 am c00c89b1: am f4c909bc: Fix ActivityView lifecycle
* commit 'c00c89b1add5bcbf6a76287c9a3384877449c746':
  Fix ActivityView lifecycle
2014-04-22 13:32:54 +00:00
Craig Mautner
43c6a98f0f am 6985badc: Fix black ActivityView
* commit '6985badc632f2ff8425aa86423577a96eafc49e9':
  Fix black ActivityView
2014-04-22 13:27:53 +00:00
Craig Mautner
c00c89b1ad am f4c909bc: Fix ActivityView lifecycle
* commit 'f4c909bcb87d6f103c9f9e8255fa61bd86f4de67':
  Fix ActivityView lifecycle
2014-04-22 13:27:44 +00:00
Youngsang Cho
6b2c07cb36 Merge "Add overlay view in Tv Input Framework" 2014-04-22 00:29:49 +00:00
Jeff Davidson
2ca3962bc0 Merge "Initial implementation of NetworkScoreManager's backing service." 2014-04-22 00:02:47 +00:00
Jeff Davidson
6a4b220f12 Initial implementation of NetworkScoreManager's backing service.
This service will ultimately be responsible for propagating scores
down to lower-level network subsystems. For now, it just keeps scores
in memory and exposes these for debugging purposes via "adb shell
dumpsys network_score".

This change also adds provisioning of a default scorer. When
NetworkScoreService is first initialized, it checks to see if it has
ever set a default scorer; if not, it reads a package name from a
build config property and attempts to set it as the default.

Also add autogenerated equals/hashCode methods to all parcelables.

Bug: 14111427
Bug: 13786258
Change-Id: I02271171653d42e12acd240b73b9e23950744f6b
2014-04-21 16:04:05 -07:00
Craig Mautner
6985badc63 Fix black ActivityView
Don't add the surface to the VirtualDisplay until the activity
has drawn. That will keep the TextureView from turning black.

Fixes bug 12821632.

Change-Id: Ia06e9f91be3e14ad724f735ae4e201ac798863a2
2014-04-21 15:28:43 -07:00
Craig Mautner
f4c909bcb8 Fix ActivityView lifecycle
Major changes to maintain the VirtualDisplay across repeated
attach/detach cycles of an ActivityView. This keeps the activities
and VirtualDisplays in the ActivityView from getting into bad states.

Fixes bug 14107002.

Change-Id: Idc2aaf85ac496eab0eeb436736cb10a2020040e8
2014-04-21 15:28:42 -07:00
Robert Greenwalt
3a025393b5 Merge "Make sure events handled on same looper" 2014-04-21 22:21:24 +00:00
Robert Greenwalt
2c9f5475be Make sure events handled on same looper
Two handlers are used to call a function, but the init was not forcing them on the
same looper/thread, so we could get synchronization problems as a result.

Moved to a single looper.

Also added finally clauses to clean up if a broadcast throws an uncaught exception.

bug:13399768
Change-Id: I0044e2442335ee45a15588f910064e848cf6ac55
2014-04-21 15:12:06 -07:00
Colin Cross
95c950825f Merge "BootReceiver: add ro.boot.bootreason property to SYSTEM_LAST_KMSG" 2014-04-21 19:47:32 +00:00
Ji-Hwan Lee
26bdb8fb6c Add config resource to add inital mock location providers
So that we can provide mock location providers, e.g., in emulator build.

Change-Id: Ia8fe0925abc2faa4999ef17e386d7f3f8b13a0dc
2014-04-21 20:49:42 +09:00
Christopher Tate
740888f62e Handle /oem and /vendor as well
Bug 13170859

Change-Id: I95dec4cd68e3d64517d08b3f08eefb849ce37b86
2014-04-18 17:50:29 -07:00
Colin Cross
431614cb6b BootReceiver: add ro.boot.bootreason property to SYSTEM_LAST_KMSG
Instead of requiring the kernel to join last_kmsg and the reboot
reason together, allow both to be passed to userspace and have
userspace combine them the way the log parsers want them.

Existing devices with no ro.boot.bootreason property and kernel
support for putting the reason in last_kmsg will continue to
use the kernel's formatting.

Bug: 13813279
Change-Id: I079b0107feb1533c6a54044ca6a114741127dfbc
2014-04-18 13:47:28 -07:00
Youngsang Cho
9a22f0f0a6 Add overlay view in Tv Input Framework
A TvInputService app developers sometimes want to draw UI above a surface
playing TV. For this purpose, we add a window in TIS and allow developers to
attach their customized view on the TV surface.

Change-Id: I65c3dffa17580b8d4c42fac58bbfc8dad338c185
2014-04-18 08:36:06 -07:00
Christopher Tate
0153487d01 Merge "Support per-package lib dirs for bundled apps" 2014-04-18 00:02:44 +00:00
Christopher Tate
addfbdc09c Support per-package lib dirs for bundled apps
Bundled apps can now use /system/lib/apkname or /system/lib64/apkname
in addition to the (globally shared) /system/lib and /system/lib64
directories.  Note that when an app is updated post hoc the update APK
will look to its normal library install directory in
/data/data/[packagename]/lib, so such updates must include *all*
needed libraries -- the private /system/lib/apkname dir will not be in
the path following such an update.

"apkname" here is the base name of the physical APK that holds the
package's code.  For example, if a 32-bit package is resident on disk
as /system/priv-app/SettingsProvider.apk then its app-specific lib
directory will be /system/lib/SettingsProvider

Bug 13170859

Change-Id: Ic44cc75312f33d2f5d402a1c261b2eca3fe8badc
2014-04-17 16:54:16 -07:00
Jeff Brown
aaea4d3a48 am 18a69b93: am 8e1e4006: Merge "Add support for dynamically setting the virtual display surface." into klp-modular-dev
* commit '18a69b936afa6bdb8c65b6b582989c4dcdac45ee':
  Add support for dynamically setting the virtual display surface.
2014-04-17 22:59:59 +00:00
RoboErik
0a57a1112f Merge "Add RouteProviders to the new Media APIs" 2014-04-17 22:13:30 +00:00