75480 Commits

Author SHA1 Message Date
Seigo Nonaka
fe04aa840e Pass weight/italic pair instead of style.
Typeface.NORMAL/BOLD/ITALIC/ITALIC_BOLD is used for specifying relative
from current Typeface. For example

  Typeface face = Typeface.create("serif");
  Typeface thickerFace = Typeface.create(face, Typeface.BOLD);
  Typeface moreThickerFace = Typeface.create(tickerFace, Typface.BOLD);

For the purpose of providing font information, we should use weight/italic
value instead of style in Typeface.
The Columns.STYLE field was kept for preventing runtime crash of demo
apps.

Test: Manually
Change-Id: I732e8ee04a66f61321fc0a98dbfb8fdc0a4dd7a4
2017-04-04 10:12:55 -07:00
TreeHugger Robot
2ac9698271 Merge "Reorganize font enumeration API." into oc-dev 2017-04-04 16:49:56 +00:00
Jorim Jaggi
de95d544cd Merge "Schedule window animations at vsync-sf" into oc-dev 2017-04-04 09:26:03 +00:00
Jorim Jaggi
1edadac465 Merge "Handle case when snapshot dimensions don't match" into oc-dev 2017-04-04 09:14:38 +00:00
TreeHugger Robot
a52fc49845 Merge "Themes: Apply themes to system_server safely" into oc-dev 2017-04-04 03:25:29 +00:00
TreeHugger Robot
c56defe9c0 Merge "Rename UsbRequest.enqueue to UsbRequest.queue" into oc-dev 2017-04-04 01:57:23 +00:00
Andrii Kulian
d6f0b0fc4f Merge "Update display contents when metrics change" into oc-dev 2017-04-04 01:38:25 +00:00
TreeHugger Robot
d017221a52 Merge "Increase visibility of FEATURE_LEANBACK_ONLY" into oc-dev 2017-04-04 01:28:43 +00:00
Hugo Benichi
df9cf5450c Merge "Move back networking policy logic into NetworkPolicyManagerService" into oc-dev 2017-04-04 00:50:24 +00:00
TreeHugger Robot
d490fe0372 Merge "Expose animator settings to Instant Apps" into oc-dev 2017-04-04 00:23:34 +00:00
TreeHugger Robot
5fd39fad26 Merge "Don't wtf() for reverse profile access; make it a warning." into oc-dev 2017-04-03 23:32:00 +00:00
Evan Rosky
fe9ce65491 Merge "Handle edge-case where the focus-search root is focused" into oc-dev 2017-04-03 23:10:56 +00:00
Daniel Cardenas
c40afac294 Increase visibility of FEATURE_LEANBACK_ONLY
Bug: 36003137
Test: Build on Fugu and CTS
Change-Id: Iab9be686a004c5c0d1fae02a33898f7ebb264b27
2017-04-03 16:06:40 -07:00
TreeHugger Robot
78e8ac9c14 Merge "Framework support to improve bg check CTS tests." into oc-dev 2017-04-03 22:26:01 +00:00
TreeHugger Robot
a73aee4cdc Merge "Revert "Deprecate EXTRA_STREAM."" into oc-dev 2017-04-03 22:17:17 +00:00
Yohei Yukawa
1061992733 Merge "Warn if IMM#showSoftInputUnchecked() is called" into oc-dev 2017-04-03 22:14:28 +00:00
Sanket Padawe
9077faab1f Merge "Make some intents public in SubscriptionManager." into oc-dev 2017-04-03 22:10:29 +00:00
TreeHugger Robot
33f893202d Merge "Remove workaround for end() not supported in some app" into oc-dev 2017-04-03 21:41:16 +00:00
Chad Brubaker
91d2e2832c Expose animator settings to Instant Apps
Bug: 36861394
Test: Instant Apps can access the settings
Change-Id: I0e414cb068a47e9a6f62239ffcb922de54586a71
2017-04-03 14:34:50 -07:00
Makoto Onuki
3cc7cd1c18 Don't wtf() for reverse profile access; make it a warning.
Bug:36003688
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Change-Id: I6d6a73e1d9281dc0b92186dd0666865b0f6b3f1c
2017-04-03 14:04:11 -07:00
TreeHugger Robot
5219a85eaa Merge "Javadoc fix for View.setTooltipText" into oc-dev 2017-04-03 20:55:15 +00:00
Seigo Nonaka
ff55115121 Reorganize font enumeration API.
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
  This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.

Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
2017-04-03 13:55:07 -07:00
TreeHugger Robot
dcc792a13f Merge "Persistent connection to DO/PO service." into oc-dev 2017-04-03 20:35:18 +00:00
Jeff Sharkey
81aebe7c3c Revert "Deprecate EXTRA_STREAM."
This reverts commit a0ba51c2ab75c8e0406bbd43742597552b6dae98.

