Revert "Try to fix LGE menu button NPEs"

This reverts commit f3a3aaca60.
This commit is contained in:
Jake McGinty 2014-11-25 09:23:57 +02:00
parent f3a3aaca60
commit 28f63cf335
8 changed files with 0 additions and 150 deletions

View file

@ -2,10 +2,8 @@ package org.thoughtcrime.securesms;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.KeyEvent;
import org.thoughtcrime.securesms.util.DynamicTheme;
@ -29,21 +27,4 @@ public class CountrySelectionActivity extends FragmentActivity
this.setResult(RESULT_OK, result);
this.finish();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}

View file

@ -23,10 +23,8 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ProgressBar;
@ -249,20 +247,4 @@ public class DatabaseUpgradeActivity extends Activity {
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}

View file

@ -1,7 +1,6 @@
package org.thoughtcrime.securesms;
import android.app.AlertDialog;
import android.os.Build;
import android.support.v7.app.ActionBarActivity;
import android.text.ClipboardManager;
import android.content.DialogInterface;
@ -10,7 +9,6 @@ import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
@ -233,21 +231,4 @@ public class LogSubmitActivity extends ActionBarActivity {
}
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}

View file

@ -20,10 +20,8 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Build;
import android.os.IBinder;
import android.support.v7.app.ActionBarActivity;
import android.view.KeyEvent;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.service.KeyCachingService;
@ -72,21 +70,4 @@ public abstract class PassphraseActivity extends ActionBarActivity {
keyCachingService = null;
}
};
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}

View file

@ -1,9 +1,7 @@
package org.thoughtcrime.securesms;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.KeyEvent;
import org.thoughtcrime.securesms.crypto.MasterSecret;
@ -43,20 +41,4 @@ public class PassphraseRequiredActionBarActivity extends ActionBarActivity imple
@Override
public void onNewMasterSecret(MasterSecret masterSecret) {}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}

View file

@ -4,7 +4,6 @@ import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.telephony.TelephonyManager;
@ -12,7 +11,6 @@ import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ArrayAdapter;
@ -290,21 +288,4 @@ public class RegistrationActivity extends ActionBarActivity {
finish();
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}

View file

@ -1,9 +1,7 @@
package org.thoughtcrime.securesms;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
@ -23,21 +21,4 @@ public class RegistrationProblemsActivity extends ActionBarActivity {
}
});
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}

View file

@ -9,7 +9,6 @@ import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
@ -21,7 +20,6 @@ import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
@ -626,21 +624,4 @@ public class RegistrationProgressActivity extends ActionBarActivity {
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && "LGE".equalsIgnoreCase(Build.BRAND)) {
openOptionsMenu();
return true;
}
return super.onKeyUp(keyCode, event);
}
}