2020-12-29 10:44:02 +01:00
|
|
|
package com.topjohnwu.magisk;
|
|
|
|
|
|
|
|
import android.app.Application;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.res.Configuration;
|
|
|
|
|
|
|
|
public class DelegateApplication extends Application {
|
|
|
|
|
2021-01-26 12:40:25 +01:00
|
|
|
private Application receiver;
|
|
|
|
|
2020-12-29 10:44:02 +01:00
|
|
|
@Override
|
|
|
|
protected void attachBaseContext(Context base) {
|
|
|
|
super.attachBaseContext(base);
|
2022-02-02 07:43:44 +01:00
|
|
|
receiver = DynLoad.createAndSetupApp(this);
|
2020-12-29 10:44:02 +01:00
|
|
|
}
|
|
|
|
|
2021-12-13 12:57:27 +01:00
|
|
|
@Override
|
|
|
|
public void onCreate() {
|
|
|
|
super.onCreate();
|
|
|
|
if (receiver != null)
|
|
|
|
receiver.onCreate();
|
|
|
|
}
|
|
|
|
|
2020-12-29 10:44:02 +01:00
|
|
|
@Override
|
|
|
|
public void onConfigurationChanged(Configuration newConfig) {
|
|
|
|
super.onConfigurationChanged(newConfig);
|
2021-01-26 12:40:25 +01:00
|
|
|
if (receiver != null)
|
|
|
|
receiver.onConfigurationChanged(newConfig);
|
2020-12-29 10:44:02 +01:00
|
|
|
}
|
|
|
|
}
|