@Override public void setLocation(int userId, String pkg, VLocation loc) throws RemoteException { getOrCreateConfig(userId, pkg).location = loc; mPersistenceLayer.save(); }
@Override public int getMode(int userId, String pkg) throws RemoteException { synchronized (mLocConfigs) { VLocConfig config = getOrCreateConfig(userId, pkg); mPersistenceLayer.save(); return config.mode; } }
@Override public void setCell(int userId, String pkg, VCell cell) throws RemoteException { getOrCreateConfig(userId, pkg).cell = cell; mPersistenceLayer.save(); }
@Override public void setNeighboringCell(int userId, String pkg, List<VCell> cell) throws RemoteException { getOrCreateConfig(userId, pkg).neighboringCell = cell; mPersistenceLayer.save(); }
@Override public void setMode(int userId, String pkg, int mode) throws RemoteException { synchronized (mLocConfigs) { getOrCreateConfig(userId, pkg).mode = mode; mPersistenceLayer.save(); } }
@Override public void setAllCell(int userId, String pkg, List<VCell> cell) throws RemoteException { getOrCreateConfig(userId, pkg).allCell = cell; mPersistenceLayer.save(); }
@Override public VLocation getLocation(int userId, String pkg) throws RemoteException { VLocConfig config = getOrCreateConfig(userId, pkg); mPersistenceLayer.save(); switch (config.mode) { case MODE_USE_SELF: return config.location; case MODE_USE_GLOBAL: return mGlobalConfig.location; case MODE_CLOSE: default: return null; } }
@Override public VCell getCell(int userId, String pkg) throws RemoteException { VLocConfig config = getOrCreateConfig(userId, pkg); mPersistenceLayer.save(); switch (config.mode) { case MODE_USE_SELF: return config.cell; case MODE_USE_GLOBAL: return mGlobalConfig.cell; case MODE_CLOSE: default: return null; } }
@Override public List<VCell> getAllCell(int userId, String pkg) throws RemoteException { VLocConfig config = getOrCreateConfig(userId, pkg); mPersistenceLayer.save(); switch (config.mode) { case MODE_USE_SELF: return config.allCell; case MODE_USE_GLOBAL: return mGlobalConfig.allCell; case MODE_CLOSE: default: return null; } }
@Override public List<VCell> getNeighboringCell(int userId, String pkg) throws RemoteException { VLocConfig config = getOrCreateConfig(userId, pkg); mPersistenceLayer.save(); switch (config.mode) { case MODE_USE_SELF: return config.neighboringCell; case MODE_USE_GLOBAL: return mGlobalConfig.neighboringCell; case MODE_CLOSE: default: return null; } }
@Override public int getMode(int userId, String pkg) { synchronized (mLocConfigs) { VLocConfig config = getOrCreateConfig(userId, pkg); mPersistenceLayer.save(); return config.mode; } }
@Override public int getMode(int userId, String pkg) throws RemoteException { synchronized (mLocConfigs) { VLocConfig config = getOrCreateConfig(userId, pkg); mPersistenceLayer.save(); return config.mode; } }
@Override public void setNeighboringCell(int userId, String pkg, List<VCell> cell) throws RemoteException { getOrCreateConfig(userId, pkg).neighboringCell = cell; mPersistenceLayer.save(); }
@Override public void setMode(int userId, String pkg, int mode) { synchronized (mLocConfigs) { getOrCreateConfig(userId, pkg).mode = mode; mPersistenceLayer.save(); } }
@Override public void setCell(int userId, String pkg, VCell cell) { getOrCreateConfig(userId, pkg).cell = cell; mPersistenceLayer.save(); }
@Override public void setLocation(int userId, String pkg, VLocation loc) { getOrCreateConfig(userId, pkg).location = loc; mPersistenceLayer.save(); }
@Override public void setMode(int userId, String pkg, int mode) throws RemoteException { synchronized (mLocConfigs) { getOrCreateConfig(userId, pkg).mode = mode; mPersistenceLayer.save(); } }
@Override public void setCell(int userId, String pkg, VCell cell) throws RemoteException { getOrCreateConfig(userId, pkg).cell = cell; mPersistenceLayer.save(); }
@Override public void setAllCell(int userId, String pkg, List<VCell> cell) throws RemoteException { getOrCreateConfig(userId, pkg).allCell = cell; mPersistenceLayer.save(); }
@Override public void setLocation(int userId, String pkg, VLocation loc) throws RemoteException { getOrCreateConfig(userId, pkg).location = loc; mPersistenceLayer.save(); }