Commit Graph

4430 Commits

Author SHA1 Message Date
Rhed Jao
7102a0dfcc Merge "Add text entry key property to a11y info node" 2018-09-18 06:06:31 +00:00
Yuanjia Hsu
c8c132959a Merge "resolve merge conflicts of 2cb9a70cac to master" 2018-09-17 21:35:22 +00:00
Marcin Oczeretko
3f2486de70 Merge "Prepare LooperStats to be collected as a Westworld gauge matric" 2018-09-17 20:40:17 +00:00
Seigo Nonaka
14a081f271 Merge "Unhide Paint.getTextRunAdvances" 2018-09-17 18:55:54 +00:00
Marcin Oczeretko
3e6494eb3e Prepare LooperStats to be collected as a Westworld gauge matric
- call LooperStats.reset() from StatsCompanionService
- add screen_interactive to the LooperStats atom
- temporarily set uid = 1000 to avoid statsd warnings that the uid is invalid

Bug: 113651685
Test: Manual and UTs
Change-Id: Iacf45fcb746c6bb9837456a2a0c74f5a073ff822
2018-09-17 17:25:55 +01:00
yuanjiahsu
8eb9d4711b resolve merge conflicts of 2cb9a70cac to master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ic1db72d57f3003bcec0fd8f7fbb2dc4ec7b5dcf3
2018-09-17 23:46:14 +08:00
Yuanjia Hsu
2cb9a70cac Merge "Add feature flag in Settings." am: 55b91f6d93
am: b04fcd5842

Change-Id: I22e073bcbe7c2bacfdce44dd4c05b47fab3059f1
2018-09-17 07:25:33 -07:00
Yuanjia Hsu
b04fcd5842 Merge "Add feature flag in Settings."
am: 55b91f6d93

Change-Id: I27aa24563358fe4467de3aa3660825f1d8bd73d5
2018-09-17 07:09:28 -07:00
Yuanjia Hsu
55b91f6d93 Merge "Add feature flag in Settings." 2018-09-17 13:43:08 +00:00
Rhed Jao
b11b75ac50 Merge "Spoken feedback when a11y shortcut dialog is shown" 2018-09-17 08:37:11 +00:00
TreeHugger Robot
134ffb0c25 Merge "Move 3 IMMS utility classes to services.jar" 2018-09-15 17:20:28 +00:00
TreeHugger Robot
a02f4332b3 Merge "Extract constructLocaleFromString()" 2018-09-15 16:58:05 +00:00
TreeHugger Robot
ef25beb18a Merge "Extract getSuitableLocalesForSpellChecker()" 2018-09-15 16:40:23 +00:00
TreeHugger Robot
abcfcbbbfe Merge "Move LazyIntToIntMap to services.jar" 2018-09-15 01:07:59 +00:00
Seigo Nonaka
eb749119e6 Unhide Paint.getTextRunAdvances
This is necessary for getting individual character advances.

The only char[] version of getTextRunAdvances is used, so removing
String/CharSequence versions.

Bug: 112327179
Test: atest android.graphics.cts.PaintTest#testGetTextRunAdvances
Change-Id: Ic49a4742cccb2a5155f6afacef3555e29c7a061c
2018-09-14 11:57:20 -07:00
TreeHugger Robot
7b39606eae Merge "Create LocaleList and HashSet lazily to save OS boot time" 2018-09-14 06:44:42 +00:00
Seigo Nonaka
0eb713d17a Create LocaleList and HashSet lazily to save OS boot time
Creating HashSet and LocaleList in Zygote make performance impact
to the boot time. Since this API is not called so frequently and less
application is expected to call this API. So let's make Set and
LocaleList only when it is requested.

Here is a result of boot time perf test:
Before: TOTAL_BOOT_TIME : 16229.5
After : TOTAL_BOOT_TIME : 11704.0

Bug: 114774424
Test: atest android.graphics.fonts
Test: atest TypefaceSystemFallbackTest
Change-Id: I07247a78f6091c8adfaac748fe4a77a4597b1ae2
2018-09-13 10:58:14 -07:00
Steven Moreland
8b4ce09de4 Merge changes from topic "remove-hidl-boot-jars" am: 82e3d2f066 am: fc8de0d9e3
am: d70998a8d9

