2212 Commits

Author SHA1 Message Date
Yuhao Zheng
d2078bc8c9 New Telephony APIs to return MMS UA and UAProfUrl
Added two public APIs under TelephonyManager to return MMS UserAgent and
UAProfUrl strings, for apps that handle SMS/MMS.

Bug: 11054501

Change-Id: Ifa1a64990fa2bf7d0e340d784a9672bf79525338
2013-10-03 15:06:21 -07:00
Wink Saville
e2181318d6 Add RIL_REQUEST_SET_INITIAL_ATTACH_APN.
Bug: 9626411
Change-Id: I0c278d9f4c6fd7e12c495c2411ab94ac87e1f316
2013-09-23 14:53:25 -07:00
Dianne Hackborn
95d785346b Fix issue #10688644: Java crash in com.android.phone:
java.lang.SecurityException: Operation not allowed

There was a situation I wasn't taking into account -- components
declared by the system has a special ability to run in the processes
of other uids.  This means that if that code loaded into another
process tries to do anything needing an app op verification, it will
fail, because it will say it is calling as the system package name but
it is not actually coming from the system uid.

To fix this, we add a new Context.getOpPackageName() to go along-side
getBasePackageName().  This is a special call for use by all app ops
verification, which will be initialized with either the base package
name, the actual package name, or now the default package name of the
process if we are creating a context for system code being loaded into
a non-system process.

I had to update all of the code doing app ops checks to switch to this
method to get the calling package name.

Also improve the security exception throw to have a more descriptive
error message.

Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
2013-09-11 09:59:47 -07:00
Wink Saville
67c8134166 For NETWORK_MODE_LTE_CMDA_EVDO_GSM_WCDMA default to PHONE_TYPE_GSM
Bug: 9710534
Change-Id: Iba999579d30045f18b5d370359dbce65d9646c69
2013-09-07 10:03:02 -07:00
Wink Saville
e4bcd1b714 am 323af8b4: am aa5b0f8b: am ce1e3798: Add provisioning apn timeout.
* commit '323af8b49df3535977b5aa7f5b31c429d8a50f10':
  Add provisioning apn timeout.
2013-09-04 18:17:15 -07:00
Wink Saville
323af8b49d am aa5b0f8b: am ce1e3798: Add provisioning apn timeout.
* commit 'aa5b0f8bdadcfa1ddb041e09b815ea4b5986e901':
  Add provisioning apn timeout.
2013-09-04 18:14:07 -07:00
Wink Saville
ce1e37981c Add provisioning apn timeout.
Bug: 10609993
Change-Id: I2dd4fe23fa2b22ef8f4849c161c630d1a85cdb4b
2013-09-03 16:41:44 -07:00
Ed Tam
468c60b334 am 00e4c672: am f85aa0fc: Merge "Telephony: SMS over IMS, DO NOT MERGE" into jb-mr2-dev
* commit '00e4c6721b344eca1d8b0de0e82e5de6f4f21f16':
  Telephony: SMS over IMS, DO NOT MERGE
2013-08-30 14:06:47 -07:00
Ed Tam
f85aa0fc12 Merge "Telephony: SMS over IMS, DO NOT MERGE" into jb-mr2-dev 2013-08-30 20:50:36 +00:00
Wink Saville
7788c61af5 Merge commit '270226b0' into manualmerge
* commit '270226b0':
  Add support for handling mobile provisioning networks.

Conflicts:
	core/java/android/net/CaptivePortalTracker.java
	core/java/android/net/ConnectivityManager.java
	core/java/android/net/IConnectivityManager.aidl
	core/java/android/net/MobileDataStateTracker.java
	core/res/AndroidManifest.xml
	services/java/com/android/server/ConnectivityService.java

Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
2013-08-29 14:57:08 -07:00
Wink Saville
270226b0dd am 8cb2f42e: am 948282b0: Add support for handling mobile provisioning networks.
* commit '8cb2f42eea2ef3b249528aa7913fc7a6dfc6b741':
  Add support for handling mobile provisioning networks.
