4126 Commits

Author SHA1 Message Date
Jerome Gaillard
48748c5d5b Use RenderDrawable to render mipmaps am: 4b0fe7f14b
am: e298bcf755

* commit 'e298bcf7552d95475ab3ca9195e12bc14768fdb5':
  Use RenderDrawable to render mipmaps
2015-12-11 07:52:27 -08:00
Jerome Gaillard
4b0fe7f14b Use RenderDrawable to render mipmaps
Bug: http://b.android.com/179714
Change-Id: If05e71b33ee3a95590eb892f4fffbff4cfca1867
2015-12-11 15:05:46 +00:00
Adam Lesinski
a6fe345be9 AAPT2: Fix overlay support
Supports the <add-resource> tag and mimics old AAPT behavior of
not allowing new resources defined unless <add-resource> was used
or --auto-add-overlay was specified.

Change-Id: I9b461137357617ade37fd7045b418b8e6450b9c4
2015-12-10 16:24:15 -08:00
Adam Lesinski
0165523237 Merge "AAPT: Dump uses-permission-sdk-23" 2015-12-10 22:36:29 +00:00
Adam Lesinski
5f3b2ecb3e AAPT: Dump uses-permission-sdk-23
Include <uses-permission-sdk-23> permissions in dump badging and dump permissions.

This will also add implied features for that permission, marked as -sdk-23 features.

Ex:

uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission-sdk-23: name='android.permission.CAMERA'

feature-group: label=''
  uses-feature: name='android.hardware.location'
  uses-implied-feature: name='android.hardware.location' reason='...'
  uses-feature-sdk-23: name='android.hardware.camera'
  uses-implied-feature-sdk-23: name='android.hardware.camera' reason='...'

Bug:24939655
Change-Id: Ifb374696ed4760b0ba2f1cc3516f3bf08e6cb6a3
2015-12-10 14:17:52 -08:00
Dianne Hackborn
0c6cc308cf Merge "Add new target SDK filtering feature to BroadcastOptions." 2015-12-10 20:13:29 +00:00
Dianne Hackborn
e0e413e2b1 Add new target SDK filtering feature to BroadcastOptions.
You can now control the range of target SDKs that receivers
will be need to have in order to receive your broadcast.

Use this for CONNECTIVITY_ACTION to not allow N+ applications
to receive these broadcasts through their manifest.

Also tweak the broadcast debug output code to now include the
disposition of each receiver in the list.  This is becoming
important as skipping receivers is becoming a more common
thing to have happen.

Change-Id: I251daf68575c07cbb447536286ab4e68b7015148
2015-12-10 12:12:00 -08:00
Jeff Sharkey
98cb23dccf Merge "Slight API renaming, better behavior." 2015-12-09 22:51:43 +00:00
Jeff Sharkey
e13529a4ad Slight API renaming, better behavior.
Rename APIs to reflect that they're storage-related.  Also move
credential-storage APIs to be system API.

Return a null Context when device-encrypted storage isn't
supported.  This is the easiest way to keep legacy apps working when
upgrading from M to N.

Reduce strictness of path checking so we don't crash when working
with special packages like "android".

Bug: 22358539, 26104027
Change-Id: I38c24fc003488186210a6ae3b64270f86e1efe56
2015-12-09 15:22:54 -07:00
Jeff Sharkey
103d61b9f7 Merge "Shift around encryption public APIs." 2015-12-08 22:29:52 +00:00
Jeff Sharkey
7a30a30ebe Shift around encryption public APIs.
There are far too many Context APIs with special directory paths
to replicate device-encryption versions of them all.  Instead, add
methods to clone a Context that explicitly stores its data in either
credential- or device-encrypted storage.

Methods to test the behavior of a given Context.

Bug: 22358539
Change-Id: I6a6290a9b282605ce9a1f82742fc2c4c50536754
2015-12-08 15:24:29 -07:00
Svet Ganov
2acf063da0 Ephemeral cookie API
Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.

The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.

