Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Remove references to global proxy APIs
Browse files Browse the repository at this point in the history
Remove global proxy settings from Apidemos
Remove CorpApp

Bug: 3460938
Change-Id: I2b6889a96341f0e4fad50a9cfaa76db715ecfaa0
  • Loading branch information
andrewstadler committed Feb 16, 2011
1 parent 0f91171 commit 5ee9462
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 414 deletions.
2 changes: 2 additions & 0 deletions CleanSpec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)

$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/CorpApp_intermediates)

# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
25 changes: 0 additions & 25 deletions samples/ApiDemos/res/layout/device_admin_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,31 +247,6 @@

</LinearLayout>

<LinearLayout android:orientation="vertical" android:gravity="center_horizontal"
android:layout_width="match_parent" android:layout_height="wrap_content">

<EditText android:id="@+id/proxyhost"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="@string/proxyhost_hint">
</EditText>

<EditText android:id="@+id/proxylist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="@string/proxylist_hint">
</EditText>

<Button android:id="@+id/set_proxy"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/set_proxy_label">
</Button>

</LinearLayout>

<!-- Encryption Status Controls -->
<LinearLayout
android:orientation="horizontal"
Expand Down
3 changes: 0 additions & 3 deletions samples/ApiDemos/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,6 @@
<string name="wipe_all_data">Wipe All Data</string>
<string name="timeout_hint">Max screen timeout</string>
<string name="set_timeout_label">Set Timeout</string>
<string name="proxyhost_hint">Global proxyhost:port</string>
<string name="proxylist_hint">No proxy for domain1,domain2</string>
<string name="set_proxy_label">Set Global Proxy</string>

<string name="encryption_enable_label">Enable Encryption</string>
<string name="encryption_disable_label">Disable Encryption</string>
Expand Down
1 change: 0 additions & 1 deletion samples/ApiDemos/res/xml/device_admin_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<reset-password />
<force-lock />
<wipe-data />
<set-global-proxy />
<expire-password />
<encrypted-storage />
</uses-policies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,8 @@
import android.widget.TextView;
import android.widget.Toast;

import java.net.InetSocketAddress;
import java.net.Proxy;
import java.text.DateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
* Example of a do-nothing admin class. When enabled, it lets you control
Expand Down Expand Up @@ -189,10 +185,6 @@ public static class Controller extends Activity {

private EditText mTimeout;

EditText mProxyHost;
EditText mProxyList;
Button mProxyButton;

private EditText mPasswordExpirationTimeout;
private Button mPasswordExpirationButton;
private TextView mPasswordExpirationStatus;
Expand Down Expand Up @@ -400,11 +392,6 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
mTimeoutButton = (Button) findViewById(R.id.set_timeout);
mTimeoutButton.setOnClickListener(mSetTimeoutListener);

mProxyHost = (EditText) findViewById(R.id.proxyhost);
mProxyList = (EditText) findViewById(R.id.proxylist);
mProxyButton = (Button) findViewById(R.id.set_proxy);
mProxyButton.setOnClickListener(mSetProxyListener);

mEnableEncryptionButton = (Button) findViewById(R.id.encryption_enable_button);
mEnableEncryptionButton.setOnClickListener(mEncryptionButtonListener);
mDisableEncryptionButton = (Button) findViewById(R.id.encryption_disable_button);
Expand Down Expand Up @@ -788,49 +775,6 @@ public void onClick(View v) {
}
};

private OnClickListener mSetProxyListener = new OnClickListener() {

public void onClick(View v) {
boolean active = mDPM.isAdminActive(mDeviceAdminSample);
String proxySpec = mProxyHost.getText().toString();
String proxyList = mProxyList.getText().toString();
Proxy instProxy;
List<String> exclList;

if ((proxySpec.length() == 0) || (proxySpec == null)) {
instProxy = Proxy.NO_PROXY;
} else {
String[] proxyComponents = proxySpec.split(":");
if (proxyComponents.length != 2) {
Toast.makeText(Controller.this, "Wrong proxy specification.",
Toast.LENGTH_SHORT).show();
return;
}
instProxy = new Proxy(Proxy.Type.HTTP,
new InetSocketAddress(proxyComponents[0],
Integer.parseInt(proxyComponents[1])));
}
if ((proxyList == null) || (proxyList.length() == 0)) {
exclList = null;
} else {
String[] listDoms = proxyList.split(",");
if (listDoms.length == 0) {
Toast.makeText(Controller.this, "Wrong exclusion list format.",
Toast.LENGTH_SHORT).show();
}
exclList = Arrays.asList(listDoms);
}
if (active) {
mDPM.setGlobalProxy(mDeviceAdminSample, instProxy, exclList);
ComponentName proxyAdmin = mDPM.getGlobalProxyAdmin();
if ((proxyAdmin != null) && (proxyAdmin.equals(mDeviceAdminSample))) {
Toast.makeText(Controller.this, "Global Proxy set by device admin.",
Toast.LENGTH_SHORT).show();
}
}
}
};

private OnClickListener mEncryptionButtonListener = new OnClickListener() {
public void onClick(View v) {
int buttonId = v.getId();
Expand Down
17 changes: 0 additions & 17 deletions samples/CorpApp/Android.mk

This file was deleted.

44 changes: 0 additions & 44 deletions samples/CorpApp/AndroidManifest.xml

This file was deleted.

36 changes: 0 additions & 36 deletions samples/CorpApp/res/layout/corp_app_activity.xml

This file was deleted.

30 changes: 0 additions & 30 deletions samples/CorpApp/res/values/strings.xml

This file was deleted.

24 changes: 0 additions & 24 deletions samples/CorpApp/res/xml/corp_device_admin.xml

This file was deleted.

Loading

0 comments on commit 5ee9462

Please sign in to comment.