Commit Graph

3257 Commits

Author SHA1 Message Date
Jeff Sharkey
4db1632b3a Merge "Stub Binder API." 2016-11-21 20:10:29 +00:00
Jeff Sharkey
1324531355 Stub Binder API.
Provide a stub API for AOSP code to call.

Test: builds
Bug: 32715088
Change-Id: Iab74d269e795a722e82fd3fa304200d57d152f57
2016-11-21 18:11:25 +00:00
Treehugger Robot
224d9e48fa Merge "CountDownTimer: not skip onTick()" 2016-11-16 07:55:27 +00:00
Steven Moreland
f3c53496c0 Update for namespaced services in hwservicemanager.
Test: end to end, hidl_test_java
Bug: 31861268
Change-Id: I3e91cf8a87f9345d4ae0650e521414407c7fc780
2016-11-08 08:53:16 -08:00
Leonard Mosescu
1ab879be90 Adding "attach-agent" to ActivityManagerShellCommand
This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6

Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
2016-10-27 17:03:57 +00:00
Andreas Huber
35eb7994f8 Adds support for specifying the version of a service to register/lookup.
Bug: 32405011
Test: hidl_test_java
Change-Id: I91a31cafa68d570c67f9a1aa7efb9d3dcb35e591
2016-10-25 13:35:44 -07:00
Hidenari Koshimae
0c3149191f CountDownTimer: not skip onTick()
CoundDownTimer internally performs counting down with a handler and
fires onTick() callback at countdown intervals. At this internal
counting down, firing onTick() is skipped if the account of time until
finished is less than countdown interval. Due to this skip of onTick(),
user will miss last onTick() callback.

This change ensures CountDownTimer to fires every onTick() callback
until the time is up.

Bug: 32392931
Change-Id: I951f5cd46743873d7f8c353f8cf8c700999d8ae0
2016-10-25 08:19:36 +00:00
Treehugger Robot
8be2850546 Merge "Create the WebViewZygote and implement WebViewZygoteInit." 2016-10-22 03:03:10 +00:00
Andreas Huber
ef1a565bd4 HIDL Vectors are now exposed to Java as ArrayList<T>, the supporting APIs on
HwParcel now reflect this change.

Bug: 32237331
Test: hidl_test_java
Change-Id: Ia1ce5a4e3acedd8ebcff15107aea53ce28fde589
2016-10-18 09:36:02 -07:00
Robert Sesek
ded2098436 Create the WebViewZygote and implement WebViewZygoteInit.
This adds a new init-spawned daemon, webview_zygote, that starts a JVM and
acts as a zygote process for WebView isolated_app services.

Test: m
Test: angler boots
Test: Turn on Settings>Developer>Multiprocess Webview. webview_zygote32 or
      webview_zygote64 start (requires dependent CLs).

Bug: 21643067
Change-Id: Ida98bd04b4d77736b672b03af651c4eb97ce88c1
2016-10-07 12:38:04 -04:00
Tao Bao
42d25b5992 Merge "Handle the race condition when calling uncrypt services." 2016-09-30 20:30:43 +00:00
Tao Bao
794c8b0b3f Handle the race condition when calling uncrypt services.
We call uncrypt services to setup / clear bootloader control block (BCB)
for scheduling tasks under recovery (applying OTAs, performing FDR).
However, we cannot start multiple requests simultaneously. Because they
all use the same socket (/dev/socket/uncrypt) for communication and init
deletes the socket on service exits.

This CL fixes the issue by a) adding synchronized blocks for the service
requests; b) checking the availability of the socket before initiating a
new one.

Note that adding synchronized blocks to RecoverySystem doesn't help,
because the calls could be made from different processes (e.g. priv-app,
system_server).

Bug: 31526152
Test: FDR works while a priv-app keeps calling clear BCB.

