Commit Graph

63199 Commits

Author SHA1 Message Date
Tingting Wang
e0cbda454c Rename CONTACT_METADATA_SYNC GService Flag.
Rename it to CONTACT_METADATA_SYNC_ENABLED.

BUG 28295805

Change-Id: Ib1f735b082a2ff6cca93e377b3eaaaf7cd396b8d
2016-05-10 17:29:00 -07:00
TreeHugger Robot
de66540fd3 Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev 2016-05-06 21:41:41 +00:00
Chris Tate
0588954071 Merge "Move the 'pretend idle jobs can run now' broadcast into AMS" into nyc-dev 2016-05-06 21:34:52 +00:00
Pavlin Radoslavov
2f463d4c8b Fix divergent equals and hashCode behavior
Calling Objects.hash with a byte[] will call the identity hashCode on
the byte[] and this doesn't agree with the use of Objects.deepEquals
in equals.
Bug caught by error prone.

Also, replaced usage of Objects.deepEquals(mServiceDataUuid, ...) with
Objects.equals(mServiceDataUuid, ...), because mServiceDataUuid
is an Object of type ParcelUuid.

Bug: 28585195
Change-Id: Id92734874339985fedafe1a28286a6a4dcd88d3b
2016-05-06 12:45:43 -07:00
TreeHugger Robot
5d6a218d9e Merge "Dismiss docked stack if an activity is shown on top of the lock screen" into nyc-dev 2016-05-06 18:30:23 +00:00
Christopher Tate
27d92e4e39 Move the 'pretend idle jobs can run now' broadcast into AMS
It's a protected broadcast, so sending it directly from 'am' is
no longer an option.  This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
2016-05-06 11:25:11 -07:00
Phil Weaver
b42afe9be0 Merge "Make AccessibilityService#disableSelf atomic." into nyc-dev 2016-05-06 18:08:29 +00:00
Chris Thornton
0f6a7abb83 Merge "Fix NPE in KeyphraseEnrollmentInfo.toString()" into nyc-dev 2016-05-06 18:04:20 +00:00
Felipe Leme
46c4fc357c Refactored NetworkPolicyManagerService mUidRules.
NetworkPolicyManagerService (NMPS) keeps an internal list of uid
rules (mUidRules) for network restrictions, and when these rules
changes it needs to notify external listeners (such as
ConnectivityService / CS).

Prior to Android N, both Data Saver mode (the feature previously known
as "Restrict Baground Data") and Battery Save mode used the same set of
firewall rules to implement their restrictions: when Battery Saver mode
NPMS would mark all networks as metered and set the proper firewall
rules externally.

Recently, these 2 modes were split in 2 distinct firewall rules and
NMPS.updateRuleForRestrictBackgroundLocked() was changed to update
the mUidRules logic based on the Data Saver firewall (since the Battery
Saver firewall changes are handled externally, on
updateRuleForRestrictPowerLocked()). As such, CS was not notified when
the power-related changes were made, which would cause apps to get a
state of CONNECTED / CONNECTED when querying its active connection.

This change refactores the mUidRules to use bitmasks, in preparation for
another change that will fix the issue.

It also fixes a minor bug that was preventing removed packages to be
removed from the whitelist.

BUG: 28521946
Change-Id: I9f0e1509a6192cad403f740c1cd76a6b7dab7d26
2016-05-06 17:58:40 +00:00
Wale Ogunwale
9973294080 Dismiss docked stack if an activity is shown on top of the lock screen
It is risky/complicated to try to put the activity showing on-top of
the lock screen in the right fullscreen configuration with the current
architecture. So, we just dismiss for now.

Bug: 28195260
Change-Id: I29a0350993ce8fe548d4a465b06d877cde151c78
2016-05-06 10:13:14 -07:00
Phil Weaver
19557de767 Make AccessibilityService#disableSelf atomic.
This API was using a oneway aidl call, which meant that the
service was disabled some time after the method returned. That
confused tests that were turning a service off during tearDown
and then turning it back on again in setUp.

Bug: 28621277

Change-Id: I75984df0613bdbb1bc876e2a15caf59106027337
2016-05-06 08:57:12 -07:00
Tony Mak
13532bdd2e Merge "Fix enterprise contacts APIs naming and docs" into nyc-dev 2016-05-06 12:06:29 +00:00
TreeHugger Robot
d0fa4d3aaf Merge "Fix status bar background flicker" into nyc-dev 2016-05-06 01:49:34 +00:00
Chris Thornton
d9729d1df8 Fix NPE in KeyphraseEnrollmentInfo.toString()
If there are no enrollment applications on the system, but someone still
makes a KeyphraseEnrollmentInfo and tries to print it, it would generate
a NPE on a map object. Instead of setting the map to null when we don't
find any enrollment applications, we can just set it to an empty map.

