FileDocCategorySizeDatePackage
NotificationTestList.javaAPI DocAndroid 5.1 API34051Thu Mar 12 22:22:44 GMT 2015com.android.statusbartest

NotificationTestList

public class NotificationTestList extends TestActivity

Fields Summary
private static final String
TAG
android.app.NotificationManager
mNM
android.os.Vibrator
mVibrator
android.os.Handler
mHandler
long
mActivityCreateTime
long
mChronometerBase
boolean
mProgressDone
final int[]
kNumberedIconResIDs
final int
kUnnumberedIconResID
private Test[]
mTests
Constructors Summary
Methods Summary
android.graphics.BitmaploadBitmap(int resId)

        BitmapDrawable bd = (BitmapDrawable)getResources().getDrawable(resId);
        return Bitmap.createBitmap(bd.getBitmap());
    
private android.app.PendingIntentmakeIntent()

        Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.addCategory(Intent.CATEGORY_HOME);
        return PendingIntent.getActivity(this, 0, intent, 0);
    
private android.app.PendingIntentmakeIntent2()

        Intent intent = new Intent(this, StatusBarTest.class);
        return PendingIntent.getActivity(this, 0, intent, 0);
    
private android.app.NotificationnotificationWithNumbers(int num)


        
        Notification n = new Notification(this,
                (num >= 0 && num < kNumberedIconResIDs.length)
                    ? kNumberedIconResIDs[num]
                    : kUnnumberedIconResID,
                null,
                System.currentTimeMillis(),
                "Notification", "Number=" + num,
                null);
        n.number = num;
        return n;
    
public voidonCreate(android.os.Bundle icicle)


    
        
        super.onCreate(icicle);
        mVibrator = (Vibrator)getSystemService(VIBRATOR_SERVICE);
        mActivityCreateTime = System.currentTimeMillis();
    
protected java.lang.Stringtag()

        return TAG;
    
protected Test[]tests()

        mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
        
        return mTests;
    
voidtimeNotification(int n, java.lang.String label, long time)

        mNM.notify(n, new Notification(NotificationTestList.this,
                    R.drawable.ic_statusbar_missedcall, null,
                    time, label, "" + new java.util.Date(time), null));