Commit Graph

2053 Commits

Author SHA1 Message Date
Bernardo Rufino
628fee52b1 Add logs to IOExceptions during adb backup
Test: Run adb backup
Bug: 65435587
Change-Id: I744cb2878654b716858d7c9bedeb12fb9978df6b
2017-09-13 13:58:38 +00:00
TreeHugger Robot
d7d9b8939e Merge "DO NOT MERGE Use CREATE instead of CREATE2 for 3.10 kernel" into oc-mr1-dev 2017-08-26 11:26:42 +00:00
Siarhei Vishniakou
388ca7feb0 DO NOT MERGE Use CREATE instead of CREATE2 for 3.10 kernel
CREATE2 structs were introduced after kernel 3.18,
so cannot compile user code with uapi headers from
newer 3.18+ kernels. If using CREATE structs then
compatibility is preserved.

Bug: 64981084
Test: bit
Change-Id: I97c7725918b09a817a51c13384ac2d55a6cfab25
CtsHardwareTestCases:android.hardware.input.cts.tests.GamepadTestCase
2017-08-26 05:05:19 +00:00
chaviw
ff58ed11f2 Add get-disabled shell command to locksettings
Added shell command that outputs whether the lock screen is disabled.

Test: Ran "adb shell locksettings get-disabled" while phone had lock
screen and when it did not.
Merged-In: I3532e41e2ee4770bd0801dd431fdbc884c2bafa4
Fixes: 64848695

Change-Id: I3532e41e2ee4770bd0801dd431fdbc884c2bafa4
2017-08-24 14:27:36 -07:00
Narayan Kamath
96c11c58c9 PackageParser: Parse android:classLoader during the full parse.
There's no need to do this during a "lite" parse. Moreover, we don't
resolve resource references during a lite parse, which means that we
lose a lot of flexibility.

Test: CtsAppSecurityTestCases
Bug: 64339642

Change-Id: I7d02faab6bd226d96d63d2edd8c06b94e15e14ad
2017-08-09 15:32:00 +01:00
Takashi Furukawa
1aa263e5ab Cherry-pick: Add null check for Wi-Fi command
When WifiService is not ready during boot phase and Wi-Fi command
is executed on console, NullPointerException happens.
To prevent this, null check is needed.

Test: Manual test
Bug: 64040515
Change-Id: I5684cdc7661b7d93fd6f2ac61863919077d12935
Merged-In: I5684cdc7661b7d93fd6f2ac61863919077d12935
2017-08-07 13:27:56 -07:00
Makoto Onuki
6fb2c9718c Bit: Don't ignore errors and crashes
Bit used to only see success results and failures (== assertion failures?),
and didn't see "errors" (other exceptions) and test process crashes.

Fixed it.

Now it also returns an error status code if there was a test failure.

Bug 64292779
Test: manual

Change-Id: Iaba93910d32abfc615ae595746a0e9be1108583a
2017-08-02 14:49:30 -07:00
Martijn Coenen
4d125c1df6 screencap: always exit with _exit().
Delay starting the threadpool until necessary,
and once started, always exit with _exit().

Bug: 36066697
Bug: 62956201
Test: mma, screencap -p
Change-Id: I0b9ab542f6434f57b498cd7dc41219ef57e36721
2017-07-26 09:33:59 +02:00
Andrii Kulian
94e82d9b0e DO NOT MERGE ActivityView be gone!
This hidden functionality is no longer support/needed since
we now have multi-window/display. A new view group class
will be added later that uses multi-window to support remaining
functionality of this class.

Test: go/wm-smoke
Change-Id: Ie2fa2de92841d33199da9988741905060dd1ddf4
2017-07-21 13:14:19 -07:00
TreeHugger Robot
2a45221fac Merge "Fix nobootanimation toggle" 2017-07-15 08:53:51 +00:00
Kalle Raita
88efa56e1b Fix nobootanimation toggle
The sf.debug.nobootanimation was apparently broken in a recent
refactoring. Flipping the boolean in the utils fixes the issue.

Left some additional logging behind.

Test: marlin-eng boots
Test: my test can prevent the boot animation
Test: shell stop start shows boot animation
Change-Id: I815708a2f16a3a8688cf1a53695e5a8d43194575
2017-07-14 16:18:16 -07:00
George Burgess IV
772df1cf66 Merge "app_main: silence static analyzer warnings" am: cf188f664a am: 8a4be2a6ae am: 5987ab35ca
am: 10307ebe1f

