25528 Commits

Author SHA1 Message Date
Lorenzo Colitti
a12bde3567 Deal with null characters in string options.
This currently truncates all strings at the first NULL character,
except for vendorInfo, which is an opaque string.

Bug: 19985674
Change-Id: Ie53b2c55eb8a5204d7b2c7e2d8587743d923647a
2015-04-01 17:53:14 +09:00
Craig Mautner
aa2609aae7 Merge "Revert "Add lockTaskOnLaunch attribute."" 2015-04-01 07:48:08 +00:00
Craig Mautner
6cd6cec2ad Revert "Add lockTaskOnLaunch attribute."
This reverts commit 0fb1cb56abf708291c09c783463408c7074ae9a7.
2015-04-01 00:02:12 -07:00
Craig Mautner
787bacd35a am a54f2b16: am 8bed4843: am d720dedb: Merge "Clear the previous states before setting the new app visibility"
* commit 'a54f2b164a4e162069709fd1f3b3fb7ff08dcd47':
  Clear the previous states before setting the new app visibility
2015-04-01 02:20:31 +00:00
Craig Mautner
e1d6333341 Merge "Add lockTaskOnLaunch attribute." 2015-04-01 01:40:57 +00:00
Craig Mautner
8bed4843dc am d720dedb: Merge "Clear the previous states before setting the new app visibility"
* commit 'd720dedb03dfc937361e7e722171f8a1b9d74cf1':
  Clear the previous states before setting the new app visibility
2015-04-01 01:27:34 +00:00
Craig Mautner
0fb1cb56ab Add lockTaskOnLaunch attribute.
The new AndroidManifest activity attribute, lockTaskOnLaunch attribute
is a boolean that puts the system in lockTask mode when true and if
the activity specified is the root of a privileged task.

This bug also fixes lockTask mode for root activities that finish
themselves. Previously finish was not allowed even if there were
activities left in the task that were still valid.

A NullPointerException for lock task toasts has also been fixed.

Fixes bug 19995702.

Change-Id: Iba6976b1a0cc5a22eb526db66d2e9af66445541f
2015-03-31 18:15:05 -07:00
Qiwen Zhao
9a1ada6df6 Merge "Data usage API: any uid is accessible to system apps running in any user" 2015-04-01 00:40:05 +00:00
Svet Ganov
36a9ba67fc Merge "Fix clobbered shared user install permissions." 2015-03-31 23:59:10 +00:00
Svet Ganov
37f05184b5 Fix clobbered shared user install permissions.
The install permissions for a shared user were clobbered when a pending
package for this user was matched to the shared user after reading the
state from XML. The reason was that the copy code in PackageSettingBase was
using the getter to get its settings state to which to copy the permissions
for the pending package but this is the permissions state for the shared
user instead of the package. Since the pending package has no permissions
we ended up clobbering the permissions for the shared user.

bug:19955926

Change-Id: Ia8d090883d50fc987a32ceeed6c7562c49698328
2015-03-31 16:52:49 -07:00
Craig Mautner
db3ff2221f Merge "Clear the previous states before setting the new app visibility" 2015-03-31 22:54:27 +00:00
Fyodor Kupolov
654875fad0 Merge "Support for nested bundles in setApplicationRestrictions" 2015-03-31 22:52:18 +00:00
tiger_huang
a9da39e86d Clear the previous states before setting the new app visibility
If setAppVisibility() is called multiple times in a short interval
while the screen is turned off between the calls, the visibility of
the app would be wrong. For example, the user may see the app under
the launcher, not the wallpaper under the launcher.

The flow to the issue:
1. Screen is on.
2. AM calls setAppVisibility() token=App A's token, visible=true
3. Screen is turned off.
4. AM calls setAppVisibility() token=App A's token, visible=false

Note:
a. In 2., WM would put App A into mOpeningApps, and tell it to be
   visible.
b. In 4., because the screen is off now, App A would not be removed
   from mOpeningApps. App A might be told to be invisible directly
   through setTokenVisibilityLocked(), but it would be told to be
   visible again in handleAppTransitionReadyLocked() later.

