154 Commits

Author SHA1 Message Date
Matthew Williams
bb87ac7f97 DO NOT MERGE: Downgrade expedited to normal on reschedule.
bug: 12033540
Expedited was previously tracked by a redundant internal variable, ostensibly
as an optimisation. This variable could differ from the value in the bundle
depending on how the operation is initialised, which led to confusion. Now an
expedited sync will only be treated as such on its first execution.

Change-Id: Ibfc4e9e49b86c82f2364a6ef55f887705a053eb6
2014-03-24 14:42:06 -07:00
Matthew Williams
632515b9d0 Fix infinite boot-loop bug in SM.
Bug:11064918
If the ContentResolver sync API is used with the empty ("")
string as a provider, the ContentService will throw an RTE.
This cl addresses all the entry points of the API that could
allow this, as well as adds an ifEmpty check at the point of
failure.
Also removed RTE throws from public functions(no point in
crashing the phone).

Change-Id: I57427d12a6cafb3e6d7a32ca0c10b05315b20580
2013-10-11 13:18:22 -07:00
Jeff Sharkey
e4984bea95 Request all tethering interfaces, fix corruption.
netd now tracks statistics for tethered interfaces across tethering
sessions, so switch to asking for all tethering stats.  (Currently
we're double-counting all tethering data, ever since it started
tracking across sessions.)

Also catch OOME to handle corrupt stats files, which we then dump to
DropBox and then start over.

Bug: 5868832, 9796109
Change-Id: I2eb2a1bf01b993dd198597d770fe0e022466c6b9
2013-09-10 21:03:30 -07:00
Lorenzo Colitti
7421a01f18 Add a simple test for NetworkManagementService.
For now, this only tests network observers. It works by starting
NetworkManagementService with a fake netd socket, feeding it
inputs, and seeing if the appropriate observer methods are
called.

Bug: 10232006
Change-Id: I827681575642a4ee13ae48b81272521544b676bd
2013-08-23 18:30:19 +09:00
Matthew Williams
ba35271e91 Use pending.xml to persist sync ops.
Support pending ops by producing badly formed xml.
fixed bug that stopped alarm manager from updating if the
next alarm time is in the past.
Use new AlarmManager API for old AM behaviour - to set
exact alarms.

Change-Id: I57090f9c7155996298be7ec968a88f17ac1938a7
2013-08-16 12:01:22 -07:00
David Christie
ba530545f7 Revert "Fix broken unit test"
This reverts commit 0ca981fe42c43a4b7c345f4a0a2b3b2a519be5da.

Change-Id: I67f5e7227a8a874158c4f0954e62a77a317f1edd
2013-08-06 17:28:03 +00:00
David Christie
0ca981fe42 Fix broken unit test
Change-Id: I4aa0035233749f6d585c151329436439ae9b2921
2013-08-02 12:33:00 -07:00
David Christie
df2cab2fc4 Fix build breakage
Change-Id: Ia684fb55db301fdadaa3aae93f82b2cdcfc200af
2013-08-02 10:54:55 -07:00
David Christie
ebe51fc0d8 Add WorkSource capability to AlarmManager.
Change-Id: I663ea3078d405f0fa667a04bdaa376ae6652e994
2013-08-01 13:22:40 -07:00
Matthew Williams
fa77418134 AnonymousSyncService & SyncRequest.
Changes to the way bundles are parcelled broke SM,
this update writes out the bundle as xml. This circumvents
the need for parcel, and makes it easier to debug whats
happening.
Change-Id: I6cd5d3a2eb80bfa5b3ae0c7f2d2ff91a65daaa34
2013-07-24 15:25:29 -07:00
Guang Zhu
bc668ac4b7 fix build
Change-Id: Ie4bd7c3fe9320d22b7da2962e5e5a4abca510bd2
2013-07-21 02:01:34 -07:00
Christopher Tate
3e07a89b2c Fix build & preserve DHCP scheduling as-is
Change-Id: I4063b18532c476280f343658bf3641495e526ed4
2013-07-18 18:23:57 -07:00
Svetoslav
a8c7e3f86a Fix the build - missed a renaming
Change-Id: I0e85723647c0e5a6f6374e119f0fbd43db477ee0
2013-07-16 13:43:41 -07:00
Jeff Sharkey
56cd646abe Avoid logging sensitive data.
When building commands to send across NativeDaemonConnector, scrub
sensitive arguments to prevent them from being logged.

