Commit Graph

19715 Commits

Author SHA1 Message Date
Julia Reynolds
6389e7bc44 Merge "Add new semantic Person fields" into pi-dev 2018-03-17 01:35:20 +00:00
TreeHugger Robot
a8bb9d255f Merge "App Time Limits API in UsageStats" into pi-dev 2018-03-16 22:40:46 +00:00
Aseem Kumar
3b0450d4a9 Merge "Unhide getKey() and importKey() and the whole class of RecoveryController. Added @RequiresPermission(android.permission.RECOVER_KEYSTORE) on all public APIs of RecoveryController." into pi-dev 2018-03-16 22:27:37 +00:00
Aseem Kumar
c1742e5137 Unhide getKey() and importKey() and the whole class of RecoveryController.
Added @RequiresPermission(android.permission.RECOVER_KEYSTORE) on all
public APIs of RecoveryController.

Bug: 73900159
Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I1047c038603869307d7a2462a2e5635fcd1c94c2
2018-03-16 13:07:25 -07:00
Julia Reynolds
18c35dfd61 Add new semantic Person fields
Bug: 74431200
Test: cts
Change-Id: I9eda447ae371ef635e9044a13ba7973bd69520ce
2018-03-16 19:13:51 +00:00
Jack Yu
6b4e6a17e9 Merge "Renamed getNetworkId and getSystemId" into pi-dev 2018-03-16 17:39:54 +00:00
TreeHugger Robot
71ed54f377 Merge "Make PrecomputedText Spannable for supporting selection" into pi-dev 2018-03-16 15:43:46 +00:00
Amith Yamasani
62ec27e97f App Time Limits API in UsageStats
Allow setting groups of apps to control usage time limits on.
Applies only to activity time in the foreground.

Updated UsageStatsTest app to be able to add an observer for
a 30 second timeout across multiple comma separated package
names.

Bug: 74335821
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
      Install and run frameworks/base/tests/UsageStatsTest

Change-Id: I677c30b4f211f7acf72c9766df3d8c1ac56a4b4e
2018-03-15 17:07:28 -07:00
Jack Yu
2661fac133 Renamed getNetworkId and getSystemId
1. Renamed getNetworkId() to getCdmaNetworkId()
2. Renamed getSystemId() to getCdmaSystemId()

Test: Build
Bug: 74976831
Change-Id: I2a5fb50a59c3239bd3dca5568991a9dff08839fc
2018-03-15 16:39:19 -07:00
Seigo Nonaka
80ed5a35a9 Make PrecomputedText Spannable for supporting selection
To support selectable TextView, make PrecomputedText spannable.
By this change, TextView start using DynamicLayout instead of
StaticLayout. DynamicLayout requires boundary rectangle of the
text, so this CL also adds getBounds method to PrecomputedText
which retrieves measured boundary box from native.

By this change, the selectable TextView performance for the
precomputed text 10x faster. On the other hand, the performacne
for the non-selectable text gets 2.5x slower. However, we concluded
that we accept this performance regression since it still 10 times
faster than non precomputed text.

Here is a precomputed text performance result of TextView.
android.widget.TextViewPrecomputedTextPerfTest:
  newLayout_PrecomputedText                             :    736,130 ->  1,648,694: (+124.0%)
  newLayout_PrecomputedText_Selectable                  : 17,379,765 ->  1,700,146: (-90.2%)
  onDraw_PrecomputedText                                :  1,274,921 ->  1,848,076: (+45.0%)
  onDraw_PrecomputedText_Selectable                     : 17,367,238 ->  1,399,169: (-91.9%)
  onMeasure_PrecomputedText                             :    752,875 ->  1,766,606: (+134.6%)
  onMeasure_PrecomputedText_Selectable                  : 17,647,842 ->  1,810,704: (-89.7%)
  setText_PrecomputedText                               :     92,894 ->    135,471: (+45.8%)
  setText_PrecomputedText_Selectable                    :    145,134 ->    215,757: (+48.7%)

