Commit Graph

18266 Commits

Author SHA1 Message Date
Kurt Nelson
1efd46211f Merge "Plumb real stack traces through StrictMode" 2017-10-24 22:19:44 +00:00
Jeff Davidson
beb90fda29 Expose SmsMessage#FORMAT_ constants as public APIs.
These constants are intended to be arguments for
SmsManager#injectSmsPdu which is already public, and they are
referenced from CTS as well. Therefore, they should also be public.

Also add a @StringDef for these values and clean up the Javadoc while
we're here to use properly-linked references to other APIs.

Change-Id: I4e513f49f18350b93cccdc0d8a5847d31eefe7e2
Fixes: 67751433
Test: TreeHugger (no functional changes)
2017-10-24 18:25:26 +00:00
Rebecca Silberstein
dd50acfdb8 Merge changes from topic "delete_setWifiApEnabled"
* changes:
  WifiManager: delete the setWifiApEnabled method
  WifiManager: remove last remnants of setWifiApEnabled
2017-10-24 16:10:41 +00:00
Yueming Wang
302318bc9b Merge "Add setTime and setTimeZone API." 2017-10-23 17:29:09 +00:00
Kurt Nelson
0918c93a3f Plumb real stack traces through StrictMode
Currently StrictMode uses a string representation of the entire stack
trace throughout. Switching to passing Throwables will allow callback
consumers to traverse an array.

It does not regress the performance test added in ag/3083879.

Test: adb shell am instrument -w -e class android.os.StrictModeTest \
    com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

timeThreadViolation_mean=332071
timeThreadViolation_median=328184
timeThreadViolation_min=311253
timeThreadViolation_standardDeviation=16106

timeCrossBinderThreadViolationNoStrictMode_mean=1843599
timeCrossBinderThreadViolationNoStrictMode_median=1824457
timeCrossBinderThreadViolationNoStrictMode_min=1810186
timeCrossBinderThreadViolationNoStrictMode_standardDeviation=43539

timeCrossBinderThreadViolation_mean=2300256
timeCrossBinderThreadViolation_median=2148796
timeCrossBinderThreadViolation_min=1792660
timeCrossBinderThreadViolation_standardDeviation=472271

timeVmViolationNoStrictMode_mean=27794864
timeVmViolationNoStrictMode_median=26617027
timeVmViolationNoStrictMode_min=23994153
timeVmViolationNoStrictMode_standardDeviation=3384362

timeVmViolation_mean=32878535
timeVmViolation_median=34775241
timeVmViolation_min=28373537
timeVmViolation_standardDeviation=3462046

timeThreadViolationNoStrictMode_mean=373863
timeThreadViolationNoStrictMode_median=388998
timeThreadViolationNoStrictMode_min=333664
timeThreadViolationNoStrictMode_standardDeviation=33219

Bug: 62458734
Change-Id: I6b3924be91f19654c502e0ec2f44cc07d6e86e3f
Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
2017-10-23 10:04:19 -07:00
yuemingw
e43cdf7509 Add setTime and setTimeZone API.
Fix: 67497358
Test: wait for cts test in the following cl. For unitest:
 runtest -x services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Add setTime and setTimeZone API in devicepolicymanager.
Add unitest for each API.
Following design doc: https://docs.google.com/document/d/1NV93mr2CT157S_haru1QbKo9HLeP9iPM9eMiGfVmfCM/edit

Change-Id: I188c27b0b99137b6f01e42ae1ad49356ce0a81b2
2017-10-23 10:53:15 +01:00
TreeHugger Robot
d2167ba99c Merge "Let SuggestionService receive suggestion-launched signal." 2017-10-20 22:52:57 +00:00
TreeHugger Robot
f5699224e9 Merge "Add FingerprintEnroll API" 2017-10-20 21:41:01 +00:00
Fan Zhang
e4b5ac2f97 Let SuggestionService receive suggestion-launched signal.
This is the opposite signal to dismissSuggestion().

Bug: 65065268
Test: runtest --path core/tests/coretests/src/android/service/settings/suggestions/SuggestionServiceTest
Change-Id: Iff708fd1b06e12b6d46aefdcc658e96b44063e67
2017-10-20 10:25:31 -07:00
Felipe Leme
24604a3a62 Merge "New Autofill API: TYPE_CONTEXT_COMMITTED events." 2017-10-20 16:38:21 +00:00
Rebecca Silberstein
51c53a9428 WifiManager: delete the setWifiApEnabled method
Delete the @removed setWifiApEnabled call along with any remaining
callers.

