11840 Commits

Author SHA1 Message Date
Christopher Tate
46eadae12f Make sure to propagate privileged status when upgrading an app
Bug 9470309

Change-Id: Ibc0c8b2fa01da1bd5f5b6ed5530a6bd9a1384846
2013-06-26 14:22:21 -07:00
Dianne Hackborn
49a31e0d67 Merge "Update procstats to start collecting/reporting pss." 2013-06-26 21:11:49 +00:00
Georgi Nikolov
dbe846b02e Bugfix 9373708
JBMR2 runtime restart (system process crash in the sync manager) during setup

The fix is to ensure that all access to SyncStatusInfo and related objects happens
while holding the mAuthority lock or is on a per-thread copy of the objects

Also, includes an unrelated fix for a bug I just noticed in the way
dumpSyncState() prints the periodic sync info

Change-Id: Id9e4dff41029412e133bdabc843d555434d9a12f
(cherry picked from commit 182ff3acbad9850b40d37ad1c23106be6eda8476)
2013-06-26 20:16:05 +00:00
Robert Greenwalt
505e35bca9 am c869696e: am 65f7a95f: am 2f50097a: Merge "Fix power issues around wifi scans." into jb-mr2-dev
* commit 'c869696ef3c1dca3efbc6ce8ab804e8a1b117900':
  Fix power issues around wifi scans.
2013-06-26 11:54:55 -07:00
Dianne Hackborn
13ac041b9f Update procstats to start collecting/reporting pss.
Completely reworked how it manages its data, since trying
to keep track of all of the possible pss data with the old
data structures would have made it huge.  Now we have a sparse
data structure for pss and process times.  (Will switch service
times over to it soon.)

Currently the only thing that collects pss data is running
"dumpsys meminfo".  More will be added later.

Modified checkin output to also scale better as more distinct
data categories are added, and added output of pss data.  Now
instead of dumping every possible entry as a comma-separated
list, it dumps a comma-separated list of only the entries with
data, tagged with the state they go with.

Also fixed some problems in the checkin reporting of batterystats
(it needs to escape commas), added checkin reporting of the history
list, fixed parsing of kernel wake locks to strip quotes, fixed
wake lock name that the sync manager generates to be more sane.

Change-Id: Ibf4010838a9f685ebe1d93aff86c064ccc52b861
2013-06-26 11:45:36 -07:00
Robert Greenwalt
c869696ef3 am 65f7a95f: am 2f50097a: Merge "Fix power issues around wifi scans." into jb-mr2-dev
* commit '65f7a95fc4c06127e7372bcb0d14e561cc23dd80':
  Fix power issues around wifi scans.
2013-06-26 10:55:00 -07:00
Robert Greenwalt
2f50097a5d Merge "Fix power issues around wifi scans." into jb-mr2-dev 2013-06-26 17:43:39 +00:00
Robert Greenwalt
8971084258 Fix power issues around wifi scans.
- Sending a broadcast indicating when scan requests could be serviced so that
apps don't request scans we won't do anything with.
- Fix our batt stats accounting so we only count it if we send the request to
the driver.

bug: 8868201
bug: 9496690
Change-Id: I64a4f1c294c848ac64c50d8854ed4a6a1a47f603
2013-06-26 10:00:16 -07:00
Vinit Deshapnde
8ed09e893f Fix an NPE in NsdManager
The NPE happens because NSD Manager doesn't always notify with a 'good'
notification for SERVICE_FOUND. It can get in a situation where a
SERVICE_FOUND is recevied from MDnsDs demon when processing StopDiscovery
on the messaging thread. When that happens, NsdService sends a message
to NsdManager with an invalid index of the listener.

The fix is twofold. First, we fix NsdService to not generate a message if
it doesn't have a good listener index. And second, we also fix NsdManager
to watch for invalid index.

Change-Id: I3d63af10bded13c72e8e437a1ebf74a666760432
2013-06-25 19:45:03 -07:00
Svetoslav
b10804a903 am 0cb0a37f: am a0b9e1ee: am 99e4a0f5: Merge "Improper initialization of the accessibility manager service." into jb-mr2-dev
* commit '0cb0a37f1c8463fa3ba535dc4969316f7c1cbf88':
  Improper initialization of the accessibility manager service.
