<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[parallelyk的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/parallelyk</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; parallelyk]]></copyright><item><title><![CDATA[Android项目笔记：JobService]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/79747733</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/79747733</guid><author>parallelyk</author><pubDate>Thu, 29 Mar 2018 19:29:37 +0800</pubDate><description><![CDATA[在Android5.0之后，系统为我们提供了一个后台定时任务，在特定的条件下触发。它就是JobService。JobService在满足条件的情况下，会在APP的主线程中执行任务。因此需要我们注意不能直接执行耗时的任务。JobService的使用首先要先申请一个保护权限 &quot;android.permission.BIND_JOB_SERVICE&quot; ，否则系统将跳过这个JobService。&amp;lt;s...]]></description><category></category></item><item><title><![CDATA[Android中注解的简单使用]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/78785340</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/78785340</guid><author>parallelyk</author><pubDate>Tue, 12 Dec 2017 19:57:24 +0800</pubDate><description><![CDATA[前言
注解最常见的用法就是去掉繁琐的findviewbyId方法，通过注解的方式绑定控件，代替findviewbyId和强制类型转换。能使代码更简洁。
@ViewInject(id = R.id.tx1)
private TextView textView;
@ViewInject(id = R.id.button)
private Button button;
下面介绍Android中注解]]></description><category></category></item><item><title><![CDATA[Leetcode 102. Binary Tree Level Order Traversal]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51842470</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51842470</guid><author>parallelyk</author><pubDate>Wed, 06 Jul 2016 21:25:40 +0800</pubDate><description><![CDATA[Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).

For example:
Given binary tree [3,9,20,null,null,15,7],

    3
   / \
  9  2]]></description><category></category></item><item><title><![CDATA[Leetcode 101. Symmetric Tree]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51842300</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51842300</guid><author>parallelyk</author><pubDate>Wed, 06 Jul 2016 21:01:08 +0800</pubDate><description><![CDATA[Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).

For example, this binary tree [1,2,2,3,4,4,3] is symmetric:
    1
   / \
  2   2
 / \ / \
3  4 4  3
]]></description><category></category></item><item><title><![CDATA[Leetcode 98. Validate Binary Search Tree]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51793567</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51793567</guid><author>parallelyk</author><pubDate>Thu, 30 Jun 2016 21:27:40 +0800</pubDate><description><![CDATA[Given a binary tree, determine if it is a valid binary search tree (BST).

Assume a BST is defined as follows:

The left subtree of a node contains only nodes with keys less than the node's key.Th]]></description><category></category></item><item><title><![CDATA[Android 插件化原理解析——插件加载机制]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51790858</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51790858</guid><author>parallelyk</author><pubDate>Thu, 30 Jun 2016 15:39:01 +0800</pubDate><description><![CDATA[上文 Activity生命周期管理 中我们地完成了『启动没有在AndroidManifest.xml中显式声明的Activity』的任务；通过Hook AMS和拦截ActivityThread中H类对于组件调度我们成功地绕过了AndroidMAnifest.xml的限制。

但是我们启动的『没有在AndroidManifet.xml中显式声明』的Activity和宿主程序存在于同一个Apk中；]]></description><category></category></item><item><title><![CDATA[Leetcode 94. Binary Tree Inorder Traversal]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51786285</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51786285</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 22:17:18 +0800</pubDate><description><![CDATA[递归的方法：
public class Solution {
    public ArrayList inorderTraversal(TreeNode root) {
        ArrayList list = new ArrayList();
        if(root != null){
            list.addAll(inorderTraversal(root]]></description><category></category></item><item><title><![CDATA[Leetcode 144. Binary Tree Preorder Traversal]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51785845</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51785845</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 20:54:04 +0800</pubDate><description><![CDATA[Given a binary tree, return the preorder traversal of its nodes' values.

For example:
Given binary tree {1,#,2,3},

   1
    \
     2
    /
   3




return [1,2,3].

Note: Recursive soluti]]></description><category></category></item><item><title><![CDATA[Leetcode 145. Binary Tree Postorder Traversal]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51785665</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51785665</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 20:25:06 +0800</pubDate><description><![CDATA[Given a binary tree, return the postorder traversal of its nodes' values.

For example:
Given binary tree {1,#,2,3},

   1
    \
     2
    /
   3




return [3,2,1].

Note: Recursive solut]]></description><category></category></item><item><title><![CDATA[Leetcode 110. Balanced Binary Tree]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51785571</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51785571</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 20:09:12 +0800</pubDate><description><![CDATA[Given a binary tree, determine if it is height-balanced.

For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe]]></description><category></category></item><item><title><![CDATA[Android 插件化原理解析——Hook机制之AMS&PMS]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51784570</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51784570</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 17:23:34 +0800</pubDate><description><![CDATA[在前面的文章中我们介绍了DroidPlugin的Hook机制，也就是代理方式和Binder Hook；插件框架通过AOP实现了插件使用和开发的透明性。在讲述DroidPlugin如何实现四大组件的插件化之前，有必要说明一下它对ActivityManagerServiche以及PackageManagerService的Hook方式（以下简称AMS，PMS）。

ActivityManagerS]]></description><category></category></item><item><title><![CDATA[Android插件化原理解析——Hook机制之Binder Hook]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51784252</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51784252</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 16:53:25 +0800</pubDate><description><![CDATA[Android系统通过Binder机制给应用程序提供了一系列的系统服务，诸如ActivityManagerService，ClipboardManager， AudioManager等；这些广泛存在系统服务给应用程序提供了诸如任务管理，音频，视频等异常强大的功能。

插件框架作为各个插件的管理者，为了使得插件能够无缝地使用这些系统服务，自然会对这些系统服务做出一定的改造(Hook)，使得插件的]]></description><category></category></item><item><title><![CDATA[Android插件化原理解析——Hook机制之动态代理]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51783817</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51783817</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 16:16:18 +0800</pubDate><description><![CDATA[使用代理机制进行API Hook进而达到方法增强是框架的常用手段，比如J2EE框架Spring通过动态代理优雅地实现了AOP编程，极大地提升了Web开发效率；同样，插件框架也广泛使用了代理机制来增强系统API从而达到插件化的目的。本文将带你了解基于动态代理的Hook机制。

阅读本文之前，可以先clone一份 understand-plugin-framework，参考此项目的dynamic-]]></description><category></category></item><item><title><![CDATA[Shared storage cannot protect your application from code injection attacks]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51782714</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51782714</guid><author>parallelyk</author><pubDate>Wed, 29 Jun 2016 15:32:45 +0800</pubDate><description><![CDATA[在动态加载dex的时候可能会出现以下问题：
 java.lang.IllegalArgumentException:
 Optimized data directory /storage/emulated/0 is not owned by the current user. Shared storage cannot protect your application from code in]]></description><category></category></item><item><title><![CDATA[Leetcode 117. Populating Next Right Pointers in Each Node II]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51778821</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51778821</guid><author>parallelyk</author><pubDate>Tue, 28 Jun 2016 21:12:36 +0800</pubDate><description><![CDATA[Follow up for problem "Populating Next Right Pointers in Each Node".

What if the given tree could be any binary tree? Would your previous solution still work?

Note:

You may only use constant ]]></description><category></category></item><item><title><![CDATA[Leetcode 112. Path Sum]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51778502</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51778502</guid><author>parallelyk</author><pubDate>Tue, 28 Jun 2016 20:23:04 +0800</pubDate><description><![CDATA[Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree andsum =]]></description><category></category></item><item><title><![CDATA[Leetcode 116. Populating Next Right Pointers in Each Node]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51778485</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51778485</guid><author>parallelyk</author><pubDate>Tue, 28 Jun 2016 20:20:19 +0800</pubDate><description><![CDATA[Given a binary tree
    struct TreeLinkNode {
      TreeLinkNode *left;
      TreeLinkNode *right;
      TreeLinkNode *next;
    }




Populate each next pointer to point to its next right node. ]]></description><category></category></item><item><title><![CDATA[LeetCode 299. Bulls and Cows]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51737047</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51737047</guid><author>parallelyk</author><pubDate>Wed, 22 Jun 2016 21:19:30 +0800</pubDate><description><![CDATA[You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to
 guess what the number is. Each time your friend makes a guess, you provide a hint t]]></description><category></category></item><item><title><![CDATA[Error:Execution failed for task ':app:transformClassesWithDexForDebug]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51734710</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51734710</guid><author>parallelyk</author><pubDate>Wed, 22 Jun 2016 15:44:40 +0800</pubDate><description><![CDATA[引入之前在eclipse下开发的项目到AndroidStudio 遇到了如下错误：
Error:Execution failed for task ':guanXiang:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.pr]]></description><category></category></item><item><title><![CDATA[LeetCode 111. Minimum Depth of Binary Tree]]></title><link>https://blog.youkuaiyun.com/parallelyk/article/details/51728786</link><guid>https://blog.youkuaiyun.com/parallelyk/article/details/51728786</guid><author>parallelyk</author><pubDate>Tue, 21 Jun 2016 17:13:24 +0800</pubDate><description><![CDATA[Given a binary tree, find its minimum depth.

The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.




/**
 * Definition for a bina]]></description><category></category></item></channel></rss>