Remove test activity entirely
Change-Id: Iff2027620f8d109aec581f82528430f04ad58e9b
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 86115a1..c3bab37 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -33,13 +33,21 @@
android:icon="@mipmap/ic_launcher_mail"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light" >
+ <!-- TODO: add a permission on this -->
<activity
android:label="@string/app_name"
- android:name=".UnifiedEmail" >
+ android:name=".ui.MailActivity"
+ android:uiOptions="splitActionBarWhenNarrow">
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="content"/>
+ <data android:mimeType="application/mail-ls" />
+ </intent-filter>
</activity>
<activity android:name=".compose.ComposeActivity">
<intent-filter>
@@ -68,17 +76,6 @@
<data android:mimeType="*/*" />
</intent-filter>
</activity>
- <!-- TODO: add a permission on this -->
- <activity
- android:name=".ui.MailActivity"
- android:uiOptions="splitActionBarWhenNarrow">
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:scheme="content"/>
- <data android:mimeType="application/mail-ls" />
- </intent-filter>
- </activity>
<activity android:name="LabelSynchronizationActivity"
android:theme="@android:style/Theme.Holo.Light.Dialog" />
diff --git a/res/layout/layout_tests.xml b/res/layout/layout_tests.xml
deleted file mode 100644
index 455bb2d..0000000
--- a/res/layout/layout_tests.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to 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.
--->
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/compose_scrollview"
- android:fillViewport="true"
- android:layout_height="match_parent"
- android:layout_width="match_parent">
-
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical">
- <Button
- android:text="@string/test_application"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:onClick="unifiedMail"/>
- </LinearLayout>
-</ScrollView>
diff --git a/src/com/android/mail/UnifiedEmail.java b/src/com/android/mail/UnifiedEmail.java
deleted file mode 100644
index 821eb18..0000000
--- a/src/com/android/mail/UnifiedEmail.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc.
- * Licensed to 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.android.mail;
-
-import com.android.mail.ui.MailActivity;
-
-import android.app.Activity;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.View;
-
-public class UnifiedEmail extends Activity {
- void startActivityWithClass(Class <?> cls){
- Intent intent = new Intent();
- intent.setComponent(new ComponentName(this, cls));
- startActivity(intent);
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.layout_tests);
- }
-
- /**
- * Try out the real mail activity now.
- * @param v
- */
- public void unifiedMail(View v){
- startActivityWithClass(MailActivity.class);
- }
-}
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index b062370..3dd2132 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -115,7 +115,7 @@
mActivity.invalidateOptionsMenu();
}
};
- private static final String LOG_TAG = new LogUtils().getLogTag();
+ protected static final String LOG_TAG = new LogUtils().getLogTag();
private static final int ACCOUNT_CURSOR_LOADER = 0;
private static final int FOLDER_CURSOR_LOADER = 1;
diff --git a/src/com/android/mail/ui/TwoPaneController.java b/src/com/android/mail/ui/TwoPaneController.java
index 235be4c..f815c9a 100644
--- a/src/com/android/mail/ui/TwoPaneController.java
+++ b/src/com/android/mail/ui/TwoPaneController.java
@@ -20,6 +20,7 @@
import com.android.mail.ConversationListContext;
import com.android.mail.R;
import com.android.mail.providers.Conversation;
+import com.android.mail.utils.LogUtils;
import android.app.Fragment;
import android.app.FragmentTransaction;
@@ -104,6 +105,9 @@
public boolean onCreate(Bundle savedState) {
mActivity.setContentView(R.layout.two_pane_activity);
mLayout = (TwoPaneLayout) mActivity.findViewById(R.id.two_pane_activity);
+ if (mLayout == null) {
+ LogUtils.d(LOG_TAG, "mLayout is null!");
+ }
mLayout.initializeLayout(mActivity.getApplicationContext());
// The tablet layout needs to refer to mode changes.