use of com.saggitt.omega.util.CustomLauncherClient in project Neo-Launcher by NeoApplications.
the class OmegaLauncherCallbacks method onDestroy.
@Override
public void onDestroy() {
if (!mLauncherClient.isDestroyed()) {
mLauncherClient.getActivity().unregisterReceiver(mLauncherClient.mInstallListener);
}
mLauncherClient.setDestroyed(true);
mLauncherClient.getBaseService().disconnect();
if (mLauncherClient.getOverlayCallback() != null) {
mLauncherClient.getOverlayCallback().mClient = null;
mLauncherClient.getOverlayCallback().mWindowManager = null;
mLauncherClient.getOverlayCallback().mWindow = null;
mLauncherClient.setOverlayCallback(null);
}
ClientService service = mLauncherClient.getClientService();
CustomLauncherClient client = (CustomLauncherClient) service.getClient();
if (client != null && client.equals(mLauncherClient)) {
service.mWeakReference = null;
if (!mLauncherClient.getActivity().isChangingConfigurations()) {
service.disconnect();
if (ClientService.sInstance == service) {
ClientService.sInstance = null;
}
}
}
Utilities.getPrefs(mLauncher).unregisterOnSharedPreferenceChangeListener(this);
WallpaperColorInfo.getInstance(mLauncher).removeOnChangeListener(this);
PredictionUiStateManager.INSTANCE.get(mLauncher).setTargetAppsView(null);
}
use of com.saggitt.omega.util.CustomLauncherClient in project Neo-Launcher by NeoApplications.
the class OmegaLauncherCallbacks method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
mPrefs = Utilities.getPrefs(mLauncher);
mOverlayCallbacks = new OverlayCallbackImpl(mLauncher);
mLauncherClient = new CustomLauncherClient(mLauncher, mOverlayCallbacks, getClientOptions(mPrefs));
mQsbController = new QsbAnimationController(mLauncher);
mOverlayCallbacks.setClient(mLauncherClient);
mUiInformation.putInt("system_ui_visibility", mLauncher.getWindow().getDecorView().getSystemUiVisibility());
applyFeedTheme(false);
WallpaperColorInfo instance = WallpaperColorInfo.getInstance(mLauncher);
instance.addOnChangeListener(this);
onExtractedColorsChanged(instance);
mPrefs.registerOnSharedPreferenceChangeListener(this);
predictionUiStateManager = PredictionUiStateManager.INSTANCE.get(mLauncher);
predictionUiStateManager.setTargetAppsView(mLauncher.getAppsView());
if (FeatureFlags.REFLECTION_FORCE_OVERVIEW_MODE) {
predictionUiStateManager.switchClient(Client.OVERVIEW);
}
}
Aggregations