Commit Graph

9593 Commits

Author SHA1 Message Date
TreeHugger Robot
2c2fb6189c Merge "Allow cross profile call between DO and PO" 2016-11-14 16:27:56 +00:00
TreeHugger Robot
d43d705735 Merge "Revert "Add Build.isAtLeastO"" 2016-11-14 15:46:17 +00:00
Tony Mak
46aabe5ef4 Allow cross profile call between DO and PO
Allow DO to bind service of PO in managed profile and vice versa.
DO and PO must be the same package.

Bug: 31895999

Change-Id: I3ce2943aebd1249401d5814757a0ce25b9f85279
Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.CorpOwnedManagedProfileTest
2016-11-14 14:20:11 +00:00
Michal Karpinski
a9ff206af2 [DPM] DO uses batch token to retrieve network logs, and can retrieve
the same batch many times

This allows DO to:
a) know that some logs were dropped (by trying with token and not
getting anything)
b) know how many logs were there in each batch (useful especially
for the dropped ones)
c) retry batch retrieval if it failed

Test: will be CTS tested once APIs unhidden
Bug: 29748723
Change-Id: I788359242e3b2a4cb638edb25e5db8b25646c29f
2016-11-14 10:26:55 +00:00
Jeff Sharkey
cb62162219 Make another interface oneway, whitelist provider.
More progress towards removing blocking calls to improve system
stability.

Test: builds, boots
Bug: 32715088
Change-Id: I5ab2d2687f4f47e0ee68105c6998e74798af061c
2016-11-11 14:06:11 -07:00
TreeHugger Robot
3a7c696fc5 Merge "Make getter & setting names consistent." 2016-11-11 20:19:49 +00:00
Julia Reynolds
3785605a44 Make getter & setting names consistent.
Test: runtest systemui-notification
Change-Id: Iff746f0ae149d1b09792e240503db9d008fe267c
2016-11-11 09:36:52 -05:00
Jason Monk
97a06a12ed Add switchable theme to tuner
Allows option in tuner to switch between system theme overlays
if multiple exist. Requires a restart to take effect.

Test: Settings -> Tuner -> Other -> Theme
Change-Id: Iea43b9cbb67fd91c6008be594ad4cfd19c3f57ec
2016-11-11 09:01:20 -05:00
liangweikang
84086bb997 Merge "fixed applyConfigurationToResourcesLocked WeakReference is null" am: 264d1f12a3 am: 45562df8bb am: b95e567919
am: 04a9be65c8

Change-Id: I94321a4192a854feb171b35fc2930887095d2da3
2016-11-11 03:46:14 +00:00
liangweikang
b95e567919 Merge "fixed applyConfigurationToResourcesLocked WeakReference is null" am: 264d1f12a3
am: 45562df8bb

Change-Id: Ibd3818f9b37ee58c6225a9b6d7cefd486f20bdb9
2016-11-11 03:32:05 +00:00
liangweikang
45562df8bb Merge "fixed applyConfigurationToResourcesLocked WeakReference is null"
am: 264d1f12a3

Change-Id: Icfaf039b078d7ce43b23bed09cd0102427c6f047
2016-11-11 03:25:41 +00:00
Clara Bayarri
7eda644785 Revert "Add Build.isAtLeastO"
This reverts commit 3b8b07c8f4.

Bug: 32668621
Test: this is a revert, no original tests
Change-Id: I893025f32423aed3fe15a64c22753d24aafc4e65
2016-11-11 01:56:32 +00:00
Winson Chung
7075d79cab Merge "Adding API for apps to specify their aspect ratio when entering PIP." 2016-11-10 23:08:54 +00:00
TreeHugger Robot
48b3ffc557 Merge "Not blocking focus on action bar on tab" 2016-11-10 20:45:26 +00:00
Dianne Hackborn
e07641d4fb Start implementing background restrictions for eph apps.
This implements the additional intended path for checking
allowed background operations, APP_START_MODE_DISABLED, which
doesn't allow an app to launch in the background at all.

Also change the semantics of delivering broadcasts to manifest
receivers to always restrict those, not changing based on
whether the app is currently idle.  This is the desired intended
behavior for apps as they explicitly update to work with
bg check.

And now that we have ephemerality associated with the uid state
in the activity manager, we can propagate this through the
relevant callbacks in IUidObserver so things watching these
changes can immediately determine whether they should do their
more aggressive shut down work for the uid rather than having
to walk through all their state looking for package associated
with that uid and whether they should be shut down.

Also remove the "lenient" bg check mode, since that was
just an early experiment that we won't actually use.

Add a new "make-idle" activity manager command to immediately
put a uid into the idle state (if possible) to make it easier
to test.

Test: manually against an eph app
Change-Id: I43a138ff281f69a9251d3f29ab6e13f48cff8ad6
2016-11-10 12:01:20 -08:00
Winson Chung
84a3834a0c Adding API for apps to specify their aspect ratio when entering PIP.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipAspectRatio
Test: #testEnterPipExtremeAspectRatios

