4934 Commits

Author SHA1 Message Date
John Reck
437d4e0daf Merge "Re-unite sources with their headers" 2016-11-04 19:32:06 +00:00
Paulo Casanova
a256408b24 Renamed Aapt2.java to Aapt2Jni.java.
See http://ag/1590668 for a discussion.

Test: Done in tools
Change-Id: I3bfced0da98ab24531c1c1a79970841b32bfa1fa
2016-11-04 11:28:44 +00:00
John Reck
f6113af2d6 Re-unite sources with their headers
Move all the includes for androidfw under
a common base path for that library instead
of frameworks/base/includes.

Also fixes -Werror issues that resulted in
no longer being -isystem.

Test: builds
Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7
2016-11-03 16:26:59 -07:00
Paulo Casanova
573cccfea7 Merge "Updated JNI interface." 2016-11-03 18:39:04 +00:00
Paulo Casanova
b555b59f2e Updated JNI interface.
Added new "ping" method used to detect if the shared
library has already been loaded.

Fixed a few bugs in the implementation (and now it works
from the Java side).

See http://ag/1590668 for the implementation on devtools.

Test: Done on the tools side
Change-Id: Ifa41073dc3b6ac69cdb9f77e655bf261c3b4c3d1
2016-11-03 10:14:42 +00:00
Paulo Casanova
3497b26507 Added Windows support for aapt/JNI.
This includes copying and slightly modifying
libnativehelper's ScopedUtfChars' implementation.

Test: Done in studio-master-dev
Change-Id: I2aacc67b444668478aaa5bb0db991a201c571d1f
2016-11-03 09:39:43 +00:00
TreeHugger Robot
d5a422d62e Merge "AAPT: fix error message" 2016-11-02 22:18:49 +00:00
Adam Lesinski
fcb5f7bf36 AAPT: fix error message
Test: none
Bug:9779154
Change-Id: Iebda7d4f0061cdc51db0103977195964fcc1211d
2016-11-02 13:17:10 -07:00
Wale Ogunwale
ac2561e820 Make window token add/remove APIs require displayId
Window tokens can now only be on one display, so we now require clients
that want to add/remove window tokens to specify the display they would
like the token to be created on. This simplifies the token handling code
in WM and will be useful moving forward for clients that want to add
windows to external displays.

Test: Existing tests pass
Change-Id: I6b2d8d58a913b3624f1a9a7bebbb99315613f103
2016-11-02 10:28:45 -07:00
Jorim Jaggi
8d78693157 The big keyguard transition refactor (6/n)
Cleanup:
- Make sure all the state is nicely dumped.
- Remove some unused stuff.
- Fix a flicker when occluded -> unlocked

Bug: 32057734
Change-Id: Id87e26adccef740d608b325c2dc1f6db14dd4ec3
2016-11-01 15:36:40 -07:00
Diego Perez
e48170bcbb Merge "Remove refSkPixelRef" 2016-11-01 10:29:29 +00:00
Winson Chung
655332c641 Creating PinnedStackController.
- Creating a PinnedStackController to keep track of the state of the PIP
  to prevent changes in the system (ie. IME showing) and user interaction
  from clobbering each other.
- Refactoring calls in AM into WM/controller

Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: Ie59dfd45d5c54764ba69a589b3b8148845e92cc3
Signed-off-by: Winson Chung <winsonc@google.com>
2016-10-31 13:21:55 -07:00
Diego Perez
c93beed4e6 Remove refSkPixelRef
Change-Id: I4d6e7076d2b87dd208c0eba27491c13f56567420
2016-10-31 17:54:01 +00:00
Adam Lesinski
e343eb145c AAPT2: Insert <uses-sdk> element before <application>
PackageParser on the device uses the targetSdkVersion of the
app while it parses <application>. That means that if the
<uses-sdk> tag comes after <application>, the targetSdkVersion
is assumed to be 0.

