Commit Graph

85261 Commits

Author SHA1 Message Date
Joe Onorato
c9f1a9e3dd Merge "Fix how we build the statsd protos." 2017-12-14 05:33:33 +00:00
TreeHugger Robot
4b1557d3a0 Merge "Give SliceManagerService a concept of pinned slices." 2017-12-14 04:09:55 +00:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00
Jason Monk
3706cf9e28 Merge "Add AppComponentFactory API" 2017-12-14 02:21:12 +00:00
Mohammed Khider
1f82396299 Merge "Duty Cycling and Low Power Mode GNSS feature implementations" 2017-12-14 01:16:50 +00:00
TreeHugger Robot
88a149f2f7 Merge changes Iff6557fc,Ie1686e82,I88972653,Iab60b4df,Ie25460e7
* changes:
  Handles failure for transaction queue full
  Reorganize use of error code enums
  Removes setters from NanoAppInstanceInfo
  Renames nanoapp instance IDs to handles in ContextHubService
  Creates a NanoAppStateManager at ContextHubService
2017-12-14 01:00:15 +00:00
TreeHugger Robot
b6c92f00d2 Merge "Refactor PackageParser.collectCerts() to hide signature scheme." 2017-12-14 00:04:18 +00:00
Hugo Benichi
3220790917 Merge "Extend connectivity OWNERS" 2017-12-13 23:36:51 +00:00
Yohei Yukawa
f0bd6d95b5 Merge "SoftInput flag requires focused View to show IME" 2017-12-13 23:36:41 +00:00
Jeff Sharkey
2619e8f011 Merge "Start accepting Executors instead of Handlers." 2017-12-13 22:48:03 +00:00
TreeHugger Robot
d3c1de1aef Merge "Add OWNERS for dreams" 2017-12-13 22:09:55 +00:00
gomo
48f1a64765 Duty Cycling and Low Power Mode GNSS feature implementations
Implementaion of 2 GNSS Android-P features:
- The Duty Cycling API to enable high accuracy applications development
- The Low Power Mode GNSS API to save power when indoor

Bug: 64009176
Test: Existing unit tests still pass.
Change-Id: I3ba3b86a635a54927c694fdd66a038757e843937
2017-12-13 13:38:31 -08:00
TreeHugger Robot
9513cbfa28 Merge "Fix deadlock when fetching active voice interaction service component." 2017-12-13 21:38:14 +00:00
TreeHugger Robot
2cea154e52 Merge "Make DevicePolicyManager.isAffiliatedUser public" 2017-12-13 21:12:32 +00:00
Jeff Sharkey
8439ac08b1 Start accepting Executors instead of Handlers.
After discussion in API council, our new best-practices are to have
developers provide an Executor to dispatch callbacks/listeners on,
instead of the previous guidance of using a Handler.

Define Context.getMainExecutor() to easily obtain an Executor
associated with the main thread of application.  This allows new
APIs to require a @NonNull Executor.  Also define a new
@CallbackExecutor auto-doc annotation that explains background and
points developers at new Context method above.

Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.cts.ContextTest#testMainLooper
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.cts.ContextTest#testMainExecutor
Bug: 70348426
Change-Id: I536892bcd80fcfba1bb1ddf67648c08a26d7ddd2
2017-12-13 13:59:04 -07:00
Jason Monk
a80bfb5d55 Add AppComponentFactory API
API to allow some classloader control over instantiation of
items from application's manifest. Unlike the first attempt
this does not encourage developers to extend Application, it simply
provides a small surface to allow control over the creation of objects
like Activities, Services, Receivers, and Providers.

Test: manual
Bug: 70623879
Change-Id: Idcab7c60f54ce3f4575ac29dcdcae321cf458bf3
2017-12-13 15:36:26 -05:00
Dan Cashman
e92f8428dd Refactor PackageParser.collectCerts() to hide signature scheme.
PackageParser shoudln't really need to know the gory details of APK
verification, it should just get back the blobs it needs to do its
job.  Move the package verification into its own class which is
*almost* exclusively responsible for verifying app signatures. This
is in preparation for adding APK signature scheme v3, which will add
yet another way to do this.

Bug: 64686581
Test: Builds 'n' boots without issue.
Test: android.appsecurity.cts.PkgInstallSignatureVerificationTest passes.
Change-Id: Ieb76b2353bd44ffdb83e7b894e5ad720d1697dc7
2017-12-13 12:20:21 -08:00
Jason Monk
74f5e36f49 Give SliceManagerService a concept of pinned slices.
Allow launcher/assistant to pin slices. Also allow other apps
with access to a slice to pin it dynamically by adding a listener
to it. Dynamic pinnings can expire when the host app dies because
the binder will no longer be alive.

Public docs and unhiding will come in a later CL with CTS tests.

