INNER CODE UNIT · Java
onCreate
termux/termux-x11 · lorie/src/main/java/com/termux/x11/LorieApp.java:49
public void onCreate() {
super.onCreate();
// A platform-supplied Context can identify as the host app's package in sharedUid builds.
Context prefsCtx = this;
if (!BuildConfig.APPLICATION_ID.equals(getPackageName())) {
try {
prefsCtx = createPackageContext(BuildConfig.APPLICATION_ID, 0);
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException(e);
}
}
builtInPrefs.attach(prefsCtx, PreferenceManager.getDefaultSharedPreferences(prefsCtx));
secondaryPrefs.attach(prefsCtx, prefsCtx.getSharedPreferences("secondary", Context.MODE_PRIVATE));
notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);