This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.

Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
2015-12-08 19:17:15 +00:00
Elliott Hughes
62b8dfd270 Merge "Track rename of base/ to android-base/." 2015-12-08 16:57:57 +00:00
Elliott Hughes
e7d2cc308e Track rename of base/ to android-base/.
Change-Id: If08a94025fc12433f7e248b7787cee3c14843097
2015-12-08 08:57:14 -08:00
Jeff Sharkey
6b8e8500f8 Merge "APIs to obtain SharedPreferences paths." 2015-12-08 02:27:07 +00:00
Jeff Sharkey
6a6cdafaec APIs to obtain SharedPreferences paths.
Needed for apps that want to migrate SharedPreferences from CE to DE
storage.  Note that a device will only ever enter a CE mode with a
factory reset, so apps should only be using these APIs when they
want to migrate files to a consistent location on non-FBE devices
for simplicity.

Bug: 25503089
Change-Id: Ic846215da1617d116a048e036415ac7ad523b770
2015-12-07 19:25:25 -07:00
Adam Lesinski
78713998f9 Specify private resource package in Android.mk
Private resource package shouldn't be buried in some resource file.
It can now be specified on the command line via the Android.mk file.

Change-Id: I9e3cb0bf54830d6b021077af271913306c024701
2015-12-07 14:52:53 -08:00
Elliott Hughes
43aecc85e8 Merge "Track rename from base/ to android-base/." am: 9f6a2ae67c am: 8aa8fe2c64
am: 7e7047ea0a

* commit '7e7047ea0aba2099408fba70937a758a91cebbca':
  Track rename from base/ to android-base/.
2015-12-04 17:51:41 -08:00
Elliott Hughes
7e7047ea0a Merge "Track rename from base/ to android-base/." am: 9f6a2ae67c
am: 8aa8fe2c64

* commit '8aa8fe2c64cf4611ba68d90992e54858a35aae58':
  Track rename from base/ to android-base/.
2015-12-05 01:44:41 +00:00
Elliott Hughes
8aa8fe2c64 Merge "Track rename from base/ to android-base/."
am: 9f6a2ae67c

* commit '9f6a2ae67c70085d550962829e6bfe76706907d8':
  Track rename from base/ to android-base/.
2015-12-05 01:36:53 +00:00
Elliott Hughes
be5474da4b Track rename from base/ to android-base/.
Change-Id: I31be831de812052d1c0d4c0781178d0756124bcf
2015-12-04 15:33:35 -08:00
Wale Ogunwale
2998eef694 Set proper stack in WM when activity is moved to stack in AM
When an activity is moved to a stack using the
ActivityStack#moveActivityToStack API a new task is created to
hold the activity in the stack. However, when the new task is
created in the window manager side it uses the stack id of the
previous stack the activity was in. We now pass the stack to use
from activity manager to window manager.

Bug: 25987309
Bug: 25961636
Change-Id: Iecc71f6d9b3e70a8d88e134b42f7532ba5327bad
2015-12-03 10:20:16 -08:00
Deepanshu Gupta
7c4420bd04 Revert "Revert "Add support for Choreographer animations""
This reverts commit 8390b2ac85765e768d4b685077a96e6395d208b4.

The build break should now be fixed by
cbb1ba7f493116882b79578ec68646366f29cde4

Change-Id: I9bf21cc6dbdb5d515a665384dc6dfa464c3e6e2e
2015-12-01 21:58:29 -08:00
Deepanshu Gupta
cbb1ba7f49 Add ability to promote fields.
This adds the ability to promote private fields to public ones to
enable layoutlib to access them. This was first added in change
b556decf75b2b084e1aed54ac7fa23a141eedb7f, but reverted in
847b0d3ad22a47e0bca3d8bc8168fea7a0ba2f80. This is essentially a revert
of the change again, but without the SimpleMonthView related stuff.

Also, promote the Choreographer's field as is needed to support
animations.

Change-Id: Iee45a465c7a1cadd362c1841385941e6232e4900
2015-12-01 21:49:12 -08:00
Diego Perez
8390b2ac85 Revert "Add support for Choreographer animations"
This reverts commit 29ed07524ce0fc2e5950f5340d306247145d0efa.
2015-12-02 04:10:22 +00:00
Marco Nelissen
e03d5e4973 Merge "Don't try to compress .webm resources" 2015-12-02 03:01:21 +00:00
Diego Perez
2ee825f507 resolve merge conflicts of 956cad8870 to master.
Change-Id: Iebad149b2768bcd7a52ee2c7c8c260a9279d1742
2015-12-02 00:04:08 +00:00
Marco Nelissen
90d5052bd7 Don't try to compress .webm resources
Bug: 25822610
Change-Id: I40a93c9daac258a8e9a41668c0040353e44ed5bb
2015-12-01 18:37:12 +00:00
Diego Perez
29ed07524c Add support for Choreographer animations
First step to add support for Choreographer based animations. The
Choreographer_Delegate avoid using a handler so the animation callbacks
can be called on-demand (by using doFrame). This allows things like
frame by frame animation or selecting a specific frame, and doesn't need
a separate thread to run.