Change-Id: Iee10a8281e023c9917fb81a2e72be1475dc10772
2018-09-13 10:35:38 -07:00
Steven Moreland
d70998a8d9 Merge changes from topic "remove-hidl-boot-jars" am: 82e3d2f066
am: fc8de0d9e3

Change-Id: If4d5c5e99bf605f31371426ab3a5def66f0a0137
2018-09-13 09:57:42 -07:00
Steven Moreland
fc8de0d9e3 Merge changes from topic "remove-hidl-boot-jars"
am: 82e3d2f066

Change-Id: I17b89f904ed17ee8f1f31c6d56cb96da705cb553
2018-09-13 09:40:50 -07:00
Jeff Sharkey
8068dfe6be Merge "Utilities for content:// Uris and file modes." 2018-09-13 15:20:59 +00:00
Rhed Jao
a42495ef22 Add text entry key property to a11y info node
This property is used to help accessibility services to
improve the typing experience

Bug: 110990026
Test: atest AccessibilityNodeInfoTest
Change-Id: I5295ac8b321e1539df7c83ee7b8b376df5ef8721
2018-09-13 10:28:56 +08:00
Yohei Yukawa
e6b6e0e785 Move 3 IMMS utility classes to services.jar
Short summary:

There is no need to have these 3 utility classes in frameworks.jar,
because these classes are used only from InputMethodManagerService
(IMMS) and its utility classes. We should move them to services.jar.

Long summary:

 * InputMethodSubtypeSwitchingController

This class was mistakenly placed in the current Java package since its
beginning [1].  This class is purely a state machine that is designed
to be used only from IMMS hence there has been no way for app
processes to use this class in a meaningful way.

 * LocaleUtils

This class was also mistakenly placed in the current Java package
since its beginning [2].  This class is purely a state machine that is
designed to be used only from IMMS hence there has been no way for app
processes to use this class in a meaningful way.

 * InputMethodUtils

The situation of InputMethodUtils is a bit different.  It was
introduced in the right place actually [3], because the original
purpose of this class was to share some utility methods between IMMS
and the Settings application.  For that purpose, having this class
under frameworks/base/core/java instead of frameworks/base/services/
totally made sense.

What was unfortunate is that we have kept adding more and more utility
methods into InputMethodUtils since then, even though most of methods
have been used only from IMMS.  To make things worse, more and more
random components started depending on this utility class.  When we
realized it, we were in the situation where we could not even easily
refactor methods in InputMethodUtils without updating a bunch of
call-sites across repositories, including multiple platform-specific
Settings app and SetupWizards.

This is basically why I decided to stop allowing Settings apps and
SetupWizard to use InputMethodUtils, and decided to let them depend on
SettingsLib [4] instead.  After many cleanup CLs [5], we have finally
achieved the state where InputMethodUtils is used only from the system
server process.

 * A special bonus

With my previous CL [6], we can even make these 3 utility classes
package-private, which guarantees that only IMMS and its utility
classes directly depends on these utility classes.

 * Risk

Now that this is purely a mechanical refactoring of an implementation
detail within frameworks/base, there should be no observable behavior
difference.

 [1]: I11ed9a767588f8080753cd9bce011dac7db579ad
      d7443c83ce
 [2]: I315cf3722a06e00bdbfac284c4949578da8fe78d
      102ff0726d
 [3]: I0bc9954f163a3ec38d08b9ba842a8a31176eb6a6
      8e303cc5dd
 [4]: frameworks/base/packages/SettingsLib
 [5]: CLs that have Bug 77730201 in their commit messages
 [6]: I023d8f2863601ee54f304988117d8ea750770f70
      603f4d00c6

Bug: 77730201
Bug: 114660660
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod
Test: atest FrameworksServicesTests:com.android.server.inputmethod
Change-Id: I37594096151d77adb6741a41d7985a4506f96ccb
2018-09-12 16:42:48 -07:00
Yohei Yukawa
835ab94bdb Extract constructLocaleFromString()
The main motivation of this refactoring is to move InputMethodUtils to
com.android.server.inputmethod as a package-private class.  With a lot
of cleanup CLs in Bug 77730201, the only remaining utility method that
is used by multiple Java package is this constructLocaleFromString()
method.

This is purely a mechanical refactoring.  There should be no
observable behavior difference.