Bug: 66917593
Bug: 26753849
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Ieefc59e01d801d9f5a943830c66c86e9e624158c
2017-10-19 23:18:57 +00:00
Felipe Leme
4d14ec2c23 Make new Autofill API concretes, so they don't break support library.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testNewTextAttributes
Test: m update-api

Bug: 38323227

Change-Id: Idafb157fe9b3e96661d58923d361ea07ff2c6d40
2017-10-19 13:31:25 -07:00
Benedict Wong
c35ca6de37 Merge "Add support for AES-GCM-ESP as an IPSec algorithm" am: b6df7f0d35 am: d3a5792024 am: f92bfc3b77
am: 9c6f24d1ee

Change-Id: Ie9a43c7f0519a2d7ac3326944608190503804483
2017-10-19 17:48:53 +00:00
Benedict Wong
9c6f24d1ee Merge "Add support for AES-GCM-ESP as an IPSec algorithm" am: b6df7f0d35 am: d3a5792024
am: f92bfc3b77

Change-Id: I49932a5fc048b4a60512fac45a3537f050397168
2017-10-19 17:37:22 +00:00
Benedict Wong
f92bfc3b77 Merge "Add support for AES-GCM-ESP as an IPSec algorithm" am: b6df7f0d35
am: d3a5792024

Change-Id: I5bf43f78716769a6f1f90169f500e9eee7a91f18
2017-10-19 17:26:19 +00:00
Benedict Wong
d3a5792024 Merge "Add support for AES-GCM-ESP as an IPSec algorithm"
am: b6df7f0d35

Change-Id: Ic099206a28c4f21fa796969c953a8d4e81e8495b
2017-10-19 17:14:53 +00:00
Mihai Popa
9069f17981 Merge "Enable the public TTC index attribute for fonts" 2017-10-19 10:12:09 +00:00
Selim Gurun
6bdb6097a7 Merge "Add SystemApis annotations" 2017-10-19 01:06:39 +00:00
TreeHugger Robot
e325356e36 Merge "New Autofill API: CustomDescription.batchUpdates()" 2017-10-19 00:51:32 +00:00
Fyodor Kupolov
d97dae51c1 Merge "Allow creating CursorWindow of custom size" 2017-10-19 00:27:33 +00:00
Kevin Chyn
83ff28c00c Add FingerprintEnroll API
Bug: 65459785

Test: adb shell am start -a android.settings.FINGERPRINT_ENROLL
      Flow is correct with and without PIN/Pattern/Pass set up

Change-Id: Ib4daa9a4b687bb7b884fe4159a6cbd871db88641
2017-10-18 23:10:06 +00:00
Felipe Leme
59c446403c New Autofill API: TYPE_CONTEXT_COMMITTED events.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts#FillEventHistoryTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 65130630

Change-Id: I7f0336752be50f6b5f55e01865fe70b6d44dedbe
2017-10-18 14:33:57 -07:00
Benedict Wong
0febe5ece5 Add support for AES-GCM-ESP as an IPSec algorithm
Allows native AES-GCM-ESP to be used as an IPSec transport/tunnel mode
algorithm with kernel support

Bug: 63589918
Test: IPsecService tests added, existing ones pass
Change-Id: Ie1a9a902be205f269aa37bf956198f2e5b177c21
2017-10-18 11:22:24 -07:00
Selim Gurun
64bd35ef2c Add SystemApis annotations
There are some number of places where bluetooth APIs are used via
reflection from GMSCore. Add proper annotations.

Bug: 67052734
Test: Manual - and using make update-api
Change-Id: Ib6e3aa1ff5b6f9cdc78367f9be13ed00542d6f65
2017-10-17 17:15:33 -07:00
Fyodor Kupolov
6bb32a9a8b Allow creating CursorWindow of custom size
The default size is controlled by config_cursorWindowSize.

