1147 Commits

Author SHA1 Message Date
Christopher Tate
b86d81d3ff Don't attempt native crash reporting for persistent apps
Bug 8639127

Change-Id: I55035cfed9ba04597422f675ede105dae40b2fbf
2013-04-19 17:39:20 -07:00
Christopher Tate
effb153aba Merge "Lengthen the AM timeout reading crash reports slightly" into jb-mr2-dev 2013-04-17 18:08:19 +00:00
Christopher Tate
1b64598602 Lengthen the AM timeout reading crash reports slightly
We're missing some (small fraction of) native crash reports from
debuggerd.  It looks like under high system load the debuggerd
reporting code just isn't quite timely enough for the very short
timeouts initially deployed, so lengthen those a bit.

Bug 8552010

Change-Id: Icbc5b6517de3bb98fff1af2ea42ffd208ef20412
2013-04-17 10:40:02 -07:00
Ben Gruver
53f22ad9c3 Merge "Monitor the firewall rules file for changes" into jb-mr2-dev 2013-04-17 00:44:56 +00:00
Svetoslav Ganov
26257a09a5 Merge "Allow for setting test type as a monkey." into jb-mr2-dev 2013-04-13 00:15:40 +00:00
Adam Momtaz
8f6f1f43ee Allow for setting test type as a monkey.
1. This allows UiAutomation type tests to run as if an
   android monkey test is running. This allows applications
   that recognize that they are drive by a test framework and
   avoid performing certain actions such as calling 911.

2. Fixed a bug where the UiAutomation#disconnect() was not
   called when the instrumentation is shutdown.

bug: 8588857

Change-Id: I9e3624dfbe2b8f81f27805711de1098ea2edd03d
2013-04-12 12:54:34 -07:00
Dianne Hackborn
7b92467179 Fix issue #7643046: Activity.getCallingPackage() bogusly returns null...
...after having to recreate the task stack

Change-Id: Ia354240f3650ddb578f2116a2aa4584e9ffe8508
2013-04-11 18:12:56 -07:00
Santos Cordon
acd840d5c3 Merge "Obfuscate any phone numbers that pass through the event log." into jb-mr2-dev 2013-04-10 22:53:08 +00:00
Dianne Hackborn
558a3c1b7b Merge "Kill processes when permissions are revoked." into jb-mr2-dev 2013-04-09 17:38:00 +00:00
Dianne Hackborn
f1b782427f Kill processes when permissions are revoked.
Some permissions are associated with gids, so we need to
kill any running processes if their permission is revoked.
We will do this for any permission being revoked, since
the association between gids and permissions can change
over time.

Change-Id: Ieb7408e032539c4f21eb089d65a7a7e6c289f010
2013-04-08 22:28:59 -07:00
Eric Rowe
3c09715ced Merge "Change dropbox tag for native crashes." into jb-mr2-dev 2013-04-09 00:11:51 +00:00
Eric Rowe
88d842cf8a Change dropbox tag for native crashes.
Change-Id: Id2738fc758c3d144e5fdd2c7f1c8617dad129338
2013-04-08 15:00:27 -07:00
Ben Gruver
b1a90d3b14 Merge "Remove the sender package filter from the intent firewall" into jb-mr2-dev 2013-04-08 21:36:37 +00:00
Ben Gruver
a4879c3425 Monitor the firewall rules file for changes
Change-Id: I4e9a8f06cc535ba5a347e6992e1466cff09890e9
2013-04-08 14:27:37 -07:00
Daniel Sandler
91fe8455d6 Clean up language in forced foreground service notifications.
Old:  [ IC ] %s running
      [ ON ] %s is running

New:  [ IC ] %s is running
      [ ON ] Touch for more information or to stop the app.

Additionally, disallow these misbehaving services from
supplying their own content views; if you attempt to run a
foreground service with icon == 0, this is the notification
you will get, period.

Bug: 8525548
Change-Id: I2bfd7340396ef925885e8c2160a720f9eff07a35
2013-04-08 13:01:02 -04:00
Ben Gruver
9cc60e81d7 Remove the sender package filter from the intent firewall
Change-Id: I3124c6969984eef646f22216c709bdfb324d6679
2013-04-05 12:20:24 -07:00
Ben Gruver
8c3ee9d50a Merge "Initial implementation of IntentFirewall functionality" into jb-mr2-dev 2013-04-03 23:36:22 +00:00
Ben Gruver
4efe9403af Initial implementation of IntentFirewall functionality
This has the full filter functionality, but is currently only
able to block Activity intents. Logging intents, or blocking
service/broadcast intents is not yet implemented.

Change-Id: Ied3d8dedf982e17bcbdff3e328eeb87477954df7
2013-04-02 21:18:41 -07:00
Christopher Tate
58d380d2af debuggerd now notifies the Activity Manager about native crashes
The Activity Manager sets up a permission-guarded domain socket, which
debuggerd connects to when a crash happens.  If this is successful,
the daemon then mirrors the logged crash report to that socket, then
closes it.