Change-Id: I95308989e849a9c98a9503ac509f2bc51ed3de19
2016-09-29 16:07:19 -07:00
Shubham Ajmera
c95b2c85f3 Add new StrictMode thread policy - DETECT_UNBUFFERED_IO
This will enable the developers to check if they could replace an unbuffered
I/O operation with a corresponding buffered I/O operation.

The policy can be set as follow:
     StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
        .detectUnbufferedIO().build());

Test: vogar BlockGuardTest
Bug: 3018772
Change-Id: Ib804a8e9980ae40abfd216f8b87c250fd413bd5c
(cherry picked from commit 9b7184a8fd)w
2016-09-29 16:36:12 +01:00
Treehugger Robot
c1973ecbd2 Merge "Log the error when uncrypt timeouts" 2016-09-28 19:42:29 +00:00
Tianjie Xu
036d08638e Log the error when uncrypt timeouts
Log the error code to uncrypt_status if uncrypt gets killed because
of timeout.

Test: We log the error code correctly in uncrypt_status when uncrypt timeouts.
Bug: 31603820
Change-Id: Ia623c333714295e68f4269257fbb4297a867e42b
2016-09-27 13:34:58 -07:00
Andreas Huber
906a679aa8 Adds static methods HwBlob.WrapArray(<scalar-type>[] scalarArray)
that convert a one-dimensional array of scalars into the corresponding
one-dimensional array of the associated "wrapped" type, i.e. byte[] -> Byte[].

Change-Id: I712b2bb5330bd660816d0ff536a55913904203b6
Bug: 31682327
Test: hidl_test_java
2016-09-27 11:20:44 -07:00
Andreas Huber
74c3b8edfe Removed legacy code used to read/write java arrays from HwBinder parcels.
More generalized functionality is now available through HwBlob.

Change-Id: Id6c713fb01af7593ea3ff8405f3a9e5325877412
Bug: 31438033
Test: run updated "hidl_test" and "hidl_test_java"
2016-09-19 14:09:14 -07:00
Tianjie Xu
bc19e00d35 Merge "Collect status on uncrypt time cost" 2016-09-16 18:19:23 +00:00
Tianjie Xu
3477efce30 Collect status on uncrypt time cost
Read and report time cost of uncrypt (in seconds) from last_install.

Bug: 31383361

Change-Id: I283970c33b2a0324f2f51cde328e3e527eff7c58
2016-09-09 11:35:15 -07:00
Robert Sesek
96b49848e7 Split the zygote logic out of android.os.Process into a new ZygoteProcess class.
There is no functional change. This is to support adding new types of zygotes
that all operate using the same protocol.

Bug: 21643067
(cherry picked from commit 94e824bc1b)

Merged-In: Ie673ee816cae34ac20ffb8c774ec3e6461c3fd0a
Change-Id: I104e6133a90dc93a9854836b5e92d3cd542163a3
2016-09-09 12:42:52 -04:00
Calin Juravle
08313b0d95 [RFC] Special case system apps for profile optimizations
If the OTA updates a system app which was previously preopted to a non-
preopted state the app might end up being verified at runtime. That's
because by default the apps are verify-profile but for preopted apps
there's no profile.

Do a hacky check to ensure that if we have no profiles (a reasonable
indication that before the OTA the app was preopted) system apps get
compiled with a non-profile filter (by default interpret-only).

Bug: 30032273
Test: Andreas "has verified that Calin's change to A/B works as expected
and promotes things like SystemUI to speed. From my side, that's
ready to be merged"

