27522 Commits

Author SHA1 Message Date
Svet Ganov
d4b566bf56 Merge "Add APIs for verifier to grant at install and revoke permissions" into mnc-dev 2015-07-16 22:22:01 +00:00
Dianne Hackborn
aaee5b5334 Merge "Work on issue #22516282: ChooserTarget URI grants not forwarded" into mnc-dev 2015-07-16 21:44:21 +00:00
Makoto Onuki
b09b84cafd Merge "DefaultPermission: GET_ACCOUNTS is now in CONTACTS" into mnc-dev 2015-07-16 21:01:39 +00:00
Makoto Onuki
bc92479a29 DefaultPermission: GET_ACCOUNTS is now in CONTACTS
Bug 22532312

Change-Id: If7ad0faa3a196bb28da1ddc13788c0430df1d1ee
2015-07-16 11:38:00 -07:00
Todd Kennedy
a4911ed971 Merge "Verfiy global apps with device owner" into mnc-dev 2015-07-16 17:59:35 +00:00
Dianne Hackborn
a7cfbe0e54 Work on issue #22516282: ChooserTarget URI grants not forwarded
Add new option to startActivityAsCaller() which allows you to
specify that we should not do security checks on the target
activity being launched.

Change-Id: Ie6b28807b96fef35ccdff93b0a01066cfd8fa307
2015-07-16 10:52:52 -07:00
Wale Ogunwale
1181323230 Merge "Animate app exit for cases where the app is already hidden before transition" into mnc-dev 2015-07-16 17:01:15 +00:00
Wale Ogunwale
b60c0f616c Animate app exit for cases where the app is already hidden before transition
It is possible for an app token to be marked as hidden and exiting
because the previous activity destory is completed before we are
good-to-go with app transition since we are still waiting for the
opening app to be done drawing. In this case we don't apply the
exiting animation since the token is not changing visibility state
during the app transition (it is already hidden and we are telling
it to hide...).
We now allow the animation to load if the token is already hidden
and marked as exiting.

Bug: 22381703
Change-Id: I5c27b6c3c1f810f05b2d716122055c6f12d0a167
2015-07-16 09:45:35 -07:00
Todd Kennedy
633f199831 Verfiy global apps with device owner
Applications installed for a specific user must be verfied as that user. However,
apps that are installed globally [i.e. UserHandle.ALL] should not be verified by
every user on the device. Instead, they should be verified by the device owner.

Bug: 21901423
Change-Id: I5fd3f690d08e7e911a3c86f09bbfcd4eb635b418
2015-07-16 09:44:31 -07:00
Nicolas Prevot
dbdf7c4538 Don't send app links to the parent if status = never (part 2)
To qualify for cross-profile app linking, an intent should resolve
with a better status than "NEVER". Moved this check from canForwardTo
into the source method, getCrossProfileDomainPreferredLpr, to stop
bad resolutions leaking out.

BUG:22287521
Change-Id: I195979d78a783864d841a81f358780912bbf168e
2015-07-16 10:13:00 +01:00
Vineeta Srivastava
47e0409062 Merge "Remove redundant cancel events from FingerprintService" into mnc-dev 2015-07-16 07:06:54 +00:00
Svet Ganov
7121e18595 Add APIs for verifier to grant at install and revoke permissions
bug:22231699

Change-Id: Ie0c758bf73699f50bf99ff5aa0bf98dcc9004e37
2015-07-15 22:22:59 -07:00
Jim Miller
80a776e5fe Remove redundant cancel events from FingerprintService
This fixes a bug where the framework was sending repeat cancel
events in response to terminal status (onAuthenticated(), onError())
which causes the underlying HAL implementation to get into a weird state.

Now, only client-initiated events like an explicit cancellation
or starting another authentication/enrollment invokes fingerprintd's
cancel() method.

Fixes bug 22438498

