refactor
This commit is contained in:
parent
0fd59bc78d
commit
e8a5099518
|
@ -32,19 +32,6 @@ public class HiddenServicesActivity extends AppCompatActivity {
|
||||||
HSContentProvider.HiddenService.PORT,
|
HSContentProvider.HiddenService.PORT,
|
||||||
HSContentProvider.HiddenService.DOMAIN};
|
HSContentProvider.HiddenService.DOMAIN};
|
||||||
|
|
||||||
class HSObserver extends ContentObserver {
|
|
||||||
HSObserver(Handler handler) {
|
|
||||||
super(handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onChange(boolean selfChange) {
|
|
||||||
mAdapter.changeCursor(mCR.query(
|
|
||||||
HSContentProvider.CONTENT_URI, mProjection, null, null, null
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -106,4 +93,17 @@ public class HiddenServicesActivity extends AppCompatActivity {
|
||||||
private boolean hasPermission() {
|
private boolean hasPermission() {
|
||||||
return (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED);
|
return (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class HSObserver extends ContentObserver {
|
||||||
|
HSObserver(Handler handler) {
|
||||||
|
super(handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChange(boolean selfChange) {
|
||||||
|
mAdapter.changeCursor(mCR.query(
|
||||||
|
HSContentProvider.CONTENT_URI, mProjection, null, null, null
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue