Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messaging: Add an option to disable hyperlinks on URIs #21

Open
wants to merge 22 commits into
base: 14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8d88293
Snap for 10843824 from 5844c8d040ff9f1917c82dda098754edc7cae961 to 24…
Sep 21, 2023
ee6e9fb
Snap for 10917888 from 5be25836a49bb81f0052cdb20572283c52887e61 to 24…
Oct 7, 2023
2199004
Snap for 10970117 from a53cd33778175b64fecf642f9c1f7fd575312b44 to 24…
Oct 19, 2023
a5cde15
Snap for 11012804 from 3586032a9be4d31dc2905be29210ba5e313b0614 to 24…
Oct 27, 2023
eb9ae2c
Snap for 11065517 from cd39324d9f7c9b0c5405fae1c3de3f086a9680d2 to 24…
Nov 8, 2023
8781501
Don't build with platform certificate
luca020400 Feb 14, 2019
c388f28
Messaging: Update cellbroadcast package name
z3DD3r Apr 23, 2021
ff5bf14
Remove AOSP MMS configurations
flawedworld Jan 25, 2022
42a6d50
Add GrapheneOS icon
flawedworld Feb 5, 2022
daec41b
Bump minSdkVersion to 24
flawedworld Feb 5, 2022
1881f75
Messaging: define app category
bvlj Jan 25, 2018
70a4178
Replace launcher icon
Feb 9, 2022
431d2ea
fix no notification sound in Secondary user
empratyush May 18, 2022
2e32cf4
add battery optimization exemption
quh4gko8 Aug 17, 2022
8396c0a
add monochrome icon
empratyush Sep 13, 2022
76bd990
Messaging: Use a DayNight launch theme
Tortel Jun 24, 2020
8784647
Messaging: disable auto dark theming on message bubble
jesec May 18, 2020
d530f84
Messaging: allow framework to do dark theming automatically
neelchauhan Dec 13, 2022
4f0dbac
add check before casting
empratyush Feb 14, 2023
4cf56db
[bugfixes] handle null case
empratyush Sep 22, 2023
85a1ca4
CI: update MMS configs from messages.android_20240123_01_RC02.phone_d…
maade93791 Feb 9, 2024
bc65e42
Messaging: Add an option to disable hyperlinks on URIs
neelchauhan May 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 9 additions & 2 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,23 @@ android_app {
required: [
"libframesequence",
"libgiftranscode",
"allowlist_com.android.messaging.xml",
],
optimize: {
obfuscate: true,
optimize: true,
enabled: true,
},

certificate: "platform",

sdk_version: "current",

product_specific: true,
}

prebuilt_etc {
name: "allowlist_com.android.messaging.xml",
product_specific: true,
sub_dir: "sysconfig",
src: "allowlist_com.android.messaging.xml",
filename_from_src: true,
}
8 changes: 5 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package="com.android.messaging"
android:installLocation="internalOnly">

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="24" />
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="24" />

<!-- Application holds CPU wakelock while working in background -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand Down Expand Up @@ -59,7 +59,9 @@
<application
android:name="com.android.messaging.BugleApplication"
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:appCategory="social"
android:label="@string/app_name"
android:theme="@style/BugleTheme"
android:supportsRtl="true">
Expand All @@ -71,7 +73,7 @@
android:screenOrientation="user"
android:label="@string/app_name"
android:exported="true"
android:theme="@style/BugleTheme.ConversationListActivity">
android:theme="@style/LaunchTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
4 changes: 4 additions & 0 deletions allowlist_com.android.messaging.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<allow-in-power-save package="com.android.messaging" />
</config>
30 changes: 30 additions & 0 deletions res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
Copyright (C) 2021 Google Inc.

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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group
android:scaleX="1.881"
android:scaleY="1.881"
android:translateX="31.428"
android:translateY="31.428">
<path
android:fillColor="#000000"
android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM7,9h10c0.55,0 1,0.45 1,1s-0.45,1 -1,1L7,11c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1zM13,14L7,14c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h6c0.55,0 1,0.45 1,1s-0.45,1 -1,1zM17,8L7,8c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h10c0.55,0 1,0.45 1,1s-0.45,1 -1,1z" />
</group>
</vector>
3 changes: 2 additions & 1 deletion res/layout/conversation_message_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
android:id="@+id/message_text_and_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:forceDarkAllowed="false">