Change-Id: I762bab1c8635924848f9f4334db47a07130d5ae3
2015-07-15 18:57:14 -07:00
Chris Tate
a36c5580c5 Merge "Fix a bug disappearing installerPackageName info of packages after reboot." into mnc-dev 2015-07-16 01:18:06 +00:00
Christopher Tate
3b1f8607fd Merge "Intent filters need CATEGORY_BROWSABLE to be app-linking eligible" into mnc-dev 2015-07-16 00:21:12 +00:00
hyemin.hwang
b4faf9810d Fix a bug disappearing installerPackageName info of packages after reboot.
If user install apps from playstore, system has installerPackageName attribute of app.
but, after reboot, some apps(have sharedUserID) installerPackageName attribute disappearing.
because lack of copy routine.
So, I added copy routine(installerPackageName).

Testcase :
1. Install app(has sharedUserId, ex Lync2013) from market.
2. Confirm package info from packages.xml(exist installer info).
3. reboot.
4. Re-confirm package info from packages.xml(not exist installer info).

Cherry-pick from AOSP master.
Bug 22513758

Change-Id: I3fea3e573c056f6c2f574715d2ebef4df8b75a68
2015-07-15 17:14:24 -07:00
Billy Lau
008409a2ea Merge "Bug: 21589105 Rescoping SYSTEM_ALERT_WINDOW..." into mnc-dev 2015-07-16 00:04:35 +00:00
Christopher Tate
ac15b1b0c0 Intent filters need CATEGORY_BROWSABLE to be app-linking eligible
Bug 22504009

Change-Id: I565b2ba4d1e5deeee8ede3363819deec206dbf58
2015-07-15 16:56:58 -07:00
Billy Lau
060275ffc7 Bug: 21589105 Rescoping SYSTEM_ALERT_WINDOW...
AppOpsManager:
Changed the default mode for SYSTEM_ALERT_WINDOW to MODE_DEFAULT instead of
MODE_ALLOWED. Otherwise, an app that did not declare for this permission will
actually be allowed to perform OP_SYSTEM_ALERT_WINDOW, which is undesirable.
This change also allows callers to make their own decision based on the
current policy (M vs pre-M apps).

policy/PhoneWindowManager:
Added additional checks that will handle MODE_DEFAULT - this happens when an app
is newly installed but not yet configured.

wm/WindowManagerService:
Enriched some checks to include the treatment of MODE_DEFAULT - this will allow
pre-M apps uninterupted capability to draw on top of other apps.

Change-Id: I8de77730e158c97587427820cfba721bd5607bea
2015-07-16 00:34:26 +01:00
Dianne Hackborn
f6586cbde7 Merge "Implement issue #22403908: Enable assistant to refuse context sharing" into mnc-dev 2015-07-15 23:31:25 +00:00
Dianne Hackborn
67e02e60ca Merge "Fix issue #22487155: Device unresponsive (deadlock in system_server)" into mnc-dev 2015-07-15 23:31:02 +00:00
Christopher Tate
06476508c4 Merge "Resolve based on the correct user's default browser" into mnc-dev 2015-07-15 22:57:53 +00:00
Svet Ganov
75f6b94a5d Merge "Grant default permissions to the setup app robustly." into mnc-dev 2015-07-15 21:58:50 +00:00
Christopher Tate
7991f7813e Resolve based on the correct user's default browser
Bug 22509659

Change-Id: Iac75e7b40609bf2c81d266e0568fbfbeb71bb3aa
2015-07-15 14:52:29 -07:00
Svet Ganov
50a8bf4da0 Grant default permissions to the setup app robustly.
There is a zoo of components that handle the home intent and
have different priority. There is no reliable way to distinguish
the setup app from the other apps that handle home as some of
them have lower priority than the setup app and some higher.
This change adds a dedicated category to recognize the default
setup app.

Uncommented the code that grants accounts permissions as the
get_accounts permission is now a runtime permission and can be
granted.

