Disabling incoming call function.

Also fix un-used imports in several files.

Change-Id: Ife01674b2a1fe807a8d0b23c984e46715fc08908
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d8cda6f..04f4b8b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -243,20 +243,6 @@
             </intent-filter>
         </receiver>
 
-        <!-- Main in-call UI activity.  This is never launched directly
-             from outside the phone app; instead, it's either launched by
-             the OutgoingCallBroadcaster (for outgoing calls), or as the
-             fullScreenIntent of a notification (for incoming calls.) -->
-        <activity android:name="InCallScreen"
-            android:theme="@style/Theme.InCallScreen"
-            android:label="@string/phoneIconLabel"
-            android:excludeFromRecents="true"
-            android:launchMode="singleInstance"
-            android:screenOrientation="nosensor"
-            android:configChanges="keyboardHidden"
-            android:exported="false">
-        </activity>
-
         <!-- Trampoline activity that handles the PERFORM_CDMA_PROVISIONING intent. -->
         <activity android:name="InCallScreenShowActivation"
             android:permission="android.permission.PERFORM_CDMA_PROVISIONING"
diff --git a/res/layout/call_card.xml b/res/layout/call_card.xml
index aac9c1c..3803957 100644
--- a/res/layout/call_card.xml
+++ b/res/layout/call_card.xml
@@ -1,18 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
+<!--
+  ~ Copyright (C) 2013 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
+  -->
 
 <!-- XML resource file for the CallCard used in the Phone app.
 
diff --git a/res/layout/incall_screen.xml b/res/layout/incall_screen.xml
deleted file mode 100644
index 64df29a..0000000
--- a/res/layout/incall_screen.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<!-- In-call Phone UI; see InCallScreen.java. -->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-    <!-- The "Call Card", which displays info about the currently
-         active phone call(s) on the device.  See call_card.xml.
-
-         Note that the CallCard is technically the size of the full screen
-         (since layout_width and layout_height are both "match_parent" here) but
-         we manually adjust its bottom margin in CallCard.updateCallInfoLayout()
-         to make sure it doesn't overlap with the onscreen buttons from
-         incall_touch_ui.xml. -->
-    <include
-        layout="@layout/call_card"
-        android:id="@+id/callCard"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        />
-
-    <!-- In-call onscreen touch controls; see InCallTouchUi.java.
-         This widget contains the cluster of buttons shown at the bottom
-         of the in-call screen, and also the DTMF dialpad (which, when
-         visible, covers the upper part of the screen too.) -->
-    <include layout="@layout/incall_touch_ui"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        />
-
-    <!-- ViewStub for OTASP-related UI elements (for the CDMA "activation"
-         call.)  Note that this ViewStub provides the *entire* OTASP
-         screen, including the status area at the top *and* touch controls
-         at the bottom of the screen.  The regular CallCard and the
-         InCallTouchUi widget are not used at all during an OTASP call. -->
-    <ViewStub android:id="@+id/otaCallCardStub"
-              android:layout="@layout/otacall_card"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              />
-
-    <!-- The "Manage conference" UI.  This panel is displayed (and covers up
-         the entire normal in-call UI) when the user clicks "Manage conference"
-         during a GSM conference call. -->
-    <ViewStub android:id="@+id/manageConferencePanelStub"
-              android:layout="@layout/manage_conference_panel"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              />
-
-</FrameLayout>
diff --git a/res/layout/incall_touch_ui.xml b/res/layout/incall_touch_ui.xml
index 5d3ea27..6099f41 100644
--- a/res/layout/incall_touch_ui.xml
+++ b/res/layout/incall_touch_ui.xml
@@ -1,18 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
+<!--
+  ~ Copyright (C) 2013 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
+  -->
 
 <!-- In-call onscreen touch UI elements, used on some platforms.
 
diff --git a/src/com/android/phone/CallNotifier.java b/src/com/android/phone/CallNotifier.java
index 39feb25..669f9b0 100644
--- a/src/com/android/phone/CallNotifier.java
+++ b/src/com/android/phone/CallNotifier.java
@@ -50,7 +50,6 @@
 import android.telephony.PhoneNumberUtils;
 import android.telephony.PhoneStateListener;
 import android.telephony.TelephonyManager;
-import android.text.TextUtils;
 import android.util.EventLog;
 import android.util.Log;
 
