Просмотр исходного кода

修复混淆导致无法正常打开app的问题

zengjiebin лет назад: 7
Родитель
Сommit
7ef6d98bfd

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/module/plugin/module/ClientPackage.java

@@ -1,4 +1,4 @@
-package com.sheep.gamegroup.module.plugin.module;
+package com.sheep.gamegroup.module.plugin.model;
 
 
 /**
 /**
  * Created by realicing on 2018/12/10.
  * Created by realicing on 2018/12/10.

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/module/plugin/module/Plugin.java

@@ -1,4 +1,4 @@
-package com.sheep.gamegroup.module.plugin.module;
+package com.sheep.gamegroup.module.plugin.model;
 
 
 /**
 /**
  * Created by realicing on 2018/12/6.
  * Created by realicing on 2018/12/6.

+ 2 - 3
app/src/main/java/com/sheep/gamegroup/module/plugin/util/PluginUtil.java

@@ -1,14 +1,13 @@
 package com.sheep.gamegroup.module.plugin.util;
 package com.sheep.gamegroup.module.plugin.util;
 
 
 import android.content.Context;
 import android.content.Context;
-import android.text.TextUtils;
 
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.didi.virtualapk.PluginManager;
 import com.didi.virtualapk.PluginManager;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.module.plugin.module.ClientPackage;
-import com.sheep.gamegroup.module.plugin.module.Plugin;
+import com.sheep.gamegroup.module.plugin.model.ClientPackage;
+import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.Md5Util;
 import com.sheep.gamegroup.util.Md5Util;

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -51,7 +51,7 @@ import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.find.activity.ActMediaChoose;
 import com.sheep.gamegroup.module.find.activity.ActMediaChoose;
 import com.sheep.gamegroup.module.login.ChangePasswordAct;
 import com.sheep.gamegroup.module.login.ChangePasswordAct;
 import com.sheep.gamegroup.module.login.LoginAct;
 import com.sheep.gamegroup.module.login.LoginAct;
-import com.sheep.gamegroup.module.plugin.module.Plugin;
+import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.util.PluginUtil;
 import com.sheep.gamegroup.module.plugin.util.PluginUtil;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
 import com.sheep.gamegroup.view.activity.ActApprenticeRedPacket;
 import com.sheep.gamegroup.view.activity.ActApprenticeRedPacket;

+ 1 - 6
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -31,8 +31,6 @@ import com.kfzs.cfyl.share_library.util.CallBackAPI;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.kfzs.duanduan.view.DialogStorageLow;
 import com.kfzs.duanduan.view.DialogStorageLow;
 import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.AbsObserver;
-import com.sheep.gamegroup.module.find.bean.ColorBalanceFilter;
-import com.sheep.gamegroup.module.find.util.IFilter;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.CreditCard;
 import com.sheep.gamegroup.model.entity.CreditCard;
 import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.DialogConfig;
@@ -41,10 +39,9 @@ import com.sheep.gamegroup.model.entity.LoginUser;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.Video;
 import com.sheep.gamegroup.model.entity.Video;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.module.plugin.module.Plugin;
+import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.util.PluginUtil;
 import com.sheep.gamegroup.module.plugin.util.PluginUtil;
 import com.sheep.gamegroup.usage.AppUsageManager;
 import com.sheep.gamegroup.usage.AppUsageManager;
-import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
 import com.sheep.gamegroup.view.activity.ActInstallApkList;
 import com.sheep.gamegroup.view.activity.ActInstallApkList;
 import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.activity.ActSheepApkList;
 import com.sheep.gamegroup.view.activity.ActSheepApkList;
@@ -86,9 +83,7 @@ import cn.jpush.android.api.JPushInterface;
 import io.reactivex.Observable;
 import io.reactivex.Observable;
 import io.reactivex.ObservableEmitter;
 import io.reactivex.ObservableEmitter;
 import io.reactivex.ObservableOnSubscribe;
 import io.reactivex.ObservableOnSubscribe;
-import io.reactivex.ObservableSource;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.functions.Function;
 import io.reactivex.schedulers.Schedulers;
 import io.reactivex.schedulers.Schedulers;
 import okhttp3.Call;
 import okhttp3.Call;
 import rx.functions.Action1;
 import rx.functions.Action1;

+ 0 - 519
app/src/main/java/com/sheep/gamegroup/view/activity/ActCutVideo.java

@@ -1,519 +0,0 @@
-//package com.sheep.gamegroup.view.activity;
-//
-//import android.annotation.SuppressLint;
-//import android.content.Context;
-//import android.content.Intent;
-//import android.media.AudioManager;
-//import android.media.MediaPlayer;
-//import android.net.Uri;
-//import android.os.Bundle;
-//import android.support.annotation.Nullable;
-//import android.support.v4.app.Fragment;
-//import android.text.TextUtils;
-//import android.view.GestureDetector;
-//import android.view.KeyEvent;
-//import android.view.MotionEvent;
-//import android.view.View;
-//import android.view.WindowManager;
-//import android.widget.TextView;
-//import android.widget.VideoView;
-//
-//import com.kfzs.cfyl.share_library.util.CallBackAPI;
-//import com.kfzs.duanduan.utils.NumberFormatUtils;
-//import com.kfzs.duanduan.utils.StatusBarUtils;
-//import com.sheep.gamegroup.absBase.AbsObserver;
-//import com.sheep.gamegroup.absBase.BaseContainerActivity;
-//import com.sheep.gamegroup.model.entity.DiscoveryTopic;
-//import com.sheep.gamegroup.model.entity.Video;
-//import com.sheep.gamegroup.util.DataUtil;
-//import com.sheep.gamegroup.util.Jump2View;
-//import com.sheep.gamegroup.util.KeyEventUtil;
-//import com.sheep.gamegroup.util.LogUtil;
-//import com.sheep.gamegroup.util.MediaHandleUtil;
-//import com.sheep.gamegroup.util.TestUtil;
-//import com.sheep.gamegroup.util.ViewUtil;
-//import com.sheep.gamegroup.view.customview.VideoFramesView;
-//import com.sheep.gamegroup.view.fragment.FgtDiscoveryTopic;
-//import com.sheep.jiuyan.samllsheep.R;
-//import com.sheep.jiuyan.samllsheep.utils.G;
-//
-//import org.greenrobot.eventbus.Subscribe;
-//
-//import java.util.ArrayList;
-//import java.util.Locale;
-//
-//import butterknife.BindView;
-//import rx.functions.Action1;
-//
-///**
-// * Created by realicing on 2018/11/9.
-// * realicing@sina.com
-// * 添加话题并剪切视频
-// */
-//public class ActCutVideo extends BaseContainerActivity implements MediaPlayer.OnInfoListener, MediaPlayer.OnPreparedListener, MediaPlayer.OnErrorListener, MediaPlayer.OnCompletionListener, View.OnLayoutChangeListener {
-//
-//    @Override
-//    protected void onCreate(@Nullable Bundle savedInstanceState) {
-//        StatusBarUtils.setTranslucent(this);
-//        super.onCreate(savedInstanceState);
-//    }
-//
-//    @BindView(R.id.videoView)
-//    VideoView videoView;
-//    @BindView(R.id.video_loading)
-//    View video_loading;
-//    @BindView(R.id.videoFramesView)
-//    VideoFramesView videoFramesView;
-//    @BindView(R.id.edit_video_time_tv)
-//    TextView edit_video_time_tv;
-//
-//    @Override
-//    protected int getLayoutId() {
-//        return R.layout.act_cut_video;
-//    }
-//
-//    public static final long MAX_VIDEO_DURATION = 15_000L;//视频最大时长,超过需要剪切
-//    private Video data;
-//
-//    @Override
-//    public void initView() {
-//        super.initView();
-//        initVolume();
-//        Intent intent = getIntent();
-//        ArrayList<String> videoPathList = intent.getStringArrayListExtra(CallBackAPI.KEY_DATA);
-//        data = DataUtil.getObject(intent, Video.class);
-//        Uri uri = Uri.parse(data.getFilePath());
-//        videoView.setOnInfoListener(this);
-//        videoView.setOnPreparedListener(this);
-//        videoView.setOnErrorListener(this);
-//        videoView.setOnCompletionListener(this);
-//        videoView.addOnLayoutChangeListener(this);
-////        videoView.setMediaController(new MediaController(this));
-//        videoView.setVideoURI(uri);
-//        if(videoPathList != null){
-//            videoFramesView.setVideoPathList(videoPathList);
-//        }
-//        videoFramesView.initVideo(data).setMaxDuration(MAX_VIDEO_DURATION).showVideoList().setOnTimeChangeListener(new Action1<Float>() {
-//            @Override
-//            public void call(Float duration) {
-//                if(duration == null)
-//                    return;
-//                if(ViewUtil.isVisible(videoFramesView))
-//                    checkDuration(duration.longValue());
-//                ViewUtil.setText(edit_video_time_tv, R.string.has_choose_x_second, NumberFormatUtils.retainMost1(duration / 1000.0f));
-//                if (TestUtil.isDev()) {
-//                    edit_video_time_tv.append("\t");
-//                    edit_video_time_tv.append(String.valueOf(duration));
-//                    edit_video_time_tv.append("\t");
-//                    edit_video_time_tv.append(String.valueOf(data.getDuration()));
-//                    edit_video_time_tv.append("\t");
-//                    edit_video_time_tv.append(String.format(Locale.CHINA, "%.1f秒-%.1f秒", videoFramesView.getStartPoint() / 1000.0f, videoFramesView.getEndPoint() / 1000.0f));
-//                    edit_video_time_tv.append("\t");
-//                    edit_video_time_tv.append(videoFramesView.getLineInfo());
-//                }
-//            }
-//        });
-//        //隐藏视频剪切相关view
-//        ViewUtil.setVisibility2(edit_video_time_tv, false);
-//        ViewUtil.setVisibility2(videoFramesView, false);
-//    }
-//
-//    //检查有没有设置剪切视频的时长
-//    private void checkDuration(long duration) {
-//        if ((data.getDuration() - duration) >= 500) {
-//            ViewUtil.setText(edit_video_sure_tv, BTN_TEXT_CUT);
-//        } else {
-//            ViewUtil.setText(edit_video_sure_tv, BTN_TEXT_FINISH);
-//        }
-//    }
-//
-//    @Override
-//    protected Fragment initFragment() {
-//        return new FgtDiscoveryTopic();
-//    }
-//
-//    @SuppressLint("ClickableViewAccessibility")
-//    @Override
-//    public void initListener() {
-//        mGestureDetector = new GestureDetector(getApplicationContext(), mGestureListener);
-//        View.OnTouchListener listener = new View.OnTouchListener() {
-//            @Override
-//            public boolean onTouch(View v, MotionEvent event) {
-//                return onTouchEvent(event);
-//            }
-//        };
-//        videoView.setOnTouchListener(listener);
-//    }
-//
-//    private GestureDetector mGestureDetector;
-//
-//    //播放或者暂停
-//    private void playOrPause() {
-//        if (videoView.isPlaying()) {
-//            pause();
-//        } else {
-//            play();
-//        }
-//    }
-//
-//    //播放
-//    private void play() {
-//        if (videoView == null) {
-//            return;
-//        }
-//        videoView.start();
-//    }
-//
-//    //暂停
-//    private void pause() {
-//        if (videoView == null) {
-//            return;
-//        }
-//        videoView.pause();
-//    }
-//
-//    //销毁
-//    private void destroy() {
-//        if (videoView == null) {
-//            return;
-//        }
-//        videoView.stopPlayback();
-//    }
-//
-//
-//    @Override
-//    public boolean onTouchEvent(MotionEvent event) {
-//        return mGestureDetector.onTouchEvent(event);
-//    }
-//
-//    @Override
-//    protected void onResume() {
-//        super.onResume();
-//        if (!isPauseByUser)
-//            play();
-//    }
-//
-//    //是否是用户手机暂停
-//    private boolean isPauseByUser;
-//
-//    @Override
-//    protected void onPause() {
-//        super.onPause();
-//        if (videoView != null && videoView.isPlaying())
-//            isPauseByUser = false;
-//        if (video_loading != null)
-//            video_loading.setVisibility(View.VISIBLE);
-//        pause();
-//    }
-//
-//    @Override
-//    protected void onDestroy() {
-//        destroy();
-//        if (videoFramesView != null)
-//            videoFramesView.onDestroy();
-//        super.onDestroy();
-//        mAudioManager = null;
-//    }
-//
-//    //    //滑动方向
-////    private int direction = 0;
-////    //左右滑动
-////    public static final int DIRECTION_LEFT_RIGHT = 1;
-////    //上下滑动
-////    public static final int DIRECTION_TOP_BOTTOM = 2;
-//    private GestureDetector.SimpleOnGestureListener mGestureListener = new GestureDetector.SimpleOnGestureListener() {
-//        @Override
-//        public boolean onDown(MotionEvent e) {
-//            LogUtil.println("mGestureListener", "onDown");
-////            direction = 0;
-//            return super.onDown(e);
-//        }
-//
-//        @Override
-//        public void onLongPress(MotionEvent e) {
-//            LogUtil.println("mGestureListener", "onLongPress");
-//            super.onLongPress(e);
-//        }
-//
-//        @Override
-//        public boolean onSingleTapConfirmed(MotionEvent e) {
-//            LogUtil.println("mGestureListener", "onSingleTapConfirmed");
-////            if(isPlaying)
-////                isPauseByUser = true;
-////            playOrPause();
-//            return super.onSingleTapConfirmed(e);
-//        }
-//
-//        @Override
-//        public boolean onScroll(MotionEvent e1, MotionEvent e2,
-//                                float distanceX, float distanceY) {
-//            float mOldX = e1.getX(), mOldY = e1.getY();
-//            int y = (int) e2.getRawY();
-//            int windowWidth = ActCutVideo.this.windowWidth;
-//            int windowHeight = ActCutVideo.this.windowHeight;
-//            int lineMiddle = windowWidth / 2;
-//            if (mOldX > lineMiddle)// 左边滑动
-//                onBrightnessSlide((mOldY - y) / windowHeight);
-//            else if (mOldX < lineMiddle)// 右边滑动
-//                onVolumeSlide((mOldY - y) / windowHeight);
-//            return super.onScroll(e1, e2, distanceX, distanceY);
-//        }
-//
-//
-////        @Override
-////        public boolean onScroll(MotionEvent event1, MotionEvent event2, float distanceX, float distanceY) {
-////            LogUtil.println("mGestureListener", distanceX, distanceY);
-////            if (event1 == null || event2 == null) {
-////                return super.onScroll(event1, event2, distanceX, distanceY);
-////            }
-////            if (direction == 0) {
-////                float a = Math.abs(distanceY);
-////                float b = Math.abs(distanceX);
-////                if (a > b) {
-////                    LogUtil.println("mGestureListener", "上下滑动");
-////                    direction = DIRECTION_TOP_BOTTOM;
-////                } else if (b > a) {
-////                    LogUtil.println("mGestureListener", "左右滑动");
-////                    direction = DIRECTION_LEFT_RIGHT;
-////                }
-////            }
-////            return super.onScroll(event1, event2, distanceX, distanceY);
-////        }
-////
-////        @Override
-////        public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) {
-////            LogUtil.println("mGestureListener", velocityX, velocityY);
-////            if (event1 == null || event2 == null) {
-////                return super.onFling(event1, event2, velocityX, velocityY);
-////            }
-////            final int FLING_MIN_DISTANCE = 100, FLING_MIN_VELOCITY = 200;
-////            if (event1.getX() - event2.getX() > FLING_MIN_DISTANCE
-////                    && Math.abs(velocityX) > FLING_MIN_VELOCITY) {
-////                // Fling left
-////                LogUtil.println("mGestureListener", "Fling left");
-////                //音量增益减
-////            } else if (event2.getX() - event1.getX() > FLING_MIN_DISTANCE
-////                    && Math.abs(velocityX) > FLING_MIN_VELOCITY) {
-////                // Fling right
-////                LogUtil.println("mGestureListener", "Fling rigth");
-////                //音量增益加
-////            } else if (event2.getY() - event1.getY() > FLING_MIN_DISTANCE
-////                    && Math.abs(velocityY) > FLING_MIN_VELOCITY) {
-////                if (direction == DIRECTION_LEFT_RIGHT) {
-////                    // Fling down
-////                    LogUtil.println("mGestureListener", "Fling down");
-////                    //频道减
-////                }
-////            } else if (event1.getY() - event2.getY() > FLING_MIN_DISTANCE
-////                    && Math.abs(velocityY) > FLING_MIN_VELOCITY) {
-////                if (direction == DIRECTION_LEFT_RIGHT) {
-////                    // Fling up
-////                    LogUtil.println("mGestureListener", "Fling up");
-////                    //频道加
-////                }
-////            }
-//////            return super.onFling(event1, event2, velocityX, velocityY);
-////            return false;
-////        }
-//    };
-//    private AudioManager mAudioManager;
-//    private int mMaxVolume;//最大音量
-//    private int mVolume;//当前音量
-//
-//    private void initVolume() {
-//        mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
-//        if (mAudioManager != null)
-//            mMaxVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
-//    }
-//
-//    //滑动改变音量
-//    private void onVolumeSlide(float percent) {
-//        if (mVolume == -1) {
-//            mVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
-//            if (mVolume < 0)
-//                mVolume = 0;
-//
-//            // 显示
-////                mOperationBg.setImageResource(R.drawable.video_volumn_bg);
-////                mVolumeBrightnessLayout.setVisibility(View.VISIBLE);
-//        }
-//
-//        int index = (int) (percent * mMaxVolume) + mVolume;
-//        if (index > mMaxVolume)
-//            index = mMaxVolume;
-//        else if (index < 0)
-//            index = 0;
-//
-//        // 变更声音
-//        mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, index, 0);
-//        // 变更进度条
-////            ViewGroup.LayoutParams lp = mOperationPercent.getLayoutParams();
-////            lp.width = findViewById(R.id.operation_full).getLayoutParams().width * index / mMaxVolume;
-////            mOperationPercent.setLayoutParams(lp);
-//    }
-//
-//    private float mBrightness = -1;
-//
-//    //滑动改变亮度
-//    private void onBrightnessSlide(float percent) {
-//        if (mBrightness < 0) {
-//            mBrightness = getWindow().getAttributes().screenBrightness;
-//            if (mBrightness <= 0.00f)
-//                mBrightness = 0.50f;
-//            if (mBrightness < 0.01f)
-//                mBrightness = 0.01f;
-//
-//            // 显示
-////                mOperationBg.setImageResource(R.drawable.video_brightness_bg);
-////                mVolumeBrightnessLayout.setVisibility(View.VISIBLE);
-//        }
-//        WindowManager.LayoutParams lpa = getWindow().getAttributes();
-//        lpa.screenBrightness = mBrightness + percent;
-//        if (lpa.screenBrightness > 1.0f)
-//            lpa.screenBrightness = 1.0f;
-//        else if (lpa.screenBrightness < 0.01f)
-//            lpa.screenBrightness = 0.01f;
-//        getWindow().setAttributes(lpa);
-//
-////            ViewGroup.LayoutParams lp = mOperationPercent.getLayoutParams();
-////            lp.width = (int) (findViewById(R.id.operation_full).getLayoutParams().width * lpa.screenBrightness);
-////            mOperationPercent.setLayoutParams(lp);
-//    }
-//
-//    @Override
-//    public boolean onInfo(MediaPlayer mediaPlayer, int what, int extra) {
-//        LogUtil.println("ActPlayVideo", "onInfo what = " + what + " extra = " + extra);
-//        if (!mediaPlayer.isLooping())
-//            mediaPlayer.setLooping(true);
-//        switch (what) {
-//            case MediaPlayer.MEDIA_INFO_BUFFERING_START:
-//                LogUtil.println("ActPlayVideo", "onInfo", "正在缓冲");
-//                if (video_loading != null)
-//                    video_loading.setVisibility(View.VISIBLE);
-//                break;
-//            case MediaPlayer.MEDIA_INFO_BUFFERING_END:
-//            case MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START:
-//                LogUtil.println("ActPlayVideo", "onInfo", "缓冲完成");
-//                //缓存完成,继续播放
-//                if (video_loading != null)
-//                    video_loading.setVisibility(View.GONE);
-//                break;
-//        }
-//        return false;
-//    }
-//
-//    @Override
-//    public void onPrepared(MediaPlayer mediaPlayer) {
-//        LogUtil.println("ActPlayVideo", "onPrepared");
-//        if (video_loading != null)
-//            video_loading.setVisibility(View.GONE);
-//    }
-//
-//    @Override
-//    public boolean onError(MediaPlayer mediaPlayer, int what, int extra) {
-//        LogUtil.println("ActPlayVideo", "onInfo what = " + what + " extra = " + extra);
-//        return false;
-//    }
-//
-//    @Override
-//    public void onCompletion(MediaPlayer mediaPlayer) {
-//        LogUtil.println("ActPlayVideo", "onCompletion");
-//    }
-//
-//    private int windowWidth = G.WIDTH;
-//    private int windowHeight = G.HEIGHT;
-//
-//    @Override
-//    public void onLayoutChange(View view, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
-//        LogUtil.println("ActPlayVideo", "onLayoutChange", left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom);
-//        this.windowWidth = left + right;
-//        this.windowHeight = top + bottom;
-//    }
-//
-//
-//    @BindView(R.id.edit_video_topic_tv)
-//    TextView edit_video_topic_tv;
-//    @BindView(R.id.edit_video_sure_tv)
-//    TextView edit_video_sure_tv;
-//    @BindView(R.id.frame_container)
-//    View frame_container;
-//
-//    @Override
-//    protected boolean needRegisterEventBus() {
-//        return true;
-//    }
-//
-//    @Subscribe
-//    public void onEventMainThread(DiscoveryTopic result) {
-//        ViewUtil.setText(edit_video_topic_tv, "#%s#", result.getTopic());
-//        data.setTopicId(result.getId());
-//    }
-//
-//    //点击话题进行切换
-//    public void onClickTopic(View view) {
-//        ViewUtil.toggleVisibility(frame_container);
-//        ViewUtil.setText(edit_video_sure_tv, BTN_TEXT_NEXT);
-//        if(ViewUtil.isVisible(frame_container)){
-//            ViewUtil.setVisibility2(edit_video_time_tv, false);
-//            ViewUtil.setVisibility2(videoFramesView, false);
-//        }
-//    }
-//
-//    //点击返回
-//    public void onClickBackImg(View view) {
-//        KeyEventUtil.sendKeyDownUp(KeyEvent.KEYCODE_BACK);
-//    }
-//
-//    private static final String BTN_TEXT_NEXT = "下一步";
-//    private static final String BTN_TEXT_CUT = "剪切";
-//    private static final String BTN_TEXT_FINISH = "完成";
-//    //点击确定
-//    public void onClickSure(View view) {
-//        String btnText = ((TextView) view).getText().toString();
-//        switch (btnText){
-//            case BTN_TEXT_NEXT:
-//                showCut();
-//                break;
-//            case BTN_TEXT_CUT:
-//                finishCut();
-//                break;
-//            case BTN_TEXT_FINISH:
-//                goEditVideo();
-//                break;
-//        }
-//    }
-//
-//    private void goEditVideo() {//完成并跳转编辑视频界面
-//        Jump2View.getInstance().goActEditVideo(data);
-//        finish();
-//    }
-//
-//    private void finishCut() {//其次完成编辑
-//        G.showToast("开始剪切");
-//        new MediaHandleUtil(data.getFilePath(), videoFramesView.getStartPoint() * 1000, videoFramesView.getLineDuration() * 1000)
-//                .tryCutVideo(new AbsObserver<Video>() {
-//                    @Override
-//                    public void onNext(Video video) {
-//                        data.setFilePath(video.getFilePath());
-//                        data.setWidth(video.getWidth());
-//                        data.setHeight(video.getHeight());
-//                        data.setDuration(video.getDuration());
-//                        sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + video.getFilePath())));
-//                        G.showToast("完成剪切");
-//                        goEditVideo();
-//                    }
-//
-//                    @Override
-//                    public void onError(Throwable e) {
-//                        G.showToast(e.getMessage());
-//                    }
-//                });
-//    }
-//
-//    private void showCut() {//首先隐藏话题列表
-//        ViewUtil.setVisibility(frame_container, false);
-//        ViewUtil.setVisibility2(edit_video_time_tv, true);
-//        ViewUtil.setVisibility2(videoFramesView, true);
-//        checkDuration(videoFramesView.getLineDuration());
-//    }
-//}

