APISonar


com.didichuxing.doraemonkit.kit.blockmonitor.bean.BlockInfo.time

> com > didichuxing > doraemonkit > kit > blockmonitor > bean > BlockInfo > time
com APIs didichuxing APIs doraemonkit APIs kit APIs blockmonitor APIs bean APIs BlockInfo APIs time APIs

Example 1
private void load() {
        List<BlockInfo> infos = new ArrayList<>(BlockMonitorManager.getInstance().getBlockInfoList());
        Collections.sort(infos, new Comparator<BlockInfo>() {
            @Override
            public int compare(BlockInfo lhs, BlockInfo rhs) {
                return Long.valueOf(rhs.time)
                        .compareTo(lhs.time);
            }
        });
        mBlockListAdapter.setData(infos);
    }
Example 2
public void notifyBlockEvent(BlockInfo blockInfo) {
        blockInfo.concernStackString = BlockCanaryUtils.concernStackString(mContext, blockInfo);
        blockInfo.time = System.currentTimeMillis();
        if (!TextUtils.isEmpty(blockInfo.concernStackString)) {
            showNotification(blockInfo);
            if (mBlockInfoList.size() > MAX_SIZE) {
                mBlockInfoList.remove(0);
            }
            mBlockInfoList.add(blockInfo);
            if (mOnBlockInfoUpdateListener != null) {
                mOnBlockInfoUpdateListener.onBlockInfoUpdate(blockInfo);
            }
        }

    }