6346 Commits

Author SHA1 Message Date
Bill Yi
4fecab570d Merge commit '32acf753e8989766f67fd5300d3eb467f707cc79' into HEAD 2015-02-19 14:31:36 -08:00
Craig Mautner
2a005f6fe9 Merge "Prevent leaking surfaces from exiting windows" 2015-02-16 22:59:20 +00:00
tiger_huang
713abc2879 Prevent leaking surfaces from exiting windows
AM would set the exiting app to be invisible twice by calling
setAppVisibility(). If the screen is turned off during these calls,
the window surfaces of this exiting app won't be destroyed.

The flow:
 1. Screen is on
 2. App A is finished
 3. AM calls setAppVisibility() token=App A, visible=false
 4. WM sets a dummy animation to App A
 5. WM marks App A's wtoken.inPendingTransaction=true
 6. Screen is turned off
 7. AM calls setAppVisibility() token=App A, visible=false
 8. WM calls setTokenVisibilityLocked() directly (screen is off)
 9. WM sends app visibility to App A's client (ViewRootImpl)
10. WM clears the dummy animation from App A
11. App A's client calls WMS.relayoutWindow() to be not visible
12. WM sets App A's window mExiting=true but not destroy its surface
13. App A's window surface leaks...

Note:
a. The call in 3. is from ActivityStack.finishActivityLocked
b. The call in 7. is from ActivityStack.resumeTopActivityInnerLocked
c. In 10., App A won't get the real animation while screen is off
d. In 12., App A's inPendingTransaction=true; WM takes it's animating
e. mExiting won't be cleared because App A has no animation to
   trigger WindowStateAnimator.finishExit()

After applying this patch, WM would destroy the surface in 12. of the
above flow.

Change-Id: I18b79ba96695ec80d57a85dc15cf92a9e7d3a6ef
2015-02-16 08:27:28 +00:00
Filip Gruszczynski
f1df1970db am 88a9a2a4: Merge "Support for faster brightness response to light changes." into lmp-mr1-modular-dev
* commit '88a9a2a46eb77ea340175f5d272433f4de1b6f93':
  Support for faster brightness response to light changes.
2015-02-14 02:27:19 +00:00
Filip Gruszczynski
d81ecd12ce Support for faster brightness response to light changes.
Bug: 18572096

Change-Id: Ic9448db672b036779d16883f3476249cea45d97a
2015-02-13 09:40:15 -08:00
Narayan Kamath
a511eea83b am aee7f64c: am b4a5c04c: Merge "Remove code that sets user.* system properties."
* commit 'aee7f64c10ffd2135dc98f7a540836ad7a32438b':
  Remove code that sets user.* system properties.
2015-02-13 12:09:31 +00:00
Narayan Kamath
70e8f6600d Remove code that sets user.* system properties.
This has been disallowed by the SELinux for several years now,
so can safely be removed. Given that saveLocaleLocked is
simplified quite a bit, we can now inline into its only caller.

bug: 18910417

Change-Id: I18251f77e4a25a0e7ecda8e85a9b3fcdc2dc7b05
2015-02-13 11:57:08 +00:00
Casey Burkhardt
d1a5b5dc07 am 6f2dd8a9: Merge "Support circular magnification frame on circular devices" into lmp-mr1-modular-dev
* commit '6f2dd8a9b195a2bc8538820d8685a4a0576964f9':
  Support circular magnification frame on circular devices
2015-02-12 23:28:30 +00:00
Casey Burkhardt
6f2dd8a9b1 Merge "Support circular magnification frame on circular devices" into lmp-mr1-modular-dev 2015-02-12 23:23:45 +00:00
John Spurlock
1be4b702f5 am 7e7c91ec: am e4049b6d: am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit '7e7c91ec95eca5e1089ede9953f27d8c3d3b8bea':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 23:11:36 +00:00
John Spurlock
7e7c91ec95 am e4049b6d: am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit 'e4049b6d36ded6ec808be5f884248772a4059a72':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 23:05:25 +00:00
John Spurlock
e4049b6d36 am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit 'f45e5dbf599a0043d7f6576f20eafb2c1c157204':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 22:58:44 +00:00
John Spurlock
f45e5dbf59 Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev 2015-02-12 22:52:13 +00:00
Casey Burkhardt
d29a1e47d4 Support circular magnification frame on circular devices
The magnification viewport expects its boundary to be a rectangular region,
and always draws it as such.  This change causes the indicator to draw as a
circle on devices with circular displays.  This also refactors the width of
the indicator's frame to use a proper dimension resource and updates the
width to 4dip.

