Skip to content
Permalink
Browse files

improve MMS, update libsignal, use selective permissions

  • Loading branch information...
BLeQuerrec committed Aug 3, 2019
1 parent f6122e8 commit 87740fbbc225e0f2038b5aac1da14a6a4c677e55
Showing with 3,666 additions and 12,561 deletions.
  1. +0 −3 .gitmodules
  2. +1 −1 AndroidManifest.xml
  3. +19 −7 build.gradle
  4. +0 −1 libs/org.w3c.dom
  5. +10 −0 proguard.cfg
  6. BIN res/drawable-hdpi/ic_contacts_white_48dp.png
  7. BIN res/drawable-hdpi/ic_folder_white_48dp.png
  8. BIN res/drawable-hdpi/ic_mic_white_48dp.png
  9. BIN res/drawable-hdpi/ic_photo_camera_white_48dp.png
  10. BIN res/drawable-hdpi/ic_textsms_white_48dp.png
  11. BIN res/drawable-hdpi/ic_videocam_white_48dp.png
  12. BIN res/drawable-hdpi/no_contacts.png
  13. BIN res/drawable-mdpi/ic_contacts_white_48dp.png
  14. BIN res/drawable-mdpi/ic_folder_white_48dp.png
  15. BIN res/drawable-mdpi/ic_mic_white_48dp.png
  16. BIN res/drawable-mdpi/ic_photo_camera_white_48dp.png
  17. BIN res/drawable-mdpi/ic_textsms_white_48dp.png
  18. BIN res/drawable-mdpi/ic_videocam_white_48dp.png
  19. BIN res/drawable-mdpi/no_contacts.png
  20. BIN res/drawable-xhdpi/ic_contacts_white_48dp.png
  21. BIN res/drawable-xhdpi/ic_folder_white_48dp.png
  22. BIN res/drawable-xhdpi/ic_mic_white_48dp.png
  23. BIN res/drawable-xhdpi/ic_photo_camera_white_48dp.png
  24. BIN res/drawable-xhdpi/ic_textsms_white_48dp.png
  25. BIN res/drawable-xhdpi/ic_videocam_white_48dp.png
  26. BIN res/drawable-xhdpi/no_contacts.png
  27. BIN res/drawable-xxhdpi/ic_contacts_white_48dp.png
  28. BIN res/drawable-xxhdpi/ic_folder_white_48dp.png
  29. BIN res/drawable-xxhdpi/ic_mic_white_48dp.png
  30. BIN res/drawable-xxhdpi/ic_photo_camera_white_48dp.png
  31. BIN res/drawable-xxhdpi/ic_textsms_white_48dp.png
  32. BIN res/drawable-xxhdpi/ic_videocam_white_48dp.png
  33. BIN res/drawable-xxhdpi/no_contacts.png
  34. BIN res/drawable-xxxhdpi/ic_contacts_white_48dp.png
  35. BIN res/drawable-xxxhdpi/ic_folder_white_48dp.png
  36. BIN res/drawable-xxxhdpi/ic_mic_white_48dp.png
  37. BIN res/drawable-xxxhdpi/ic_photo_camera_white_48dp.png
  38. BIN res/drawable-xxxhdpi/ic_textsms_white_48dp.png
  39. BIN res/drawable-xxxhdpi/ic_videocam_white_48dp.png
  40. BIN res/drawable-xxxhdpi/no_contacts.png
  41. +13 −0 res/drawable/colorpickerpreference_pref_swatch.xml
  42. +10 −0 res/drawable/ic_add.xml
  43. +5 −0 res/drawable/permission_rationale_dialog_corners.xml
  44. +45 −0 res/layout/add_ringtone_item.xml
  45. +47 −3 res/layout/contact_selection_list_fragment.xml
  46. +13 −0 res/layout/led_color_preference_widget.xml
  47. +29 −0 res/layout/permissions_rationale_dialog.xml
  48. +15 −0 res/layout/preference_right_summary_widget.xml
  49. +7 −0 res/layout/preference_widget_color_swatch.xml
  50. +0 −2 res/values/arrays.xml
  51. +22 −0 res/values/attrs.xml
  52. +46 −0 res/values/strings.xml
  53. +3 −0 res/values/styles.xml
  54. +8 −0 res/values/themes.xml
  55. +2 −13 res/xml/preferences_advanced.xml
  56. +2 −1 res/xml/preferences_app_protection.xml
  57. +13 −11 res/xml/preferences_appearance.xml
  58. +18 −15 res/xml/preferences_notifications.xml
  59. +4 −3 res/xml/recipient_preferences.xml
  60. +8 −2 scripts/fix-patch.sh
  61. +9 −5 src/org/smssecure/smssecure/ApplicationPreferencesActivity.java
  62. +66 −12 src/org/smssecure/smssecure/ContactSelectionListFragment.java
  63. +63 −37 src/org/smssecure/smssecure/ConversationActivity.java
  64. +2 −1 src/org/smssecure/smssecure/DatabaseMigrationActivity.java
  65. +80 −71 src/org/smssecure/smssecure/ImportExportFragment.java
  66. +0 −1 src/org/smssecure/smssecure/LogSubmitActivity.java
  67. +20 −7 src/org/smssecure/smssecure/MediaPreviewActivity.java
  68. +1 −1 src/org/smssecure/smssecure/ReceiveKeyDialog.java
  69. +21 −15 src/org/smssecure/smssecure/RecipientPreferenceActivity.java
  70. +9 −1 src/org/smssecure/smssecure/TransportOptions.java
  71. +2 −0 src/org/smssecure/smssecure/VerifyIdentityActivity.java
  72. +124 −98 src/org/smssecure/smssecure/components/CustomDefaultPreference.java
  73. +1 −1 src/org/smssecure/smssecure/components/SwitchPreferenceCompat.java
  74. +17 −17 src/org/smssecure/smssecure/crypto/MmsCipher.java
  75. +6 −6 src/org/smssecure/smssecure/crypto/SessionBuilder.java
  76. +5 −3 src/org/smssecure/smssecure/crypto/SmsCipher.java
  77. +23 −3 src/org/smssecure/smssecure/crypto/storage/SilenceIdentityKeyStore.java
  78. +15 −10 src/org/smssecure/smssecure/crypto/storage/SilenceSignalProtocolStore.java
  79. +1 −2 src/org/smssecure/smssecure/database/AttachmentDatabase.java
  80. +2 −6 src/org/smssecure/smssecure/database/ContentValuesBuilder.java
  81. +5 −6 src/org/smssecure/smssecure/database/DatabaseFactory.java
  82. +2 −2 src/org/smssecure/smssecure/database/MmsAddressDatabase.java
  83. +41 −25 src/org/smssecure/smssecure/database/MmsDatabase.java
  84. +0 −80 src/org/smssecure/smssecure/database/PduHeadersBuilder.java
  85. +0 −108 src/org/smssecure/smssecure/dom/AttrImpl.java
  86. +0 −194 src/org/smssecure/smssecure/dom/DocumentImpl.java
  87. +0 −172 src/org/smssecure/smssecure/dom/ElementImpl.java
  88. +0 −87 src/org/smssecure/smssecure/dom/NamedNodeMapImpl.java
  89. +0 −273 src/org/smssecure/smssecure/dom/NodeImpl.java
  90. +0 −128 src/org/smssecure/smssecure/dom/NodeListImpl.java
  91. +0 −127 src/org/smssecure/smssecure/dom/events/EventImpl.java
  92. +0 −131 src/org/smssecure/smssecure/dom/events/EventTargetImpl.java
  93. +0 −155 src/org/smssecure/smssecure/dom/smil/ElementParallelTimeContainerImpl.java
  94. +0 −73 src/org/smssecure/smssecure/dom/smil/ElementSequentialTimeContainerImpl.java
  95. +0 −33 src/org/smssecure/smssecure/dom/smil/ElementTimeContainerImpl.java
  96. +0 −348 src/org/smssecure/smssecure/dom/smil/ElementTimeImpl.java
  97. +0 −291 src/org/smssecure/smssecure/dom/smil/SmilDocumentImpl.java
  98. +0 −47 src/org/smssecure/smssecure/dom/smil/SmilElementImpl.java
  99. +0 −63 src/org/smssecure/smssecure/dom/smil/SmilLayoutElementImpl.java
  100. +0 −343 src/org/smssecure/smssecure/dom/smil/SmilMediaElementImpl.java
  101. +0 −217 src/org/smssecure/smssecure/dom/smil/SmilParElementImpl.java
  102. +0 −29 src/org/smssecure/smssecure/dom/smil/SmilRefElementImpl.java
  103. +0 −283 src/org/smssecure/smssecure/dom/smil/SmilRegionElementImpl.java
  104. +0 −53 src/org/smssecure/smssecure/dom/smil/SmilRegionMediaElementImpl.java
  105. +0 −84 src/org/smssecure/smssecure/dom/smil/SmilRootLayoutElementImpl.java
  106. +0 −295 src/org/smssecure/smssecure/dom/smil/TimeImpl.java
  107. +0 −53 src/org/smssecure/smssecure/dom/smil/TimeListImpl.java
  108. +0 −80 src/org/smssecure/smssecure/dom/smil/parser/SmilXmlSerializer.java
  109. +40 −30 src/org/smssecure/smssecure/jobs/MmsDownloadJob.java
  110. +5 −5 src/org/smssecure/smssecure/jobs/MmsReceiveJob.java
  111. +86 −43 src/org/smssecure/smssecure/jobs/MmsSendJob.java
  112. +1 −5 src/org/smssecure/smssecure/jobs/SendJob.java
  113. +3 −2 src/org/smssecure/smssecure/jobs/SmsDecryptJob.java
  114. +19 −4 src/org/smssecure/smssecure/jobs/SmsSendJob.java
  115. +26 −9 src/org/smssecure/smssecure/mms/AttachmentManager.java
  116. +4 −6 src/org/smssecure/smssecure/mms/AudioSlide.java
  117. +31 −32 src/org/smssecure/smssecure/mms/CompatMmsConnection.java
  118. +2 −2 src/org/smssecure/smssecure/mms/GifSlide.java
  119. +1 −1 src/org/smssecure/smssecure/mms/ImageSlide.java
  120. +7 −7 src/org/smssecure/smssecure/mms/IncomingLegacyMmsConnection.java
  121. +5 −4 src/org/smssecure/smssecure/mms/IncomingLollipopMmsConnection.java
  122. +4 −4 src/org/smssecure/smssecure/mms/IncomingMmsConnection.java
  123. +1 −5 src/org/smssecure/smssecure/mms/LegacyMmsConnection.java
  124. +12 −14 src/org/smssecure/smssecure/mms/MediaConstraints.java
  125. +53 −0 src/org/smssecure/smssecure/mms/MmsConfigManager.java
  126. +60 −0 src/org/smssecure/smssecure/mms/MmsException.java
  127. +47 −15 src/org/smssecure/smssecure/mms/MmsMediaConstraints.java
  128. +39 −15 src/org/smssecure/smssecure/mms/MmsRadio.java
  129. +4 −0 src/org/smssecure/smssecure/mms/MmsRadioException.java
  130. +3 −3 src/org/smssecure/smssecure/mms/OutgoingLegacyMmsConnection.java
  131. +17 −4 src/org/smssecure/smssecure/mms/OutgoingLollipopMmsConnection.java
  132. +4 −2 src/org/smssecure/smssecure/mms/OutgoingMmsConnection.java
  133. +0 −2 src/org/smssecure/smssecure/mms/OutgoingSecureMediaMessage.java
  134. +5 −5 src/org/smssecure/smssecure/mms/PartParser.java
  135. +3 −3 src/org/smssecure/smssecure/mms/VideoSlide.java
  136. +1 −1 src/org/smssecure/smssecure/notifications/AbstractNotificationBuilder.java
  137. +1 −1 src/org/smssecure/smssecure/notifications/FailedNotificationBuilder.java
  138. +1 −1 src/org/smssecure/smssecure/notifications/MultipleRecipientNotificationBuilder.java
  139. +1 −1 src/org/smssecure/smssecure/notifications/SingleRecipientNotificationBuilder.java
  140. +358 −0 src/org/smssecure/smssecure/permissions/Permissions.java
  141. +92 −0 src/org/smssecure/smssecure/permissions/PermissionsRequest.java
  142. +53 −0 src/org/smssecure/smssecure/permissions/RationaleDialog.java
  143. +8 −4 src/org/smssecure/smssecure/preferences/AdvancedPreferenceFragment.java
  144. +10 −6 src/org/smssecure/smssecure/preferences/AppProtectionPreferenceFragment.java
  145. +7 −2 src/org/smssecure/smssecure/preferences/AppearancePreferenceFragment.java
  146. +10 −5 src/org/smssecure/smssecure/preferences/ChatsPreferenceFragment.java
  147. +0 −294 src/org/smssecure/smssecure/preferences/ColorPreference.java
  148. +51 −0 src/org/smssecure/smssecure/preferences/CorrectedPreferenceFragment.java
  149. +0 −158 src/org/smssecure/smssecure/preferences/LedBlinkPatternListPreference.java
  150. +3 −4 src/org/smssecure/smssecure/preferences/ListSummaryPreferenceFragment.java
  151. +10 −6 src/org/smssecure/smssecure/preferences/MmsPreferencesFragment.java
  152. +23 −14 src/org/smssecure/smssecure/preferences/NotificationsPreferenceFragment.java
  153. +9 −5 src/org/smssecure/smssecure/preferences/SmsMmsPreferenceFragment.java
  154. +12 −3 src/org/smssecure/smssecure/preferences/{ → widgets}/AdvancedRingtonePreference.java
  155. +251 −0 src/org/smssecure/smssecure/preferences/widgets/ColorPickerPreference.java
  156. +64 −0 src/org/smssecure/smssecure/preferences/widgets/ColorPickerPreferenceDialogFragmentCompat.java
  157. +107 −0 src/org/smssecure/smssecure/preferences/widgets/LEDColorListPreference.java
  158. +1 −1 src/org/smssecure/smssecure/preferences/{ → widgets}/NotificationPrivacyPreference.java
  159. +462 −0 src/org/smssecure/smssecure/preferences/widgets/RingtonePreference.java
  160. +583 −0 src/org/smssecure/smssecure/preferences/widgets/RingtonePreferenceDialogFragmentCompat.java
  161. +66 −0 src/org/smssecure/smssecure/preferences/widgets/SilenceListPreference.java
  162. +62 −0 src/org/smssecure/smssecure/preferences/widgets/SilenceRingtonePreference.java
  163. +3 −6 src/org/smssecure/smssecure/recipients/RecipientProvider.java
  164. +4 −4 src/org/smssecure/smssecure/service/MmsListener.java
  165. +1 −2 src/org/smssecure/smssecure/sms/MessageSender.java
  166. +3 −3 src/org/smssecure/smssecure/util/BitmapUtil.java
  167. +36 −15 src/org/smssecure/smssecure/util/MediaUtil.java
  168. +1 −1 src/org/smssecure/smssecure/util/SilencePreferences.java
  169. +0 −132 src/org/smssecure/smssecure/util/SmilUtil.java
  170. +12 −9 src/org/smssecure/smssecure/util/Util.java
  171. +5 −0 src/org/smssecure/smssecure/util/ViewUtil.java
  172. +13 −1 src/org/smssecure/smssecure/util/dualsim/SubscriptionInfoCompat.java
  173. +5 −2 src/org/smssecure/smssecure/util/dualsim/SubscriptionManagerCompat.java
  174. +0 −229 src/ws/com/google/android/mms/ContentType.java
  175. +0 −41 src/ws/com/google/android/mms/InvalidHeaderValueException.java
  176. +0 −60 src/ws/com/google/android/mms/MmsException.java
  177. +0 −5 src/ws/com/google/android/mms/package.html
  178. +0 −89 src/ws/com/google/android/mms/pdu/AcknowledgeInd.java
  179. +0 −167 src/ws/com/google/android/mms/pdu/Base64.java
  180. +0 −172 src/ws/com/google/android/mms/pdu/CharacterSets.java
  181. +0 −138 src/ws/com/google/android/mms/pdu/DeliveryInd.java
  182. +0 −284 src/ws/com/google/android/mms/pdu/EncodedStringValue.java
  183. +0 −113 src/ws/com/google/android/mms/pdu/GenericPdu.java
  184. +0 −150 src/ws/com/google/android/mms/pdu/MultimediaMessagePdu.java
  185. +0 −289 src/ws/com/google/android/mms/pdu/NotificationInd.java
  186. +0 −114 src/ws/com/google/android/mms/pdu/NotifyRespInd.java
  187. +0 −191 src/ws/com/google/android/mms/pdu/PduBody.java
  188. +0 −1,184 src/ws/com/google/android/mms/pdu/PduComposer.java
  189. +0 −110 src/ws/com/google/android/mms/pdu/PduContentTypes.java
  190. +0 −731 src/ws/com/google/android/mms/pdu/PduHeaders.java
  191. +0 −1,919 src/ws/com/google/android/mms/pdu/PduParser.java
  192. +0 −401 src/ws/com/google/android/mms/pdu/PduPart.java
  193. +0 −68 src/ws/com/google/android/mms/pdu/QuotedPrintable.java
  194. +0 −153 src/ws/com/google/android/mms/pdu/ReadOrigInd.java
  195. +0 −144 src/ws/com/google/android/mms/pdu/ReadRecInd.java
  196. +0 −300 src/ws/com/google/android/mms/pdu/RetrieveConf.java
  197. +0 −117 src/ws/com/google/android/mms/pdu/SendConf.java
  198. +0 −345 src/ws/com/google/android/mms/pdu/SendReq.java
  199. +0 −5 src/ws/com/google/android/mms/pdu/package.html
