README.txt 2.58 KB
Newer Older
Wink Saville's avatar
Wink Saville committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
This package contains classes used to manage a DataConnection.

A criticial aspect of this class is that most objects in this
package run on the same thread except DataConnectionTracker
This makes processing efficient as it minimizes context
switching and it eliminates issues with multi-threading.

This can be done because all actions are either asynchronous
or are known to be non-blocking and fast. At this time only
DcTesterDeactivateAll takes specific advantage of this
single threading knowledge by using Dcc#mDcListAll so be
very careful when making changes that break this assumption.

A related change was in DataConnectionAc I added code that
checks to see if the caller is on a different thread. If
it is then the AsyncChannel#sendMessageSynchronously is
used. If the caller is on the same thread then a getter
is used. This allows the DCAC to be used from any thread
and was required to fix a bug when Dcc called
PhoneBase#notifyDataConnection which calls DCT#getLinkProperties
and DCT#getLinkCapabilities which call Dcc all on the same
thread. Without this change there was a dead lock when
sendMessageSynchronously blocks.


26
== Testing ==
Wink Saville's avatar
Wink Saville committed
27

Wink Saville's avatar
Wink Saville committed
28 29
The following are Intents that can be sent for testing pruproses on
DEBUGGABLE builds (userdebug, eng)
Wink Saville's avatar
Wink Saville committed
30

Wink Saville's avatar
Wink Saville committed
31
*) Causes bringUp and retry requests to fail for all DC's
Wink Saville's avatar
Wink Saville committed
32 33 34

  adb shell am broadcast -a com.android.internal.telephony.dataconnection.action_fail_bringup --ei counter 2 --ei fail_cause -3

Wink Saville's avatar
Wink Saville committed
35
*) Causes all DC's to get torn down, simulating a temporary network outage:
Wink Saville's avatar
Wink Saville committed
36 37 38

  adb shell am broadcast -a com.android.internal.telephony.dataconnection.action_deactivate_all

Wink Saville's avatar
Wink Saville committed
39
*) To simplify testing we also have detach and attach simulations below where {x} is gsm, cdma or sip
Wink Saville's avatar
Wink Saville committed
40 41 42 43 44

  adb shell am broadcast -a com.android.internal.telephony.{x}.action_detached
  adb shell am broadcast -a com.android.internal.telephony.{x}.action_attached


Wink Saville's avatar
Wink Saville committed
45
== System properties for Testing ==
Wink Saville's avatar
Wink Saville committed
46

47 48 49 50
On debuggable builds (userdebug, eng) you can change additional
settings through system properties.  These properties can be set with
"setprop" for the current boot, or added to local.prop to persist
across boots.
Wink Saville's avatar
Wink Saville committed
51

52
device# setprop key value
Wink Saville's avatar
Wink Saville committed
53

54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
device# echo "key=value" >> /data/local.prop
device# chmod 644 /data/local.prop


-- Retry configuration --

You can replace the connection retry configuration.  For example, you
could change it to perform 4 retries at 5 second intervals:

device# setprop test.data_retry_config "5000,5000,5000"


-- Roaming --

You can force the telephony stack to always assume that it's roaming
to verify higher-level framework functionality:

device# setprop telephony.test.forceRoaming true