+ 0 - 65
media/app/src/main/java/com/kfzs/cfyl/media/activity/ActCutVideo1.java

@@ -1,65 +0,0 @@
-package com.kfzs.cfyl.media.activity;
-
-import android.content.Intent;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.support.v4.app.Fragment;
-import android.view.KeyEvent;
-import android.view.View;
-import android.widget.TextView;
-import android.widget.VideoView;
-
-import com.alibaba.fastjson.JSONObject;
-import com.kfzs.cfyl.media.BaseContainerActivity;
-import com.kfzs.cfyl.media.R;
-import com.kfzs.cfyl.media.api.IdChooser;
-import com.kfzs.cfyl.media.customview.VideoFramesView;
-import com.kfzs.cfyl.media.fragment.FgtDiscoveryTopic;
-import com.kfzs.cfyl.media.util.G;
-import com.kfzs.cfyl.media.util.KeyEventUtil;
-import com.kfzs.cfyl.media.util.ListUtil;
-import com.kfzs.cfyl.media.util.VideoUtil;
-import com.kfzs.cfyl.media.util.ViewUtil;
-import com.kfzs.cfyl.share_library.util.LogUtil;
-import com.sheep.gamegroup.model.entity.Video;
-
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.Locale;
-
-import rx.functions.Action1;
-
-/**
- * Created by realicing on 2018/11/9.
- * realicing@sina.com
- * 添加话题并剪切视频
- */
-public class ActCutVideo1 extends BaseContainerActivity {
-
-
-    @Override
-    protected int getLayoutId() {
-        return R.layout.act_cut_video1;
-    }
-
-
-    private Video data;
-
-    private ArrayList<String> arrayList;//主题列表
-
-
-    @Override
-    protected Fragment initFragment() {
-        return new FgtDiscoveryTopic();
-    }
-    @Override
-    public void initView() {
-        super.initView();
-
-        Intent intent = getIntent();
-        arrayList = intent.getStringArrayListExtra(ArrayList.class.getSimpleName());
-        if (arrayList != null && fragment instanceof FgtDiscoveryTopic)
-            ((FgtDiscoveryTopic) fragment).loadData(arrayList);
-        data = JSONObject.parseObject(intent.getStringExtra(String.class.getSimpleName()), Video.class);
-    }
-}

