本文整理汇总了Java中com.squareup.otto.Produce类的典型用法代码示例。如果您正苦于以下问题:Java Produce类的具体用法?Java Produce怎么用?Java Produce使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Produce类属于com.squareup.otto包,在下文中一共展示了Produce类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: produceEvent
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public Pair<MediaMetadataCompat, PlaybackStateCompat> produceEvent() {
final MediaMetadataCompat metadata;
if (null == mController.getMetadata()) {
metadata = (new MediaMetadataCompat.Builder()).build();
} else {
// If the notification didn't provide an icon, add one!
MediaMetadataCompat metadata1 = mController.getMetadata();
String packageName = metadata1.getString(RemoteControlCompat.METADATA_KEY_PACKAGE);
if (!metadata1.containsKey(MediaMetadataCompat.METADATA_KEY_DISPLAY_ICON) &&
mLargeIconMap.containsKey(packageName)) {
MediaMetadataCompat.Builder builder = new MediaMetadataCompat.Builder(metadata1);
builder.putBitmap(MediaMetadataCompat.METADATA_KEY_DISPLAY_ICON, mLargeIconMap.get(packageName));
metadata1 = builder.build();
}
metadata = metadata1;
}
return Pair.create(metadata, mController.getPlaybackState());
}
示例2: produceAnswer
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public GetInfoDoneEvent produceAnswer() {
if (mLastTicker != null)
return new GetInfoDoneEvent(true, null, mLastTicker);
else
return new GetInfoDoneEvent(false, null, null);
}
示例3: produceHeartbeatEvent
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public HeartbeatEvent produceHeartbeatEvent()
{
if(lastEvent instanceof HeartbeatEvent)
return (HeartbeatEvent) lastEvent;
return null;
}
示例4: produceErrorEvent
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ErrorEvent produceErrorEvent()
{
if(lastEvent instanceof ErrorEvent)
return (ErrorEvent) lastEvent;
return null;
}
示例5: produceLogoutEvent
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public LogoutEvent produceLogoutEvent()
{
if(lastEvent instanceof LogoutEvent)
return (LogoutEvent) lastEvent;
return null;
}
示例6: produceTopApp
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public TopApp produceTopApp() {
TopApp topApp = new TopApp();
topApp.mCurrentActivityClass = mCurrentActivityClass;
topApp.mCurrentPackage = mCurrentActivityPackage;
return topApp;
}
示例7: producePlaybackEvent
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public Metadata.PlaybackEvent producePlaybackEvent() {
Metadata.PlaybackEvent event = new Metadata.PlaybackEvent();
event.mMetadata = metadata;
event.mPlaybackInfo = playbackInfo;
event.mMetadata.hasRemote(true);
return event;
}
示例8: produceInitialCommunicationStatus
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public OnCommunicationStatusEvent produceInitialCommunicationStatus(){
Ln.v("Sending comm status");
if (isNetworkAvailable()){
return new OnCommunicationStatusEvent(OnCommunicationStatusEvent.Status.IDLE);
}else{
return new OnCommunicationStatusEvent(OnCommunicationStatusEvent.Status.NOT_AVAILABLE);
}
}
示例9: retrieveActiveCategory
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public CategoryChangeEvent retrieveActiveCategory() {
CategoryChangeEvent event;
if (activeCategory != null) {
event = new CategoryChangeEvent(activeCategory);
} else {
event = new CategoryChangeEvent(Category.all(getActivity()));
}
return event;
}
示例10: provideActiveBeacon
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ActiveBeacon provideActiveBeacon(){
if(mActiveBeacon != null)
return new ActiveBeacon(mActiveBeacon);
return null;
}
示例11: produceCurrentColor
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ColorUpdateEvent produceCurrentColor() {
return new ColorUpdateEvent(mCurrentColor);
}
示例12: produceCurrentConnections
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public BleDevicesChangedEvent produceCurrentConnections() {
return new BleDevicesChangedEvent(mConnectedDevices);
}
示例13: lastLogin
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public LoginEvent lastLogin()
{
return new LoginEvent(currentAccount);
}
示例14: produceServerEvent
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ServerEvent produceServerEvent(Users Users) {
return new ServerEvent(Users);
}
示例15: produceEnrollmentServerEvent
import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ServerEvent produceEnrollmentServerEvent(Enrollment Enrollment) {
return new ServerEvent(Enrollment);
}