当前位置: 首页>>代码示例>>Java>>正文


Java Produce类代码示例

本文整理汇总了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());
}
 
开发者ID:Tombarr,项目名称:Noyze,代码行数:20,代码来源:MediaControllerService.java

示例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);
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:8,代码来源:BitCoinService.java

示例3: produceHeartbeatEvent

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public HeartbeatEvent produceHeartbeatEvent()
{
    if(lastEvent instanceof HeartbeatEvent)
        return (HeartbeatEvent) lastEvent;
    return null;
}
 
开发者ID:IdleLands,项目名称:AndroidFE,代码行数:8,代码来源:HeartbeatService.java

示例4: produceErrorEvent

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ErrorEvent produceErrorEvent()
{
    if(lastEvent instanceof ErrorEvent)
        return (ErrorEvent) lastEvent;
    return null;
}
 
开发者ID:IdleLands,项目名称:AndroidFE,代码行数:8,代码来源:HeartbeatService.java

示例5: produceLogoutEvent

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public LogoutEvent produceLogoutEvent()
{
    if(lastEvent instanceof LogoutEvent)
        return (LogoutEvent) lastEvent;
    return null;
}
 
开发者ID:IdleLands,项目名称:AndroidFE,代码行数:8,代码来源:HeartbeatService.java

示例6: produceTopApp

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public TopApp produceTopApp() {
    TopApp topApp = new TopApp();
    topApp.mCurrentActivityClass = mCurrentActivityClass;
    topApp.mCurrentPackage = mCurrentActivityPackage;
    return topApp;
}
 
开发者ID:Tombarr,项目名称:Noyze,代码行数:8,代码来源:VolumeAccessibilityService.java

示例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;
}
 
开发者ID:Tombarr,项目名称:Noyze,代码行数:9,代码来源:MediaProviderDelegate.java

示例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);
    }
}
 
开发者ID:johncarpenter,项目名称:MarketAndroid,代码行数:10,代码来源:AccountService.java

示例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;
}
 
开发者ID:dkunzler,项目名称:masterpassword,代码行数:11,代码来源:PasswordViewFragment.java

示例10: provideActiveBeacon

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ActiveBeacon provideActiveBeacon(){
    if(mActiveBeacon != null)
        return new ActiveBeacon(mActiveBeacon);

    return null;
}
 
开发者ID:hackathon-2014,项目名称:disciples-of-duarte-repo,代码行数:8,代码来源:BeaconService.java

示例11: produceCurrentColor

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ColorUpdateEvent produceCurrentColor() {
    return new ColorUpdateEvent(mCurrentColor);
}
 
开发者ID:alexamster,项目名称:ProjectPlutoAndroid,代码行数:5,代码来源:PlutoCommunicator.java

示例12: produceCurrentConnections

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public BleDevicesChangedEvent produceCurrentConnections() {
    return new BleDevicesChangedEvent(mConnectedDevices);
}
 
开发者ID:alexamster,项目名称:ProjectPlutoAndroid,代码行数:5,代码来源:BleConnector.java

示例13: lastLogin

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public LoginEvent lastLogin()
{
    return new LoginEvent(currentAccount);
}
 
开发者ID:xcjs,项目名称:fetlife-oss,代码行数:6,代码来源:FetLifeAccountManager.java

示例14: produceServerEvent

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ServerEvent produceServerEvent(Users Users) {
    return new ServerEvent(Users);
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:5,代码来源:Communicator.java

示例15: produceEnrollmentServerEvent

import com.squareup.otto.Produce; //导入依赖的package包/类
@Produce
public ServerEvent produceEnrollmentServerEvent(Enrollment Enrollment) {
    return new ServerEvent(Enrollment);
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:5,代码来源:Communicator.java


注:本文中的com.squareup.otto.Produce类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。