|
|
|
@ -806,7 +806,8 @@ public class AppMaster {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MicroPhotoContext.AppConfig appConfig = MicroPhotoContext.getMpAppConfig(mService.getApplicationContext());
|
|
|
|
|
final Context context = mService.getApplicationContext();
|
|
|
|
|
MicroPhotoContext.AppConfig appConfig = MicroPhotoContext.getMpAppConfig(context);
|
|
|
|
|
|
|
|
|
|
if (TextUtils.equals(ip, appConfig.server) && port == appConfig.port) {
|
|
|
|
|
mService.logger.info("New CMA is not changed");
|
|
|
|
@ -816,9 +817,10 @@ public class AppMaster {
|
|
|
|
|
appConfig.server = ip;
|
|
|
|
|
appConfig.port = port;
|
|
|
|
|
|
|
|
|
|
MicroPhotoContext.saveMpAppConfig(mService.getApplicationContext(), appConfig);
|
|
|
|
|
MicroPhotoContext.saveMpAppConfig(context, appConfig);
|
|
|
|
|
|
|
|
|
|
mService.logger.warning("Restart MpAPP for CMA changing");
|
|
|
|
|
|
|
|
|
|
Thread th = new Thread(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
@ -827,7 +829,7 @@ public class AppMaster {
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
MicroPhotoContext.restartMpApp(mService.getApplicationContext());
|
|
|
|
|
MicroPhotoContext.restartMpApp(context);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|