2161 Commits

Author SHA1 Message Date
Jeff Sharkey
cd65448ccd Even more PackageManager caller triage.
Finish moving all UID/GID callers to single AIDL method that requires
callers to provide flags.

Triage AppWidgets and PrintServices, which currently can only live on
internal storage; we should revisit that later.

Fix two bugs where we'd drop pending install sessions and persisted
Uri grants for apps installed on external storage.

Bug: 26471205
Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
2016-01-08 18:35:54 -07:00
Deepanshu Gupta
80dc34e358 Merge "Java 8 in layoutlib-create" 2016-01-08 17:37:56 +00:00
Deepanshu Gupta
23e47f5621 Java 8 in layoutlib-create
Upgrade to ASM 5 and diamond operators.

Also minor fixes here and there.

Bug: 26442940
Change-Id: I5611ed0889aa94cca8655fec47799e1ddccb0150
2016-01-08 08:03:06 -08:00
Alex Klyubin
e7565ad959 Merge "[1/3] Remove unnecessary throws statement in ServiceManager" am: d1240219aa
am: 4a06b7ea7e

* commit '4a06b7ea7e493bf7b575da5219429e2cbeb5b3e8':
  [1/3] Remove unnecessary throws statement in ServiceManager
2016-01-07 19:21:59 +00:00
Alex Klyubin
4a06b7ea7e Merge "[1/3] Remove unnecessary throws statement in ServiceManager"
am: d1240219aa

* commit 'd1240219aadedc867b50158c67d1737a27fa7c6f':
  [1/3] Remove unnecessary throws statement in ServiceManager
2016-01-07 19:18:01 +00:00
Jeff Sharkey
8588bc1ef1 Add flags to requests for package UID/GIDs.
This gives callers the ability to request details for missing
packages.  Also add annotations for userId and appId variables and
start tagging their usage.

Change-Id: I63d5d7f870ac4b7ebae501e0ba4f40e08b14f3f6
2016-01-07 10:33:26 -07:00
Umair Khan
9ccebbfc37 [1/3] Remove unnecessary throws statement in ServiceManager
The exception is already caught by the try-catch block.

Change-Id: I0c10fe51d12a10cbc02a25c719d03a4ba6497767
Signed-off-by: Umair Khan <omerjerk@gmail.com>
2016-01-07 15:08:27 +05:30
Jeff Sharkey
e06b4d1d9f Consistent naming for PackageManager methods.
When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix.  This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
2016-01-06 15:21:06 -07:00
Alex Klyubin
4f6d400b0f Merge "No need to pass digest of AndroidManifest.xml around." 2016-01-05 21:19:41 +00:00
Jorim Jaggi
2a37455a28 Fix build
Change-Id: Ifd69818ca6d5dbf129f6c956c1a7dfae760e30d6
2016-01-05 14:31:50 +00:00
Jerome Gaillard
a65ebea1ad Create new Navigation Bar for the Theme Editor Preview am: 3b90b74cf9
am: 968ee5368b

* commit '968ee5368b7d626e7ac64b0befd212a04e9533cf':
  Create new Navigation Bar for the Theme Editor Preview
2016-01-05 14:21:04 +00:00
Wale Ogunwale
66d2dd686e Fix build breakage.
Change-Id: I694a885e705d2543e671fd2809bbb518176c3804
2016-01-04 17:54:26 -08:00
Alex Klyubin
31ffb44241 No need to pass digest of AndroidManifest.xml around.
When an APK is being installed, the full path to the file is
occasionally passed between processes. To detect changes to the file
during these handovers, the digest of the AndroidManifest.xml entry
could be passed around as well.

This security feature is no longer used and is no longer needed. APKs
should be installed using the modern Package Installer API
(android.content.pm.PackageInstaller).

Bug: 24542768
Change-Id: I2762634c85448e7adcd47ffc9a5294c021e127bd
2016-01-04 12:31:29 -08:00
Jerome Gaillard
3b90b74cf9 Create new Navigation Bar for the Theme Editor Preview
The standard navigation bar was not working well in the Theme Editor preview
when in a wide configuration. The bar then did not fit entirely inside the display.
So we created a new Navigation Bar to use in the Theme Editor preview, that fixes
the size problem.

