Commit Graph

45512 Commits

Author SHA1 Message Date
Griff Hazen
586bc60a0b Merge "Workaround for javac compilation issue of lambda code" 2016-11-25 17:39:40 +00:00
TreeHugger Robot
bbef8cdd2a Merge "Logging when the new batch of network logs broadcast is sent to DO" 2016-11-25 17:16:38 +00:00
Michal Karpinski
bcf1c58ec2 Logging when the new batch of network logs broadcast is sent to DO
Test: this only adds a log message
Bug: 29748723
Change-Id: I07ca1613c26a34517f5a452ca848aa763a48f8a0
2016-11-25 15:30:15 +00:00
Bartosz Fabianowski
8d76e72251 Allow DO to access bookkeeping information about its own actions
The getLastSecurityLogRetrievalTime(), getLastBugReportRequestTime()
and getLastNetworkLogRetrievalTime() methods are meant to be used by
system code. However, there is no harm in allowing the DO to access the
information they return - because it is information about actions that
the DO itself took.

The advantage of opening up these methods to the DO is that we can
CTS-test them.

Bug: 32692748
Test: DevicePolicyManager unit test + CTS test in separate CL

Change-Id: I1470fca2a82b9955f7aed5e8b50220bea8b56fc9
2016-11-25 12:36:20 +01:00
Narayan Kamath
96444acc85 Merge "PackageManager: Fix incorrect usage of flags." 2016-11-24 18:06:55 +00:00
TreeHugger Robot
8d4527db19 Merge "Add getBindDeviceAdminTargetUsers API" 2016-11-24 18:02:23 +00:00
Narayan Kamath
84e347f01f PackageManager: Fix incorrect usage of flags.
assertPackageIsValid was checking policyFlags (which are PackageParser
parseFlags) for flags defined in the SCAN_* values. This was always
subtly and non-visibly broken, but turned into a full scale breakage
when change 5b29ecad48 was merged, and
one of the flags that *happened* to have the same value in the PARSE_
and SCAN_ flagset changed.

Test: make, boot, update system app, update playstore app.
Bug: 33124572
Bug: 33126202

Change-Id: I482f420b2a9c8af38b17d174f1a2ec36c762f58e
2016-11-24 16:25:30 +00:00
Esteban Talavera
fc291bcbe0 Add getBindDeviceAdminTargetUsers API
Add getBindDeviceAdminTargetUsers API. To be used
for the device or profile owner in a COMP setup to
know the UserHandle of their instance running on
the other profile.

Bug: 31952368,33033966
Test:  cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerPlusManagedProfileTest

Change-Id: I05c9ac0f6c3cdce1ec17cf2910ca7a7214064af2
2016-11-24 16:15:44 +00:00
Michal Karpinski
e0b7a06d6f Merge "Disable DO single user features when clearDeviceOwner() is called regardless of the amount of users" 2016-11-24 11:59:14 +00:00
TreeHugger Robot
7149a23c2b Merge "Captive portal systel log improvements" 2016-11-24 03:45:57 +00:00
Hugo Benichi
8b025bf108 Captive portal systel log improvements
This patch improves system logging around captive portal detection to
make inspection of bug reports sligthly easier:

- NetworkMonitor now logs by default CMD_CAPTIVE_PORTAL_RECHECK and
  CMD_CAPTIVE_PORTAL_APP_FINISHED. Other system logs are kept off with
  a new VDBG boolean contant,
- NetworkNotificationManager now prints the notification id at
  notification time. This allows to easily correlate show and clear.
- errors in NetworkNotificationManager are logged as Throwable instead
  of through their implicit toString() method.

Test: $ runtest frameworks-net
Bug: 32198726
Change-Id: Id74a9912880083d41e27753240e781595081ff7a
2016-11-24 10:36:04 +09:00
Jiabin Huang
76949b7339 Merge "TIF: Add support for more linux dvb device path." 2016-11-24 01:01:38 +00:00
Jorim Jaggi
058b69e58a Merge "Revert "WindowList be gone!"" 2016-11-23 17:03:50 +00:00
Jorim Jaggi
ffa5a9de0c Revert "WindowList be gone!"
This reverts commit 4551c8bbee.

