diff --git a/webrtc/examples/androidapp/AndroidManifest.xml b/webrtc/examples/androidapp/AndroidManifest.xml index dfe8975b31..608e381fcb 100644 --- a/webrtc/examples/androidapp/AndroidManifest.xml +++ b/webrtc/examples/androidapp/AndroidManifest.xml @@ -23,7 +23,6 @@ diff --git a/webrtc/examples/androidapp/res/drawable-hdpi/ic_add_white_24dp.png b/webrtc/examples/androidapp/res/drawable-hdpi/ic_add_white_24dp.png deleted file mode 100644 index 694179bd46..0000000000 Binary files a/webrtc/examples/androidapp/res/drawable-hdpi/ic_add_white_24dp.png and /dev/null differ diff --git a/webrtc/examples/androidapp/res/drawable-mdpi/ic_add_white_24dp.png b/webrtc/examples/androidapp/res/drawable-mdpi/ic_add_white_24dp.png deleted file mode 100644 index 3856041d70..0000000000 Binary files a/webrtc/examples/androidapp/res/drawable-mdpi/ic_add_white_24dp.png and /dev/null differ diff --git a/webrtc/examples/androidapp/res/drawable-xhdpi/ic_add_white_24dp.png b/webrtc/examples/androidapp/res/drawable-xhdpi/ic_add_white_24dp.png deleted file mode 100644 index 67bb598e52..0000000000 Binary files a/webrtc/examples/androidapp/res/drawable-xhdpi/ic_add_white_24dp.png and /dev/null differ diff --git a/webrtc/examples/androidapp/res/drawable-xxhdpi/ic_add_white_24dp.png b/webrtc/examples/androidapp/res/drawable-xxhdpi/ic_add_white_24dp.png deleted file mode 100644 index 0fdced8fce..0000000000 Binary files a/webrtc/examples/androidapp/res/drawable-xxhdpi/ic_add_white_24dp.png and /dev/null differ diff --git a/webrtc/examples/androidapp/res/drawable-xxxhdpi/ic_add_white_24dp.png b/webrtc/examples/androidapp/res/drawable-xxxhdpi/ic_add_white_24dp.png deleted file mode 100644 index d64c22e9ed..0000000000 Binary files a/webrtc/examples/androidapp/res/drawable-xxxhdpi/ic_add_white_24dp.png and /dev/null differ diff --git a/webrtc/examples/androidapp/res/layout/activity_connect.xml b/webrtc/examples/androidapp/res/layout/activity_connect.xml index acc20dc6a1..2a80774b72 100644 --- a/webrtc/examples/androidapp/res/layout/activity_connect.xml +++ b/webrtc/examples/androidapp/res/layout/activity_connect.xml @@ -1,7 +1,6 @@ + + - - \ No newline at end of file diff --git a/webrtc/examples/androidapp/res/layout/dialog_add_favorite.xml b/webrtc/examples/androidapp/res/layout/dialog_add_favorite.xml deleted file mode 100644 index 28b533aa0c..0000000000 --- a/webrtc/examples/androidapp/res/layout/dialog_add_favorite.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - \ No newline at end of file diff --git a/webrtc/examples/androidapp/res/menu/connect_menu.xml b/webrtc/examples/androidapp/res/menu/connect_menu.xml index 8beddddd45..a723f54941 100644 --- a/webrtc/examples/androidapp/res/menu/connect_menu.xml +++ b/webrtc/examples/androidapp/res/menu/connect_menu.xml @@ -1,14 +1,13 @@ - + diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java index 557c3e8c73..fa279dec14 100644 --- a/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java @@ -10,19 +10,17 @@ package org.appspot.apprtc; +import android.app.Activity; +import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.design.widget.FloatingActionButton; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.ContextMenu; import android.view.KeyEvent; -import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -45,14 +43,14 @@ import java.util.Random; /** * Handles the initial setup where the user selects which room to join. */ -public class ConnectActivity extends AppCompatActivity { +public class ConnectActivity extends Activity { private static final String TAG = "ConnectActivity"; private static final int CONNECTION_REQUEST = 1; private static final int REMOVE_FAVORITE_INDEX = 0; private static boolean commandLineRun = false; private ImageButton connectButton; - private FloatingActionButton addFavoriteButton; + private ImageButton addFavoriteButton; private EditText roomEditText; private ListView roomListView; private SharedPreferences sharedPref; @@ -130,6 +128,8 @@ public class ConnectActivity extends AppCompatActivity { registerForContextMenu(roomListView); connectButton = (ImageButton) findViewById(R.id.connect_button); connectButton.setOnClickListener(connectListener); + addFavoriteButton = (ImageButton) findViewById(R.id.add_favorite_button); + addFavoriteButton.setOnClickListener(addFavoriteListener); // If an implicit VIEW intent is launching the app, go directly to that URL. final Intent intent = getIntent(); @@ -142,9 +142,6 @@ public class ConnectActivity extends AppCompatActivity { String room = sharedPref.getString(keyprefRoom, ""); connectToRoom(room, true, loopback, runTimeMs); } - - addFavoriteButton = (FloatingActionButton) findViewById(R.id.add_favorite_button); - addFavoriteButton.setOnClickListener(addFavoriteListener); } @Override @@ -413,27 +410,11 @@ public class ConnectActivity extends AppCompatActivity { private final OnClickListener addFavoriteListener = new OnClickListener() { @Override public void onClick(View view) { - AlertDialog.Builder builder = new AlertDialog.Builder(ConnectActivity.this); - - final View dialogView = LayoutInflater.from(ConnectActivity.this) - .inflate(R.layout.dialog_add_favorite, null); - final EditText favoriteEditText = (EditText) dialogView.findViewById(R.id.favorite_edittext); - favoriteEditText.append(roomEditText.getText()); - - builder.setTitle(R.string.add_favorite_title) - .setPositiveButton(R.string.add, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - String newRoom = favoriteEditText.getText().toString(); - if (newRoom.length() > 0 && !roomList.contains(newRoom)) { - adapter.add(newRoom); - adapter.notifyDataSetChanged(); - } - } - }) - .setView(dialogView) - .setNegativeButton(R.string.cancel, null); - builder.show(); + String newRoom = roomEditText.getText().toString(); + if (newRoom.length() > 0 && !roomList.contains(newRoom)) { + adapter.add(newRoom); + adapter.notifyDataSetChanged(); + } } }; diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp index 6f07b4d7fe..16dc83756a 100755 --- a/webrtc/webrtc_examples.gyp +++ b/webrtc/webrtc_examples.gyp @@ -408,7 +408,6 @@ 'type': 'none', 'dependencies': [ 'api/api.gyp:libjingle_peerconnection_java', - '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_design_javalib' ], 'variables': { 'apk_name': 'AppRTCDemo', @@ -419,11 +418,9 @@ 'R_package_relpath': 'org/appspot/apprtc', 'input_jars_paths': [ 'examples/androidapp/third_party/autobanh/autobanh.jar', - '<(DEPTH)/third_party/android_tools/sdk/extras/android/support/v4/android-support-v4.jar', ], 'library_dexed_jars_paths': [ 'examples/androidapp/third_party/autobanh/autobanh.jar', - '<(DEPTH)/third_party/android_tools/sdk/extras/android/support/v4/android-support-v4.jar', ], 'native_lib_target': 'libjingle_peerconnection_so', 'add_to_dependents_classpaths':1,