240806 Commits

Author SHA1 Message Date
Mady Mellor
5f88f9b355 Fix NPE when updating gear vertical location
Since we do this onLayout it's unnecessary to update the location here
plus it causes an NPE as the parent may not be laid out yet when
accessing collapsed height.

Bug: 28390732
Change-Id: I3e61eb7ce854002def3342856557d456249e5e26
2016-04-27 18:53:27 +00:00
Svetoslav Ganov
f71d7feef2 Merge "Ensure local settings caches are not stale" into nyc-dev 2016-04-26 18:36:28 +00:00
TreeHugger Robot
83ca62bdbe Merge "Remove -night qualified resources" into nyc-dev 2016-04-26 18:33:05 +00:00
Svet Ganov
53a441ca8e Ensure local settings caches are not stale
We used the system proterties as a shared memory mechanism
to propagate information to local settings caches when the
content has changed and the cache should be cleared. The
system properties are unfortunately updated asynchronously
leading to cases where clients may read stale data.

This change adds a simple int array data structure backed
by shared memory which guarantees individual values are
atomically read and updated without memory tear. Multi-
index opearations are not synchronized between each other.

The settings provider is using the new data structure to
propagate the settings generation which drives when caches
are purged.

We have a single memory array keeping the generation for
different settings tables per user. Since memory array is
not a compact data structure and the user space exceeds
the memory array size we use an in-memory map from keys
to indices in the memory array where the generation id of
a key is stored. A key is derived by the setting type in
the 4 most significant bits and the user id in the 28 least
significant bits.

The mapping from a key to an index is cleared if the user is
removed and the corresponding index in the memory arry is
reset to make it available for other users. The size of the
memory array is derived from the max user count that can be
created at the same time.

bug:18826179

Change-Id: I64009cc5105309ef9aa83aba90b82afc8ad8c659
2016-04-26 11:31:55 -07:00
Eino-Ville Talvala
e9bfc4e20b Merge "SchedulingPolicyService: Fix UID for cameraserver" into nyc-dev 2016-04-26 18:21:43 +00:00
TreeHugger Robot
9444231550 Merge "Bluetooth: Fine tune audio gain for Absolute Volume case" into nyc-dev 2016-04-26 17:43:22 +00:00
TreeHugger Robot
34510eb293 Merge "Don't opt-out of warning dialog by default on user builds." into nyc-dev 2016-04-26 17:40:29 +00:00
Todd Kennedy
69582262f0 Merge "Add "do not kill" install option" into nyc-dev 2016-04-26 17:17:50 +00:00
TreeHugger Robot
fff349ddba Merge "Apply tint when setting check mark drawable" into nyc-dev 2016-04-26 17:17:05 +00:00
Liejun Tao
39fb5670a8 Bluetooth: Fine tune audio gain for Absolute Volume case
Fine tune the audio gain for Bluetooth Absolute Volume.
Use 50%, 70% and 85% for lowest volume steps 1, 2 and 3.
Thus the volume change sounds smoother, more linear.
When remote end tune volume out of mute, we should also
tune the audio gain for the lowest volume steps.

Bug: 26694114
Change-Id: I298a334a4b40ddb87495fda1935349bfce8b0537
2016-04-26 09:19:17 -07:00
Julia Reynolds
a0676c9207 Merge changes from topic 'api_review' into nyc-dev
* changes:
  Api review: Settings.
  Reduce spacing.
2016-04-26 15:29:11 +00:00
Chris Wren
6392db9df7 Merge "cancel group children before summaries" into nyc-dev 2016-04-26 15:26:35 +00:00
Julia Reynolds
efb951d4fe Merge "Swap star tint." into nyc-dev 2016-04-26 15:26:28 +00:00
TreeHugger Robot
396c590c42 Merge "Frameworks/base: Make debug helper lazy in ConnectivityManager" into nyc-dev 2016-04-26 15:25:44 +00:00
Julia Reynolds
d500495935 Swap star tint.
Bug: 27558254
Change-Id: Ia72cdc89d4cdcf3f5a5210f14632c15271922a98
2016-04-26 09:17:08 -04:00
David Brazdil
3eaf72dc67 Merge "Change app selection policy for post-OTA verification" into nyc-dev 2016-04-26 12:22:16 +00:00
Narayan Kamath
2d4a222de1 LoadedApk: Don't set up JIT profile support inside the system_server.
We shouldn't profile *any* packages loaded by the system_server, not
just the system_servers own ("android") package.

