Commit Graph

10160 Commits

Author SHA1 Message Date
Marcin Oczeretko
f1d4563acd Merge "Collect telemetry data for System Server Loopers." 2018-09-05 19:12:45 +00:00
TreeHugger Robot
7ea11f2b14 Merge "Remove movement estimates from pointer location" 2018-09-05 16:13:09 +00:00
Siarhei Vishniakou
8ab705d7c1 Remove movement estimates from pointer location
When pointer location is enabled, a line starting from (0,0) is drawn in
both positive and negative directions. This line is used for "movement
estimates", or predicted future coordinates of pointer location using
extrapolation with polynomials.

It's unclear what it's used for, but it is annoying to see on screen
when pointer location is enabled. It also only shows up on flings
directed to the top left corner or to the bottom right corner. It does
not show up otherwise, so it's likely not working as intended anyways.

Fixes: 111195578
Test: enable pointer location, the flings in different directions to
ensure that the line originating from (0,0) is no longer present.
also try flinging with multiple fingers to ensure that no crashes are
observed and velocities are displayed for each finger.

Change-Id: I42b2cbd7deebb2cb3593172156c3d948c8d7ba4d
2018-09-04 17:26:12 -07:00
Kenny Guy
2385d4fa78 Fix BrightnessTracker's handling of color temperature
If the user was using the default color temperature
for nightmode BrightnessTracker would incorrectly
record it as 0.

Bug: 112626811
Bug: 113656622
Test: atest BrightnessTrackerTest
Change-Id: Ib9152f516d0f2b24e1a3f91748f7ccc1647db222
2018-09-03 18:24:46 +01:00
Marcin Oczeretko
d8cc8593c0 Collect telemetry data for System Server Loopers.
Adds LooperStats and LooperStatsService which set a static
Looper.Observer to record the count of dispatched messages and
cpu/latency information. The aggregated stats are collected by
Westworld as pulled atoms.

The collection is disabled by default and requires a manual call to
enable:

adb shell cmd looper_stats enable

Test: Unit tests and tested manually that the collected data seems
reasonable.

Change-Id: I7162fbca4e324f62887f95df3405205cbe4416ca
2018-09-03 16:06:06 +01:00
Kevin Chyn
5a2ff5d7a2 Send authentication type from AuthenticationClient to BiometricDialog
Bug: 111461540

Test: Tested with BiometricPromptDemo

Change-Id: Id495dbb7465675a2a5b0b5f99c34a29297f89f55
2018-08-31 17:45:25 -07:00
TreeHugger Robot
a6a5972d74 Merge changes I453200fd,I706654ec
* changes:
  Hide IInputMethodManager.{add,remove}Client() from apps
  Move InputMethodManagerInternal to server package
2018-08-30 17:35:01 +00:00
TreeHugger Robot
dd13082dde Merge "[Magnifier-46] Add builder for magnifier objects" 2018-08-30 11:25:15 +00:00
Mihai Popa
469aba83bb [Magnifier-46] Add builder for magnifier objects
The CL adds a builder class that enables creating Magnifier objects with
custom properties. The defaults of the builder remain the predefined
values of the magnifier in P.

Bug: 72211470
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I066082fb17cfb8c483c49b7011abfa9dca9de77a
2018-08-29 11:16:14 +01:00
Yohei Yukawa
e24ed79edb Hide IInputMethodManager.{add,remove}Client() from apps
Since IInputMethodManager.{add,remove}Client() are just callbacks from
WindowManagerService to InputMethodManagerService, we can simply move
those two methods to InputMethodManagerInternal instead of having them
in IInputMethodManager.aidl, which ends up exposing those methods to
any random user process.

This enables us to clean up WindowManagerService because it is no
longer responsible for obtaining IInputMethodManager and passing it to
each Session instance.

This also allows us to get rid of several RemoteException handlers
from Session class, because now the complier knows that those
callbacks will never throw RemoteException.