Bug: 35293781
Change-Id: I5f0b9000535ac0bcbbe125fe781c20c5fb0c8782
2017-04-03 20:14:34 +00:00
Makoto Onuki
ef7dff2563 Merge "Revert "Push chooser targets to the shortcut manager."" into oc-dev 2017-04-03 19:45:18 +00:00
Andrii Kulian
cd09799339 Update display contents when metrics change
There are two separate overrides for display metrics in DisplayManager
and WindowManager:
- In DM - LogicalDisplay#mOverrideDisplayInfo, in most cases not null.
- In WM - DisplayContent#mBaseDisplayWidth/Height/Density, different
from #mInitialDisplayWidth/Height/Density values when some metrics are
forced.

When display was resized its windows weren't updated because of
two problems: old LogicaDisplay#mOverrideDisplayInfo was preventing
WM from detecting the change and override (base) display metrics were
never updated by resize.

When display size changes:
- Before this CL:
DM receives DISPLAY_CHANGED event, it updates internal values and
WM is notified about them with a message. In most cases there is an
override obtained from WM and WM doesn't get new values from
LogicalDisplay#getDisplayInfoLocked().

- With this CL:
WM will requests real updated values from DM without any overrides
and will decide whether to apply them or not: if there is no override
in WM - it will apply values from WM, otherwise it will keep the
override. Also it will always update initial display metrics if there
is a real change detected.

Bug: 35258051
Bug: 34164473
Bug: 36518752
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testDisplayResize
Test: #testForceDisplayMetrics
Change-Id: I2495c27797f11f9aaee4ea06648a8ccd29ac5b62
2017-04-03 19:45:14 +00:00
Jason Monk
be436bdefe Merge "Add test API for if the device supports QS" into oc-dev 2017-04-03 19:11:44 +00:00
Doris Liu
ae570c04c0 Remove workaround for end() not supported in some app
BUG: 36241584
Test: Follow repro steps of comment #1 in the bug above

Change-Id: I1bf27a7cc9cc2bd398c372623d7978e838f1d8b2
2017-04-03 18:53:55 +00:00
Vladislav Kaznacheev
671a9701c9 Javadoc fix for View.setTooltipText
Change "unless is not handled" to "unless it is handled"

Bug: 36668465
Test: read the Javadoc
Change-Id: I432f24e313358b4448aff2ff9de382d4a58652bc
2017-04-03 18:39:05 +00:00
Evan Rosky
e55f4a611e Handle edge-case where the focus-search root is focused
Bug: 36854948
Test: Added check to FocusFinderTest#testFindNextFocus
Change-Id: Iac6ea6e255d16d4cd1f7fe053ba47e171fff73e0
2017-04-03 11:37:20 -07:00
Philip P. Moltmann
91ed33b032 Rename UsbRequest.enqueue to UsbRequest.queue
Fixes: 36850572
Test: CtsVerifier USB device tests on angler
Change-Id: If2a376a8615bf2aa24a6d3a30c7d0a29365f52ea
2017-04-03 11:25:07 -07:00
Winson Chung
34ecbaa991 Merge "Ensuring multi-window callbacks contain new configuration and are in order" into oc-dev 2017-04-03 18:23:31 +00:00
Brad Ebinger
57132a1513 Merge "Move CALL_PRIVILEGED/EMERGENCY to @SystemApi" into oc-dev 2017-04-03 18:12:42 +00:00
Chad Brubaker
e35d50622c Merge "Rename READ_PHONE_NUMBER to READ_PHONE_NUMBERS" into oc-dev 2017-04-03 17:34:13 +00:00
Sanket Padawe
2c1a49f933 Make some intents public in SubscriptionManager.
+ As per https://docs.google.com/document/d/1K8C7Ly8YVu032FQlwEdkv3ovcTYQCTvy0PaMax5PmZI/edit#heading=h.g6rt8vhyfjj1

Bug: 36572866
Test: Builds successfully.
Change-Id: Ibb1d1faae9a002ccb530446e24897955c12076e1
2017-04-03 10:13:12 -07:00
Yohei Yukawa
101ae464fc Warn if IMM#showSoftInputUnchecked() is called
With this CL, an @hide method InputMethodManager#showSoftInputUnchecked
is marked to be deprecated and starts showing a warning message in logcat
when it gets called to tell application developers who are still using
old implementation fo android.support.v7.widget.SearchView that they
need to switch to support library ver. 26.0 or later version.

Other than that there is no behavior change in this CL.

Test: Manually verified as follows:
       1. Flash an OS image
       2. Complete the setup wizard (if any).
       3. In N MR-1 AOSP repository
          frameworks/support/gradlew -p frameworks/support support-v7-demos:assemble
       4. adb install out/host/gradle/frameworks/support/support-v7-demos/build/outputs/apk/support-v7-demos-debug.apk
       5. adb logcat -s InputMethodManager
       6. adb shell am start -n com.example.android.supportv7/.Support7Demos
       7. Tap AppCompat -> Action Bar -> Action Bar Usage
       8. Tap the magnifier icon.
       9. Make sure that the software keyboard shows up.
      10. Make sure that in logcat a warning that showSoftInputUnchecked
          is going to be removed is shown.
