40627 Commits

Author SHA1 Message Date
Deepanshu Gupta
465cb53ba4 Use ApplicationInfo only when not in edit mode [DO NOT MERGE]
When running in edit mode, do not use the application info to get the
icon, since it will be null.

Change-Id: I174e6126ddca341d06c5f04939470ef52f0e771c
2014-04-25 20:48:46 -07:00
Deepanshu Gupta
20e0695b55 Action bar rendering in layoutlib [DO NOT MERGE]
This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. ActionBarImpl - add a new constructor for use by layoutlib.

This also relies on some changes to the plugin to pass the correct params.

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from 4ccc4bd54f85d86818f61d728c6361d2003ddd8e)
2014-04-25 19:22:14 -07:00
Deepanshu Gupta
3c00b28bf6 Fix theme/style resolution in Layoutlib [DO NOT MERGE]
Cherry picked from klp-dev from
Change-Id: If1e7187645f0b0388f7b97d742395efd228b347a which was
cherrypicked from master with the following

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit f1e7187645f0b0388f7b97d742395efd228b347a)
2014-04-25 18:58:15 -07:00
Kenny Root
6888bee598 am 5a0cc789: am 2ed5f771: am 47231936: am 02bc4b04: am 4a62a6dc: am 451ed5f0: am 3ecaa88d: am ecb013db: Merge "Use hidden API to validate APK chains" into jb-dev
* commit '5a0cc78929bf56c153696ffa16b602acfcc40089':
  Use hidden API to validate APK chains
2014-04-18 22:43:08 +00:00
Kenny Root
5a0cc78929 am 2ed5f771: am 47231936: am 02bc4b04: am 4a62a6dc: am 451ed5f0: am 3ecaa88d: am ecb013db: Merge "Use hidden API to validate APK chains" into jb-dev
* commit '2ed5f771c47c16e9c2be1f2025ef0a826f0290c3':
  Use hidden API to validate APK chains
2014-04-18 22:37:38 +00:00
Kenny Root
2ed5f771c4 am 47231936: am 02bc4b04: am 4a62a6dc: am 451ed5f0: am 3ecaa88d: am ecb013db: Merge "Use hidden API to validate APK chains" into jb-dev
* commit '47231936c0593b87c3c9898767327f1516a7ec22':
  Use hidden API to validate APK chains
2014-04-18 22:31:08 +00:00
Kenny Root
4a62a6dce9 am 451ed5f0: am 3ecaa88d: am ecb013db: Merge "Use hidden API to validate APK chains" into jb-dev
* commit '451ed5f077b9f95deae809ae620bc210c253b922':
  Use hidden API to validate APK chains
2014-04-18 22:14:14 +00:00
Kenny Root
451ed5f077 am 3ecaa88d: am ecb013db: Merge "Use hidden API to validate APK chains" into jb-dev
* commit '3ecaa88d83d04a0fd55b494829badbb41016f5a1':
  Use hidden API to validate APK chains
2014-04-18 21:33:04 +00:00
Kenny Root
3ecaa88d83 am ecb013db: Merge "Use hidden API to validate APK chains" into jb-dev
* commit 'ecb013dbff5e33b95c49015fa375579e055911ae':
  Use hidden API to validate APK chains
2014-04-18 18:14:32 +00:00
Kenny Root
ecb013dbff Merge "Use hidden API to validate APK chains" into jb-dev 2014-04-18 17:12:40 +00:00
Kenny Root
16c6b177ee Use hidden API to validate APK chains
Bug: 13678484
Change-Id: I28dedab74b0e24d47ab9f2190298156c909e9d54
2014-04-17 14:03:33 -07:00
Robert Greenwalt
128e937108 am 106627e0: am e42ce676: am ebf23a8d: am 74acf23a: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '106627e07cecfa8a9bcc43578fde78652fc59eba':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:00:33 +00:00
Robert Greenwalt
106627e07c am e42ce676: am ebf23a8d: am 74acf23a: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit 'e42ce676f54742f2d47c26adaa90407c2cb8cec8':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:54:13 +00:00
Robert Greenwalt
f52d1a56af am fe38ff8d: DO NOT MERGE Sanitize WifiConfigs
* commit 'fe38ff8d36c4fa2e18f4c786692eeea5ebd94e9f':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:36:54 +00:00
Robert Greenwalt
74acf23a1e am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '3c417fbf21133340cbbe3539d87c453f81ae3a9d':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:36:44 +00:00
Robert Greenwalt
e1549ae364 DO NOT MERGE Sanitize WifiConfigs
Do this both on input from apps (giving error) and between wifi and
ConnectivityService (ignoring bad data).  This means removing all
addresses beyond the first and all routes but the first default and
the implied direct-connect routes.

