Commit Graph

4998 Commits

Author SHA1 Message Date
John Reck
f32adf4475 Clean up ApplyStyle JNI
Bug: 32573798

Mark input uint32_t[] as const. Use Read-only JNI
array access for input as it's faster than critical access.

Use non-movable arrays for TypedArray so that the address can
be resolved and stored, avoiding the need to do JNI array
access for the output.

Indicies is always non-null, so remove the optional checks.

Eliminate unused return value.

Benchmark results:
twelveKeyInflate 4963us -> 4713us
simpleViewInflate 73us -> 60us

Test: Device boots, benchmarks show faster

Change-Id: Ic3bde5aee31407d8903913f97f2218daf074499a
2016-12-02 12:49:20 -08:00
Michael Rosenfeld
3d76f235e3 Merge "Add command line action sequencing." am: 880c9acf4a am: 3711f2f0c2 am: 2f5f210f7d
am: c853f3a5ff

Change-Id: Id157a2d7afc5c49967d804edb734c4b277bf0d20
2016-12-01 22:34:03 +00:00
Michael Rosenfeld
c853f3a5ff Merge "Add command line action sequencing." am: 880c9acf4a am: 3711f2f0c2
am: 2f5f210f7d

Change-Id: I10c2d3c3be0bb8748602b3a566f75f8c687f8889
2016-12-01 22:05:22 +00:00
Michael Rosenfeld
3711f2f0c2 Merge "Add command line action sequencing."
am: 880c9acf4a

Change-Id: I81b31d950e0dca525fbfe9aa38c9c113eea7cec8
2016-12-01 21:40:06 +00:00
Filip Pavlis
f457db6a2c Merge "Adds keyword "default" to the API-linter." 2016-12-01 18:02:03 +00:00
Doris Liu
8a5a950ac0 Fix LUTInterpolator lookup table position calc am: 0940834c8c
am: 00d348ec26

Change-Id: I563b65b61d3bac80ea81521478e295963508890c
2016-12-01 01:39:23 +00:00
Doris Liu
00d348ec26 Fix LUTInterpolator lookup table position calc
am: 0940834c8c

Change-Id: Ib80c00801473d7e60bae87b3b34a381c7f8e7e68
2016-12-01 01:33:52 +00:00
Doris Liu
0940834c8c Fix LUTInterpolator lookup table position calc
BUG: 32830741
Test: running progress bar at 5x duration scale, no flickering
Change-Id: Ie484bdbfdf18bacc4586e36c5142e4523d08bdaa
2016-11-30 23:20:19 +00:00
Michael Rosenfeld
c37b0a40e7 Add command line action sequencing.
Supported actions:
* .. scan <process> ..
* .. scan-all ..
* .. import <infile> ..
* .. export <infile> ..
* .. comp <thresh> <outfile> ..
Test: manual
Bug: 31961946

Change-Id: I08753f31294ac5f30f6bcddeabef12d138e7e8e6
2016-11-30 11:26:33 -08:00
TreeHugger Robot
bece7278d3 Merge "Add an option to bit to not restart." 2016-11-30 04:49:23 +00:00
Joe Onorato
6592c3cc8f Add an option to bit to not restart.
Test: build & restart
Change-Id: Ia925053f04046d7fb91a47cfd5fd17a5d4fecf10
2016-11-29 17:36:36 -08:00
Andreas Gampe
428e65d62a Merge "Preload2: Add sequence UI" am: 56ddac7fd7 am: b9d8535a21 am: 04cbf97d38
am: a9b85deae7

Change-Id: Ifa1c964b926208f88070967dec7d2fad90c5e09a
2016-11-30 01:31:58 +00:00
Andreas Gampe
b9d8535a21 Merge "Preload2: Add sequence UI"
am: 56ddac7fd7

Change-Id: I6ca6e1ea6c6721a24f7b1d3d7fb4715bd51aa0d9
2016-11-30 00:49:44 +00:00
Andreas Gampe
437474990d Preload2: Add sequence UI
Add a fake UI that can run a sequence of actions (and replies).