2013-08-29 10:26:06 -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
Santos Cordon
04dfb5ec3c Protecting against NPE with null country detector.
bug:10514454
Change-Id: I316c47eddbe4929599866a3f9da9129d0056e3e2
2013-08-27 16:45:37 -07:00
Rika Brooks
35df98d01a Telephony: SMS over IMS, DO NOT MERGE
Add RIL_REQUEST_IMS_REGISTRATION_STATE, RIL_REQUEST_IMS_SEND_SMS, and
RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED.  Add FORMAT_UNKNOWN to
SmsConstants.

Bug: 9626411
Change-Id: I87ca9841b4ace931c55e2d379fe6d7589b2dc8a5
2013-08-27 16:15:49 -07:00
Wink Saville
5e56bc5437 Add network type TYPE_MOBILE_IA.
Add a network type for establishing connections to the apn used for
the initial connection.

Enable some debug for now.

Bug: 8733613
Change-Id: Ia627ac0cf5715660b6d02bb13a83d46ec1727b87
2013-07-29 15:02:29 -07:00
Evan Charlton
10dd2b6464 Merge "Add carrier setup app integration" 2013-07-15 18:31:20 +00:00
Wink Saville
9f6a7f424f Merge commit '3b5d686e' into fix-merge-conflict
* commit '3b5d686e':
  Add checkMobileProvisioning to ConnectivityService.

Conflicts:
	services/java/com/android/server/ConnectivityService.java

Change-Id: Ieceb9c8f4aa4fa99258e56a720b4c74512369458
2013-07-01 16:12:31 -07:00
Wink Saville
3b5d686e68 am c45f2e05: am 59046f40: Merge "Add checkMobileProvisioning to ConnectivityService." into jb-mr2-dev
* commit 'c45f2e05e3b9d261009c66346ef2257ec105f05c':
  Add checkMobileProvisioning to ConnectivityService.
2013-07-01 15:41:31 -07:00
Wink Saville
ab9321d13d Add checkMobileProvisioning to ConnectivityService.
Bug: 9279964
Change-Id: I42c326a21e05aa301e9d974ed9ac1d59472780ec
2013-06-29 21:10:57 -07:00
Evan Charlton
843d5ea5ec Add carrier setup app integration
Add an intent to invoke a native carrier setup app. This is paired
with the INVOKE_CARRIER_SETUP permission, though it is up to the app
to enforce that callers hold this permission.

Change-Id: I317a40675de7e9587de23c028459be2331a2f8a2
2013-06-27 15:06:55 -07:00
Wink Saville
142a29f45f am ef8267c6: am 7334d25e: am 34fb4eae: Merge "Fix misspelling of getLteSignalStrenght."
* commit 'ef8267c6ad54eb4c8c00d3d36333fb12dd519588':
  Fix misspelling of getLteSignalStrenght.
2013-06-21 12:17:57 -07:00
Wink Saville
ef8267c6ad am 7334d25e: am 34fb4eae: Merge "Fix misspelling of getLteSignalStrenght."
* commit '7334d25e79d733b419aacfd706aad762f823f2f9':
  Fix misspelling of getLteSignalStrenght.
2013-06-21 12:15:54 -07:00
Wink Saville
7334d25e79 am 34fb4eae: Merge "Fix misspelling of getLteSignalStrenght."
* commit '34fb4eae36bc926886149718672809a1ad43be97':
  Fix misspelling of getLteSignalStrenght.
2013-06-21 12:12:24 -07:00
Wink Saville
29c8b00f14 Fix misspelling of getLteSignalStrenght.
Change to getLteSignalStrength.

Change-Id: Ie2acec9e01af0e64a61902383f06729a7cee1975
2013-06-21 09:58:11 -07:00
Jay Shrauner
2b2450702b Merge "Add number presentation column to call log" 2013-06-19 21:14:16 +00:00
Wink Saville
d11a310304 am 7f081794: am c80e3d43: TelephonyManager.listen can have notifyNow always true.
* commit '7f081794074c1356ba347b802729adf36f06ad19':
  TelephonyManager.listen can have notifyNow always true.