+ 0 - 109
media/app/src/main/res/layout/act_cut_video1.xml

@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="#000000"
-    tools:context=".activity.ActCutVideo">
-
-    <VideoView
-        android:id="@+id/videoView"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#99000000" />
-
-    <com.github.ybq.android.spinkit.SpinKitView
-        android:id="@+id/video_loading"
-        style="@style/SpinKitView.Large.ThreeBounce"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:SpinKit_Color="@color/colorAccent"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <ImageView
-        android:id="@+id/video_back_iv"
-        android:layout_width="?attr/actionBarSize"
-        android:layout_height="?attr/actionBarSize"
-        android:layout_marginTop="20dp"
-        android:onClick="onClickBackImg"
-        android:scaleType="centerInside"
-        android:src="@drawable/narrow_back_white"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <TextView
-        android:id="@+id/edit_video_topic_tv"
-        android:layout_width="0dp"
-        android:layout_height="30dp"
-        android:background="@drawable/shape_white_20_solid_rectangle_15"
-        android:gravity="center|start"
-        android:maxLength="100"
-        android:onClick="onClickTopic"
-        android:paddingStart="18dp"
-        android:paddingEnd="18dp"
-        android:text="#添加话题#"
-        android:textColor="#FEFFFF"
-        android:textSize="13sp"
-        app:layout_constraintBottom_toBottomOf="@id/video_back_iv"
-        app:layout_constraintEnd_toStartOf="@id/edit_video_sure_tv"
-        app:layout_constraintStart_toEndOf="@id/video_back_iv"
-        app:layout_constraintTop_toTopOf="@id/video_back_iv" />
-
-    <TextView
-        android:id="@+id/edit_video_sure_tv"
-        android:layout_width="75dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="31dp"
-        android:layout_marginEnd="16dp"
-        android:background="@drawable/selector_button_full_main"
-        android:gravity="center"
-        android:onClick="onClickSure"
-        android:paddingTop="6dp"
-        android:paddingBottom="6dp"
-        android:text="下一步"
-        android:textColor="#FEFFFF"
-        android:textSize="15sp"
-        app:layout_constraintBottom_toBottomOf="@id/video_back_iv"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toEndOf="@id/edit_video_topic_tv"
-        app:layout_constraintTop_toTopOf="@id/video_back_iv" />
-
-    <FrameLayout
-        android:id="@+id/frame_container"
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_marginTop="27dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/edit_video_topic_tv" />
-
-    <com.kfzs.cfyl.media.customview.VideoFramesView
-        android:id="@+id/videoFramesView"
-        android:layout_width="match_parent"
-        android:layout_height="69dp"
-        android:layout_marginStart="36dp"
-        android:layout_marginEnd="36dp"
-        android:layout_marginBottom="17dp"
-        app:layout_constraintBottom_toBottomOf="parent" />
-
-    <TextView
-        android:id="@+id/edit_video_time_tv"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="15dp"
-        android:layout_marginBottom="100dp"
-        android:text="@string/has_choose_x_second"
-        android:textColor="#ffffffff"
-        android:textSize="12sp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
-</android.support.constraint.ConstraintLayout>