Bug:28622866
Change-Id: I023e6fd90effd3143c19817a0d6637a013bebc31
2016-05-05 17:20:44 -07:00
Adam Lesinski
c1ff12eccd Merge "Fix issue where existing Activity Resources references would not update" into nyc-dev 2016-05-05 23:23:43 +00:00
Chris Craik
867b812eff Fix status bar background flicker
Fixes: 28533578

Change-Id: I075f49b7d20e0e95e790a9755d104a0a51575054
2016-05-05 16:22:21 -07:00
Adam Lesinski
8ce4e12c73 Fix issue where existing Activity Resources references would not update
When relaunching an Activity, the DecorView and ViewRootImpl is re-used,
along with the IBinder activity token. This means that when we create
new resources, we end up just updating the base Activity resources.

However, we would set the configuration to the new requested override
config and then proceed to update existing Resources references, which
would return immediately due to the equality check for configuration
updates.

This change pushes the setting of the new override config to the
updateResourcesForActivity method, which will properly update Resources
references that are held in the re-used DecorView.

Bug:27915587
Change-Id: I113007a40fa464b8a234b073dcf851e16fee0177
2016-05-05 23:08:09 +00:00
Vladislav Kaznacheev
7d2a0a0571 Merge "Add @TestApi to ActivityOptions.setLaunchStackId" into nyc-dev 2016-05-05 23:04:49 +00:00
Christopher Tate
c5be8f8a4b Correct docs about what is ignored in full-data backup
You can't back up content in e.g. getNoBackupFilesDir() even if your
app explicitly tries to.

Bug 28321431

Change-Id: Ifa2a4bc518de03aba4c8809e60d8bb90fce767f8
2016-05-05 22:20:46 +00:00
Joe Onorato
47384f90b4 Merge "Add the individual wakeup alarm counts to the batterystats checkin." into nyc-dev 2016-05-05 22:11:57 +00:00
Yohei Yukawa
9f76abc8ab Merge "Fix stale InputMethodManager#mFullscreenMode." into nyc-dev 2016-05-05 21:55:50 +00:00
Joe Onorato
1476d32b87 Add the individual wakeup alarm counts to the batterystats checkin.
Bug: 28601365
Change-Id: I94ad69eeb575f75d62bd45076184f521bd11052d
2016-05-05 14:53:25 -07:00
Dianne Hackborn
d90be6cccc Merge "Fix issue #28602068: Add count to job scheduler stats" into nyc-dev 2016-05-05 21:53:23 +00:00
TreeHugger Robot
ea162c3c79 Merge "Prepare to replace windows across recreate()." into nyc-dev 2016-05-05 19:38:17 +00:00
Alan Viverette
3a3fb73c75 Merge "Revert "Always assign leftover pixels to last weighted child"" into nyc-dev 2016-05-05 18:37:43 +00:00
Alan Viverette
61c41bf617 Revert "Always assign leftover pixels to last weighted child"
This reverts commit cc26636f08.

Bug: 27690033
Change-Id: Ib7084dd8961cd486de4e6b13e36da7be887b1835
2016-05-05 17:54:36 +00:00
Jason Monk
c91f5e2971 Merge "Add action to launch webview implementation settings" into nyc-dev 2016-05-05 16:56:20 +00:00
Vladislav Kaznacheev
acf147e7e3 Add @TestApi to ActivityOptions.setLaunchStackId
Bug: 28506739
Change-Id: I20fe4d080c125b38a84d9832a497340f805e82e7
2016-05-05 09:32:27 -07:00
Rubin Xu
0fb6b9e18c Guard retrievePreRebootSecurityLogs with config flag
Bug: 28160645
Change-Id: Ifce884c319019758dfaaa39bc239e9f30962c920
2016-05-05 12:00:50 +01:00
Alan Viverette
a11c21b412 Merge "Always assign leftover pixels to last weighted child" into nyc-dev 2016-05-05 02:26:45 +00:00
Dianne Hackborn
5a969aa139 Fix issue #28602068: Add count to job scheduler stats
Also increase the event buffer size to 100, and implement
it as a real ring buffer.  And put that implementation in
a generic class for use in other places.

Change-Id: I06936984e2c253fb5f0eb5d15faf0019ec73d4e2
2016-05-04 17:19:04 -07:00
Ruben Brunk
01d232988a Merge "Update VR API docs." into nyc-dev 2016-05-04 23:35:44 +00:00
Chong Zhang
6afe594461 Merge "Debug traces to facilitate screen timeout debugging" into nyc-dev 2016-05-04 22:50:11 +00:00
Dianne Hackborn
6eb119c7cb Merge "Maybe fix issue #28457907: Pebble app crash + reboot" into nyc-dev 2016-05-04 22:49:59 +00:00
TreeHugger Robot
4e34cd0537 Merge "Fix View leakage from mPreSortedChildren" into nyc-dev 2016-05-04 22:23:26 +00:00
Chong Zhang
4ffc318012 Debug traces to facilitate screen timeout debugging
bug: 27522448
Change-Id: I4d51be316e4aedecffb7001126849d7c6136d517
2016-05-04 15:09:01 -07:00
Chet Haase
c381c4e8e7 Merge "Force second measure pass when there is a configuration change" into nyc-dev 2016-05-04 21:49:11 +00:00
Yohei Yukawa
68c1e1935d Merge "Fix a behavior change in "Show software keyboard"." into nyc-dev 2016-05-04 21:39:15 +00:00
Alan Viverette
cc26636f08 Always assign leftover pixels to last weighted child
Bug: 27690033
Change-Id: Ibee51d49d3f7aa923750ce330df2e1aa2156f2bd
2016-05-04 16:59:38 -04:00
Dianne Hackborn
d8e877d27d Maybe fix issue #28457907: Pebble app crash + reboot
Fix this long-standing multi-threading issue in Bundle
when multiple threads are trying to read from a Bundle
and conflict to due unparceling.

There are two critical sections this protects: writing
the bundle in to a parcel (when it is doing this from
the bundle's already parcelled representation), and
unparcelling a bundle into its map of entries.

Change-Id: I5470002f090e63dd623a573da6c204d3b5b661f4
2016-05-04 13:43:58 -07:00
Chris Craik
fc56377178 Fix View leakage from mPreSortedChildren
bug:28553824

Change-Id: I62bfa3dcb121792dff7d00be1f4b018a99c96e1d
2016-05-04 13:40:07 -07:00
TreeHugger Robot
5f81a3f84c Merge "Make sure to pause activity before stopping" into nyc-dev 2016-05-04 20:28:51 +00:00
Robert Carr
77bdfb512f Prepare to replace windows across recreate().
When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
2016-05-04 12:40:39 -07:00
Yohei Yukawa
d0d0797474 Fix a behavior change in "Show software keyboard".
This bug was a corner case of stopping lying about
Configuration#keyboard when "Show software keyboard" is turned on, which
was done by my CL [1] in Android N development cycle.

Previous implementation

  if (config.keyboard != Configuration.KEYBOARD_NOKEYS) {

had relied on the fact that the system was lying about config.keyboard,
which is no longer valid.  We need to change the behavior of
InputMethodService#onShowInputRequested() depending on
Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD like we did for
InputMethodService#onEvaluateInputViewShown() in [1] to minimize the
impact on stopping lying about Configuration#keyboard.

 [1]: Id4d332e3909590c68345e10e1f2e18650efb2eb7
      7b739a802c

Bug: 28423439
Change-Id: I8a774cbf61ac706d8446be91b17bceee57a13656
2016-05-04 11:56:35 -07:00
Wale Ogunwale
5dc6d6551e Make sure to pause activity before stopping
In some cases it is possible for activity manager to request
a resumed activity to stop when it's visibility changes. This
is a valid transition, however we need to make sure to pause
the activity on the client side before stopping it so lifecycle
transition works as expected.

Bug: 28574036
Change-Id: I759b38bbd1c9c3bb0475759bcb638d8223fa504d
2016-05-04 11:46:29 -07:00
Robin Lee
7ec93a1ee2 Merge "Add lockdownEnabled parameter to always-on VPN API" into nyc-dev 2016-05-04 18:38:30 +00:00
Chet Haase
d86fb2ce37 Force second measure pass when there is a configuration change
It's possible for a call to updateConfiguration() to happen in the middle
of performTraversals(), after the measure phase has happened, but before
the layout phase. During the configuration call, it's possible for views to
have requestLayout() called on them. This can result in the request flag
not getting cleared, because views that have had layout requested, but which
have not yet been measured, may not be told to layout.

The correct flow should be that any code path causing requestLayout() (which
could be anything that calls out to user/app code) should happen before the
measure phase (or cause a second measure to occur). For now, causing the second
measure to occur is a low-risk simple change that fixes the immediate problem.

Issue #28152259  Calling requestLayout from inside View.onConfigurationChanged can cause problems

Change-Id: I3b532eeacc3784d8d21193d01ddd7fa15ac0684e
2016-05-04 18:14:46 +00:00
Abhijith Shastry
9a2384a7a6 Merge "Update BlockedNumberContract documentation." into nyc-dev 2016-05-04 18:14:38 +00:00
Renat Aksitov
d516e30b91 Merge "Voice Messaging Intent API." into nyc-dev 2016-05-04 18:02:47 +00:00
TreeHugger Robot
221c6e6db7 Merge "Fix ClipData JavaDoc and behavior that contradicts JavaDoc" into nyc-dev 2016-05-04 17:07:13 +00:00