Commit Graph

9523 Commits

Author SHA1 Message Date
Mathew Inwood
070eeaf375 Merge "Configurable sampling rate for hidden API access log events." into pi-dev am: fb55bd8706
am: d39b02157b

Change-Id: I135d9a3bb38c238185763dd14ef103ea860fbb1a
2018-04-11 10:43:38 -07:00
Mathew Inwood
fb55bd8706 Merge "Configurable sampling rate for hidden API access log events." into pi-dev 2018-04-11 16:45:19 +00:00
TreeHugger Robot
a75c41bd45 Merge "Deprecate InputMethodUtils#isSystemIme() part 3" 2018-04-11 15:03:46 +00:00
Kenny Guy
d04a72ac71 Add logging for smart replies in notifications. am: 23991105bd
am: 8f1810645f

Change-Id: I80db2ab8ddb846aa6df4d057cd7bbc0af33a34f6
2018-04-11 04:45:28 -07:00
Kenny Guy
23991105bd Add logging for smart replies in notifications.
Log the first time a notification with smart
replies is visible.
Log each click on a smart reply.

Test: atest SystemUITests
Bug: 72153458
Change-Id: I6dc498871000dbb9af978567db3d258b20978781
2018-04-11 10:09:03 +01:00
Yohei Yukawa
c823b634cc Deprecate InputMethodUtils#isSystemIme() part 3
With my previous two CLs [1][2], InputMethodUtils#isSystemIme() is
used nowhere. Hence we can safely remove this unused method.

 [1]: I9c8518988787b748ebb35fc86fe6beee1d6c633d
      fd70fe8fe1
 [2]: I33a8489c0597bd881dd8b68b28fc0d99109c11a5
      a3401f2cb0222d058f452885109071e9fd70a6be

Bug: 77730201
Test: compile
Change-Id: I959209c5fef7e9653e09333e860e763f0d4c262c
2018-04-10 21:52:03 -07:00
TreeHugger Robot
adb59a0126 Merge "Remove duplicate code from InputMethodUtils" 2018-04-10 23:13:36 +00:00
Yohei Yukawa
08a3ecea32 Remove duplicate code from InputMethodUtils
This is a follow up CL to my CL [1], which originally aimed to revert
the CL [2] that added several methods into InputMethodUtils but could
not because those methods were already used in other places.

Interestingly we already have almost the same code in
InputMethodAndSubtypeUtil in SettingsLib package on which those other
projects can depend on. Hence this CL removes InputMethodUtils' ones
to avoid code duplication.

Although in future we may move the logic back to framework internal,
at the moment it is more important to reduce code duplication.

Note that this CL also ports existing test cases for those two
functions from FrameworksCoreTests to RunSettingsLibRoboTests in
GoogleTruth style.

 [1]: I122a8f69b2f75a9af85e14b66db764c5d153040e
      ca7809507c
 [2]: I01f5fafbbcfe3e3f5313829162ec011eaf2ad991
      2028ddaa50

Fixes: 73056657
Test: atest InputMethodUtilsTest
Test: make RunSettingsLibRoboTests -j
Test: prebuilts/checkstyle/checkstyle.py -f frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/inputmethod/InputMethodAndSubtypeUtilTest.java
Change-Id: Iad926ffd9806482a5aef0d8c20d2049be40d03c9
2018-04-10 14:50:53 -07:00
Mathew Inwood
04194fef78 Configurable sampling rate for hidden API access log events.
To reduce log spam, we do not log all hidden API accesses. This CL allows
configuration of the sampling rate of the log events so it can be tweaked
later if necessary.

Test: m
Test: $ adb shell settings put global hidden_api_access_log_sampling_rate 65536
Bug: 64382372
Bug: 77517571
Change-Id: I659c22bd504564da58d972f94b774a9af4039386
2018-04-10 16:57:07 +01:00
TreeHugger Robot
1a19481e27 Merge "Deprecate InputMethodUtils#isSystemIme() part 1" 2018-04-09 22:02:46 +00:00
Yohei Yukawa
fd70fe8fe1 Deprecate InputMethodUtils#isSystemIme() part 1
There are not a small number of files that import InputMethodUtils
just to use InputMethodUtils#isSystemIme() is necessary.

