@@ -5,7 +5,7 @@  | 
            ||
| 5 | 5 | 
                <GradleProjectSettings>  | 
            
| 6 | 6 | 
                <option name="distributionType" value="LOCAL" />  | 
            
| 7 | 7 | 
                <option name="externalProjectPath" value="$PROJECT_DIR$" />  | 
            
| 8 | 
                - <option name="gradleHome" value="C:/Android/gradle-3.1" />  | 
            |
| 8 | 
                + <option name="gradleHome" value="C:/Android/gradle-3.3" />  | 
            |
| 9 | 9 | 
                <option name="modules">  | 
            
| 10 | 10 | 
                <set>  | 
            
| 11 | 11 | 
                <option value="$PROJECT_DIR$" />  | 
            
                @@ -33,7 +33,7 @@ public class PaiAiApplication extends Application {
               | 
            ||
| 33 | 33 | 
                         PlatformConfig.setSinaWeibo("2730190333","ff16591583c7bcf4a0d781eae316635a");
               | 
            
| 34 | 34 | 
                PhotoLoader.getInstance(this);  | 
            
| 35 | 35 | 
                checkAppDir();  | 
            
| 36 | 
                - new PatchManager().patch(this, UrlContainer.PATCH_CONFIG_URL,Constants.APP_PATCH_DIR+File.separator+"patch.dex","");  | 
            |
| 36 | 
                + new PatchManager().patch(this, UrlContainer.PATCH_CONFIG_URL,Constants.APP_PATCH_DIR+File.separator+"patch.dex","ai.pai.client.patch.PatchesInfoImpl");  | 
            |
| 37 | 37 | 
                }  | 
            
| 38 | 38 | 
                 | 
            