Bug: 114660660
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod
Change-Id: Ic47b680ad9efde104015d34311f49e224d3fb56f
2018-09-12 16:23:26 -07:00
Yohei Yukawa
3781ca8c64 Extract getSuitableLocalesForSpellChecker()
When I needed to introduced a new helper method for
TextServicesManagerService (TSMS) to fix Bug 22042994 [2] I was just
lazy and decided to put it into InputMethodUtils instead of creating a
new utility class for TSMS.

Now that InputMethodUtils is going to be moved to
com.android.server.inputmethod as a package-private utility class, it
is time to pay off my laziness.

With this CL, getSuitableLocalesForSpellChecker() will be extracted
out from InputMethodUtils to a new package-private utility class
com.android.server.textservices.

This is purely a mechanical refactoring.  There should be no
observable behavior difference.

 [1]: I094f1c33430f7904a1dac6167431d6df64a07212
      174843afb6

Bug: 77730201
Bug: 114660660
Bug: 115516399
Test: atest FrameworksCoreTests:com.android.internal.inputmethod
Test: atest FrameworksServicesTests:com.android.server.textservices
Change-Id: If6cd051aa0ae7780631d5bec5b7d01faac4a83a0
2018-09-12 15:36:03 -07:00
Yohei Yukawa
81e806a72a Move LazyIntToIntMap to services.jar
This class should have lived in services.jar.  When I introduced
LazyIntToIntMap [1] to re-enable cross-profile use of spell checker
APIs, I unnecessarily put this class in frameworks.jar despite the
fact that this utility class is used only in the system server
process.

This CL also makes this utility class package-private so that other
component will not accidentaly depend on it.

This is purely a mechanical refactoring.  There should be no
observable behavior difference.

 [1]: Ic046f832f203115106409a53418a5746eb6d4939
      3f8c568883

Bug: 115516399
Test: atest FrameworksServicesTests:com.android.server.textservices
Change-Id: I9390ba11687e1db66d02fe1cdfb9ed59adde3768
2018-09-12 15:33:25 -07:00
TreeHugger Robot
94da778113 Merge "Simplify WebView RELRO creation and handle more cases." 2018-09-12 21:36:36 +00:00
TreeHugger Robot
3f2333b050 Merge "Revert "Prepare to make InputMethodUtils package-private"" 2018-09-12 20:42:45 +00:00
Jeff Sharkey
63280e06fc Utilities for content:// Uris and file modes.
Bug: 111268862, 111960973
Test: atest cts/tests/tests/content/src/android/content/cts/ContentUrisTest.java
Test: atest frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
Change-Id: I94373055468d279e6553d4a038267732b9b53745
2018-09-12 12:35:52 -06:00
Yohei Yukawa
24d8f6d0ff Revert "Prepare to make InputMethodUtils package-private"
This reverts commit 16703c4b47.

Reason for revert:
Just realized that this was not the best approach.

We could already make LocaleUtils package-private too before this CL.
So the right approach was moving these methods to new Java class(es)
instead of moving these methods to LocaleUtils.

Bug: 77730201
Bug: 114660660
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod
Change-Id: I29c87b9692f0f5e8255835579e2fb5270bc6c9c3
2018-09-12 17:26:55 +00:00
Steven Moreland
f36ad62907 pm: Add hidl libraries to old class paths.
These two libraries:
android.hidl.base-V1.0-java
android.hidl.manager-V1.0-java

are being removed from BOOT_JARS. This change facilitates linking to them
for libraries or prebuilts in or before P.

Test: atest android.content.pm.AndroidHidlUpdaterTest
Bug: 77307025

Change-Id: Ic0db24cc68d66f5dbfab126ce7e304eec0bfc969
2018-09-12 09:18:40 -07:00
TreeHugger Robot
8f6b7dd91a Merge "Revert "Revert "Add null check for vrManager""" 2018-09-12 14:16:11 +00:00
Kenny Guy
fb59cfa0ca Merge "Remove 0 param BrightnessConfiguration.Builder constructor" 2018-09-12 13:25:37 +00:00
Rick Yiu
5ba61f45b8 Revert "Revert "Add null check for vrManager""
This reverts commit e19a4540ff.

Bug: 112064298
Change-Id: I3893684d85200c7396195831a95be270c6394211
2018-09-12 07:17:32 +00:00
TreeHugger Robot
5789fa6b73 Merge "Prepare to make InputMethodUtils package-private" 2018-09-11 21:19:48 +00:00
Kenny Guy
d62c3cfcc3 Remove 0 param BrightnessConfiguration.Builder constructor
Tidy up constructor that was hidden rather than removed
to allow pre-release versions of zebedee to work.

