am fc988c03
: Merge "Removing checks from EnableWifiTether which are done in SystemUI" into lmp-mr1-dev
* commit 'fc988c03e11eba66ca28f6dbec6d889535638bbb': Removing checks from EnableWifiTether which are done in SystemUI
This commit is contained in:
@@ -352,7 +352,7 @@
|
||||
</activity>
|
||||
|
||||
<activity android:name=".EnableWifiTether"
|
||||
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
|
||||
android:theme="@style/Transparent"
|
||||
android:excludeFromRecents="true" />
|
||||
|
||||
<activity android:name="Settings$TetherSettingsActivity"
|
||||
|
@@ -38,31 +38,16 @@ public class EnableWifiTether extends Activity {
|
||||
super.onCreate(icicle);
|
||||
mProvisionApp = getResources().getStringArray(
|
||||
com.android.internal.R.array.config_mobile_hotspot_provision_app);
|
||||
setContentView(R.layout.settings_main_dashboard);
|
||||
startProvisioningIfNecessary();
|
||||
startProvisioning();
|
||||
}
|
||||
|
||||
private static boolean isProvisioningNeeded(String[] provisionApp) {
|
||||
if (SystemProperties.getBoolean("net.tethering.noprovisioning", false)
|
||||
|| provisionApp == null) {
|
||||
return false;
|
||||
}
|
||||
return (provisionApp.length == 2);
|
||||
}
|
||||
|
||||
private void startProvisioningIfNecessary() {
|
||||
|
||||
if (isProvisioningNeeded(mProvisionApp)) {
|
||||
private void startProvisioning() {
|
||||
Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
|
||||
sendBroadcast(closeDialog);
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.setClassName(mProvisionApp[0], mProvisionApp[1]);
|
||||
intent.putExtra(TETHER_CHOICE, WIFI_TETHERING);
|
||||
startActivityForResult(intent, PROVISION_REQUEST);
|
||||
} else {
|
||||
enableTethering();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||
@@ -72,9 +57,9 @@ public class EnableWifiTether extends Activity {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
enableTethering();
|
||||
}
|
||||
}
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void enableTethering() {
|
||||
final ContentResolver cr = getContentResolver();
|
||||
|
Reference in New Issue
Block a user