Change-Id: Ie8b629e97a95f6afd33dc52df71d2508467273e3
2017-07-12 03:14:47 +00:00
George Burgess IV
10307ebe1f Merge "app_main: silence static analyzer warnings" am: cf188f664a am: 8a4be2a6ae
am: 5987ab35ca

Change-Id: Idc8694cc79e336bb93b38d25fbd7b25ca7a31f0b
2017-07-12 03:07:46 +00:00
George Burgess IV
8a4be2a6ae Merge "app_main: silence static analyzer warnings"
am: cf188f664a

Change-Id: Ibad16ec8fabb4edaaa832bc43505f81fefb10ec7
2017-07-12 02:54:24 +00:00
George Burgess IV
c29844d072 app_main: silence static analyzer warnings
This silences two warnings:

frameworks/base/cmds/app_process/app_main.cpp:238:11: warning: Potential
memory leak

frameworks/base/cmds/app_process/app_main.cpp:261:9: warning: Potential
memory leak

As the (existing) comment notes, we nuke argv later in main(), so these
copies are necessary. Since these args need to live for basically the
entire life of the process, it seems pointless to go out of our way to
free them.

Bug: 27101951
Test: mma. Static analyzer warnings are gone.
Change-Id: Icbfabfede9db909f6acb274b697cb6076c3fc11f
2017-07-11 17:28:15 -07:00
Narayan Kamath
f9419f0f85 Allow splits to declare a classloader type.
Add an attribute android:classLoader which can be set to the name
of the classloader the base or split wishes to use. For now, this can
only be set to "dalvik.system.PathClassLoader" or
"dalvik.system.DelegateLastClassLoader". The current implementation
only allows the classloader to exist in the boot classpath but that
restriction can be loosened in a future change if necessary.

Test: cts-tradefed run cts-dev -m CtsAppSecurityHostTestCases
Bug: 36044779

Change-Id: I5a51f7aa0c8c4c398d2f46129eb06785cc8e3c3f
2017-07-06 11:57:36 +01:00
Santos Cordon
266bd0d6ca Merge "Add ability to turn off VR virtual display functionality." into oc-dr1-dev am: 67143a8cfc
am: 99eac47966

Change-Id: I5fb247a2291ee4fdc96b25e297cb7f7e0ec49d5a
2017-06-29 21:38:42 +00:00
Santos Cordon
99eac47966 Merge "Add ability to turn off VR virtual display functionality." into oc-dr1-dev
am: 67143a8cfc

Change-Id: I9a65c8a9c33ffe4a982d090966654f4e93690c3b
2017-06-29 21:31:53 +00:00
Santos Cordon
627a68f852 Add ability to turn off VR virtual display functionality.
Add flag to enable/disable virtual displays via the existing
setDisplayProperties API. This makes it possible for the VR system
to turn off virtual displays if necessary after we ship.

Bug: 62546364
Test: Run 'adb shell vr enable-virtual-display [true|false] to toggle while 2d in 3d
runs.

Change-Id: Iae029be501d61189fced981dbc554e984fa7ed4b
2017-06-29 19:01:39 +00:00
Makoto Onuki
f6d6e9ecd7 Sort INSTRUMENTATION_STATUS keys on am instrument output
Previously the output from perftests was printed in a random order:
INSTRUMENTATION_STATUS: timeGetDataCapacity_standardDeviation=5
INSTRUMENTATION_STATUS: timeGetDataCapacity_median=486
INSTRUMENTATION_STATUS: timeGetDataCapacity_mean=489
INSTRUMENTATION_STATUS: timeGetDataCapacity_min=484
INSTRUMENTATION_STATUS_CODE: -1

Now it's always printed in the same (sorted) order.
INSTRUMENTATION_STATUS: timeGetDataCapacity_mean=489
INSTRUMENTATION_STATUS: timeGetDataCapacity_median=486
INSTRUMENTATION_STATUS: timeGetDataCapacity_min=484
INSTRUMENTATION_STATUS: timeGetDataCapacity_standardDeviation=5
INSTRUMENTATION_STATUS_CODE: -1

Test: manual test
Change-Id: I807aa05e6523b70a132ab97fc099156bb3dc1f96
2017-06-28 20:23:46 +00:00
Pavel Grafov
5f679b2114 Add credential verification command to locksetting.
This is useful when we need to unlock the user in a test.
Currently credential verification is done for any command
(e.g. "clear") when "--old" parameter is provided, so this
CL doesn't add anything new really, just makes it official.

