Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 26
compileSdkVersion 29
defaultConfig {
applicationId "org.gallonyin.weworkhk"
minSdkVersion 15
targetSdkVersion 22
versionCode 2
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion 26
targetSdkVersion 29
versionCode 3
versionName "1.2"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand All @@ -20,15 +21,20 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
// implementation 'com.zzti.fengyongge:imagepicker:1.3.0'
implementation project(':imagepicker')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
compileOnly 'de.robv.android.xposed:api:53'
compileOnly 'de.robv.android.xposed:api:53:sources'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
compileOnly 'de.robv.android.xposed:api:82'
compileOnly 'de.robv.android.xposed:api:82:sources'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation files('libs/TencentMapSDK_Raster_v_1.2.8.1.c02ec64.jar')
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.example.gallon2.weworkhk;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<service android:name=".MainActivity$LongRunningService" />

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="org.gallonyin.weworkhk.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/xposed_init
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.gallonyin.weworkhk.Main
org.gallonyin.weworkhk.Hook
33 changes: 33 additions & 0 deletions app/src/main/java/org/gallonyin/weworkhk/Hook.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package org.gallonyin.weworkhk

import android.util.Log
import de.robv.android.xposed.IXposedHookLoadPackage
import de.robv.android.xposed.XC_MethodHook
import de.robv.android.xposed.XC_MethodHook.MethodHookParam
import de.robv.android.xposed.XposedBridge
import de.robv.android.xposed.XposedHelpers
import de.robv.android.xposed.callbacks.XC_LoadPackage

class Hook : IXposedHookLoadPackage {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam?) {
Log.d("Main", "handleLoadPackage")
XposedBridge.log("handleLoadPackage: " + lpparam!!.packageName + " " + lpparam.processName)
if (lpparam.packageName == "com.tencent.wework") {
Log.d("Main", "wework")
WeWork().start(lpparam.classLoader)
}
if (lpparam.packageName == "org.gallonyin.weworkhk") {
Log.d("Main", "weworkhk")
XposedHelpers.findAndHookMethod(
"org.gallonyin.weworkhk.MainActivity",
lpparam.classLoader,
"confirm",
object : XC_MethodHook() {
@Throws(Throwable::class)
override fun afterHookedMethod(param: MethodHookParam) {
param.result = true
}
})
}
}
}
4 changes: 3 additions & 1 deletion app/src/main/java/org/gallonyin/weworkhk/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
public class Main implements IXposedHookLoadPackage {

@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) {
try {
Log.d("Main", "handleLoadPackage");
XposedBridge.log("handleLoadPackage: " + lpparam.packageName + " " + lpparam.processName);

if (lpparam.packageName.equals("com.tencent.wework")) {
Expand All @@ -36,6 +37,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
});
}
} catch (Exception e) {
Log.w("Main", "handleLoadPackage catch Exception");
e.printStackTrace();
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/gallonyin/weworkhk/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.widget.Toast;

import com.tencent.mapsdk.raster.model.BitmapDescriptorFactory;
Expand Down
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

ext.kotlin_version = '1.5.20'

repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'

classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -18,6 +21,7 @@ buildscript {
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
Expand Down
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 02 15:45:31 CST 2018
#Wed Sep 29 21:01:35 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
zipStoreBase=GRADLE_USER_HOME
27 changes: 16 additions & 11 deletions imagepicker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
compileSdkVersion 29

defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionCode 2
versionName "1.1"
minSdkVersion 26
targetSdkVersion 29
versionCode 3
versionName "1.2"
}
buildTypes {
release {
Expand All @@ -19,11 +19,16 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'pub.devrel:easypermissions:0.2.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'pub.devrel:easypermissions:0.2.1'
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

}
repositories {
mavenCentral()
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.zzti.fengyongge.imagepicker.util;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import android.support.v4.content.FileProvider;

import androidx.core.content.FileProvider;

import java.io.File;

Expand Down
2 changes: 1 addition & 1 deletion imagepicker/src/main/res/layout/activity_photopreview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:background="@android:color/black" >

<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/vp_base_app"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Expand Down