Search in sources :

Example 1 with ClientService

use of com.google.android.libraries.gsa.launcherclient.ClientService 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);
}
Also used : ClientService(com.google.android.libraries.gsa.launcherclient.ClientService) CustomLauncherClient(com.saggitt.omega.util.CustomLauncherClient)

Aggregations

ClientService (com.google.android.libraries.gsa.launcherclient.ClientService)1 CustomLauncherClient (com.saggitt.omega.util.CustomLauncherClient)1