Search in sources :

Example 76 with Time

use of android.text.format.Time in project android_frameworks_base by ResurrectionRemix.

the class TimeTest method testParse0.

@SmallTest
public void testParse0() throws Exception {
    Time t = new Time(Time.TIMEZONE_UTC);
    t.parse("12345678T901234");
// System.out.println("t=" + t);
}
Also used : Time(android.text.format.Time) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 77 with Time

use of android.text.format.Time in project android_frameworks_base by ResurrectionRemix.

the class TimeTest method testGetActualMaximum0.

@SmallTest
public void testGetActualMaximum0() throws Exception {
    Time t = new Time(Time.TIMEZONE_UTC);
    int r = t.getActualMaximum(Time.SECOND);
// System.out.println("r=" + r);
}
Also used : Time(android.text.format.Time) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 78 with Time

use of android.text.format.Time in project android_frameworks_base by ResurrectionRemix.

the class TimeTest method testMillis1.

@SmallTest
public void testMillis1() throws Exception {
    Time t = new Time(Time.TIMEZONE_UTC);
    t.set(1, 0, 0, 1, 0, 1970);
    long r = t.toMillis(true);
// System.out.println("r=" + r);
}
Also used : Time(android.text.format.Time) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 79 with Time

use of android.text.format.Time in project android_frameworks_base by ResurrectionRemix.

the class TimeTest method testToString0.

@SmallTest
public void testToString0() throws Exception {
    Time t = new Time(Time.TIMEZONE_UTC);
    String r = t.toString();
// System.out.println("r='" + r + "'");
}
Also used : Time(android.text.format.Time) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 80 with Time

use of android.text.format.Time in project android_frameworks_base by ResurrectionRemix.

the class TimeTest method testSet0.

@SmallTest
public void testSet0() throws Exception {
    Time t = new Time(Time.TIMEZONE_UTC);
    t.set(1000L);
    // System.out.println("t.year=" + t.year);
    // System.out.println("t=" + t);
    t.set(2000L);
    // System.out.println("t=" + t);
    t.set(1000L * 60);
    // System.out.println("t=" + t);
    t.set((1000L * 60 * 60 * 24) + 1000L);
// System.out.println("t=" + t);
}
Also used : Time(android.text.format.Time) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

Time (android.text.format.Time)395 SmallTest (android.test.suitebuilder.annotation.SmallTest)97 Test (org.junit.Test)25 ArrayList (java.util.ArrayList)23 Date (java.util.Date)21 NetworkPolicy (android.net.NetworkPolicy)16 TrustedTime (android.util.TrustedTime)16 TextView (android.widget.TextView)15 Bundle (android.os.Bundle)13 TimeFormatException (android.util.TimeFormatException)13 Suppress (android.test.suitebuilder.annotation.Suppress)12 View (android.view.View)12 Paint (android.graphics.Paint)11 IOException (java.io.IOException)11 Matcher (java.util.regex.Matcher)9 IntentFilter (android.content.IntentFilter)7 File (java.io.File)7 DateFormat (java.text.DateFormat)7 SimpleDateFormat (java.text.SimpleDateFormat)7 ContentValues (android.content.ContentValues)6