Bug:18242438
Change-Id: I1d86647b6d1ef84f5dd506f4141223ec050a79b5
2015-02-12 14:13:10 -08:00
John Spurlock
f370177e94 NoMan: Initialize filter value reported to listeners.
In addition to relying on change callbacks.

Bug: 19288429
Change-Id: Id54473e5fbb4eac3778781a2052ba0103076f8d1
2015-02-12 13:29:37 -05:00
Narayan Kamath
00e821a860 am c7e48719: Merge "Remove references to persist.sys.language/country."
automerge: 8be3724

* commit '8be3724a06f7b2d28c6664ca11a03f91f97f0972':
  Remove references to persist.sys.language/country.
2015-02-12 16:41:41 +00:00
Narayan Kamath
b61db8229a Remove references to persist.sys.language/country.
Addresses a couple of TODOs now that all usages have been
removed and fixes a doc that specifies how the emulator locale
can be set.

bug: 17691569

Change-Id: I802ea1e12448a5442840cad1fdc0956d3e2c7a8c
2015-02-12 13:16:55 +00:00
Neil Fuller
c1a5e82c25 Merge "Remove usages of FloatMath" automerge: a8e8cdb
automerge: 27316a9

* commit '27316a93e5979859ae98f506eca365784353007a':
  Remove usages of FloatMath
2015-02-12 10:00:41 +00:00
Neil Fuller
a8e8cdbb17 Merge "Remove usages of FloatMath" 2015-02-12 09:26:47 +00:00
Neil Fuller
e573aa9371 Remove usages of FloatMath
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: Iec8fb663ed54eb967050f6ff25a36ba534204c4d
2015-02-12 09:20:31 +00:00
Lorenzo Colitti
fd90d718f4 am b0dfaad8: am f99551d8: am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
* commit 'b0dfaad8c2a02c33885e6a278c7901da69d8ab49':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 03:09:57 +00:00
Lorenzo Colitti
b0dfaad8c2 am f99551d8: am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
* commit 'f99551d8a149c1a80dddd6350efcfbd53d58e151':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 02:56:56 +00:00
Lorenzo Colitti
f99551d8a1 am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
* commit 'c7ccc393b470220710f566d447412d93f7f8d21b':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 02:43:03 +00:00
Lorenzo Colitti
c7ccc393b4 Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev 2015-02-12 02:30:56 +00:00
Craig Mautner
3d576cc643 am 18d836b6: Merge "Don\'t relayout based on a window that isn\'t visible" into lmp-mr1-modular-dev
* commit '18d836b61811270bfae8cec6e0e782234dfcf5a4':
  Don't relayout based on a window that isn't visible
2015-02-11 23:04:12 +00:00
Craig Mautner
18d836b618 Merge "Don't relayout based on a window that isn't visible" into lmp-mr1-modular-dev 2015-02-11 22:27:06 +00:00
Craig Mautner
082500c76e Don't relayout based on a window that isn't visible
The method commitFinishDrawingLocked returned true even if the window
it was called for was hidden. By returning the value that
performShowLocked() returns it only returns true if the window is
shown.

Fixes bug 19100757.

Change-Id: I45df70aedcb3909561fd3a19e861579a11521db9
2015-02-11 13:24:19 -08:00
Alex Klyubin
33d3c53da0 resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aosp
Change-Id: Ic20b6c8851458483dd73a144bd5ae6e8d141e62a
2015-02-11 12:37:12 -08:00
Alex Klyubin
b9f8a5204a Move hidden ApplicationInfo flags into a separate field.
The public API field android.content.pm.ApplicationInfo.flags can
support only 32 flags. This limit has been reached. As a short term
workaround to enable new public flags to be added, this CL moves flags
which are not public API into a separate new field privateFlags and
renames the affected flags constants accordingly (e.g., FLAG_PRIVILEGED
is now PRIVATE_FLAG_PRIVILEGED).