Bug: 68378571
Test: runtest --path frameworks/base/services/tests/uiservicestests
Change-Id: I1dd9a839f547fc949922b766ba4b54e6d50f3125
2017-12-13 14:28:09 -05:00
TreeHugger Robot
2c2ce763b7 Merge "Add an API for setting a new brightness curve." 2017-12-13 19:19:53 +00:00
Winson Chung
bccd4b5b8e Fix deadlock when fetching active voice interaction service component.
- Notify AM whenever the active voice interaction service changes and
  dependency on VoiceInteractionManagerService from AM.

Bug: 70616466
Test: android.server.am.ActivityManagerAssistantStackTests
Change-Id: Ifd3dcbf0b6afc7b3e8a1d9d29bacd5b04af2a15d
2017-12-13 11:08:39 -08:00
Arthur Ishiguro
3504737e46 Removes setters from NanoAppInstanceInfo
Removing these fields since they are not public APIs,
and is not used internally in the service.

Bug: 67734082
Test: None
Change-Id: I8897265365849ab5d0106849e41d16577a91ead9
2017-12-13 10:57:24 -08:00
Arthur Ishiguro
fb9e4c7a7c Creates a NanoAppStateManager at ContextHubService
Created to decouple the internal nanoapp state management at the
service with ContextHubService class

Bug: 67734082
Test: Compile and flash, run CHQTS and verify pass, also verify with
logs that the cache is updated accordingly after load/unload/query
Change-Id: Ie25460e7f8d903cdcb22f0a1c4870bb93ccbad3e
2017-12-13 10:54:04 -08:00
TreeHugger Robot
3176499b0a Merge "Fix identation for switch statement." 2017-12-13 18:51:07 +00:00
Alex Chau
443b6431dd Make DevicePolicyManager.isAffiliatedUser public
- Simplified javadoc on device affiliation concept. "affiliated with the
  device" will be used to describe affiliation with device owner user,
  as defined in #isAffiliatedUser javadoc.
- Link to #isAffiliatedUser whenever device affiliation is mentioned

Bug: 67582080
Test: None
Change-Id: I4395ff980aa1626d6ff352d2f16777887784082c
2017-12-13 17:40:36 +00:00
Jeff Sharkey
6cff5c2840 Merge "API that reports first SDK level of the device." 2017-12-13 16:53:55 +00:00
Robert Berry
67ed8bb785 Merge "Move recoverablekeystore package under services" 2017-12-13 11:32:42 +00:00
Przemyslaw Szczepaniak
161614e12c Merge changes from topic "deprecated_sdk_1"
* changes:
  Reject apks targeting deprecated sdk
  Add Build.Version.MIN_SUPPORTED_TARGET_SDK_INT field.
2017-12-13 10:15:46 +00:00
TreeHugger Robot
25787529b5 Merge "Allow multiple standby buckets to be set in one IPC" 2017-12-13 04:33:39 +00:00
TreeHugger Robot
05e90071ec Merge "Add getDisallowedSystemApps to DevicePolicyManager" 2017-12-13 03:05:23 +00:00
Siarhei Vishniakou
d60090dd4c Fix identation for switch statement.
Presubmit hooks for repo are currently failing
due to the identation of the body of the switch
statement. Fix this spacing issue here.

Test: None
Change-Id: If96914a9f7345212077215502c5bf537f36e695f
2017-12-12 18:17:00 -08:00
Jack He
acfab62830 Merge "Bluetooth: Add convenience method to convert connection state to string" am: f7a69aeeab am: c57c5a9ba4
am: 061bc75d49

Change-Id: I6d8d75fdc686eebda4e0308168b956e1014b02d4
2017-12-13 01:08:26 +00:00
Jack He
061bc75d49 Merge "Bluetooth: Add convenience method to convert connection state to string" am: f7a69aeeab
am: c57c5a9ba4

Change-Id: Id9b238bb2493455650351d595e4c7d2dd5005f2e
2017-12-13 00:45:58 +00:00
Adam Lesinski
6036449709 Merge "OMS: Only allow trusted overlays to be registered." into oc-mr1-dev
am: a06854e77a

Change-Id: I9d4f214b3911fb66fd2baa8ad83e8450246c3c80
2017-12-12 23:36:57 +00:00
Treehugger Robot
f7a69aeeab Merge "Bluetooth: Add convenience method to convert connection state to string" 2017-12-12 22:41:13 +00:00
TreeHugger Robot
a06854e77a Merge "OMS: Only allow trusted overlays to be registered." into oc-mr1-dev 2017-12-12 21:48:11 +00:00
Adrian Roos
ba5aaf1867 Merge "DisplayCutout: Only dispatch to apps requesting it" 2017-12-12 21:15:59 +00:00
Jeff Sharkey
28c660f11a API that reports first SDK level of the device.
This is different from SDK_INT, which can change due to OTA
software updates.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.BuildTest
Bug: 69270887
Change-Id: Ic3f4b22b25dc08f3fbdbdf7622c953323447ea01
2017-12-12 14:11:14 -07:00
Hansong Zhang
57365515d5 Merge "Make BluetoothPbap implement BluetoothProfile (1/3)" am: 5b6b73800c am: 64d81fbf33
am: 9c6044771f