2013-06-19 13:21:41 -07:00
Wink Saville
c80e3d434f TelephonyManager.listen can have notifyNow always true.
Since telepony.registry is a real system service notifyNow
parameter doesn't need to be conditional as telephony.registery
will never go away.

This is different from most of the other TelephonyManager
methods which are used to invoke methods on the phone service
which implements ITelephony and is implemented by
PhoneInterfaceManager in the phone application. Since the
phone app is not a system service it can and does go away when
it crashes.

Bug: 9393863
Change-Id: I1a8afc12b0e139e72f05820e49f3d996aec2b52a
2013-06-19 11:28:06 -07:00
Jay Shrauner
d88eb719ac Add number presentation column to call log
Change call log so instead of overloading the phone number with special
strings "-1", "-2", etc to denote private phone numbers, payphones, etc,
put presentation type in its own column and expose in the public API these
type values.

Bug:6948882
Change-Id: I230c26aa0428d605a0e83169a635b5bbf1aa4e3f
2013-06-18 10:20:04 -07:00
Wink Saville
ac6c862196 am 30af45f4: Merge "Allow carrier provisioning to turn toggle radio power." into jb-mr2-dev
* commit '30af45f47fd71feee0f9e5f8e049ba0380bc7793':
  Allow carrier provisioning to turn toggle radio power.
2013-06-12 16:16:45 -07:00
Wink Saville
45ac9645da Allow carrier provisioning to turn toggle radio power.
Previously CarrierProvisioning toggle airplane mode, but now that's
available only by the system.

Bug: 9356811
Change-Id: I5167f8614c07bafb688983a360a008f76403b2b8
2013-06-10 10:10:42 -07:00
Scott Main
0f34894ed8 am aafed1df: add link to required permission from ACTION_RESPOND_VIA_MESSAGE
* commit 'aafed1df0404e2fb64c1adeb127dc7f300a2c07b':
  add link to required permission from ACTION_RESPOND_VIA_MESSAGE
2013-06-04 19:38:23 -07:00
Scott Main
aafed1df04 add link to required permission from ACTION_RESPOND_VIA_MESSAGE
Change-Id: Iafa9c72c9bbd8258c7f961f7ab8ad78c96b61e54
2013-06-04 19:35:48 -07:00
Wink Saville
8ca5d64a39 am 39136d39: Merge "Fixing crash in PhoneNumberUtils getNumberFromIntent"
* commit '39136d391ab04e93fd0a01b760e57b6ea079cf4c':
  Fixing crash in PhoneNumberUtils getNumberFromIntent
2013-06-01 08:23:02 -07:00
Magnus Karlsson
2227067d99 Fixing crash in PhoneNumberUtils getNumberFromIntent
Handling intent with no data when trying to retrieve number from
intent.

Change-Id: If7c5930e7048aec732fb7a3fbeb3391e1408b071
2013-05-02 09:59:29 +02:00
Wink Saville
ca3597d436 Enhance TelephonyManger javadocs.
Bug: 856818
Change-Id: Idd30361f57b0f6627132a25e5b9520f30fce548c
2013-04-25 15:02:34 -07:00
Wink Saville
e3a9cbc052 Add CellInfoWcdma and related classes.
Update javadoc's to define invalid values are Integer.MAX_VALUE.

Bug: 8622081
Change-Id: I513a67d4b46b72f03e0c3360abcc0ad5222c1c13
2013-04-17 16:40:17 -07:00
Wink Saville
e5ac821772 Update function comment for getAllCellInfo
Bug: 8235566
Change-Id: Iae9b11480605d5302ee45601d1357fc07f9bd3e1
2013-04-09 16:19:27 -07:00
Wink Saville
094beeccf5 Add FW support for CellInfo RIL commands.
Bug: 8235566
Change-Id: I7ad7dabc4b6c38bfba4461b08e6e30d0eb9efea1
2013-04-08 15:19:43 -07:00
Wink Saville
efbca4d01d Fix SignalStrength response.
Add makeSignalStrengthFromRilParcel for use by
RIL responseRilSignalStrength.