In order to make InputMethodUtils purely an internal utility library,
it would make much more sense if the logic is implemented as a private
API of InputMethodInfo, like methods like
InputMethodInfo#isAuxiliaryIme(), rather than in a static method of
InputMethodUtils.

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

Bug: 77730201
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodUtilsTest
Change-Id: I9c8518988787b748ebb35fc86fe6beee1d6c633d
2018-04-08 12:19:56 -07:00
Mike Ma
a15aa6e2fd Merge "Fix ambient display time unit error" into pi-dev 2018-04-06 19:32:20 +00:00
TreeHugger Robot
bcccb1aff5 Merge "Switch to Saturated color mode when Accessibility transforms are active" into pi-dev 2018-04-06 17:12:01 +00:00
Mike Ma
e074da1804 Fix ambient display time unit error
Treated return value from mStats.getScreenDozeTime as ms, but indeed it
is us.
Fixes: 77655868
Test: manual

Change-Id: Ic9838a2fca3f49a6f5a669bd1970dcc7560fb5e2
2018-04-05 17:29:42 -07:00
Selim Cinek
9acd673c0d Migrated the Person class to its own file
Because we are expecting usage of Person across
other surfaces, we migrate the class out
of he Notification class which is already incredibly
huge.

Test: Migrated existing cts test
Change-Id: Ia487ae7965b5ca2b016245d21faa63e3b4628344
Fixes: 75980526
2018-04-05 17:21:11 -07:00
TreeHugger Robot
d7c3ba204c Merge "Ensured that the reply icon isn't showing on HUNS" into pi-dev 2018-04-05 23:57:11 +00:00
Vishwath Mohan
5ab3cf8bec Merge "Rename BiometricDialog to BiometricPrompt." into pi-dev 2018-04-05 21:23:32 +00:00
TreeHugger Robot
822ce4f3aa Merge "Activity interceptor dialog for suspended apps" into pi-dev 2018-04-05 21:15:19 +00:00
Vishwath Mohan
ecf00cedb6 Rename BiometricDialog to BiometricPrompt.
Renamed to BiometricPrompt per API-council feedback.

Bug: 77494933
Test: m -j70
Change-Id: Ifed2b8f3439a7e671e0ce46d3a7db9f24871b16a
2018-04-05 10:41:19 -07:00
Kevin
79ed9ecff3 Turn off notification in-line images for low ram devices
Bug: 77598694
Change-Id: Icdd4c2ef790d2d657f7670fa8c1b8b39b7aa62e4
Fix: 77598694
Test: manual, tested notification on gobo and sailfish
2018-04-05 10:17:45 -07:00
Suprabh Shukla
3c3af1406e Activity interceptor dialog for suspended apps
Added an AlertActivity to intercept the start for an activity belonging
to a suspended app. More details will be shown if the suspending app
also defines an activity to handle the API action
SHOW_SUSPENDED_APP_DETAILS.

Test: Added tests to existing classes. Can be run via:
atest com.android.server.pm.SuspendPackagesTest
atest com.android.server.pm.PackageManagerSettingsTests
atest com.android.server.pm.PackageUserStateTest

Bug: 75332201
Change-Id: I85dc4e9efd15eedba306ed5b856f651e3abd3e99
2018-04-04 18:40:19 -07:00
TreeHugger Robot
a926126a8b Merge "Frameworks: In the kill handler, ensure the logging handler was run" into pi-dev 2018-04-04 15:04:37 +00:00
Mike Ma
2873d59e0b Merge "Register broadcast receiver at runtime instead" into pi-dev
am: 806be6b602

Change-Id: I3375ae095ef08830ea1892c3652832d17308340d
2018-04-03 18:51:08 -07:00
Andreas Gampe
bae0bb191e Merge "Frameworks: In the kill handler, ensure the logging handler was run" am: c0ac9e916f
am: c9740fb393

Change-Id: Ie65982c54312c3eb854a4e663fe7bd0ff22c92c5
2018-04-03 13:41:25 -07:00
Andreas Gampe
c9740fb393 Merge "Frameworks: In the kill handler, ensure the logging handler was run"
am: c0ac9e916f

Change-Id: Ica29cdf9a4b17b6cec957093c35b735d64568029
2018-04-03 13:29:06 -07:00
Mike Ma
fbc01fcbd5 Register broadcast receiver at runtime instead
Cannot find class when registering Usb connection broadcast receiver
in AndroidManifest, causing system process to crash. Switch to
register receiver at runtime when boot complete.