diff --git a/src/com/android/phone/DTMFTwelveKeyDialer.java b/src/com/android/phone/DTMFTwelveKeyDialer.java
index 4afac55..4dd4a88 100644
--- a/src/com/android/phone/DTMFTwelveKeyDialer.java
+++ b/src/com/android/phone/DTMFTwelveKeyDialer.java
@@ -31,8 +31,6 @@
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.View;
-import android.view.ViewConfiguration;
-import android.view.View.OnHoverListener;
 import android.view.accessibility.AccessibilityManager;
 import android.view.ViewStub;
 import android.widget.EditText;
@@ -40,7 +38,6 @@
 import com.android.internal.telephony.CallManager;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.TelephonyCapabilities;
 
 import java.util.HashMap;
 import java.util.LinkedList;
diff --git a/src/com/android/phone/InCallControlState.java b/src/com/android/phone/InCallControlState.java
index e5c7f20..d21343d 100644
--- a/src/com/android/phone/InCallControlState.java
+++ b/src/com/android/phone/InCallControlState.java
@@ -21,7 +21,6 @@
 
 import com.android.internal.telephony.Call;
 import com.android.internal.telephony.Connection;
-import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.CallManager;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.telephony.TelephonyCapabilities;
diff --git a/src/com/android/phone/InCallTouchUi.java b/src/com/android/phone/InCallTouchUi.java
index a68d066..993717e 100644
--- a/src/com/android/phone/InCallTouchUi.java
+++ b/src/com/android/phone/InCallTouchUi.java
@@ -29,14 +29,10 @@
 import android.view.Gravity;
 import android.view.Menu;
 import android.view.MenuItem;
-import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewPropertyAnimator;
 import android.view.ViewStub;
-import android.view.animation.AlphaAnimation;
-import android.view.animation.Animation;
-import android.view.animation.Animation.AnimationListener;
 import android.widget.CompoundButton;
 import android.widget.FrameLayout;
 import android.widget.ImageButton;
@@ -46,7 +42,6 @@
 
 import com.android.internal.telephony.Call;
 import com.android.internal.telephony.CallManager;
-import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.widget.multiwaveview.GlowPadView;
 import com.android.internal.widget.multiwaveview.GlowPadView.OnTriggerListener;
diff --git a/src/com/android/phone/ManageConferenceUtils.java b/src/com/android/phone/ManageConferenceUtils.java
index 5821754..62e9a99 100644
--- a/src/com/android/phone/ManageConferenceUtils.java
+++ b/src/com/android/phone/ManageConferenceUtils.java
@@ -22,9 +22,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewStub;
-import android.widget.Button;
 import android.widget.Chronometer;
-import android.widget.ImageButton;
 import android.widget.TextView;
 
 import com.android.internal.telephony.CallerInfo;
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index ab0ba0c..7cda28c 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -1107,7 +1107,8 @@
 
         Notification notification = builder.getNotification();
         if (DBG) log("Notifying IN_CALL_NOTIFICATION: " + notification);
-        mNotificationManager.notify(IN_CALL_NOTIFICATION, notification);
+        // TODO(klp): not needed anymore.  Possibly delete this and move notification to incallui.
+        //mNotificationManager.notify(IN_CALL_NOTIFICATION, notification);
 
         // Finally, refresh the mute and speakerphone notifications (since
         // some phone state changes can indirectly affect the mute and/or
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 49332d1..865ad75 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -762,7 +762,8 @@
     }
 
     private static String getCallScreenClassName() {
-        return InCallScreen.class.getName();
+        //InCallScreen.class.getName();
+        return "blah";
     }
 
     /**
@@ -781,7 +782,7 @@
         }
 
         try {
-            startActivity(createInCallIntent());
+            //startActivity(createInCallIntent());
         } catch (ActivityNotFoundException e) {
             // It's possible that the in-call UI might not exist (like on
             // non-voice-capable devices), so don't crash if someone
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 6600ae5..c65c4f8 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -311,7 +311,7 @@
                 intent = PhoneGlobals.createInCallIntent();
             }
             try {
-                mApp.startActivity(intent);
+                //mApp.startActivity(intent);
             } catch (ActivityNotFoundException e) {
                 // It's possible that the in-call UI might not exist
                 // (like on non-voice-capable devices), although we
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index 4334962..a64a205 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -36,7 +36,6 @@
 import android.os.Message;
 import android.os.RemoteException;
 import android.os.SystemProperties;
-import android.provider.Settings;
 import android.telephony.PhoneNumberUtils;
 import android.text.TextUtils;
 import android.util.Log;