Skip to content

Instantly share code, notes, and snippets.

/**
* $RCSfile$
* $Revision$
* $Date$
* <p/>
* Copyright 2003-2007 Jive Software.
* <p/>
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
package tw.com.fet.ecs.image.watermark;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.support.annotation.NonNull;
/**
package tw.com.fet.ecs.image.watermark;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
@protoss1010
protoss1010 / FileTransferManager.java
Created July 15, 2016 12:25
請看doShrinkAndWaterMark這個方法
package tw.com.fet.ecs.manager;
import android.annotation.TargetApi;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
package tw.com.fet.ecs.xmpp.level1.filter;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
public class EmmaDisplayedPacketFilter implements PacketFilter {
@Override
public boolean accept(Packet packet) {
if (!(packet instanceof Message)) {
package tw.com.fet.ecs.xmpp.level1.listener;
import com.fetnet.libfetnet.Log;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import tw.com.fet.ecs.xmpp.history.ChatHistory;
@protoss1010
protoss1010 / BaseXmppMessageHandler.java
Last active July 15, 2016 03:26
setHistoryMessageRead
package tw.com.fet.ecs.xmpp.level1.thread.readinputstream.factory;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import com.fetnet.libfetnet.Log;
import com.hiiir.toolkit.debug.HrLog;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.packet.DelayInformation;
/**
* $RCSfile$ $Revision$ $Date$
* <p/>
* Copyright 2003-2007 Jive Software.
* <p/>
* All rights reserved. Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
@protoss1010
protoss1010 / Message.java
Created July 15, 2016 03:23
EmmaDisplay
/**
* $RCSfile$
* $Revision$
* $Date$
* <p/>
* Copyright 2003-2007 Jive Software.
* <p/>
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
public void login(final String mac, final String devicesOs, final String appVersion, String userAcct, String userPwd, String memType) {
getSubscription().add(ApiClient.getInstance().personLogin(mac, devicesOs, appVersion, userAcct, userPwd, memType)
.doOnSubscribe(new Action0() {
@Override
public void call() {
getView().showLoading();
}
})
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread()) // (a)