/// <summary>
 /// This method returns information whether given in parameter sapaApp instance is currently
 /// visible for user.
 /// </summary>
 /// <param name="sapaApp">
 ///            True when given in parameter sapaApp instance is currently visible for user, false
 ///            otherwise.
 /// @return </param>
 internal virtual bool isVisibleInstance(SapaApp sapaApp)
 {
     if (this.mVisibleAppInfo != null && this.mVisibleAppInfo.App != null)
     {
         return(this.mVisibleAppInfo.App.InstanceId.Equals(sapaApp.InstanceId));
     }
     return(false);
 }
Beispiel #2
0
        /// <summary>
        /// @brief Create action item describing single action of the application
        ///
        /// An example of the action could be a "volume up" or "volume down" action.
        /// </summary>
        /// <param name="appInfo">       Sapa structure describing owner of the action </param>
        /// <param name="actionInfo">    Sapa structure describing action details
        /// </param>
        /// <returns>  new instance of the FcActionItem </returns>
        public virtual FcActionItem newAppItem(SapaAppInfo appInfo, SapaActionInfo actionInfo)
        {
            FcActionAppItem item = new FcActionAppItem(actionInfo);

            SapaApp app = appInfo.App;

            item.ActionRunnable = newCallActionRunnable(app.InstanceId, actionInfo.Id);

            return(item);
        }
Beispiel #3
0
        /// <summary>
        /// @brief Create action item describing a custom return action
        ///
        /// When action is executed, the activity described by a <code>mode</code> parameter
        /// will be opened
        /// </summary>
        /// <param name="appInfo">       Sapa structure describing application </param>
        /// <param name="resId">         Id of drawable from resources of the given application </param>
        /// <param name="activityId">    Id of the activity to be opened
        /// </param>
        /// <returns>  new instance of the FcActionItem </returns>
        public virtual FcActionItem newCustomReturnItem(SapaAppInfo appInfo, int resId, int activityId)
        {
            SapaApp app = appInfo.App;

            FcActionReturnItem item = new FcActionReturnItem(appInfo);

            item.Default        = false;
            item.DrawableId     = resId;
            item.ActionRunnable = newOpenActivityRunnable(app.PackageName, app.InstanceId, activityId);

            return(item);
        }
Beispiel #4
0
        /// <summary>
        /// @brief Create action item describing a default return action
        ///
        /// When action is executed, the default activity of the application will be opened.
        /// </summary>
        /// <param name="appInfo">       Sapa structure describing owner of the action
        /// </param>
        /// <returns>  new instance of the FcActionItem </returns>
        public virtual FcActionItem newDefaultReturnItem(SapaAppInfo appInfo)
        {
            SapaApp app = appInfo.App;

            FcActionReturnItem item = new FcActionReturnItem(appInfo);

            item.Default        = true;
            item.DrawableId     = mDefaultResId;
            item.ActionRunnable = newOpenActivityRunnable(app.PackageName, app.InstanceId, DEFAULT_ACTIVITY_ID);

            return(item);
        }
		/// <summary>
		/// This method returns information whether given in parameter sapaApp instance is currently
		/// visible for user.
		/// </summary>
		/// <param name="sapaApp">
		///            True when given in parameter sapaApp instance is currently visible for user, false
		///            otherwise.
		/// @return </param>
		internal virtual bool isVisibleInstance(SapaApp sapaApp)
		{
			if (this.mVisibleAppInfo != null && this.mVisibleAppInfo.App != null)
			{
				return this.mVisibleAppInfo.App.InstanceId.Equals(sapaApp.InstanceId);
			}
			return false;
		}
 public override Runnable getActionDefinition(SapaApp arg0, string arg1)
 {
     return(null);
 }
		public override Runnable getActionDefinition(SapaApp arg0, string arg1)
		{
			return null;
		}