bug:22471024
bug:22501463

Change-Id: I41726751fa2567cbcd7d09c7acfa7615b8aba577
2015-07-15 14:46:23 -07:00
Dianne Hackborn
1de1186d28 Implement issue #22403908: Enable assistant to refuse context sharing
New APIs allow the voice interaction service to set/retrieve a filter
for which of the show flags are allowed.

Change-Id: I588cbe55afee0548ad3afa22d3a7d3bc43cb54a6
2015-07-15 14:20:51 -07:00
Jeff Brown
76c4c6668a Add USB port manager.
Add some new internal APIs to enumerate USB Type C ports, query their
status, determine whether they support changing power or data roles,
and doing so.  The API also adds a new ACTION_USB_PORT_CHANGED broadcast
for port state changes.

The implementation includes a mechanism for simulating the behavior
of the USB stack.  See 'adb shell dumpsys usb -h' for details.

Note that the underlying kernel driver interface is still subject
to change but its behavior has been encapsulated as much as possible.

Bug: 21615151
Change-Id: I0c853ae179248a4550b3e60d02a7a7e65e4546b2
2015-07-15 11:34:29 -07:00
Jeff Brown
2dbccc1926 Clean up USB Manager dump.
Tidy up the dump() implementation in preparation for further work.

Bug: 21615151
Change-Id: If6d94c8dc9457b8e93103541ec1798981eeb5b54
2015-07-15 11:34:29 -07:00
Dianne Hackborn
16f3671620 Fix issue #22487155: Device unresponsive (deadlock in system_server)
Using my magic potion, Deadlock-B-Gone!

Change-Id: If5c0a2b18134dc95444f3782ab5aa475414b5839
2015-07-15 11:32:32 -07:00
Dianne Hackborn
280a64e793 Improve tracking of screen on reasons.
- New screen on app op to record the last time each app has
  caused the screen to be turned on.
- New battery stats event that tells us the reason the screen
  has been asked to turn on.
- Propagate out power manager API to specify the reason a caller
  is asking to have the screen turned on.

Note that currently the window flag to turn the screen on bypasses
much of this because it is being handled in the window manager by
just directly telling the power manager to turn the screen on.  To
make this better we need a new API where it can specify who it is
calling the API for.

Change-Id: I667e56cb1f80508d054da004db667efbcc22e971
2015-07-15 09:59:07 -07:00
Dianne Hackborn
0b6134b511 Bump mms whitelist time up to 1 minute.
Change-Id: I09074c440430580fcfb2581275defe61c63c8ae8
2015-07-14 18:48:07 -07:00
Dianne Hackborn
fd854ee58c Fix issue #21626564: MMS should be receivied while Dozing
We now place whoever is receiving the MMS on the temporary
whitelist while doing so, so they can get network access to
download it.

There was also an issue that needed to be fixed where we
were no longer updating the list of allowed uids while
dozing based on their proc states...  we now do that.

Also did a bit of optimization of the temp white list update
path do the network policy manager, instead of going through
a broadcast we now directly call in to the network policy
manager.  This also allows us to have a synchronous version
of updating the list, so we can know the app has network access
before we tell it to do anything.

Finally added battery stats events for things going on and off
the whitelist so we can diagnose the behavior there.

Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
2015-07-14 18:33:08 -07:00
Fyodor Kupolov
987241265b Merge "Added sendBroadcastMultiplePermissions method" into mnc-dev 2015-07-15 00:48:40 +00:00
Fyodor Kupolov
d4fd8c766d Added sendBroadcastMultiplePermissions method
Added Context.sendBroadcastMultiplePermissions(Intent intent, String[]
receiverPermissions) method, which allows an array of required permissions
to be enforced.