The CL also changes the System and SystemClock implementations to allow
to set specific times. Because animations heavily rely on the system
time, this allows controlling it. It can also be useful to ensure that
the rendering produces a deterministic result when using controls like
the Calendar widget.

Change-Id: Iff221d2698a82075cafbb60f341be01741f7aa13
2015-12-01 10:14:52 +00:00
Jeff Sharkey
18201f89ee Merge "API to create SharedPreferences from File." 2015-12-01 01:03:39 +00:00
Jeff Sharkey
8fc29cf105 API to create SharedPreferences from File.
Needed to support storage of SharedPreferences on both credential-
encrypted and device-encrypted storage paths.

Bug: 22358539
Change-Id: I576b696951b2a9de817d5be63d31b06f7e166a19
2015-11-30 18:01:20 -07:00
Filip Gruszczynski
9a3f84ced7 Merge "Remove dock divider surface when it's not visible." 2015-11-30 23:37:02 +00:00
Filip Gruszczynski
64cdc1458b Remove dock divider surface when it's not visible.
We achieve the removal by notifying System UI about the visibility of
the dock divider. This way System UI can change visibility of the root
view, which in turn will cause the WMS to destroy or create the surface
as necessary.

Bug: 25844096
Bug: 25683717

Change-Id: Idbc33368db697a059af49106dfadb80c3d7d06c1
2015-11-30 15:21:48 -08:00
Adam Lesinski
07dfd2d864 Implement AAPT Bundle format
AAPT will scan XML files looking for the <aapt:attr> XML tag.

<!-- @layout/bundle.xml -->
<ImageView xmlns:aapt="http://schemas.android.com/aapt">
  <aapt:attr name="android:src">
    <vector android:pathData="..." ...>
    </vector>
  </aapt:attr>
</ImageView>

The SINGLE child element of the <aapt:attr> tag is extracted into its own top
level resource. It is given a generated name.

The parent element of <aapt:attr> is then given the resource attribute that was assigned
to the `name' attribute. The value is set to a reference to the generated resource.

<!-- @layout/bundle.xml -->
<ImageView android:src="@drawable/bundle_1.xml">
</ImageView>

<!-- @layout/bundle_1.xml -->
<vector android:pathData="..." ...>
</vector>

Bug:22627686
Change-Id: I8575fc4f739011402662fbf6b3db96df0012f598
2015-11-30 14:43:43 -08:00
Adam Lesinski
ebb3a76396 Merge "Revert "Implement AAPT Bundle format"" 2015-11-30 21:08:00 +00:00
Adam Lesinski
5b9847ca3f Revert "Implement AAPT Bundle format"
This reverts commit 9d0f7d44d5cc5322415f52f7ce03cc37a478b350.

Caused a build breakage when parsing some attributes.

Change-Id: I89ca958b2f2e820d353648df8aadd90bbe8d8339
2015-11-30 21:07:44 +00:00
Adam Lesinski
be107f46cf Merge "Implement AAPT Bundle format" 2015-11-30 19:51:53 +00:00
Adam Lesinski
2a0dd0e1e3 Merge "AAPT2: Support compiling a res/ directory and output to zip" 2015-11-30 19:30:48 +00:00
Adam Lesinski
a40e972fda AAPT2: Support compiling a res/ directory and output to zip
This allows us to compile an entire directory and output to a single
file. This is important to support generated resources in the make
build, since we may not know what resources get generated.

The link step will accept the zip and read the contents of it as if they
were passed in on the command line.

Change-Id: If1a51b0abe772350c24074353eb4989953c2e0cb
2015-11-30 11:14:01 -08:00
Yohei Yukawa
c428d4742d Fix build breakage in BridgeIInputMethodManager.
This is a follow up CL for 35d3f37bd51268cc99d81a3f537ac364d178e851 [1],
which changed some method signatures of IInputMethodManager.

  [1]: Ia1fe120af7d71495c5f3a4fc0ec6390efb8240ca

We need to update BridgeIInputMethodManager.java every time when we
change IInputMethodManager.

Bug: 25373872
Change-Id: I126dc4234f921039a9d29010ea411a0a7d2ef6c6
2015-11-25 14:21:01 -08:00
Adam Lesinski
9d0f7d44d5 Implement AAPT Bundle format
AAPT will scan XML files looking for the <aapt:attr> XML tag.

<!-- @layout/bundle.xml -->
<ImageView xmlns:aapt="http://schemas.android.com/aapt">
  <aapt:attr name="android:src">
    <vector android:pathData="..." ...>
    </vector>
  </aapt:attr>
</ImageView>

The SINGLE child element of the <aapt:attr> tag is extracted into its own top
level resource. It is given a generated name.

The parent element of <aapt:attr> is then given the resource attribute that was assigned
to the `name' attribute. The value is set to a reference to the generated resource.

