- case PROC_APPSTATE_NONE:
- case PROC_APPSTATE_ACTIVE:
- case PROC_APPSTATE_INACTIVE:
- case PROC_APPSTATE_BACKGROUND:
- case PROC_APPSTATE_NONUI:
- break;
- default:
- return(EINVAL);
- }
- if (__process_policy(PROC_POLICY_SCOPE_PROCESS, PROC_POLICY_ACTION_APPLY, PROC_POLICY_APP_LIFECYCLE, PROC_POLICY_APPLIFE_STATE, (proc_policy_attribute_t*)&state, pid, (uint64_t)0) != -1)
- return(0);
- else
- return(errno);
-}
-
-int
+ case PROC_APPSTATE_NONE:
+ case PROC_APPSTATE_ACTIVE:
+ case PROC_APPSTATE_INACTIVE:
+ case PROC_APPSTATE_BACKGROUND:
+ case PROC_APPSTATE_NONUI:
+ break;
+ default:
+ return EINVAL;
+ }
+ if (__process_policy(PROC_POLICY_SCOPE_PROCESS, PROC_POLICY_ACTION_APPLY, PROC_POLICY_APP_LIFECYCLE, PROC_POLICY_APPLIFE_STATE, (proc_policy_attribute_t*)&state, pid, (uint64_t)0) != -1) {
+ return 0;
+ } else {
+ return errno;
+ }
+}
+
+int