Commit Graph

9643 Commits

Author SHA1 Message Date
George Mount
4efeb4f4d4 Fix NPE when a shared element doesn't have a matching transitionName.
Bug 33053923

Also added an early error check when the same shared element is
used for multiple shared elements in the source or target fragment.

Test: If5dfbac66cfd9e60660439ce5c519547de3ef1d0

Change-Id: Iac3ab8c1b8ea0208a0c76e043654184dd634948d
2016-11-21 17:30:11 -08:00
Adam Lesinski
7f79e1e476 Merge "Move Resource creation out of ContextImpl constructor" 2016-11-21 22:56:18 +00:00
Nancy Zheng
40cd8e410d Merge commit '2a12d8520ea6f41bd2db8577a8da82204e341c51' into manual_merge_2a12d85
Test: compiled everything, CTS verifier passes
Change-Id: I96641860890e413342bcb6a3b24e87d6aeff0c99
2016-11-21 12:58:16 -08:00
Nancy Zheng
2a12d8520e Fix createConfirmDeviceCredentialIntent for wear for CTS. am: 43f166dfb4
am: a2193c0b76

Change-Id: I9f216231ff600972e3ddec195158fc2489693a1e
2016-11-21 18:25:12 +00:00
Torne (Richard Coles)
2c0dc3e094 Merge "Precreate the classloader for the WebView." am: 566b1c80e4 am: 1feb782f01 am: 9565860b08
am: 7e17c6b0f1

Change-Id: Ie512327827e48319b3244a8d3041cb78538109d3
2016-11-21 17:18:55 +00:00
Torne (Richard Coles)
9565860b08 Merge "Precreate the classloader for the WebView." am: 566b1c80e4
am: 1feb782f01

Change-Id: Iec0bf848e4c25afc6a6b9ee83339a03f314adee9
2016-11-21 17:08:46 +00:00
Torne (Richard Coles)
1feb782f01 Merge "Precreate the classloader for the WebView."
am: 566b1c80e4

Change-Id: Ic79079748dae515cb8d89ef99148755ac65f1d47
2016-11-21 17:04:22 +00:00
Treehugger Robot
566b1c80e4 Merge "Precreate the classloader for the WebView." 2016-11-21 16:54:53 +00:00
Jeff Sharkey
ca50c360bf Merge "Check provider access for content changes." 2016-11-21 16:19:43 +00:00
Torne (Richard Coles)
3b6ca99b10 Precreate the classloader for the WebView.
We want to create the classloader for the WebView in advance in the
zygote so that it can preload Java and native code for its children, but
the zygote can't talk to the package manager (so doesn't have a
PackageInfo for the APK) and also doesn't have an ActivityThread, so
constructing a LoadedApk is difficult.

Instead, we use the fact that ApplicationLoaders contains a
process-global cache of classloaders for APKs, and prepopulate a cache
entry without constructing a LoadedApk. This requires making
ApplicationLoaders public. To calculate the correct library paths from
the information the zygote has, we reuse the logic in LoadedApk (which
is already public, and just needs a small change to allow a null
ActivityThread when checking for instrumentation).

The other parameters for classloader creation (target SDK, bundled app,
etc) are hardcoded to usable values for the WebView's case. WebView
never needs to use any system libraries that aren't public so claiming
it's not bundled is fine even when that isn't actually true, and WebView
will always target the current platform API level.

Once the classloader is created, look up the factory class and call
preloadInZygote on it to give it a chance to preload the native library
and do other shared initialisation.

Bug: 21643067
Test: enable multiprocess WebView, examine librank output to see sharing
Change-Id: I696ead637e3f7382bcc58cfaf61eac5921862015
2016-11-21 15:04:13 +00:00
Nancy Zheng
43f166dfb4 Fix createConfirmDeviceCredentialIntent for wear for CTS.
Bug: 33000237
Change-Id: I1fdb5a518c41ab005f12d3142763e374b38d7553
2016-11-18 18:15:09 -08:00
Adam Lesinski
16efc5e68d Move Resource creation out of ContextImpl constructor
Resource creation is going to get much more nuanced
than just passing in a static set of paths, so move
the creation of Resources out to where the context
of the creation is more easily understood.
Test: Existing CTS tests pass

Change-Id: If5d79e0f84a111790c15a7b44db3f44c75e7141c
2016-11-18 18:13:55 -08:00
TreeHugger Robot
c58e7899be Merge "Define getLooper() method" 2016-11-18 23:06:15 +00:00
Adam Powell
cd09af7282 Merge "Fix FragmentManager.FragmentLifecycleCallbacks scope" 2016-11-18 22:18:42 +00:00
Julia Reynolds
f22d457eeb Merge "Prioritize channel sound & vibration settings." 2016-11-18 22:12:28 +00:00
Todd Kennedy
63d7a9dd6a Define getLooper() method
The default implementation uses the main looper to handle service
operations. This is generally okay until we have to make network
calls to retrieve resolution data.