Verified no effects for other performance metrics:
android.widget.TextViewPrecomputedTextPerfTest:
  newLayout_RandomText                                  : 16,495,200 -> 16,450,483: (-0.3%)
  newLayout_RandomText_Selectable                       : 17,482,439 -> 17,534,207: (+0.3%)
  onDraw_RandomText                                     : 17,224,949 -> 17,228,072: (+0.0%)
  onDraw_RandomText_Selectable                          : 18,067,397 -> 17,958,235: (-0.6%)
  onMeasure_RandomText                                  : 16,435,649 -> 16,516,352: (+0.5%)
  onMeasure_RandomText_Selectable                       : 17,724,819 -> 17,879,508: (+0.9%)
  setText_RandomText                                    :     11,130 ->     11,259: (+1.2%)
  setText_RandomText_Selectable                         :     48,900 ->     48,607: (-0.6%)

android.text.PrecomputedTextPerfTest:
  create_NoStyled_Hyphenation                           : 17,695,377 -> 17,660,233: (-0.2%)
  create_NoStyled_Hyphenation_WidthOnly                 : 17,677,423 -> 17,541,823: (-0.8%)
  create_NoStyled_NoHyphenation                         :  7,021,486 ->  7,030,069: (+0.1%)
  create_NoStyled_NoHyphenation_WidthOnly               :  7,045,453 ->  7,067,021: (+0.3%)
  create_Styled_Hyphenation                             : 12,090,933 -> 12,267,730: (+1.5%)
  create_Styled_Hyphenation_WidthOnly                   : 12,105,491 -> 12,277,272: (+1.4%)
  create_Styled_NoHyphenation                           : 11,835,249 -> 11,960,278: (+1.1%)
  create_Styled_NoHyphenation_WidthOnly                 : 11,871,765 -> 11,912,444: (+0.3%)

android.text.StaticLayoutPerfTest:
  create_PrecomputedText_NoStyled_Balanced_Hyphenation  :    709,839 ->    697,134: (-1.8%)
  create_PrecomputedText_NoStyled_Balanced_NoHyphenation:    527,671 ->    528,928: (+0.2%)
  create_PrecomputedText_NoStyled_Greedy_Hyphenation    :    477,259 ->    481,966: (+1.0%)
  create_PrecomputedText_NoStyled_Greedy_NoHyphenation  :    479,772 ->    482,278: (+0.5%)
  create_PrecomputedText_Styled_Greedy_NoHyphenation    :    639,322 ->    637,790: (-0.2%)
  create_RandomText_NoStyled_Balanced_Hyphenation       : 17,123,681 -> 16,989,227: (-0.8%)
  create_RandomText_NoStyled_Balanced_NoHyphenation     :  7,040,572 ->  7,064,175: (+0.3%)
  create_RandomText_NoStyled_Greedy_Hyphenation         :  7,000,681 ->  7,002,322: (+0.0%)
  create_RandomText_NoStyled_Greedy_NoHyphenation       :  6,997,115 ->  6,996,953: (-0.0%)
  create_RandomText_Styled_Greedy_NoHyphenation         : 11,948,744 -> 12,052,791: (+0.9%)
  draw_PrecomputedText_NoStyled                         :    543,623 ->    513,741: (-5.5%)
  draw_PrecomputedText_NoStyled_WithoutCache            :    564,742 ->    541,795: (-4.1%)
  draw_PrecomputedText_Styled                           :    838,581 ->    837,438: (-0.1%)
  draw_PrecomputedText_Styled_WithoutCache              :    826,775 ->    850,586: (+2.9%)
  draw_RandomText_NoStyled                              :    538,162 ->    533,603: (-0.8%)
  draw_RandomText_NoStyled_WithoutCache                 :  6,401,486 ->  6,424,604: (+0.4%)
  draw_RandomText_Styled                                :  1,024,683 ->  1,011,575: (-1.3%)
  draw_RandomText_Styled_WithoutCache                   :  2,733,204 ->  2,722,828: (-0.4%)

