fixed open status link issue

fixed npe
This commit is contained in:
Mariotaku Lee 2015-04-20 01:03:37 +08:00
parent a11b20467a
commit 9659330c1e
3 changed files with 10 additions and 2 deletions

View File

@ -37,6 +37,7 @@ import android.preference.PreferenceScreen;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
@ -203,7 +204,10 @@ public class KeyboardShortcutsFragment extends BasePreferenceFragment {
return true; return true;
} }
final KeyboardShortcutSpec spec = KeyboardShortcutsHandler.getKeyboardShortcutSpec(mContextTag, keyCode, event); final KeyboardShortcutSpec spec = KeyboardShortcutsHandler.getKeyboardShortcutSpec(mContextTag, keyCode, event);
if (spec == null || !spec.isValid()) return false; if (spec == null || !spec.isValid()) {
Log.d(LOGTAG, String.format("Invalid key %s", spec));
return false;
}
mKeySpec = spec; mKeySpec = spec;
mKeysLabel.setText(spec.toKeyString()); mKeysLabel.setText(spec.toKeyString());
final String oldAction = mKeyboardShortcutHandler.findAction(spec); final String oldAction = mKeyboardShortcutHandler.findAction(spec);

View File

@ -411,7 +411,7 @@ public class AccountsDashboardFragment extends BaseSupportListFragment implement
} }
public long[] getActivatedAccountIds() { public long[] getActivatedAccountIds() {
if (mAccountOptionsAdapter == null) { if (mAccountActionProvider == null) {
return Utils.getActivatedAccountIds(getActivity()); return Utils.getActivatedAccountIds(getActivity());
} }
return mAccountActionProvider.getActivatedAccountIds(); return mAccountActionProvider.getActivatedAccountIds();

View File

@ -91,6 +91,7 @@ import org.mariotaku.twidere.model.ParcelableLocation;
import org.mariotaku.twidere.model.ParcelableMedia; import org.mariotaku.twidere.model.ParcelableMedia;
import org.mariotaku.twidere.model.ParcelableStatus; import org.mariotaku.twidere.model.ParcelableStatus;
import org.mariotaku.twidere.model.SingleResponse; import org.mariotaku.twidere.model.SingleResponse;
import org.mariotaku.twidere.text.method.StatusContentMovementMethod;
import org.mariotaku.twidere.util.AsyncTaskUtils; import org.mariotaku.twidere.util.AsyncTaskUtils;
import org.mariotaku.twidere.util.AsyncTwitterWrapper; import org.mariotaku.twidere.util.AsyncTwitterWrapper;
import org.mariotaku.twidere.util.ClipboardUtils; import org.mariotaku.twidere.util.ClipboardUtils;
@ -787,6 +788,9 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
quoteTextView.setTextIsSelectable(true); quoteTextView.setTextIsSelectable(true);
textView.setTextIsSelectable(true); textView.setTextIsSelectable(true);
quoteTextView.setMovementMethod(StatusContentMovementMethod.getInstance());
textView.setMovementMethod(StatusContentMovementMethod.getInstance());
} }
@Override @Override