Bug: 31961946
Test: manual
Change-Id: Iee0fac5ddf75a97eff7b401c9c932634489349de
2016-11-29 15:22:02 -08:00
Kenny Guy
58feeac96b Merge "Allow overriding max profile in debugable builds." 2016-11-29 20:12:17 +00:00
Filip Pavlis
db234ef0ac Adds keyword "default" to the API-linter.
This will fix issue when linting Java 8 default methods on interfaces,
e.g. Ie46a876dcb14b46b8b2584735c106c25655ec6cf.

Test: Manualy tried that the linter no longer gives the error.

Change-Id: I68ade6ba6401439667408076a5454caef77ef72d
2016-11-29 19:21:21 +00:00
Paul Duffin
10a9bd905c Merge "Use junit-host instead of junit" am: 6063357ae6 am: 6fc0c5ceca am: 32317b3c8d
am: 29bf88aca9

Change-Id: I2f75d5e80d9baa411e7816958d4a6d6d220d0ba9
2016-11-29 15:31:57 +00:00
Paul Duffin
6fc0c5ceca Merge "Use junit-host instead of junit"
am: 6063357ae6

Change-Id: I6522cedeb522fa01530d4f31b6505b4d4c265312
2016-11-29 15:12:46 +00:00
Paul Duffin
4a064d2010 Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I3496b9d7e40abf7712a56ba633a2becd0aa17c06
2016-11-29 14:52:42 +00:00
TreeHugger Robot
d25cf04e98 Merge "Add explicit method to dismiss Keyguard" 2016-11-29 14:30:46 +00:00
Kenny Guy
02c8990bd6 Allow overriding max profile in debugable builds.
Support a system property on debugable builds to
override the max number of managed profiles to
allow easier dogfooding of multiple profiles.
Support 3 different badge colours for managed profiles.

Bug: 30473760
Test: runtest -c com.android.server.pm.UserManagerServiceCreateProfileTest frameworks-services
Test: runtest -c com.android.server.pm.UserManagerServiceUserInfoTest frameworks-services
Test: manual - attempting to create 2 profiles with adb fails, passes once I set the property.
Change-Id: Ie7fb19048a04a01572666f229283152254d0ffc3
2016-11-29 14:09:37 +00:00
Paul Duffin
4aab571757 Merge "Use junit-host instead of junit" am: 7dda7e1e81 am: bbb501281e am: 52277efa6c
am: 2d4183ffa5

Change-Id: I1cc3bc8b73d7756c850a1573ca5ff9090e64c184
2016-11-29 10:39:06 +00:00
Paul Duffin
bbb501281e Merge "Use junit-host instead of junit"
am: 7dda7e1e81

Change-Id: Ie070bf5329899f21e3fb65dae6db5fdd50e74ba9
2016-11-29 10:22:34 +00:00
Paul Duffin
7dda7e1e81 Merge "Use junit-host instead of junit" 2016-11-29 10:12:52 +00:00
Andreas Gampe
d6d10b6c78 Preload2: Add isSingleThreaded am: 3bf65c916c am: 57c14c8ee6 am: 80ae2ed225
am: 190dbbd0af

Change-Id: I1728bb69b359ece93ba2e89f5aa86407e9b17787
2016-11-29 03:47:50 +00:00
Andreas Gampe
8e2338f72d Preload2: Fix action inheritance am: 1c809a3d32 am: 24cd3418c7 am: 2b34ac2bd6
am: 26c94b7430

Change-Id: Ic6fde07acce3b6d0ab1708c3aff57e8aabb3fe96
2016-11-29 03:46:38 +00:00
Andreas Gampe
f237a11fb0 Preload2: Abstract out UI am: 5cb8998363 am: 826ec71e96 am: eab0eadbf6
am: af5b2c3010

Change-Id: I17fe36f9d2df61f0da1bc229f7a77a5e3f16f45b
2016-11-29 03:45:41 +00:00
Andreas Gampe
57c14c8ee6 Preload2: Add isSingleThreaded
am: 3bf65c916c

