Commit Graph

10012 Commits

Author SHA1 Message Date
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
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
Lucas Dupin
4359b559f2 Double tap and lift should take to lock screen
The current ambient display design doesn't make sense when the
display is not 'always on', let's wake-up directly to the lock
screen instead.

Change-Id: I217720dcf01a507f43e9da6e1970b2246fb75211
Test: double tap from AOD or screen off
Test: lift from AOD or screen off
Test: receive pulsing notification, long press
Fixes: 73148491
Fixes: 111881300
Bug: 111414690
2018-08-10 14:05:02 -07:00
Dianne Hackborn
eaed0ba69f Flesh out procstats protobufs to have ALL THE INFO!
This involved re-arranging some of the protobuf structs.
What is there now is kind-of awkward, but I didn't want to go
through and just completely change the whole thing.

Bug: 110957691
Test: atest CtsStatsdHostTestCases:ProcStatsValidationTests
Change-Id: I1d59c15c4d0f3dbdea2cf71307debfcafed7938a
2018-08-10 09:28:12 -07:00
Makoto Onuki
7388dd5419 Merge "Add a hidden API for fgetfilecon(3)" am: 9b04b2fd0b am: c5d7fdef72 am: 39ddb130ec
am: 09663b4ada

Change-Id: I88f58139f5539b2f46256f1f522ad3d05ce47b93
2018-08-08 17:19:13 -07:00
Hugo Benichi
f5f5457232 Merge "VPN: Implement toString for VpnConfig." am: c874462c2d am: 52f56a2948 am: e4e1ab85d9
am: 6d915c711f

Change-Id: I33281bdf6342d5053ddb9ceff03fbe03c4c6ce16
2018-08-08 17:02:51 -07:00
Remi NGUYEN VAN
2c871f9241 Merge "Add codewiz@, reminv@ to OWNERS for connectivity" am: 76f081be5c am: a96779b592 am: fb9247e38d
am: f76484af05

Change-Id: I1d77e198618d1de05f952ae58abb3b79e66e49e3
2018-08-08 16:44:05 -07:00
Makoto Onuki
09663b4ada Merge "Add a hidden API for fgetfilecon(3)" am: 9b04b2fd0b am: c5d7fdef72
am: 39ddb130ec

Change-Id: Ib33c1e9f57ce727d6ecb1a5f799c0570c6b32208
2018-08-08 13:05:36 -07:00
Hugo Benichi
6d915c711f Merge "VPN: Implement toString for VpnConfig." am: c874462c2d am: 52f56a2948
am: e4e1ab85d9

Change-Id: If9b64dddcfafce5decf6b9de84481e2c1bc1dbab
2018-08-08 12:54:12 -07:00
Remi NGUYEN VAN
f76484af05 Merge "Add codewiz@, reminv@ to OWNERS for connectivity" am: 76f081be5c am: a96779b592
am: fb9247e38d

Change-Id: I755a029d35edb73924dbeccc698901dea533c57d
2018-08-08 12:21:25 -07:00