OSDN Git Service

658752664a6b5776eb7f6768260fe51198527a1a
[android-x86/external-koush-Superuser.git] / Superuser / src / com / koushikdutta / superuser / db / LogEntry.java
1 package com.koushikdutta.superuser.db;
2
3 import java.util.Date;
4
5 import com.koushikdutta.superuser.R;
6
7 public class LogEntry extends UidCommand {
8     public long id;
9     public String action;
10     public int date;
11     
12     public Date getDate() {
13         return new Date((long)date * 1000);
14     }
15
16     public int getActionResource() {
17         if (UidPolicy.ALLOW.equals(action))
18             return R.string.allow;
19         else if (UidPolicy.INTERACTIVE.equals(action))
20             return R.string.interactive;
21         return R.string.deny;
22     }
23 }