Bug: http://b.android.com/198179
Change-Id: Ifb1fa7b8f399f17392934de89078696337eca3e1
2016-01-04 15:38:12 +00:00
Narayan Kamath
f59c02a65e Merge changes from topic \'aosp-merge-24-12\'
am: e0e81bf407

* commit 'e0e81bf407508ec096c752948f8794af5fd480ca':
  Special case system_server to not create the JIT code cache.
  Don't use IntegralToString
  Track libcore commit 85d69e16fe1e59e50c1ad228e754abf325088362.
  Track API changes to java.lang.ref.Reference.
  Remove merge markers from preloaded-classes
  Move StrictJarFile from libcore to framework
  Switch RecoverySystem impl to use sun.security.pkcs
  API update for OpenJdk based libcore
  Use libcore/known_oj_tags for the javadoc stage.
  Stop preloading fortress classes
  Use HexDump instead of java.lang.IntegralToString
  Add core-oj to the list of core library jars.
2015-12-24 04:07:42 -08:00
Piotr Jastrzebski
62ed63185c 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 commit cfa292e1dad184648bf673167f3f35b4fb34fc93)

Change-Id: Iba481c3df029902a2bd0f9661d0819f4a191b2aa
2015-12-22 13:10:55 +00:00
Andrei Stingaceanu
1e2839188f Wire call to suspend a package
Adds APIs in DevicePolicyManager and PackageManager for allowing
a device admin to suspend a package. PackageManagerService sets
or unsets a new PackageUserState 'suspended' setting. Terminal
command to suspend/unsuspend has been added via
PackageManagerShellCommand (as root).

Next steps:
* use the new 'suspended' setting for denying access to start app
(probably in ActivityStackSupervisor)
* broadcast a PACKAGE_(UN)SUSPENDED intent for launchers to pick up
* remove app from recents (go further and kill it if it is running)
* erase existing notifications for this app

Bug: 22776576
Change-Id: I718b3498f6a53cc0c6fdfb6d15031e53ddca4353
2015-12-16 18:14:14 +00:00
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
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
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
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
Diego Perez
2ee825f507 resolve merge conflicts of 956cad8870 to master.
Change-Id: Iebad149b2768bcd7a52ee2c7c8c260a9279d1742
2015-12-02 00:04:08 +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
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
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
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
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
Deepanshu Gupta
adca23bb4c Merge "Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""" into mnc-ub-dev am: 35f7562495 am: 2d887558df
am: 0627cd0c40

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

* commit '4d9df358ec847262872c09962105537be350f8fd':
  Revert "Update StaticLayout_Delegate to use new nLoadHyphenator"
2015-11-20 01:53:43 +00:00
Vladislav Kaznacheev
dd311b2598 Merge "Revert "Fix broken build"" 2015-11-19 22:50:49 +00:00
Vladislav Kaznacheev
4a13b87092 Revert "Fix broken build"
This reverts commit 88d753291c834c41ad6c9229082146be72cf8014.

Revert required because the base class change
has been reverted in http://ag/816441

Change-Id: Iee8a8272bda0a92aed8ae46af8439910d8f1ecdc
2015-11-19 22:50:33 +00:00
Deepanshu Gupta
35f7562495 Merge "Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""" into mnc-ub-dev 2015-11-19 20:49:55 +00:00
Deepanshu Gupta
66098964e2 Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""
This reverts commit 65a834980cdbb9407a3f27e48cd0a8c472182cd6.


The original revert was only for cherry-pick to release
branch.

Change-Id: Ib78f9a06ce49681c767f65b262058f18a670e38e
2015-11-19 20:49:35 +00:00
Deepanshu Gupta
8c971ae5a0 Merge "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator"" into mnc-ub-dev 2015-11-19 20:48:52 +00:00
Deepanshu Gupta
65a834980c Revert "Update StaticLayout_Delegate to use new nLoadHyphenator"
This reverts commit 631c2ffd6ff1bfa7463d29a39a7ee74be019b3f9.

The revert is only for cherry-pick back to mnc-sdk-release.

Change-Id: I42cb392528b7890b58d689c732f90c3b9ba5f74c
2015-11-19 20:47:26 +00:00