The new privateFlags field is not public API and should not be used
for flags that are public API.

The flags that are moved out of ApplicationInfo.flags are:
* FLAG_HIDDEN,
* FLAG_CANT_SAVE_STATE,
* FLAG_FORWARD_LOCK, and
* FLAG_PRIVILEGED.

NOTE: This changes the format of packages.xml. Prior to this CL flags
were stored in the "flags" attribute. With this CL, the public flags
are stored in a new "publicFlags" attribute and private flags are
stored in a new "privateFlags" attribute. The old "flags" attribute
is interpreted by using the old values of hidden/private flags.

Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
2015-02-11 11:06:40 -08:00
Michael Wright
fa5f1fbc50 Merge "Stop active media projections on user switch." into lmp-mr1-dev automerge: 3292c0e
automerge: 40bd8f4

* commit '40bd8f416b30b7b0eae244aa0c5aabd0be0d1c55':
  Stop active media projections on user switch.
2015-02-11 18:43:29 +00:00
Michael Wright
40bd8f416b Merge "Stop active media projections on user switch." into lmp-mr1-dev
automerge: 3292c0e

* commit '3292c0e2640667e5ef78896653a41c85e7de06c5':
  Stop active media projections on user switch.
2015-02-11 18:33:00 +00:00
Michael Wright
3292c0e264 Merge "Stop active media projections on user switch." into lmp-mr1-dev 2015-02-11 18:23:55 +00:00
Jeff Davidson
e4be48e085 am 50996a12: Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev
automerge: 46dbb5b

* commit '46dbb5be4c56e8af603514a3cf2bd7daf0191724':
  Do not enforce CONTROL_VPN for calls from lockdown VPN.
2015-02-11 08:38:35 +00:00
Jeff Davidson
46dbb5be4c am 50996a12: Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev
* commit '50996a12a8e859346d5eb3c4569c4e81c9b52a05':
  Do not enforce CONTROL_VPN for calls from lockdown VPN.
2015-02-11 08:30:44 +00:00
Jeff Davidson
50996a12a8 Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev 2015-02-11 08:25:27 +00:00
Jeff Davidson
b21298a686 Do not enforce CONTROL_VPN for calls from lockdown VPN.
Clearly document which methods in Vpn.java are designed to be used to
service a Binder call, and which must therefore check permissions and
clear the calling identity, and which methods are designed for
internal use only and which therefore need not check permission.

Add a new startLegacyVpnPrivileged method which bypasses the
permission checks, to be used by lockdown VPN which is a trusted
system service. Ensure that the existing startLegacyVpn method checks
permissions as this is used whenever we respond to a binder call.

Bug: 19311172
Change-Id: I34f13258ee7481f1356bc523124cf5db068b4972
2015-02-10 23:41:42 -08:00
Lorenzo Colitti
2d33b31c86 Merge "Make getNetworkInfo() take into account VPN underlying networks." into lmp-mr1-dev automerge: c38b90b
automerge: 00c8450

* commit '00c8450d2711de57ee45f66cae1050dbca98d1f5':
  Make getNetworkInfo() take into account VPN underlying networks.
2015-02-11 07:32:53 +00:00
Lorenzo Colitti
00c8450d27 Merge "Make getNetworkInfo() take into account VPN underlying networks." into lmp-mr1-dev
automerge: c38b90b

* commit 'c38b90bb6bc5efc5f07e69b86d10f76a1eaa9eb4':
  Make getNetworkInfo() take into account VPN underlying networks.
2015-02-11 07:24:50 +00:00
Lorenzo Colitti
c38b90bb6b Merge "Make getNetworkInfo() take into account VPN underlying networks." into lmp-mr1-dev 2015-02-11 07:18:17 +00:00
Shishir Agrawal
b7e04f3294 GpsLocationProvider: Read data enabled status from TelephonyManager. automerge: 64ce5f8
automerge: 6b27472

