blob: e613a00a36ee8ea6ffeecddb875d917205ff76be [file] [log] [blame]
Wink Savilleff4e3172013-03-22 11:10:25 -07001This package contains classes used to manage a DataConnection.
2
3A criticial aspect of this class is that most objects in this
4package run on the same thread except DataConnectionTracker
5This makes processing efficient as it minimizes context
6switching and it eliminates issues with multi-threading.
7
8This can be done because all actions are either asynchronous
9or are known to be non-blocking and fast. At this time only
10DcTesterDeactivateAll takes specific advantage of this
11single threading knowledge by using Dcc#mDcListAll so be
12very careful when making changes that break this assumption.
13
14A related change was in DataConnectionAc I added code that
15checks to see if the caller is on a different thread. If
16it is then the AsyncChannel#sendMessageSynchronously is
17used. If the caller is on the same thread then a getter
18is used. This allows the DCAC to be used from any thread
19and was required to fix a bug when Dcc called
20PhoneBase#notifyDataConnection which calls DCT#getLinkProperties
21and DCT#getLinkCapabilities which call Dcc all on the same
22thread. Without this change there was a dead lock when
23sendMessageSynchronously blocks.
24
25
Jeff Sharkey60ced162013-03-25 14:22:39 -070026== Testing ==
Wink Savilleff4e3172013-03-22 11:10:25 -070027
Wink Saville281fc7b2013-05-02 10:09:01 -070028The following are Intents that can be sent for testing pruproses on
29DEBUGGABLE builds (userdebug, eng)
Wink Savilleff4e3172013-03-22 11:10:25 -070030
Wink Saville281fc7b2013-05-02 10:09:01 -070031*) Causes bringUp and retry requests to fail for all DC's
Wink Savilleff4e3172013-03-22 11:10:25 -070032
33 adb shell am broadcast -a com.android.internal.telephony.dataconnection.action_fail_bringup --ei counter 2 --ei fail_cause -3
Wink Savilleff4e3172013-03-22 11:10:25 -070034
Wink Saville281fc7b2013-05-02 10:09:01 -070035*) Causes all DC's to get torn down, simulating a temporary network outage:
Wink Savilleff4e3172013-03-22 11:10:25 -070036
37 adb shell am broadcast -a com.android.internal.telephony.dataconnection.action_deactivate_all
38
Wink Saville281fc7b2013-05-02 10:09:01 -070039*) To simplify testing we also have detach and attach simulations below where {x} is gsm, cdma or sip
Wink Savilleff4e3172013-03-22 11:10:25 -070040
41 adb shell am broadcast -a com.android.internal.telephony.{x}.action_detached
42 adb shell am broadcast -a com.android.internal.telephony.{x}.action_attached
43
44
Wink Saville281fc7b2013-05-02 10:09:01 -070045== System properties for Testing ==
Wink Savilleff4e3172013-03-22 11:10:25 -070046
Jeff Sharkey60ced162013-03-25 14:22:39 -070047On debuggable builds (userdebug, eng) you can change additional
48settings through system properties. These properties can be set with
49"setprop" for the current boot, or added to local.prop to persist
50across boots.
Wink Savilleff4e3172013-03-22 11:10:25 -070051
Jeff Sharkey60ced162013-03-25 14:22:39 -070052device# setprop key value
Wink Savilleff4e3172013-03-22 11:10:25 -070053
Jeff Sharkey60ced162013-03-25 14:22:39 -070054device# echo "key=value" >> /data/local.prop
55device# chmod 644 /data/local.prop
56
57
58-- Retry configuration --
59
60You can replace the connection retry configuration. For example, you
61could change it to perform 4 retries at 5 second intervals:
62
63device# setprop test.data_retry_config "5000,5000,5000"
64
65
66-- Roaming --
67
68You can force the telephony stack to always assume that it's roaming
69to verify higher-level framework functionality:
70
71device# setprop telephony.test.forceRoaming true