@@ -1,6 +1,3 @@
[submodule "libs/org.w3c.dom"]
path = libs/org.w3c.dom
url = https://github.com/SilenceIM/org.w3c.dom.git
[submodule "libs/gradle-witness"]
path = libs/gradle-witness
url = https://git.silence.dev/Silence/gradle-witness.git
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="org.smssecure.smssecure">

<uses-sdk tools:overrideLibrary="com.amulyakhare.textdrawable,com.astuetz.pagerslidingtabstrip,pl.tajchert.waitingdots,android.support.v13,com.davemorrissey.labs.subscaleview"/>
<uses-sdk tools:overrideLibrary="com.amulyakhare.textdrawable,com.astuetz.pagerslidingtabstrip,pl.tajchert.waitingdots,android.support.v13,com.davemorrissey.labs.subscaleview,,com.klinker.android.send_message"/>

<permission android:name="org.smssecure.smssecure.ACCESS_SECRETS"
android:label="Access to Silence Secrets"
@@ -32,20 +32,22 @@ subprojects {
}

dependencies {
def supportVersion = '28.0.0'
def supportVersion = '27.0.0'

compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:recyclerview-v7:$supportVersion"
compile "com.android.support:design:$supportVersion"
compile "com.android.support:support-v13:$supportVersion"
compile "com.android.support:cardview-v7:$supportVersion"
compile "com.android.support:preference-v7:$supportVersion"
compile "com.android.support:preference-v14:$supportVersion"
compile "com.android.support:gridlayout-v7:$supportVersion"
compile ("com.android.support:gridlayout-v7:$supportVersion") {
exclude module: 'support-v4'
}

compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
compile project (':org.w3c.dom')
compile 'info.guardianproject.trustedintents:trustedintents:0.2'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile 'com.github.chrisbanes.photoview:library:1.2.3'
@@ -68,9 +70,15 @@ dependencies {
exclude group: 'com.android.support', module: 'support-v4'
}

compile project (path: ':org.whispersystems.jobmanager', configuration: 'default')
compile project (path: ':org.whispersystems.libpastelog', configuration: 'default')
compile project (path: ':org.whispersystems.libsignal', configuration: 'default')
compile project (path: ':org.whispersystems.jobmanager')
compile project (path: ':org.whispersystems.libpastelog')
compile project (path: ':org.whispersystems.libsignal')

compile 'com.annimon:stream:1.2.1'
compile ('com.takisoft.fix:colorpicker:0.9.1') {
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'recyclerview-v7'
}

compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.7'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.7'
@@ -80,6 +88,8 @@ dependencies {
compile project (':com.amulyakhare.textdrawable')
compile 'me.relex:circleindicator:1.0.0@aar'

compile ('com.klinkerapps:android-smsmms:5.1.4')

testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:1.7.1'
testCompile 'org.mockito:mockito-core:1.9.5'
@@ -88,6 +98,8 @@ dependencies {
testCompile 'org.powermock:powermock-module-junit4-rule:1.6.1'
testCompile 'org.powermock:powermock-classloading-xstream:1.6.1'

androidTestCompile 'com.android.support:multidex:1.0.2'
androidTestCompile 'com.android.support:multidex-instrumentation:1.0.2'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
androidTestCompile ('org.assertj:assertj-core:1.7.1') {
@@ -106,8 +118,8 @@ dependencyVerification {
}

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.0'
useLibrary 'org.apache.http.legacy'

defaultConfig {
Submodule org.w3c.dom deleted from 91f124
@@ -18,7 +18,10 @@
-dontwarn org.hamcrest.**
-dontwarn org.mockito.**
-dontwarn com.squareup.**

-dontobfuscate
-dontoptimize

-keepattributes SourceFile,LineNumberTable
-keep class org.whispersystems.** { *; }
-keep class org.smssecure.smssecure.** { *; }
@@ -68,6 +71,12 @@
-dontwarn com.fasterxml.jackson.databind.**
-keep class org.codehaus.** { *; }

-dontwarn android.net.ConnectivityManager
-dontwarn android.net.ConnectivityManager$NetworkCallback
-dontwarn okio.**
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.ParametersAreNonnullByDefault

-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepattributes Signature
@@ -115,3 +124,4 @@

-keep class org.apache.http.** { *; }
-dontwarn uk.co.senab.photoview.**

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" />
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?colorAccent"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
</vector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/white"/>
<corners android:radius="20dp"/>
</shape>
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:scaleType="centerCrop"
app:srcCompat="@drawable/ic_add" />

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/add_ringtone_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="20dp"
android:ellipsize="marquee"
android:gravity="center_vertical"
android:maxLines="3"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:paddingEnd="?dialogPreferredPadding"
android:paddingRight="?dialogPreferredPadding"
android:text="@string/RingtonePreference_add_ringtone_text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?colorAccent" />
</LinearLayout>
@@ -1,8 +1,10 @@

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">

<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
@@ -26,4 +28,46 @@
android:visibility="gone"
android:layout_gravity="end"/>

<LinearLayout android:id="@+id/show_contacts_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:visibility="gone"
tools:visibility="visible">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/no_contacts"/>


</FrameLayout>

<TextView android:id="@+id/show_contacts_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:textSize="15sp"
android:lineSpacingMultiplier="1.3"
android:gravity="center"
android:text="@string/contact_selection_list_fragment__silence_needs_access_to_your_contacts_in_order_to_display_them"/>

<Button android:id="@+id/show_contacts_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_gravity="center_horizontal"
android:background="@color/silence_primary"
android:textColor="@color/white"
android:padding="10dp"
android:text="@string/contact_selection_list_fragment__show_contacts"/>
</LinearLayout>

</FrameLayout>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="3dp">

<ImageView
android:id="@+id/color_view"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:scaleType="fitXY" />
</FrameLayout>
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<LinearLayout android:id="@+id/header_container"
android:background="@color/silence_primary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:padding="40dp">

</LinearLayout>

<TextView android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="40dp"
android:paddingBottom="40dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:textSize="15sp"
android:lineSpacingMultiplier="1.3"
tools:text="Silence needs access to your contacts and media in order to connect with friends and exchange messages."/>

</LinearLayout>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView android:id="@+id/right_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:gravity="right|center_vertical"
android:textSize="16sp"
android:textColor="@color/silence_primary_dark"/>

</FrameLayout>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/color_picker_widget"
android:layout_width="24dp"
android:layout_height="24dp"
android:clickable="false"
android:focusable="false" />
@@ -125,14 +125,12 @@
<item>@string/preferences__fast</item>
<item>@string/preferences__normal</item>
<item>@string/preferences__slow</item>
<item>@string/preferences__custom</item>
</string-array>

<string-array name="pref_led_blink_pattern_values" translatable="false">
<item>300,300</item>
<item>500,2000</item>
<item>3000,3000</item>
<item>custom</item>
</string-array>

<string-array name="transport_selection_entries_text">
@@ -153,4 +153,26 @@
<attr name="backgroundTintColor" format="color" />
</declare-styleable>

<declare-styleable name="RingtonePreference">
<attr name="showAdd" format="boolean" />
<attr name="summaryHasRingtone" format="string|reference" />
</declare-styleable>

<declare-styleable name="ColorPickerPreference">
<attr name="currentColor" format="reference" />

<attr name="colors" format="reference" />

<attr name="sortColors" format="boolean|reference" />

<attr name="colorDescriptions" format="reference" />

<attr name="columns" format="integer|reference" />

<attr name="colorSize" format="enum|reference">
<enum name="large" value="1" />
<enum name="small" value="2" />
</attr>
</declare-styleable>

</resources>

0 comments on commit 87740fb

Please sign in to comment.
You can’t perform that action at this time.