We do this because the user can't monitor the others (no UI), their
support wasn't intended, they allow redirection of all traffic
without user knowledge and they allow circumvention of legacy VPNs.

This should not move forward from JB as it breaks IPv6 and K has
a more resilient VPN.

Bug:12663469
Change-Id: I80912cc08ffa1e4b63008c94630006cf316e7a64
2014-03-28 14:54:53 -07:00
Robert Greenwalt
fe38ff8d36 DO NOT MERGE Sanitize WifiConfigs
Do this both on input from apps (giving error) and between wifi and
ConnectivityService (ignoring bad data).  This means removing all
addresses beyond the first and all routes but the first default and
the implied direct-connect routes.

We do this because the user can't monitor the others (no UI), their
support wasn't intended, they allow redirection of all traffic
without user knowledge and they allow circumvention of legacy VPNs.

This should not move forward from JB as it breaks IPv6 and K has
a more resilient VPN.

Bug:12663469
Change-Id: I98c0672a6d9c8d5bc4f160849aa0fa182073216b
2014-03-28 11:38:33 -07:00
Victoria Lease
754bf6abc0 am c8868db2: am 737d3e5d: am 6b96ecca: am 32753f4f: am 31912122: am 6eb28103: am 183f97b7: am 1c12f9e7: malloc some advances
* commit 'c8868db2a025a97e439f8a9adde565c9c83f2204':
  malloc some advances
2014-03-19 15:08:32 -07:00
Victoria Lease
c8868db2a0 am 737d3e5d: am 6b96ecca: am 32753f4f: am 31912122: am 6eb28103: am 183f97b7: am 1c12f9e7: malloc some advances
* commit '737d3e5da366124d164555009fa5ee4552143cc8':
  malloc some advances
2014-03-19 15:03:28 -07:00
Victoria Lease
737d3e5da3 am 6b96ecca: am 32753f4f: am 31912122: am 6eb28103: am 183f97b7: am 1c12f9e7: malloc some advances
* commit '6b96ecca90555e04da8a4477d6dc6de83e7b9ee1':
  malloc some advances
2014-03-19 14:57:36 -07:00
Victoria Lease
3191212259 am 6eb28103: am 183f97b7: am 1c12f9e7: malloc some advances
* commit '6eb2810318262ff36014c52384ed3cdea19bd34e':
  malloc some advances
2014-03-19 14:40:17 -07:00
Victoria Lease
6eb2810318 am 183f97b7: am 1c12f9e7: malloc some advances
* commit '183f97b72faf7a0f45ad66e1b3fd9a4343cc7482':
  malloc some advances
2014-03-19 14:32:15 -07:00
Victoria Lease
183f97b72f am 1c12f9e7: malloc some advances
* commit '1c12f9e76298c757423155ad812890d27effafe8':
  malloc some advances
2014-03-19 14:27:19 -07:00
Victoria Lease
1c12f9e762 malloc some advances
Bug: 13506939
Change-Id: I87ad616960c4f16bc55d8b906049dbd4f001d6a5
(cherry picked from commit 3af2a37e057b31617b8f4eeb22ac3ef85c3fd5aa)
2014-03-18 16:22:20 +00:00
Paul Lawrence
2e582d1379 am 9bce4032: am 08ee74b1: am ea5586ef: am 4be7c61a: am 5677513b: am da37ed8b: am b9ba0c6c: Prevent authenticators from using Settings to launch arbitrary activities.
* commit '9bce4032e9b3ea3433f7c75cbfb8d784b12392aa':
  Prevent authenticators from using Settings to  launch arbitrary activities.