Change-Id: I0390d33d0d56b29e3632a4fe78106fcae4fcfb32
2017-12-12 19:35:42 +00:00
Hansong Zhang
9c6044771f Merge "Make BluetoothPbap implement BluetoothProfile (1/3)" am: 5b6b73800c
am: 64d81fbf33

Change-Id: I1be05324ec0134c801de08e0f60139c341261f33
2017-12-12 19:22:12 +00:00
Treehugger Robot
5b6b73800c Merge "Make BluetoothPbap implement BluetoothProfile (1/3)" 2017-12-12 19:02:25 +00:00
Alex Chau
b6a9f94d67 Add getDisallowedSystemApps to DevicePolicyManager
- The getDisallowedSystemApps is based on OverlayPacakgesProvider which
  is moved from ManagedProvisinoing
- getDisallowedSystemApps will be used by ManagedProvisioning
- createAndManageUser will now use getDisallowedSystemApps to disable
  disallowed system apps when creating users
- LEAVE_ALL_SYSTEM_APPS_ENABLED can be passed to createAndManageUser to
  enable all system apps
- ACTION_MANAGED_USER_CREATED will be broadcasted to ManagedProvisioning
  after managed user is created to take a system app snapshot

Bug: 65842187
Test: OverlayPackagesProviderTest passes
Test: Disallowed system apps does not appear in device owenr, managed
      profile, and managed users
Test: System app snapshot is created after provisinoing device owner,
      managed profile and managed users
Change-Id: I86f870f7814b5700cf5539e889fb6998514d110f
2017-12-12 18:47:29 +00:00
TreeHugger Robot
a22a7c2f97 Merge "Add DevicePolicyManager.isEphemeralUser" 2017-12-12 18:40:04 +00:00
TreeHugger Robot
659f6b2204 Merge "Fix bug when generating the textclassifier intent." 2017-12-12 17:35:25 +00:00
Yohei Yukawa
cf68d52ce8 SoftInput flag requires focused View to show IME
Historically SOFT_INPUT_STATE_VISIBLE/SOFT_INPUT_STATE_ALWAYS_VISIBLE
have not required focused editor View [1] to work.  This is easy to
use, but also easy to tell IMEs to connect to InputConnection, which
is often recognized as a bug by users because often nothing happens
when the user taps the software keyboard.

This would become more obvious when we start allowing nothing to have
focus (Bug 68841055) in Android P.

Although how we should deal with "dummy InputConnection" is still an
open question, ignoring these SoftInput flags for apps that target P+
when there is no focused editor view is probably better than the
current behavior, where non-functional software keyboard is likely to
be shown.  The user is still able to show the IME by explicitly tap
the edit field.

As an implementation note, this CL trusts the targetSdkVersion
reported from the target application process, which is in general
unsafe.  That said, for this particular purpose it is acceptable.

 [1]: focused View that returns true from View#onCheckIsTextEditor().

Bug: 69256929
Test: atest CtsInputMethodTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodUtilsTest
Change-Id: I56682c7dee71d461687b9e80ab746d382fd55e0c
2017-12-12 09:33:26 -08:00
Peter Visontay
ef1a2a4f4c Merge "Define an App Op for REQUEST_DELETE_PACKAGES." 2017-12-12 17:27:46 +00:00
Adrian Roos
2b0dcb3fd2 DisplayCutout: Only dispatch to apps requesting it
Fixes a compatibility issues, where apps that were not expecting
a cutout were dispatched one anyway, which caused the WindowInsets
dispatch to continue down the hierarchy even though the SystemInsets
were consumed by the app.

To avoid this, we pre-emptively consume the cutout for any apps that
did not request to be laid out in the cutout area. This is safe,
because for apps that don't request it, the status bar will take care
of consuming it, or they won't be laid out in the cutout at all.

If apps still need to know where the cutout is, they can query for it
via View.getRootWindowInsets().

Fixes: 65689439
Bug: 70490585
Test: atest android.view.cts.DisplayCutoutTest
Change-Id: If06674c619f095d4105be1b3a511fb5823b63d2b
2017-12-12 18:16:27 +01:00
TreeHugger Robot
ec646687c3 Merge "Add Slice.Builder#addBundle" 2017-12-12 16:44:13 +00:00
Seigo Nonaka
b507df4569 Merge "Introduce PremeasuredText" 2017-12-12 16:40:27 +00:00
TreeHugger Robot
14f9635110 Merge "Use IBinder#shellCommand() for 'adb shell ime'" 2017-12-12 14:49:25 +00:00
Jason Monk
fed72bf199 Add Slice.Builder#addBundle
Its for support lib expansion in the future, not for dev use.

Bug: 68378561
Test: atest cts/tests/tests/slice
Change-Id: Ifc73e56c391bd4abed3b8db3c597d7dc794c1a3c
2017-12-12 09:30:28 -05:00