<LinearLayout
android:id="@+id/message_title_layout"
Expand Down
6 changes: 6 additions & 0 deletions res/mipmap-anydpi/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
6 changes: 6 additions & 0 deletions res/mipmap-anydpi/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
4 changes: 4 additions & 0 deletions res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
limitations under the License.
-->
<resources>
<style name="BugleBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:forceDarkAllowed">true</item>
</style>

<style name="BugleTheme.ConversationActivity"
parent="@style/BugleTheme.ConversationActivityBase">
<item name="android:colorEdgeEffect">@color/conversation_edge_effect</item>
Expand Down
2 changes: 2 additions & 0 deletions res/values/constants.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<string name="send_sound_pref_key" translatable="false">send_sound</string>
<bool name="send_sound_pref_default" translatable="false">true</bool>
<string name="advanced_pref_key" translatable="false">advanced_prefs</string>
<string name="disable_link_pref_key" translatable="false">disable_link</string>
<bool name="disable_link_pref_default" translatable="false">false</bool>

<!-- Subscription-specific settings. The values of these pref keys must be prefixed with
"buglesub_" to allow for runtime checks -->
Expand Down
4 changes: 4 additions & 0 deletions res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
2 changes: 2 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@
<string name="unknown_phone_number_pref_display_value">Unknown</string>
<!-- Title for the preference for playing a message send sound -->
<string name="send_sound_pref_title">Outgoing message sounds</string>
<!-- TItle for the preference to disable links in messages -->
<string name="disable_link_pref_title">Disable links in messages</string>

<string name="dump_sms_pref_title">Dump SMS</string>
<string name="dump_sms_pref_summary">Dump received SMS raw data into external storage file</string>
Expand Down
5 changes: 5 additions & 0 deletions res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<item name="apnPreferenceStyle">@style/ApnPreference</item>
</style>

<style name="LaunchTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
<item name="colorPrimary">@color/action_bar_background_color</item>
<item name="colorPrimaryDark">@color/action_bar_background_color_dark</item>
</style>

<style name="BugleTheme.ConversationActivity"
parent="@style/BugleTheme.ConversationActivityBase">
</style>
Expand Down
13 changes: 13 additions & 0 deletions res/xml-mcc202-mnc1/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="7">
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="smsUsesSimpleCharactersOnly">false</bool>
<bool name="allowEnablingWapPushSI">true</bool>
<bool name="enableWapPushSI">false</bool>
<int name="maxMessageSize">614400</int>
<int name="maxImageHeight">1200</int>
<int name="maxImageWidth">1600</int>
<bool name="useCustomUserAgent">true</bool>
<bool name="allowEditingSmscAddress">true</bool>
<int name="smsToMmsTextThreshold">-1</int>
</mms_config>
4 changes: 4 additions & 0 deletions res/xml-mcc202-mnc10/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="1">
<bool name="smsUsesSimpleCharactersOnly">false</bool>
</mms_config>
6 changes: 6 additions & 0 deletions res/xml-mcc202-mnc2/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="2">
<bool name="smsUsesSimpleCharactersOnly">false</bool>
<bool name="allowEnablingWapPushSI">true</bool>
<bool name="enableWapPushSI">false</bool>
</mms_config>
11 changes: 11 additions & 0 deletions res/xml-mcc202-mnc5/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="6">
<bool name="smsUsesSimpleCharactersOnly">true</bool>
<bool name="smsEncodingChangeable">true</bool>
<bool name="allowEnablingWapPushSI">false</bool>
<bool name="enableWapPushSI">true</bool>
<int name="maxMessageSize">307200</int>
<int name="maxImageHeight">1944</int>
<int name="maxImageWidth">2592</int>
<bool name="allowEditingSmscAddress">true</bool>
</mms_config>
4 changes: 4 additions & 0 deletions res/xml-mcc202-mnc9/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="1">
<bool name="smsUsesSimpleCharactersOnly">false</bool>
</mms_config>
33 changes: 0 additions & 33 deletions res/xml-mcc204-mnc04/mms_config.xml

