mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Ensure unseal at the first time (#3376)
Unable to determine execution order if relying on a provider.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
package com.android.launcher3;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.graphics.BitmapCreationCheck;
|
||||
@@ -26,6 +27,8 @@ import com.android.launcher3.graphics.IconShape;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.util.ResourceBasedOverride;
|
||||
|
||||
import org.chickenhook.restrictionbypass.Unseal;
|
||||
|
||||
import app.lawnchair.preferences.PreferenceManager;
|
||||
|
||||
/**
|
||||
@@ -33,7 +36,16 @@ import app.lawnchair.preferences.PreferenceManager;
|
||||
*/
|
||||
public class MainProcessInitializer implements ResourceBasedOverride {
|
||||
|
||||
private static final String TAG = "MainProcessInitializer";
|
||||
|
||||
public static void initialize(Context context) {
|
||||
try {
|
||||
Unseal.unseal();
|
||||
Log.i(TAG, "Unseal success!");
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Unseal fail!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
PreferenceManager.getInstance(context);
|
||||
Overrides.getObject(
|
||||
MainProcessInitializer.class, context, R.string.main_process_initializer_class)
|
||||
|
||||
Reference in New Issue
Block a user