Commit Graph

7814 Commits

Author SHA1 Message Date
Clara Bayarri
ac6f034f2a Rename requestKeyboardShortcutsHelper
Per API council feedback

Bug: 28775576
Change-Id: I1c4f98d7ec0d848f0c387aaedf8a0ed80628c64e
2016-05-16 14:15:14 +01:00
Narayan Kamath
8995b00ce8 LoadedApk: Avoid unnecessary work when mIncludeCode == false.
We don't need to set up JIT profiles and register usage etc when
the package context we're trying to construct doesn't request code.

This will correct accounting for packages which are only used for
resources.

bug: 28519185
Change-Id: I849675efa76c8100ae937de478b52254babe384c
2016-05-16 10:39:08 +00:00
Andrew Solovay
f975b74c0c docs: Updates to multi-window and related docs. am: 4d93a21980 am: 8263d6c0a3 am: c88130c572
am: d29c26073e

* commit 'd29c26073e97e4c6e7825641cf6e76720df395e3':
  docs: Updates to multi-window and related docs.

Change-Id: Ic4be60debb41d074d717bfb0989125299428831a
2016-05-13 22:08:17 +00:00
Andrew Solovay
d29c26073e docs: Updates to multi-window and related docs. am: 4d93a21980 am: 8263d6c0a3
am: c88130c572

* commit 'c88130c5724227b3ba7ef0b5ef4476fedabca650':
  docs: Updates to multi-window and related docs.

Change-Id: I308c988e3a93737a478f9f2445b512e86f218643
2016-05-13 22:03:15 +00:00
Adam Powell
e30299f990 Add Fragment#onAttachFragment for parent fragments
Framework edition

Add a matching onAttachFragment method to Fragment to match the
fragment host version.

Bug 28760393

Change-Id: I5f50b3446449cae7110da6b4e468ee80f413e1e5
2016-05-13 13:38:45 -07:00
Andrew Solovay
4d93a21980 docs: Updates to multi-window and related docs.
Clarified behavior when activity is resized or put in fullscreen
mode, per b/28580007 . Also (per email from o-o) removed misleading
statement about when onStop() might or might not be called.

Both changes can go live now (multiwindow update applies to DP1 & 2,
and onStop() clarification applies to all versions of API), so I'll
submit as soon as this is approved.

See first comment for doc stage location.

bug: 28580007
Change-Id: Ib008f24e5796ec7810b67c91e512e679680d4afd
2016-05-13 13:33:55 -07:00
Andrii Kulian
4ef107bb7a Merge "Close leaked windows when trying to preserve main one" into nyc-dev 2016-05-13 03:24:34 +00:00
Jesse Hall
7f0708390b Merge "Move Vulkan layer path setup to ApplicationLoaders" into nyc-dev 2016-05-12 21:13:26 +00:00
Adrian Roos
11c8f5315b Merge "DPM control for remote input when locked" into nyc-dev 2016-05-12 20:52:26 +00:00
Andrii Kulian
eac0ea5cdf Close leaked windows when trying to preserve main one
When app has several windows and activity is relaunched + we try to preserve
main window - other windows just stayed around until removed by timeout or
replaced by app. There was a problem when one of the windows registered
broadcast receiver and set its own timer to remove it. In this case all
receivers were removed by framework because windows were considered leaked
and apps' timer caused crash when trying to remove registered receiver.

This CL removes all windows expect the main one, which we're trying to
preserve in this case.

Bug: 28337135
Change-Id: Ib8790cc8c61801f11d871ba3803bb0ebc3d3be01
2016-05-12 13:37:05 -07:00
Chris Wren
3041d49d88 Merge "document the return type of getImportance" into nyc-dev 2016-05-12 12:53:51 +00:00
Dimitry Ivanov
0997908c95 Move Vulkan layer path setup to ApplicationLoaders
ThreadedRenderer was never the right place for this anyway, and
ApplicationLoaders can provide both the full library search path (not
just the extracted native library dir) as well as the application loader
namespace.

Bug: 28213888
Change-Id: Ibcc0a9178da4dba6f3f3105932fdac1a1d0261af
2016-05-11 22:59:10 -07:00
Adam Powell
467cc6f0e1 Less lazy child FragmentManager creation
Framework edition

Fix a bug where child FragmentManagers moving too lazily into the
CREATED state and beyond caused child fragments to not be
attached/created when expected.

Bug 25019275

Change-Id: I04ff0d3bcb693178a6ee3057da591392defdbcf8
2016-05-11 13:45:33 -07:00
Adrian Roos
7f06eed7f5 DPM control for remote input when locked
Bug: 26981262
Change-Id: I84f26ebe807e89fd56ffc3bbc7fc20f12e2f7391
2016-05-11 19:54:09 +00:00
Chris Wren
5ab5c748a8 document the return type of getImportance
Bug: 28690726
Change-Id: I06508e9e7c38e26e84801b86d6974f01abf5dfc1
2016-05-11 12:44:58 -04:00
Todd Kennedy
f09f069936 Merge "Fix secondary ABI instrumetion" into nyc-dev 2016-05-11 14:35:19 +00:00
Amith Yamasani
a66d395490 Merge "Fix multi-window assiststructure trashing" into nyc-dev 2016-05-10 22:29:20 +00:00
Todd Kennedy
e713efcac1 Fix secondary ABI instrumetion
When installing an APK that supports multiple ABIs, the ABI installed
can be forced to the secondary ABI [i.e. On devices that support both
32 and 64 bit variants, the 32-bit version can be forced when it's
the secondary ABI.] In this case, instrumenting the class always tried
to use the primary ABI. Instead of blindly using the primary ABI and
dropping the secondary ABI, we propagate both ABIs and make a
decision on which one should be chosen.

Bug: 28406240
Change-Id: I7ebb2fd264d2281912afd30f6d73ccb460f9cf85
2016-05-10 15:16:13 -07:00
Adam Powell
56e2aeba8f Merge "Move Activity multi-window event logic out of the public methods" into nyc-dev 2016-05-10 21:34:29 +00:00
Winson
7c40291b0a Reducing the number of recent tasks we keep.
- This should decrease the time it takes to fetch the recent task list,
  and also reduce the number of tasks we store on-disk.
- Since a user can still open a fair number of tasks within the 
  time-window, and this list includes tasks that are excluded from the 
  UI, we are just reducing it to about half for the time being.

Bug: 28318359
Change-Id: Ie21b3d3d09a567007015fbbecaf914123c71cc06
2016-05-10 21:01:33 +00:00
Antonio Cansado
6965c1869a Addressing API council comments on NetworkStatsManager.
Callbacks
 - DataUsageCallback renamed to UsageCallback
 - DataUsagePolicy removed; passing in params directly to register method
 - making it an abstract class
 - passing in (networkType, subscriberId) that reached its threshold
 - renaming onLimitReached to onThresholdReached to match existing naming
 - only monitor single network,subscriberId
 - no monitoring of specific uids; using device or user wide instead

Tags
 - only owner uid can read its tags
 - exposing only TAG_NONE to match service side

BUG: 27530098

Change-Id: I2b2664da71806868a1e937d2bf4d1f234637509b
2016-05-10 13:24:16 -07:00
Andreas Gampe
a8f51e3e46 Merge "Frameworks/base: Shorten system property" into nyc-dev 2016-05-10 19:55:43 +00:00
Andreas Gampe
eff0639345 Frameworks/base: Shorten system property
Otherwise it's too long.

Bug: 26877591
Change-Id: I741186a9fbea6ee50df6cef58d528ec58662c772
2016-05-10 12:52:53 -07:00
Amith Yamasani
4f128e4d96 Fix multi-window assiststructure trashing
When multiple activities within the same process
try to handle requests for AssistStructure, the
singleton mLastAssistStructure tends to trash
the old structure when a second window's request
comes in.

