Search in sources :

Example 1 with UserDataProtection

use of com.vodafone360.people.service.utils.UserDataProtection in project 360-Engine-for-Android by 360.

the class RemoteService method onCreate.

/**
 * Creation of RemoteService. Loads properties (i.e. supported features,
 * server URLs etc) from SettingsManager. Creates IPeopleServiceImpl,
 * NetworkAgent. Connects ConnectionManager creating Connection thread(s)
 * and DecoderThread 'Kicks' worker thread.
 */
@Override
public void onCreate() {
    LogUtils.logV("RemoteService.onCreate()");
    SettingsManager.loadProperties(this);
    mIPeopleServiceImpl = new PeopleServiceImpl(this, this);
    mNetworkAgent = new NetworkAgent(this, this, this);
    // Create NativeContactsApi here to access Application Context
    NativeContactsApi.createInstance(getApplicationContext());
    EngineManager.createEngineManager(this, mIPeopleServiceImpl);
    mNetworkAgent.onCreate();
    mIPeopleServiceImpl.setNetworkAgent(mNetworkAgent);
    /**
     * The service has now been fully initialised. *
     */
    mIsStarted = true;
    kickWorkerThread();
    final MainApplication mainApp = (MainApplication) getApplication();
    mainApp.setServiceInterface(mIPeopleServiceImpl);
    if (VersionUtils.is2XPlatform()) {
        mAccountsObjectsHolder = new NativeAccountObjectsHolder(((MainApplication) getApplication()));
    }
    final UserDataProtection userDataProtection = new UserDataProtection(this, mainApp.getDatabase());
    userDataProtection.performStartupChecks();
}
Also used : NetworkAgent(com.vodafone360.people.service.agent.NetworkAgent) UserDataProtection(com.vodafone360.people.service.utils.UserDataProtection) MainApplication(com.vodafone360.people.MainApplication)

Aggregations

MainApplication (com.vodafone360.people.MainApplication)1 NetworkAgent (com.vodafone360.people.service.agent.NetworkAgent)1 UserDataProtection (com.vodafone360.people.service.utils.UserDataProtection)1