Fixes: 77274266
Test: Manually plug & unplug usb cable, and reboot device
Test: Verify usb_data appears in batterystats dump
Test: Verify there is no crash log
Change-Id: If4a9e85aa81173ad6d8cb6ce28cc030814c520a5
2018-04-03 12:32:56 -07:00
Andreas Gampe
b1f5312c61 Frameworks: In the kill handler, ensure the logging handler was run
In the KillApplicationHandler for uncaught exceptions ensure that the
LoggingHandler has been run. This ensures logging when code directly
calls getUncaughtExceptionHandler().uncaughtException().

(cherry picked from commit 50fa122cff)

Bug: 29624607
Bug: 73380984
Test: m
Test: manual
Merged-In: I9c9216714b4cf029d7ed21e29313c0e802345337
Change-Id: I9c9216714b4cf029d7ed21e29313c0e802345337
2018-04-03 11:22:25 -07:00
Andreas Gampe
50fa122cff Frameworks: In the kill handler, ensure the logging handler was run
In the KillApplicationHandler for uncaught exceptions ensure that the
LoggingHandler has been run. This ensures logging when code directly
calls getUncaughtExceptionHandler().uncaughtException().

Bug: 29624607
Bug: 73380984
Test: m
Test: manual
Change-Id: I9c9216714b4cf029d7ed21e29313c0e802345337
2018-04-03 08:33:28 -07:00
Sanry Huang
7a8aac8c6e Merge "android:ui crash on longpress of empty tile" into pi-dev 2018-04-03 02:22:48 +00:00
Daniel Solomon
317a35743b Switch to Saturated color mode when Accessibility transforms are active
The Accessibility settings for color inversion and color correction are
incompatible with some color modes. When either of these settings is
toggled, switch to Saturated mode. When both settings are disabled,
revert back to the user's color mode preference.

Bug: 68856024
Test: runtest -c com.android.server.ColorDisplayServiceTest
frameworks-services
Change-Id: I497b893f5d0f4bb5dff23bb38cf20d9b6b587050
2018-04-02 14:54:40 -07:00
Remi NGUYEN VAN
75525b39f4 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52
2018-04-02 13:30:02 +00:00
Remi NGUYEN VAN
6f5a8db2e9 Merge "Add method to NetworkStatsService for UID stats." into pi-dev 2018-04-02 05:40:04 +00:00
sanryhuang
296ca9e933 android:ui crash on longpress of empty tile
null pointer check because of resolveInfoForPosition is nullable

Test: manual
Bug: 62441400
Change-Id: I0a720f30f9e76d9bedf6175a6ba951bcf1707c47
2018-03-31 11:34:34 +08:00
TreeHugger Robot
a6d6a5aa79 Merge "Adding LauncherApps apis for suspended packages" into pi-dev 2018-03-31 00:39:52 +00:00
Suprabh Shukla
19b41f34a5 Adding LauncherApps apis for suspended packages
The suspending app can provide a Bundle of information to be used by the
launcher for handling suspended packages. Added APIs:
 - getSuspendedPackageLauncherExtras(String, UserHandle): To retrieve
 the launcher extras for the given package and user.
 - Callback#onPackagesSuspended(String[], UserHandle, Bundle): A
 callback that will be invoked with the package names and the launcher
 extras whenever sent packages are suspended.

Test: atest com.android.server.pm.SuspendPackagesTest

Bug: 76119578
Change-Id: I505d134809639a57c3314f994af34d576d905e74
2018-03-30 21:21:41 +00:00
Vishwath Mohan
18dcd47796 Don't clear mPattern when clearing visual pattern.
This CL ensures that when clearing the lockscreen pattern in
onHandleUp(), we retain mPattern. This fixes a bug that prevents
changing from Pattern to other modalities.

Bug: 77257848
Test: Change from pattern to pin/password

Change-Id: Ied74eafd17939214c62bdd617ecef7a9974f755d
2018-03-30 10:58:59 -07:00
Remi NGUYEN VAN
b6a920124f Add method to NetworkStatsService for UID stats.
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.