Change-Id: I7a052a8ea76cab7f649dc993237ea05534d6c4b9
(cherry picked from commit 0bd7762079)
2016-09-06 10:41:04 -07:00
Andreas Huber
9266f9928d Adds framework support for hidl-gen Java backend. (to support structs) (DO NOT MERGE)
Bug: 30575790
Change-Id: Ida30d8fe7a1b210e98f1a0ea5d429a0112f9ef3f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Andreas Huber
86635bb45e Add Bool* APIs to HwParcel (DO NOT MERGE)
Bug: 31045584
Change-Id: I202c4aa7caf92a4cd7e3a45ef6784638e41facc8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Andreas Huber
90349b3e11 Support one-way methods in java support for hardware binder (DO NOT MERGE)
Bug: 30922538
Change-Id: I5ff93126a29f6bff42dee3f9868fa794ca7c077f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Andreas Huber
dab5fc65b9 Initial commit of Java support for hardware binder (DO NOT MERGE)
Change-Id: If1098ab921a11bae8eca2a70a3c3070e4daa0ea2
2016-09-02 06:28:14 -07:00
Christopher Wiley
5de073a6b0 Remove WiFi related methods from NetworkManagementService
These are no longer necessary, since WiFi manages its own details.

Bug: 30041228
Change-Id: Ia3824da43367ae74d3f3a204318cfe5470d74957
Test: Compiles
(cherry picked from commit 212b95f587)
2016-08-29 11:26:50 -07:00
Christopher Wiley
31a513b461 Remove unused method from NetworkManagementService
Bug: 28598325
Test: Builds

Change-Id: I6a226b3410cda4e12a9225741ec81cd12b48892f
(cherry picked from commit 2103e78e0c)
2016-08-26 13:20:40 -07:00
Svet Ganov
ddb948896c Mark app pending intents in notification extras
We need to make every peniding intent that went in the notification
system to allow special handling of such intents when fired by a
notification listener. If a pending intent from a notification
is sent from a notification listener, we white-list the source app
to run in data saver mode for a short period of time. The problem is
that actions and the notificaion can have extras which bundles may
contain pending intents but the system cannot look into the bundles
as they may contain custom parcelable objects. To address this we
keep a list of all pending intents in the notification allowing
the system to access them without touching the bundle. Currently
the pending intents are written to the parcel twice, once in the
bundle and once as the explicit list. We can come up with a scheme
to optimize this but since pending itents are just a binder pointer
it is not worth the excecise.

bug:29480440

Change-Id: I7328a47017ca226117adf7054900836619f5679b
2016-06-27 17:32:25 -07:00
Dianne Hackborn
5f9afa968d Merge "Reduce race when connecting to an existing content provider." into nyc-dev 2016-06-21 19:18:39 +00:00
Dianne Hackborn
4de5a3ac66 Reduce race when connecting to an existing content provider.
We lost the code that checks to see if the target process still
exists and aborts trying to use it if so.  To reduce the race
there, we have a new explicit check of the state of the process.

Hopefully fixes some of issue #28737082.

Change-Id: I37a7a6e9767516d564168ef5e110c4adafe3fb76
2016-06-21 10:04:22 -07:00
TreeHugger Robot
c2e06a55f9 Merge "BatteryStats: record best estimated battery capacity" into nyc-dev 2016-06-20 19:49:46 +00:00
Adam Lesinski
f9b20a9ec4 BatteryStats: record best estimated battery capacity
Using the coulomb counter, record the estimated max battery
capacity.

Bug:28743761
Change-Id: I1270b062cf4a1e6fd69ea1da3de11a85a81b3663
2016-06-20 10:58:37 -07:00
Dianne Hackborn
47cfac6803 Merge "Fix issue #29371078: Foreground jobs should not count..." into nyc-dev 2016-06-16 18:39:03 +00:00
Dianne Hackborn
7ab4025474 Fix issue #29371078: Foreground jobs should not count...
...as active for idle maintenance

Nor jobs of whitelisted apps.

Now they don't.

Also remove the no longer used "active download" tracking code.

Change-Id: I553197801f6eabaf15716f3201dd65257a0d4e94
2016-06-15 17:30:24 -07:00
Amith Yamasani
4f2b1b455e Merge "More thorough cleansing of expired users" into nyc-dev 2016-06-16 00:14:59 +00:00
Tianjie Xu
5fabe69fc8 Fix a naming typo for source_build
When parsing the last_install, the variable name is supposed to be
*source_build* instead of *source_version*.