Test: make libaapt2_tests
Change-Id: I60f2179a7ff44e7419217afb53f3d24f8c030f6e
2016-10-27 16:31:58 -07:00
Diego Perez
4bcf5e7c47 Merge "Remove use of refSkPixelRef" 2016-10-27 10:15:41 +00:00
TreeHugger Robot
b629f36601 Merge "AAPT2: Rename to match new style" 2016-10-27 04:31:05 +00:00
Adam Lesinski
ce5e56e243 AAPT2: Rename to match new style
Use Google3 naming style to match new
projects' and open source google projects' style.

Preferred to do this in a massive CL so as to avoid
style inconsistencies that plague legacy code bases.
This is a relatively NEW code base, may as well keep
it up to date.

Test: name/style refactor - existing tests pass
Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
2016-10-26 19:30:23 -07:00
Winson Chung
303c6b78b6 Fix wrong bounds being used in landscape.
- Ensure we use the right display size when calculating PIP bounds.
- Also update interface to take the display id.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackDefaultBounds
Test: #testPinnedStackMovementBounds

Change-Id: I01fd8ba6dee212c29a9a092673ee8f7843e41af6
2016-10-26 12:49:40 -07:00
Diego Perez
906f2ad1c8 Remove use of refSkPixelRef
Test: refactoring, existing tests pass
Change-Id: I4ea51f25b3a2e4cb6a3391d059fb1f0b74f0e90d
2016-10-26 16:08:44 +01:00
Andrii Kulian
5406e7ade8 Apply display override config for secondary displays
Now display-specific settings, such as dimensions and orientation,
are stored in display override config. For default display it is
mirroring the global config. Each time when global config is updated,
override of the default display should be updated too and vice versa.

Test: Existing and manual tests still pass.
Change-Id: Ic6c2190092d328820f314a05bed43c875db18170
2016-10-25 13:22:10 -07:00
Paulo Casanova
418063c63f Merge "Added JNI interface for aapt2." 2016-10-22 08:19:19 +00:00
TreeHugger Robot
b366402a68 Merge "AAPT2: Ensure string pool ordering is compact" 2016-10-22 00:37:20 +00:00
Joe Onorato
8e16c1d458 Merge "Another mac fix" 2016-10-21 22:32:34 +00:00
Joe Onorato
31617e3b8f Another mac fix
Test: make (on linux)
Change-Id: I3f0561f3a1fc08dad5d3dd8ba860da56b51d273c
2016-10-21 15:29:51 -07:00
Christopher Ferris
5066f9513b Merge "Fix mac build." 2016-10-21 22:23:02 +00:00
Joe Onorato
8a5bb6370c Fix mac build of bit
Test: make bit
Change-Id: I8005e77babfbe2d48806f9315800e699d1917bb4
2016-10-21 14:32:01 -07:00
Adam Lesinski
b54ef10f55 AAPT2: Ensure string pool ordering is compact
Keep styledstrings at the beginning of the StringPool
to reduce the padding in the StyledString array.

Bug:32336940
Test: manual
Change-Id: Iec820c21a54daac40ecc3b2f87517a0f1efc9d3d
2016-10-21 13:51:59 -07:00
Christopher Ferris
c1ef4b25a7 Fix mac build.
Do not build the bit tool on darwin.

Test: Make sure this still builds on linux.

Change-Id: Ie958649893016771f1fa3df6f10d443d0117c171
2016-10-21 12:56:35 -07:00
Joe Onorato
2f99e60d71 Merge changes from topic 'am_instrument'
* changes:
  Add a new build, install, test development (bit) tool
  am instrument gets protobuf
  Fix bad type codes in streaming proto compiler
2016-10-21 17:55:46 +00:00
TreeHugger Robot
577e66cc43 Merge "AAPT2: Fail compile on bad output file/dir" 2016-10-21 03:04:12 +00:00
Joe Onorato
0578cbc6c5 Add a new build, install, test development (bit) tool
This is a cleaned up version of a utility that I've had sitting around
for a while.