Test: adb shell locksettings set-pin 1111
Test: adb shell locksettings verify --old 1111
Bug: 36608972
Change-Id: I3fdd6a309479739567622285945d17bb3acf972e
2017-06-26 19:22:52 +01:00
Narayan Kamath
1dbaac0e50 Merge "Merge "_exit(0) on clean shutdown, not _exit(1)" into oc-dev am: 31cf02742e" into oc-dr1-dev am: 04bd18fb30
am: 6da2b86237

Change-Id: I434678eb093574d96d356e90bcc8fdb5825f62a9
2017-06-22 18:04:24 +00:00
Narayan Kamath
6da2b86237 Merge "Merge "_exit(0) on clean shutdown, not _exit(1)" into oc-dev am: 31cf02742e" into oc-dr1-dev
am: 04bd18fb30

Change-Id: I2cc9faee52a7daedbe13a499f80f4ef36e13d0e8
2017-06-22 17:48:32 +00:00
Narayan Kamath
bc8c0e9c1d Merge "_exit(0) on clean shutdown, not _exit(1)" into oc-dev
am: 31cf02742e

Change-Id: Ie0d68df7a51c10bc82974680bdd16f1eab48e9fa
2017-06-22 17:34:12 +00:00
Narayan Kamath
8bc86321ff Merge "_exit(0) on clean shutdown, not _exit(1)" into oc-dev
am: 31cf02742e

Change-Id: I8314fcf2fc2fab8f8b4db84cec89efbc6c08660e
2017-06-22 10:37:47 +00:00
Brian Carlstrom
9377ce67a8 _exit(0) on clean shutdown, not _exit(1)
Test: m -j32 checkbuild
Bug: 36066697
Change-Id: Iaed45a86f9603badf26041212dfc5e9399bc0a0c
2017-06-21 22:15:10 -07:00
TreeHugger Robot
31c8e08e9d Merge "Add 'bmgr' command to synchronously init transports" 2017-06-20 22:36:43 +00:00
Christopher Tate
924afe2b0f Add 'bmgr' command to synchronously init transports
bmgr init TRANSPORT [...]

will run an init operation on each named transport, blocking
until the operations have all completed.

Bug 62253989
Test: manual

Change-Id: I7dbd94293738d5ecf195764f5b28905253819791
2017-06-20 13:28:56 -07:00
Ed Coyne
300d183741 Merge "Allow IO During boot process, BootActions." 2017-06-20 18:23:14 +00:00
Josh Gao
eb72a37abf Merge "Hack around b/36066697." into oc-dev am: e139434e3a am: 17d3fc2e68
am: 5966301234

Change-Id: Iaf3011a7b2f184660d0f25e93aa4cb0dfd778c85
2017-06-20 04:43:10 +00:00
Josh Gao
5966301234 Merge "Hack around b/36066697." into oc-dev am: e139434e3a
am: 17d3fc2e68

Change-Id: I341c785941c3860344aa053670db8f4a5da18dd6
2017-06-20 04:36:03 +00:00
Josh Gao
8effb089ed Merge "Hack around b/36066697." into oc-dev
am: e139434e3a

Change-Id: I97427d86074cea38ca6aa59264e98a5d81645830
2017-06-20 04:31:40 +00:00
Josh Gao
17d3fc2e68 Merge "Hack around b/36066697." into oc-dev
am: e139434e3a

Change-Id: I422d2b73fc854047d1293919c25f0656df0842c9
2017-06-20 04:30:07 +00:00
TreeHugger Robot
e139434e3a Merge "Hack around b/36066697." into oc-dev 2017-06-20 04:24:14 +00:00
Ed Coyne
7464ac9bd7 Allow IO During boot process, BootActions.
NOTE: this is only compiled into products with PRODUCT_IOT=true.

Introduce BootActions that a developer can provide to manipulate IO
before the android framework comes up on boot.

We will look for a configuration file at /oem/app/etc/boot_action.conf and
expect it to tell us the name of a shared library. We will then fetch
this library from /oem/app/lib/${arch}/ and load it. We expect it to export
boot_action_init(), boot_action_shutdown(), and optionally
boot_action_start_part(int partNumber, int playNumber).

We will then call boot_action_init() during boot after PeripheralManager
is up and call boot_action_shutdown() when the android framework is up
and we are going to start loading APKs.

We will also call boot_action_start_part(*) when each part of the boot
animation is started, use this if you want to synchronize the boot
action and the boot animation.

Boot actions run in a restricted environment and in general can only
make calls to PeripheralManager.

