6423 Commits

Author SHA1 Message Date
Todd Kennedy
ea2529df19 make MATCH_FACTORY_ONLY @SystemAPI
cherry-picked from I9e2046b62cb20c5b6651e91f833aff04d45d9800

Bug: 35946061
Test: None; just added an annotation
Change-Id: I604f962b9826700c335eeda9682d3354f6260c40
2017-03-28 13:42:00 -07:00
Chad Brubaker
336ae5b616 Add ACTION_EPHEMERAL_RESOLVER_SETTINGS
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86e6d5f23d82c97db32c848bc4ea2b81bc)
2017-03-28 20:34:55 +00:00
Romain Guy
026a558ab0 Update Color API
Make the class final because its instances are immutable and
it contained only static methods prior to O. Fix a couple of
typos/issues reported by external developers. Add a new variant
of getComponents() to avoid allocations, as requested by
external dev.

Test: Color_ColorLongTest
Bug: 32984164
Change-Id: I3c22e124c9fdf66142d530afa4beb05fe0669359
(cherry picked from commit 48f38f18385e8aed0df48524d8ea3d20eba9199f)
2017-03-28 18:33:47 +00:00
Andrii Kulian
e5c58eefb1 Add Configuration param to onMovedToDisplay
To be consistent with other multi-window callbacks adding
Configuration param to the onMovedToDisplay, so that app
developer can handle configuration change at the same time
when it receives a notification about move.

Bug: 36649499
Test: android.server.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I80c765473bfc09ea1fb7aa4e2e77baf3b21606b8
(cherry picked from commit 2c32a11a71e2a1602b188b710b1916d919d99edb)
2017-03-28 17:28:17 +00:00
George Mount
599be3d01e Make public getFragments() and onGetLayoutInflater() methods
Bug 34703669

Test: I71856306a7bb67aacb84be17165e7e095653c20a
Change-Id: I41999d0f5e6d75afebbbf67ad5bf49fa0cca509e
2017-03-28 16:38:08 +00:00
TreeHugger Robot
15e3d0dba8 Merge "Remove ACTION_CONFIGURE_WIFI_SETTINGS and ACTION_WIFI_SAVED_NETWORK_SETTINGS." 2017-03-28 02:14:37 +00:00
TreeHugger Robot
84d7e77ace Merge "Provide deprecated API to avoid build breakage" 2017-03-28 01:29:56 +00:00
TreeHugger Robot
31417b3ebf Merge "Deprecate Setting that is no longer used." 2017-03-28 00:45:34 +00:00
Jaewan Kim
92dea33bfe Simplify the media button handling logic
Here's the new media handling logic.

1. If the foreground app consumes the media key event
  (Activity.onKeyDown/Up() or Activity.setMediaController()),
  we stop here.
2. Find the media app whose AudioPlaybackConfiguration becomes
  PLAYER_STATE_STARTED lastly across the boot. The media app is the app
  with the media session.
  - If its session is still alive, send the media key event
    to the media session.
  - If its session has been released but the session set the media
    button receiver, send the media key event through the media button
    receiver.
  - If it has multiple media sessions, pick the media session whose
    PlaybackState matches with the AudioPlaybackConfiguration's player
    state.
3. Stop here. Don't try revive any other app.

This approach has two limitations.
1. If an app has multiple AudioPlaybackConfigurations and/or
   media sessions, the MediaSessionService may pick the wrong media
   session to send media key events.
2. If an app with a media session plays sound effects differently from
   the SoundPool class, the MediaSessionService would consider the app
   as the lastly played media app.

Bug: 33032080
Test: Manual tests as follows
  1. Checked that the lastly played app receives the media key events
     although the app's media session doesn't report its playback state.
  2. Checked that the lastly played app receives the media key events
     although the app's media session is released.
  3. Checked that the lastly played app doesn't receive the media key
     events if its playback is remote.
Change-Id: I1fd6f9eee0750da4dea9fcc7401fdb1c3f249a72
2017-03-27 14:58:43 -07:00
Amith Yamasani
53e100c468 Provide deprecated API to avoid build breakage
Restored onUtteranceRangeStart() temporarily as a deprecated API.

Bug: 36646809
Test: N/A
Change-Id: I7da927aca4f4ad1f5cc76564e8fdc4261849898b
2017-03-27 14:36:37 -07:00
Stephen Chen
31484af101 Remove ACTION_CONFIGURE_WIFI_SETTINGS and ACTION_WIFI_SAVED_NETWORK_SETTINGS.
ConfigureWifiSettings page will instead use WIFI_IP_SETTINGS intent.
Intent for SavedAccessPointsSettingsActivity is unused and can be
removed.

Bug: 34392691
Bug: 36516068
Test: make
Change-Id: I86547df387b41241d531e361014581d0763008ee
2017-03-27 13:18:27 -07:00
TreeHugger Robot
b3544c1565 Merge "MediaCas: rethrow MediaCas specific exception" 2017-03-27 20:17:15 +00:00
Lorenzo Colitti
b43504e85c Merge "Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi." am: a1e206a335 am: 37afaac70d
am: d042c3f400

