Merge "Fix phone UI."

This commit is contained in:
Makoto Onuki 2011-04-26 13:15:03 -07:00 committed by Android (Google) Code Review
commit 79b97da58c
3 changed files with 18 additions and 3 deletions

View File

@ -221,6 +221,8 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
/**
* Create a new instance with initialization parameters.
*
* This fragment should be created only with this method. (Arguments should always be set.)
*/
public static MailboxListFragment newInstance(long accountId, long parentMailboxId) {
final MailboxListFragment instance = new MailboxListFragment();
@ -275,7 +277,10 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
registerForContextMenu(mListView);
final Bundle args = getArguments();
openMailboxes(args.getLong(ARG_ACCOUNT_ID), args.getLong(ARG_PARENT_MAILBOX_ID));
// STOPSHIP remove the check. Right now it's needed for the obsolete phone activities.
if (args != null) {
openMailboxes(args.getLong(ARG_ACCOUNT_ID), args.getLong(ARG_PARENT_MAILBOX_ID));
}
}
public void setCallback(Callback callback) {

View File

@ -236,6 +236,8 @@ public class MessageListFragment extends ListFragment
/**
* Create a new instance with initialization parameters.
*
* This fragment should be created only with this method. (Arguments should always be set.)
*/
public static MessageListFragment newInstance(long mailboxId) {
final MessageListFragment instance = new MessageListFragment();
@ -293,7 +295,10 @@ public class MessageListFragment extends ListFragment
}
final Bundle args = getArguments();
openMailbox(args.getLong(ARG_MAILBOX_ID));
// STOPSHIP remove the check. Right now it's needed for the obsolete phone activities.
if (args != null) {
openMailbox(args.getLong(ARG_MAILBOX_ID));
}
}
@Override

View File

@ -141,6 +141,8 @@ public class MessageViewFragment extends MessageViewFragmentBase
/**
* Create a new instance with initialization parameters.
*
* This fragment should be created only with this method. (Arguments should always be set.)
*/
public static MessageViewFragment newInstance(long messageId) {
final MessageViewFragment instance = new MessageViewFragment();
@ -194,7 +196,10 @@ public class MessageViewFragment extends MessageViewFragmentBase
super.onActivityCreated(savedInstanceState);
final Bundle args = getArguments();
openMessage(args.getLong(ARG_MESSAGE_ID));
// STOPSHIP remove the check. Right now it's needed for the obsolete phone activities.
if (args != null) {
openMessage(args.getLong(ARG_MESSAGE_ID));
}
}
@Override