This change passes in a sessionId so that the
cache is only cleared if the session id changes.

Bug: 28348867
Change-Id: I07efcd933db7e48aefd25a1c95493b71bbcffe4b
2016-05-10 12:17:51 -07:00
Dimitry Ivanov
eb96b00382 Simplify permitted-path construction
The white list of permitted directories is applied for every
classloader namespace by libnativeloader. LoadedApk no longer
needs to do that.

Add mDataDir to permitted paths in the case if for any reason
it is outside of the whitelisted dirs.

Bug: http://b/28639227
Change-Id: I5b61ac64e281ecee3e3e9b1fe56cf04dc6ee7b25
2016-05-10 10:51:40 -07:00
Andreas Gampe
0f03a01ca3 Frameworks/base: Make profile buffer adjustable
Add a debug system property to change the profile buffer size.

Bug: 26877591
Change-Id: Idd13f2bc6563fd88daadd1d6679f3243dab1a0ef
2016-05-09 21:05:12 -07:00
Adam Powell
858cf036a3 Move Activity multi-window event logic out of the public methods
Move the logic for dispatching multi-window mode change events to
fragments and the activity window out of the public API onFoo methods
meant to be overridden by apps. This prevents problems if an extending
class forgets to call super.onFoo in these methods and removes the
need for doing so.

Bug 28667205

Change-Id: Ibf4c543e22b95753e1e4812bbd3e81f7648de54d
2016-05-09 15:45:37 -07:00
Svetoslav Ganov
ba83e90e18 Merge "Properly map runtime permissions to app ops" into nyc-dev 2016-05-06 23:08:31 +00:00
Chris Tate
0588954071 Merge "Move the 'pretend idle jobs can run now' broadcast into AMS" into nyc-dev 2016-05-06 21:34:52 +00:00
Christopher Tate
27d92e4e39 Move the 'pretend idle jobs can run now' broadcast into AMS
It's a protected broadcast, so sending it directly from 'am' is
no longer an option.  This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
2016-05-06 11:25:11 -07:00
Wale Ogunwale
9973294080 Dismiss docked stack if an activity is shown on top of the lock screen
It is risky/complicated to try to put the activity showing on-top of
the lock screen in the right fullscreen configuration with the current
architecture. So, we just dismiss for now.

Bug: 28195260
Change-Id: I29a0350993ce8fe548d4a465b06d877cde151c78
2016-05-06 10:13:14 -07:00
Svetoslav Ganov
eaca4c5022 Properly map runtime permissions to app ops
The code assumed mapping from a permission to an app op
is one to one but this is not always the case. For example,
READ_SMS is mapped to OP_READ_SMS and OP_READ_ICC_SMS which
resulted mapping the READ_SMS permission to the OP_READ_ICC_SMS
instead of OP_READ_SMS resulting in a failure to find the op
name given the permission.

This breaks the AppOpsManager.permissionToOp() API for READ_SMS
returning null instead of OPST_READ_SMS. The consequence of this
is that the apps that proxy permission protected operations may
let the operations for READ_SMS go through as they would get a
null app op, i.e. no app op while there is one and it can be
disabled for the caller.

bug:28620132

Change-Id: I92f8ef375ae2122b7266c50653ce73f3d90f4b28
2016-05-05 18:21:09 -07:00
Adam Lesinski
c1ff12eccd Merge "Fix issue where existing Activity Resources references would not update" into nyc-dev 2016-05-05 23:23:43 +00:00
Adam Lesinski
8ce4e12c73 Fix issue where existing Activity Resources references would not update
When relaunching an Activity, the DecorView and ViewRootImpl is re-used,
along with the IBinder activity token. This means that when we create
new resources, we end up just updating the base Activity resources.

However, we would set the configuration to the new requested override
config and then proceed to update existing Resources references, which
would return immediately due to the equality check for configuration
updates.

This change pushes the setting of the new override config to the
updateResourcesForActivity method, which will properly update Resources
references that are held in the re-used DecorView.