Test: SQLiteCursorTest
Bug: 62550963
Change-Id: Ic5c6550b2dd53401afc039ec257524a98bf2950e
2017-10-17 15:22:11 -07:00
Jason Monk
8a77c22205 Merge "Unhide slice data APIs" 2017-10-17 21:59:15 +00:00
Felipe Leme
63c601a06b New Autofill API: CustomDescription.batchUpdates()
This API allows the service to apply updates in the save UI remote view, when
a given condition applies.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.CustomDescriptionTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.CustomDescriptionUnitTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.BatchUpdatesTest

Fixes: 63933969

Change-Id: I5002f231cd2029463b81a68fb3acd9bf1ae5964a
2017-10-17 13:45:38 -07:00
Eugene Susla
2171ca4553 Merge "Magnification Gestures CTS test" 2017-10-17 20:02:21 +00:00
Eugene Susla
a55f74e45d Magnification Gestures CTS test
Test: ensure affected CTS tests pass
Change-Id: I2ad9ef57098d1e9343d571e0d59504851ac691eb
2017-10-16 17:31:49 -07:00
Jason Monk
d18651fa89 Unhide slice data APIs
Test: CTS
Change-Id: Ie2a05e30e5ac6c830b6a9a14b2d207b7e2fbe9da
2017-10-16 14:38:18 -07:00
Matthew Ng
54bc942fe4 Updated TaskDescription to pass drawable resource ID (1/2)
Depreciated the TaskDescription constructor when passing a bitmap and
added constructors to support passing drawable resource ID. Passing
drawable IDs allow users to use drawables such as AdaptiveIcons
instead of creating and passing a bitmap. Later SystemUI checks for
either bitmap, file name or resource ID to get a drawable to display.

Test: run-test CtsActivityManagerDeviceTestCases android.server.am
.TaskDescriptionTest
Change-Id: Ib944687249acf9fb6bbf9a9a109930cc04539e14
Fixes: 36298959
2017-10-16 10:56:24 -07:00
TreeHugger Robot
c7c0519618 Merge "Add signature permission to allow access to shortcuts for sysui" 2017-10-14 03:21:50 +00:00
Makoto Onuki
634cecb899 Add signature permission to allow access to shortcuts for sysui
Bug 34715012
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases

Change-Id: I922f9fb872e27b25d1016b3894165a0e63faa9b5
2017-10-13 17:36:42 -07:00
TreeHugger Robot
02a20b7025 Merge "Added new ViewNode properties for Autofill (minEms, maxEms, maxLength)." 2017-10-13 18:13:04 +00:00
Charles He
fe932c78ec Merge "AM: introduce ActivityOptions.setLockTaskMode()." 2017-10-13 13:38:06 +00:00
Mihai Popa
e34ad1871b Enable the public TTC index attribute for fonts
This change adds support for specifying the TTC index on font entries,
relevant in the context of .ttc font files used to deliver multiple
fonts in the same file.
Bug: 37853920
Test: adb shell am instrument -w -e class android.content.res.FontResourcesParserTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I3f74e87dec78e1f5a68ccead80b0f637af1aa7a3
2017-10-13 12:44:21 +01:00
Charles He
2bf2832047 AM: introduce ActivityOptions.setLockTaskMode().
This new API allows any activity to be launched into LockTask mode, as
if the package of the activity has declared "lockTaskMode =
if_whitelisted" in its manifest.

The lockTaskLaunchMode logic is also moved from TaskRecord to
ActivityRecord, in order to accommodate the new path from
ActivityOptions.

Bug: 66124180
Test: cts-tradefed run cts-dev --module DevicePolicyManager -t com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: manual, with TestDPC's kiosk mode
Change-Id: I786bf194ed20a212bbad1f3cdb9394cc77aa4d77
2017-10-12 23:03:30 +01:00
Felipe Leme
2fe3ade813 New Autofill API: SaveInfo.setTriggerId()
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testExplicitySaveButton
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testExplicitySaveButtonWhenAppClearFields
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 65118073
Fixes: 67006548

Change-Id: Id12179086567d014f35fe4177b041745fb19bafd
2017-10-12 09:55:45 -07:00
Beverly Tai
1e26cacc71 Merge "Add alarm + media/other to NotifManager.Policy" 2017-10-12 13:20:51 +00:00
TreeHugger Robot
96a30ab84c Merge "Improve shortcut backup & restore." 2017-10-11 23:55:33 +00:00
Brad Ebinger
d1525d9767 Merge "Add new Download Error Codes" am: e9bd5449b5 am: 946ff79971 am: 014d73e287
am: bb38194a55