Bug: 72998298
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: I072dfd70b9a687d9c47e310d8cdb34f988fbb32e
2018-03-15 14:09:08 -07:00
Antoan Angelov
675db3f236 Merge "Move the support_transfer_ownership_metadata inside the device admin descriptor XML." into pi-dev 2018-03-15 19:40:13 +00:00
TreeHugger Robot
feff6c7d41 Merge "Add IMS#BACK_DISPOSITION_ADJUST_NOTHING" into pi-dev 2018-03-15 13:27:30 +00:00
TreeHugger Robot
5d9617c439 Merge "Add notification category: CATEGORY_NAVIGATION; Add @SystemApi @hide notification categories: CATEGORY_CAR_EMERGENCY, CATEGORY_CAR_WARNING, and CATEGORY_CAR_INFORMATION." into pi-dev 2018-03-15 03:00:46 +00:00
TreeHugger Robot
dbeb6bc3f1 Merge "WifiConfiguration: Undeprecate WPA_PSK" into pi-dev 2018-03-15 02:11:46 +00:00
TreeHugger Robot
b33cef07f2 Merge "Unhiding APIs in UsageEvents for public use" into pi-dev 2018-03-15 01:08:33 +00:00
Yohei Yukawa
386f50e04f Add IMS#BACK_DISPOSITION_ADJUST_NOTHING
This is a follow up CL to our previous attempt [1] to make
InputMethodService#setBackDisposition() work and make sense.

Based on the feedback from several IME developers, we learned that
InputMethodService#setBackDisposition() is still confusing.

My conclusion is that trying to reuse existing flags was a mistake.
Here are the rationale for deprecating those two flags.

 * BACK_DISPOSITION_WILL_NOT_DISMISS

   This flag had never been used until we started using it in our
   previous CL [1].  However, it turns out that what this flag means
   is hard to understand because its JavaDoc only says
      "This input method will not consume the back key."
   To address the original goal of Bug 38513361, we can (and should)
   introduce a new flag rather than reusing this confusing flag.
   Deprecating this flag should have no impact because it had never
   been used.

 * BACK_DISPOSITION_WILL_DISMISS

   On pre-P devices IME could abuse this flag to override the back
   button to "dismiss" mode even after IME lost the focus.  On the
   other hand, as far as we know there is no good use case for this
   flag.  Hence rather than trying to fix such an abuse scenario, we
   should just deprecate this flag.

Instead, a newly introduced flag BACK_DISPOSITION_ADJUST_NOTHING
should be sufficient to achieve the original goal of Bug 38513361.
This flag does not rely on the concept "dismiss" and key event
handling hence it would be much easier to maintain.

 [1]: I99e7c413fe1a93f8d8cff897b5c5f0947690d2c0
      3fecef119e

Fix: 74403102
Test: atest CtsInputMethodTestCases
Change-Id: I064209c40da79fffb2627e8f580818a793017b1f
2018-03-14 23:42:21 +00:00
Roshan Pius
8f1a910ad8 WifiConfiguration: Undeprecate WPA_PSK
This is needed for client mode operations for configuring WPA_PSK
networks. There is no alternative public value for WPA_PSK.
The intention was to deprecate usage of this value for AP
mode, but since we share the same object across client & AP mode
operations, we cannot mark this field deprecated.

Bug: 72332080
Test: make update-api
Change-Id: I75f675b630080d853422f945d7cbc37c5f205fde
2018-03-14 15:17:00 -07:00
Adora Zhang
aa90e8781f Add notification category: CATEGORY_NAVIGATION;
Add @SystemApi @hide notification categories: CATEGORY_CAR_EMERGENCY, CATEGORY_CAR_WARNING, and CATEGORY_CAR_INFORMATION.

Bug: 74546526
Test: runtest -x tests/app/src/android/app/cts/NotificationTest.java

Change-Id: Ib997992e039d2eddbd9c744816c35e279f9f9682
2018-03-14 14:53:26 -07:00
Suprabh Shukla
4e12de81b8 Unhiding APIs in UsageEvents for public use
These apis are needed to interpret standby bucket change history
when using UsageStatsManager#queryEventsForSelf

