<?xml version="1.0" encoding="utf-8"?>
<!-- 
    Mobile Utils Plugin
    Created by Patryk Stepniewski
    Copyright (c) 2014-2019 gameDNA Ltd. All Rights Reserved.
-->
<root xmlns:android="http://schemas.openharmony.com">

	<addRequestPermissions>
		<insert>
      ohos.permission.GET_NETWORK_INFO
      ohos.permission.INTERNET
      ohos.permission.GET_WIFI_INFO
    </insert>
	</addRequestPermissions>

  <resourceCopies>
    <log text="CrashSight prebuildCopies"/>
    <log text="prebuildCopies $S(PluginDir)/CrashSight.har"/>
    <log text="prebuildCopies $S(BuildDir)/entry/hars/CrashSight.har"/>
    <copyFile src="$S(PluginDir)/CrashSight.har" dst="$S(BuildDir)/entry/hars/CrashSight.har"/>
  </resourceCopies>
  <ProjectOHPackageJsonOverridesAddHarPackageNames>
    <insert>
      CrashSight
    </insert>
  </ProjectOHPackageJsonOverridesAddHarPackageNames>
  <entryAbilityImportAdditions>
	<insert>
    import { CrashSightMain } from "CrashSight";
  </insert>
  </entryAbilityImportAdditions>

  <AkiJSBindImportAdditions>
    <insert>
      import {CrashSightClass} from '../entryability/EntryAbility'
    </insert>
  </AkiJSBindImportAdditions>


  <AkiJSBindMainThreadAdditions>
    <insert>
      nativeRender.JSBind.bindFunction("CrashSightClass.initContext", CrashSightClass.initContext);
    </insert>
  </AkiJSBindMainThreadAdditions>

	
  <entryAbilityExternalClassAdditions>
	<insert>
		export class CrashSightClass {


		static initContext() :number{
		let context = GlobalContext.loadGlobalThis(GlobalContextConstants.UE_ABILITY_CONTEXT) as Context;
		CrashSightMain.getInstance().initContextInJS(context);
		return 1;
		}

		}
	</insert>
  </entryAbilityExternalClassAdditions>
</root>