<!-- @layout/bundle.xml -->
<ImageView android:src="@drawable/bundle_1.xml">
</ImageView>

<!-- @layout/bundle_1.xml -->
<vector android:pathData="..." ...>
</vector>

Bug:22627686
Change-Id: I31bc96aae30d38bfd0b16508d0f585de5fd88a07
2015-11-24 15:38:40 -08:00
Adam Lesinski
47ef9c1a82 Merge "AAPT2: Record source/comments for compound values' children" 2015-11-24 01:17:08 +00:00
Adam Lesinski
1ad32caccc Merge "AAPT2: Verify min/max attr fields" 2015-11-24 00:53:44 +00:00
Winson
8b1871d741 Adding tuner params for paging and full screen thumbnails.
- Adding “focused” stack state to support paging
- Changing the paging to match UX spec (only auto-page after the first
  tap)
- Removing old header focus animation

Change-Id: Id72825b8a1b1c0a2238ee184a6695b13c1d8cb1c
2015-11-23 15:55:52 -08:00
Adam Lesinski
28cacf091a AAPT2: Record source/comments for compound values' children
Values like styles or arrays have children which need to have
their source and comments preserved.

Change-Id: I6fc713ba36627e6d66c7930b4080cc1403bac207
2015-11-23 14:22:47 -08:00
Adam Lesinski
a587065721 AAPT2: Verify min/max attr fields
Integers are now checked to see if they fall in the range
of min/max for the attribute they are assigned.

Change-Id: I42c435b15fd3f0bd23691c83efccce4ad5973276
2015-11-23 12:01:15 -08:00
Vladislav Kaznacheev
82063913ae Implement View.cancelDragAndDrop
View.cancelDragAndDrop cancels a drag operation initiated by
View.startDragAndDrop.

It has to be called on a View in the same window (under the
same ViewRootImpl) that the view which started the drag.

Bug: 24415683
Change-Id: If9a265fd8cc4d26b207d582d0d02d5c9ae78eba1
2015-11-20 15:22:36 -08:00
Piotr Jastrzebski
cfa292e1da Add core-oj to the list of core library jars.
With some core classes moved to separate core-oj jar
we need to use the new jar.

(cherry-picked from f898cda2f499b14f92bc7fb75f44110cdec7654f)

Change-Id: Ica148f11bcc77f57d22944ff78c501611a293167
2015-11-20 14:06:55 +00:00
Deepanshu Gupta
17dc40e642 Merge "Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""" into mnc-ub-dev am: 35f7562495 am: 2d887558df am: 0627cd0c40
am: adca23bb4c

* commit 'adca23bb4c59b1514b5d86f1ab8100c400d7a71e':
  Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""
2015-11-20 03:55:07 +00:00
Deepanshu Gupta
760a214168 Merge "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator"" into mnc-ub-dev am: 8c971ae5a0 am: 867c370465 am: 4d9df358ec
am: 138a901db4

* commit '138a901db492989ae7db53d664cac698cc5bfdc7':
  Revert "Update StaticLayout_Delegate to use new nLoadHyphenator"
2015-11-20 03:53:45 +00:00