bug: 28241500
Change-Id: I5f3f477b40c758030a5bdc8e97d17cab6e68e204
2016-04-26 12:08:23 +00:00
David Brazdil
90e269917e Change app selection policy for post-OTA verification
Changes the policy for selecting packages which will be pre-verified
during post-OTA boot animation.

For Nx to Ny, an app is pre-verified if used in the foreground in the
last 7 days, or if its APK was loaded by other apps.

For M to N (or early N builds without detailed stats), an app is
pre-verified if it has any recorded use in the last 7 days.

Bug: 27902702
Bug: 27350503
Change-Id: I2b38daf017ecd0e5aa5ed596ed9351cffa03dbcb
2016-04-26 12:51:53 +01:00
David Brazdil
5bc7f5f01b Merge "Enable profile merging for post-OTA package verification" into nyc-dev 2016-04-26 11:39:43 +00:00
David Brazdil
5da9dad2dd Enable profile merging for post-OTA package verification
Currently post-OTA verification will attempt to compile with
'verify-profile' but does not merge the profiles prior to calling
dex2oat. As a result, we may miss some or all classes that need
verification.

Bug: 27688727
Change-Id: I1aa93cad2686513594cb37f6d3d181ae5c718d1d
2016-04-26 11:37:49 +00:00
TreeHugger Robot
e12d62bd79 Merge "WebView downgrade prevention logic" into nyc-dev 2016-04-26 09:31:57 +00:00
Shreyas Basarge
a16a3362b5 Merge "Wait for JobService to start before scheduling syncs" into nyc-dev 2016-04-26 09:23:30 +00:00
Lorenzo Colitti
b414eb8de6 Merge "Close open sockets when enabling firewall rules." into nyc-dev 2016-04-26 08:52:26 +00:00
Erik Kline
e24708e87f Merge "IpManager: delete dead getLinkProperties() code" into nyc-dev 2016-04-26 07:15:00 +00:00
Erik Kline
b2ff48bd71 IpManager: delete dead getLinkProperties() code
Now that it's long since been unused also delete the locking that was
introduced to make it possible.

Bug: 17733693
Bug: 24837343
Change-Id: Iee817a7c2e1d1dc9c080d3124d5986232dcda00f
2016-04-26 15:54:12 +09:00
Jaewan Kim
bdc4700155 Merge "PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist" into nyc-dev 2016-04-26 06:03:01 +00:00
Lorenzo Colitti
4cb4240b4d Close open sockets when enabling firewall rules.
When enabling a firewall rule that will deny networking to apps,
first close any sockets opened by those apps. Just dropping an
app's packets without closing its connections  has the following
problems:

1. The app has no way to know this has happened until a network
   timeout occurs.
2. The app's connections stay open, so the other end of the
   connection (e.g., a server) might continue to retransmit
   packets. These packets will wake up the kernel and cause
   battery drain, but we cannot respond to them because packets
   on those connections are dropped by the kernel (since the app
   is blackholed). So the other end might keep retransmitting.
3. Even though we think the connections are still open, the
   other end of the connection, or any intermediate NATs or
   firewalls, might time out and close the connection (e.g., by
   sending a RST). Because the app is blackholed, we have no way
   of knowing that this has happened, so when the app is granted
   network access again, these connections might just get stuck.

Bug: 27824851
Bug: 27867653
Change-Id: Iaaad1b26954fc5f1ba5c9ed8bdee039282f5e249
2016-04-26 13:39:08 +09:00
Jaewan Kim
f0fd218382 PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist
Bug: 27954955
Change-Id: I517e378d5c1672ac0eb87bdf4375b7d733276e58
2016-04-26 13:06:21 +09:00
Lorenzo Colitti
e4860f0256 Merge "When dumping connectivity metrics events, print data as well." into nyc-dev 2016-04-26 03:22:26 +00:00
Jorim Jaggi
c5804afa73 Fix a few issues with occluded Keyguard
- When we get a collapse before the layout happened in SystemUI,
don't expand the panel after the layout.
- Don't reset waitingToShow when coming out of sleep. This will cause
win.isVisibleOrBehindKeyguardLw to return false and then occluded
state will change rapidly from true -> false -> true, leading to
flickering in SysUI.

Bug: 23898941
Change-Id: I2b941188de777086bb2b477f5bfc00cc0cd6abe0
2016-04-26 02:54:34 +00:00
TreeHugger Robot
72c216f250 Merge "Don't hide app windows due to not showing when locked when keyguard is hidden" into nyc-dev 2016-04-26 02:21:18 +00:00
Jorim Jaggi
d6a3949588 Make sure to notify divider always
In some cases, recents didn't get resumed, so divider was never
notified and thus we didn't start the animation. Instead, move
the first drawn logic into onStart.

