Merge branch 'master' into new_api
This commit is contained in:
commit
1336e516e2
|
@ -21,204 +21,202 @@ package org.mariotaku.twidere.constant;
|
|||
|
||||
public interface IntentConstants {
|
||||
|
||||
public static final String INTENT_PACKAGE_PREFIX = "org.mariotaku.twidere.";
|
||||
String INTENT_PACKAGE_PREFIX = "org.mariotaku.twidere.";
|
||||
|
||||
public static final String INTENT_ACTION_HOME = INTENT_PACKAGE_PREFIX + "HOME";
|
||||
public static final String INTENT_ACTION_COMPOSE = INTENT_PACKAGE_PREFIX + "COMPOSE";
|
||||
public static final String INTENT_ACTION_QUICK_SEARCH = INTENT_PACKAGE_PREFIX + "QUICK_SEARCH";
|
||||
public static final String INTENT_ACTION_REPLY = INTENT_PACKAGE_PREFIX + "REPLY";
|
||||
public static final String INTENT_ACTION_QUOTE = INTENT_PACKAGE_PREFIX + "QUOTE";
|
||||
public static final String INTENT_ACTION_EDIT_DRAFT = INTENT_PACKAGE_PREFIX + "EDIT_DRAFT";
|
||||
public static final String INTENT_ACTION_MENTION = INTENT_PACKAGE_PREFIX + "MENTION";
|
||||
public static final String INTENT_ACTION_REPLY_MULTIPLE = INTENT_PACKAGE_PREFIX + "REPLY_MULTIPLE";
|
||||
public static final String INTENT_ACTION_SETTINGS = INTENT_PACKAGE_PREFIX + "SETTINGS";
|
||||
public static final String INTENT_ACTION_SELECT_ACCOUNT = INTENT_PACKAGE_PREFIX + "SELECT_ACCOUNT";
|
||||
public static final String INTENT_ACTION_VIEW_MEDIA = INTENT_PACKAGE_PREFIX + "VIEW_MEDIA";
|
||||
public static final String INTENT_ACTION_TWITTER_LOGIN = INTENT_PACKAGE_PREFIX + "TWITTER_LOGIN";
|
||||
public static final String INTENT_ACTION_PICK_FILE = INTENT_PACKAGE_PREFIX + "PICK_FILE";
|
||||
public static final String INTENT_ACTION_PICK_DIRECTORY = INTENT_PACKAGE_PREFIX + "PICK_DIRECTORY";
|
||||
public static final String INTENT_ACTION_VIEW_WEBPAGE = INTENT_PACKAGE_PREFIX + "VIEW_WEBPAGE";
|
||||
public static final String INTENT_ACTION_EXTENSIONS = INTENT_PACKAGE_PREFIX + "EXTENSIONS";
|
||||
public static final String INTENT_ACTION_CUSTOM_TABS = INTENT_PACKAGE_PREFIX + "CUSTOM_TABS";
|
||||
public static final String INTENT_ACTION_ADD_TAB = INTENT_PACKAGE_PREFIX + "ADD_TAB";
|
||||
public static final String INTENT_ACTION_EDIT_TAB = INTENT_PACKAGE_PREFIX + "EDIT_TAB";
|
||||
public static final String INTENT_ACTION_SERVICE_COMMAND = INTENT_PACKAGE_PREFIX + "SERVICE_COMMAND";
|
||||
public static final String INTENT_ACTION_REQUEST_PERMISSIONS = INTENT_PACKAGE_PREFIX + "REQUEST_PERMISSIONS";
|
||||
public static final String INTENT_ACTION_SELECT_USER_LIST = INTENT_PACKAGE_PREFIX + "SELECT_USER_LIST";
|
||||
public static final String INTENT_ACTION_SELECT_USER = INTENT_PACKAGE_PREFIX + "SELECT_USER";
|
||||
public static final String INTENT_ACTION_COMPOSE_TAKE_PHOTO = INTENT_PACKAGE_PREFIX + "COMPOSE_TAKE_PHOTO";
|
||||
public static final String INTENT_ACTION_COMPOSE_PICK_IMAGE = INTENT_PACKAGE_PREFIX + "COMPOSE_PICK_IMAGE";
|
||||
public static final String INTENT_ACTION_TAKE_PHOTO = INTENT_PACKAGE_PREFIX + "TAKE_PHOTO";
|
||||
public static final String INTENT_ACTION_PICK_IMAGE = INTENT_PACKAGE_PREFIX + "PICK_IMAGE";
|
||||
public static final String INTENT_ACTION_HIDDEN_SETTINGS_ENTRY = INTENT_PACKAGE_PREFIX + "HIDDEN_SETTINGS_ENTRY";
|
||||
String INTENT_ACTION_HOME = INTENT_PACKAGE_PREFIX + "HOME";
|
||||
String INTENT_ACTION_COMPOSE = INTENT_PACKAGE_PREFIX + "COMPOSE";
|
||||
String INTENT_ACTION_QUICK_SEARCH = INTENT_PACKAGE_PREFIX + "QUICK_SEARCH";
|
||||
String INTENT_ACTION_REPLY = INTENT_PACKAGE_PREFIX + "REPLY";
|
||||
String INTENT_ACTION_QUOTE = INTENT_PACKAGE_PREFIX + "QUOTE";
|
||||
String INTENT_ACTION_EDIT_DRAFT = INTENT_PACKAGE_PREFIX + "EDIT_DRAFT";
|
||||
String INTENT_ACTION_MENTION = INTENT_PACKAGE_PREFIX + "MENTION";
|
||||
String INTENT_ACTION_REPLY_MULTIPLE = INTENT_PACKAGE_PREFIX + "REPLY_MULTIPLE";
|
||||
String INTENT_ACTION_SETTINGS = INTENT_PACKAGE_PREFIX + "SETTINGS";
|
||||
String INTENT_ACTION_SELECT_ACCOUNT = INTENT_PACKAGE_PREFIX + "SELECT_ACCOUNT";
|
||||
String INTENT_ACTION_VIEW_MEDIA = INTENT_PACKAGE_PREFIX + "VIEW_MEDIA";
|
||||
String INTENT_ACTION_TWITTER_LOGIN = INTENT_PACKAGE_PREFIX + "TWITTER_LOGIN";
|
||||
String INTENT_ACTION_PICK_FILE = INTENT_PACKAGE_PREFIX + "PICK_FILE";
|
||||
String INTENT_ACTION_PICK_DIRECTORY = INTENT_PACKAGE_PREFIX + "PICK_DIRECTORY";
|
||||
String INTENT_ACTION_VIEW_WEBPAGE = INTENT_PACKAGE_PREFIX + "VIEW_WEBPAGE";
|
||||
String INTENT_ACTION_EXTENSIONS = INTENT_PACKAGE_PREFIX + "EXTENSIONS";
|
||||
String INTENT_ACTION_CUSTOM_TABS = INTENT_PACKAGE_PREFIX + "CUSTOM_TABS";
|
||||
String INTENT_ACTION_ADD_TAB = INTENT_PACKAGE_PREFIX + "ADD_TAB";
|
||||
String INTENT_ACTION_EDIT_TAB = INTENT_PACKAGE_PREFIX + "EDIT_TAB";
|
||||
String INTENT_ACTION_SERVICE_COMMAND = INTENT_PACKAGE_PREFIX + "SERVICE_COMMAND";
|
||||
String INTENT_ACTION_REQUEST_PERMISSIONS = INTENT_PACKAGE_PREFIX + "REQUEST_PERMISSIONS";
|
||||
String INTENT_ACTION_SELECT_USER_LIST = INTENT_PACKAGE_PREFIX + "SELECT_USER_LIST";
|
||||
String INTENT_ACTION_SELECT_USER = INTENT_PACKAGE_PREFIX + "SELECT_USER";
|
||||
String INTENT_ACTION_COMPOSE_TAKE_PHOTO = INTENT_PACKAGE_PREFIX + "COMPOSE_TAKE_PHOTO";
|
||||
String INTENT_ACTION_COMPOSE_PICK_IMAGE = INTENT_PACKAGE_PREFIX + "COMPOSE_PICK_IMAGE";
|
||||
String INTENT_ACTION_HIDDEN_SETTINGS_ENTRY = INTENT_PACKAGE_PREFIX + "HIDDEN_SETTINGS_ENTRY";
|
||||
|
||||
public static final String INTENT_ACTION_EXTENSION_EDIT_IMAGE = INTENT_PACKAGE_PREFIX + "EXTENSION_EDIT_IMAGE";
|
||||
public static final String INTENT_ACTION_EXTENSION_UPLOAD = INTENT_PACKAGE_PREFIX + "EXTENSION_UPLOAD";
|
||||
public static final String INTENT_ACTION_EXTENSION_OPEN_STATUS = INTENT_PACKAGE_PREFIX + "EXTENSION_OPEN_STATUS";
|
||||
public static final String INTENT_ACTION_EXTENSION_OPEN_USER = INTENT_PACKAGE_PREFIX + "EXTENSION_OPEN_USER";
|
||||
public static final String INTENT_ACTION_EXTENSION_OPEN_USER_LIST = INTENT_PACKAGE_PREFIX
|
||||
String INTENT_ACTION_EXTENSION_EDIT_IMAGE = INTENT_PACKAGE_PREFIX + "EXTENSION_EDIT_IMAGE";
|
||||
String INTENT_ACTION_EXTENSION_UPLOAD = INTENT_PACKAGE_PREFIX + "EXTENSION_UPLOAD";
|
||||
String INTENT_ACTION_EXTENSION_OPEN_STATUS = INTENT_PACKAGE_PREFIX + "EXTENSION_OPEN_STATUS";
|
||||
String INTENT_ACTION_EXTENSION_OPEN_USER = INTENT_PACKAGE_PREFIX + "EXTENSION_OPEN_USER";
|
||||
String INTENT_ACTION_EXTENSION_OPEN_USER_LIST = INTENT_PACKAGE_PREFIX
|
||||
+ "EXTENSION_OPEN_USER_LIST";
|
||||
public static final String INTENT_ACTION_EXTENSION_COMPOSE = INTENT_PACKAGE_PREFIX + "EXTENSION_COMPOSE";
|
||||
public static final String INTENT_ACTION_EXTENSION_UPLOAD_MEDIA = INTENT_PACKAGE_PREFIX + "EXTENSION_UPLOAD_MEDIA";
|
||||
public static final String INTENT_ACTION_EXTENSION_SHORTEN_STATUS = INTENT_PACKAGE_PREFIX
|
||||
String INTENT_ACTION_EXTENSION_COMPOSE = INTENT_PACKAGE_PREFIX + "EXTENSION_COMPOSE";
|
||||
String INTENT_ACTION_EXTENSION_UPLOAD_MEDIA = INTENT_PACKAGE_PREFIX + "EXTENSION_UPLOAD_MEDIA";
|
||||
String INTENT_ACTION_EXTENSION_SHORTEN_STATUS = INTENT_PACKAGE_PREFIX
|
||||
+ "EXTENSION_SHORTEN_STATUS";
|
||||
public static final String INTENT_ACTION_EXTENSION_SYNC_TIMELINE = INTENT_PACKAGE_PREFIX
|
||||
String INTENT_ACTION_EXTENSION_SYNC_TIMELINE = INTENT_PACKAGE_PREFIX
|
||||
+ "EXTENSION_SYNC_TIMELINE";
|
||||
public static final String INTENT_ACTION_EXTENSION_SETTINGS = INTENT_PACKAGE_PREFIX + "EXTENSION_SETTINGS";
|
||||
String INTENT_ACTION_EXTENSION_SETTINGS = INTENT_PACKAGE_PREFIX + "EXTENSION_SETTINGS";
|
||||
|
||||
public static final String INTENT_ACTION_UPDATE_STATUS = INTENT_PACKAGE_PREFIX + "UPDATE_STATUS";
|
||||
public static final String INTENT_ACTION_SEND_DIRECT_MESSAGE = INTENT_PACKAGE_PREFIX + "SEND_DIRECT_MESSAGE";
|
||||
public static final String INTENT_ACTION_DISCARD_DRAFT = INTENT_PACKAGE_PREFIX + "DISCARD_DRAFT";
|
||||
public static final String INTENT_ACTION_PICK_ACTIVITY = "org.mariotaku.twidere.PICK_ACTIVITY";
|
||||
String INTENT_ACTION_UPDATE_STATUS = INTENT_PACKAGE_PREFIX + "UPDATE_STATUS";
|
||||
String INTENT_ACTION_SEND_DIRECT_MESSAGE = INTENT_PACKAGE_PREFIX + "SEND_DIRECT_MESSAGE";
|
||||
String INTENT_ACTION_DISCARD_DRAFT = INTENT_PACKAGE_PREFIX + "DISCARD_DRAFT";
|
||||
String INTENT_ACTION_PICK_ACTIVITY = "org.mariotaku.twidere.PICK_ACTIVITY";
|
||||
|
||||
public static final String INTENT_ACTION_PEBBLE_NOTIFICATION = "com.getpebble.action.SEND_NOTIFICATION";
|
||||
String INTENT_ACTION_PEBBLE_NOTIFICATION = "com.getpebble.action.SEND_NOTIFICATION";
|
||||
|
||||
public static final String BROADCAST_NOTIFICATION_DELETED = INTENT_PACKAGE_PREFIX + "NOTIFICATION_DELETED";
|
||||
public static final String BROADCAST_USER_LIST_DETAILS_UPDATED = INTENT_PACKAGE_PREFIX
|
||||
String BROADCAST_NOTIFICATION_DELETED = INTENT_PACKAGE_PREFIX + "NOTIFICATION_DELETED";
|
||||
String BROADCAST_USER_LIST_DETAILS_UPDATED = INTENT_PACKAGE_PREFIX
|
||||
+ "USER_LIST_DETAILS_UPDATED";
|
||||
public static final String BROADCAST_FRIENDSHIP_ACCEPTED = INTENT_PACKAGE_PREFIX + "FRIENDSHIP_ACCEPTED";
|
||||
public static final String BROADCAST_FRIENDSHIP_DENIED = INTENT_PACKAGE_PREFIX + "FRIENDSHIP_DENIED";
|
||||
String BROADCAST_FRIENDSHIP_ACCEPTED = INTENT_PACKAGE_PREFIX + "FRIENDSHIP_ACCEPTED";
|
||||
String BROADCAST_FRIENDSHIP_DENIED = INTENT_PACKAGE_PREFIX + "FRIENDSHIP_DENIED";
|
||||
|
||||
public static final String BROADCAST_USER_LIST_MEMBERS_DELETED = INTENT_PACKAGE_PREFIX + "USER_LIST_MEMBER_DELETED";
|
||||
public static final String BROADCAST_USER_LIST_MEMBERS_ADDED = INTENT_PACKAGE_PREFIX + "USER_LIST_MEMBER_ADDED";
|
||||
public static final String BROADCAST_USER_LIST_SUBSCRIBED = INTENT_PACKAGE_PREFIX + "USER_LIST_SUBSRCIBED";
|
||||
public static final String BROADCAST_USER_LIST_UNSUBSCRIBED = INTENT_PACKAGE_PREFIX + "USER_LIST_UNSUBSCRIBED";
|
||||
public static final String BROADCAST_USER_LIST_CREATED = INTENT_PACKAGE_PREFIX + "USER_LIST_CREATED";
|
||||
public static final String BROADCAST_USER_LIST_DELETED = INTENT_PACKAGE_PREFIX + "USER_LIST_DELETED";
|
||||
public static final String BROADCAST_FILTERS_UPDATED = INTENT_PACKAGE_PREFIX + "FILTERS_UPDATED";
|
||||
public static final String BROADCAST_REFRESH_HOME_TIMELINE = INTENT_PACKAGE_PREFIX + "REFRESH_HOME_TIMELINE";
|
||||
public static final String BROADCAST_REFRESH_MENTIONS = INTENT_PACKAGE_PREFIX + "REFRESH_MENTIONS";
|
||||
public static final String BROADCAST_REFRESH_DIRECT_MESSAGES = INTENT_PACKAGE_PREFIX + "REFRESH_DIRECT_MESSAGES";
|
||||
public static final String BROADCAST_REFRESH_TRENDS = INTENT_PACKAGE_PREFIX + "REFRESH_TRENDS";
|
||||
public static final String BROADCAST_RESCHEDULE_HOME_TIMELINE_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
String BROADCAST_USER_LIST_MEMBERS_DELETED = INTENT_PACKAGE_PREFIX + "USER_LIST_MEMBER_DELETED";
|
||||
String BROADCAST_USER_LIST_MEMBERS_ADDED = INTENT_PACKAGE_PREFIX + "USER_LIST_MEMBER_ADDED";
|
||||
String BROADCAST_USER_LIST_SUBSCRIBED = INTENT_PACKAGE_PREFIX + "USER_LIST_SUBSRCIBED";
|
||||
String BROADCAST_USER_LIST_UNSUBSCRIBED = INTENT_PACKAGE_PREFIX + "USER_LIST_UNSUBSCRIBED";
|
||||
String BROADCAST_USER_LIST_CREATED = INTENT_PACKAGE_PREFIX + "USER_LIST_CREATED";
|
||||
String BROADCAST_USER_LIST_DELETED = INTENT_PACKAGE_PREFIX + "USER_LIST_DELETED";
|
||||
String BROADCAST_FILTERS_UPDATED = INTENT_PACKAGE_PREFIX + "FILTERS_UPDATED";
|
||||
String BROADCAST_REFRESH_HOME_TIMELINE = INTENT_PACKAGE_PREFIX + "REFRESH_HOME_TIMELINE";
|
||||
String BROADCAST_REFRESH_MENTIONS = INTENT_PACKAGE_PREFIX + "REFRESH_MENTIONS";
|
||||
String BROADCAST_REFRESH_DIRECT_MESSAGES = INTENT_PACKAGE_PREFIX + "REFRESH_DIRECT_MESSAGES";
|
||||
String BROADCAST_REFRESH_TRENDS = INTENT_PACKAGE_PREFIX + "REFRESH_TRENDS";
|
||||
String BROADCAST_RESCHEDULE_HOME_TIMELINE_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
+ "RESCHEDULE_HOME_TIMELINE_REFRESHING";
|
||||
public static final String BROADCAST_RESCHEDULE_MENTIONS_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
String BROADCAST_RESCHEDULE_MENTIONS_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
+ "RESCHEDULE_MENTIONS_REFRESHING";
|
||||
public static final String BROADCAST_RESCHEDULE_DIRECT_MESSAGES_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
String BROADCAST_RESCHEDULE_DIRECT_MESSAGES_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
+ "RESCHEDULE_DIRECT_MESSAGES_REFRESHING";
|
||||
public static final String BROADCAST_RESCHEDULE_TRENDS_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
String BROADCAST_RESCHEDULE_TRENDS_REFRESHING = INTENT_PACKAGE_PREFIX
|
||||
+ "RESCHEDULE_TRENDS_REFRESHING";
|
||||
public static final String BROADCAST_MULTI_BLOCKSTATE_CHANGED = INTENT_PACKAGE_PREFIX + "MULTI_BLOCKSTATE_CHANGED";
|
||||
public static final String BROADCAST_MULTI_MUTESTATE_CHANGED = INTENT_PACKAGE_PREFIX + "MULTI_MUTESTATE_CHANGED";
|
||||
public static final String BROADCAST_HOME_ACTIVITY_ONCREATE = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONCREATE";
|
||||
public static final String BROADCAST_HOME_ACTIVITY_ONSTART = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONSTART";
|
||||
public static final String BROADCAST_HOME_ACTIVITY_ONRESUME = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONRESUME";
|
||||
public static final String BROADCAST_HOME_ACTIVITY_ONPAUSE = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONPAUSE";
|
||||
public static final String BROADCAST_HOME_ACTIVITY_ONSTOP = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONSTOP";
|
||||
public static final String BROADCAST_HOME_ACTIVITY_ONDESTROY = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONDESTROY";
|
||||
public static final String BROADCAST_DATABASE_READY = INTENT_PACKAGE_PREFIX + "DATABASE_READY";
|
||||
String BROADCAST_MULTI_BLOCKSTATE_CHANGED = INTENT_PACKAGE_PREFIX + "MULTI_BLOCKSTATE_CHANGED";
|
||||
String BROADCAST_MULTI_MUTESTATE_CHANGED = INTENT_PACKAGE_PREFIX + "MULTI_MUTESTATE_CHANGED";
|
||||
String BROADCAST_HOME_ACTIVITY_ONCREATE = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONCREATE";
|
||||
String BROADCAST_HOME_ACTIVITY_ONSTART = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONSTART";
|
||||
String BROADCAST_HOME_ACTIVITY_ONRESUME = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONRESUME";
|
||||
String BROADCAST_HOME_ACTIVITY_ONPAUSE = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONPAUSE";
|
||||
String BROADCAST_HOME_ACTIVITY_ONSTOP = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONSTOP";
|
||||
String BROADCAST_HOME_ACTIVITY_ONDESTROY = INTENT_PACKAGE_PREFIX + "HOME_ACTIVITY_ONDESTROY";
|
||||
String BROADCAST_DATABASE_READY = INTENT_PACKAGE_PREFIX + "DATABASE_READY";
|
||||
|
||||
public static final String EXTRA_LATITUDE = "latitude";
|
||||
public static final String EXTRA_LONGITUDE = "longitude";
|
||||
public static final String EXTRA_URI = "uri";
|
||||
public static final String EXTRA_URI_ORIG = "uri_orig";
|
||||
public static final String EXTRA_MENTIONS = "mentions";
|
||||
public static final String EXTRA_ACCOUNT_ID = "account_id";
|
||||
public static final String EXTRA_ACCOUNT_IDS = "account_ids";
|
||||
public static final String EXTRA_PAGE = "page";
|
||||
public static final String EXTRA_DATA = "data";
|
||||
public static final String EXTRA_QUERY = "query";
|
||||
public static final String EXTRA_QUERY_TYPE = "query_type";
|
||||
public static final String EXTRA_USER_ID = "user_id";
|
||||
public static final String EXTRA_USER_IDS = "user_ids";
|
||||
public static final String EXTRA_LIST_ID = "list_id";
|
||||
public static final String EXTRA_MAX_ID = "max_id";
|
||||
public static final String EXTRA_MAX_IDS = "max_ids";
|
||||
public static final String EXTRA_SINCE_ID = "since_id";
|
||||
public static final String EXTRA_SINCE_IDS = "since_ids";
|
||||
public static final String EXTRA_STATUS_ID = "status_id";
|
||||
public static final String EXTRA_SCREEN_NAME = "screen_name";
|
||||
public static final String EXTRA_SCREEN_NAMES = "screen_names";
|
||||
public static final String EXTRA_LIST_NAME = "list_name";
|
||||
public static final String EXTRA_DESCRIPTION = "description";
|
||||
public static final String EXTRA_IN_REPLY_TO_ID = "in_reply_to_id";
|
||||
public static final String EXTRA_IN_REPLY_TO_NAME = "in_reply_to_name";
|
||||
public static final String EXTRA_IN_REPLY_TO_SCREEN_NAME = "in_reply_to_screen_name";
|
||||
public static final String EXTRA_TEXT = "text";
|
||||
public static final String EXTRA_TITLE = "title";
|
||||
public static final String EXTRA_TYPE = "type";
|
||||
String EXTRA_LATITUDE = "latitude";
|
||||
String EXTRA_LONGITUDE = "longitude";
|
||||
String EXTRA_URI = "uri";
|
||||
String EXTRA_URI_ORIG = "uri_orig";
|
||||
String EXTRA_MENTIONS = "mentions";
|
||||
String EXTRA_ACCOUNT_ID = "account_id";
|
||||
String EXTRA_ACCOUNT_IDS = "account_ids";
|
||||
String EXTRA_PAGE = "page";
|
||||
String EXTRA_DATA = "data";
|
||||
String EXTRA_QUERY = "query";
|
||||
String EXTRA_QUERY_TYPE = "query_type";
|
||||
String EXTRA_USER_ID = "user_id";
|
||||
String EXTRA_USER_IDS = "user_ids";
|
||||
String EXTRA_LIST_ID = "list_id";
|
||||
String EXTRA_MAX_ID = "max_id";
|
||||
String EXTRA_MAX_IDS = "max_ids";
|
||||
String EXTRA_SINCE_ID = "since_id";
|
||||
String EXTRA_SINCE_IDS = "since_ids";
|
||||
String EXTRA_STATUS_ID = "status_id";
|
||||
String EXTRA_SCREEN_NAME = "screen_name";
|
||||
String EXTRA_SCREEN_NAMES = "screen_names";
|
||||
String EXTRA_LIST_NAME = "list_name";
|
||||
String EXTRA_DESCRIPTION = "description";
|
||||
String EXTRA_IN_REPLY_TO_ID = "in_reply_to_id";
|
||||
String EXTRA_IN_REPLY_TO_NAME = "in_reply_to_name";
|
||||
String EXTRA_IN_REPLY_TO_SCREEN_NAME = "in_reply_to_screen_name";
|
||||
String EXTRA_TEXT = "text";
|
||||
String EXTRA_TITLE = "title";
|
||||
String EXTRA_TYPE = "type";
|
||||
// public static final String EXTRA_SUCCEED = "succeed";
|
||||
public static final String EXTRA_IDS = "ids";
|
||||
public static final String EXTRA_REFRESH_IDS = "refresh_ids";
|
||||
public static final String EXTRA_IS_SHARE = "is_share";
|
||||
public static final String EXTRA_STATUS = "status";
|
||||
public static final String EXTRA_MESSAGE = "message";
|
||||
public static final String EXTRA_STATUS_JSON = "status_json";
|
||||
public static final String EXTRA_STATUSES = "statuses";
|
||||
public static final String EXTRA_DRAFT = "draft";
|
||||
public static final String EXTRA_FAVORITED = "favorited";
|
||||
public static final String EXTRA_RETWEETED = "retweeted";
|
||||
public static final String EXTRA_FILENAME = "filename";
|
||||
public static final String EXTRA_FILE_SOURCE = "file_source";
|
||||
public static final String EXTRA_FILE_EXTENSIONS = "file_extensions";
|
||||
public static final String EXTRA_ITEMS_INSERTED = "items_inserted";
|
||||
public static final String EXTRA_INITIAL_TAB = "initial_tab";
|
||||
public static final String EXTRA_NOTIFICATION_ID = "notification_id";
|
||||
public static final String EXTRA_NOTIFICATION_ACCOUNT = "notification_account";
|
||||
public static final String EXTRA_FROM_NOTIFICATION = "from_notification";
|
||||
public static final String EXTRA_IS_PUBLIC = "is_public";
|
||||
public static final String EXTRA_USER = "user";
|
||||
public static final String EXTRA_USERS = "users";
|
||||
public static final String EXTRA_USER_LIST = "user_list";
|
||||
public static final String EXTRA_APPEND_TEXT = "append_text";
|
||||
public static final String EXTRA_NAME = "name";
|
||||
public static final String EXTRA_TEXT1 = "text1";
|
||||
public static final String EXTRA_TEXT2 = "text2";
|
||||
public static final String EXTRA_POSITION = "position";
|
||||
public static final String EXTRA_ARGUMENTS = "arguments";
|
||||
public static final String EXTRA_ICON = "icon";
|
||||
public static final String EXTRA_ID = "id";
|
||||
public static final String EXTRA_RESID = "resid";
|
||||
public static final String EXTRA_SETTINGS_INTENT_ACTION = "settings_intent_action";
|
||||
public static final String EXTRA_IMAGE_URI = "image_uri";
|
||||
public static final String EXTRA_ATTACHED_IMAGE_TYPE = "attached_image_type";
|
||||
public static final String EXTRA_ACTIVATED_ONLY = "activated_only";
|
||||
public static final String EXTRA_TAB_POSITION = "tab_position";
|
||||
public static final String EXTRA_HAS_RUNNING_TASK = "has_running_task";
|
||||
public static final String EXTRA_OAUTH_VERIFIER = "oauth_verifier";
|
||||
public static final String EXTRA_REQUEST_TOKEN = "request_token";
|
||||
public static final String EXTRA_REQUEST_TOKEN_SECRET = "request_token_secret";
|
||||
public static final String EXTRA_OMIT_INTENT_EXTRA = "omit_intent_extra";
|
||||
public static final String EXTRA_COMMAND = "command";
|
||||
public static final String EXTRA_WIDTH = "width";
|
||||
public static final String EXTRA_ALLOW_SELECT_NONE = "allow_select_none";
|
||||
public static final String EXTRA_SINGLE_SELECTION = "single_selection";
|
||||
public static final String EXTRA_OAUTH_ONLY = "oauth_only";
|
||||
public static final String EXTRA_PERMISSIONS = "permissions";
|
||||
public static final String EXTRA_LOCATION = "location";
|
||||
public static final String EXTRA_URL = "url";
|
||||
public static final String EXTRA_NEXT_CURSOR = "next_cursor";
|
||||
public static final String EXTRA_PREV_CURSOR = "prev_cursor";
|
||||
public static final String EXTRA_EXTRA_INTENT = "extra_intent";
|
||||
public static final String EXTRA_IS_MY_ACCOUNT = "is_my_account";
|
||||
public static final String EXTRA_TAB_TYPE = "tab_type";
|
||||
public static final String EXTRA_ACCOUNT = "account";
|
||||
public static final String EXTRA_ACTIVITY_SCREENSHOT_ID = "activity_screenshot_id";
|
||||
public static final String EXTRA_COLOR = "color";
|
||||
public static final String EXTRA_ALPHA_SLIDER = "alpha_slider";
|
||||
public static final String EXTRA_OPEN_ACCOUNTS_DRAWER = "open_accounts_drawer";
|
||||
public static final String EXTRA_RECIPIENT_ID = "recipient_id";
|
||||
public static final String EXTRA_OFFICIAL_KEY_ONLY = "official_key_only";
|
||||
public static final String EXTRA_SEARCH_ID = "search_id";
|
||||
public static final String EXTRA_CLEAR_BUTTON = "clear_button";
|
||||
public static final String EXTRA_PATH = "path";
|
||||
public static final String EXTRA_ACTION = "action";
|
||||
public static final String EXTRA_FLAGS = "flags";
|
||||
public static final String EXTRA_INTENT = "intent";
|
||||
public static final String EXTRA_BLACKLIST = "blacklist";
|
||||
public static final String EXTRA_MEDIA = "media";
|
||||
public static final String EXTRA_CURRENT_MEDIA = "current_media";
|
||||
public static final String EXTRA_EXTRAS = "extras";
|
||||
public static final String EXTRA_MY_FOLLOWING_ONLY = "my_following_only";
|
||||
public static final String EXTRA_CHANGED = "changed";
|
||||
public static final String EXTRA_NOTIFY_CHANGE = "notify_change";
|
||||
public static final String EXTRA_FROM_USER = "from_user";
|
||||
public static final String EXTRA_SHOW_MEDIA_PREVIEW = "show_media_preview";
|
||||
public static final String EXTRA_SHOW_EXTRA_TYPE = "show_extra_type";
|
||||
public static final String EXTRA_BITMAP = "bitmap";
|
||||
public static final String EXTRA_SOURCE = "source";
|
||||
public static final String EXTRA_DESTINATION = "destination";
|
||||
public static final String EXTRA_ACTIVITY_OPTIONS = "activity_options";
|
||||
public static final String EXTRA_MAKE_GAP = "make_gap";
|
||||
String EXTRA_IDS = "ids";
|
||||
String EXTRA_REFRESH_IDS = "refresh_ids";
|
||||
String EXTRA_IS_SHARE = "is_share";
|
||||
String EXTRA_STATUS = "status";
|
||||
String EXTRA_MESSAGE = "message";
|
||||
String EXTRA_STATUS_JSON = "status_json";
|
||||
String EXTRA_STATUSES = "statuses";
|
||||
String EXTRA_DRAFT = "draft";
|
||||
String EXTRA_FAVORITED = "favorited";
|
||||
String EXTRA_RETWEETED = "retweeted";
|
||||
String EXTRA_FILENAME = "filename";
|
||||
String EXTRA_FILE_SOURCE = "file_source";
|
||||
String EXTRA_FILE_EXTENSIONS = "file_extensions";
|
||||
String EXTRA_ITEMS_INSERTED = "items_inserted";
|
||||
String EXTRA_INITIAL_TAB = "initial_tab";
|
||||
String EXTRA_NOTIFICATION_ID = "notification_id";
|
||||
String EXTRA_NOTIFICATION_ACCOUNT = "notification_account";
|
||||
String EXTRA_FROM_NOTIFICATION = "from_notification";
|
||||
String EXTRA_IS_PUBLIC = "is_public";
|
||||
String EXTRA_USER = "user";
|
||||
String EXTRA_USERS = "users";
|
||||
String EXTRA_USER_LIST = "user_list";
|
||||
String EXTRA_APPEND_TEXT = "append_text";
|
||||
String EXTRA_NAME = "name";
|
||||
String EXTRA_TEXT1 = "text1";
|
||||
String EXTRA_TEXT2 = "text2";
|
||||
String EXTRA_POSITION = "position";
|
||||
String EXTRA_ARGUMENTS = "arguments";
|
||||
String EXTRA_ICON = "icon";
|
||||
String EXTRA_ID = "id";
|
||||
String EXTRA_RESID = "resid";
|
||||
String EXTRA_SETTINGS_INTENT_ACTION = "settings_intent_action";
|
||||
String EXTRA_IMAGE_URI = "image_uri";
|
||||
String EXTRA_ATTACHED_IMAGE_TYPE = "attached_image_type";
|
||||
String EXTRA_ACTIVATED_ONLY = "activated_only";
|
||||
String EXTRA_TAB_POSITION = "tab_position";
|
||||
String EXTRA_HAS_RUNNING_TASK = "has_running_task";
|
||||
String EXTRA_OAUTH_VERIFIER = "oauth_verifier";
|
||||
String EXTRA_REQUEST_TOKEN = "request_token";
|
||||
String EXTRA_REQUEST_TOKEN_SECRET = "request_token_secret";
|
||||
String EXTRA_OMIT_INTENT_EXTRA = "omit_intent_extra";
|
||||
String EXTRA_COMMAND = "command";
|
||||
String EXTRA_WIDTH = "width";
|
||||
String EXTRA_ALLOW_SELECT_NONE = "allow_select_none";
|
||||
String EXTRA_SINGLE_SELECTION = "single_selection";
|
||||
String EXTRA_OAUTH_ONLY = "oauth_only";
|
||||
String EXTRA_PERMISSIONS = "permissions";
|
||||
String EXTRA_LOCATION = "location";
|
||||
String EXTRA_URL = "url";
|
||||
String EXTRA_NEXT_CURSOR = "next_cursor";
|
||||
String EXTRA_PREV_CURSOR = "prev_cursor";
|
||||
String EXTRA_EXTRA_INTENT = "extra_intent";
|
||||
String EXTRA_IS_MY_ACCOUNT = "is_my_account";
|
||||
String EXTRA_TAB_TYPE = "tab_type";
|
||||
String EXTRA_ACCOUNT = "account";
|
||||
String EXTRA_ACTIVITY_SCREENSHOT_ID = "activity_screenshot_id";
|
||||
String EXTRA_COLOR = "color";
|
||||
String EXTRA_ALPHA_SLIDER = "alpha_slider";
|
||||
String EXTRA_OPEN_ACCOUNTS_DRAWER = "open_accounts_drawer";
|
||||
String EXTRA_RECIPIENT_ID = "recipient_id";
|
||||
String EXTRA_OFFICIAL_KEY_ONLY = "official_key_only";
|
||||
String EXTRA_SEARCH_ID = "search_id";
|
||||
String EXTRA_CLEAR_BUTTON = "clear_button";
|
||||
String EXTRA_PATH = "path";
|
||||
String EXTRA_ACTION = "action";
|
||||
String EXTRA_FLAGS = "flags";
|
||||
String EXTRA_INTENT = "intent";
|
||||
String EXTRA_BLACKLIST = "blacklist";
|
||||
String EXTRA_MEDIA = "media";
|
||||
String EXTRA_CURRENT_MEDIA = "current_media";
|
||||
String EXTRA_EXTRAS = "extras";
|
||||
String EXTRA_MY_FOLLOWING_ONLY = "my_following_only";
|
||||
String EXTRA_CHANGED = "changed";
|
||||
String EXTRA_NOTIFY_CHANGE = "notify_change";
|
||||
String EXTRA_FROM_USER = "from_user";
|
||||
String EXTRA_SHOW_MEDIA_PREVIEW = "show_media_preview";
|
||||
String EXTRA_SHOW_EXTRA_TYPE = "show_extra_type";
|
||||
String EXTRA_BITMAP = "bitmap";
|
||||
String EXTRA_SOURCE = "source";
|
||||
String EXTRA_DESTINATION = "destination";
|
||||
String EXTRA_ACTIVITY_OPTIONS = "activity_options";
|
||||
String EXTRA_MAKE_GAP = "make_gap";
|
||||
|
||||
}
|
||||
|
|
|
@ -61,8 +61,10 @@ import android.support.v7.widget.RecyclerView.ItemDecoration;
|
|||
import android.support.v7.widget.RecyclerView.State;
|
||||
import android.support.v7.widget.RecyclerView.ViewHolder;
|
||||
import android.text.Editable;
|
||||
import android.text.Spannable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.style.ImageSpan;
|
||||
import android.util.Log;
|
||||
import android.view.ActionMode;
|
||||
import android.view.ActionMode.Callback;
|
||||
|
@ -729,6 +731,15 @@ public class ComposeActivity extends ThemedFragmentActivity implements LocationL
|
|||
public void onTextChanged(final CharSequence s, final int start, final int before, final int count) {
|
||||
setMenu();
|
||||
updateTextCount();
|
||||
if (s instanceof Spannable && count == 1 && before == 0) {
|
||||
final ImageSpan[] imageSpans = ((Spannable) s).getSpans(start, start + count, ImageSpan.class);
|
||||
if (imageSpans.length == 1) {
|
||||
final Intent intent = new Intent(ComposeActivity.this, ImagePickerActivity.class);
|
||||
intent.setAction(ImagePickerActivity.INTENT_ACTION_GET_IMAGE);
|
||||
intent.setData(Uri.parse(imageSpans[0].getSource()));
|
||||
startActivityForResult(intent, REQUEST_PICK_IMAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1028,7 +1039,7 @@ public class ComposeActivity extends ThemedFragmentActivity implements LocationL
|
|||
|
||||
private boolean pickImage() {
|
||||
final Intent intent = new Intent(this, ImagePickerActivity.class);
|
||||
intent.setAction(INTENT_ACTION_PICK_IMAGE);
|
||||
intent.setAction(ImagePickerActivity.INTENT_ACTION_PICK_IMAGE);
|
||||
startActivityForResult(intent, REQUEST_PICK_IMAGE);
|
||||
return true;
|
||||
}
|
||||
|
@ -1151,7 +1162,7 @@ public class ComposeActivity extends ThemedFragmentActivity implements LocationL
|
|||
|
||||
private boolean takePhoto() {
|
||||
final Intent intent = new Intent(this, ImagePickerActivity.class);
|
||||
intent.setAction(INTENT_ACTION_TAKE_PHOTO);
|
||||
intent.setAction(ImagePickerActivity.INTENT_ACTION_TAKE_PHOTO);
|
||||
startActivityForResult(intent, REQUEST_TAKE_PHOTO);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
|
||||
import static android.os.Environment.getExternalStorageState;
|
||||
|
||||
|
@ -41,6 +42,10 @@ public class ImagePickerActivity extends ThemedFragmentActivity {
|
|||
public static final int REQUEST_PICK_IMAGE = 101;
|
||||
public static final int REQUEST_TAKE_PHOTO = 102;
|
||||
|
||||
public static final String INTENT_ACTION_TAKE_PHOTO = INTENT_PACKAGE_PREFIX + "TAKE_PHOTO";
|
||||
public static final String INTENT_ACTION_PICK_IMAGE = INTENT_PACKAGE_PREFIX + "PICK_IMAGE";
|
||||
public static final String INTENT_ACTION_GET_IMAGE = INTENT_PACKAGE_PREFIX + "GET_IMAGE";
|
||||
|
||||
private Uri mTempPhotoUri;
|
||||
private CopyImageTask mTask;
|
||||
private Runnable mImageSelectedRunnable;
|
||||
|
@ -104,6 +109,8 @@ public class ImagePickerActivity extends ThemedFragmentActivity {
|
|||
takePhoto();
|
||||
} else if (INTENT_ACTION_PICK_IMAGE.equals(action)) {
|
||||
pickImage();
|
||||
} else if (INTENT_ACTION_GET_IMAGE.equals(action)) {
|
||||
imageSelected(intent.getData());
|
||||
} else {
|
||||
new ImageSourceDialogFragment().show(getSupportFragmentManager(), "image_source");
|
||||
}
|
||||
|
@ -180,10 +187,15 @@ public class ImagePickerActivity extends ThemedFragmentActivity {
|
|||
OutputStream os = null;
|
||||
try {
|
||||
final File cacheDir = mActivity.getCacheDir();
|
||||
is = cr.openInputStream(mUri);
|
||||
final Uri uri = this.mUri;
|
||||
if (SCHEME_HTTP.equals(uri.getScheme()) || SCHEME_HTTPS.equals(uri.getScheme())) {
|
||||
is = new URL(uri.toString()).openStream();
|
||||
} else {
|
||||
is = cr.openInputStream(uri);
|
||||
}
|
||||
final BitmapFactory.Options opts = new BitmapFactory.Options();
|
||||
opts.inJustDecodeBounds = true;
|
||||
BitmapFactory.decodeStream(cr.openInputStream(mUri), null, opts);
|
||||
BitmapFactory.decodeStream(cr.openInputStream(uri), null, opts);
|
||||
final String mimeType = opts.outMimeType;
|
||||
final String suffix = mimeType != null ? "."
|
||||
+ MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType) : null;
|
||||
|
|
|
@ -130,19 +130,19 @@ public class UserProfileEditorFragment extends BaseSupportFragment implements On
|
|||
}
|
||||
case R.id.profile_image_camera: {
|
||||
final Intent intent = new Intent(getActivity(), ImagePickerActivity.class);
|
||||
intent.setAction(INTENT_ACTION_PICK_IMAGE);
|
||||
intent.setAction(ImagePickerActivity.INTENT_ACTION_PICK_IMAGE);
|
||||
startActivityForResult(intent, REQUEST_UPLOAD_PROFILE_IMAGE);
|
||||
break;
|
||||
}
|
||||
case R.id.profile_image_gallery: {
|
||||
final Intent intent = new Intent(getActivity(), ImagePickerActivity.class);
|
||||
intent.setAction(INTENT_ACTION_TAKE_PHOTO);
|
||||
intent.setAction(ImagePickerActivity.INTENT_ACTION_TAKE_PHOTO);
|
||||
startActivityForResult(intent, REQUEST_UPLOAD_PROFILE_IMAGE);
|
||||
break;
|
||||
}
|
||||
case R.id.profile_banner_gallery: {
|
||||
final Intent intent = new Intent(getActivity(), ImagePickerActivity.class);
|
||||
intent.setAction(INTENT_ACTION_PICK_IMAGE);
|
||||
intent.setAction(ImagePickerActivity.INTENT_ACTION_PICK_IMAGE);
|
||||
startActivityForResult(intent, REQUEST_UPLOAD_PROFILE_BANNER_IMAGE);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue