();
13 | }
14 |
15 | private final Runnable mPopStackRunnable = new Runnable() {
16 | public void run() {
17 | Runnable r = null;
18 | synchronized (mThingsToLoad) {
19 | if (!mThingsToLoad.empty()) {
20 | r = mThingsToLoad.pop();
21 | }
22 | }
23 | if (r != null) {
24 | r.run();
25 | }
26 | }
27 | };
28 |
29 | public void push(Runnable r) {
30 | synchronized (mThingsToLoad) {
31 | mThingsToLoad.push(r);
32 | }
33 | mAsyncLoader.execute(mPopStackRunnable);
34 | }
35 |
36 | public void clear() {
37 | synchronized (mThingsToLoad) {
38 | mThingsToLoad.clear();
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/org/parandroid/testEncryptionOverhead.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/erikwt/ParandroidMessaging/a767678955fc6fb4ababcf9d1cec0f688258416b/src/org/parandroid/testEncryptionOverhead.class
--------------------------------------------------------------------------------
/src/org/w3c/dom/events/EventException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE.
10 | * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11 | */
12 |
13 | package org.w3c.dom.events;
14 |
15 | /**
16 | * Event operations may throw an EventException
as specified in
17 | * their method descriptions.
18 | * See also the Document Object Model (DOM) Level 2 Events Specification.
19 | * @since DOM Level 2
20 | */
21 | public class EventException extends RuntimeException {
22 | public EventException(short code, String message) {
23 | super(message);
24 | this.code = code;
25 | }
26 | public short code;
27 | // EventExceptionCode
28 | /**
29 | * If the Event
's type was not specified by initializing the
30 | * event before the method was called. Specification of the Event's type
31 | * as null
or an empty string will also trigger this
32 | * exception.
33 | */
34 | public static final short UNSPECIFIED_EVENT_TYPE_ERR = 0;
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/events/EventListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE.
10 | * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11 | */
12 |
13 | package org.w3c.dom.events;
14 |
15 | /**
16 | * The EventListener
interface is the primary method for
17 | * handling events. Users implement the EventListener
interface
18 | * and register their listener on an EventTarget
using the
19 | * AddEventListener
method. The users should also remove their
20 | * EventListener
from its EventTarget
after they
21 | * have completed using the listener.
22 | *
When a Node
is copied using the cloneNode
23 | * method the EventListener
s attached to the source
24 | * Node
are not attached to the copied Node
. If
25 | * the user wishes the same EventListener
s to be added to the
26 | * newly created copy the user must add them manually.
27 | *
See also the Document Object Model (DOM) Level 2 Events Specification.
28 | * @since DOM Level 2
29 | */
30 | public interface EventListener {
31 | /**
32 | * This method is called whenever an event occurs of the type for which
33 | * the EventListener
interface was registered.
34 | * @param evt The Event
contains contextual information
35 | * about the event. It also contains the stopPropagation
36 | * and preventDefault
methods which are used in
37 | * determining the event's flow and default action.
38 | */
39 | public void handleEvent(Event evt);
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/ElementExclusiveTimeContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.DOMException;
16 | import org.w3c.dom.NodeList;
17 |
18 | /**
19 | * This interface defines a time container with semantics based upon par, but
20 | * with the additional constraint that only one child element may play at a
21 | * time.
22 | */
23 | public interface ElementExclusiveTimeContainer extends ElementTimeContainer {
24 | /**
25 | * Controls the end of the container. Need to address thr id-ref value.
26 | * @exception DOMException
27 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
28 | */
29 | public String getEndSync();
30 | public void setEndSync(String endSync)
31 | throws DOMException;
32 |
33 | /**
34 | * This should support another method to get the ordered collection of
35 | * paused elements (the paused stack) at a given point in time.
36 | * @return All paused elements at the current time.
37 | */
38 | public NodeList getPausedElements();
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/ElementLayout.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.DOMException;
16 |
17 | /**
18 | * This interface is used by SMIL elements root-layout, top-layout and region.
19 | *
20 | */
21 | public interface ElementLayout {
22 | /**
23 | * @exception DOMException
24 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
25 | */
26 | public String getTitle();
27 | public void setTitle(String title)
28 | throws DOMException;
29 |
30 | /**
31 | * @exception DOMException
32 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
33 | */
34 | public String getBackgroundColor();
35 | public void setBackgroundColor(String backgroundColor)
36 | throws DOMException;
37 |
38 | /**
39 | * @exception DOMException
40 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
41 | */
42 | public int getHeight();
43 | public void setHeight(int height)
44 | throws DOMException;
45 |
46 | /**
47 | * @exception DOMException
48 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
49 | */
50 | public int getWidth();
51 | public void setWidth(int width)
52 | throws DOMException;
53 |
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/ElementParallelTimeContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.DOMException;
16 |
17 | /**
18 | * A parallel
container defines a simple parallel time grouping
19 | * in which multiple elements can play back at the same time. It may have to
20 | * specify a repeat iteration. (?)
21 | */
22 | public interface ElementParallelTimeContainer extends ElementTimeContainer {
23 | /**
24 | * Controls the end of the container. Need to address thr id-ref value.
25 | * @exception DOMException
26 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
27 | */
28 | public String getEndSync();
29 | public void setEndSync(String endSync)
30 | throws DOMException;
31 |
32 | /**
33 | * This method returns the implicit duration in seconds.
34 | * @return The implicit duration in seconds or -1 if the implicit is
35 | * unknown (indefinite?).
36 | */
37 | public float getImplicitDuration();
38 |
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/ElementSequentialTimeContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * A seq
container defines a sequence of elements in which
17 | * elements play one after the other.
18 | */
19 | public interface ElementSequentialTimeContainer extends ElementTimeContainer {
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/ElementSyncBehavior.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * The synchronization behavior extension.
17 | */
18 | public interface ElementSyncBehavior {
19 | /**
20 | * The runtime synchronization behavior for an element.
21 | */
22 | public String getSyncBehavior();
23 |
24 | /**
25 | * The sync tolerance for the associated element. It has an effect only if
26 | * the element has syncBehavior="locked"
.
27 | */
28 | public float getSyncTolerance();
29 |
30 | /**
31 | * Defines the default value for the runtime synchronization behavior for
32 | * an element, and all descendents.
33 | */
34 | public String getDefaultSyncBehavior();
35 |
36 | /**
37 | * Defines the default value for the sync tolerance for an element, and
38 | * all descendents.
39 | */
40 | public float getDefaultSyncTolerance();
41 |
42 | /**
43 | * If set to true, forces the time container playback to sync to this
44 | * element.
45 | */
46 | public boolean getSyncMaster();
47 |
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/ElementTargetAttributes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * This interface define the set of animation target extensions.
17 | */
18 | public interface ElementTargetAttributes {
19 | /**
20 | * The name of the target attribute.
21 | */
22 | public String getAttributeName();
23 | public void setAttributeName(String attributeName);
24 |
25 | // attributeTypes
26 | public static final short ATTRIBUTE_TYPE_AUTO = 0;
27 | public static final short ATTRIBUTE_TYPE_CSS = 1;
28 | public static final short ATTRIBUTE_TYPE_XML = 2;
29 |
30 | /**
31 | * A code representing the value of the attributeType attribute, as
32 | * defined above. Default value is ATTRIBUTE_TYPE_CODE
.
33 | */
34 | public short getAttributeType();
35 | public void setAttributeType(short attributeType);
36 |
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/ElementTimeContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.NodeList;
16 |
17 | /**
18 | * This is a placeholder - subject to change. This represents generic
19 | * timelines.
20 | */
21 | public interface ElementTimeContainer extends ElementTime {
22 | /**
23 | * A NodeList that contains all timed childrens of this node. If there are
24 | * no timed children, the Nodelist
is empty. An iterator
25 | * is more appropriate here than a node list but it requires Traversal
26 | * module support.
27 | */
28 | public NodeList getTimeChildren();
29 |
30 | /**
31 | * Returns a list of child elements active at the specified invocation.
32 | * @param instant The desired position on the local timeline in
33 | * milliseconds.
34 | * @return List of timed child-elements active at instant.
35 | */
36 | public NodeList getActiveChildrenAt(float instant);
37 |
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILAnimateColorElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * This interface represents the SMIL animateColor
element.
17 | */
18 | public interface SMILAnimateColorElement extends SMILAnimation {
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILAnimateElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * This interface represents the SMIL animate
element.
17 | */
18 | public interface SMILAnimateElement extends SMILAnimation {
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILAnimateMotionElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.DOMException;
16 |
17 | /**
18 | * This interface present the animationMotion
element in SMIL.
19 | */
20 | public interface SMILAnimateMotionElement extends SMILAnimateElement {
21 | /**
22 | * Specifies the curve that describes the attribute value as a function
23 | * of time. Check with the SVG spec for better support
24 | * @exception DOMException
25 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
26 | */
27 | public String getPath();
28 | public void setPath(String path)
29 | throws DOMException;
30 |
31 | /**
32 | * Specifies the origin of motion for the animation.
33 | * @exception DOMException
34 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
35 | */
36 | public String getOrigin();
37 | public void setOrigin(String origin)
38 | throws DOMException;
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILDocument.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | *
12 | * Difference to the original copy of this file:
13 | * 1) ADD public SMILElement getHead();
14 | * 2) ADD public SMILElement getBody();
15 | * 3) ADD public SMILLayoutElement getLayout();
16 | */
17 |
18 | package org.w3c.dom.smil;
19 |
20 | import org.w3c.dom.Document;
21 |
22 | /**
23 | * A SMIL document is the root of the SMIL Hierarchy and holds the entire
24 | * content. Beside providing access to the hierarchy, it also provides some
25 | * convenience methods for accessing certain sets of information from the
26 | * document. Cover document timing, document locking?, linking modality and
27 | * any other document level issues. Are there issues with nested SMIL files?
28 | * Is it worth talking about different document scenarios, corresponding to
29 | * differing profiles? E.g. Standalone SMIL, HTML integration, etc.
30 | */
31 | public interface SMILDocument extends Document, ElementSequentialTimeContainer {
32 |
33 | /**
34 | * Returns the element that contains the layout node of this document,
35 | * i.e. the HEAD
element.
36 | */
37 | public SMILElement getHead();
38 |
39 | /**
40 | * Returns the element that contains the par's of the document, i.e. the
41 | * BODY
element.
42 | */
43 | public SMILElement getBody();
44 |
45 | /**
46 | * Returns the element that contains the layout information of the presentation,
47 | * i.e. the LAYOUT
element.
48 | */
49 | public SMILLayoutElement getLayout();
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.DOMException;
16 | import org.w3c.dom.Element;
17 |
18 | /**
19 | * The SMILElement
interface is the base for all SMIL element
20 | * types. It follows the model of the HTMLElement
in the HTML
21 | * DOM, extending the base Element
class to denote SMIL-specific
22 | * elements.
23 | *
Note that the SMILElement
interface overlaps with the
24 | * HTMLElement
interface. In practice, an integrated document
25 | * profile that include HTML and SMIL modules will effectively implement both
26 | * interfaces (see also the DOM documentation discussion of Inheritance vs
27 | * Flattened Views of the API ). // etc. This needs attention
28 | */
29 | public interface SMILElement extends Element {
30 | /**
31 | * The unique id.
32 | * @exception DOMException
33 | * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
34 | */
35 | public String getId();
36 | public void setId(String id)
37 | throws DOMException;
38 |
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILLayoutElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | *
12 | * Difference to the original copy of this file:
13 | * 1) ADD public SMILRootLayoutElement getRootLayout();
14 | * 2) ADD public NodeList getRegions();
15 | */
16 |
17 | package org.w3c.dom.smil;
18 |
19 | import org.w3c.dom.NodeList;
20 |
21 | /**
22 | * Declares layout type for the document. See the LAYOUT element definition .
23 | *
24 | */
25 | public interface SMILLayoutElement extends SMILElement {
26 | /**
27 | * The mime type of the layout langage used in this layout element.The
28 | * default value of the type attribute is "text/smil-basic-layout".
29 | */
30 | public String getType();
31 |
32 | /**
33 | * true
if the player can understand the mime type,
34 | * false
otherwise.
35 | */
36 | public boolean getResolved();
37 |
38 | /**
39 | * Returns the root layout element of this document.
40 | */
41 | public SMILRootLayoutElement getRootLayout();
42 |
43 | /**
44 | * Return the region elements of this document.
45 | */
46 | public NodeList getRegions();
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILParElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007-2008 Esmertec AG.
3 | * Copyright (C) 2007-2008 The Android Open Source Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.w3c.dom.smil;
19 |
20 | public interface SMILParElement extends ElementParallelTimeContainer,
21 | SMILElement {
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILRefElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * // audio, video, ...
17 | */
18 | public interface SMILRefElement extends SMILMediaElement {
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILRegionInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * Declares rendering surface for an element. See the region attribute
17 | * definition .
18 | */
19 | public interface SMILRegionInterface {
20 | /**
21 | */
22 | public SMILRegionElement getRegion();
23 | public void setRegion(SMILRegionElement region);
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILRegionMediaElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007-2008 Esmertec AG.
3 | * Copyright (C) 2007-2008 The Android Open Source Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.w3c.dom.smil;
19 |
20 | public interface SMILRegionMediaElement extends SMILMediaElement,
21 | SMILRegionInterface {
22 | }
23 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILRootLayoutElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * Declares layout properties for the root-layout element. See the
17 | * root-layout element definition .
18 | */
19 | public interface SMILRootLayoutElement extends SMILElement, ElementLayout {
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILSetElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * This interface represents the set element.
17 | */
18 | public interface SMILSetElement extends ElementTimeControl, ElementTime, ElementTargetAttributes, SMILElement {
19 | /**
20 | * Specifies the value for the attribute during the duration of this
21 | * element.
22 | */
23 | public String getTo();
24 | public void setTo(String to);
25 |
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILSwitchElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.Element;
16 |
17 | /**
18 | * Defines a block of content control. See the switch element definition .
19 | */
20 | public interface SMILSwitchElement extends SMILElement {
21 | /**
22 | * Returns the slected element at runtime. null
if the
23 | * selected element is not yet available.
24 | * @return The selected Element
for thisd switch
25 | * element.
26 | */
27 | public Element getSelectedElement();
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/SMILTopLayoutElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * Declares layout properties for the top-layout element. See the top-layout
17 | * element definition .
18 | */
19 | public interface SMILTopLayoutElement extends SMILElement, ElementLayout {
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/TimeEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | import org.w3c.dom.events.Event;
16 | import org.w3c.dom.views.AbstractView;
17 |
18 | /**
19 | * The TimeEvent
interface provides specific contextual
20 | * information associated with Time events.
21 | */
22 | public interface TimeEvent extends Event {
23 | /**
24 | * The view
attribute identifies the
25 | * AbstractView
from which the event was generated.
26 | */
27 | public AbstractView getView();
28 |
29 | /**
30 | * Specifies some detail information about the Event
,
31 | * depending on the type of event.
32 | */
33 | public int getDetail();
34 |
35 | /**
36 | * The initTimeEvent
method is used to initialize the value
37 | * of a TimeEvent
created through the
38 | * DocumentEvent
interface. This method may only be called
39 | * before the TimeEvent
has been dispatched via the
40 | * dispatchEvent
method, though it may be called multiple
41 | * times during that phase if necessary. If called multiple times, the
42 | * final invocation takes precedence.
43 | * @param typeArg Specifies the event type.
44 | * @param viewArg Specifies the Event
's
45 | * AbstractView
.
46 | * @param detailArg Specifies the Event
's detail.
47 | */
48 | public void initTimeEvent(String typeArg,
49 | AbstractView viewArg,
50 | int detailArg);
51 |
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/smil/TimeList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10 | * details.
11 | */
12 |
13 | package org.w3c.dom.smil;
14 |
15 | /**
16 | * The TimeList
interface provides the abstraction of an ordered
17 | * collection of times, without defining or constraining how this collection
18 | * is implemented.
19 | *
The items in the TimeList
are accessible via an integral
20 | * index, starting from 0.
21 | */
22 | public interface TimeList {
23 | /**
24 | * Returns the index
th item in the collection. If
25 | * index
is greater than or equal to the number of times in
26 | * the list, this returns null
.
27 | * @param index Index into the collection.
28 | * @return The time at the index
th position in the
29 | * TimeList
, or null
if that is not a valid
30 | * index.
31 | */
32 | public Time item(int index);
33 |
34 | /**
35 | * The number of times in the list. The range of valid child time indices
36 | * is 0 to length-1
inclusive.
37 | */
38 | public int getLength();
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/views/AbstractView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE.
10 | * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11 | */
12 |
13 | package org.w3c.dom.views;
14 |
15 | /**
16 | * A base interface that all views shall derive from.
17 | *
See also the Document Object Model (DOM) Level 2 Views Specification.
18 | * @since DOM Level 2
19 | */
20 | public interface AbstractView {
21 | /**
22 | * The source DocumentView
of which this is an
23 | * AbstractView
.
24 | */
25 | public DocumentView getDocument();
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/org/w3c/dom/views/DocumentView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000 World Wide Web Consortium,
3 | * (Massachusetts Institute of Technology, Institut National de
4 | * Recherche en Informatique et en Automatique, Keio University). All
5 | * Rights Reserved. This program is distributed under the W3C's Software
6 | * Intellectual Property License. This program is distributed in the
7 | * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 | * PURPOSE.
10 | * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11 | */
12 |
13 | package org.w3c.dom.views;
14 |
15 | /**
16 | * The DocumentView
interface is implemented by
17 | * Document
objects in DOM implementations supporting DOM
18 | * Views. It provides an attribute to retrieve the default view of a
19 | * document.
20 | *
See also the Document Object Model (DOM) Level 2 Views Specification.
21 | * @since DOM Level 2
22 | */
23 | public interface DocumentView {
24 | /**
25 | * The default AbstractView
for this Document
,
26 | * or null
if none available.
27 | */
28 | public AbstractView getDefaultView();
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/tests/Android.mk:
--------------------------------------------------------------------------------
1 | # Copyright 2008, The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | LOCAL_PATH:= $(call my-dir)
16 | include $(CLEAR_VARS)
17 |
18 | # We only want this apk build for tests.
19 | LOCAL_MODULE_TAGS := tests
20 |
21 | LOCAL_JAVA_LIBRARIES := android.test.runner
22 |
23 | # Include all test java files.
24 | LOCAL_SRC_FILES := $(call all-java-files-under, src)
25 |
26 | # Notice that we don't have to include the src files of Email because, by
27 | # running the tests using an instrumentation targeting Eamil, we
28 | # automatically get all of its classes loaded into our environment.
29 |
30 | LOCAL_PACKAGE_NAME := ParandroidMessagingTests
31 |
32 | LOCAL_INSTRUMENTATION_FOR := ParandroidMessaging
33 |
34 | include $(BUILD_PACKAGE)
35 |
36 |
--------------------------------------------------------------------------------
/tests/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
33 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/tests/src/org/parandroid/mms/ui/ConversationListTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
18 | package org.parandroid.sms.ui;
19 |
20 | import org.parandroid.sms.R;
21 | import android.content.Context;
22 | import android.test.ActivityInstrumentationTestCase2;
23 | import android.test.suitebuilder.annotation.MediumTest;
24 |
25 | /**
26 | * Various instrumentation tests for ConversationList.
27 | *
28 | */
29 | public class ConversationListTests
30 | extends ActivityInstrumentationTestCase2 {
31 |
32 | private Context mContext;
33 |
34 | public ConversationListTests() {
35 | super("org.parandroid.sms", ConversationList.class);
36 | }
37 |
38 | @Override
39 | protected void setUp() throws Exception {
40 | super.setUp();
41 | mContext = getInstrumentation().getTargetContext();
42 | }
43 |
44 | /**
45 | * Tests that various UI calls can be made safely even before the threads
46 | * have been loaded. This catches various race conditions.
47 | */
48 | /* this test seems to get stuck!
49 | @MediumTest
50 | public void testUiRaceConditions() {
51 | ConversationList a = getActivity();
52 |
53 | // menus
54 | getInstrumentation().invokeMenuActionSync(a, a.MENU_COMPOSE_NEW, 0);
55 | getInstrumentation().invokeMenuActionSync(a, a.MENU_SEARCH, 0);
56 | getInstrumentation().invokeMenuActionSync(a, a.MENU_PREFERENCES, 0);
57 | getInstrumentation().invokeMenuActionSync(a, a.MENU_DELETE_ALL, 0);
58 | }
59 | */
60 | }
61 |
--------------------------------------------------------------------------------
/tests/src/org/parandroid/mms/util/PhoneNumberComparisonTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.parandroid.sms.util;
18 |
19 | import android.test.AndroidTestCase;
20 | import android.test.suitebuilder.annotation.SmallTest;
21 | import android.util.Log;
22 | import android.telephony.PhoneNumberUtils;
23 | import org.parandroid.sms.LogTag;
24 |
25 | public class PhoneNumberComparisonTest extends AndroidTestCase {
26 |
27 | @SmallTest
28 | public void testCompareSmsShortcode() {
29 | Log.i(LogTag.APP, "testCompareSmsShortcode");
30 |
31 | // test the short codes themselves are compared correctly
32 | assertFalse(PhoneNumberUtils.compare("321", "54321"));
33 | assertFalse(PhoneNumberUtils.compare("4321", "54321"));
34 | assertFalse(PhoneNumberUtils.compare("54321", "654321"));
35 |
36 | // test comparing one shortcode to a regular phone number
37 | assertFalse(PhoneNumberUtils.compare("54321", "6505554321"));
38 | assertFalse(PhoneNumberUtils.compare("54321", "+16505554321"));
39 | assertFalse(PhoneNumberUtils.compare("654321", "6505654321"));
40 | assertFalse(PhoneNumberUtils.compare("654321", "+16505654321"));
41 | }
42 |
43 |
44 | }
--------------------------------------------------------------------------------