Bug: 8609800
Change-Id: I84b16791749264a010f7e59f9918f68d71bac6b9
2013-06-07 15:09:32 -07:00
Amith Yamasani
31c0959b1a Fix test
Change-Id: I329ceff03d3707e10c2e4eabfb8e6ea61082ae6d
2013-03-30 19:00:30 -07:00
Geremy Condra
9d034debdd am 24948d3c: am 946a5c91: Merge "Save off the seinfo value with packages.list."
* commit '24948d3ca7ff7fa70ee85e9aa7530239d7b482b2':
  Save off the seinfo value with packages.list.
2013-03-28 16:55:03 -07:00
Dianne Hackborn
7039738f81 Fix build.
Change-Id: I38a25dc63107fc907a520169e1b58f00e51dbb9d
2013-03-27 17:19:35 -07:00
Amith Yamasani
0519105354 Match tests to new API.
Change-Id: I9a537a437c721ae64d9307b889b9de5d5429670f
2013-03-26 15:32:29 -07:00
Robert Craig
4a4537331b Save off the seinfo value with packages.list.
Patch adds the seinfo label per package to the file.
This is of particular interest to the run-as program
which uses the seinfo tag to correctly label the
app security context before running the shell.

Change-Id: I9d7ea47c920b1bc09a19008345ed7fd0aa426e87
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-26 08:45:28 -04:00
Lorenzo Colitti
e167135976 Always specify an interface for host routes.
Change-Id: I05b4d87e7d7e8237c6f4a70f1fedae00f416f581
2013-03-08 16:41:25 -08:00
Nick Kralevich
79619ddbfe EntropyMixer: Write entropy at shutdown / reboot / power
Write out entropy if we're shutting down or rebooting,
or if someone plugs in the power.

Bug: 8312061
Change-Id: Id9a48064a7bdfe6c05a9227ea95a1bdbd0e9b8ae
2013-03-04 13:46:45 -08:00
Maggie Benthall
6794458f86 Add location sharing toggle user restriction.
And add support for respecting it.

Change-Id: Ia5cf9134c5f5741c3f55afadbe54f862da7bfe5b
2013-02-25 12:45:14 -05:00
Jeff Sharkey
3671b1e910 Migrate to using Mockito directly.
Change-Id: I1fcc5d1a780f5831bd6685f0735d4c0c6d245735
2013-02-19 15:28:19 -08:00
Amith Yamasani
20949a76fe Fix UserManager test
Change-Id: I927ffdda3dd5f69dc136e65c8069f2e480badfe9
2013-02-11 15:47:30 -08:00
Amith Yamasani
e4cf73437a Starting point for User Restrictions API
Restrictions saved as key/value pairs, mostly booleans right now
but might be expanded to other types later.

Save and restore restrictions in the user manager service.
Enforce some of the restrictions at the framework level. Some
are enforced (also) at the app level, such as in Settings.

Change-Id: Id11ffe129cb6a177e094edf79635727388c26f40
2013-02-08 15:52:47 -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
Dianne Hackborn
d4d9364019 Maybe fix build.
Change-Id: Ibad8edb15e7cc332d6c29958a386d32a96f4e755
2013-01-29 16:12:48 -08:00
Jeff Sharkey
56dc0e02fc Merge "Tests to assert correct January behavior." 2013-01-23 01:35:21 +00:00
Jeff Sharkey
1539905b46 Tests to assert correct January behavior.
Change-Id: I162102b6f1b892b79e2f5b96cb0184abb85d00bc
2013-01-22 17:32:53 -08:00
Sasha Levitskiy
ca6486e7f5 Removed Throttle Manager as obsolete
Change-Id: I63e8514f34c880d0badaab33a347f54a80c84da6
2013-01-14 16:59:33 -08:00
Amith Yamasani
03cb98aecf Move Observer test to servicetests
Change-Id: Ib3493af4eb3185db79004a3cad5473161ed51f71
2012-12-11 11:15:25 -08:00
Amith Yamasani
e03c17f1cb Merge "Move one more test." 2012-12-11 11:08:06 -08:00
Amith Yamasani
814a8d35ae Move one more test.
Change-Id: Iea0e0b5727746f2332db2ab1c1b216326eb50f13
2012-12-11 11:06:21 -08:00
Amith Yamasani
8ff9a156c0 Fix build. Forgot to move this test.
Change-Id: I06aab8ec6e2dac86b65bbeed3587444260fec2e8
2012-12-11 10:42:09 -08:00
Jeff Sharkey
7a96c39c51 Move lingering services to services.jar.
This helps reduce the pressure on framework.jar, and makes it clear
that it should only be used by the system_server.