Fix: 112670859
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: prebuilts/checkstyle/checkstyle.py -f frameworks/base/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
Change-Id: I453200fd5847e9a78876affb6a1caec221525e1d
2018-08-28 19:10:32 -07:00
TreeHugger Robot
890efce117 Merge "BatteryStats: Fix BleScan apportioning" 2018-08-28 22:38:47 +00:00
Jeff Sharkey
202a16ec96 Merge "More robust MTP-to-MIME-type mappings." 2018-08-28 20:51:37 +00:00
TreeHugger Robot
1545cd72a2 Merge "Remove IInputMethodClient.setUsingInputMethod()" 2018-08-28 20:33:18 +00:00
Jeff Sharkey
3d80a7d36a Merge "Clean/destroy app shared storage via installd." 2018-08-28 19:37:19 +00:00
Jeff Sharkey
91e3cd4c6c More robust MTP-to-MIME-type mappings.
Recently in I830717428e72ac37c5ecd1f23d915aa878ef3744, we greatly
improved the underlying file-extension-to-MIME-type mappings defined
in libcore and used across the OS.

Instead of maintaining divergent mappings here in MediaFile, this
change delegates all file extension logic down to libcore, and
standardizes all MediaScanner internals on using MIME types.  To
register new file types in the future:

1. Add the MIME-to-extension registration in libcore.
2. Add the MIME-to-MTP mapping here in MediaFile.