Change-Id: Icf3d69031ea2822245008248ec8f12bd57218880
2015-03-31 15:52:15 -07:00
Ruben Brunk
095d999045 Merge "Add CameraService to system server." 2015-03-31 22:27:53 +00:00
Craig Mautner
d720dedb03 Merge "Clear the previous states before setting the new app visibility" 2015-03-31 22:24:15 +00:00
Adrian Roos
1e3e6e99c6 Merge "Fix WindowOrientationListener crash if no sensor present" 2015-03-31 19:02:09 +00:00
Ruben Brunk
9d21ee5d77 Add CameraService to system server.
- Adds a camera service to system server that forwards events to the
  mediaserver camera service.
- Notify the camera service when the device user changes.

Bug: 19186859
Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668
2015-03-31 12:01:22 -07:00
Simranjit Singh Kohli
3580cd0b52 Merge "[Auth:Last Credentials Timing] : Introducing API" 2015-03-31 18:32:51 +00:00
Adrian Roos
1274196374 Fix WindowOrientationListener crash if no sensor present
Bug: 19999145
Change-Id: Ie0c2a2f9ff337a6538e85dc9bd0ef108dd468d28
2015-03-31 11:20:30 -07:00
Wale Ogunwale
1252317bdc Merge "Fix not persisting activities with FLAG_ACTIVITY_RETAIN_IN_RECENTS." 2015-03-31 17:20:16 +00:00
Christopher Tate
9e521fa9d1 Merge "Fixes to full-backup scheduling edge cases" 2015-03-31 17:19:39 +00:00
Zoltan Szatmary-Ban
9aa7258a17 Data usage API: any uid is accessible to system apps running in any user
This CL mostly affects Settings app as it can run in a user different
than UserHandle.OWNER. Since it is a system app it should have access
to all uid's data usage, regardless of which user it is currently running
in.

Bug: 19967498
Change-Id: I4a7787134d998457f7e2a1029183d44d9584083e
2015-03-31 18:09:20 +01:00
Wale Ogunwale
29382d2961 resolved conflicts for merge of 6abcec1d to master
Change-Id: I28986f8863298a767a8290b02d5418d4d1d42d17
2015-03-31 09:53:39 -07:00
dcashman
8c04facdf5 Refactor KeySet code.
Eliminate dependency in packagesetting keyset metadata on other packages by
introducing reference counts for KeySets and public keys.  This also allows
keysets to retain their id across reboots by eliminating the need to remove
all keyset data after scanning all packages on boot, which also should
drastically reduce the number of calls to ArraySet.removeAll().

Bug: 19617481

Change-Id: I6cc65f30e431b8e4ebe49047a9219a0d983f2774
2015-03-31 09:27:31 -07:00
Mike Lockwood
63473869da Merge "Add event scheduling support to USB MIDI Manager code" 2015-03-31 16:23:24 +00:00
Olawale Ogunwale
df736de8d8 am d052a3d3: Merge "[ActivityManager] Fix index out of bounds when updating next pss time."
* commit 'd052a3d37beffff3735716340745ec7c83efc23d':
  [ActivityManager] Fix index out of bounds when updating next pss time.
2015-03-31 16:21:03 +00:00
Olawale Ogunwale
d052a3d37b Merge "[ActivityManager] Fix index out of bounds when updating next pss time." 2015-03-31 16:09:16 +00:00
Mike Lockwood
2776133be7 Add event scheduling support to USB MIDI Manager code
Change-Id: I9fdaaac35c296acc67ee0cf346b0c7b56bf58393
2015-03-31 08:57:06 -07:00
Neil Fuller
cea283535c resolved conflicts for merge of 962a11ad to master
Change-Id: I8c6ac62d7267629c019997bb343d863aa56264eb
2015-03-31 11:15:39 +01:00
Neil Fuller
efd9290789 am 25c5296b: Merge "An updater for all timezone data on a device"
* commit '25c5296b0d85979ad216195000b857dce8127ab1':
  An updater for all timezone data on a device
2015-03-31 09:31:48 +00:00
Neil Fuller
25c5296b0d Merge "An updater for all timezone data on a device" 2015-03-31 08:31:00 +00:00
Craig Mautner
0b037e93fc Merge "Remove one ANR cause and add logging for another" 2015-03-31 05:50:42 +00:00
Craig Mautner
cceeb58c13 Remove one ANR cause and add logging for another
For bug 19823482.