* commit '6b274720c5a210c07256e5b9fc11a1e9aca59017':
  GpsLocationProvider: Read data enabled status from TelephonyManager.
2015-02-11 03:44:42 +00:00
Shishir Agrawal
6b274720c5 GpsLocationProvider: Read data enabled status from TelephonyManager.
automerge: 64ce5f8

* commit '64ce5f8fab077e4792737f86502d0e77ad6cbb0b':
  GpsLocationProvider: Read data enabled status from TelephonyManager.
2015-02-11 03:35:42 +00:00
Shishir Agrawal
64ce5f8fab GpsLocationProvider: Read data enabled status from TelephonyManager.
Bug: 18814559
Change-Id: I0333050d2a5b8d484466e1b1914dcfb9965398c9
2015-02-10 19:20:16 -08:00
Lorenzo Colitti
0831f66f19 Make reportInetCondition revalidate if the report differs from our state
1. If reportInetCondition says the network is not working, and
   the network is already marked not validated, don't revalidate
   it. This was superfluous and should save battery.
2. If reportInetCondition says the network is working, and the
   network is not marked as validated, revalidated. This will
   allow us to get out of a validated state quickly based on app
   input (e.g., allowing GCM's exponential backoff timer to drive
   revalidation instead of our 10-minute timer).

Bug: 19258761
Bug: 19209043
Change-Id: Iaa4bac82d117ed1f4088dab106e6f6ce46b34bc3
2015-02-11 11:03:50 +09:00
Lorenzo Colitti
d6a7980dd9 Make getNetworkInfo() take into account VPN underlying networks.
If a user is subject to a VPN, getActiveNetworkInfo() will return
the VPN's underlying network (e.g., TYPE_WIFI), so that apps that
call getActiveNetworkInfo to answer questions like "is the device
connected to wifi?" will continue to work. Make getNetworkInfo
do this as well: if the query is for a network type that is
underlying the current user's VPN, then return that network.

Bug: 19196545
Change-Id: Ic5a651735b927c758594a26d26a03fbd704b52e6
2015-02-11 10:21:01 +09:00
Rubin Xu
df890b4df0 am 082f0bf3: am df608e39: am 3d521c0a: Merge "Perform post installation operations directly if backup manager is disabled" into lmp-mr1-dev
* commit '082f0bf3bd0f266f776f4b28c3fb8dc917cd0d63':
  Perform post installation operations directly if backup manager is disabled
2015-02-09 19:49:04 +00:00
Rubin Xu
df608e39b3 am 3d521c0a: Merge "Perform post installation operations directly if backup manager is disabled" into lmp-mr1-dev
* commit '3d521c0a0165dfef53e3c9d3d562bc0ec45405a8':
  Perform post installation operations directly if backup manager is disabled
2015-02-09 19:33:19 +00:00
Rubin Xu
99abeed2bb Perform post installation operations directly if backup manager is disabled
bug: 19312753

Change-Id: I4acdd1e3af6a6be0c51affc42de167993c736b2f
2015-02-09 15:36:30 +00:00
Michael Wright
05aab5810a Stop active media projections on user switch.
Bug: 19278080
Change-Id: I63cc8aa12954d4de257b793967d3845a6f86dc3f
2015-02-06 14:08:13 -08:00
Dianne Hackborn
4fdac61388 am 5c2fdc33: Merge "Always re-establish kernel alarms when considering new alarm set" into lmp-mr1-dev
automerge: 29039a2

* commit '29039a2bdbadcc427a966f5e7a6021fd424c4266':
  Always re-establish kernel alarms when considering new alarm set
2015-02-05 23:04:21 +00:00
Dianne Hackborn
29039a2bdb am 5c2fdc33: Merge "Always re-establish kernel alarms when considering new alarm set" into lmp-mr1-dev
* commit '5c2fdc331f81b671d426f3f5a7e59cd9cbed80bf':
  Always re-establish kernel alarms when considering new alarm set
2015-02-05 19:39:23 +00:00