This commit is contained in:
arrase 2016-11-22 00:22:22 +01:00
parent dbc7ff3b7d
commit 71d24e832b
2 changed files with 9 additions and 3 deletions

View File

@ -139,7 +139,11 @@
<activity <activity
android:name=".ui.hs.HiddenServicesActivity" android:name=".ui.hs.HiddenServicesActivity"
android:label="@string/title_activity_hidden_services" android:label="@string/title_activity_hidden_services"
android:theme="@style/DefaultTheme" /> android:theme="@style/DefaultTheme" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.torproject.android.OrbotMainActivity" />
</activity>
<provider <provider
android:name=".ui.hs.providers.HSContentProvider" android:name=".ui.hs.providers.HSContentProvider"

View File

@ -32,6 +32,8 @@ public class HiddenServicesActivity extends AppCompatActivity {
HSContentProvider.HiddenService.CREATED_BY_USER HSContentProvider.HiddenService.CREATED_BY_USER
}; };
private String mWhere = HSContentProvider.HiddenService.CREATED_BY_USER + "=1";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -55,7 +57,7 @@ public class HiddenServicesActivity extends AppCompatActivity {
mAdapter = new OnionListAdapter( mAdapter = new OnionListAdapter(
this, this,
mCR.query( mCR.query(
HSContentProvider.CONTENT_URI, mProjection, "created_by_user=1", null, null HSContentProvider.CONTENT_URI, mProjection, mWhere, null, null
), ),
0 0
); );
@ -93,7 +95,7 @@ public class HiddenServicesActivity extends AppCompatActivity {
@Override @Override
public void onChange(boolean selfChange) { public void onChange(boolean selfChange) {
mAdapter.changeCursor(mCR.query( mAdapter.changeCursor(mCR.query(
HSContentProvider.CONTENT_URI, mProjection, null, null, null HSContentProvider.CONTENT_URI, mProjection, mWhere, null, null
)); ));
} }
} }