4954 Commits

Author SHA1 Message Date
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
Jerome Gaillard
7638c49c84 Change date on CustomCalendar
The date of the calendar is set by converting the epoch time based on
the local time zone. We choose at date at 12:00 GMT so that it will
be on the same day no matter which time zone is considered.

Test: part of testActivity
Change-Id: Ib36a5b45f69323265dd5ceaa17eeac553fc2d071
(cherry picked from commit 896cc3a794bb6e173c1e53e97f70007c3e24de38)
2016-11-14 11:01:33 +00:00
Jerome Gaillard
4570fc9f28 Merge "Rename native methods that were changed in the platform" 2016-11-14 11:00:51 +00:00
Ben Lin
bbd711c2a5 Merge "Adding ContentProvider#refresh and ContentResolver#refresh." 2016-11-11 19:13:40 +00:00
Jerome Gaillard
a10973ebd1 Rename native methods that were changed in the platform
This is following commits f22859757b, 94931bd87e, 4387190d8e
and caa08ff5e9.

Test: Run TestDelegates
Change-Id: If90028492c036fc5f69913e4dcad5a1a5fca4b55
2016-11-11 14:11:03 +00:00
Ben Lin
1cf454fcb6 Adding ContentProvider#refresh and ContentResolver#refresh.
Original CL is from ag/1568530.

Bug: 31647485
Change-Id: Ib45fc995a361b8c75cd3600f638910b18a263d51
2016-11-10 13:53:27 -08:00
Jerome Gaillard
3911cee2cf Update testActivity
Put android:animateFirstView false in the test application theme
so that the date picker view displays fully.
Update the golden image to reflect the changes.

Change-Id: If57fac5c182dd69b4b4d4fcc30d6f17a8f67ad68
(cherry picked from commit 96970138fc1c8d928a6d3ec362865e6c626f56e4)
2016-11-10 16:35:09 +00:00
Tamas Berghammer
67387af732 Merge "Update package names to work with the proto3 compiler" 2016-11-09 13:38:58 +00:00
Adam Lesinski
f96789d37c Merge "Add font type to AAPT2" 2016-11-08 23:03:58 +00:00
Tamas Berghammer
383db5ebcc Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:09 +00:00
Diego Perez
8f61cb3301 Merge "Fix themed attributes resolution" 2016-11-08 12:03:19 +00:00
John Reck
946d11d216 Merge "Re-unite sources with their headers"
am: e43444a00b

Change-Id: I8f3ef6a1ddcf78d28f7444b6e83c552b8305fd8c
2016-11-04 21:47:34 +00:00
John Reck
03b5d506bc 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
Merged-In: Ic4312eb61b197af114dded5691d5ae1ec82923f7
(cherry picked from commit f6113af2d6f6eebee68d3ac510fe96d38a7a39e9)
2016-11-04 13:27:37 -07:00
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
c0c366394c Add font type to AAPT2
Test: make libaapt2_tests AaptTestAppOne
Change-Id: I8fbf01675a218cc3c0b59598b6b1ec173851e946
2016-10-27 18:09:00 -07: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