Commit Graph

9650 Commits

Author SHA1 Message Date
Abodunrinwa Toki
4cf097cf78 Merge "Introduce TextAssistant for Smart Text Share feature." 2016-11-23 16:29:42 +00:00
Ian Pedowitz
a53e2bc3c0 Merge "Revert "Move Resource creation out of ContextImpl constructor"" 2016-11-22 21:30:01 +00:00
Adam Lesinski
304321ed8d Revert "Move Resource creation out of ContextImpl constructor"
This reverts commit 16efc5e68d.

Caused issue with device protected settings: http://b/33066012

Change-Id: Ib485bed68ea8ac199d553b666c18d048a5624c98
2016-11-22 19:41:55 +00:00
Jean-Michel Trivi
6d5723fe4e Merge "Define stream type for accessibility volume control" 2016-11-22 16:28:48 +00:00
Abodunrinwa Toki
d0d9ceb30c Introduce TextAssistant for Smart Text Share feature.
Bug: 30982298
Test: CTS tests to be added in a follow up CL.
Future CLs will add implementation detail.

Change-Id: Iad550447a4b3552340c0ada75fda60f97f0913aa
2016-11-22 14:41:16 +00:00
Neil Fuller
3dfca02da4 Merge "Change EXTRA_TIME_PREF_24_HOUR_FORMAT from boolean to int" 2016-11-22 11:55:27 +00:00
Jean-Michel Trivi
3f0945a608 Define stream type for accessibility volume control
New stream type for accessibility volume.
Add related appOps.

Test: see added CTS tests in AudioManagerTest & Stub
Bug 30448020

Change-Id: I34f96713b22fedf75322b8ffe2b96a7c566f5009
2016-11-21 15:15:45 -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
Neil Fuller
b7146fec0d Change EXTRA_TIME_PREF_24_HOUR_FORMAT from boolean to int
... on Intent.ACTION_TIME_CHANGED.

This is to better represent the possible settings values for
the "use 24 hour format" setting. These are "12" (use 12 hour
formatting), "24" (use 24 hour formatting), unset
(use locale default formatting).

The EXTRA_TIME_PREF_24_HOUR_FORMAT for the ACTION_TIME_CHANGED
is now an int, not a boolean. 0 means "12", 1 means "24" and
2 means "use locale default". This is not a backwards compatible
change but the EXTRA_TIME_PREF_24_HOUR_FORMAT is not public
and so should only affect platform code that generates or
consumes the intent like settings code.

There are associated changes to Settings code to update the source
of the Intent.

The related underlying code that is triggered in response to the
intent and previously assumed a boolean now takes a Boolean.

Other changes:

The ActivityManagerService now only sends a binder notification
to running services if the EXTRA_TIME_PREF_24_HOUR_FORMAT
is present. There is an example of ACTION_TIME_CHANGED
being sent from the platform (AlarmManagerService, when the system
clock is noticed to have changed independently of the RTC) that
does not set the extra and would previously have misinterpreted
to mean "user wants 12 hour formatting", which would have been a
bug.

i.e. the code from ActivityManagerService that would interpret the
missing extra as false:

final int is24Hour =
        intent.getBooleanExtra(
                Intent.EXTRA_TIME_PREF_24_HOUR_FORMAT, false) ? 1 : 0;

Some methods and constants have be renamed to better reflect their
use.

Bug: 32761619
Bug: 32933009
Test: Manual testing
Change-Id: Ie7e9c62ce65e7e3a056b2751b45fe6cb9de86498
2016-11-21 12:22:32 +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