Change-Id: I6bf6c5b934cb89937bb329ea7b9f50c70b3a898d
2016-11-29 03:20:51 +00:00
Andreas Gampe
24cd3418c7 Preload2: Fix action inheritance
am: 1c809a3d32

Change-Id: I8ef23a6ee16b1462d65ef2d7a3f62e9d586c92ff
2016-11-29 03:20:12 +00:00
Andreas Gampe
826ec71e96 Preload2: Abstract out UI
am: 5cb8998363

Change-Id: Ia4a147e061397951ada72beac7c5781b8dbac918
2016-11-29 03:19:34 +00:00
Andreas Gampe
3bf65c916c Preload2: Add isSingleThreaded
Expose whether a UI is single-threaded to avoid spawning threads
in actions.

Bug: 31961946
Test: manual
Change-Id: I37c8daa6a00784e833bad53b8e83ab4417955df7
2016-11-28 15:06:35 -08:00
Andreas Gampe
1c809a3d32 Preload2: Fix action inheritance
Use AbstractThreadedAction as a base.

Bug: 31961946
Test: manual
Change-Id: I5a05b65d753be775c8b8382bb1a81e869c388f8d
2016-11-28 15:04:25 -08:00
Andreas Gampe
5cb8998363 Preload2: Abstract out UI
Create IUI interface and move UI to SwingUI.

Bug: 31961946
Test: manual
Change-Id: If56347fdde8b441c0c01337a3f5eac002ea5b4f3
2016-11-28 13:15:10 -08:00
Paul Duffin
21cf84f8b3 Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I5d3efbfbe3245a631113674bff1b0aabdc9fe8be
2016-11-28 16:44:44 +00:00
Jerome Gaillard
f149ca784d Override TextServicesManager in layoutlib
When a TextServicesManger is required in layoutlib, provide a fake
one.

Test: Run layoutlib tests
Change-Id: I8c25f4919a2e97b56f705b59747e81cb6f45b07b
2016-11-28 15:54:55 +00:00
Jerome Gaillard
f666c0e2ea Fix layoutlib to reflect recent changes in platform code
Test: Layoutlib tests
Change-Id: I81964233a9e580ccee9c9e9b0cf3525babf30bd4
2016-11-28 10:40:33 +00:00
Diego Perez
5017ece983 Update allwidgets golden image
Test: Updating existing test
Change-Id: Ie66abc77ec6013a8094d6b8be2666b69c973a295
(cherry picked from commit 48d6ec53f9c75571217880ef77902f582723418b)
2016-11-25 12:36:12 +00:00
Jerome Gaillard
8deff10ff9 Merge "Fix shadow painting in layoutlib" 2016-11-25 12:04:03 +00:00
Jerome Gaillard
2dd5018a0f Merge "Add missing ServiceNotFoundException class" 2016-11-24 21:49:48 +00:00
Jerome Gaillard
d38fffd38d Store failure thumbnails in CWD/out/failures
When a test fails in layoutlib, store the resulting png files in
out/failures subdirectory of the current working directory.
That avoids the risk of collisions if tests for several branches
of layoutlib are run at the same time.

Test: Run tests in layoutlib with at least one failing test
Change-Id: I31594a871e481e6aa410a165926ce544dc7ddcf2
(cherry picked from commit 82ebb9058479de56860f348ab969160e0d8294b6)
2016-11-24 16:43:30 +00:00
Jerome Gaillard
555fcd5579 Fix shadow painting in layoutlib
Shadows could be painted outside of the allowed drawing region
for the components for which they are the shadow.

Bug: http://b.android.com/215402
Change-Id: I2d2821b745147f3723e8f11d648094fcd684fe51
(cherry picked from commit 9702fffc768db43d0aba4fb1bea54af50af11361)
2016-11-24 16:42:12 +00:00
Jerome Gaillard
e3607d2cc7 Add missing ServiceNotFoundException class
This class was added in ServiceManager.java in commit 49ca529a85.
Layoutlib rewrites the entire ServiceManager class, so it also
needs to define ServiceNotFoundException.

