diff --git a/CleanSpec.mk b/CleanSpec.mk
index b84e1b65e75..a113c7152d2 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -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
# ************************************************
diff --git a/samples/ApiDemos/res/layout/device_admin_sample.xml b/samples/ApiDemos/res/layout/device_admin_sample.xml
index 78d7c4c2d22..374b87fd7a1 100644
--- a/samples/ApiDemos/res/layout/device_admin_sample.xml
+++ b/samples/ApiDemos/res/layout/device_admin_sample.xml
@@ -247,31 +247,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
Wipe All Data
Max screen timeout
Set Timeout
- Global proxyhost:port
- No proxy for domain1,domain2
- Set Global Proxy
Enable Encryption
Disable Encryption
diff --git a/samples/ApiDemos/res/xml/device_admin_sample.xml b/samples/ApiDemos/res/xml/device_admin_sample.xml
index f3ca22a3764..10edb7e1d0d 100644
--- a/samples/ApiDemos/res/xml/device_admin_sample.xml
+++ b/samples/ApiDemos/res/xml/device_admin_sample.xml
@@ -22,7 +22,6 @@
-
diff --git a/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.java b/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.java
index 95c9b700438..04944ef1c11 100644
--- a/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.java
+++ b/samples/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.java
@@ -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
@@ -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;
@@ -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);
@@ -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 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();
diff --git a/samples/CorpApp/Android.mk b/samples/CorpApp/Android.mk
deleted file mode 100644
index 37b98b03e61..00000000000
--- a/samples/CorpApp/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := samples
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := CorpApp
-
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
-
diff --git a/samples/CorpApp/AndroidManifest.xml b/samples/CorpApp/AndroidManifest.xml
deleted file mode 100644
index 22a33755f6f..00000000000
--- a/samples/CorpApp/AndroidManifest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/samples/CorpApp/res/layout/corp_app_activity.xml b/samples/CorpApp/res/layout/corp_app_activity.xml
deleted file mode 100644
index e21e7344478..00000000000
--- a/samples/CorpApp/res/layout/corp_app_activity.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/samples/CorpApp/res/values/strings.xml b/samples/CorpApp/res/values/strings.xml
deleted file mode 100644
index 18ef549e76e..00000000000
--- a/samples/CorpApp/res/values/strings.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
- Corporate Demo App
- Set Corp Global Proxy
- Global Proxy successfully set
- Global Proxy could not be set.
- Waiting to set Global Proxy...
- proxy.corpapp.com:8080
- google.com,youtube.com
- Sample Corp App Activity
- Sample Corp App Device Admin
- Corporate device admin sample demo
-
-
diff --git a/samples/CorpApp/res/xml/corp_device_admin.xml b/samples/CorpApp/res/xml/corp_device_admin.xml
deleted file mode 100644
index f464b607f3c..00000000000
--- a/samples/CorpApp/res/xml/corp_device_admin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/samples/CorpApp/src/com/example/android/corpapp/CorpAppActivity.java b/samples/CorpApp/src/com/example/android/corpapp/CorpAppActivity.java
deleted file mode 100644
index 968fb55365a..00000000000
--- a/samples/CorpApp/src/com/example/android/corpapp/CorpAppActivity.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.example.android.corpapp;
-
-import android.app.Activity;
-import android.app.ActivityManager;
-import android.app.admin.DevicePolicyManager;
-import android.content.ComponentName;
-import android.content.Context;
-import android.os.Bundle;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import java.net.InetSocketAddress;
-import java.net.Proxy;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * A minimal Globl Proxy-setting corp app application.
- */
-public class CorpAppActivity extends Activity {
- /**
- * Called with the activity is first created.
- */
-
- Button mSetButton;
- TextView mStatusText;
- String mProxyName;
- String mProxyExclList;
- String mSuccess;
- String mFailure;
-
- DevicePolicyManager mDPM;
- ActivityManager mAM;
- ComponentName mCorpDeviceAdmin;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);
- mAM = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
- mCorpDeviceAdmin = new ComponentName(CorpAppActivity.this, CorpDeviceAdmin.class);
-
- // Set the layout for this activity. You can find it
- // in res/layout/corp_app_activity.xml
- setContentView(R.layout.corp_app_activity);
-
- mSetButton = (Button)findViewById(R.id.set_button);
- mSetButton.setOnClickListener(mSetListener);
- mStatusText = (Button)findViewById(R.id.status_text);
-
- boolean active = mDPM.isAdminActive(mCorpDeviceAdmin);
- mSetButton.setEnabled(active);
- mProxyName = getResources().getString(R.string.corp_app_proxy_name);
- mProxyExclList = getResources().getString(R.string.corp_app_proxy_excl_list);
- mSuccess = getResources().getString(R.string.corp_app_status_success_text);
- mFailure = getResources().getString(R.string.corp_app_status_failed_text);
- }
-
- private OnClickListener mSetListener = new OnClickListener() {
- public void onClick(View v) {
- String[] proxyComponents = mProxyName.split(":");
- if (proxyComponents.length != 2) {
- Toast.makeText(CorpAppActivity.this, "Wrong proxy specification.",
- Toast.LENGTH_SHORT).show();
- return;
- }
- Proxy instProxy = new Proxy(Proxy.Type.HTTP,
- new InetSocketAddress(proxyComponents[0],
- Integer.parseInt(proxyComponents[1])));
- String[] listDoms = mProxyExclList.split(",");
- if (listDoms.length == 0) {
- Toast.makeText(CorpAppActivity.this, "Wrong exclusion list format.",
- Toast.LENGTH_SHORT).show();
- }
- List exclList = Arrays.asList(listDoms);
- boolean active = mDPM.isAdminActive(mCorpDeviceAdmin);
- if (active) {
- mDPM.setGlobalProxy(mCorpDeviceAdmin, instProxy, exclList);
- ComponentName proxyAdmin = mDPM.getGlobalProxyAdmin();
- if ((proxyAdmin != null) && (proxyAdmin.equals(mCorpDeviceAdmin))) {
- Toast.makeText(CorpAppActivity.this, "Global Proxy set by device admin.",
- Toast.LENGTH_SHORT).show();
- mStatusText.setText(mSuccess);
- } else {
- Toast.makeText(CorpAppActivity.this, "Failed to set Global Proxy.",
- Toast.LENGTH_SHORT).show();
- mStatusText.setText(mFailure);
- }
- }
- }
- };
-
-}
-
diff --git a/samples/CorpApp/src/com/example/android/corpapp/CorpDeviceAdmin.java b/samples/CorpApp/src/com/example/android/corpapp/CorpDeviceAdmin.java
deleted file mode 100644
index f1a83d638b7..00000000000
--- a/samples/CorpApp/src/com/example/android/corpapp/CorpDeviceAdmin.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.example.android.corpapp;
-
-import android.app.admin.DeviceAdminReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.widget.Toast;
-
-public class CorpDeviceAdmin extends DeviceAdminReceiver {
-
- static SharedPreferences getSamplePreferences(Context context) {
- return context.getSharedPreferences(DeviceAdminReceiver.class.getName(), 0);
- }
-
- void showToast(Context context, CharSequence msg) {
- Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
- }
-
- @Override
- public void onEnabled(Context context, Intent intent) {
- showToast(context, "Sample Corp Device Admin: enabled");
- }
-
- @Override
- public CharSequence onDisableRequested(Context context, Intent intent) {
- return "Sample Corp Device Admin: disable requested";
- }
-
- @Override
- public void onDisabled(Context context, Intent intent) {
- showToast(context, "Sample Corp Device Admin: disabled");
- }
-
- @Override
- public void onPasswordChanged(Context context, Intent intent) {
- showToast(context, "Sample Corp Device Admin: pw changed");
- }
-
- @Override
- public void onPasswordFailed(Context context, Intent intent) {
- showToast(context, "Sample Corp Device Admin: pw failed");
- }
-
- @Override
- public void onPasswordSucceeded(Context context, Intent intent) {
- showToast(context, "Sample Corp Device Admin: pw succeeded");
- }
-}