Change-Id: Ic8a35c9f2d9de0b36cb7ab3f8227f0bc298d672f
2017-03-27 19:27:43 +00:00
Lorenzo Colitti
a1e206a335 Merge "Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi." 2017-03-27 19:08:25 +00:00
Amin Shaikh
3087e323ea Deprecate Setting that is no longer used.
Bug: 36526645
Test: make
Change-Id: I11cc75916c4721a8bfbe5e5f0b0f0e7baf0c4a90
2017-03-24 17:43:46 -07:00
TreeHugger Robot
84acb2e042 Merge "Added support for maxAspectRatio manifest attribute." 2017-03-24 22:42:16 +00:00
Chong Zhang
dadee0c33e MediaCas: rethrow MediaCas specific exception
Translate ServiceSpecificException from aidl to CAS-specific
exceptions. Also, throw CAS specific exception for descramble().

bug: 22804304

Change-Id: I6d68c335c87fbb95fd8cc227e432eed4e5951550
2017-03-24 14:28:43 -07:00
Wale Ogunwale
55ddf8f9e5 Added support for maxAspectRatio manifest attribute.
- Allows an app to specify the maximum aspect ratio it supports.
- Support for overriding configuration and bounds at the activity
record and app window token level.

Test: cts/.../run-test CtsAppTestCases android.app.cts.AspectRatioTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Bug: 36505427
Bug: 33205955
Bug: 35810513
Change-Id: Ib2d46ed0c546dd903d09d6bb7162a98bd390ba81
2017-03-24 13:48:40 -07:00
Dianne Hackborn
d81542cef4 Merge "Partially return NEW_PICTURE and NEW_VIDEO." 2017-03-24 17:28:59 +00:00
Jack Yu
ad2e7405ad Merge "Deprecated getDeviceId and added getMeid and getImei" 2017-03-24 17:02:59 +00:00
TreeHugger Robot
08d3cdbe48 Merge "Removing unused method indexOfValueByValue" 2017-03-24 05:05:00 +00:00
Jack Yu
e0f9f9f8ee Merge "Deprecated getDeviceId and added getMeid and getImei" 2017-03-24 02:09:49 +00:00
TreeHugger Robot
0e74c95c0c Merge "Unhide FLAG_SUPPORT_EJECT and related methods." 2017-03-24 01:23:53 +00:00
Suprabh Shukla
0693ff6d0e Removing unused method indexOfValueByValue
The method was confusing and not used by anyone. Same functionality can
be implemented trivially in the client code.

Test: N/A

Bug: 35765468
Change-Id: Ia019088cd023c62d83760d9ebe883f7559a43375
2017-03-24 01:22:05 +00:00
Garfield Tan
8787703ae0 Unhide FLAG_SUPPORT_EJECT and related methods.
Test: Builds and CTS tests pass. Some manual tests as well.
Bug: 36483910
Change-Id: Idd9b1c9d9573222ee12127044ff11b9ab2487f0a
2017-03-23 16:41:24 -07:00
Peter Qiu
424c8c1716 Merge "Merge "wifi: use android.graphics.drawable.Icon for Passpoint icon data" am: 44ef19d131 am: aadbb2d45e" into nyc-mr2-dev-plus-aosp
am: 3f57a273d2

Change-Id: Ie314289ce69f07c872c7a16ddc90d36be25c777f
2017-03-23 23:13:32 +00:00
TreeHugger Robot
350948e9d7 Merge "Hide Parcel#readSparseIntArray and Parcel#writeSparseIntArray" 2017-03-23 22:36:59 +00:00
TreeHugger Robot
f26f5c7e66 Merge "Introduce AuthenticationRequiredException, and @hide RecoverableSecurityException." 2017-03-23 22:12:27 +00:00
Jack Yu
f301dab471 Deprecated getDeviceId and added getMeid and getImei
Added two new public APIs getMeid and getImei. Deprecated the exisintg
getDeviceId API because it can't return a constant id when phone type
changes.

Test: CTS and manual
bug: 34233620, 10831289

Merged-In: Iad4c05d2fd2efc538214f466861497c973882dfe
Change-Id: Iad4c05d2fd2efc538214f466861497c973882dfe
2017-03-23 14:42:33 -07:00
Jack Yu
0dc3b9104b Deprecated getDeviceId and added getMeid and getImei
Added two new public APIs getMeid and getImei. Deprecated the exisintg
getDeviceId API because it can't return a constant id when phone type
changes.

Test: CTS and manual
bug: 34233620, 10831289

Change-Id: Iad4c05d2fd2efc538214f466861497c973882dfe
2017-03-23 14:35:38 -07:00
Adam Lesinski
205656d31f Hide Parcel#readSparseIntArray and Parcel#writeSparseIntArray
They were added for a CL that later stopped using them, so there
is no current need for them in public API.