Test: TestDelegates.testMethodDelegates
Change-Id: Ia68399e8baa973ae961eabe929ca3d1019f20ba7
2016-11-24 16:24:28 +00:00
Jorim Jaggi
241ae10b21 Add explicit method to dismiss Keyguard
The flag is a bit clunky for most cases, and a method is more
clear.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardTests

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardLockedTests

Test: runtest systemui -c
com.android.systemui.keyguard.DismissCallbackRegistryTest

Bug: 30961403
Bug: 27422134
Change-Id: I39de90c7cfecd99350a74f72cd76418e337f2b79
2016-11-23 16:27:35 +01:00
Diego Perez
dc3bb324ce Fix tests when running from the command line
When loading classes from the jar file, we can't just use the
URLClassLoader since it can not enumerate files in a jar directory.
Restoring the ModuleClassLoader and making all paths relative to the
system class loader (as opposed to relative to the class location).

Change-Id: Ib3f5d12dd5c964d0ba9cc6c5ec9cb556c989e653
(cherry picked from commit 2a4a6c81f8a103be5c48d8a0605a3e4416e8f7f1)
2016-11-23 11:01:44 +00:00
Bartosz Fabianowski
1133424c2b Wire up PM.getInstalledApplicationsAsUser(flags, userId) as hidden API
Settings needs to access a variant of getInstalledApplications() which
takes a |userId| argument. Since this is not currently exposed by
PackageManager, Settings calls into PackageManagerService directly. This
is ugly and breaks the regular abstraction layer hierarchy.

The CL fixes the problem by exposing the required variant of
getInstalledApplications() as a hidden API, analogously to what was done
before with getInstalledPackages().

Bug: 32692748
Test: Will be CTS-verifier-tested together with Settings
Change-Id: Id9c4e8e18524d312159821f1a4d5527263c7e950
2016-11-17 20:49:16 +01:00
Andreas Gampe
6a0cb767b2 Merge "Preload2: Fix dependencies" am: 3b379ee94e am: 74b4e070be am: 6a454c86db
am: c89bd30cee

Change-Id: I613d29d4a32266282d73a1c61482fd5a35f58953
2016-11-16 18:47:34 +00:00
Andreas Gampe
74b4e070be Merge "Preload2: Fix dependencies"
am: 3b379ee94e

Change-Id: If3ecad631e5f7deb9b2f348a26d9b41f8a00b4f5
2016-11-16 18:25:37 +00:00
Diego Perez
c318f0b408 More layoutlib testing infra fixes
- Remove ModuleClassLoader as it can be replaced with a URLClassLoader
  for now.
- Move CustomCalendar and CustomDate to a separate package that can be
  used both by the Bridge tests and the actual test app.
- Move empty.xml out of the test app so it compiles.
- Update test app to use the latest build tools and SDK (some attributes
  being used by the app weren't supported in API 21).
- Update gitignore to remove the new out directory.

Test: Update to existing tests
Change-Id: Ieb7324d5ae559f9c581771c57f2127cd83909015
2016-11-15 14:11:33 +00:00
Andreas Gampe
da69216ac6 Preload2: Fix dependencies
Also depend on and package tools-common.

Test: m
Test: preload-tool
Change-Id: I19a8844f87417f2292e50ffaaebb5fa24a2eca24
2016-11-14 19:08:22 -08:00
Jerome Gaillard
e6f30eec36 Fix testActivity on buildbot
Follow-up to commit 896cc3a794, the class file also needed to be
updated. The golden file of testActivity is also updated to be
the one built with jdk1.8.0_60 which is the one running on buildbot.

Test: Run testActivity
Change-Id: I7f3cfc1123160005c3cb5fa4213db6ae3a48457d
(cherry picked from commit aab13aee9a11c340952c24f2410940df59996816)
2016-11-14 18:05:57 +00:00