2014-02-27 11:44:37 -08:00
Paul Lawrence
9bce4032e9 am 08ee74b1: am ea5586ef: am 4be7c61a: am 5677513b: am da37ed8b: am b9ba0c6c: Prevent authenticators from using Settings to launch arbitrary activities.
* commit '08ee74b1f1c4df28faa4168114853836cc471095':
  Prevent authenticators from using Settings to  launch arbitrary activities.
2014-02-27 11:40:21 -08:00
Paul Lawrence
4be7c61a33 am 5677513b: am da37ed8b: am b9ba0c6c: Prevent authenticators from using Settings to launch arbitrary activities.
* commit '5677513b7c46ca08a7fa34b9d227d7a448db6757':
  Prevent authenticators from using Settings to  launch arbitrary activities.
2014-02-27 11:24:05 -08:00
Paul Lawrence
5677513b7c am da37ed8b: am b9ba0c6c: Prevent authenticators from using Settings to launch arbitrary activities.
* commit 'da37ed8b0aebdf885a32cbe28e8fd5a2240d38c3':
  Prevent authenticators from using Settings to  launch arbitrary activities.
2014-02-27 11:20:24 -08:00
Paul Lawrence
da37ed8b0a am b9ba0c6c: Prevent authenticators from using Settings to launch arbitrary activities.
* commit 'b9ba0c6c43f0f7f0d5e347030e3c86a86ed74542':
  Prevent authenticators from using Settings to  launch arbitrary activities.
2014-02-27 11:16:49 -08:00
Paul Lawrence
b9ba0c6c43 Prevent authenticators from using Settings to launch arbitrary activities.
Various authenticator results such as getAuthToken and addAccount might
result in an Intent returned to the AccountManager caller. A malicious
authenticator could exploit the fact that the Settings are a system app,
lead the user to launch add account for their account type and thus get
Settings to use the intent to start some arbitrary third parties Activity.

The fix is to make sure that the UID of the app associated with Activity
to be launched by the supplied intent and the Authenticators UID share
the same signature.  This means that an authenticator implementer can only
exploit apps they control.

This is a backport of 5bab9daf3cf66f4de19f8757e386030e8bef23ce

Bug: 7699048
Change-Id: Ifed345c2fc20020d55fa2cab1f2f7ea509ea09b2
2014-02-27 09:09:48 -08:00
Robert Greenwalt
950230663f DO NOT MERGE Sanitize WifiConfigs
Do this both on input from apps (giving error) and between wifi and
ConnectivityService (ignoring bad data).  This means removing all
addresses beyond the first and all routes but the first default and
the implied direct-connect routes.

We do this because the user can't monitor the others (no UI), their
support wasn't intended, they allow redirection of all traffic
without user knowledge and they allow circumvention of legacy VPNs.

This should not move forward from JB as it breaks IPv6 and K has
a more resilient VPN.

Bug:12663469
Change-Id: I0d92db7efc30a1bb3e5b8c6e5595bdb9793a16f2

Conflicts:
	core/java/android/net/LinkProperties.java
	services/java/com/android/server/WifiService.java
	wifi/java/android/net/wifi/WifiStateMachine.java
2014-02-24 15:20:32 -08:00
Selim Gurun
de38b23d0f DO NOT MERGE Add a delimiter between scheme and host
Bug: 6923539

Change-Id: Ia78e185f00184c53babe00df3c852114ffd721f0
2013-11-07 11:41:32 -08:00
Robert Greenwalt
f76b5383cd DO NOT MERGE Un-deprecate getDhcpInfo
Replacement api isn't available.

bug:10003785
Change-Id: I0c91716d9aae61dc1db4d015a78b729157ea99a9
2013-10-04 08:19:37 -07:00
Amith Yamasani
49eb1d9581 am d084cc44: am 4f59a921: am 12fd0f16: am f6a0c116: am 9bf1a139: am 72c5e376: am ba1ae3af: am 42786418: Don\'t instantiate non-Fragments in Fragment.instantiate
* commit 'd084cc44eb59407c851399d548256c145eb45342':
  Don't instantiate non-Fragments in Fragment.instantiate
