25480 Commits

Author SHA1 Message Date
Wale Ogunwale
24904aa7b4 fixed build breakage due to bad merge.
Change-Id: I0c6da2e831bfbe770b16a8763513b3d2895f6f60
2015-04-01 12:22:16 -07:00
Wale Ogunwale
16a6279e5f resolved conflicts for merge of 2094bf7b to master
Change-Id: I1820d186ca602bb3cd21a15f3c23f7d6d309d43b
2015-04-01 11:54:26 -07:00
Olawale Ogunwale
4e88ecf4bc am 086071e7: Merge "[ActivityManager] Reduce report wrong anr activity"
* commit '086071e7306a73c9b3c5a56277884b4e19543b3e':
  [ActivityManager] Reduce report wrong anr activity
2015-04-01 17:56:53 +00:00
Wale Ogunwale
ee006da858 Converted more log points in AMS to use ActivityManagerDebugConfig.
Change-Id: I59e777de30e2e9a3c7d086dc634129cd19135fab
2015-04-01 08:28:14 -07:00
riddle_hsu
db46d6b074 [ActivityManager] Reduce report wrong anr activity
Symptom:
Report ANR on wrong activity.

Reproduce steps:
 (All launchMode, taskAffinity are default and
  without additional intent flag)
 Case 1:
  1.Launch activity A from launcher.
  2.Activity A starts B activity.
  3.Press home key.
  4.Launch activity A from launcher (B is top).
  5.Press back key twice to finish B and A,
    A sleep 10s in onResume.
  6.ANR will report on launcher.

 Case 2:
  1.Launch activity A from launcher.
  2.Press home key.
  3.Kill process of A.
  4.Launch activity A from launcher.
  5.A sleep 10s in onResume, press back key immediately.
  6.ANR will report on launcher.

Possible root cause:
Focused activity will not be updated every time when activity
resumed. (the condition to call setFocusedActivityLocked)

Case 1:
Launcher was stopped and not waitingVisible due to launcher
is not the previous one, then getWaitingHistoryRecordLocked
has no chance to correct the real ANR activity.

Case 2:
Due to process of next activity is died, bring existed
task will not set mResumedActivity (it will be set when its
process is started), so when assigning waitingVisible from
processStoppingActivitiesLocked, the return value of
allResumedActivitiesVisible will be true even there is no
mResumedActivity. That results set waitingVisible to false
to previous activity (e.g. launcher), then also cannot
correct ANR target as case 1.

Change-Id: I0b24f46a8fab266382ebc6e2ed84ebeca9358768
2015-04-01 18:58:07 +08: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
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