Test: atest android.app.usage.cts.UsageStatsTest#testQueryEventsForSelf

Bug: 71906213
Change-Id: Ib9f458bf32089ad30c97eca9dd5cc4df5a392191
2018-03-14 14:27:09 -07:00
TreeHugger Robot
98c1d17cb4 Merge "Add API to get currently pinned slices" into pi-dev 2018-03-14 20:12:54 +00:00
Dianne Hackborn
bf5387edd8 Merge "Fix issue #62342672: API Review: OPSTR_ACTIVATE_VPN SystemApi" into pi-dev 2018-03-14 03:02:20 +00:00
Qingxi Li
d78e0451ea Merge "Add API to check extended APDU Supported" into pi-dev 2018-03-13 23:00:10 +00:00
TreeHugger Robot
6896508045 Merge "Revert "Camera: SessionConfiguration should use Executors"" into pi-dev 2018-03-13 22:44:21 +00:00
TreeHugger Robot
1b8333d1fb Merge "Unhide getWeight of Typeface" into pi-dev 2018-03-13 22:24:41 +00:00
Dianne Hackborn
bf1b57d856 Fix issue #62342672: API Review: OPSTR_ACTIVATE_VPN SystemApi
Add a new platform-only permission for being able to change
app ops mode, so nothing outside of the platform can do this.

Bug: 62342672
Test: Booted, ran, settings works, shell works, apps install
Change-Id: I372e649c019a8f9b95919ff0da6f56612d7061c2
2018-03-13 14:51:30 -07:00
Yin-Chia Yeh
90d6fccf01 Revert "Camera: SessionConfiguration should use Executors"
This reverts commit 004e73c38c.

Bug: 74605221
Bug: 73953366
Change-Id: I1665c3d235434f57a4cd4aa5f082720b83ac10cc
2018-03-13 20:57:42 +00:00
Brad Ebinger
fc1ac6c9a8 Merge "Support Dynamic ImsService Querying" into pi-dev 2018-03-13 20:53:53 +00:00
Qingxi Li
346bddee19 Add API to check extended APDU Supported
Add API UiccSlotInfo#getIsExtendedApduSupported

Bug: 68999147
Test: TreeHugger & E2E
Change-Id: Ia400a23c35332356deaa214861f6f5ffe47c8092
2018-03-13 13:41:50 -07:00
TreeHugger Robot
3ed6c6330a Merge "Expose the new brightness permissions as test APIs." into pi-dev 2018-03-13 19:20:47 +00:00
Brad Ebinger
9c750fe77f Support Dynamic ImsService Querying
1) Provide a "default" impl for MmTelFeature
instead of returning null.

2) Introduce a FeatureSlotPair, which maps a SIM
slot ID to a ImsFeature. This allows the ImsService
to provide which features it supports for multi-SIM
phones.

3) Pipe through ImsResolver state to help prevent IMS
operation when the ImsResolver is in the process of
figuring out feature capabilities.

Test: Telephony ImsService test app, telephony unit tests
Bug: 72642524

Merged-In: I4d7e9ba630739ade83e3242488f330ea6e73bbd7
Change-Id: Idb95f7651af200026d62e8b29eaed30bc0ebc9d3
2018-03-13 11:06:38 -07:00
TreeHugger Robot
a033fa7fdc Merge "Run slice callbacks on thread they come in on" into pi-dev 2018-03-13 13:54:18 +00:00
TreeHugger Robot
8807436378 Merge "heif: add option for specifying bitmap pixel format" into pi-dev 2018-03-13 02:29:25 +00:00
TreeHugger Robot
2b83982b2b Merge "Make MP2 operations asynchronous and send matching notifications" into pi-dev 2018-03-13 00:09:02 +00:00
Chen Xu
f78767d2f9 Merge "Carrier id api rename" into pi-dev 2018-03-12 22:49:21 +00:00
TreeHugger Robot
5d92e72482 Merge "DisplayCutout: Support more than one cutout" into pi-dev 2018-03-12 22:45:34 +00:00
TreeHugger Robot
197ea9e3a5 Merge "TextClassifierService.onSelectionEvent" into pi-dev 2018-03-12 21:35:25 +00:00
Chong Zhang
a89f6e1bb2 heif: add option for specifying bitmap pixel format
Add an option similar to BitmapFactory.Options to the bitmap
extraction APIs added in P to allow the app to specify bitmap's
pixel format. MediaMetadataRetriever's old getFrameAtTime()
only allows extraction in RGB565, for image use case the bitdepth
could be too low.

