48091 Commits

Author SHA1 Message Date
Chad Brubaker
b09ac24c3c Merge "Add permission for instant apps creating foreground services" 2017-02-09 21:33:19 +00:00
Chris Tate
bc1d0ff042 Merge "Check bg persistent-app policy against base uid, not nominal" 2017-02-09 20:47:33 +00:00
Greg Plesur
150a584aee Allow any device with a device_owner to execute setDeviceOwnerSystemPropertyLocked(). am: 735b4dc0af am: d78a0d21cb
am: 82a3793269

Change-Id: I3f7fe9ba2c572eb0dda23386a62c50f58a6a08f9
2017-02-09 20:06:10 +00:00
Greg Plesur
82a3793269 Allow any device with a device_owner to execute setDeviceOwnerSystemPropertyLocked(). am: 735b4dc0af
am: d78a0d21cb

Change-Id: I2e45ee1174cb287d8ce142ac4176148ceca5b248
2017-02-09 19:53:06 +00:00
Christopher Tate
7408813e3c Check bg persistent-app policy against base uid, not nominal
SysUI, for example, needs to be able to start services in secondary
users, and in those users they run as the user-appropriate decorated
uid.

Bug 35200453
Test: verify user switch behavior via logging

Change-Id: Ia154f140e315fd97aed414c6444ba550632eb610
2017-02-09 11:52:38 -08:00
Greg Plesur
d78a0d21cb Allow any device with a device_owner to execute setDeviceOwnerSystemPropertyLocked().
am: 735b4dc0af

Change-Id: I5c8ca6d0a63af83cde91c17d10a634469c726442
2017-02-09 19:49:58 +00:00
Felipe Leme
660ea8c6d7 Merge "Guarded access to mCallback and check for null before using it." 2017-02-09 18:17:54 +00:00
Felipe Leme
3702b4760c Merge "Improved some toString() methods." 2017-02-09 17:47:23 +00:00
Jeff Sharkey
d94624347f DO NOT MERGE. Grant MMS Uri permissions as the calling UID. am: 3eddf40675 am: 14b308de91
am: 473b52eb62

Change-Id: Ic9afb12547b271de6e423601131605b0d930e10b
2017-02-09 17:42:09 +00:00
Jeff Sharkey
473b52eb62 DO NOT MERGE. Grant MMS Uri permissions as the calling UID. am: 3eddf40675
am: 14b308de91

Change-Id: I428dcaa5e44364d30a51392c224ad68a6e455e2b
2017-02-09 17:37:44 +00:00
Jeff Sharkey
14b308de91 DO NOT MERGE. Grant MMS Uri permissions as the calling UID.
am: 3eddf40675

Change-Id: Ied7f446ac2e539654b9f7d5e1ab7cce8aec7390e
2017-02-09 17:33:43 +00:00
Yohei Yukawa
efdb428959 Merge "Eliminate out-of-sync IMM#mFullscreenMode error" 2017-02-09 16:55:04 +00:00
Greg Plesur
735b4dc0af Allow any device with a device_owner to execute setDeviceOwnerSystemPropertyLocked().
BUG: 34824902
Change-Id: I95fbe0a352c48a3fff5af57b91325901a16d3d89
2017-02-09 11:44:39 -05:00
Felipe Leme
4997c505c9 Guarded access to mCallback and check for null before using it.
Fixes: 35143142

Test: manual verification
Test: CtsAutoFillServiceTestCases passes
Change-Id: I465538b896b617c518949611f963e350ee498f7b
2017-02-09 08:25:12 -08:00
Shubham Ajmera
a6e5041a83 Merge "Replace RandomAccessFile with BufferedInputStream" 2017-02-09 12:14:23 +00:00
TreeHugger Robot
daad456172 Merge "Make datasets one line and ellipsized." 2017-02-09 05:43:26 +00:00
Chris Tate
db64add87a Merge "Enable background restrictions" 2017-02-09 05:33:20 +00:00
Yohei Yukawa
a0e468ac33 Merge "Avoid sync IPCs from TSMS to SpellCheckerService" 2017-02-09 05:11:04 +00:00
Felipe Leme
0223ffb473 Improved some toString() methods.
- Never display AutoFillValue.text, because it could be sensitive.
- Simplified AutoFilllId.

Fixes: 35171960

Test: manual verification
Test: CtsAutoFillServiceTestCases passes

Change-Id: I0853cabb695b842c947b0ae007e344f5d8385395
2017-02-08 18:54:29 -08:00
Christopher Tate
62e9fc656c Enable background restrictions
Can be disabled by setting the "debug.bgcheck" system property to
"n" or "no" or "0" or "false" or "off".  (Writing that property
requires root.)

Bug 30953212
Test: observed restrictions being enforced

Change-Id: I4cda9b7840ff25240b6bcaab210ea13888d08cad
2017-02-08 18:07:32 -08:00
Yohei Yukawa
2bc66171cc Eliminate out-of-sync IMM#mFullscreenMode error
As explained in the commit message of my previous CL [1], we have
had a design issue in how to notify the full-screen mode change
from the IME to InputMethodManager running in the target application.

