25655 Commits

Author SHA1 Message Date
Fyodor Kupolov
3d8b7f4d50 Merge "Support for storing OAT files in app directory" 2015-04-02 23:11:11 +00:00
younghwan1.kim
cd005ebf76 [ActivityManager] Do not add service to reschedule after removing users.
Some service which has persistent attribute has restarted again and
again after removing users.
but it dies right after launching because it is not valid in owner mode.

This patch will check service's userId whether userId is alive or not.
And then if userId is not alive, then service will bring down.

Change-Id: Id99bf3c651b88e377f1fd6bec8aaad81318d7579
2015-04-03 08:08:30 +09:00
Dongwon Kang
6f0240cf63 TIF: Add time shift APIs.
Change-Id: I4faecd99d9e565c7228fc4b9da99e2adf1e67f19
2015-04-02 12:11:25 -07:00
Wale Ogunwale
bcfe87f3e0 resolved conflicts for merge of 65073b91 to master
Change-Id: I65a9d95caa98ec33e41480546b4447ec787c6840
2015-04-02 10:34:28 -07:00
Olawale Ogunwale
9987b6e867 am e4d4e22f: Merge "[ActivityManager] Avoid improper resume top activity."
* commit 'e4d4e22f26bfd36a553fb24232d2fd4ddf4fc907':
  [ActivityManager] Avoid improper resume top activity.
2015-04-02 17:00:12 +00:00
Olawale Ogunwale
e4d4e22f26 Merge "[ActivityManager] Avoid improper resume top activity." 2015-04-02 16:39:18 +00:00
riddle_hsu
558e849a77 [ActivityManager] Avoid improper resume top activity.
When there is a process died, only resume top if
it contains visible activity.

This can fix case 1 in
https://android-review.googlesource.com/#/c/120901/

Change-Id: I45584e76f9e863980d04bbb593d7d26a8900acd0
2015-04-02 16:43:13 +08:00
tiger_huang
950ee77fc7 Remove the window whose client process has died or become zombie
Window Manager Service would fail to report window-resized to the
process which has become zombie. This would cause the window to
freeze screen continuously. In this case, we assume the process has
died and remove its window to recycle resources and to prevent it from
freezing the screen.

Change-Id: Ic7384731bf9a1fa8b9602d4f1dbee7492db126c5
2015-04-02 06:42:18 +00:00
Jinsuk Kim
5bcf5bf6b4 CEC: Support arc feature flag for multiple ports
mArcFeatureEnabled is extended to a flag array to correctly
indicate the state of each port that supports ARC.

Bug: 19957954
Change-Id: I63e4dc2ebd4d71c5ebf59118a3076b52b489c2f2
2015-04-02 12:10:43 +09:00
Jinsuk Kim
a5445ce992 CEC: Let arc termination start before standby
Bug: 19930352
Change-Id: Ie344f06a66beafecf64eccadc1881c4d2ec170b3
2015-04-02 12:10:24 +09:00
Jim Miller
ebbf205bc6 Prepare to make Fingerprint API public.
- move fingerprint support files into hardware area
- move jni into services/core

Change-Id: I48a8e43d6d328fb66d79919c255e4c44e984b4d1
2015-04-01 19:20:08 -07:00
Lorenzo Colitti
25e9d87b11 Merge "Deal with null characters in string options." 2015-04-02 01:04:00 +00:00
ztenghui
d29c29270a Merge "Start searching the dimension configuration for atlas from the biggest value." 2015-04-01 22:41:39 +00:00
Bryce Lee
2ed3e5fba6 am d7e349e8: am 7eeaad24: am 7a1454fe: Merge "Do not use the status bar as the system decor layer if it is not visible." into lmp-mr1-modular-dev
* commit 'd7e349e8cbfc290f1cbbf099b0b9c76e545f5357':
  Do not use the status bar as the system decor layer if it is not visible.
2015-04-01 22:09:19 +00:00
ztenghui
072be09aaf Start searching the dimension configuration for atlas from the biggest value.
The old way will almost always miss the MAX_SIZE * MAX_SIZE case.
Most of time, it will be fine.
But if the threshold is just fall a bit short from MAX_SIZE * MAX_SIZE, then
it is likely that no generated configuration can be bigger than the threshold.

At the same time, a power of 2 size texture is more likely be used in the new
way. Better for memory alignment (or usage) and potential performance.

b/19966623

Change-Id: I4683fd5dea347158bc05d95cc7d777cc391b7fba
2015-04-01 14:42:33 -07:00
Wale Ogunwale
f16a281066 Fixed NPE when trying to animate a windows whose display is gone.
In some cases it is possible for the AppToken.allAppWindows list to
get out of sync with the list of windows known to WMS if the client
doesn't call Session.remove(Window). This can lead to an NPE when
the animation threads runs and the display for the window has been
removed.

Also corrected some method names/scopes I ran across while debugging.

Bug: 19972099
Change-Id: Ib0ae7ede6c506f833bbdd66723b88e7504a61907
2015-04-01 13:43:34 -07:00
Wale Ogunwale
356c628e1b fixed build breakage due to bad merge. again...
Change-Id: I601bade61837e4408be083530d10c48c0595b38c
2015-04-01 12:32:32 -07:00
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
Ronnie Leng
4c5c6f43dd [ProcessStas] fix index out of bounds when add duration.
Root Cause:
There is a defect in current ProcessStats design
and following is the scenario:
1. Process A is started due to activity with
name of A
2. Process A creates ProessState with application
uid of A
3. Process B is started due to isolated service
declared in application A with name of A
4. Process B uses ProcessState of Process A as
it uses same application uid of A
5. Process B is finished and it leads to
ProcessState marked as dead
6. Process A still keeps using the invalid
ProcessState in dead state
7. IndexOutOfBoundsException is triggered when
system tries to update process state of Process A

Resolution:
use process uid to replace application uid for
getProcessStatLocked.

Change-Id: I881ad9fc492c9e1a892c9e957180cebcfef8352d
Signed-off-by: Ronnie Leng <ronnie.leng@gmail.com>
2015-04-01 11:23:45 -05: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
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