Change-Id: Ic44c4fd11ef92546118b09526c97446a92a7b4e7
2015-03-30 22:46:38 -07:00
riddle_hsu
6793fc328a [ActivityManager] Fix index out of bounds when updating next pss time.
Symptom:
System server crash.

Root Cause:
The value curProcState for array index is -1 if the process
has not attached yet.

Solution:
Skip computing for process which is not attached or curProcState
is nonexistent state.

Change-Id: I71aaf45bb78d73097ebe9dfebf76b72f2d243232
2015-03-31 11:54:14 +08:00
Jeff Sharkey
4887789e44 Progress towards dynamic storage support.
Storage devices are no longer hard-coded, and instead bubble up from
whatever Disk and VolumeBase that vold uncovered, turning into
sibling Java objects in MountService.  We now treat vold events as
the source-of-truth for state, and synchronize our state by asking
vold to "reset" whenever we reconnect.

We've now moved to a model where all storage devices are mounted in
the root mount namespace (user boundaries protected with GIDs), so
we no longer need app-to-vold path translation.  This also means that
zygote only needs to bind mount the user-specific /mnt/user/n/ path
onto /storage/self/ to make legacy paths like /sdcard work.  This
grealy simplifies a lot of system code.

Many parts of the platform depend on a primary storage device always
being present, so we hack together a stub StorageVolume when vold
doesn't have a volume ready yet.

StorageVolume isn't really a volume anymore; it's the user-specific
view onto a volume, so MountService now filters and builds them
based on the calling user.  StorageVolume is now immutable, making
it easier to reason about.

Environment now builds all of its paths dynamically based on active
volumes.  Adds utility methods to turn int types and flags into
user-readable strings for debugging purposes.

Remove UMS sharing support for now, since no current devices support
it; MTP is the recommended solution going forward because it offers
better multi-user support.

Simplify unmount logic, since vold will now gladly trigger EJECTING
broadcast and kill stubborn processes.

Bug: 19993667
Change-Id: I9842280e61974c91bae15d764e386969aedcd338
2015-03-30 19:46:23 -07:00
Christopher Tate
ab06997ed5 Fixes to full-backup scheduling edge cases
If a scheduled full-data backup was attempted but the device had not yet
run the primary key/value backup pass, the full-data backup scheduler
would wind up in a bad state and potentially never retry until reboot.

We now properly reschedule a future retry, using the key/value
scheduling batch quantum as a backoff to be sure to give it a chance
to run before the next time full data is attempted.

Change-Id: Ic7eb7a7940fe6380f40d04813a46fc336e95815e
2015-03-30 18:00:52 -07:00
Fyodor Kupolov
262f9952e6 Support for nested bundles in setApplicationRestrictions
Added new restriction types - bundle and bundle-array.

Modified RestrictionsManager.getManifestRestrictions to support new
hierarchical restrictions.
Added RestrictionsManager.convertRestrictionsToBundle, which enables
programmatic conversion from a list of RestrictionEntries to a Bundle.

Modified read/write methods for application restrictions in UserManagerService.
Added unit tests.

Bug: 19540606
Change-Id: I32b264e04d5d177ea5b4c39a8ace5ee0ce907970
2015-03-30 17:59:07 -07:00
Fabrice Di Meglio
607f1f09c3 Merge "Add IntentFilter auto verification" 2015-03-31 00:16:59 +00:00
Makoto Onuki
7864e8e25a Merge "Enterprise quick contact 1/2" 2015-03-30 23:32:06 +00:00
Makoto Onuki
1040da1d4e Enterprise quick contact 1/2
Now openQuickContact goes thorough DPM.  When a lookup URI is build with
a lookup key returned by the enterprise lookup APIs for a corp contact, the
lookup key will have a special prefix.  In that case we go through DPM
and have it launch QC on the managed profile, if the policy allows.

For now we use the same DPM policy as enterprise-caller-id to disable this.

Design doc: go/cp2-mnc-enterprise-dd

Bug 19546108

Change-Id: I831a8190ae902ae3b1248cce6df02e3a48f602d2
2015-03-30 16:28:39 -07:00
Olawale Ogunwale
5670d9a250 am 4af5bd7c: Merge "Add ProcessInfoService to activity manager."
* commit '4af5bd7cdaccdba6001a384a81c258f542e74075':
  Add ProcessInfoService to activity manager.