The Activity Manager parses the native crash dump supplied by debuggerd
and forwards it to the standard app-crashed code.  The UX result is
that users now see the normal "app has stopped unexpectedly" dialog
with "report" and "okay" options for native crashes, not just for
DVM-mediated crashes.

Bug 8322568

Change-Id: Ie1b279896c603bd74d82d6cfcfd66a8f231da134
2013-04-01 13:50:23 -07:00
Ben Cheng
b5cda42c57 Crank up the mOomMinFreeHigh values by 50%.
Devices with 1GB of RAM can benefit from more aggressive OOM killer.

BUG: 7972252
Change-Id: Id2b80c14a3cff195c17ef0d14c80b92394649d98
2013-03-27 17:36:13 -07:00
Dianne Hackborn
3bcc2fbaad Merge "Fix issue #8470131: Process thrash kills battery" into jb-mr2-dev 2013-03-27 00:24:04 +00:00
Dianne Hackborn
a40cfeb55f Fix issue #8470131: Process thrash kills battery
Protect app widget broadcasts from abuse.

In this case the app was sending an APPWIDGET_UPDATE broadcast
without specifying a target, which (a) should not be allowed (you
should not be able to send updates to other apps), and (b) resulted
in every single potential app widget in the system being launched...
which was about 75 of them.

Change-Id: I9d48733610ce6d5a7c32e69a3e06b9f33bd79a34
2013-03-25 17:49:36 -07:00
Robert Craig
0f40dc923c Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 17:30:08 -07:00
Dianne Hackborn
2ced96c544 Fix issue #8436951 JB-MR2: Compatibility: Audible, Pandora, ...
...Tune-In does not work since JWQ77

Instead of crashing the app for it being bad, just go ahead and
show a notification for it anyway that we make up.

You get what you deserve. :p

Change-Id: I92e32b9ff8835dabde63f8e08e991f72de0d0a92
2013-03-21 14:23:46 -07:00
Dianne Hackborn
282add7bc3 Fix issue #8401553: It's possible to startForeground()...
...with no visible Notification

Don't allow a 0 icon resource.

Change-Id: I52e93533e6c45c6027ff3c185060cd54d087d077
2013-03-15 18:48:04 -07:00
Christopher Tate
a83cab0001 Do not hang in pm clear on an invalid package name
The Activity Manager was not properly informing the observer that
the operation had concluded (unsuccessfully).

Bug 8222595

Change-Id: I8234e32d8edf4112c8c7a5e20e341d0b41e23014
2013-03-07 17:50:11 -08:00
Santos Cordon
73ff7d8e64 Obfuscate any phone numbers that pass through the event log.
bug: 8203219
Change-Id: I455849cab9b2a8e08889cf44d1799448846c9151
2013-03-06 19:02:49 -08:00
Michael Wright
32440aa25d Merge "Unify inputDispatchingTimedOut with keyDispatchingTimedOut" into jb-mr2-dev 2013-03-01 22:20:46 +00:00
Michael Wright
7dd5bb18d4 Unify inputDispatchingTimedOut with keyDispatchingTimedOut
Bug: 8194916
Change-Id: Iac40108d848bcca77f49a7a49c57a095b3dbe9c9
2013-03-01 14:14:35 -08:00
Michael Wright
173bb61544 Merge "Move stack dump off of InputDispatcher thread" into jb-mr2-dev 2013-02-26 22:14:41 +00:00
Michael Wright
5633e23c22 Move stack dump off of InputDispatcher thread
Change-Id: I7250a0488c3e4c5dc159f4635a57e1e49aa8397a
2013-02-25 17:52:37 -08:00
Craig Mautner
2ad920759b Revert ActivityManager changes for tasks. DO NOT MERGE
Keeping all activity=>task changes in master and removing them
from jb-mr2.

Revert "Update histories simultaneously."
Revert "Add null check to setAppGroupId."
Revert "Fix crashing bug in validator."
Revert "Switch topRunning* and moveTaskTo*"
Revert "Begin switch over to task based history."
Revert "Reset and reuse Iterators and don't new() one."
Revert "Remove AppWindowToken lists."
Revert "Fix build."
Revert "Remove unused App methods."
Revert "Stop using AppToken movement and start using Task."
Revert "Replace access to mAppTokens with AppTokenIterator"
Revert "Refactor setAppOpVisibility implementation."
Revert "Add AppWindowTokens to TaskList."
Revert "Make ActivityStack.mHistory private."
Revert "Migrate AppWindowToken lists into DisplayContent."

Change-Id: I5722c9a4956dccb52864207e2967690bc58e4ebb
2013-02-25 17:07:39 -08:00
Craig Mautner
b44de0d910 Update histories simultaneously.
In moveTaskToBackLocked calls that used mHistory were being made
between the times that mTaskHistory and mHistory were modified. This
caused an inconsistent state that led to Windows arranged out of
order. Updating both history stacks at the same time fixes this.

Fixes bug 8244261.

