@@ -0,0 +1,2571 @@
+package me.pc.mobile.helper.v14.receiver;%0A%0Aimport android.content.BroadcastReceiver;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0A%0A/**%0A * Created by Pan Chen on 3/28/16 : 15:50.%0A * Company : www.CreditEase.cn;%0A * Email : happychinapc@gmail.cn;%0A * Motto : If you can take it, you can make it.%0A */%0Apublic class HomeActionReceiver extends BroadcastReceiver %7B%0A    private static final String SYSTEM_DIALOG_REASON_KEY = %22reason%22;%0A    private static final String SYSTEM_DIALOG_REASON_RECENT_APPS = %22recentapps%22;%0A    private static final String SYSTEM_DIALOG_REASON_HOME_KEY = %22homekey%22;%0A    private static final String SYSTEM_DIALOG_REASON_LOCK = %22lock%22;%0A    private static final String SYSTEM_DIALOG_REASON_ASSIST = %22assist%22;%0A%0A    private HomeActionWatcher mHomeActionWatcher;%0A%0A    public HomeActionWatcher getHomeActionWatcher() %7B%0A        return mHomeActionWatcher;%0A    %7D%0A%0A    public void setHomeActionWatcher(HomeActionWatcher mHomeActionWatcher) %7B%0A        this.mHomeActionWatcher = mHomeActionWatcher;%0A    %7D%0A%0A    @Override%0A    public void onReceive(Context context, Intent intent) %7B%0A        String action = intent.getAction();%0A        if (action.equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) %7B%0A            // android.intent.action.CLOSE_SYSTEM_DIALOGS%0A            String reason = intent.getStringExtra(SYSTEM_DIALOG_REASON_KEY);%0A            if (SYSTEM_DIALOG_REASON_HOME_KEY.equals(reason)) %7B%0A                // %E7%9F%AD%E6%8C%89Home%E9%94%AE%0A                if (mHomeActionWatcher != null) %7B%0A                    mHomeActionWatcher.onHomeClicked(context, intent);%0A                %7D%0A            %7D else if (SYSTEM_DIALOG_REASON_RECENT_APPS.equals(reason)) %7B%0A                // %E9%95%BF%E6%8C%89Home%E9%94%AE %E6%88%96%E8%80%85 activity%E5%88%87%E6%8D%A2%E9%94%AE%0A                if (mHomeActionWatcher != null) %7B%0A                    mHomeActionWatcher.onHomeLongClicked(context, intent);%0A                %7D%0A            %7D else if (SYSTEM_DIALOG_REASON_LOCK.equals(reason)) %7B%0A                // %E9%94%81%E5%B1%8F%0A                if (mHomeActionWatcher != null) %7B%0A                    mHomeActionWatcher.onHomeLocked(context, intent);%0A                %7D%0A            %7D else if (SYSTEM_DIALOG_REASON_ASSIST.equals(reason)) %7B%0A                // Samsung %E9%95%BF%E6%8C%89Home%E9%94%AE%0A                if (mHomeActionWatcher != null) %7B%0A                    mHomeActionWatcher.onHomeLongClicked(context, intent);%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%0A    public interface HomeActionWatcher %7B%0A        void onHomeClicked(Context context, Intent intent);%0A%0A        void onHomeLongClicked(Context context, Intent intent);%0A%0A        void onHomeLocked(Context context, Intent intent);%0A    %7D%0A%7D%0A

Create HomeActionReceiver.java