2013-06-25 17:02:01 -07:00
Craig Mautner
4addfc5f39 Add API to convert translucent Activity to opaque.
Fixes bug 9298778.

Change-Id: If6198f42bdea8aa727a2abc672eb0062aaf63ca3
2013-06-25 16:56:37 -07:00
Amith Yamasani
655d0e2029 Single-user restrictions
Introduces a new "blocked" state for each package. This is used to temporarily
disable an app via Settings->Restrictions.

PIN creation and challenge activities for use by Settings and other apps. PIN
is stored by the User Manager and it manages the interval for retry attempts
across reboots.

Change-Id: I4915329d1f72399bbcaf93a9ca9c0d2e69d098dd
2013-06-25 16:03:55 -07:00
Christopher Tate
a5df9aa497 am 3c0cd0b5: am 34718238: am 3e7d0344: Merge "Avoid adding FORWARD_LOCK flag to an updated system app"
* commit '3c0cd0b54064f81a6a74d895707453fb0132719c':
  Avoid adding FORWARD_LOCK flag to an updated system app
2013-06-25 16:02:13 -07:00
Svetoslav
0cb0a37f1c am a0b9e1ee: am 99e4a0f5: Merge "Improper initialization of the accessibility manager service." into jb-mr2-dev
* commit 'a0b9e1eead9cbde980ca5ee8406100d9f3bb8d4d':
  Improper initialization of the accessibility manager service.
2013-06-25 15:01:16 -07:00
John Spurlock
bf991a8f42 Move battery stats call from SystemUI to system server.
The UPDATE_DEVICE_STATS permission is no longer required in sysui.

Change-Id: Icc3120b7873563e3727e56bed9f3b4767da0606d
2013-06-25 10:21:11 -04:00
Dianne Hackborn
d982851d29 Merge "Use FastPrintWriter... everywhere." 2013-06-25 01:18:57 +00:00
Dianne Hackborn
8c84109b9f Use FastPrintWriter... everywhere.
One problem this turned up is, because FastPrintWriter does
its own buffering, a lot of code that used to use PrintWriter
would fail -- if it pointed to a StringWriter, there was no
buffering, so it could just immediately get the result.  Now
you need to first flush the FastPrintWriter.

Also added some new constructors to specify the size of buffer
that FastPrintWriter should use.

Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
2013-06-24 18:16:48 -07:00
Craig Mautner
a3f62a8439 Merge "When an app dies launch home conditionally." 2013-06-24 23:31:00 +00:00
Craig Mautner
37f748db85 When an app dies launch home conditionally.
The determination for whether to launch home after an app dies
did not include whether the app would have returned home on exit.
This fixes that by checking what the app would naturally return to.

Fixes bug 9466261.

Change-Id: Ife6e895b9ef8c11b0a7f470d3eac4e88e763930b
2013-06-24 16:19:55 -07:00
Christopher Tate
3c0cd0b540 am 34718238: am 3e7d0344: Merge "Avoid adding FORWARD_LOCK flag to an updated system app"
* commit '347182386c54fd4aa4478f35b712c230eb290468':
  Avoid adding FORWARD_LOCK flag to an updated system app
2013-06-24 16:08:15 -07:00
Christopher Tate
347182386c am 3e7d0344: Merge "Avoid adding FORWARD_LOCK flag to an updated system app"
* commit '3e7d0344399ac2f607fddde32c1a5e54228a38f9':
  Avoid adding FORWARD_LOCK flag to an updated system app
2013-06-24 16:05:49 -07:00
Dianne Hackborn
3af16b226b Merge "Improve FastPrintWriter." 2013-06-24 23:02:02 +00:00
Christopher Tate
3e7d034439 Merge "Avoid adding FORWARD_LOCK flag to an updated system app" 2013-06-24 23:02:00 +00:00
Dianne Hackborn
e5a9c92377 Improve FastPrintWriter.
Change-Id: I23acb8d4c3db1f2f8e2f8003296f8c253e2ae7d2
2013-06-24 15:54:52 -07:00
Craig Mautner
7a78b39428 Merge "Fix unnecessary and harmful task movement." 2013-06-24 18:38:11 +00:00
Craig Mautner
07f36c738e Merge "Add activity token to display system." 2013-06-24 18:31:54 +00:00
Craig Mautner
f0ac5c87f2 Fix unnecessary and harmful task movement.
Changing the focus to a new activity should not move it to the top of
the task stack. When the previous activity fully pauses and the new
focused activity resumes then it will be brought to the top of the
task stack at the proper time. Moving it there prematurely causes the
ActivityManager and WindowManager stack sequences to be out of sync.