2013-09-27 11:46:29 -07:00
Amith Yamasani
d084cc44eb am 4f59a921: am 12fd0f16: am f6a0c116: am 9bf1a139: am 72c5e376: am ba1ae3af: am 42786418: Don\'t instantiate non-Fragments in Fragment.instantiate
* commit '4f59a9216e76207a7003bfe010076aa78eee629a':
  Don't instantiate non-Fragments in Fragment.instantiate
2013-09-27 11:31:18 -07:00
Amith Yamasani
4f59a9216e am 12fd0f16: am f6a0c116: am 9bf1a139: am 72c5e376: am ba1ae3af: am 42786418: Don\'t instantiate non-Fragments in Fragment.instantiate
* commit '12fd0f1644b28b6938a504492397e8ca8d38a1c5':
  Don't instantiate non-Fragments in Fragment.instantiate
2013-09-27 11:25:20 -07:00
Amith Yamasani
9bf1a13948 am 72c5e376: am ba1ae3af: am 42786418: Don\'t instantiate non-Fragments in Fragment.instantiate
* commit '72c5e376879fb72548ef2a1c8d5b063853d174ee':
  Don't instantiate non-Fragments in Fragment.instantiate
2013-09-27 11:17:57 -07:00
Amith Yamasani
72c5e37687 am ba1ae3af: am 42786418: Don\'t instantiate non-Fragments in Fragment.instantiate
* commit 'ba1ae3af76466b94efedf06c4efac365fd7b9300':
  Don't instantiate non-Fragments in Fragment.instantiate
2013-09-27 11:14:23 -07:00
Amith Yamasani
ba1ae3af76 am 42786418: Don\'t instantiate non-Fragments in Fragment.instantiate
* commit '427864188dfc5dd803b15797379b9dc6673abd16':
  Don't instantiate non-Fragments in Fragment.instantiate
2013-09-27 11:10:36 -07:00
Amith Yamasani
427864188d Don't instantiate non-Fragments in Fragment.instantiate
Backport...

Fix for PreferenceActivities being invoked with non-Fragment class
names via extras in the intent. Make sure that the constructor
doesn't get called if the class name is not for a Fragment type.
Bug: 9901133
Change-Id: I227756fb4246deac796cee09077e482237bb5b0d
2013-09-27 10:28:09 -07:00
Wink Saville
1e4f461839 Do not always call setIsConnectedToProvisioningNetwork(false)
Previously I was calling setIsConnectedToProvisioningNetwork(false) always,
but all MDST's receive every broadcast. Thus we could over write an MDST's
mNetworkInfo.mIsConnectedToProvisioningNetwork to false, unless the MDST
that was set to true was last, i.e the code was order dependent.

If the provisioning networks value was false instead of true
when handleMobileProvisioningAction was called we wouldn't invoke
mdst.enableMobileProvisioning because network info would be null.

Thus the provisioning network would never transition to CONNECTED and
a default route wouldn't get setup and the browser couldn't access the
website.

Now setIsConnectedToProvisioningNetwork is only set to false when the
apnType matches and we won't indiscriminately change it and are not
order dependent.

Bug: 10853805
Change-Id: I68a4f9bdf5dc18d90f4cdef7a60811f57be67261
2013-09-21 09:01:19 -07:00
Wink Saville
67c3821926 Do not change NetworkInfo.DetailedState.
I'd changed DetailedState to force ConnectivityService to treat
provisioning apn's specially. In particular so that they wouldn't
be identified they were fully connected until the provisioning
actually started. The problem is that DetailedState is a public enum
that has a CTS test and just changing the CTS to allow for the new
state (CONNECTED_TO_PROVISIONING_NETWORK) was inappropriate.

Instead I've added a new mIsConnectedToProvisioningNetwork variable
and used the DetailedState.SUSPENDED as the intermediate state.

Bug: 10620248
Change-Id: Id4a842398cad67455541ce629959351c27d83639
2013-09-05 12:02:25 -07:00
Wink Saville
ce1e37981c Add provisioning apn timeout.
Bug: 10609993
Change-Id: I2dd4fe23fa2b22ef8f4849c161c630d1a85cdb4b
2013-09-03 16:41:44 -07:00
Wink Saville
948282b0e6 Add support for handling mobile provisioning networks.
When a sim is new or it has expired it needs to be provisioned
with the carrier. Basically provisioning is associating a sim with
a user account. When a sim isn't provisioned then operators will
restrict access to the network and only allow certain addresses
or services to be used.

