<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="GlobalSuppressions.cs" />
<Compile Include="Interop\Interop.AppCommon.cs" />
<Compile Include="Interop\Interop.AppControl.cs" />
<Compile Include="Interop\Interop.AppEvent.cs" />
<Name>Tizen</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <CodeAnalysisDictionary Include="CustomDictionary.xml" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
{
lock (_lock)
{
- string appId;
- ErrorCode err = Interop.AppCommon.AppGetId(out appId);
- if (err == ErrorCode.None)
+ if (_applicationInfo == null)
{
- try
+ string appId;
+ ErrorCode err = Interop.AppCommon.AppGetId(out appId);
+ if (err == ErrorCode.None)
{
- _applicationInfo = ApplicationManager.GetInstalledApplication(appId);
- }
- catch (Exception e)
- {
- Log.Warn(LogTag, "Failed to get application info. " + e.Message);
+ try
+ {
+ // TODO: Use lazy enabled AppInfo class without throwing exceptions.
+ _applicationInfo = ApplicationManager.GetInstalledApplication(appId);
+ }
+ catch (Exception e)
+ {
+ Log.Warn(LogTag, "Failed to get application info. " + e.Message);
+ }
}
}
}
/// <param name="args">Arguments from commandline.</param>
public virtual void Run(string[] args)
{
+ if (args == null)
+ {
+ throw new ArgumentNullException("args");
+ }
+
s_CurrentApplication = this;
Interop.AppEvent.AddEventHandler(Interop.AppEvent.EventNames.LowMemory, HandleAppEvent, IntPtr.Zero, out _lowMemoryNativeHandle);
private void HandleAppEvent(string eventName, IntPtr eventData, IntPtr data)
{
- Console.WriteLine("HandleAppEvent!! eventName={0}, eventData={1}", eventName, eventData);
Bundle b = new Bundle(eventData);
if (eventName == Interop.AppEvent.EventNames.LowMemory)
{
}
/// <summary>
- /// Gets the excutable path of the application.
+ /// Gets the executable path of the application.
/// </summary>
- public string ExcutablePath
+ public string ExecutablePath
{
get
{
}
/// <summary>
- /// Gets the package type name.
+ /// Gets the application type name.
/// </summary>
- public string Type
+ public string ApplicationType
{
get
{
{
case Interop.ApplicationManager.ErrorCode.InvalidParameter:
return new ArgumentException(errMessage);
- case Interop.ApplicationManager.ErrorCode.OutOfMemory:
- return new OutOfMemoryException(errMessage);
default:
return new InvalidOperationException(errMessage);
}