flag for services created by user
This commit is contained in:
parent
f58265ae9f
commit
dbc7ff3b7d
|
@ -28,7 +28,9 @@ public class HiddenServicesActivity extends AppCompatActivity {
|
|||
HSContentProvider.HiddenService._ID,
|
||||
HSContentProvider.HiddenService.NAME,
|
||||
HSContentProvider.HiddenService.PORT,
|
||||
HSContentProvider.HiddenService.DOMAIN};
|
||||
HSContentProvider.HiddenService.DOMAIN,
|
||||
HSContentProvider.HiddenService.CREATED_BY_USER
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -53,7 +55,7 @@ public class HiddenServicesActivity extends AppCompatActivity {
|
|||
mAdapter = new OnionListAdapter(
|
||||
this,
|
||||
mCR.query(
|
||||
HSContentProvider.CONTENT_URI, mProjection, null, null, null
|
||||
HSContentProvider.CONTENT_URI, mProjection, "created_by_user=1", null, null
|
||||
),
|
||||
0
|
||||
);
|
||||
|
|
|
@ -16,6 +16,7 @@ public class HSDatabase extends SQLiteOpenHelper {
|
|||
"name TEXT, " +
|
||||
"domain TEXT, " +
|
||||
"onion_port INTEGER, " +
|
||||
"created_by_user INTEGER DEFAULT 0, " +
|
||||
"port INTEGER);";
|
||||
|
||||
public HSDatabase(Context context) {
|
||||
|
|
|
@ -80,6 +80,7 @@ public class HSDataDialog extends DialogFragment {
|
|||
fields.put("name", name);
|
||||
fields.put("port", local);
|
||||
fields.put("onion_port", remote);
|
||||
fields.put("created_by_user", 1);
|
||||
|
||||
ContentResolver cr = getContext().getContentResolver();
|
||||
|
||||
|
|
|
@ -126,6 +126,7 @@ public class HSContentProvider extends ContentProvider {
|
|||
public static final String PORT = "port";
|
||||
public static final String ONION_PORT = "onion_port";
|
||||
public static final String DOMAIN = "domain";
|
||||
public static final String CREATED_BY_USER = "created_by_user";
|
||||
|
||||
private HiddenService() {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue