diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7b88684d51..3b18e8b60b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -11,9 +11,11 @@
+
@@ -26,10 +28,12 @@
+
+
-
+
diff --git a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java
index 18c46d3ae5..c4878b861c 100644
--- a/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java
+++ b/src/org/thoughtcrime/securesms/ContactSelectionListFragment.java
@@ -178,6 +178,7 @@ public class ContactSelectionListFragment extends Fragment
showContactsDescription.setText(R.string.contact_selection_list_fragment__signal_needs_access_to_your_contacts_in_order_to_display_them);
showContactsButton.setVisibility(View.VISIBLE);
+ /*
showContactsButton.setOnClickListener(v -> {
Permissions.with(this)
.request(Manifest.permission.WRITE_CONTACTS, Manifest.permission.READ_CONTACTS)
@@ -190,6 +191,7 @@ public class ContactSelectionListFragment extends Fragment
})
.execute();
});
+ */
}
public void setQueryFilter(String filter) {
diff --git a/src/org/thoughtcrime/securesms/ConversationListActivity.java b/src/org/thoughtcrime/securesms/ConversationListActivity.java
index ce99f0a3e2..57fc652324 100644
--- a/src/org/thoughtcrime/securesms/ConversationListActivity.java
+++ b/src/org/thoughtcrime/securesms/ConversationListActivity.java
@@ -144,6 +144,7 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
private void initializeSearchListener() {
searchAction.setOnClickListener(v -> {
+ /* Loki - We don't need contact permissions
Permissions.with(this)
.request(Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS)
.ifNecessary()
@@ -151,6 +152,7 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
searchAction.getY() + (searchAction.getHeight() / 2)))
.withPermanentDenialDialog(getString(R.string.ConversationListActivity_signal_needs_contacts_permission_in_order_to_search_your_contacts_but_it_has_been_permanently_denied))
.execute();
+ */
});
searchToolbar.setListener(new SearchToolbar.SearchListener() {
diff --git a/src/org/thoughtcrime/securesms/contacts/ContactsCursorLoader.java b/src/org/thoughtcrime/securesms/contacts/ContactsCursorLoader.java
index 807b229ed4..a95cc0330a 100644
--- a/src/org/thoughtcrime/securesms/contacts/ContactsCursorLoader.java
+++ b/src/org/thoughtcrime/securesms/contacts/ContactsCursorLoader.java
@@ -187,6 +187,8 @@ public class ContactsCursorLoader extends CursorLoader {
ContactsDatabase contactsDatabase = DatabaseFactory.getContactsDatabase(getContext());
List cursorList = new ArrayList<>(2);
+ return cursorList;
+ /*
if (!Permissions.hasAny(getContext(), Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS)) {
return cursorList;
}
@@ -201,6 +203,7 @@ public class ContactsCursorLoader extends CursorLoader {
cursorList.add(filterNonPushContacts(contactsDatabase.querySystemContacts(filter)));
}
return cursorList;
+ */
}
private Cursor getGroupsCursor() {
diff --git a/src/org/thoughtcrime/securesms/database/helpers/ClassicOpenHelper.java b/src/org/thoughtcrime/securesms/database/helpers/ClassicOpenHelper.java
index 821befc565..5ad89598cf 100644
--- a/src/org/thoughtcrime/securesms/database/helpers/ClassicOpenHelper.java
+++ b/src/org/thoughtcrime/securesms/database/helpers/ClassicOpenHelper.java
@@ -1265,7 +1265,7 @@ public class ClassicOpenHelper extends SQLiteOpenHelper {
db.execSQL("ALTER TABLE recipient_preferences ADD COLUMN system_contact_photo TEXT DEFAULT NULL");
db.execSQL("ALTER TABLE recipient_preferences ADD COLUMN system_phone_label TEXT DEFAULT NULL");
db.execSQL("ALTER TABLE recipient_preferences ADD COLUMN system_contact_uri TEXT DEFAULT NULL");
-
+ /*
if (Permissions.hasAny(context, Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS)) {
try (Cursor cursor = db.query("recipient_preferences", null, null, null, null, null, null)) {
while (cursor != null && cursor.moveToNext()) {
@@ -1295,6 +1295,7 @@ public class ClassicOpenHelper extends SQLiteOpenHelper {
}
}
}
+ */
}
db.setTransactionSuccessful();
diff --git a/src/org/thoughtcrime/securesms/mms/AttachmentManager.java b/src/org/thoughtcrime/securesms/mms/AttachmentManager.java
index f7054afa23..4483e20d2a 100644
--- a/src/org/thoughtcrime/securesms/mms/AttachmentManager.java
+++ b/src/org/thoughtcrime/securesms/mms/AttachmentManager.java
@@ -410,6 +410,7 @@ public class AttachmentManager {
}
public static void selectLocation(Activity activity, int requestCode) {
+ /* Loki - Enable again once we have location sharing
Permissions.with(activity)
.request(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION)
.ifNecessary()
@@ -422,6 +423,7 @@ public class AttachmentManager {
}
})
.execute();
+ */
}
public static void selectGif(Activity activity, int requestCode, boolean isForMms) {
diff --git a/src/org/thoughtcrime/securesms/search/SearchRepository.java b/src/org/thoughtcrime/securesms/search/SearchRepository.java
index a88107b211..956b473e70 100644
--- a/src/org/thoughtcrime/securesms/search/SearchRepository.java
+++ b/src/org/thoughtcrime/securesms/search/SearchRepository.java
@@ -121,6 +121,8 @@ public class SearchRepository {
}
private CursorList queryContacts(String query) {
+ return CursorList.emptyList();
+ /* Loki - Don't need contact permissions
if (!Permissions.hasAny(context, Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS)) {
return CursorList.emptyList();
}
@@ -130,6 +132,7 @@ public class SearchRepository {
MergeCursor contacts = new MergeCursor(new Cursor[]{ textSecureContacts, systemContacts });
return new CursorList<>(contacts, new RecipientModelBuilder(context));
+ */
}
private CursorList queryConversations(@NonNull String query) {
diff --git a/src/org/thoughtcrime/securesms/service/WebRtcCallService.java b/src/org/thoughtcrime/securesms/service/WebRtcCallService.java
index 9709834069..257e02f4de 100644
--- a/src/org/thoughtcrime/securesms/service/WebRtcCallService.java
+++ b/src/org/thoughtcrime/securesms/service/WebRtcCallService.java
@@ -380,9 +380,11 @@ public class WebRtcCallService extends Service implements InjectableType,
try {
boolean isSystemContact = false;
+ /*
if (Permissions.hasAny(WebRtcCallService.this, Manifest.permission.READ_CONTACTS, Manifest.permission.WRITE_CONTACTS)) {
isSystemContact = ContactAccessor.getInstance().isSystemContact(WebRtcCallService.this, recipient.getAddress().serialize());
}
+ */
boolean isAlwaysTurn = TextSecurePreferences.isTurnOnly(WebRtcCallService.this);