| 39 | 39 | 
                     private void checkAppDir(){
               | 
            
                @@ -1,58 +0,0 @@  | 
            ||
| 1 | 
                -package ai.pai.client.patch;  | 
            |
| 2 | 
                -  | 
            |
| 3 | 
                -import android.os.Bundle;  | 
            |
| 4 | 
                -import android.view.View;  | 
            |
| 5 | 
                -import android.widget.TextView;  | 
            |
| 6 | 
                -  | 
            |
| 7 | 
                -import com.android.hotpatch.framework.ChangeQuickRedirect;  | 
            |
| 8 | 
                -import com.android.hotpatch.utils.PatchUtils;  | 
            |
| 9 | 
                -  | 
            |
| 10 | 
                -import ai.pai.client.R;  | 
            |
| 11 | 
                -import ai.pai.client.activity.AboutUsActivity;  | 
            |
| 12 | 
                -import ai.pai.client.utils.SystemUtils;  | 
            |
| 13 | 
                -  | 
            |
| 14 | 
                -  | 
            |
| 15 | 
                -public class AboutUsActivity$Override implements ChangeQuickRedirect {
               | 
            |
| 16 | 
                - @Override  | 
            |
| 17 | 
                -    public boolean isSupport(String s, Object[] objects) {
               | 
            |
| 18 | 
                -        String methodName = s.split(":")[1];
               | 
            |
| 19 | 
                -        if(methodName.equals("onCreate")){
               | 
            |
| 20 | 
                - return true;  | 
            |
| 21 | 
                - }  | 
            |
| 22 | 
                - return false;  | 
            |
| 23 | 
                - }  | 
            |
| 24 | 
                -  | 
            |
| 25 | 
                - @Override  | 
            |
| 26 | 
                -    public Object accessDispatch(String s, Object[] objects) {
               | 
            |
| 27 | 
                -        String methodName = s.split(":")[1];
               | 
            |
| 28 | 
                -        if(methodName.equals("onCreate")){
               | 
            |
| 29 | 
                - onCreate((AboutUsActivity)objects[objects.length-1],(Bundle)objects[0]);  | 
            |
| 30 | 
                - }  | 
            |
| 31 | 
                - return null;  | 
            |
| 32 | 
                - }  | 
            |
| 33 | 
                -  | 
            |
| 34 | 
                -  | 
            |
| 35 | 
                -    protected void onCreate(AboutUsActivity $this,Bundle savedInstanceState) {
               | 
            |
| 36 | 
                -        try{
               | 
            |
| 37 | 
                -            PatchUtils.invokeProtectedMethod($this,new Object[]{$this,-641568046,new Object[]{savedInstanceState}},new Class[]{Object.class,int.class,Object[].class},"accessSuper");
               | 
            |
| 38 | 
                -        }catch (Throwable t){
               | 
            |
| 39 | 
                - t.printStackTrace();  | 
            |
| 40 | 
                - }  | 
            |
| 41 | 
                - $this.setContentView(R.layout.activity_about_us);  | 
            |
| 42 | 
                - SystemUtils.setImmerseLayout($this,$this.findViewById(R.id.title_layout));  | 
            |
| 43 | 
                - TextView title = (TextView) $this.findViewById(R.id.title_bar_middle_txt);  | 
            |
| 44 | 
                - title.setTextSize(25);  | 
            |
| 45 | 
                - title.setText(R.string.slide_about_us);  | 
            |
| 46 | 
                - TextView curVersionText = (TextView)$this.findViewById(R.id.tv_cur_version);  | 
            |
| 47 | 
                -        try {
               | 
            |
| 48 | 
                - curVersionText.setText( "v"+$this.getPackageManager().getPackageInfo($this.getPackageName(), 0).versionName);  | 
            |
| 49 | 
                -        }catch (Exception e){
               | 
            |
| 50 | 
                - e.printStackTrace();  | 
            |
| 51 | 
                - }  | 
            |
| 52 | 
                - $this.findViewById(R.id.title_bar_back_layout).setOnClickListener($this);  | 
            |
| 53 | 
                - $this.findViewById(R.id.title_bar_option_layout).setVisibility(View.INVISIBLE);  | 
            |
| 54 | 
                - $this.findViewById(R.id.layout_about_declare).setOnClickListener($this);  | 
            |
| 55 | 
                - $this.findViewById(R.id.layout_check_update).setOnClickListener($this);  | 
            |
| 56 | 
                - $this.findViewById(R.id.layout_contact_us).setOnClickListener($this);  | 
            |
| 57 | 
                - }  | 
            |
| 58 | 
                -}  | 
            
                @@ -1,19 +0,0 @@  | 
            ||
| 1 | 
                -package ai.pai.client.patch;  | 
            |
| 2 | 
                -  | 
            |
| 3 | 
                -import com.android.hotpatch.framework.PatchedClassInfo;  | 
            |
| 4 | 
                -import com.android.hotpatch.framework.PatchesInfo;  | 
            |
| 5 | 
                -  | 
            |
| 6 | 
                -import java.util.ArrayList;  | 
            |
| 7 | 
                -import java.util.List;  | 
            |
| 8 | 
                -  | 
            |
| 9 | 
                -  | 
            |
| 10 | 
                -public class PatchesInfoImpl implements PatchesInfo {
               | 
            |
| 11 | 
                -    public List<PatchedClassInfo> getPatchedClassesInfo() {
               | 
            |
| 12 | 
                - List<PatchedClassInfo> patchedClassesInfos = new ArrayList<PatchedClassInfo>();  | 
            |
| 13 | 
                - PatchedClassInfo patchedClass = new PatchedClassInfo(  | 
            |
| 14 | 
                - "ai.pai.client.activity.AboutUsActivity",  | 
            |
| 15 | 
                - AboutUsActivity$Override.class.getCanonicalName());  | 
            |
| 16 | 
                - patchedClassesInfos.add(patchedClass);  | 
            |
| 17 | 
                - return patchedClassesInfos;  | 
            |
| 18 | 
                - }  | 
            |
| 19 | 
                -}  |