Change-Id: I9efba942b9a6451dec07428fe1e428ef4a896867
2016-11-10 09:19:52 -08:00
TreeHugger Robot
446e723c08 Merge "The big Keyguard transition refactor (8/n)" 2016-11-10 00:54:54 +00:00
Jorim Jaggi
e69c93181f The big Keyguard transition refactor (8/n)
Don't force mKeyguardGoingAway, as this never recovers. Make sure
to only show the dismissing Keyguard activtiy and recover the
state when trusted state changes.

Test: Make sure Keyguard is in a trusted state, start an activity
with FLAG_DISMISS_KEYGUARD from FLAG_SHOW_WHEN_LOCKED activity
and make sure there is no flicker.

Bug: 32057734
Change-Id: I5d212f6f9d5430250b22c8370f45dc95756432d2
2016-11-09 15:32:04 -08:00
Julia Reynolds
67c8e1e61f Merge "Ranker --> Assistant." 2016-11-09 20:38:47 +00:00
Jeff Sharkey
d0ac9d3bac Merge "Detect non-oneway calls leaving system_server." 2016-11-09 16:51:41 +00:00
Julia Reynolds
77b2cc920f Ranker --> Assistant.
Rename ranker to assistant and make some of the methods public.
Delete the ext services ranker and restore the listener-type
lifecycle to the assistant.

Test: manual. add a notification assistant and verify it gets
assistant and listener callbacks.

Change-Id: Ia3406c8c14d923426c1b8a6d8b5187efe64c31c3
2016-11-09 09:04:16 -05:00
liangweikang
a9c9bf5106 fixed applyConfigurationToResourcesLocked WeakReference is null
https://code.google.com/p/android/issues/detail?id=226956

Test: compile anr monkey test

Signed-off-by: liangweikang <liangweikang900911@gmail.com>
2016-11-09 01:40:33 +00:00
TreeHugger Robot
1183883b2e Merge "Implement new API" 2016-11-09 00:30:44 +00:00
Todd Kennedy
e5195dd17c Implement new API
This is the first swack at the new, 2-phase API. Adds the new methods
to the resolver service and makes the split name explicit on the
installer intent.

The 2nd phase will not yet be invoked; that's coming in a follow-on
change.

Bug: 25119046
Test: build & install the sample resolver 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: I2df6fa64d46f17a86a2e32b19417632c594fb10f
2016-11-08 13:47:28 -08:00
Vadim Tryshev
16bb2c75d0 Not blocking focus on action bar on tab
When the focus jumps from action bar to
outside of it, action bar disables focusing
on it so that tabbing couldn’t get back to it.
Currently, it does the check that the focus
has left the bar from onFocusChange(), when
the internal data structures are in process
of updating the current focus; as a result, the
check may report a wrong result, and the
focus will be blocked while it’s actually is still in
the action bar. This caused the action bar to
lose focus.
The fix makes the check in a posted action,
fixing the issue.

Bug: 32087180
Test: Manual test that the issue doesn’t repro.
Change-Id: I67069d2ae58f2843e6fcc8c705943324cc1533f4
2016-11-08 11:47:16 -08:00
Dianne Hackborn
5614bf5a1a Move code for handling uid obs "cutoff" to activity manager
To do this, I had to fix the PROCESS_STATE_NONEXISTENT constant
to be the last value (instead of the special magical -1 value)
so it semantically matches the public importance constants.  I
think this is better anyway.

Also this fixes a big problem in the implementation, where we
weren't keeping track of the last proc state per uid...!  Duh.

Test: manually ran testUidImportanceListener
Change-Id: Ie3008f824446089840f896885e6033472abb065e
2016-11-08 11:38:04 -08:00
TreeHugger Robot
baca8f50df Merge "Don't call into ActivityManagerInternal outside system process." 2016-11-08 02:59:38 +00:00
Stephen Chen
0c56b3db64 Merge "Fix documentation for NetworkStatsManager methods." 2016-11-08 02:06:03 +00:00
Sudheer Shanka
ba45a68a5d Don't call into ActivityManagerInternal outside system process.
If ActivityManagerNative.isSystemReady is being called in a non-system
process, just return true instead of calling into
ActivityManagerInternal since system should be ready by now and
as ActivityManagerInternal is only available for system services.

Fixes: 32700143
Test: Test referenced in the bug is passing.
      adb shell am instrument -e class com.android.androidbvt.SysUIGSATests -w com.android.androidbvt/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ibb594f887f7f5391c34c686f2667a6696e4268a2
2016-11-07 16:16:24 -08:00
Jeff Sharkey
0a17db1cc5 Detect non-oneway calls leaving system_server.
To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.

In this CL, the system_server uses the new Binder.setWarnOnBlocking()
method to enable detection by default for all remote Binder
interfaces.  It can also use Binder.allowBlocking() to allow
blocking calls on certain remote interfaces that have been
determined to be safe.