The bit tool can run an android platform build, then sync or install
the outputs of that, and then run instrumentation tests.  It's better
than what we usually do:

  make && adb shell stop && adb sync system && adb shell start

Here's the help text:

usage: bit OPTIONS PATTERN

  Build, sync and test android code.

  The -b -i and -t options allow you to specify which phases
  you want to run. If none of those options are given, then
  all phases are run. If any of these options are provided
  then only the listed phases are run.

  OPTIONS
  -b     Run a build
  -i     Install the targets
  -t     Run the tests

  PATTERN
  One or more targets to build, install and test. The target
  names are the names that appear in the LOCAL_MODULE or
  LOCAL_PACKAGE_NAME variables in Android.mk or Android.bp files.

  Building and installing
  -----------------------
  The modules specified will be built and then installed. If the
  files are on the system partition, they will be synced and the
  attached device rebooted. If they are APKs that aren't on the
  system partition they are installed with adb install.

  For example:
    bit framework
      Builds framework.jar, syncs the system partition and reboots.

    bit SystemUI
      Builds SystemUI.apk, syncs the system partition and reboots.

    bit CtsProtoTestCases
      Builds this CTS apk, adb installs it, but does not run any
      tests.

  Running Unit Tests
  ------------------
  To run a unit test, list the test class names and optionally the
  test method after the module.

  For example:
    bit CtsProtoTestCases:*
      Builds this CTS apk, adb installs it, and runs all the tests
      contained in that apk.

    bit framework CtsProtoTestCases:*
      Builds the framework and the apk, syncs and reboots, then
      adb installs CtsProtoTestCases.apk, and runs all tests
      contained in that apk.

    bit CtsProtoTestCases:.ProtoOutputStreamBoolTest
    bit CtsProtoTestCases:android.util.proto.cts.ProtoOutputStreamBoolTest
      Builds and installs CtsProtoTestCases.apk, and runs all the
      tests in the ProtoOutputStreamBoolTest class.

    bit CtsProtoTestCases:.ProtoOutputStreamBoolTest\#testWrite
      Builds and installs CtsProtoTestCases.apk, and runs the testWrite
      test method on that class.

    bit CtsProtoTestCases:.ProtoOutputStreamBoolTest\#testWrite,.ProtoOutputStreamBoolTest\#testRepeated
      Builds and installs CtsProtoTestCases.apk, and runs the testWrite
      and testRepeated test methods on that class.

  Launching an Activity
  ---------------------
  To launch an activity, specify the activity class name after
  the module name.

  For example:
    bit StatusBarTest:NotificationBuilderTest
    bit StatusBarTest:.NotificationBuilderTest
    bit StatusBarTest:com.android.statusbartest.NotificationBuilderTest
      Builds and installs StatusBarTest.apk, launches the
      com.android.statusbartest/.NotificationBuilderTest activity.

Change-Id: I9cff7a23852fa1a67369e7807f7ae9f6e45d6131
Test: none
2016-10-20 18:20:40 -07:00
Adam Lesinski
dfaecafbe9 AAPT2: Fail compile on bad output file/dir
Test: manual
Change-Id: I2578e32c52430a62df942822ddf6bd3f06357bce
2016-10-20 17:08:51 -07:00
TreeHugger Robot
12bfe65410 Merge "AAPT2: Error on uncompiled XML or PNG files in link phase" 2016-10-20 23:58:15 +00:00
Adam Lesinski
6a396c1abb AAPT2: Error on uncompiled XML or PNG files in link phase
Incorrectly passing text XML and unprocessed PNG files to
the AAPT2 link phase should raise an error.

Test: manual incorrect invocation of aapt2
Change-Id: Iab47f99bc378b5d1c4f4d87098f08243b9a4dc6a
2016-10-20 14:40:49 -07:00
George Burgess IV
092db3c88a Merge "Fix a static-analyzer warning." am: 63b4f6f5db am: ea4423b181
am: 281e9f30c0