Fixes bug 9518153.

Also remove false warnings in validateTopActivitiesLocked() and add
debug for task movement to TaskStack.

Change-Id: Ib57500b07ded97223155cda7ef603aecc9b642c3
2013-06-24 11:29:09 -07:00
Craig Mautner
fb1e20dfe2 Don't move stack with task for moveTaskToFront.
Earlier CL, ag/321609, was overly aggressive. It should only have kept
the stack from moving when moveTaskToStack() was called. Instead the
change was applied to moveTaskToFront() as well. In order to remain
consistent with earlier behavior of moveTaskToFront() the stack
containing the task must move to the front as well. This movement
launches the activity at the top of the task. Without the stack
movement the activity never gets launched causing bug 9498455.

Fixes bug 9498455.

Change-Id: I2cb9119c23a226f7d211851df9e49f10f702b3ef
2013-06-23 21:28:10 -07:00
Craig Mautner
48d0d18867 Add activity token to display system.
First step in adding activity specific information to displays.
Replace CompatibilityInfoHolder with DisplayAdjustmentsHolder that
holds an activity token in addition to the CompatibilityInfo.

Change-Id: Ie113cd8dd9c62e0b5311204e039a4829096bea68
2013-06-22 15:30:13 -07:00
Svetoslav Ganov
352e4b5b3a Merge "Print - platform APIs" 2013-06-22 01:44:35 +00:00
Svetoslav Ganov
4b9a4d1687 Print - platform APIs
Related changes:
    Skia (inlcude PDF APIs): https://googleplex-android-review.googlesource.com/#/c/305814/
    Canvas to PDF: https://googleplex-android-review.googlesource.com/#/c/319367/
    Settings (initial version): https://googleplex-android-review.googlesource.com/#/c/306077/
    Build: https://googleplex-android-review.googlesource.com/#/c/292437/
    Sample print services: https://googleplex-android-review.googlesource.com/#/c/281785/

Change-Id: I104d12efd12577f05c7b9b2a5e5e49125c0f09da
2013-06-21 18:43:17 -07:00
Svetoslav
3b817aed7d Improper initialization of the accessibility manager service.
Initially the current user in the accessibility manager service is the
owner. This is correct since the system should be able to respond to
queries immediately and their result depends on the current user. However,
the system is calling the user switch callback with the current user
which is the same as the one we initialized with. Switching the user
causes clearing state for the old user winch is in case the current
one. Hence, we are losing state for the current user. This behavior was
masked from the fact that accidentally no events in the system were
fired before the first use user switch call.

repo Losing current user state puts the manager service in an inconsistent
state and it binds to accessibility services more than once. As a result
the accessibility layer starts to misbehave rendering the device useless
to a blind user.

Now we are ignoring user switch callbacks if the new user is the same
as the current one. Since we can no longer initialize at the first user
switch, this change adds explicit system ready method called from
the system server at the right moment.

bug:9496697

Change-Id: Icb39e929ea44e6c0360aba7ddc12f941ca2c9f98
2013-06-21 18:38:20 -07:00
Geremy Condra
a2d8eae289 Remove logging of KeySet parse errors.
Bug: 9532748
Change-Id: I3cce41de74783a121d2cd4f7b0ea6dfa03e3d7c5
2013-06-21 16:59:42 -07:00
Dianne Hackborn
a17c0f5e16 More procstats work: separate global proc account, more dumping.
We now keep track of the time actually process run independently
of the time packages run in process, so we can give an accurate
summary of how long each physical process runs.

New command line options can be supplied to restrict printing to
a specific package, dump in a new csv format, control what is
printed in the csv format, and print a checkin report.

Add toString methods to ArrayMap and ArraySet.

Change-Id: I47b8f68472592ecc0088c5286d3564aa615f4e0a
2013-06-21 15:03:41 -07:00
Nick Kralevich
b1c5945a55 Merge "NativeCrashListener: fix file descriptor leak." 2013-06-19 15:35:48 +00:00
Nick Kralevich
1b2d59500a NativeCrashListener: fix file descriptor leak.
Sending thousands of crashes can result in the system
eventually running out of file descriptors. Close file
descriptors after we're done with them.