Fixes: 36015425
Change-Id: If01316a0c2a210f9ea03b53700d0ef651955ba9c
2017-04-03 17:11:41 +00:00
TreeHugger Robot
e9679db5e2 Merge "Allow committing allowing state loss on detached FragmentManager." into oc-dev 2017-04-03 16:34:17 +00:00
TreeHugger Robot
35110948b7 Merge "Implement service filtering" into oc-dev 2017-04-03 14:45:57 +00:00
Bryce Lee
7efe56b779 Merge "Add app bounds to configuration." into oc-dev 2017-04-03 14:30:49 +00:00
Jorim Jaggi
aea6b74e17 Handle case when snapshot dimensions don't match
If the snapshot starting window has different dimensions than the
snapshots we have taken, we do the following:

- Create a child Surface that has exactly the dimensions of the
snapshot.
- We fill the parent surface with the app background color, as well
as all screen background decorations (status bar background,
navigation bar background).
- We also clip of the status bar/navigation bar background in some
cases, as it looks ugly if it's not behind the system bars.
- Furthermore, we inherit all layout flags on the window and all
layout relevant SystemUI flags on the window such that it's very
likely that the size will match, and the system bars are drawn
correctly.
- In order to make the transition from the snapshot to the real
window a bit more predictable/less messy, we enforce a minimum
duration the snapshot is visible, which is slightly more than our
app transitions.

Test: TaskSnapshotSurfaceTest
Test: Open app, go home, go landscape, open app again
Test: Go to multi-window, open app from recents with a snapshot
taken in fullscreen.

Fixes: 36703868
Change-Id: Ia2d4add6971a18ab7aa2942d2b644d6e87a402af
2017-04-03 15:36:29 +02:00
Jorim Jaggi
d6d6de6da4 Schedule window animations at vsync-sf
Test: Run window animation, make sure it's smooth
Test: Take systrace, make sure it runs at vsync-tick
Test: Move divider, make sure it's still smooth

Change-Id: I1600618e074be811134fe4ccb1dfbd5034820c71
Fixes: 36583867
2017-04-03 15:27:16 +02:00
TreeHugger Robot
fd463121c6 Merge "We really want f_frsize and f_bavail." into oc-dev 2017-04-03 07:37:49 +00:00
TreeHugger Robot
cb9ceb3fd4 Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev 2017-04-03 06:55:04 +00:00
Jeff Sharkey
dafb17e7eb We really want f_frsize and f_bavail.
It's confusing, but f_bsize is not the value you're looking for; the
real block size is f_frsize.  Fix all those bugs.

Also, the vast majority of clients are interested in the usable
disk space, not including reserved space.

Test: builds, boots
Bug: 36840579
Change-Id: Ib1470389afd49c14cab62282ec1e978ebb2c4791
2017-04-02 23:33:38 -06:00
Daichi Hirono
ea6e6e17a0 Process FuseAppLoop messages in Handler.Callback
Previously FuseAppLoop instantiates Runnable for each command, which
causes lots of instantiation and GC.

Test: CTS
Bug: 35229514
Change-Id: Ifea098e5ade044b1a954c0b714c5b3270a95cd1a
2017-04-03 05:03:03 +00:00
Jeff Sharkey
fe9a53bc45 Consistent dump() permission checking.
This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access.  It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.

Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
2017-04-02 22:29:07 -06:00
TreeHugger Robot
21a5edcc24 Merge "Override bidi property of new emojis" into oc-dev 2017-04-03 00:21:55 +00:00
Jakub Pawlowski
260846b31b Bluetooth 5 advertising duration refactoring (4/4)
Expose both duration and maximum extended advertising events to limit
advertising time.

Test: manual
Bug: 30622771
Change-Id: I44df300995ef985526b93f8c24389775720b3432
(cherry picked from commit 5a355610fe6ac0460f7130375de97b4d7bae7ba4)
2017-03-31 22:47:19 -07:00
Jakub Pawlowski
d89e4ba357 Bluetooth LE Advertising minor improvements
This patch adds some additional error checking for the advertising set
parameters, and some more comments.

Test: manual
Bug: 30622771
Change-Id: I87bd44f4179ef63694ad3ed656dc2acc52e40f1e
(cherry picked from commit f4ed33f5fa6ffa3bda6faff773a3fb90b16a760c)
2017-03-31 22:47:18 -07:00
Jakub Pawlowski
66bf1bd18b Fix advertise data size estimation
UUID in service data field can be 2, 4, or 16 bytes long.

Test: manual
Bug: 36553478
Change-Id: Ib5ba2d16065496ca311e8642a15a7ea6bc84d4c1
(cherry picked from commit 72e9e9f81504559ca18b71358203b1b39d9f0581)
2017-03-31 22:47:18 -07:00