Reason for revert: Broke a lot of things!

Bug: 33098800
Bug: 33098294
Change-Id: I307b1c7ee39445d6155a4bbce2bf5f289de55285
2016-11-23 16:59:19 +00:00
Michal Karpinski
08be96ec87 Disable DO single user features when clearDeviceOwner() is called
regardless of the amount of users

Bug: 32901196
Bug: 29748723
Change-Id: Ie419b5e496e23656cbe5436942d9aba402bfe68e
2016-11-23 11:42:31 +00:00
Narayan Kamath
683ed6c356 Merge "PackageManager: Avoid creating encoders for appIds being written /config/sdcardfs" 2016-11-23 10:23:09 +00:00
Narayan Kamath
a83fd30650 Merge "PackageManager: Remove obsolete SCAN_NO_PATHS / SCAN_DEFER_DEX flags." 2016-11-23 10:18:11 +00:00
Narayan Kamath
5b29ecad48 PackageManager: Remove obsolete SCAN_NO_PATHS / SCAN_DEFER_DEX flags.
SCAN_NO_PATHS hasn't been used in the past several years, and was
introduced to deal with ASEC containers, and those are now handled by
DefaultContainerService.

SCAN_DEFER_DEX has been made obsolete by the JIT work we've done in N.

Test: make & boot
Change-Id: Ib2ffa8bd3c31d645a7efc5d78b03ca0774590f07
2016-11-23 10:17:34 +00:00
Narayan Kamath
6d051fc68d PackageManager: Avoid creating encoders for appIds being written /config/sdcardfs
We know they will be ASCII, so use String.getBytes(US-ASCII) which is
much faster than creating a new ICU based CharsetEncoder for UTF-8 every time
we write one of these files (there will be a lot of them).

Test: make + manual.
Change-Id: I8eb62862ea1083e194d3f23ac68bb40aaae5efd5
2016-11-23 10:13:03 +00:00
Jiabin
ef1659f624 TIF: Add support for more linux dvb device path.
Test: Manually verified with usb tuner devices and archer.

Bug: 32330170
Change-Id: I37585d92277d3c61c92728eebc44a65c815e9ecf
2016-11-23 15:18:34 +09:00
Griff Hazen
51d00d88ed Workaround for javac compilation issue of lambda code
frameworks/base/services/core/java/com/android/server/wm/WindowState.java:601: error: variable w1 might not have been initialized

BUG: 32554459
Change-Id: I939ad4917f0b53d6f3f090ed2643b5e0354c37a3
2016-11-22 17:42:35 -08:00
TreeHugger Robot
3f5de07e92 Merge "Add visibility table to account manager database." 2016-11-23 00:09:51 +00:00
TreeHugger Robot
5129574825 Merge "Launch ephemeral intent" 2016-11-22 22:53:49 +00:00
Dmitry Dementyev
e5768621de Add visibility table to account manager database.
Bug: https://b.corp.google.com/issues/33046496
Test: unit tests.
Change-Id: I92e94fb2185dbba965a5328048ada59fc2b5512a
2016-11-22 13:58:26 -08:00
Todd Kennedy
078f538eb2 Launch ephemeral intent
In MR1, the ephemeral application was launched via the supervisor.
In O, the ephemeral application is installed on the system as a
proper application and runs natively.

Bug: 30204367
Test: build & install the framework and run 'adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://www.tripadvisor.com/Tourism-g33020-San_Jose_California-Vacations.html"'
Change-Id: Iea496862aeb72c6bfde439620950ba951d859cc7
2016-11-22 13:29:11 -08:00
Etan Cohen
f256805d10 Merge "[CS] Remove timeout event after first available" 2016-11-22 20:21:44 +00:00
Zach Jang
794e9022c9 Revert "Catch KeyStoreException for setting profile lock" am: e61672ab08 am: fe3b0b2cc1 am: f516131a38
am: af98d20dc6

