|
|
@ -457,8 +457,7 @@ public class MicroPhotoService extends Service {
|
|
|
|
ex.printStackTrace();
|
|
|
|
ex.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void restartSelfImpl(Context context, String reason) {
|
|
|
|
private void restartSelf(Context context, String reason) {
|
|
|
|
|
|
|
|
Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
|
|
|
|
Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
|
|
|
|
int noDelay = 1;
|
|
|
|
int noDelay = 1;
|
|
|
|
intent.putExtra("noDelay", noDelay);
|
|
|
|
intent.putExtra("noDelay", noDelay);
|
|
|
@ -551,7 +550,7 @@ public class MicroPhotoService extends Service {
|
|
|
|
int restart = intent.getIntExtra("restart", 0);
|
|
|
|
int restart = intent.getIntExtra("restart", 0);
|
|
|
|
Log.i(TAG, "UPD CFG Fired ACTION=" + action + " restart=" + restart);
|
|
|
|
Log.i(TAG, "UPD CFG Fired ACTION=" + action + " restart=" + restart);
|
|
|
|
if (restart != 0) {
|
|
|
|
if (restart != 0) {
|
|
|
|
restartSelf(context, "Cfg Updated");
|
|
|
|
restartSelfImpl(context, "Cfg Updated");
|
|
|
|
} else if (mService.mNativeHandle != 0) {
|
|
|
|
} else if (mService.mNativeHandle != 0) {
|
|
|
|
mService.reloadConfigs(mService.mNativeHandle);
|
|
|
|
mService.reloadConfigs(mService.mNativeHandle);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -672,7 +671,7 @@ public class MicroPhotoService extends Service {
|
|
|
|
} catch (Exception ex) {
|
|
|
|
} catch (Exception ex) {
|
|
|
|
ex.printStackTrace();
|
|
|
|
ex.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
restartSelf(context, reason);
|
|
|
|
restartSelfImpl(context, reason);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|