Skip to content

Commit

Permalink
Fix the LIME button
Browse files Browse the repository at this point in the history
  • Loading branch information
Chipppppppppp committed Jan 27, 2024
1 parent 3f4f072 commit 726c75b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions app/src/main/java/io/github/chipppppppppp/lime/Main.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package io.github.chipppppppppp.lime;

import android.app.Activity;
import android.app.AlarmManager;
import android.app.AlertDialog;
import android.app.AndroidAppHelper;
import android.app.PendingIntent;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
Expand All @@ -13,14 +10,17 @@
import android.net.Uri;
import android.support.customtabs.CustomTabsIntent;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.Switch;
import android.widget.Toast;

import android.app.AndroidAppHelper;
import de.robv.android.xposed.IXposedHookInitPackageResources;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.IXposedHookZygoteInit;
Expand All @@ -32,9 +32,6 @@
import de.robv.android.xposed.callbacks.XC_LayoutInflated;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
import android.content.res.XModuleResources;
import android.widget.LinearLayout;
import android.widget.Switch;
import android.widget.Toast;

public class Main implements IXposedHookLoadPackage, IXposedHookInitPackageResources, IXposedHookZygoteInit {
public String MODULE_PATH;
Expand Down Expand Up @@ -122,10 +119,11 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
});

hookTarget = lparam.classLoader.loadClass("com.linecorp.line.settings.base.LineUserSettingItemListFragment");
hookTarget = lparam.classLoader.loadClass("com.linecorp.line.settings.main.LineUserMainSettingsFragment");
XposedBridge.hookAllMethods(hookTarget, "onViewCreated", new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log(param.thisObject.getClass().getName());
ViewGroup viewGroup = ((ViewGroup) param.args[0]);
Context context = viewGroup.getContext();
Context moduleContext;
Expand All @@ -138,7 +136,6 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log(e.toString());
return;
}
XposedBridge.log(AndroidAppHelper.currentApplication().getClass().getName());

FrameLayout frameLayout = new FrameLayout(context);
frameLayout.setLayoutParams(new ViewGroup.LayoutParams(
Expand Down

0 comments on commit 726c75b

Please sign in to comment.