Bug: 37992717
Test: Pushed to local imx7d to test boot actions, pushed to bullhead test that animation+sound still works.
Change-Id: I9e53a17567f8028ea84486d637e1d231ee1125e1
2017-06-19 17:27:08 -07:00
Chet Haase
538b5f1347 Merge "Make --no-window-animation flag apply to animators, too" into oc-dev am: c36e3e7fff am: 972734f592
am: 470105042e

Change-Id: Iabf6f31f4bf9c3e7ed382d19ac2c93c29fbd2651
2017-06-20 00:03:08 +00:00
Chet Haase
470105042e Merge "Make --no-window-animation flag apply to animators, too" into oc-dev am: c36e3e7fff
am: 972734f592

Change-Id: I02666e4918b849cf4bcc119a61b4b693825dabe2
2017-06-19 23:47:17 +00:00
Chet Haase
972734f592 Merge "Make --no-window-animation flag apply to animators, too" into oc-dev
am: c36e3e7fff

Change-Id: Ic680329647398f52a0d28633aa209e37556c1e31
2017-06-19 23:39:58 +00:00
Chet Haase
97f7dbb004 Merge "Make --no-window-animation flag apply to animators, too" into oc-dev
am: c36e3e7fff

Change-Id: I8c16496b18d5aca4c570e45a000081790c16ac78
2017-06-19 23:39:54 +00:00
Josh Gao
909825886c Hack around b/36066697.
Avoid calling libbinder's static destructors by calling _exit instead
of returning in main.

Bug: http://b/36066697
Test: treehugger
Change-Id: I81dd50453f1ea64d97ec97d207fff732b3c62512
2017-06-19 14:10:45 -07:00
TreeHugger Robot
3273069afe Merge "Add periodic sync support to requestsync." 2017-06-19 16:58:10 +00:00
Myles Watson
ae43f8f69b Merge "Simplify NfcCommand and avoid NullPointerExceptions" am: b5c4e80ecd am: 7ba9270427 am: ffd0a7d95c
am: 5b6d397e21

Change-Id: I2cd3fe0600aeface31afa16f999df8065a418b21
2017-06-17 02:08:20 +00:00
Myles Watson
5b6d397e21 Merge "Simplify NfcCommand and avoid NullPointerExceptions" am: b5c4e80ecd am: 7ba9270427
am: ffd0a7d95c

Change-Id: Ia3ac938a14df46beb18d49803732ee953dabf0f3
2017-06-17 01:47:35 +00:00
Myles Watson
ffd0a7d95c Merge "Simplify NfcCommand and avoid NullPointerExceptions" am: b5c4e80ecd
am: 7ba9270427

Change-Id: I28b151f93f00cbd3086e8416dbd433f34806205c
2017-06-17 01:41:09 +00:00
Treehugger Robot
b5c4e80ecd Merge "Simplify NfcCommand and avoid NullPointerExceptions" 2017-06-17 01:25:15 +00:00
Myles Watson
100f50a9e4 Merge "Add a svc command for enabling/disabling Bluetooth" am: 7d136b777a am: c0c6e1243b am: d84e4812ef
am: e4f1a15503

Change-Id: I966f241a62e49fa92e03a0ff6a50a3f8658beb02
2017-06-17 01:15:32 +00:00
Myles Watson
e4f1a15503 Merge "Add a svc command for enabling/disabling Bluetooth" am: 7d136b777a am: c0c6e1243b
am: d84e4812ef

Change-Id: I3e5c762fd7e3e11d14ff335a7ed7b963b3c8b53f
2017-06-16 23:55:32 +00:00
Myles Watson
d84e4812ef Merge "Add a svc command for enabling/disabling Bluetooth" am: 7d136b777a
am: c0c6e1243b

Change-Id: Iab78d232230a6d9ef02d40a03558f7967af7f48c
2017-06-16 23:47:57 +00:00
Myles Watson
4794e7efdf Add a svc command for enabling/disabling Bluetooth
Bug: 62067926
Test: svc bluetooth disable
      svc bluetooth enable
Change-Id: I9a53d7ab1805df98d8cf1292cf1061eacc14655d
2017-06-16 23:10:38 +00:00
Myles Watson
d3375090aa Simplify NfcCommand and avoid NullPointerExceptions
Test: adb root
      adb shell
      stop
      svc nfc enable
      start
      svc nfc disable

Change-Id: Ie5170f0525f8830d1d80b5607191ce95e78a55ae
2017-06-15 21:12:14 +00:00