Bug:27915587
Change-Id: I113007a40fa464b8a234b073dcf851e16fee0177
2016-05-05 23:08:09 +00:00
Vladislav Kaznacheev
7d2a0a0571 Merge "Add @TestApi to ActivityOptions.setLaunchStackId" into nyc-dev 2016-05-05 23:04:49 +00:00
Christopher Tate
c5be8f8a4b Correct docs about what is ignored in full-data backup
You can't back up content in e.g. getNoBackupFilesDir() even if your
app explicitly tries to.

Bug 28321431

Change-Id: Ifa2a4bc518de03aba4c8809e60d8bb90fce767f8
2016-05-05 22:20:46 +00:00
TreeHugger Robot
ea162c3c79 Merge "Prepare to replace windows across recreate()." into nyc-dev 2016-05-05 19:38:17 +00:00
Vladislav Kaznacheev
acf147e7e3 Add @TestApi to ActivityOptions.setLaunchStackId
Bug: 28506739
Change-Id: I20fe4d080c125b38a84d9832a497340f805e82e7
2016-05-05 09:32:27 -07:00
Rubin Xu
0fb6b9e18c Guard retrievePreRebootSecurityLogs with config flag
Bug: 28160645
Change-Id: Ifce884c319019758dfaaa39bc239e9f30962c920
2016-05-05 12:00:50 +01:00
Ruben Brunk
01d232988a Merge "Update VR API docs." into nyc-dev 2016-05-04 23:35:44 +00:00
TreeHugger Robot
5f81a3f84c Merge "Make sure to pause activity before stopping" into nyc-dev 2016-05-04 20:28:51 +00:00
Robert Carr
77bdfb512f Prepare to replace windows across recreate().
When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
2016-05-04 12:40:39 -07:00
Wale Ogunwale
5dc6d6551e Make sure to pause activity before stopping
In some cases it is possible for activity manager to request
a resumed activity to stop when it's visibility changes. This
is a valid transition, however we need to make sure to pause
the activity on the client side before stopping it so lifecycle
transition works as expected.

Bug: 28574036
Change-Id: I759b38bbd1c9c3bb0475759bcb638d8223fa504d
2016-05-04 11:46:29 -07:00
Robin Lee
7ec93a1ee2 Merge "Add lockdownEnabled parameter to always-on VPN API" into nyc-dev 2016-05-04 18:38:30 +00:00
TreeHugger Robot
ec07352007 Merge "Clear active requests on switching voice interactor" into nyc-dev 2016-05-04 00:13:30 +00:00
Amith Yamasani
eeed06c108 Clear active requests on switching voice interactor
When voice interactor goes null or changes, cancel all existing
active requests and clear them so that they can be re-submitted.

Bug: 28487567
Change-Id: Ibcf024efcc81ff18ef3babfa9a169292207bc816
2016-05-03 15:07:03 -07:00
Dimitry Ivanov
a31657911c Merge "Allow apps to load libraries from under /data" into nyc-dev 2016-05-03 20:00:39 +00:00
Dimitry Ivanov
bf3b5f7a18 Allow apps to load libraries from under /data
Allow all application classloaders to load native
libraries from anywhere under /data

Bug: http://b/26954419
Change-Id: I8a808bcdf4a00f7d40b513d4e2ca3d1e76c0909f
2016-05-03 11:34:58 -07:00
Robin Lee
dc67971a99 Add lockdownEnabled parameter to always-on VPN API
Allows callers to opt-out of blockading network traffic during boot and
on VPN app failure.

Bug: 26694104
Change-Id: Ibfbd43ad09a25f2e38053fcd6306df3711f8bde2
2016-05-03 13:24:42 +01:00
Ruben Brunk
927d3453d3 Update VR API docs.
Bug: 28526281
Change-Id: Iff48d02a2fee542c5ded7fc8cd6cf74957eb738c
2016-05-02 19:30:51 -07:00