Histrically we have done this by using hooking the following IPC
from the IME to the target application.

  InputConnection#reportFullscreenMode()

However, since we also want InputConnection to be deactivated in some
situations such as the when the target application is no longer
focused. In other words, InputConnection is not a reliable way to
notify something.

As a result, we have suffered from many stale state issues.
Bug 21455064 and Bug 28157836 are such examples.  In Android N, we
introduced yet another hack to work around those issues, but it is
really time to fix the protocol design instead.

The new strategy is to rely on internal IPCs provided by
InputMethodManager to deliver such critical notifications from one
process to the other. This is actually more natural because our goal
is to make sure that InputMethodManager#isFullscreenMode() always
returns the latest value as long as the caller is the focused
application.

For backword compatibility, applications that are monitoring
this callback should continue working, as InputMethodManager emulates
the previous behavior.  However, as updated in JavaDoc, IMEs are no
longer allowed to invoke InputConnection#reportFullscreenMode(),
which should be OK because even on previous releases IMEs should rely on
InputMethodService#updateFullscreenMode() instead.

 [1]: Iba184245a01a3b340f006bc4e415d304de3c2696
      1544def0facda69c210b0ae64b17394ea2860d39

Fixes: 28406127
Test: Make sure Bug 21455064 is still fixed.
       1. Input some words in extract mode.
       2. Select a word.
       3. Perform copy.
       4. Select a word.
       5. Rotate the device.
       6. Try to select a word.
       7. Make sure he word is selected and action mode starts.
Test: Make sure Bug 28157836 is still fixed.
       1. Rotate device to landscape mode.
       2. Tap on EditText and start full screen extracted mode.
       3. Rotate device to portrait mode.
       4. Long press to start action mode.
       5. Make sure Action mode gets started.
Test: `adb shell dumpsys input_method` to make sure that fullscreen
      state is synchronized across the app, IMMS, and the IME.
Change-Id: If23e7c7c265ab3dfb48c2fb6fdb361b17d22c594
2017-02-09 00:51:18 +00:00
Greg Plesur
c928e9fa53 Don't check device_provisioned on Wear devices in setDeviceOwnerSystemPropertyLocked() am: c7b18342ea am: b6323817db
am: f206de957a

Change-Id: Ic1f2bd765ecc3eb7239923147a93fc4afa6eb70c
2017-02-08 23:56:33 +00:00
Greg Plesur
f206de957a Don't check device_provisioned on Wear devices in setDeviceOwnerSystemPropertyLocked() am: c7b18342ea
am: b6323817db

Change-Id: I5f3b6935af32ba94fef35d8db573d75925eee434
2017-02-08 23:49:32 +00:00
Greg Plesur
b6323817db Don't check device_provisioned on Wear devices in setDeviceOwnerSystemPropertyLocked()
am: c7b18342ea

Change-Id: I1969d32950057ecacc03e8c5d00ad185fb627044
2017-02-08 23:44:27 +00:00
Greg Plesur
66af3515de Don't check device_provisioned on Wear devices in setDeviceOwnerSystemPropertyLocked()
am: c7b18342ea

Change-Id: I692fee4165de9a274d8eb8f0deaf49762974bb22
2017-02-08 23:44:13 +00:00
TreeHugger Robot
8a2ea2cf83 Merge "Don't check device_provisioned on Wear devices in setDeviceOwnerSystemPropertyLocked()" into cw-f-dev 2017-02-08 23:36:09 +00:00
Jean-Michel Trivi
fd4e9e0f8d Merge "AudioService: mute media/game players during phone calls" 2017-02-08 22:28:45 +00:00
Greg Plesur
c7b18342ea Don't check device_provisioned on Wear devices in setDeviceOwnerSystemPropertyLocked()
BUG: 34824902
Change-Id: I49d4d7043829862e1abacb3f400a6690f454d6c0
2017-02-08 16:32:51 -05:00
TreeHugger Robot
5d6791a0a7 Merge "Retrieving groups shouldn't have side effects" 2017-02-08 21:32:16 +00:00
Jason Long
348fd2eb07 Make datasets one line and ellipsized.
Test: Manual
Test: CtsAutoFillServiceTestCases
Change-Id: I2f58ef5e566ba0551431fcbe43efb179c3efc8e8
2017-02-08 13:22:21 -08:00
TreeHugger Robot
359136303d Merge "Fix NPE when session is finished before service replies." 2017-02-08 21:17:17 +00:00
songjinshi
bf99f78a38 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile." am: b6f7a85b85 am: ec69bd0aa3 am: 36bcc913f7
am: 78a3d9dab4

Change-Id: I421bf706b51fb657855dbc71a13919982e70fd44
2017-02-08 20:42:42 +00:00
Julia Reynolds
74856c4a61 Retrieving groups shouldn't have side effects
Test: runtest systemui-notification, viewing settings
Change-Id: Ib43fe6ad2af4763b633ad1690f69d17533915dbb
2017-02-08 20:35:14 +00:00
songjinshi
78a3d9dab4 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile." am: b6f7a85b85 am: ec69bd0aa3
am: 36bcc913f7