Bug: 25119046
Test: manual
Change-Id: I22b0f279e6c1fde21f207578d2930ab4858bbc78
2016-11-18 12:55:41 -08:00
Sudheer Shanka
12b3f27e1c Merge "Remove transaction ids in IActivityManager.aidl." 2016-11-18 18:55:41 +00:00
Julia Reynolds
0c299d4d63 Prioritize channel sound & vibration settings.
Unless the app is not targeting O and the user hasn't set
a preference in Settings.

Also apps no longer need the vibration permission to vibrate with
a notification.

Test: runtest systemui-notification
Change-Id: Ia84b1c97d13cb479db07035ca622b1fe52261329
2016-11-18 09:29:26 -05:00
TreeHugger Robot
29993074b0 Merge "Keep track of admin actions for DO disclosures" 2016-11-17 21:40:46 +00:00
TreeHugger Robot
3613a0caee Merge "Wire up PM.getInstalledApplicationsAsUser(flags, userId) as hidden API" 2016-11-17 21:34:08 +00:00
TreeHugger Robot
5bec219934 Merge "Phase-2 API takes a hostname" 2016-11-17 20:39:54 +00:00
Adam Powell
74827260a8 Fix FragmentManager.FragmentLifecycleCallbacks scope
Static class is much more useful here.

Bug: 32938039
Test: n/a
Change-Id: I0010fde25e3b2a4f59b360c0035505c831c07c53
2016-11-17 12:20:26 -08:00
Bartosz Fabianowski
b21b241f0f Keep track of admin actions for DO disclosures
This CL adds bookkeeping to DPMS which will allow us to tell the user
in the Settings UI whether/when the admin requested a bug report or
retrieved logs from the device.

Bug: 32692748
Test: Full DevicePolicyManagerTest unit test coverage; end-to-end tests
        will follow as Settings CTS verifier tests

Change-Id: I89728fce4b7e0ff061b354c73caf3742e95a3a3e
2016-11-17 20:52:03 +01:00
Sudheer Shanka
d9a42f2e2c Merge "Remove transaction ids in IApplicationThread." 2016-11-17 19:49:39 +00:00
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
Todd Kennedy
194e4eeb0e Phase-2 API takes a hostname
For phase-2, instead of taking a hash prefix, we will send the
hostname to the resolver.

Bug: 25119046
Test: build & install the sample resolver and run 'adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://www.tripadvisor.com/Tourism-g33020-San_Jose_California-Vacations.html"'
Change-Id: I6e621139e182f9a9cfcf608c26d4763f1379bdb2
2016-11-17 10:56:37 -08:00
Jeff Sharkey
923e0b8811 Check provider access for content changes.
For an app to either send or receive content change notifications,
require that they have some level of access to the underlying
provider.

Without these checks, a malicious app could sniff sensitive user data
from the notifications of otherwise private providers.

Test: builds, boots, PoC app now fails
Bug: 32555637
Change-Id: If2dcd45cb0a9f1fb3b93e39fc7b8ae9c34c2fdef
2016-11-17 10:45:55 -07:00
Jeff Sharkey
0bf53b162a Merge "Yet another interface that should be oneway." 2016-11-16 23:31:32 +00:00
Jeff Sharkey
55079a9ec2 Yet another interface that should be oneway.
Test: builds
Bug: 32715088
Change-Id: I85e90733454bdd7bccb06e29625a61f93153fea4
2016-11-16 14:18:10 -07:00
TreeHugger Robot
c05077fc7a Merge "Fix bugs around inflated child fragments Framework edition" 2016-11-16 21:00:33 +00:00
Adam Powell
bb3aa34055 Fix bugs around inflated child fragments
Framework edition

* Ensure that a fragment that has had its view destroyed has a chance
  to recreate it.

* Clear mInLayout after views are destroyed

* Make sure that when a fragment is restored from the back stack and
  reinflates its view that child fragments from fragment tags are
  reconnected properly.

Bug: 32691935
Test: cts
Change-Id: I370d6db46e72fd8ac35f716e2130b9e10b93b1da
2016-11-16 10:34:57 -08:00
TreeHugger Robot
b11f283088 Merge "Use safe access to OnPreDrawListener." 2016-11-16 17:20:07 +00:00
George Mount
f0b46b9540 Use safe access to OnPreDrawListener.
Bug 32472451

It is important to remove an OnPreDrawListener from the correct
ViewTreeObserver. When a View is added to the view hierarchy, the
initial ViewTreeObserver is not active. The listener must then be
removed from the current OnPreDrawListener. When a View has been
removed from the hierarchy, it is important to remove the listener
from the orignal ViewTreeObserver.

Test: cts-tradefed run singleCommand cts -d --skip-preconditions
--skip-connectivity-check -m CtsUsageStatsTestCases
Test: cts-tradefed run singleCommand cts -d --skip-preconditions
--skip-connectivity-check -m CtsFragmentTestCases

