FileDocCategorySizeDatePackage
TestAlertActivity.javaAPI DocAndroid 5.1 API1066Thu Mar 12 22:22:44 GMT 2015com.android.statusbartest

TestAlertActivity

public class TestAlertActivity extends android.app.Activity

Fields Summary
int
mId
Constructors Summary
Methods Summary
public voiddismiss(android.view.View v)

        Log.d("StatusBarTest", "TestAlertActivity.dismiss");
        finish();
    
public voidonPause()

        super.onPause();
        Log.d("StatusBarTest", "onPause: Canceling notification id=" + mId);
        NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
        nm.cancel(mId);
        finish();
    
public voidonResume()

        super.onResume();
        Log.d("StatusBarTest", "TestAlertActivity.onResume");
        Intent intent = getIntent();
        mId = intent.getIntExtra("id", -1);
        Log.d("StatusBarTest", "Remembering notification id=" + mId);
        setContentView(R.layout.test_alert);