This change also ensures that unknown MIME types are surfaced
across MTP, using constants like FORMAT_UNDEFINED_AUDIO for audio/*
until an explicit format is defined.

We now surface WMA/WMV file formats, even if the device can't
natively play them back, since we still want to offer the ability
for users to copy them around, and the user may have a third-party
app capable of playing them.

Keeps @UnsupportedAppUsage intact for now.

Bug: 111268862, 112162449
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaFileTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2f6a5411bc215f776f00e0f9a4b7d825b10b377d
2018-08-28 13:02:35 -06:00
Yohei Yukawa
68723904fb Remove IInputMethodClient.setUsingInputMethod()
This is a no-op method.

Bug: 112722651
Test: compile
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Ic990588c868f9173bbbe73dcfc5b193642dcc294
2018-08-28 11:37:09 -07:00
Bookatz
f1d860dd8f BatteryStats: Fix BleScan apportioning
The current BleScan apportioning formula has an error.
leftOverRxTimeMs is supposed to be constant at this point,
representing all the transfer time not already accounted
for by the scanning time. That figure is independent of which uids have
already been processed.
Note that updateWifiState has the same basic
formula (for Wifi accounting) but without this bug.

Bug: 113269219
Test: none
Change-Id: I600ac5e238580d951baa60ba02ed6d99ff48b6b1
2018-08-28 17:31:14 +00:00
Jeff Sharkey
4e7a765855 Clean/destroy app shared storage via installd.
In P we moved destroying per-user shared storage into installd,
where it can iterate quickly over large sets of files.  This change
now moves cleaning/destroying of per-app shared storage data down into
installd, letting us greatly simplify the logic in PMS to no longer
require spinning up DefaultContainerService.  This also fixes an
obscure bug where DCS (which always runs as USER_SYSTEM) wasn't able
to clear shared storage for secondary users.

This also gives us the ability to target specific storage devices
by UUID, such as when the user has migrated their primary shared
storage to an adopted device.

We no longer distinguish between keeping or deleting OBB files
during various operations, since upcoming changes in the Q release
will mean OBB files are no longer shared between users, and they'll
now live inside a sandbox that will be fully cleared when the user
clears data.  (Going forward, apps should be using splits instead
of OBBs, so they're effectively deprecated.)

Uses newer "const" feature of AIDL to ensure constant values remain
consistent between native and Java code.

Bug: 111854851, 111838160
Test: atest android.appsecurity.cts.StorageHostTest#testCache
Change-Id: Ib90be155718a768da76110fbfcf010a471b37378
2018-08-27 20:42:47 +00:00
Yohei Yukawa
383c93adf5 Remove an obsolete comment about BridgeIInputMethodManager
BridgeIInputMethodManager has been removed [1].

 [1]: I6cc2ec078230064fcce3656788589af59a1f7e2d
      116000a4c644ddd562efeb1ee549909be0d7b332

Bug: 27297992
Test: compile
Change-Id: Iba6e1bb90c92692ab16ab2dd9d83665fe7e1c48c
2018-08-24 15:34:15 -07:00
Bill Lin
b78d6fdaab Merge "Unable to load BRs in SAF of FileSystemProvider" 2018-08-24 14:25:40 +00:00
Sudheer Shanka
6d7e402a50 Merge "Allow some apps to get full access to external storage." 2018-08-24 04:00:25 +00:00
Ahmed ElArabawy
71f7e647ed Merge "Wifi: Fix Wifi Multicast Wakelock Statistics" 2018-08-23 19:58:51 +00:00
arangelov
3830374a9a No disclaimer when switching profile for system SMS and dialer apps (2).
This CL improves on a previous one by preventing the Toast message from
showing when from a browser a user clicks a "tel:", "sms:", "smsto:",
"mms:" or "mmsto:" link. This is done by checking whether the intent
action is ACTION_VIEW and the intent category is CATEGORY_BROWSABLE
with intent data having one of the schemas. Also added
ACTION_CALL_PRIVILEGED and ACTION_CALL_EMERGENCY as they also open
the dialer.

Bug: 111228250
Test: atest FrameworksCoreTests:IntentForwarderActivityTest
Change-Id: I2e0c256aa170c868bf5528a06951cd75783e5d3c
2018-08-23 16:15:34 +00:00
Bill Lin
fe5a9edac0 Unable to load BRs in SAF of FileSystemProvider
Files.listFiles() indicate if this abstract pathname does "not denote a directory"
It will returns null and cause "NullPointerException: Attempt to get length of null array"
in the queryChildDocuments()

Solution:
    Use FileUtils.listFilesOrEmpty(parent) and check parent.isDirectory() to avoid NPE

Bug: 111565816
Test: Manual, trigger bugreport
      rm -rf /data/user_de/0/com.android.shell/files/bugreports
      launch Files/Bugreport observe there should not happen exception

Change-Id: I9d0835d562af7cf3c9bdaeab52cf41e86e3a8f62
2018-08-23 23:06:17 +08:00
Ahmed ElArabawy
6f1754eafe Wifi: Fix Wifi Multicast Wakelock Statistics
In current implementation, when the same UID holds multiple WiFi
wakelocks, the timer for the lock acquisition in batterystats is started
with the first wakelock acquire and stops with first release.
So the nesting of wakelocks of the same Uid is not correctly accounted for.
(so if Lock#1 acquired at T1, Lock# 2 acquired at T2, Lock#2 released at T3,
lock #1 released at T4 , the timer will only consider the interval T3 - T1 which
is not the correct value).

This commit fixes this issue by starting the timer on the first
acquisition, and stopping it on the last release

Bug: 70691435
Test: Unit Test
Test: $ atest BatteryStatsImplTest

Change-Id: Ie955b6ab0eb1e9837fdda2b8d81835038b8d71da
2018-08-22 08:46:19 -07:00
David Brazdil
7ac9e3a1c7 Merge "Greylist requested hidden API" am: 473654c377 am: 9582cf7c1b
am: e10a083e57

Change-Id: Ie1b9085d2766bae6e4725ae50250cdb8b5efd9c6
2018-08-22 08:35:11 -07:00
David Brazdil
e10a083e57 Merge "Greylist requested hidden API" am: 473654c377
am: 9582cf7c1b

Change-Id: I635076240a90acd213a4ec73460e882b6a1a2a74
2018-08-22 07:32:03 -07:00
Mathew Inwood
aa3a71bd85 Merge "Add @UnsupportedAppUsage annotations" am: df82ab2de2
am: b6c87140c7

Change-Id: I659cfb3d4b18ccaf860721f5908a0d6d4814b3b1
2018-08-22 07:18:53 -07:00
Anton Hansson
a101ff0571 Merge "Support /product-services partition" 2018-08-22 13:58:00 +00:00
David Brazdil
9582cf7c1b Merge "Greylist requested hidden API"
am: 473654c377

Change-Id: I01c25f8570851fee7f5db6f355de071acc1f095d
2018-08-22 06:08:03 -07:00
Mathew Inwood
b6c87140c7 Merge "Add @UnsupportedAppUsage annotations"
am: df82ab2de2

Change-Id: I05a2fa49b9400036f3388709e54f0165737887ee
2018-08-22 05:58:59 -07:00
David Brazdil
473654c377 Merge "Greylist requested hidden API" 2018-08-22 09:14:05 +00:00
Sudheer Shanka
98cb3f09fa Allow some apps to get full access to external storage.
Apps with WRITE_MEDIA_STORAGE permission will get
full access to external storage.

Bug: 111890351
Test: manual

Change-Id: Icbfe1f68c0bfca77bdc557e9903ded45994f5945
2018-08-21 19:25:08 -07:00
TreeHugger Robot
3c98e02d43 Merge changes Ied0d0a83,Id649a1ed
* changes:
  Add ability to pass user sentiment to assistant
  Add AndroidTest file for ExtServices
2018-08-21 22:00:50 +00:00
Julia Reynolds
fd4099d74f Add ability to pass user sentiment to assistant
Test: runtest systemui-notification
Bug: 4798501
Change-Id: Ied0d0a83c4fbbdde59ee8f4e9394161792c42c03
2018-08-21 12:58:30 -04:00
Mathew Inwood
6dd61f53df Merge "Greylist methods erroneously removed in ag/4397724." 2018-08-21 16:29:54 +00:00
David Brazdil
47451322ee Greylist requested hidden API
Greylist APIs from public requests which used to be off-limits because
the classes were not discovered by Doclava.

Bug: 79904498
Bug: 79902686
Test: N/A
Change-Id: If6678bed5c2da076f97e3de7ff0bc4e7ebaf1965
2018-08-21 16:59:24 +01:00
Mathew Inwood
da2db6bb84 Greylist methods erroneously removed in ag/4397724.
Due to b/79409988, these methods were removed from the greylist when
they should not have been. Reinstate them.

Bug: 79409988
Test: m
Change-Id: I20777f2abb3faba9e915b9ed6884ec8e9adc9767
2018-08-21 15:01:49 +01:00
Mathew Inwood
8a8f138d1d Merge "Add @UnsupportedAppUsage annotations" 2018-08-21 13:40:29 +00:00
Eugene Susla
07d718be62 Deprecate HandlerCaller in favor of PooledLambda
Test: proofread
Change-Id: I9e7200e6985d13bfd78df9efea94d5861db2cf56
2018-08-20 15:33:55 -07:00
Mathew Inwood
c185f08c4a Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal
  com.android.internal.annotations
  com.android.internal.app
  com.android.internal.app.procstats
  com.android.internal.appwidget
  com.android.internal.backup
  com.android.internal.car
  com.android.internal.content
  com.android.internal.inputmethod
  com.android.internal.location
  com.android.internal.logging
  com.android.internal.midi
  com.android.internal.net
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony.euicc
  com.android.internal.textservice
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.animation
  com.android.internal.view.menu
  com.android.internal.widget

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I1c2954c5a579f073017c1794fd2d200e0a471602
Merged-In: Ib31b52e6957869e5744dadbb35cb4584ef17187f
2018-08-20 14:28:54 +01:00
Mathew Inwood
af972c802d Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal
  com.android.internal.annotations
  com.android.internal.app
  com.android.internal.app.procstats
  com.android.internal.appwidget
  com.android.internal.backup
  com.android.internal.car
  com.android.internal.content
  com.android.internal.inputmethod
  com.android.internal.location
  com.android.internal.logging
  com.android.internal.midi
  com.android.internal.net
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony.euicc
  com.android.internal.textservice
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.animation
  com.android.internal.view.menu
  com.android.internal.widget

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ib31b52e6957869e5744dadbb35cb4584ef17187f
2018-08-20 14:13:20 +01:00
Rafal Slawik
91b9e0b544 Cleanup: delete unused local variable and sort imports
Test: cleanup CL, existing unit tests still pass
Change-Id: I29e2ef36aad23e2e2a23617455be9348847c2d19
2018-08-20 09:56:26 +00:00
Selim Cinek
c1e76b87ce Merge "Fixed an issue where the message could be empty" into pi-dev am: 99168a6371
am: e206929da3

Change-Id: Id90f348bb753c503df3823c2017d258ecb6f15cb
2018-08-17 16:19:24 -07:00
Selim Cinek
e206929da3 Merge "Fixed an issue where the message could be empty" into pi-dev
am: 99168a6371

Change-Id: I848486310a74b37dcac41bf81a5746ca15dc0d7d
2018-08-17 15:26:03 -07:00
Dario Freni
2bef1768a8 Support /product-services partition
This CL is largely an adaptation of Change-Id
I16175933cebd9ec665d190cc5d564b5414a91827 . I also used the same way for
testing the change.

This CL will support the followings.
- installing a RRO package for framework from /product-services/overlay
- installing apps from /product-services/app
- installing priv-apps from /product-services/priv-app
- installing permissions from
  /product-services/etc/[default-permissions|permissions|sysconfig]

Bug: 80741439
Test: `mm` under frameworks/base/tests/[libs|privapp]-permissions
  adb sync && adb reboot
  adb shell cmd package list libraries
    => confirmed com.android.test.libs.product_services library
  adb shell cmd package dump \
    com.android.framework.permission.privapp.tests.product_services
    => confirmed that the package is a priv-app

  And I moved vendor/overlay/framework-res__auto_generated_rro.apk
  into system/product-services/overlay/ on taimen, and I confirmed that the
  RRO was installed properly.

Change-Id: I7a6a30bf8e8db9f2738594d187bb9148f138b8da
(cherry picked from commit a4af41736894bd3bf5bdc2a279acbeed2a24dd3d)
2018-08-17 16:34:03 +00:00
Lucas Dupin
c81702eb62 Reach gesture implementation
Add configurable doze gesture. OEMs should define the gesture type
on a device overlay.

Bug: 111414690
Test: look at logs in adb shell dumpsys activity service com.android.systemui
Test: manual with alternative sensor event
Change-Id: I048b99b53151427006e42eb6b4780a420020cd78
2018-08-16 11:59:29 -07:00
Riddle Hsu
a4d6fa229c Get gravity of menu panel by display
Also:
 - Reorganize import of DisplayContent and PhoneWindow.
 - Fix DisplayContent leakage in wm test.
   (SurfaceFlinger abort in createLayer -> addClientLayer with
    "Suspected IGBP leak: 4097 IGBPs (4096 max)")

Bug: b/111362047
Test: atest FrameworksServicesTests:DisplayContentTests# \
      testGetPreferredOptionsPanelGravityFromDifferentDisplays

Change-Id: I9c5a0f59a86fda08bd532cb2b66bab76b2dfa6c8
2018-08-15 20:51:57 +08:00
Selim Cinek
3c2fd6a1d7 Fixed an issue where the message could be empty
We're now making sure that the last message can never be too short
and we will therefore always see at least one message

Bug: 111576198
Test: Send message with "Text\r\n"
Change-Id: I4db0708511c45710540653501c845df5dd813545
2018-08-14 17:24:45 -07:00
Andrew Lehmer
d42decc7af Merge "Double tap and lift should take to lock screen" 2018-08-13 15:54:27 +00:00