To terminate sub application, Application Manager sends the
AUL_TERMINATE_INST request. After this patch is applied, app-core
handles the request to terminate.
Change-Id: I824781adc0035be61a0b71a93e4a8addd45a584d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
if (__context.ops.exit)
__context.ops.exit(__context.data);
break;
+ case AUL_TERMINATE_INST:
+ case AUL_TERMINATE_BG_INST:
case AUL_TERMINATE_BGAPP:
- _DBG("[APP %d] AUL event: AUL_TERMINATE_BGAPP", getpid());
+ _DBG("[APP %d] AUL event: %d", getpid(), type);
if (!__context.allowed_bg)
__remove_suspend_timer();
break;
return 0;
}
- if (type == AUL_TERMINATE_BGAPP && __context.state != AS_PAUSED)
+ if ((type == AUL_TERMINATE_BGAPP || type == AUL_TERMINATE_BG_INST) &&
+ __context.state != AS_PAUSED)
return 0;
if (type == AUL_START)
break;
case AUL_TERMINATE:
break;
+ case AUL_TERMINATE_BG_INST:
+ case AUL_TERMINATE_INST:
case AUL_TERMINATE_BGAPP:
- _DBG("[APP %d] is paused. TERMINATE", getpid());
+ _DBG("[APP %d] TERMINATE", getpid());
__context.state = AS_DYING;
aul_status_update(STATUS_DYING);
if (__context.ops.base.exit)