Skip to content

Commit 148c7d0

Browse files
tk.munRobert Greenwalt
authored andcommitted
Wimax : wimax framework related open source.
Integrate wimax network related changes into Android Framework. - In Connectivity service, start wimax service. - 4G icon display in StatusBarPolicy. - DHCP renew add. - Add radio for wiamx Change-Id: I2d9012247edfdf49d71ca7e1414afd0006f330ca Signed-off-by: tk.mun <tk.mun@samsung.com> bug:5237167
1 parent 2ccc47b commit 148c7d0

25 files changed

+395
-4
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
package android.net.wimax;
2+
3+
/**
4+
* {@hide}
5+
*/
6+
public class WimaxManagerConstants
7+
{
8+
9+
/**
10+
* Used by android.net.wimax.WimaxManager for handling management of
11+
* Wimax access.
12+
*/
13+
public static final String WIMAX_SERVICE = "WiMax";
14+
15+
/**
16+
* Broadcast intent action indicating that Wimax has been enabled, disabled,
17+
* enabling, disabling, or unknown. One extra provides this state as an int.
18+
* Another extra provides the previous state, if available.
19+
*/
20+
public static final String NET_4G_STATE_CHANGED_ACTION =
21+
"android.net.fourG.NET_4G_STATE_CHANGED";
22+
23+
/**
24+
* The lookup key for an int that indicates whether Wimax is enabled,
25+
* disabled, enabling, disabling, or unknown.
26+
*/
27+
public static final String EXTRA_WIMAX_STATUS = "wimax_status";
28+
29+
/**
30+
* Broadcast intent action indicating that Wimax state has been changed
31+
* state could be scanning, connecting, connected, disconnecting, disconnected
32+
* initializing, initialized, unknown and ready. One extra provides this state as an int.
33+
* Another extra provides the previous state, if available.
34+
*/
35+
public static final String WIMAX_NETWORK_STATE_CHANGED_ACTION =
36+
"android.net.fourG.wimax.WIMAX_NETWORK_STATE_CHANGED";
37+
38+
/**
39+
* Broadcast intent action indicating that Wimax signal level has been changed.
40+
* Level varies from 0 to 3.
41+
*/
42+
public static final String SIGNAL_LEVEL_CHANGED_ACTION =
43+
"android.net.wimax.SIGNAL_LEVEL_CHANGED";
44+
45+
/**
46+
* The lookup key for an int that indicates whether Wimax state is
47+
* scanning, connecting, connected, disconnecting, disconnected
48+
* initializing, initialized, unknown and ready.
49+
*/
50+
public static final String EXTRA_WIMAX_STATE = "WimaxState";
51+
public static final String EXTRA_4G_STATE = "4g_state";
52+
public static final String EXTRA_WIMAX_STATE_INT = "WimaxStateInt";
53+
/**
54+
* The lookup key for an int that indicates whether state of Wimax
55+
* is idle.
56+
*/
57+
public static final String EXTRA_WIMAX_STATE_DETAIL = "WimaxStateDetail";
58+
59+
/**
60+
* The lookup key for an int that indicates Wimax signal level.
61+
*/
62+
public static final String EXTRA_NEW_SIGNAL_LEVEL = "newSignalLevel";
63+
64+
/**
65+
* Indicatates Wimax is disabled.
66+
*/
67+
public static final int NET_4G_STATE_DISABLED = 1;
68+
69+
/**
70+
* Indicatates Wimax is enabled.
71+
*/
72+
public static final int NET_4G_STATE_ENABLED = 3;
73+
74+
/**
75+
* Indicatates Wimax status is known.
76+
*/
77+
public static final int NET_4G_STATE_UNKNOWN = 4;
78+
79+
/**
80+
* Indicatates Wimax is in idle state.
81+
*/
82+
public static final int WIMAX_IDLE = 6;
83+
84+
/**
85+
* Indicatates Wimax is being deregistered.
86+
*/
87+
public static final int WIMAX_DEREGISTRATION = 8;
88+
89+
/**
90+
* Indicatates wimax state is unknown.
91+
*/
92+
public static final int WIMAX_STATE_UNKNOWN = 0;
93+
94+
/**
95+
* Indicatates wimax state is connected.
96+
*/
97+
public static final int WIMAX_STATE_CONNECTED = 7;
98+
99+
/**
100+
* Indicatates wimax state is disconnected.
101+
*/
102+
public static final int WIMAX_STATE_DISCONNECTED = 9;
103+
104+
}