Bug: 35812784
Change-Id: I2a9a30bee65894235f2cc81ab1bd5a37c9296c02
Test: build succeeds
2017-03-23 13:38:26 -07:00
TreeHugger Robot
15d010acda Merge "Deprecate DPM.EXTRA_PROVISIONING_EMAIL_ADDRESS" 2017-03-23 19:31:08 +00:00
Peter Qiu
ed1fc64efd wifi: use android.graphics.drawable.Icon for Passpoint icon data
Bug: 35857805
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ib076cd7f565638613173c7373ea5ea61affb876d
2017-03-23 11:42:49 -07:00
Mahaver
761ce77875 Deprecate DPM.EXTRA_PROVISIONING_EMAIL_ADDRESS
Bug: 34920067
Test: No tests for this API.
Change-Id: If28f9a95b3f620de5dfc1b2fa63c1d277ebde9b9
2017-03-23 17:19:00 +00:00
Przemyslaw Szczepaniak
20c4b6eaea Merge "Track libcore commit a2d9879b" am: 4aa106a790 am: b89ec268ab
am: 3dcac86f4c

Change-Id: Iefcd20cd6d268006357aea346fbfd683865f3955
2017-03-23 16:43:39 +00:00
Treehugger Robot
4aa106a790 Merge "Track libcore commit a2d9879b" 2017-03-23 16:20:24 +00:00
Jean-Michel Trivi
ce48965cf2 Merge "Audio focus: SDK/System API updates" 2017-03-23 15:11:53 +00:00
TreeHugger Robot
1e81b7f166 Merge "Added LocaleList on ViewStructure." 2017-03-23 14:11:09 +00:00
TreeHugger Robot
ad63bafad0 Merge "Add time markers to synthesizeToFile API." 2017-03-23 12:26:45 +00:00
Lorenzo Colitti
87b59632e7 Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi.
Fix: 34721574
Test: builds, apicheck passes
Change-Id: If921f265c02ffb57d5ac717f924f91f664dd991f
2017-03-23 16:11:30 +09:00
TreeHugger Robot
f3d8d3bd58 Merge "Refactor cache behavior from "atmoic" to "group"." 2017-03-23 06:04:55 +00:00
TreeHugger Robot
d45040ffc7 Merge "Added a UserManager.DISALLOW_AUTOFILL restriction." 2017-03-23 04:44:45 +00:00
Jeff Sharkey
b5a35b8181 Refactor cache behavior from "atmoic" to "group".
Using the word "atomic" has too much baggage relating to locking
guarantees, so move to something softer.

Add isQuotaSupported() for CTS tests.

Move CacheQuotaStrategy over to using SparseLongArray, which has a
more efficient memory footprint inside the system server.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 35812899, 35684969, 36482620
Change-Id: I894f53e6f3bc76c77d1bb18c51db14833df14a49
2017-03-22 21:33:53 -06:00
TreeHugger Robot
55c85cadf6 Merge "Add missing type for USB headset devices" 2017-03-23 02:22:54 +00:00
Felipe Leme
b4ca70184c Added LocaleList on ViewStructure.
Fixes: 36219641
Test: CtsAssistTestCases pass

Change-Id: I4f208a3b979a524d631e9d2c642b9b5a3cdccb22
2017-03-22 18:51:00 -07:00
Jakub Pawlowski
2a5b32faec Merge "Bluetooth 5 Enable->Enabled (1/2)" am: fa69eeac5c am: cde107da6c
am: 88e9c86822

Change-Id: I10b47fa5566c05ddeef5e13ee9d1593c648a0b48
2017-03-23 01:33:35 +00:00
Chen Xu
19091a0fbd Merge "sendDialerCode API review" 2017-03-23 01:17:33 +00:00
Jakub Pawlowski
93a094c37f Merge "BluetoothGattCallbackExt removal" am: e2ddacaff4 am: 2a32d04a24
am: 822ddff283

Change-Id: I2bffe270bde8eecd2673b75fbd578f833b59f402
2017-03-23 00:58:44 +00:00
Felipe Leme
24d5893b25 Added a UserManager.DISALLOW_AUTOFILL restriction.
bug: 35710740

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testUserRestriction
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedProfileOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDisallowAutofill_allowed

Change-Id: I41b2bf9fe3bc8df627c6650960bd11346c430a7e
2017-03-22 17:20:48 -07:00
fionaxu
388eab4147 sendDialerCode API review
1. address the feeback from API review:
throw exception rather than a boolean return
throw Security exception for permission denial and non-default dailer app.
throw invalidStateException if telephonyServie unavaialble.
2. sendDialerCode API will only check permission and package match without
enforcing the format of secret code(*#*# CODE #*#*) as throwing an unchecked
exception for wrong bad format seems to be an overkill regarding the API usage.
Dialer calls this API for each keyboard press to check format and send the intent
altogether which is no longer appropriate if we plan to return void and will
reduce frquent API calls.
3. allow callers with carrier privilege
4. not require MODIFY_PHONE_STATE as third party dialer apps won't be
granted
5. TODO mark android.provider.Telephony.SECRET_CODE to be protected
after calling apps move to this API.

Bug:35767402
Test: Manual
Change-Id: I8287aa93f2f79d356935a48cf808705d9b49984b
2017-03-22 16:56:38 -07:00