2015-03-30 23:25:15 +00:00
Adrian Roos
988e3a570f Merge "Prevent sensor induced rotations while screen is touched" 2015-03-30 22:02:00 +00:00
Makoto Onuki
dc0078b794 Merge "Revert "Enterprise quick contact 1/2"" 2015-03-30 20:43:19 +00:00
Makoto Onuki
4fd8d4ab2a Revert "Enterprise quick contact 1/2"
This reverts commit 75a0882b946df6de4775c9e54ca023ff54f3f678.

Change-Id: Ibe332885824b228bf1b1147d141c9395554ff67f
2015-03-30 20:42:20 +00:00
John Reck
c74e289a65 Merge "Add GraphicsStatsService" 2015-03-30 19:39:27 +00:00
Makoto Onuki
b13f44bc6e Merge "Enterprise quick contact 1/2" 2015-03-30 19:24:42 +00:00
Ruben Brunk
e1e1969c96 Add ProcessInfoService to activity manager.
- Adds a new AIDL interface for querying process
  information from activity manager.

Bug: 19186859
Change-Id: Ic08858f346d6b66e7bfc9da6faa2c6e38d9b2e82
2015-03-30 12:20:16 -07:00
Fyodor Kupolov
b94c1657eb Support for storing OAT files in app directory
In installPackageLI, dexopt is now performed on a staging directory of the app
(dexopt phase 1). For each codepath:
 - /oat/<isa> directory is created
 - dexopt output goes to the newly created directory. Optimized files have
   .odex extension.

Bug: 19550105
Change-Id: Iec59790d97837b78af82b079fd1970de3388c91d
2015-03-30 11:32:56 -07:00
Simranjit Singh Kohli
6c7c4ada8b [Auth:Last Credentials Timing] : Introducing API
Storing last successful sign-in/authentication timings, and providing that
information as extra's in updateCredentials and confirmCredentials.
Also, adding a new api: AccountManager#accountAuthenticated(Account).

Change-Id: Icd0dac35b13d61bc28a2e045b96caefffeb353be
2015-03-30 11:08:18 -07:00
Fabrice Di Meglio
1c1b47125d Add IntentFilter auto verification
The purpose of this feature is to prompt the Disambiguation dialog
to Users as less as possible.

- add the new "autoVerify" property to the IntentFilter class
- add new APIs to PackageManager:
 verifyIntentFilter(int, int, List<String>),
 getIntentVerificationStatus(String, int),
 updateIntentVerificationStatus(String, int, int),
 getIntentFilterVerifications(String)
for supporting IntentFilter verification
- add support for multi-user
- update PackageManager for IntentFilter verification:
basically when we are installing a new package, ask for verification
of all domains from the IntentFilters that have the "autoVerify" to true.
This means that the PackageManager will send a well defined protected
broadcast (with a new INTENT_FILTER_NEEDS_VERIFICATION action) to
an IntentFilter verifier to do the real job of verification.
We are passing in the broadcast Intent all the necessary data for
doing the verification. The PackageManager will receive as response
the result code of the domain verifications and, if needed, the list
of domains that have failed the verification.
- add a new INTENT_FILTER_VERIFICATION_AGENT permission that needs to
be set by an intent filter verifier to be considered as a trustable
party by the PackageManager.
- add also a new BIND_INTENT_FILTER_VERIFIER permission for securing
the binding between the PackageManager and a service doing the
intent filter verifications.
- add ResolveInfo filterNeedsVerification which is a boolean
to knows if the IntentFilter is of a type that needs a verification
(action VIEW, category BROWABLE, HTTP/HTTPS data URI)
- add new "domain-preferred-apps" / "d" dump command for listing the
prefered Apps for all domains
- add new "intent-filter-verifiers" / "ivf" command for listing the
IntentFilterVerifier used
- introduce the IntentVerificationService which is a basic service
for verifying IntentFilters. This service will send HTTPS requests
to the domain declared in the IntentFilter(s) for doing the
verification. This service has a low priority level so that it
can be replaced by a more sophisticated one if needed. This service
is updating the PackageManager intent verification states thru
the updateIntentVerificationStatus(...) API.
- update MockPackageManager

Change-Id: I0bfed193d0bf1f7c7ac79f6c1b160b7ab93b5fb5
2015-03-30 10:58:35 -07:00