Test: atest BrightnessMappingStrategyTest
Test: atest android.display.cts.BrightnessTest
Test: atest BrightnessConfigurationTest
Change-Id: I89989d426ba84232843ddd45f614b837d47086a6
2018-09-11 17:57:46 +01:00
yuanjiahsu
88363e9b2f Add feature flag in Settings.
User can enable/disable faster emergency phone call feature by switching
this flag from Settings, and the old flag switched by adb command was
replaced by this feature flag.

Test: Manually
Bug: 113539598
Change-Id: Ie38f4657bfd76d8386ce2a075f4ec5d0038f5c3d
2018-09-11 15:04:51 +08:00
Yohei Yukawa
16703c4b47 Prepare to make InputMethodUtils package-private
In Bug 77730201, we cleaned up a bunch of files so that only modules
inside framework/base depend on InputMethodUtils.  This CL is a
preparation of a further hardening.

Just by moving two utility methods from InputMethodUtils to
LocaleUtils, InputMethodUtils is used only from
InputMethodManagerService and its direct dependencies.  This allows us
to make InputMethodUtils package-private class to make sure anyone
outside our team is unexpectedly depending on InputMethodUtils in a
subsequent CL.

This is a mechanical refactoring.  There should be no observable
behavior difference.

Bug: 114660660
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod
Change-Id: Ie8cb198880a145a7b81d2bf1eae1531ac3614019
2018-09-10 15:19:53 -07:00
Adrian Roos
e19a4540ff Revert "Add null check for vrManager"
This reverts commit ddf1b4b476.
Bug: 112064298
Change-Id: I6c4d0a52b28d0d09f37bd5c9c8da5f6c2b4791cb
2018-09-10 16:10:24 +00:00
Rick Yiu
ddf1b4b476 Add null check for vrManager
If VrManagerService is not started, vrManager will be null. Need
add check for it.

Test: build pass
Bug: 112064298
Change-Id: If834d0f061c99c61043696afc8f737be2f85459a
2018-09-08 19:06:11 +08:00
Seigo Nonaka
18df22767e Merge "Introduce system font enumeration API" 2018-09-07 17:14:13 +00:00
Phil Weaver
b8c855d1da Merge "Add test mapping for a11y" 2018-09-06 18:25:57 +00:00
Marcin Oczeretko
c80c81a516 Extract CachedDeviceState from BinderCallsStats
Add a service that tracks the device state properties which are
interesting to System Server telemetry services. Allows the services to
share this code and have consistent state information.

Test: Unit tests and manually tested
Change-Id: Ia5c78c45a55414a0c5c46202db2a37283b50a703
2018-09-06 10:54:55 +01:00
Marcin Oczeretko
3680ae6276 Add a flag to enable/disable LooperStats collection
Test: Manually tested

Change-Id: I9cd4c819297ea34ab59c3cf9cfd11136987acc22
2018-09-06 10:54:35 +01:00
Seigo Nonaka
c7b3e62f0d Introduce system font enumeration API
To be able to use font file in their apps, provides blob and path to the
font file and locale list as well.

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

Change-Id: I1ae1302c6906b808012e1e91b1e4ab393c887cb6
2018-09-05 14:54:12 -07:00
Marcin Oczeretko
f1d4563acd Merge "Collect telemetry data for System Server Loopers." 2018-09-05 19:12:45 +00:00
Ying Zheng
d067cd25ee MASTER - Add signal for last active user in global settings.
Bug: 112759705
Test: build
Change-Id: Ib68b3c643f86ef1d4b441dc3e6d535cf5e7430ae
2018-09-04 10:15:34 -07:00
Seigo Nonaka
a1aedd2108 Merge "Disable tests failing with ICU62" am: cc11cf2ef2
am: 886f1488ea

Change-Id: I82ec86c5187639f8b3ac14d9fc4bd77aed1befb1
2018-09-04 02:50:29 -07:00
Seigo Nonaka
886f1488ea Merge "Disable tests failing with ICU62"
am: cc11cf2ef2

Change-Id: I64229a24eb0c20a81d8c548504d9a97de457c074
2018-09-04 02:41:06 -07:00
Treehugger Robot
cc11cf2ef2 Merge "Disable tests failing with ICU62" 2018-09-04 09:21:26 +00:00