Change-Id: Ib443a1fea735b8aa240d724fc7a24c91102440ef
2016-11-22 18:16:14 +00:00
Zach Jang
af98d20dc6 Revert "Catch KeyStoreException for setting profile lock" am: e61672ab08 am: fe3b0b2cc1
am: f516131a38

Change-Id: Ica7d8825fb973e288270e21345066a675818836e
2016-11-22 18:08:35 +00:00
Zach Jang
f516131a38 Revert "Catch KeyStoreException for setting profile lock" am: e61672ab08
am: fe3b0b2cc1

Change-Id: Iba7288ba01872f804a22814f4615b202010d7194
2016-11-22 18:03:27 +00:00
Zach Jang
fe3b0b2cc1 Revert "Catch KeyStoreException for setting profile lock"
am: e61672ab08

Change-Id: Ie1a720181bf542bbf213af8b6b83eff0ecd84a98
2016-11-22 17:58:58 +00:00
Zach Jang
e61672ab08 Revert "Catch KeyStoreException for setting profile lock"
This reverts commit c8fa5ed8f2.

Change-Id: Ia1425e649e102cb79280d75e5f49db670214cec3
2016-11-22 17:47:18 +00:00
Fyodor Kupolov
9b2cdd9be0 Merge "Additional boot metrics" 2016-11-22 17:45:01 +00:00
Jean-Michel Trivi
6d5723fe4e Merge "Define stream type for accessibility volume control" 2016-11-22 16:28:48 +00:00
Wale Ogunwale
23c25e7a3c Merge "WindowList be gone!" 2016-11-22 14:56:49 +00:00
Neil Fuller
3dfca02da4 Merge "Change EXTRA_TIME_PREF_24_HOUR_FORMAT from boolean to int" 2016-11-22 11:55:27 +00:00
Fyodor Kupolov
3235e0c2ee Additional boot metrics
Extracted duration measurement functionality into BootTimingTraceLog.
It is now shared between system_server and zygote.

Log the following metrics to tron:
- boot_zygote_init - Time in milliseconds to boot into Zygote init stage.
- boot_android_init - Time in milliseconds to boot into Android init stage.

Test: manual - device boots, metrics are logged to system/event log
Bug: 32780225
Bug: 31115337
Change-Id: I600ac7fc83d35fa226ac92c37cc4b19192b25f59
2016-11-21 17:17:34 -08:00
Fyodor Kupolov
d4f9d37424 Merge "Presubmit test for PackageManager" 2016-11-21 23:58:01 +00:00
Jean-Michel Trivi
3f0945a608 Define stream type for accessibility volume control
New stream type for accessibility volume.
Add related appOps.

Test: see added CTS tests in AudioManagerTest & Stub
Bug 30448020

Change-Id: I34f96713b22fedf75322b8ffe2b96a7c566f5009
2016-11-21 15:15:45 -08:00
Steven Moreland
e4e166790b Merge "LightService: log errors." 2016-11-21 21:39:41 +00:00
TreeHugger Robot
78d6e340e1 Merge "No direct Uri grants from system." 2016-11-21 20:29:04 +00:00
Philip P. Moltmann
76932df9ec Merge "Wait when other thread is binding to print spooler" 2016-11-21 19:21:24 +00:00
Etan Cohen
681fcda589 [CS] Remove timeout event after first available
Guarantees that timeouts are only delivered if a network never
becomes available. Once a network is available the timeout is
canceled.

Bug: 31402633
Test: all timeout related unit tests pass (new one added)
Change-Id: I2b7adffd82173cf8b99084cbfe5399961d51e148
2016-11-21 19:15:10 +00:00
Jeff Sharkey
2dfe92c2df No direct Uri grants from system.
The system should never be extending Uri permission grants from
itself, since it automatically holds all the permissions.  Instead,
the system should always be a mediator between two specific app, and
it should be using startActivityAsCaller() if it needs to extend
permissions.

Blocking at this level fixes an entire class of confused deputy
security issues.