Bug: 8561333
Change-Id: Ie6eb3b0335e8d7ea114ec70b3fb72e917094632e
2013-04-08 11:35:47 -07:00
Robert Greenwalt
279e22bd35 Merge "make new API to retrieve group identifier level1" into jb-mr2-dev 2013-04-02 19:17:23 +00:00
Robert Greenwalt
665e1aed5e Add BT - DataTracker connection
Allows the external BT stack the means to communicate with
ConnectivityService during reverse tethering.

bug:8445208
Change-Id: Ice7dfb0b50c9481d359aed14a51372878185171c
2013-03-27 15:45:12 -07:00
Sungmin Choi
52a08cf683 make new API to retrieve group identifier level1
For mvno, user can add or edit mvno data field. To pre-provide
the mvno data of the edited apn when the user selects one of
the mvno types, need to support IMSI, SPN, and GID1 data.
To support GID1, make API to retrieve group identifier level1.

bug:6445254
Change-Id: I1bc280054cc7cd37e78a279866cefd62872a19fb
2013-03-27 17:24:55 +00:00
Wink Saville
75c1e69bd5 Add some new constants.
Add EVENT_DISCONNECT_DC_RETRYING, EVENT_SETUP_DATA_COMPLETE_ERROR
and State.RETRYING to DctContants.

Add MDC_INITIAL_MAX_RETRY to Settings.Global.

Bug: 4772191
Change-Id: Id54a20ab192783c63939158670faaf531a527640
2013-03-21 07:20:05 -07:00
Wink Saville
e2c5081218 Turn off debug in CellInfoLte.
Change-Id: Icf3ea5dad9eef71f644de2292db0b0d3960ced9d
2013-02-12 10:47:32 -08:00
Wink Saville
5a72553ef9 Move a few files from frameworks/opt/telephony to frameworks/base.
Because ISms.aidl imports PendingIntent we couldn't easily
make opt/telephony part of the PDK. So this change moves
ISms.aidl and SmsRawData.*, which ISms.aidl also imports,
back to frameworks/base.

Change-Id: Ia64c6e771d5a292d9bfebb413a43f3745df55c85
2013-02-07 17:03:05 -08:00
Santos Cordon
8a747410e1 Fixing up doc links.
Change-Id: Id0e7f5007ce04fa714e3c1f21914b750b59aed3c
2013-02-04 11:17:19 -08:00
Santos Cordon
3b53da4934 Merge "Sort out permission around "instant text response"" 2013-02-04 17:58:13 +00:00
Dianne Hackborn
f265ea9d83 App ops: vibration, neighboring cells, dialing, etc.
Improve handling of vibration op, so that apps are
better blamed (there is now a hidden vibrator API that
supplies the app to blame, and the system now uses this
when vibrating on behalf of an app).

Add operation for retrieving neighboring cell information.

Add a new op for calling a phone number.  This required
plumbing information about the launching package name through
the activity manager, which required changing the internal
startActivity class, which required hitting a ton of code that
uses those internal APIs.

Change-Id: I3f8015634fdb296558f07fe654fb8d53e5c94d07
2013-02-01 15:14:29 -08:00
Wink Saville
875efb86de Move SmsRawData.aidl to opt/telephony.
Change-Id: I31810a667cb2c987d4a7687a825ae6da06d8e59a
2013-02-01 08:56:29 -08:00
Wink Saville
d0c4ce4c3d am 24dbdc7d: am 23d85a91: am d84d289f: Merge "Telephony: Consider EVDO ecio zero value as valid."
* commit '24dbdc7d0e1e20b5c598561e7f5ed9c4dd335b7b':
  Telephony: Consider EVDO ecio zero value as valid.
2013-01-23 09:44:04 -08:00