This file was deleted.

6 changes: 6 additions & 0 deletions res/xml-mcc204-mnc12/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="2">
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="enabledMMS">false</bool>
<bool name="enableGroupMms">false</bool>
</mms_config>
13 changes: 13 additions & 0 deletions res/xml-mcc204-mnc16/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="7">
<bool name="enabledMMS">false</bool>
<bool name="enableGroupMms">false</bool>
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="allowEnablingWapPushSI">false</bool>
<bool name="enableWapPushSI">true</bool>
<int name="maxMessageSize">307200</int>
<int name="maxImageHeight">1200</int>
<int name="maxImageWidth">1600</int>
<bool name="useCustomUserAgent">true</bool>
<bool name="allowEditingSmscAddress">true</bool>
</mms_config>
6 changes: 6 additions & 0 deletions res/xml-mcc204-mnc2/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="1">
<bool name="enabledMMS">false</bool>
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="enableGroupMms">false</bool>
</mms_config>
13 changes: 13 additions & 0 deletions res/xml-mcc204-mnc20/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="7">
<bool name="enabledMMS">false</bool>
<bool name="enableGroupMms">false</bool>
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="allowEnablingWapPushSI">false</bool>
<bool name="enableWapPushSI">true</bool>
<int name="maxMessageSize">307200</int>
<int name="maxImageHeight">1200</int>
<int name="maxImageWidth">1600</int>
<bool name="useCustomUserAgent">true</bool>
<bool name="allowEditingSmscAddress">true</bool>
</mms_config>
9 changes: 9 additions & 0 deletions res/xml-mcc204-mnc4/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="11">
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="enabledMMS">false</bool>
<bool name="enableGroupMms">false</bool>
<bool name="allowEnablingWapPushSI">false</bool>
<bool name="enableWapPushSI">true</bool>
<bool name="allowEditingSmscAddress">true</bool>
</mms_config>
6 changes: 6 additions & 0 deletions res/xml-mcc204-mnc69/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="2">
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="enabledMMS">false</bool>
<bool name="enableGroupMms">false</bool>
</mms_config>
6 changes: 6 additions & 0 deletions res/xml-mcc204-mnc7/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="1">
<bool name="enabledMMS">false</bool>
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="enableGroupMms">false</bool>
</mms_config>
6 changes: 6 additions & 0 deletions res/xml-mcc204-mnc8/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="3">
<bool name="groupChatDefaultsToMMS">false</bool>
<bool name="enabledMMS">false</bool>
<bool name="enableGroupMms">false</bool>
</mms_config>
9 changes: 9 additions & 0 deletions res/xml-mcc206-mnc10/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="2">
<bool name="allowEnablingWapPushSI">true</bool>
<bool name="enableWapPushSI">true</bool>
<bool name="mmsRoamingAutoRetrieveByDefault">true</bool>
<int name="httpSocketTimeout">120000</int>
<bool name="enableGroupMms">true</bool>
<bool name="groupChatDefaultsToMMS">true</bool>
</mms_config>
5 changes: 5 additions & 0 deletions res/xml-mcc206-mnc20/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="1">
<bool name="enableGroupMms">true</bool>
<bool name="groupChatDefaultsToMMS">false</bool>
</mms_config>
5 changes: 5 additions & 0 deletions res/xml-mcc206/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="1">
<bool name="enableGroupMms">true</bool>
<bool name="groupChatDefaultsToMMS">true</bool>
</mms_config>
33 changes: 0 additions & 33 deletions res/xml-mcc208-mnc01/mms_config.xml

This file was deleted.

10 changes: 10 additions & 0 deletions res/xml-mcc208-mnc1/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<mms_config version="9">
<bool name="groupChatDefaultsToMMS">false</bool>
<int name="maxMessageSize">600000</int>
<int name="maxImageHeight">1944</int>
<int name="maxImageWidth">2592</int>
<bool name="smsEncodingChangeable">true</bool>
<bool name="allowEnablingWapPushSI">false</bool>
<bool name="enableWapPushSI">false</bool>
</mms_config>
Loading