Change-Id: I09ae9ce36426ded3fd591dda9a3550a19c2f01d3
2013-06-18 17:56:28 -07:00
Craig Mautner
a7cfb4f827 Merge "Fix stack transfer bug." 2013-06-18 23:57:56 +00:00
Craig Mautner
1d001b670e Fix stack transfer bug.
Set the focused stack to the task with the started activity. Do not refocus
when activities report resume.

Add more conditional debug.

Fixes bug 9481679.

Change-Id: Ib7134e88f9a2c8ad1703af0d43442c8bbe4e65dc
2013-06-18 16:55:48 -07:00
Jim Miller
9829016e5b Merge "Move Keyguard to the systemui process." 2013-06-18 22:41:19 +00:00
Jeff Brown
a506a6ec94 Add an API to allow for creating private virtual displays.
This change enables applications to create a private virtual
display that renders its content to a surface of its own creation.
The display is private in the sense that only the application
that owns the display is allowed to place windows upon it.
Mirroring and blanking is also disabled for these displays.

Bug: 9192512
Change-Id: I852ea07f0c7df1d244e354e3daca3a6960285ca0
2013-06-18 15:32:41 -07:00
Jim Miller
9512953c66 Move Keyguard to the systemui process.
This should save some memory on devices with limited amounts of RAM
by allowing it to share the graphics context with systemui.

Initially, adding this to the systemui process triggered a bug where
the shared process id didn't exist in the table yet. The change to
ActiveServices tries to work around this by explicitly adding the package in
attachApplicationLocked().

Change-Id: I9e97d5d69ddd15d7f16aca83a57bdf381811a13b
2013-06-18 15:28:28 -07:00
Geremy Condra
e201f581f6 Merge "Stop spewing errors into the logs." 2013-06-18 18:02:14 +00:00
Geremy Condra
bf7b1f4744 Stop spewing errors into the logs.
These are for debugging. Marking them that way.

Bug: 9479475
Change-Id: Ia0c27829583ecbab58a60a8c8350e9c099b812c2
2013-06-18 10:52:45 -07:00
Svetoslav
3577a283e1 Adding traits APIs to AccessibilityNodeInfo.
This change adds several traits and properties to AccessibilityNodeInfo
aiming to allow better description of native Android components to
accessibility services as well as mapping web content to native Android
node info tree.

Change-Id: I36b893cbaa6213c9d02d805e9dc36b6d792b4961
2013-06-18 10:41:48 -07:00
Craig Mautner
3b7e6b95c2 Merge "Add new API getStackBoxInfo" 2013-06-18 01:35:31 +00:00
Craig Mautner
fd1ce8d5a7 Add new API getStackBoxInfo
Change-Id: Ie2861e5e31bb3876cfe2d5c3d04ff58bb3955634
2013-06-17 18:34:28 -07:00
Christopher Tate
0a1e9611e9 Merge "Some system apps are more system than others" 2013-06-17 20:01:53 +00:00
Christopher Tate
ccbf84f44c Some system apps are more system than others
"signatureOrSystem" permissions are no longer available to all apps
residing en the /system partition.  Instead, there is a new /system/priv-app
directory, and only apps whose APKs are in that directory are allowed
to use signatureOrSystem permissions without sharing the platform cert.
This will reduce the surface area for possible exploits of system-
bundled applications to try to gain access to permission-guarded
operations.

The ApplicationInfo.FLAG_SYSTEM flag continues to mean what it is
says in the documentation: it indicates that the application apk was
bundled on the /system partition.  A new hidden flag FLAG_PRIVILEGED
has been introduced that reflects the actual right to access these
permissions.

At some point the "system" permission category will be
renamed to "privileged".

Bug 8765951

Change-Id: I6f0fd9cdb9170e076dfc66d83ecea76f8dd7335d
2013-06-17 12:47:35 -07:00
Craig Mautner
d213beae75 Don't bring stack forward when moving tasks.
Change-Id: I222eda9e3ea62119c8948a99a63de55b13ca69f4
2013-06-17 12:30:32 -07:00
Dianne Hackborn
fbf7a9aea2 Merge "More work on process tracking." 2013-06-15 00:39:31 +00:00