Bug: 7333397
Change-Id: I0858904239535380fbf30562b793e277d8c3f054
2012-12-11 09:50:50 -08:00
Dianne Hackborn
b2e18e91ec am b443ddbb: am 2c41c4a2: Fix build.
* commit 'b443ddbbc7f1c7ed2d30310f80323cd4a5bf3e8d':
  Fix build.
2012-11-29 14:26:45 -08:00
Dianne Hackborn
b443ddbbc7 am 2c41c4a2: Fix build.
* commit '2c41c4a2766dcce506fc0e9e361fc8198553293c':
  Fix build.
2012-11-28 19:48:57 -08:00
Dianne Hackborn
2c41c4a276 Fix build.
Change-Id: Icc1f2913b4e889609066b0ff1dddcd9be0230897
2012-11-28 18:46:45 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Amith Yamasani
283d1409dd am f624d72c: am 8074e98b: Merge "Fix crashes when quickly adding and removing users" into jb-mr1-dev
* commit 'f624d72cb0fe40fd5748d4f0d1a93bf267aa3ed8':
  Fix crashes when quickly adding and removing users
2012-10-21 07:50:55 -07:00
Amith Yamasani
f624d72cb0 am 8074e98b: Merge "Fix crashes when quickly adding and removing users" into jb-mr1-dev
* commit '8074e98b20ac04fdc032a1ed00dd6763b7e04147':
  Fix crashes when quickly adding and removing users
2012-10-21 07:48:02 -07:00
Amith Yamasani
db6a14cc85 Fix crashes when quickly adding and removing users
Make USER_REMOVED an ordered broadcast and send it before the user's
state is completely removed from the system. This gives services the
opportunity to clean up their state, while still having access to the
user's directory and UserInfo object (such as serial number).

Tell SyncManager to skip over dying/partially created users.

Improve UserManager tests, waiting for users to be removed fully.

Bug: 7382252

Change-Id: I93cfb39c9efe6f15087bf83c569a2d154ef27168
2012-10-19 16:23:30 -07:00
Jeff Sharkey
ae1af49a91 am 3a8af8ef: Merge "Migrate more Secure settings to Global." into jb-mr1-dev
* commit '3a8af8efff93ca8ee80fc8c7841e7bee9a8b7786':
  Migrate more Secure settings to Global.
2012-09-27 19:34:28 -07:00
Jeff Sharkey
625239a054 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
Jeff Sharkey
031c410adc am 68b7a6d1: Merge "First step towards cleaning up Global settings." into jb-mr1-dev
* commit '68b7a6d14b68b38324ffd275c7227805c7d99b2d':
  First step towards cleaning up Global settings.
2012-09-26 20:19:32 -07:00
Jeff Sharkey
bdfce2ec05 First step towards cleaning up Global settings.
Remove all @Deprecated @hide settings, and clean up any stragglers.

Bug: 7232125
Change-Id: Ibf67093c728d4a28565129b923edb1701d3b2789
2012-09-26 17:18:49 -07:00
Jeff Sharkey
558f6d654f am 6e065a72: Merge "Handle multi-user mountObb() requests." into jb-mr1-dev
* commit '6e065a729dbf08f99209a7710da80442a394ec0d':
  Handle multi-user mountObb() requests.
2012-09-25 17:53:35 -07:00
Jeff Sharkey
4fbbda4cec Handle multi-user mountObb() requests.
Since emulated external storage paths differ based on execution
context, carefully fix up paths for various use-cases:

1. When sending paths to DefaultContainerService, always scope
   OBB paths as belonging to USER_OWNER.
2. When sending paths to vold, always build emulated storage paths
   visible to root.
3. Always use the original untouched path when talking with apps.

Mount OBB containers using shared app GID, so that an app can read
the mount point across users.

Handle legacy paths like "/sdcard" by resolving the canonical path
before sending to MountService.  Move tests to servicestests, and
add tests for new path generation logic.

Bug: 7212801
Change-Id: I078c52879cd08d9c8a52cc8c83ac7ced1e8035e7
2012-09-25 17:34:48 -07:00
Svetoslav Ganov
31a2b8c7bf am 0a5c5567: Merge "Multi-user support for the accessibility layer." into jb-mr1-dev
* commit '0a5c5567f2d7e203d95c80a8d3353d0acd98b5f9':
  Multi-user support for the accessibility layer.
2012-09-21 17:50:51 -07:00