Change-Id: I735f71d2d9c84e86ef846aab0088a8651300fbe8
2016-11-15 15:00:53 -08:00
Sudheer Shanka
2250d56a0b Rename MountService to StorageManagerService.
Bug: 30977067
Test: Existing tests pass
Change-Id: Ieac0f11c2b249dcd60441b14c1f391e6f8131d42
2016-11-15 12:43:37 -08:00
TreeHugger Robot
42ec0ad8ba Merge "Don't update fragments if the manager's state doesn't change." 2016-11-15 18:44:46 +00:00
Andrii Kulian
53ad29fe53 Merge "Add API to launch activities on secondary displays" 2016-11-15 18:27:39 +00:00
Andrii Kulian
16802aab21 Add API to launch activities on secondary displays
displayId can be specified as a part of ActivityOptions.
We will look for a valid stack on the specified display, starting
from the topmost one. If no valid stack is found, new dynamic stack
can be created on external display.
Launch stack and display id can't be set at the same time, otherwise
exception will be thrown.

Test: ActivityManagerDisplayTests
Test: #testLaunchActivityOnSecondaryDisplay
Test: #testConsequentLaunchActivity
Test: #testConsequentLaunchActivityFromSecondaryDisplay
Test: #testLaunchActivityFromAppToSecondaryDisplay
Change-Id: I8a202bc076319e23948d81b99a2c68d7b733b5e4
2016-11-15 17:18:32 +00:00
Neil Fuller
c423d00016 Merge "Correctly handle when the user has no explicit time_12_24 setting" am: 8631e19d38 am: 98f03f4980 am: ef34053f26
am: 9103632f9d

Change-Id: I3b2b8355d80dca87a09ef97027753bcd568cff14
2016-11-15 17:11:40 +00:00
Neil Fuller
ef34053f26 Merge "Correctly handle when the user has no explicit time_12_24 setting" am: 8631e19d38
am: 98f03f4980

Change-Id: Ia6592370da446e43896fb56d12f734841e137d49
2016-11-15 16:57:32 +00:00
Neil Fuller
98f03f4980 Merge "Correctly handle when the user has no explicit time_12_24 setting"
am: 8631e19d38

Change-Id: I70533c5ff4ac8cdeef1b42337bb47b09c8bbf927
2016-11-15 16:50:29 +00:00
George Mount
687e550042 Don't update fragments if the manager's state doesn't change.
Bug 32610133

A change in behavior was introduced in which the dispatch* methods
moved the state of the manager's fragments even when the manager's
state doesn't change.

Test: I88f5a3313ad05429167c417b840f888f86fd1c11

Change-Id: Ie260b1c57fae505b2636ff7572a493a92449dff4
2016-11-15 08:43:57 -08:00
Neil Fuller
8631e19d38 Merge "Correctly handle when the user has no explicit time_12_24 setting" 2016-11-15 16:39:42 +00:00
TreeHugger Robot
5ddd7172b1 Merge "Enforce line-wrapping in DeviceAdminReceiver.java" 2016-11-15 15:28:48 +00:00
Sudheer Shanka
3052f85a1c Remove transaction ids in IApplicationThread.
No need of transaction ids here (no callers on native side).

Bug: 30977067
Test: N/A
Change-Id: I041cd721acb53f1177d8e8ea62342127431ad179
2016-11-14 18:42:24 -08:00
Sudheer Shanka
ee148f921f Remove transaction ids in IActivityManager.aidl.
Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test \
          android.server.cts
      adb shell am instrument -e class \
          com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I44c5f756db882e0400727e44264219c873e6bd02
2016-11-14 17:40:01 -08:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
TreeHugger Robot
18fe8f6359 Merge "Added a callback for AutoFillService." 2016-11-14 17:56:59 +00:00
TreeHugger Robot
2c2fb6189c Merge "Allow cross profile call between DO and PO" 2016-11-14 16:27:56 +00:00
Neil Fuller
c66ec40d38 Correctly handle when the user has no explicit time_12_24 setting
The code would previously interpret "null" (meaning the user
hasn't touched the setting in the Settings app) as meaning
"use 12 hour format". The actual meaning of "null" is
generally accepted in the platform as
"use the locale default". For example, the Settings app does
this, as does the code in libcore.icu.LocaleData. For
locales where the default is "use 12 hour format" anyway
this wasn't obvious. However, locales like Germany should
default to  24 hour, and then the setting is displayed
incorrectly in the Settings app.

Also, German devices boot for the first time with 12 hour SHORT
and MEDIUM time formats too. After the user had explicitly set
the format the setting would be correct.

There appear to be no tests for this behavior, presumably
because of the difficulty in forcing the setting to "unset"
which would have to have to happen before the app was launched,
and the fact that CTS tests run in the US locale.

Bug: 32868036
Test: Manual testing with a device set to German
Change-Id: Ifd2e8d345f6afee467d7525d6793fc8fda37c900
2016-11-14 16:06:42 +00:00
TreeHugger Robot
d43d705735 Merge "Revert "Add Build.isAtLeastO"" 2016-11-14 15:46:17 +00:00