Esempio n. 1
0
        /// <summary>
        /// Reads engine arguments passed from the flutter-tizen tool and adds to <paramref name="list"/>.
        /// </summary>
        public static void ParseEngineArgs(IList <string> list)
        {
            string appId    = Application.Current.ApplicationInfo.ApplicationId;
            string tempPath = $"/home/owner/share/tmp/sdk_tools/{appId}.rpm";

            if (!File.Exists(tempPath))
            {
                return;
            }
            try
            {
                var lines = File.ReadAllText(tempPath).Trim().Split('\n');
                foreach (string line in lines)
                {
                    TizenLog.Info($"Enabled: {line}");
                    list.Add(line);
                }
                File.Delete(tempPath);
            }
            catch (Exception ex)
            {
                TizenLog.Warn($"Error while processing a file: {ex}");
            }
        }