Loading core/java/com/android/internal/widget/MessagingLayout.java +63 −10 Original line number Diff line number Diff line Loading @@ -121,22 +121,38 @@ public class MessagingLayout extends FrameLayout setMessagingClippingDisabled(false); } @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setAvatarReplacementAsync") public void setAvatarReplacement(Icon icon) { mAvatarReplacement = icon; } @RemotableViewMethod /** * @hide */ public Runnable setAvatarReplacementAsync(Icon icon) { mAvatarReplacement = icon; return () -> {}; } @RemotableViewMethod(asyncImpl = "setNameReplacementAsync") public void setNameReplacement(CharSequence nameReplacement) { mNameReplacement = nameReplacement; } /** * @hide */ public Runnable setNameReplacementAsync(CharSequence nameReplacement) { mNameReplacement = nameReplacement; return () -> {}; } /** * Set this layout to show the collapsed representation. * * @param isCollapsed is it collapsed */ @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; } Loading @@ -145,7 +161,6 @@ public class MessagingLayout extends FrameLayout * setDataAsync needs to do different stuff for the collapsed vs expanded view, so store the * collapsed state early. */ @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public Runnable setIsCollapsedAsync(boolean isCollapsed) { mIsCollapsed = isCollapsed; return () -> {}; Loading @@ -161,11 +176,19 @@ public class MessagingLayout extends FrameLayout * * @param conversationTitle the conversation title */ @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setConversationTitleAsync") public void setConversationTitle(CharSequence conversationTitle) { mConversationTitle = conversationTitle; } /** * @hide */ public Runnable setConversationTitleAsync(CharSequence conversationTitle) { mConversationTitle = conversationTitle; return ()->{}; } /** * Set Messaging data * @param extras Bundle contains messaging data Loading Loading @@ -417,22 +440,44 @@ public class MessagingLayout extends FrameLayout return mPeopleHelper.createAvatarSymbol(senderName, symbol, layoutColor); } @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setLayoutColorAsync") public void setLayoutColor(int color) { mLayoutColor = color; } @RemotableViewMethod /** * @hide */ public Runnable setLayoutColorAsync(int color) { mLayoutColor = color; return () -> {}; } @RemotableViewMethod(asyncImpl = "setIsOneToOneAsync") public void setIsOneToOne(boolean oneToOne) { mIsOneToOne = oneToOne; } @RemotableViewMethod /** * @hide */ public Runnable setIsOneToOneAsync(boolean oneToOne) { mIsOneToOne = oneToOne; return () -> {}; } @RemotableViewMethod(asyncImpl = "setSenderTextColorAsync") public void setSenderTextColor(int color) { mSenderTextColor = color; } /** * @hide */ public Runnable setSenderTextColorAsync(int color) { mSenderTextColor = color; return () -> {}; } /** * @param color the color of the notification background */ Loading @@ -441,11 +486,19 @@ public class MessagingLayout extends FrameLayout // Nothing to do with this } @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setMessageTextColorAsync") public void setMessageTextColor(int color) { mMessageTextColor = color; } /** * @hide */ public Runnable setMessageTextColorAsync(int color) { mMessageTextColor = color; return () -> {}; } public void setUser(Person user) { mUser = user; if (mUser.getIcon() == null) { Loading Loading
core/java/com/android/internal/widget/MessagingLayout.java +63 −10 Original line number Diff line number Diff line Loading @@ -121,22 +121,38 @@ public class MessagingLayout extends FrameLayout setMessagingClippingDisabled(false); } @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setAvatarReplacementAsync") public void setAvatarReplacement(Icon icon) { mAvatarReplacement = icon; } @RemotableViewMethod /** * @hide */ public Runnable setAvatarReplacementAsync(Icon icon) { mAvatarReplacement = icon; return () -> {}; } @RemotableViewMethod(asyncImpl = "setNameReplacementAsync") public void setNameReplacement(CharSequence nameReplacement) { mNameReplacement = nameReplacement; } /** * @hide */ public Runnable setNameReplacementAsync(CharSequence nameReplacement) { mNameReplacement = nameReplacement; return () -> {}; } /** * Set this layout to show the collapsed representation. * * @param isCollapsed is it collapsed */ @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; } Loading @@ -145,7 +161,6 @@ public class MessagingLayout extends FrameLayout * setDataAsync needs to do different stuff for the collapsed vs expanded view, so store the * collapsed state early. */ @RemotableViewMethod(asyncImpl = "setIsCollapsedAsync") public Runnable setIsCollapsedAsync(boolean isCollapsed) { mIsCollapsed = isCollapsed; return () -> {}; Loading @@ -161,11 +176,19 @@ public class MessagingLayout extends FrameLayout * * @param conversationTitle the conversation title */ @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setConversationTitleAsync") public void setConversationTitle(CharSequence conversationTitle) { mConversationTitle = conversationTitle; } /** * @hide */ public Runnable setConversationTitleAsync(CharSequence conversationTitle) { mConversationTitle = conversationTitle; return ()->{}; } /** * Set Messaging data * @param extras Bundle contains messaging data Loading Loading @@ -417,22 +440,44 @@ public class MessagingLayout extends FrameLayout return mPeopleHelper.createAvatarSymbol(senderName, symbol, layoutColor); } @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setLayoutColorAsync") public void setLayoutColor(int color) { mLayoutColor = color; } @RemotableViewMethod /** * @hide */ public Runnable setLayoutColorAsync(int color) { mLayoutColor = color; return () -> {}; } @RemotableViewMethod(asyncImpl = "setIsOneToOneAsync") public void setIsOneToOne(boolean oneToOne) { mIsOneToOne = oneToOne; } @RemotableViewMethod /** * @hide */ public Runnable setIsOneToOneAsync(boolean oneToOne) { mIsOneToOne = oneToOne; return () -> {}; } @RemotableViewMethod(asyncImpl = "setSenderTextColorAsync") public void setSenderTextColor(int color) { mSenderTextColor = color; } /** * @hide */ public Runnable setSenderTextColorAsync(int color) { mSenderTextColor = color; return () -> {}; } /** * @param color the color of the notification background */ Loading @@ -441,11 +486,19 @@ public class MessagingLayout extends FrameLayout // Nothing to do with this } @RemotableViewMethod @RemotableViewMethod(asyncImpl = "setMessageTextColorAsync") public void setMessageTextColor(int color) { mMessageTextColor = color; } /** * @hide */ public Runnable setMessageTextColorAsync(int color) { mMessageTextColor = color; return () -> {}; } public void setUser(Person user) { mUser = user; if (mUser.getIcon() == null) { Loading