Bug: 28366529
Change-Id: Ia71d6b517451bba727ae31a184bb55cecf5af198
2016-04-26 00:52:46 +00:00
Wale Ogunwale
23fd1db68d Don't hide app windows due to not showing when locked when keyguard is hidden
This worked in pre-N because the only visible app was the app that can be
shown when the keyguard is hidden. That isn't the case in multi-window mode
where one of the apps can be shown when locked and the other doesn't have
the show when locked flag. Only hide the other app if the keyguard is shown.

Bug: 28368875
Change-Id: I5039098db74492fadf667fed24fc58448436681a
2016-04-25 17:21:34 -07:00
Makoto Onuki
711ffe620e Merge "When app is updated, save the new version code, and update shortcuts with resource based icons." into nyc-dev 2016-04-26 00:07:59 +00:00
Eino-Ville Talvala
1f677fdeae SchedulingPolicyService: Fix UID for cameraserver
Cameraserver has been split from mediaserver, so need to use
its UID for determining whether to grant scheduling priority
change requests.

Bug: 28246165
Change-Id: I87b96e9fe0c0c38ec994d3d2aa131668d3d66986
2016-04-25 17:05:03 -07:00
Shreyas Basarge
a4ac5ab850 Wait for JobService to start before scheduling syncs
Add code to wait for SycJobService to pass back an
instance of itself after boot before allowing syncs
to be scheduled. 

Also removes unused constant MESSAGE_SYNC_EXPIRED.

Bug: 28380795
Change-Id: I616ba5c74578a81ff1e37ba4bd1fd937ce5c006d
2016-04-25 23:04:32 +00:00
TreeHugger Robot
af8be42b9f Merge "CodecCapabilities: handle legacy VP9 codecs with no profiles" into nyc-dev 2016-04-25 22:43:30 +00:00
Lajos Molnar
4710431dc4 Merge "clarify MediaCodec.setVideoScalingMode behavior" into nyc-dev 2016-04-25 22:36:55 +00:00
TreeHugger Robot
b59beffa89 Merge "Fixed issue with wrong stack fullscreen state on configuration change" into nyc-dev 2016-04-25 22:27:58 +00:00
TreeHugger Robot
68d180bbd1 Merge "Check for null drawable during LayerDrawable.jumpToCurrentState()" into nyc-dev 2016-04-25 22:10:37 +00:00
Jeff Sharkey
436308f88b Merge "Destroy both CE and DE data when corrupted." into nyc-dev 2016-04-25 21:59:59 +00:00
Jeff Sharkey
3a10c1e86d Merge "Track down Contexts without data directories." into nyc-dev 2016-04-25 21:59:41 +00:00
TreeHugger Robot
57413a7477 Merge "Make fake libart for misbehaving apps be loaded." into nyc-dev 2016-04-25 21:53:31 +00:00
Amith Yamasani
1d66995f47 Merge "Fix deadlock between VrManager, ActivityManager and WindowManager" into nyc-dev 2016-04-25 21:37:17 +00:00
Chong Zhang
98afb342df Merge "Wait for next app to be visible if current activity is marked visible" into nyc-dev 2016-04-25 21:13:29 +00:00
Wale Ogunwale
5952f9aea4 Fixed issue with wrong stack fullscreen state on configuration change
- No need to run TaskStack#updateBoundsAfterConfigChange if the stack
is fullscreen as the bounds will already be updated to when the display
content changed due to rotation.
- Correctly set mTmpRect2 that we are using to calculate the rotated
bounds to the current mBounds.

Bug: 28319277
Bug: 27870534
Change-Id: Ic3d9407b735210351c28297de79bf035909afcfe
2016-04-25 14:04:04 -07:00
Jorim Jaggi
df89cd1b39 Merge "Fix bug with cancelled drag" into nyc-dev 2016-04-25 20:59:40 +00:00
Chris Wren
076bddde4b cancel group children before summaries
Bug:28190616
Change-Id: I1b716417119cfa3f4ffdd159ab5197cbfa714a8d
2016-04-25 16:44:53 -04:00
Felipe Leme
af096719c0 Don't opt-out of warning dialog by default on user builds.
BUG: 28341946
Change-Id: I9ce6bf52a02a14055d4ded41aac50c79abdb4ee9
2016-04-25 13:41:28 -07:00
Lajos Molnar
a477a6e288 clarify MediaCodec.setVideoScalingMode behavior
Bug: 28131249
Change-Id: I4fd3a5333cbdc0ebec683c9a43ce071478a79d90
2016-04-25 13:28:53 -07:00