Bug: 21852542
Change-Id: I27c9130e8f004b428452501ebc8a36aabde1f343
2015-07-14 17:25:42 -07:00
Adam Lesinski
56d82dd28a BatteryStats: Fix deadlock
Bug:22486756
Change-Id: I20e10cc344b128bfa156c5aada93d3fb2b0fcaa3
2015-07-15 00:25:26 +00:00
Fyodor Kupolov
4a817924ec Merge "Revert "Allow array of required permissions in sendBroadcast"" into mnc-dev 2015-07-14 22:43:47 +00:00
Fyodor Kupolov
e37520b49d Revert "Allow array of required permissions in sendBroadcast"
This reverts commit b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b.

Change-Id: Ie8390964bda5bdfa869cee8f46584043d8e7c664
2015-07-14 22:29:21 +00:00
Fyodor Kupolov
d69a82c107 Merge "Allow array of required permissions in sendBroadcast" into mnc-dev 2015-07-14 21:57:34 +00:00
Fyodor Kupolov
b4e7283c9a Allow array of required permissions in sendBroadcast
Added Context.sendBroadcast(Intent intent, String[] receiverPermissions)
method, which allows an array of required permissions to be enforced.

Bug: 21852542
Change-Id: I3b8ff258fa9f3249c344bb8093b820b24eef00c0
2015-07-14 12:50:22 -07:00
Svetoslav
8b6d5b6b6a Merge "Clear binder id when determining external storage state" into mnc-dev 2015-07-14 19:39:16 +00:00
Dan Sandler
66cc6bb65e Merge "Allow notification strings to be unredacted in dump output." into mnc-dev 2015-07-14 19:38:16 +00:00
Svetoslav
38c3dbb209 Clear binder id when determining external storage state
bug:22472435

Change-Id: I5badd51cb9fb2244395880eb1bbff8f4aa0abb8c
2015-07-14 11:30:10 -07:00
Amit Mahajan
51b4e97ae4 Merge "Add checks for READ_PRIVILEGED_PHONE_STATE." into mnc-dev 2015-07-14 17:59:20 +00:00
Amit Mahajan
7c5befa4a7 Add checks for READ_PRIVILEGED_PHONE_STATE.
Callers will have either PRIVILEGED or regular READ_PHONE_STATE.

Bug: 22468536
Change-Id: I60251f61250a975f4147b027d2539824a728e3b5
2015-07-14 10:26:00 -07:00
Erik Kline
7761294027 Merge "Log NetworkRequestInfo to get more detailed history" into mnc-dev 2015-07-14 04:09:29 +00:00
Erik Kline
7523eb349e Log NetworkRequestInfo to get more detailed history
Bug: 21641983
Bug: 22235775
Bug: 22299819
Bug: 22358164
Change-Id: I48a2d162dd499a3590f06d805267a63822856969
2015-07-14 11:46:51 +09:00
Svet Ganov
8017c647e6 Fix build
Change-Id: I2c97e405eaec7ee1569fcddc872ff2a98c829efe
2015-07-14 02:38:07 +00:00
Svet Ganov
8cee6587e0 Merge "Teach storage appops." into mnc-dev 2015-07-14 01:24:37 +00:00
Svet Ganov
6ee871e598 Teach storage appops.
For modern apps targeting M SDK and up the external storage state
is deterined by granted permissions. For apps targeting older SDK
the storage access is determined by app ops correspning to the
storage permissions as the latter are always granted.

When app ops change we do not remount as we kill the app process
in both cases enabling and disabling an app op since legacy code
is not prepared for dynamic behavior where an operation that failed
may next succeed. Hence, we remount when we start the app.

For modern apps we don't kill the app process on a permission
grant, therefore we synchronously remount the app storage.

bug:22104923

Change-Id: I601c19c764a74c2d15bea6630d0f5fdc52bf6a5a
2015-07-13 18:22:30 -07:00
Christopher Tate
4b9b3e4731 Merge "Default browser should not supersede intent filter priorities" into mnc-dev 2015-07-14 01:08:28 +00:00