core/java/android/provider/Settings.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,7 @@ public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) {
11821182
*/
11831183
public static final String RADIO_WIFI = "wifi";
11841184

1185+
public static final String RADIO_WIMAX = "wimax";
11851186
/**
11861187
* Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
11871188
*/
@@ -2899,6 +2900,8 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
28992900
*/
29002901
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
29012902
"wifi_networks_available_notification_on";
2903+
public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
2904+
"wimax_networks_available_notification_on";
29022905

29032906
/**
29042907
* Delay (in seconds) before repeating the Wi-Fi networks available notification.

core/res/AndroidManifest.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,11 @@
423423
android:description="@string/permdesc_accessWifiState"
424424
android:label="@string/permlab_accessWifiState" />
425425

426+
<permission android:name="android.permission.ACCESS_WIMAX_STATE"
427+
android:permissionGroup="android.permission-group.NETWORK"
428+
android:protectionLevel="normal"
429+
android:description="@string/permdesc_accessWimaxState"
430+
android:label="@string/permlab_accessWimaxState" />
426431
<!-- Allows applications to connect to paired bluetooth devices -->
427432
<permission android:name="android.permission.BLUETOOTH"
428433
android:permissionGroup="android.permission-group.NETWORK"
@@ -984,6 +989,11 @@
984989
android:description="@string/permdesc_changeWifiState"
985990
android:label="@string/permlab_changeWifiState" />
986991

992+
<permission android:name="android.permission.CHANGE_WIMAX_STATE"
993+
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
994+
android:protectionLevel="dangerous"
995+
android:description="@string/permdesc_changeWimaxState"
996+
android:label="@string/permlab_changeWimaxState" />
987997
<!-- Allows applications to enter Wi-Fi Multicast mode -->
988998
<permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
989999
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
2.17 KB
Loading
1.76 KB
Loading

core/res/res/values/config.xml

100755100644
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@
165165
<string-array translatable="false" name="config_tether_wifi_regexs">
166166
</string-array>
167167

168+
<!-- List of regexpressions describing the interface (if any) that represent tetherable
169+
WiMAX interfaces. If the device doesn't want to support tethering over Wifi this
170+
should be empty. An example would be "softap.*" -->
171+
<string-array translatable="false" name="config_tether_wimax_regexs">
172+
</string-array>
173+
168174
<!-- List of regexpressions describing the interface (if any) that represent tetherable
169175
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
170176
should be empty. -->
@@ -718,4 +724,16 @@
718724
<!-- Default network policy warning threshold, in megabytes. -->
719725
<integer name="config_networkPolicyDefaultWarning">2048</integer>
720726

727+
<!-- Set and Unsets WiMAX -->
728+
<bool name="config_wimaxEnabled">false</bool>
729+
<!-- Location of the wimax framwork jar location -->
730+
<string name="config_wimaxServiceJarLocation"></string>
731+
<!-- Location of the wimax native library locaiton -->
732+
<string name="config_wimaxNativeLibLocation"></string>
733+
<!-- Name of the wimax manager class -->
734+
<string name="config_wimaxManagerClassname"></string>
735+
<!-- Name of the wimax service class -->
736+
<string name="config_wimaxServiceClassname"></string>
737+
<!-- Name of the wimax state tracker clas -->
738+
<string name="config_wimaxStateTrackerClassname"></string>
721739
</resources>

core/res/res/values/strings.xml

100755100644
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,12 @@
13621362
than the non-multicast mode.</string>
13631363

13641364
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
1365+
<string name="permlab_accessWimaxState">view WiMAX state</string>
1366+
<string name="permdesc_accessWimaxState">Allows an application to view
1367+
the information about the state of WiMAX.</string>
1368+
<string name="permlab_changeWimaxState">change WiMAX state</string>
1369+
<string name="permdesc_changeWimaxState">Allows an application to connect
1370+
to and disconnect from WiMAX network.</string>
13651371
<string name="permlab_bluetoothAdmin">bluetooth administration</string>
13661372
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
13671373
<string name="permdesc_bluetoothAdmin" product="tablet">Allows an application to configure

packages/SettingsProvider/res/values/defaults.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<integer name="def_screen_off_timeout">60000</integer>
2222
<bool name="def_airplane_mode_on">false</bool>
2323
<!-- Comma-separated list of bluetooth, wifi, and cell. -->
24-
<string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi,nfc</string>
24+
<string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi,nfc,wimax</string>
2525
<string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi,nfc</string>
2626
<bool name="def_auto_time">true</bool>
2727
<bool name="def_auto_time_zone">true</bool>
2.01 KB
Loading
2 KB
Loading

0 commit comments

Comments
 (0)