Test: runtest frameworks-net, CTS tests pass.
Bug: b/72107146
Merged-In: I31c5b9b4a7c6e72910152415894a137f000a5858
Merged-In: I2527d95000c7500c824ede70f87ecb38e21ed323
(cherry picked from aosp 088ff6824f)

Change-Id: Ie80f1bb21124241f3414f9be77aceac9a44ec6d1
2018-03-30 18:58:18 +09:00
Dmitry Dementyev
86f5bb1a8c Remove deprecated generateAndStoreKey method implementation
Bug: 77156834
Test: GTS, apct.
Change-Id: I23791fced21308467afc60cc16efc4aee7074134
2018-03-30 05:58:11 +00:00
Vishwath Mohan
b03dd4f4a3 Revert "Clear pattern on completion (if fade is enabled)."
This reverts commit b8e9782f70.

Bug: 77257848
Test: Can change from pattern to pin/password

Change-Id: I17f9625e506c8e0839fffa95a62c904890cac603
2018-03-29 12:53:56 -07:00
Anton Philippov
d903074ea8 Add FLAG_INCREMENTAL support to LocalTransport.
Implement performBackup() with flags argument:

1. If FLAG_INCREMENTAL is passed and transport has no data for this
package or supports only non-incremental backups, request a non-incremental retry.
2. If FLAG_NON_INCREMENTAL is passed, but transport has data, discard
that data and continue.

Bug: 72212840
Test: GTS test in the same topic
Change-Id: I4c4a1dbfa1a807e4d4c523f42bb6a404a39731e9
2018-03-29 16:56:10 +01:00
Remi NGUYEN VAN
aa20932ff1 Merge "Fix network usage stats on 464xlat tethered."
am: 83088dcd8e

Change-Id: I0e13c2a6b9f6b5d0701a073ddc835781d5d2aace
2018-03-29 07:36:21 +00:00
Mathew Inwood
fe930f2023 Merge "Configurable hidden API exemptions." into pi-dev 2018-03-29 06:49:27 +00:00
TreeHugger Robot
9cfdcfaf92 Merge "Clear pattern on completion (if fade is enabled)." into pi-dev 2018-03-29 01:06:06 +00:00
Adam Bookatz
f50e78d8f7 Merge "Fix statsd ble scan logging" into pi-dev 2018-03-28 21:49:29 +00:00
Vishwath Mohan
86ed912f5a Merge "Refactor FingerprintDialog to BiometricDialog" into pi-dev 2018-03-28 18:46:34 +00:00
TreeHugger Robot
744e6f1738 Merge "Also allow avoiding gfx acceleration at runtime" into pi-dev 2018-03-28 14:58:10 +00:00
Mathew Inwood
8faeab8735 Configurable hidden API exemptions.
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509

(cherry picked from commit 2c6f97d4c9)

Merged-In: Ib1245b69da4dac50c6968f1be62f1a74591dc433
Change-Id: I7b590f272fdcfcda5f18e216788ac34bc58beaed
2018-03-28 11:54:17 +01:00
Remi NGUYEN VAN
9fb55e4f03 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage

Change-Id: I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda
2018-03-28 12:14:14 +09:00
Vishwath Mohan
b8e9782f70 Clear pattern on completion (if fade is enabled).
This CL clears the pattern immediately once it's completed. This
ensures that a half-drawn pattern doesn't remain as an artifact on the
lock-screen while we display an error message.

This behavior is gated on pattern fading, so if that's disabled, then
we retain the previous behavior (of showing the incorrect pattern
along with the error message).

Test: Draw an incorrect pattern.
Bug: 74531517
Change-Id: I41569e3fe10f91b787ef22600beb66d44f98cd90
2018-03-27 19:30:52 -07:00
Bookatz
e5ec0b4433 Fix statsd ble scan logging
Ble scan logging in statsd has a few problems:

1. We want finer-grained detailed than just 'unoptimized'. What defines
unoptimized should be done at the config level, not be hard-coded.

2. The current mechanism is actually incorrect. When reset is called,
each ble scan is only told *once* that it stopped, but if the nesting
level is higher than that, statsd will think it is still nonetheless
running.

Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testBleUnoptimizedScan
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testBleScan
Fixes: 71607284
Fixes: 69478888

Change-Id: Ied44f79aa569daab2acc85e90627a9736d0689a3
2018-03-27 15:14:23 -07:00