Test: builds, normal intent resolution UI works
Bug: 33019296
Change-Id: Iaa57c393a386d8068e807d0dd0caccc89d8a11db
2016-11-21 12:03:22 -07:00
Jeff Sharkey
ca50c360bf Merge "Check provider access for content changes." 2016-11-21 16:19:43 +00:00
Wale Ogunwale
4551c8bbee WindowList be gone!
The use of DisplayContent.mWindow list to track all windows is
no longer needed as we can now get windows through the window
container hierarchy with methods like forAllWindows. The window
list was also a very complicated logic to understand and maintain,
so it won't be missed :)

Bug: 30060889
Test: Existing tests pass
Change-Id: I590cb33aa0f42bcd4a26ddce102f05e657f54144
2016-11-21 08:17:57 -08:00
Neil Fuller
b7146fec0d Change EXTRA_TIME_PREF_24_HOUR_FORMAT from boolean to int
... on Intent.ACTION_TIME_CHANGED.

This is to better represent the possible settings values for
the "use 24 hour format" setting. These are "12" (use 12 hour
formatting), "24" (use 24 hour formatting), unset
(use locale default formatting).

The EXTRA_TIME_PREF_24_HOUR_FORMAT for the ACTION_TIME_CHANGED
is now an int, not a boolean. 0 means "12", 1 means "24" and
2 means "use locale default". This is not a backwards compatible
change but the EXTRA_TIME_PREF_24_HOUR_FORMAT is not public
and so should only affect platform code that generates or
consumes the intent like settings code.

There are associated changes to Settings code to update the source
of the Intent.

The related underlying code that is triggered in response to the
intent and previously assumed a boolean now takes a Boolean.

Other changes:

The ActivityManagerService now only sends a binder notification
to running services if the EXTRA_TIME_PREF_24_HOUR_FORMAT
is present. There is an example of ACTION_TIME_CHANGED
being sent from the platform (AlarmManagerService, when the system
clock is noticed to have changed independently of the RTC) that
does not set the extra and would previously have misinterpreted
to mean "user wants 12 hour formatting", which would have been a
bug.

i.e. the code from ActivityManagerService that would interpret the
missing extra as false:

final int is24Hour =
        intent.getBooleanExtra(
                Intent.EXTRA_TIME_PREF_24_HOUR_FORMAT, false) ? 1 : 0;

Some methods and constants have be renamed to better reflect their
use.

Bug: 32761619
Bug: 32933009
Test: Manual testing
Change-Id: Ie7e9c62ce65e7e3a056b2751b45fe6cb9de86498
2016-11-21 12:22:32 +00:00
Andrii Kulian
e8d928a61d Fix stack visibility evaluation
Stack visibility is evaluated based on its position in stack list.
In this case we care only about stacks on the same display.

Test: ActivityManagerDisplayTests
Test: #testLaunchActivitiesAffectsVisibility
Change-Id: Ide42e8b5e240bd61c33cc2d4715e44fc9a940952
2016-11-20 19:11:52 +00:00
Marie Janssen
6689f33436 Bluetooth: BLE app tracking fixes
Simplify tracking registered BLE Apps and clear the state when we
try to recover bluetooth from starting to ON.

Test: enable and disable bluetooth an LE-only app running
Bug: 32609235
Change-Id: I3233bf8402a3c8fc4886ef21b1e9411bc78d4e2c
2016-11-18 14:36:24 -08:00
Fyodor Kupolov
7cebbc8b22 Presubmit test for PackageManager
Added PackageManagerPresubmitTests. testPrivAppPermissions method
tests that core apps like systemui are getting all requested
signature|privileged permissions.

Test: PackageManagerPresubmitTests passes
Bug: 32935038
Bug: 31008485
Change-Id: I31c5c1a2613b8c1ddf927d2708d0361407342b87
2016-11-18 14:29:29 -08:00
Julia Reynolds
f22d457eeb Merge "Prioritize channel sound & vibration settings." 2016-11-18 22:12:28 +00:00