Also change return type of getFramesAtIndex to List as
Lint is complaining about returning raw arrays.

bug: 63633199
bug: 73886998

Change-Id: I40f0a421c767483e32c7744180dc5a187681e066
2018-03-12 21:23:00 +00:00
Jason Monk
66cffd5ae6 Run slice callbacks on thread they come in on
Instead post a runnable that will trigger an ANR+crash if the app
doesn't respond in time.

Test: atest cts/tests/tests/slice
Bug: 74251457
Change-Id: Ieea7a8d8cb08d3bf0735b9f7b385f286839dacd8
2018-03-12 17:20:01 -04:00
Julia Reynolds
dcf12d4a39 Merge "Log interruptive notifications" into pi-dev 2018-03-12 21:10:59 +00:00
TreeHugger Robot
ec174b28c4 Merge "Implemented WebView.isVisibleToUserForAutofill()" into pi-dev 2018-03-12 20:35:53 +00:00
Mohamed Abdalkader
7333793eaa Merge "Unhide ImsCallProfileConstructor." into pi-dev 2018-03-12 19:54:40 +00:00
TreeHugger Robot
44662a157e Merge "Add Application.getProcessName()" into pi-dev 2018-03-12 19:43:22 +00:00
Chong Zhang
f78a08c2d9 Merge "heif: add definition for HEVC Main Still Picture profile" into pi-dev 2018-03-12 19:40:00 +00:00
Abodunrinwa Toki
ad52f4b97c TextClassifierService.onSelectionEvent
Bug: 74466564
Bug: 67609167
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.logging.SelectionEventTest
Merged-In: Ib5af1ec80a38432d1201fbc913acdc3597d6ba82
Change-Id: Ib5af1ec80a38432d1201fbc913acdc3597d6ba82
2018-03-12 19:32:51 +00:00
Dongwon Kang
69d2d51a59 Make MP2 operations asynchronous and send matching notifications
Test: testPlayVideo & testEventCallback & testPlaylist
Bug: 74204782
Change-Id: I7a0f7d1ba5334c68380ef928294dc52cae76c185
2018-03-12 11:33:34 -07:00
TreeHugger Robot
81cacb274c Merge "Statsd BroadcastSubscribers can receive 'cookies'" into pi-dev 2018-03-12 18:27:02 +00:00
Abodunrinwa Toki
e6d974a567 Allow TextClassifierServices to get a hold of a local TextClassifer.
Test: builds
Bug: 74466564
Bug: 72747726
Merged-In: Idb108f2b3d95393a051f9f19b0c04fc4e3ed2b33
Change-Id: Idb108f2b3d95393a051f9f19b0c04fc4e3ed2b33
2018-03-12 18:04:24 +00:00
Adrian Roos
6a4fa0ec18 DisplayCutout: Support more than one cutout
Also makes API more restrictive. Also moves window manager specific
logic out of the framework. Also fixes SystemUI such that it can properly
deal with more than one cutout.

Bug: 74195186
Test: atest DisplayCutoutTest WmDisplayCutoutTest DisplayContentTests WindowFrameTests
Change-Id: Ib7b89e119ce2d3961687579bb81eadce1159a600
2018-03-12 17:26:01 +00:00
Abodunrinwa Toki
9554dd94ec Merge "Merge textclassifier/logging/ into textclassifier/" into pi-dev 2018-03-12 15:16:53 +00:00
TreeHugger Robot
9d3d6b4076 Merge "Camera: SessionConfiguration should use Executors" into pi-dev 2018-03-12 14:55:34 +00:00