This set of changes allows two types of provisioning networks to be
recognized. The first is a network that causes all DNS lookups to be
redirected to a different address than was intended. This is exemplified
by how T-Mobile works.

The second technique uses a special apn for provisioning. An example is
AT&T where lwaactivate is the provisioning apn and broadband is the
normal apn. We first try broadband and if we are unable to connect we
try lwaactivate. When we see the activate we identify it as special and
the ApnContext.isProvisioningApn will return true.

In the future our plan is to create a new network type that can be added
to the apn list, but for now it identified by name.

Here is a list of significant changes:

 - CaptivePortalTracker now only test WiFi networks instead of all networks
 - checkMobileProvisioning checks for provisioning networks and doesn't
   try to ping.
 - IConnectivityManager.aidl changes:
   * getProvisioningOrActiveNetworkInfo was added to and used by Manage
     mobile plan in WirelessSettings so even when there is no active
     network it will still allow provisioning. Otherwise it would report
     no internet connection.
   * setSignInErrorNotificationVisible is used by both
     CaptiviePortalTracker and checkMobileProvisioning so they use the
     same code for the notifications.
   * checkMobileProvisioning was simplified to have only a timeout as
     returning the result is now harder as we abort simultaneous call
     otherwise we'd could get into loops because we now check every time
     we connect to mobile.
 - Enhanced MDST to handle the provisioning network.
 - Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new
   state so we don't announce to the world we're connected.
 - TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN
   is sent by the low level data connection code to notify Connectivity
   Service that a provisioning apn has connected. This allows CS to
   handle the connection differently than a normal connection.

Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 08:55:16 -07:00
Wink Saville
dce52cdbf1 DO NOT MERGE: MDST is not ready until connected to DcTracker.
When the system becomes loaded the PhoneApp can be delayed
significantly and a call to setEnableFailFastMobileData may not
occur because the channel between the MobileDataStateTracker (MDST)
and DcTracker (DCT) is not connected.

Solution: Add a isReady to MDST and isMobileDataStateTrackerReady to
ConnectivityService and call it from isMobileOk.

Bug: 10351868
Change-Id: I92f9d58121b88186b636cd71c2fd2ef9a28f7cf6
2013-08-16 17:17:28 -07:00
Kenny Root
999ddae703 am ae24c0d5: am bf15c7ce: am dceda36b: am 1c5e33d3: am 3bc3240f: am a6226a2d: am 32c99004: Use hostname verifier directly instead of instance
* commit 'ae24c0d539414805a6c979f9318d0765506221ae':
  Use hostname verifier directly instead of instance
2013-08-13 17:51:15 -07:00
Kenny Root
ae24c0d539 am bf15c7ce: am dceda36b: am 1c5e33d3: am 3bc3240f: am a6226a2d: am 32c99004: Use hostname verifier directly instead of instance
* commit 'bf15c7cecefba8fdb3070c389a4966f11a8d8656':
  Use hostname verifier directly instead of instance
2013-08-13 17:48:20 -07:00
Kenny Root
1c5e33d37d am 3bc3240f: am a6226a2d: am 32c99004: Use hostname verifier directly instead of instance
* commit '3bc3240ffb51358fa706099cfc5e120cf0f1b60d':
  Use hostname verifier directly instead of instance
2013-08-13 17:36:42 -07:00
Kenny Root
3bc3240ffb am a6226a2d: am 32c99004: Use hostname verifier directly instead of instance
* commit 'a6226a2d202619ddb7e3e9765a3dc9f20241f853':
  Use hostname verifier directly instead of instance
2013-08-13 17:31:32 -07:00
Kenny Root
a6226a2d20 am 32c99004: Use hostname verifier directly instead of instance
* commit '32c990044f027542a034a7606cf010dca6df252f':
  Use hostname verifier directly instead of instance
2013-08-13 17:27:49 -07:00