Bug: 28658632
Change-Id: I1e0ed7150e04885f904b6a3efa18bd5cfe17cc96
2016-06-15 12:34:04 -07:00
Amith Yamasani
d04aaa323c More thorough cleansing of expired users
If any /data/system_[c|d]e folders were not erased
when the user was removed (maybe due to a reboot),
make sure they're cleaned up on restart as well
as when the userId is recycled later.

Mark the users' system folders with the correct
serial number for later verification.

AccountManager shouldn't be querying accounts of
partially created/destroyed users.

Change-Id: I4313756b7464f34cd5ce4fb296d61daa50b41fcb
Fixes: 29285673
2016-06-15 11:32:16 -07:00
Tomasz Mikolajewski
ac3fe8fffe Merge "Make CotentResolver#openInputStream handle errors from reliable pipes." into nyc-dev 2016-06-14 04:15:26 +00:00
Adam Lesinski
e8a442ccd6 Merge "BatteryStats: Fix read/write parcel order" into nyc-dev 2016-06-10 22:29:15 +00:00
Adam Lesinski
67c134f849 BatteryStats: Fix read/write parcel order
Also moves discharge coulomb data to BATTERY_DISCHARGE_DATA checkin line.

Bug:29264326
Bug:28743761
Change-Id: I78881e166c11f40b2397e04d2cab8d5200c71eea
2016-06-10 15:24:16 -07:00
Tianjie Xu
8872a604b9 Merge "Collect statistics of source build version" into nyc-dev 2016-06-10 17:13:54 +00:00
TreeHugger Robot
094c40b2cc Merge "BatteryStats: Record fine grained battery discharge" into nyc-dev 2016-06-10 02:12:23 +00:00
Adam Lesinski
b55d741c9a BatteryStats: Bump checkin format version to 18
Bug:28811636
Change-Id: If2229c438e60f20746c91bccbcaa6d72ca5f0802
2016-06-09 17:46:19 -07:00
Adam Lesinski
3ee3f63eb8 BatteryStats: Record fine grained battery discharge
For devices that report battery discharge via a coulomb counter,
record how much of the battery was discharged while the screen
was on/off.

Bug:28743761
Change-Id: Ie2d1708864352029ff466c1fed14fc057e19b93b
2016-06-09 17:37:22 -07:00
Tianjie Xu
c1ff246f1a Collect statistics of source build version
Parse the last_install and report the source build version of an ota
update.
Related CL in: ag/1121141

Bug: 28658632
Change-Id: I5e835c144aabe97fda681f60397ebf4416f7bd4f
2016-06-09 16:00:11 -07:00
Tianjie Xu
a2fe5517bc Change unit of I/O statistics to MiB
I/O in bytes are too large and it may cause overflow. Moreover, data with
large numbers are grouped in the same bucket of the histogram. This adds
difficulty to the analysis. Changing unit of I/O to MiB so that we can
have a better data distribution.

Bug: 28658632
Change-Id: Id9913d71e62b36ce5d5d2e57676953f4dbd0c7c9
2016-06-07 17:54:48 -07:00
Esteban Talavera
953fe48329 Fix getApplicationRestrictions documentation
The method never returns null, only empty bundle

Bug: 29178626
Change-Id: Ic53154eafe94c6c501b59932441d7ae1c89cb689
2016-06-07 17:21:49 +01:00
Tomasz Mikolajewski
ad3b61623f Make CotentResolver#openInputStream handle errors from reliable pipes.
Bug: 28967963
Change-Id: I3b1343e91e7b6616ea0d641888f5b41d1b83a8a5
2016-05-30 11:05:35 +09:00
Ruchi Kandoi
7730e57dc6 Merge "PowerManager: Adds Documentation to isSustainedPerformanceModeSupported()" into nyc-dev 2016-05-27 16:20:43 +00:00
Fyodor Kupolov
a4dbdaf5e9 Merge "Remove ActivityManager calls with PM.mInstallLock held" into nyc-dev 2016-05-26 18:20:36 +00:00