private void InitSystemIcons()
        {
            List <AppInfo> list = ((IEnumerable <AppInfo>) new JsonParser(string.Empty).GetAppList()).ToList <AppInfo>();

            this.mHomeApp?.InitMoreAppsIcon();
            foreach (AppInfo appInfo in list)
            {
                if (string.Compare(appInfo.Package, "com.android.vending", StringComparison.OrdinalIgnoreCase) != 0 && string.Compare(appInfo.Package, "com.google.android.play.games", StringComparison.OrdinalIgnoreCase) != 0)
                {
                    AppIconModel newIconForKey = this.GetNewIconForKey(appInfo.Package);
                    newIconForKey.Init(appInfo);
                    newIconForKey.AppName        = "STRING_" + appInfo.Name.ToUpper(CultureInfo.InvariantCulture).Trim().Replace(" ", "_") + "_APP";
                    newIconForKey.IsInstalledApp = false;
                    newIconForKey.AddToMoreAppsDock(55.0, 55.0);
                    this.mHomeApp?.AddMoreAppsDockPanelIcon(newIconForKey, (DownloadInstallApk)null);
                }
                else
                {
                    AppIconModel newIconForKey = this.GetNewIconForKey(appInfo.Package);
                    newIconForKey.Init(appInfo);
                    newIconForKey.IsInstalledApp  = false;
                    newIconForKey.mIsAppRemovable = false;
                    newIconForKey.AppName         = "STRING_" + appInfo.Name.ToUpper(CultureInfo.InvariantCulture).Trim().Replace(" ", "_") + "_APP";
                    newIconForKey.AddToInstallDrawer();
                    this.mHomeApp?.AddInstallDrawerIcon(newIconForKey, (DownloadInstallApk)null);
                }
            }
        }
        private void AddIcon(AppInfo item)
        {
            AppIconModel newIconForKey = this.GetNewIconForKey(item.Package);

            newIconForKey.Init(item);
            newIconForKey.AddToInstallDrawer();
            this.mHomeApp?.AddInstallDrawerIcon(newIconForKey, (DownloadInstallApk)null);
        }
        private void AddAppSuggestionIcon(AppSuggestionPromotion appSuggestionInfo)
        {
            string       appPackage    = appSuggestionInfo.AppPackage;
            double       height        = 50.0;
            double       width         = 50.0;
            AppIconModel newIconForKey = this.GetNewIconForKey(appPackage);

            try
            {
                if (newIconForKey == null)
                {
                    return;
                }
                newIconForKey.IsAppSuggestionActive = true;
                newIconForKey.PackageName           = appPackage;
                if (appSuggestionInfo.IsShowRedDot)
                {
                    newIconForKey.IsRedDotVisible = true;
                }
                newIconForKey.Init(appSuggestionInfo);
                if (appSuggestionInfo.IsEmailRequired && !RegistryManager.Instance.Guest[this.mParentWindow.mVmName].IsGoogleSigninDone)
                {
                    return;
                }
                if (string.Equals(appSuggestionInfo.AppLocation, "dock", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (appSuggestionInfo.IconHeight != 0.0)
                    {
                        height = appSuggestionInfo.IconHeight;
                    }
                    if (appSuggestionInfo.IconWidth != 0.0)
                    {
                        width = appSuggestionInfo.IconWidth;
                    }
                    newIconForKey.AddToDock(height, width);
                    this.mHomeApp?.AddDockPanelIcon(newIconForKey, (DownloadInstallApk)null);
                }
                else if (string.Equals(appSuggestionInfo.AppLocation, "more_apps", StringComparison.InvariantCultureIgnoreCase))
                {
                    newIconForKey.AddToMoreAppsDock(55.0, 55.0);
                    this.mHomeApp?.AddMoreAppsDockPanelIcon(newIconForKey, (DownloadInstallApk)null);
                }
                else
                {
                    newIconForKey.AddToInstallDrawer();
                    this.mHomeApp?.AddInstallDrawerIcon(newIconForKey, (DownloadInstallApk)null);
                }
            }
            catch (Exception ex)
            {
                Logger.Error("Exception in adding app suggestion icon: " + ex.ToString());
            }
        }
        internal void AddAppIcon(
            string package,
            string appName,
            string apkUrl,
            DownloadInstallApk downloader)
        {
            if (string.IsNullOrEmpty(package))
            {
                return;
            }
            AppIconModel newIconForKey = this.GetNewIconForKey(package);

            newIconForKey.Init(package, appName, apkUrl);
            newIconForKey.AddToInstallDrawer();
            this.mHomeApp?.AddInstallDrawerIcon(newIconForKey, downloader);
        }