This CL adds the 'oneway' verb to several interfaces and methods
where it should have been added, and marks a handful of system
ContentProviders as being safe to call into.  Also, we assume that
any services obtained from ServiceManager are part of the core
OS, and are okay to make blocking calls to.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: Ide476e120cb40436a94b7faf7615c943d691f4c0
2016-11-07 17:03:37 -07:00
Stephen Chen
50a021a019 Fix documentation for NetworkStatsManager methods.
Test: N/A
Change-Id: I054ce104e561ece8e414c7ddad718665e51a692e
2016-11-07 11:31:24 -08:00
Dianne Hackborn
cdb31d2ecd Merge "Implement system API for monitoring uid importance changes." 2016-11-07 18:23:43 +00:00
Etan Cohen
a99a05982e Merge "[NAN-AWARE] Rename NAN to Aware" am: 74b1131cc8
am: 6571007101

Change-Id: Ief54b313dc5ca5d30645b55ed2ad0333036a1671
2016-11-06 03:21:37 +00:00
Etan Cohen
6571007101 Merge "[NAN-AWARE] Rename NAN to Aware"
am: 74b1131cc8

Change-Id: I2e788e19a11f2709f2e542dbdc4b58433a3574bf
2016-11-06 03:13:31 +00:00
Etan Cohen
0849ded008 [NAN-AWARE] Rename NAN to Aware
~Rename only (and any reformatting needed to pass lint) - no
functional changes!

Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.

(cherry-pick of commit a61b9fb569)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Merged-In: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
Change-Id: I4206d2fd722dc7dec9df4aee5c818101d7f9dccc
2016-11-05 09:41:38 -07:00
Etan Cohen
3a1dd86ce4 Merge "[NAN-AWARE] Rename NAN to Aware" 2016-11-05 16:19:43 +00:00
Dianne Hackborn
058f1e4468 Implement system API for monitoring uid importance changes.
Changed the permission for registerUidObserver to be
PACKAGE_USAGE_STATS, which better matches the semantics of this
API and is accessible to system apps.

Test: Added testUidImportanceListener()

Change-Id: Ib47d02bd654fbe399a9c92550c89ecbd38f928dc
2016-11-04 17:05:27 -07:00
Etan Cohen
0413327d74 [NAN-AWARE] Rename NAN to Aware
~Rename only (and any reformatting needed to pass lint) - no
functional changes!

Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.

(cherry-pick of commit a61b9fb569)
(cherry-pick of commit b061f21e7e59a99834e163e2baa1c82229e419a6)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Change-Id: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
2016-11-04 15:42:08 -07:00
TreeHugger Robot
3e8431f1f2 Merge "Move IActivityManager to aidl." 2016-11-04 22:24:12 +00:00
Stephen Chen
5963fd864b Merge "Implement metered tracking for NetworkStats summary queries." 2016-11-04 21:29:33 +00:00
Sudheer Shanka
fc46e9b643 Move IActivityManager to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
2016-11-04 10:43:25 -07:00
Stephen Chen
2514787897 Implement metered tracking for NetworkStats summary queries.
Dependent on ag/1550196 where API is defined.

Bug: 31015360
Bug: 26545374
Test: runtest --path
frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java,
other test classes.

Change-Id: I968b9e3352d7880e3fc438f12de628a2da057e0a
2016-11-04 09:55:21 -07:00
Andrii Kulian
839def9b54 Add shell command to move activity stacks between displays
Also rename "stack movetask" command to be consistent with other
shell commands.

Test: New CTS tests coming soon.
Change-Id: I3d7e04e0ae8ea76c27c3e4c1e286d5cd4539870c
2016-11-03 17:26:35 -07:00
TreeHugger Robot
02e17d27b1 Merge "[DPM] Management and retrieval of network logs" 2016-11-02 23:28:10 +00:00
Sudheer Shanka
aa2a530e64 Merge "Fix IApplicationThread transaction codes." 2016-11-02 22:00:30 +00:00
Wale Ogunwale
5b6714c2fa Added support for window TYPE_PRESENTATION
Switched presentation feature to use new window TYPE_PRESENTATION
and also add its own window token to the display the presentation
is running on. This is needed as window manager no longer allows
tokens to have windows on multiple displays.

Bug: 32566372
Test: Presentation mode works.
Change-Id: I9c2998311b65640743b8e23ec4f10bf1ffbfd785
2016-11-02 18:25:34 +00:00
Sudheer Shanka
a14e4db959 Fix IApplicationThread transaction codes.
(IBinder.FIRST_CALL_TRANSACTION=1) is added to the specified
transaction codes during binder generation. Correct transaction
Ids in IApplicationThread taking this into account.

Bug: 30977067
Test: Verified that the transactions in generated binder have
      correct Ids.
Change-Id: Id1f6ce59814ed559cafda01be0d55c78d52e50e2
2016-11-02 10:38:37 -07:00
TreeHugger Robot
3694d8789f Merge "[DPM] DO can start network logging and listen for events" 2016-11-02 10:35:28 +00:00
Michal Karpinski
f77ee4f1b7 [DPM] Management and retrieval of network logs
This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
2016-11-02 09:00:21 +00:00
Michal Karpinski
dd9bb4fdd9 [DPM] DO can start network logging and listen for events
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
2016-11-02 08:52:53 +00:00