Change-Id: Icf40ff98196d885e6974eb679532064b30bc68cd
2017-02-08 20:28:48 +00:00
songjinshi
36bcc913f7 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile." am: b6f7a85b85
am: ec69bd0aa3

Change-Id: Idfe455733dd12bf82c31cb505681e4fa89d57bfb
2017-02-08 20:22:26 +00:00
Paul Duffin
c02f6bb64b Merge "Replace com.android.internal.util.Predicate with java.util.function.Predicate" am: 78a20be77a am: 9e99b9ee45
am: 9250814fd2

Change-Id: Ifd924bdb62102657bf0c6d4b07ab919cf0f96c0c
2017-02-08 20:18:34 +00:00
songjinshi
ec69bd0aa3 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile."
am: b6f7a85b85

Change-Id: Iea79127b2c7d823844406f677a98fea54043f4cb
2017-02-08 20:18:13 +00:00
TreeHugger Robot
d927a0e24e Merge "New internal interface method to get the active scorer metadata." 2017-02-08 20:12:54 +00:00
Treehugger Robot
b6f7a85b85 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile." 2017-02-08 20:11:23 +00:00
Erik Wolsheimer
39c36cab3a DO NOT MERGE Guard against null entries in process list during updateOomAdjLocked am: 84aa5a864f
am: 36008dd6bd

Change-Id: Ia7e636049d4a3a0490013a54ffb90d7f4f534949
2017-02-08 20:01:24 +00:00
Yohei Yukawa
7fa65eef20 Avoid sync IPCs from TSMS to SpellCheckerService
Currently, TextServicesManagerServices uses an AIDL interface called
ISpellCheckerService when binding to a spell-checking service.
However, this interface uses synchronous (blocking) binder calls
rather than asynchronous (oneway) calls.  As a result, there are
situations where the system process has made a blocking binder call
into untrusted application code from its main looper thread.

As general policy, the system process must never allow its looper
threads to block on application code.

This CL addresses the above issue by converting ISpellCheckerService
into oneway interface, which instead takes a result receiver
ISpellCheckerServiceCallback so that spell-checking services can
return results asynchronously.

Note that the above protocol issue was also the root cause of
Bug 5471520.  Hence we can also logically revert the previous CL [1]
for Bug 5471520.

 [1]: Iedf2c2cdd8d4834545d06d72ade3ce211b104b1d
      4e713f14419a37f385cf1509b011982bdcf67edc

Test: Ran `adb shell dumpsys textservices` to check the
      "Spell Checker Bind Groups:" section in the following three
      steps.
      1. Before apps start requesting spell checker sessions.
      2. While apps are owning active spell checker sessions.
      3. After all the apps that owned spell checker sessions are
         gone.
      Made sure that spell checker service is not running when
      there is not spell checker bind group.
Bug: 7254002
Change-Id: I92e7aa40dc9ea14f67d355f0bfa15325b775d27b
2017-02-08 11:54:05 -08:00
Julia Reynolds
49f38bb487 Merge "Don't let apps permanently delete channels." 2017-02-08 19:50:49 +00:00
Erik Wolsheimer
7600235339 DO NOT MERGE Guard against null entries in process list during updateOomAdjLocked
am: 84aa5a864f

Change-Id: I9b5c9b25a9bd4ad5b51f7d0c7004c7275ce1e460
2017-02-08 19:46:50 +00:00
Erik Wolsheimer
36008dd6bd DO NOT MERGE Guard against null entries in process list during updateOomAdjLocked
am: 84aa5a864f

Change-Id: Ibcbaba3bb406e07f97561bc87916f6891fc25b74
2017-02-08 19:46:49 +00:00
Wale Ogunwale
1a81a63b81 Merge "Fixed failing WM pre-submit tests" 2017-02-08 19:22:02 +00:00
Paul Duffin
9250814fd2 Merge "Replace com.android.internal.util.Predicate with java.util.function.Predicate" am: 78a20be77a
am: 9e99b9ee45

Change-Id: I289950cff0cdc6b5ad301936c7b55eadee5fd0f8
2017-02-08 18:30:17 +00:00
Paul Duffin
9e99b9ee45 Merge "Replace com.android.internal.util.Predicate with java.util.function.Predicate"
am: 78a20be77a

Change-Id: I6f32dc27f70e4c22d25ec6bd2eec715700ebbd89
2017-02-08 18:14:50 +00:00
Craig Donner
8deb67cb64 Use the Context name to publish and use vrmanager
Bug: 34736524
Test: build
Change-Id: I8aabb4d242fb2378b24dd30a972c382a7f8f4934
2017-02-08 09:46:07 -08:00
Felipe Leme
8d918a7149 Fix NPE when session is finished before service replies.
Fixes: 35114623
Test: manual verificaiton
Test: CtsAutoFillServiceTestCases passes
Change-Id: Id38babd038c79dc3e7070483437adec1b415a072
2017-02-08 09:11:21 -08:00
Rubin Xu
b94a914c9e Merge "Small tweaks in LockSettingsService" 2017-02-08 16:04:27 +00:00