Beispiel #1
0
		/// <summary>Inflate a Drawable from an XML resource.</summary>
		/// <remarks>Inflate a Drawable from an XML resource.</remarks>
		/// <exception cref="org.xmlpull.v1.XmlPullParserException">org.xmlpull.v1.XmlPullParserException
		/// 	</exception>
		/// <exception cref="System.IO.IOException">System.IO.IOException</exception>
		internal virtual void inflateWithAttributes(android.content.res.Resources r, org.xmlpull.v1.XmlPullParser
			 parser, android.content.res.TypedArray attrs, int visibleAttr)
		{
			mVisible = attrs.getBoolean(visibleAttr, mVisible);
		}
Beispiel #2
0
		// exception ignored; if this is thrown then it means the runtime is in the midst of
		// being restarted
		/// <summary>
		/// Specifies that a sync should be requested with the specified the account, authority,
		/// and extras at the given frequency.
		/// </summary>
		/// <remarks>
		/// Specifies that a sync should be requested with the specified the account, authority,
		/// and extras at the given frequency. If there is already another periodic sync scheduled
		/// with the account, authority and extras then a new periodic sync won't be added, instead
		/// the frequency of the previous one will be updated.
		/// <p>
		/// These periodic syncs honor the "syncAutomatically" and "masterSyncAutomatically" settings.
		/// Although these sync are scheduled at the specified frequency, it may take longer for it to
		/// actually be started if other syncs are ahead of it in the sync operation queue. This means
		/// that the actual start time may drift.
		/// <p>
		/// Periodic syncs are not allowed to have any of
		/// <see cref="SYNC_EXTRAS_DO_NOT_RETRY">SYNC_EXTRAS_DO_NOT_RETRY</see>
		/// ,
		/// <see cref="SYNC_EXTRAS_IGNORE_BACKOFF">SYNC_EXTRAS_IGNORE_BACKOFF</see>
		/// ,
		/// <see cref="SYNC_EXTRAS_IGNORE_SETTINGS">SYNC_EXTRAS_IGNORE_SETTINGS</see>
		/// ,
		/// <see cref="SYNC_EXTRAS_INITIALIZE">SYNC_EXTRAS_INITIALIZE</see>
		/// ,
		/// <see cref="SYNC_EXTRAS_FORCE">SYNC_EXTRAS_FORCE</see>
		/// ,
		/// <see cref="SYNC_EXTRAS_EXPEDITED">SYNC_EXTRAS_EXPEDITED</see>
		/// ,
		/// <see cref="SYNC_EXTRAS_MANUAL">SYNC_EXTRAS_MANUAL</see>
		/// set to true.
		/// If any are supplied then an
		/// <see cref="System.ArgumentException">System.ArgumentException</see>
		/// will be thrown.
		/// </remarks>
		/// <param name="account">the account to specify in the sync</param>
		/// <param name="authority">the provider to specify in the sync request</param>
		/// <param name="extras">extra parameters to go along with the sync request</param>
		/// <param name="pollFrequency">how frequently the sync should be performed, in seconds.
		/// 	</param>
		/// <exception cref="System.ArgumentException">
		/// if an illegal extra was set or if any of the parameters
		/// are null.
		/// </exception>
		public static void addPeriodicSync(android.accounts.Account account, string authority
			, android.os.Bundle extras, long pollFrequency)
		{
			validateSyncExtrasBundle(extras);
			if (account == null)
			{
				throw new System.ArgumentException("account must not be null");
			}
			if (authority == null)
			{
				throw new System.ArgumentException("authority must not be null");
			}
			if (extras.getBoolean(SYNC_EXTRAS_MANUAL, false) || extras.getBoolean(SYNC_EXTRAS_DO_NOT_RETRY
				, false) || extras.getBoolean(SYNC_EXTRAS_IGNORE_BACKOFF, false) || extras.getBoolean
				(SYNC_EXTRAS_IGNORE_SETTINGS, false) || extras.getBoolean(SYNC_EXTRAS_INITIALIZE
				, false) || extras.getBoolean(SYNC_EXTRAS_FORCE, false) || extras.getBoolean(SYNC_EXTRAS_EXPEDITED
				, false))
			{
				throw new System.ArgumentException("illegal extras were set");
			}
			try
			{
				getContentService().addPeriodicSync(account, authority, extras, pollFrequency);
			}
			catch (android.os.RemoteException)
			{
			}
		}