Change-Id: I9669762ad39b06ab6d401122702b74969d4dc658
2013-02-21 20:00:58 -08:00
Craig Mautner
11bf9a52eb Switch topRunning* and moveTaskTo*
- More of the Activity to Task changeover.
- Fix bug in validateAppTokens().
- Improved validation of changeover.
- Eliminated iterator classes.

Change-Id: I934a208eabfc9a2668e5a6162452e1406f2c8d3a
2013-02-20 16:29:07 -08:00
Craig Mautner
5d9c7be84d Begin switch over to task based history.
- Introduce the task history and add to and remove from it with
verification.

Change-Id: If97e74f5a13f85acdb1521fc6d0b066a7e8584ae
2013-02-19 18:11:33 -08:00
Craig Mautner
b0c0b1fd70 Remove unused App methods.
Now that the Task methods have replaced the App methods remove
the App methods.

Change-Id: I0e7432f2c6f99708759ed8c871d20eb5bd38c3c2
2013-02-13 15:24:14 -08:00
Craig Mautner
926f3839d8 Stop using AppToken movement and start using Task.
Change-Id: I5fbd3b2b692e0e127386051f782b1015515ba384
2013-02-13 11:58:56 -08:00
Craig Mautner
30e2d72810 Replace access to mAppTokens with AppTokenIterator
More switching from Activity-based to Task-based control.

Change-Id: Ida47d71a52b875a6a6bd77cb62911053f942da15
2013-02-12 16:03:29 -08:00
Craig Mautner
bea3b60ed1 Merge "Add AppWindowTokens to TaskList." 2013-02-12 23:57:09 +00:00
Craig Mautner
05d6272bad Add AppWindowTokens to TaskList.
- Add/remove/move TaskLists from ActivityStack.
- Further isolate mHistory.
- Cleanup warnings by parameterizing ArrayList.
- Fix previous bugs.

Change-Id: Ife8c7b7347479c70f10467cc384283456149ac50
2013-02-12 10:52:55 -08:00
Dianne Hackborn
1d3079cb8d Merge "App ops: cleanup, handle root and shell, perms." 2013-02-12 00:41:07 +00:00
Dianne Hackborn
514074fae8 App ops: cleanup, handle root and shell, perms.
Rework how the shell user is defined so that it is
associated with an actual apk, instead of being a free
roaming uid with special permissions assigned to it.
This allows us to correctly account for its operations
in app ops.

Implement a special case for the root user in app ops --
it is always allowed, always with the package name "root".

Add various code to take care of cleaning up package state
from app ops -- when packages are uninstalled, and during
boot if any packages currently being stored no longer exist.

Also fix a bug in the activity manager to correctly grant
permissions in all cases when onNewIntent() is being called.

Change-Id: Iae9f6d793ee48b93518c984ad957e46ae4582581
2013-02-11 15:33:48 -08:00
Craig Mautner
cae015fea3 Make ActivityStack.mHistory private.
Isolate the Activity history for later conversion to Task-based
management.

Change-Id: I4b6bf22de035c768aa705df0cc4f84486e8ede56
2013-02-08 14:31:27 -08:00
Craig Mautner
2ceb081505 Merge "Migrate AppWindowToken lists into DisplayContent." 2013-02-07 18:50:52 +00:00
Jeff Sharkey
08d11e1fa9 Merge "Require that bugreport requesters have DUMP." 2013-02-06 23:57:44 +00:00
Craig Mautner
b1fd65c0ff Migrate AppWindowToken lists into DisplayContent.
In preparation for converting ActivityManager control to a task-based
interface the AppWindowTokens are being stored per-display.

Change-Id: Ie5e355219554523f5e56eaef138d382975cf1682
2013-02-05 17:08:10 -08:00
Jeff Sharkey
b932319bff Require that bugreport requesters have DUMP.
Bug: 8139970
Change-Id: I055855fa5450521122e54ed39df5981190b401bd
2013-02-05 13:32:18 -08:00
Dianne Hackborn
f51f61269a App ops: new operations for SMS.
Implementation required a new framework feature
to associate an app op with a broadcast.

Change-Id: I4ff41a52f7ad4ee8fd80cbf7b394f04d6c4315b3
2013-02-05 11:56:12 -08:00
Dianne Hackborn
f265ea9d83 App ops: vibration, neighboring cells, dialing, etc.
Improve handling of vibration op, so that apps are
better blamed (there is now a hidden vibrator API that
supplies the app to blame, and the system now uses this
when vibrating on behalf of an app).

Add operation for retrieving neighboring cell information.

Add a new op for calling a phone number.  This required
plumbing information about the launching package name through
the activity manager, which required changing the internal
startActivity class, which required hitting a ton of code that
uses those internal APIs.

Change-Id: I3f8015634fdb296558f07fe654fb8d53e5c94d07
2013-02-01 15:14:29 -08:00
Svetoslav Ganov
d0fd54648c Merge "Adding UI test automation APIs." 2013-01-29 03:16:40 +00:00