Change-Id: I3f1c18c3a9017c48aeba29e7344c27ba24d1a037
2017-10-11 23:43:09 +00:00
Brad Ebinger
bb38194a55 Merge "Add new Download Error Codes" am: e9bd5449b5 am: 946ff79971
am: 014d73e287

Change-Id: I7c7dc265bf5ba27b61794d114937c2c4c0816470
2017-10-11 22:56:47 +00:00
Brad Ebinger
014d73e287 Merge "Add new Download Error Codes" am: e9bd5449b5
am: 946ff79971

Change-Id: I756df5c78a96a59468f54ac35e9668d66cf64901
2017-10-11 22:39:14 +00:00
Brad Ebinger
946ff79971 Merge "Add new Download Error Codes"
am: e9bd5449b5

Change-Id: I8fa3c3dcc5104a5326a680ae186c9285a7e47358
2017-10-11 22:24:58 +00:00
Brad Ebinger
e9bd5449b5 Merge "Add new Download Error Codes" 2017-10-11 22:12:26 +00:00
Makoto Onuki
a4f89b1251 Improve shortcut backup & restore.
From http://go/p-shortcut-restore :

Currently on pre-P builds, there are 6 cases where shortcuts won't be restored.

Launcher issue:
A: Launcher is downgraded
B: Launcher has allowBackup="false"
C: Launcher's signature changed.
A-C would result in not restoring any shortcuts from any apps.

App issue:
D: App is downgraded
E: App has allowBackup="false"
F: App's signature changed.
D-F would result in not restoring any shortcuts from individual apps.

In P, we'll restore all pinned shortcuts anyway except in case B and C.

The new behavior would be:
A: We'll restore all pinned shortcuts anyway even if the launcher is downgraded.
B: If the launcher doesn't support backup&restore, we still don't restore shortcuts.
C: If the launcher has a different signature, we still don't restore shortcuts.

D, E, F: All pinned shortcuts will be restored, but are disabled.

In case of D, E, F, shortcuts would be:
1. ShortcutInfo.isEnabled() will return false. They are not launchable.
2. If it's case D (downgrade), shortcuts will be re-enabled once a publisher app
is updated to the original version or higher.
3. getDisabledMessage() will return a special, canned message explaining why
they're disabled.
4. A new API getDisabledReason() will return one of the following values:
 - DISABLED_REASON_NOT_DISABLED (for non-disabled shortcuts)
 - DISABLED_REASON_BY_APP (for shortcuts disabled by apps)
 - DISABLED_REASON_APP_CHANGED (for shortcuts disabled when a manifest shortcut is gone.)
 - DISABLED_REASON_VERSION_LOWER (case D)
 - DISABLED_REASON_BACKUP_NOT_SUPPORTED (case E)
 - DISABLED_REASON_SIGNATURE_MISMATCH (case F)
 - (DISABLE_REASON_OTHER_RESTORE_ISSUE for future use)
Launcher can opt to use this API to show a custom error message, rather than
using the canned system message from getDisabledMessage().

5. This spec change is completely transparent to publisher apps.
In case D,E,F, the disabled shortcuts will only be visible to the launcher,
and from the publisher app's point of view, they still don't exist.
APIs such as getPinnedShortcuts() will not return them, and updateShortcuts()
will not affect them. The enableShortcut() will not enable them either.

Bug 62451035
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases

Change-Id: Ib4d73aa44a0395f5e37c8ad0c9cd041a9038fb66
2017-10-11 14:50:38 -07:00
TreeHugger Robot
7c3c3c8bf8 Merge "Expose API for heavy-weight apps and get it working again." 2017-10-11 18:36:06 +00:00
TreeHugger Robot
93af341d5e Merge "Deprecate view drawing cache" 2017-10-11 18:00:00 +00:00
TreeHugger Robot
656a75fee0 Merge "Remove dispatchKeyEventToHdmi()" 2017-10-11 16:54:16 +00:00
Dianne Hackborn
70c95c5674 Expose API for heavy-weight apps and get it working again.
Still very rough UI, but basically does what is intended.
Also add two tests apps for manual tests (CTS test will
be coming).

Bug: 63937884
Test: manual

Change-Id: I45a6a2b122a75f8125510a2027bb1faf57c6956d
2017-10-10 17:57:22 -07:00