Change-Id: If34a4265ceb5bc6f4bf31c35e82270f90e970457
2016-10-20 19:35:45 +00:00
George Burgess IV
ea4423b181 Merge "Fix a static-analyzer warning."
am: 63b4f6f5db

Change-Id: I85fd6d25733d59da76eb0bab381fdbd3b5a0430d
2016-10-20 19:19:15 +00:00
Treehugger Robot
63b4f6f5db Merge "Fix a static-analyzer warning." 2016-10-20 19:06:58 +00:00
Joe Onorato
3a5eb29720 Fix bad type codes in streaming proto compiler
Change-Id: I4623f0a726107ec1321cadcaaf83b23353d0728e
Test: make StreamingProtoTest
2016-10-20 11:57:22 -07:00
Paulo Casanova
255960857d Added JNI interface for aapt2.
Test: None (tests will be made on the Android Studio Tools project)
2016-10-20 12:03:34 +01:00
Adam Lesinski
cacb28f2d6 Use Google3 style guide with .clang-format
Test: style change only, builds ok
Change-Id: I885180e24cb2e7b58cfb4967c3bcb40058ce4078
2016-10-19 12:18:14 -07:00
Mark Salyzyn
21c2e9e60c Merge "missing includes" am: 78929f3ee0 am: 6a8f0d70b0
am: 6e60ab12e7

Change-Id: I1b5c6f49d2ae565ebd59c6ce8d590512ab306487
2016-10-17 21:38:33 +00:00
Mark Salyzyn
6a8f0d70b0 Merge "missing includes"
am: 78929f3ee0

Change-Id: I3e7a25ded484d516fab453abe434c2e53cf0f27e
2016-10-17 21:25:59 +00:00
Mark Salyzyn
4d6c372eae missing includes
Assumptions are made about header side effects

Test: compile
Bug: 30465923
Change-Id: Icc9415aed5e54b2bc00b70aa0da6df4148f30654
2016-10-17 12:32:54 -07:00
Diego Perez
46bf9f3b5c Merge "Account for horizontal offset when calculating borders" 2016-10-17 11:36:19 +00:00
Winson Chung
011c85729a Merge "Adding PIP input consumer." 2016-10-14 22:34:03 +00:00
George Burgess IV
8607c7016f Merge "Fix static-analyzer warning." am: 2fbf30d3fe am: a52992e290 am: c88628da5e
am: a40eeb0979

Change-Id: I973bb3f7f72f38133472874727b4297042ee0a50
2016-10-14 20:07:51 +00:00
Winson
412754816d Adding PIP input consumer.
- This CL provides the framework for manipulating the pinned stack using
  an input policy (to be determined later) provided by the SystemUI.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testNonTappablePipActivity

Change-Id: I025c41fff26ed05a35d68e59f10330680ed11ea8
2016-10-14 11:21:48 -07:00
George Burgess IV
a40eeb0979 Merge "Fix static-analyzer warning." am: 2fbf30d3fe am: a52992e290
am: c88628da5e

Change-Id: Iece80dfbd8a5d01ffdcf6edf1decd8078af31511
2016-10-14 14:39:06 +00:00
George Burgess IV
56f5f7b79b Fix a static-analyzer warning.
frameworks/base/tools/aapt2/util/Files.cpp:81:21: warning: Null pointer
passed as an argument to a 'nonnull' parameter
     while ((entry = readdir(dir))) {

Bug: None.
Test: Warning no longer appears.
Change-Id: If242598405e995928378ce317a2e909654e1e985
2016-10-13 15:52:34 -07:00
George Burgess IV
0c2774b16a Fix static-analyzer warning.
frameworks/base/tools/aapt/Images.cpp:845:17: warning: Assigned value is
garbage or undefined
     row += bpp;

Bug: None.
Test: The warning is gone.
Change-Id: Idf4623d2510111a9188ed39922e109a8db225c76
2016-10-13 15:51:04 -07:00