Android: various bug fixes to prevent NullPointerExceptions
This commit is contained in:
parent
4d47514428
commit
77f8ca315e
@ -248,6 +248,9 @@ public class SessionActivity extends Activity
|
||||
{
|
||||
Log.v(TAG, "OnConnectionFailure");
|
||||
|
||||
// remove pending move events
|
||||
uiHandler.removeMessages(UIHandler.SEND_MOVE_EVENT);
|
||||
|
||||
if(progressDialog != null)
|
||||
{
|
||||
progressDialog.dismiss();
|
||||
@ -264,7 +267,10 @@ public class SessionActivity extends Activity
|
||||
private void OnDisconnected(Context context)
|
||||
{
|
||||
Log.v(TAG, "OnDisconnected");
|
||||
|
||||
|
||||
// remove pending move events
|
||||
uiHandler.removeMessages(UIHandler.SEND_MOVE_EVENT);
|
||||
|
||||
if(progressDialog != null)
|
||||
{
|
||||
progressDialog.dismiss();
|
||||
@ -434,6 +440,7 @@ public class SessionActivity extends Activity
|
||||
|
||||
keyboardMapper = new KeyboardMapper();
|
||||
keyboardMapper.init(this);
|
||||
keyboardMapper.reset(this);
|
||||
|
||||
modifiersKeyboard = new Keyboard(getApplicationContext(), R.xml.modifiers_keyboard);
|
||||
specialkeysKeyboard = new Keyboard(getApplicationContext(), R.xml.specialkeys_keyboard);
|
||||
|
@ -65,7 +65,9 @@ public abstract class ClipboardManagerProxy {
|
||||
String data = null;
|
||||
|
||||
if (clip != null && clip.getItemCount() > 0) {
|
||||
data = clip.getItemAt(0).getText().toString();
|
||||
CharSequence cs = clip.getItemAt(0).getText();
|
||||
if (cs != null)
|
||||
data = cs.toString();
|
||||
}
|
||||
if (mListener != null) {
|
||||
mListener.onClipboardChanged(data);
|
||||
|
Loading…
Reference in New Issue
Block a user