Extract TextSecure strings for i18n.
1) Change all instances which use concatenation to build strings with variables in them to use string formatting instead. 2) Extract all string literals from layouts and menus into strings.xml 3) Extract all string literals from code into strings.xml
@ -36,58 +36,58 @@
|
||||
|
||||
<activity android:name=".PassphraseCreateActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="Create Passphrase"
|
||||
android:label="@string/create_passphrase"
|
||||
android:launchMode="singleInstance"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".PassphrasePromptActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="Enter Passphrase"
|
||||
android:label="@string/enter_passphrase"
|
||||
android:launchMode="singleInstance"
|
||||
android:windowSoftInputMode="stateVisible"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ContactSelectionActivity"
|
||||
android:label="Select Contacts"
|
||||
android:label="@string/select_contacts"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".AutoInitiateActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="TextSecure Messaging Detected"
|
||||
android:label="@string/textsecure_messaging_detected"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ViewIdentityActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="Public Identity Key"
|
||||
android:label="@string/public_identity_key"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".PassphraseChangeActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="Change Passphrase"
|
||||
android:label="@string/change_passphrase2"
|
||||
android:launchMode="singleInstance"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".VerifyKeysActivity"
|
||||
android:label="Verify Session"
|
||||
android:label="@string/verify_session"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".VerifyIdentityActivity"
|
||||
android:label="Verify Identity"
|
||||
android:label="@string/verify_identity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".SaveIdentityActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="Save Identity"
|
||||
android:label="@string/save_identity"
|
||||
android:windowSoftInputMode="stateVisible"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ReviewIdentitiesActivity"
|
||||
android:label="Manage Identity Keys"
|
||||
android:label="@string/manage_identity_keys2"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ReceiveKeyActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="Complete Key Exchange"
|
||||
android:label="@string/complete_key_exchange"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ApplicationPreferencesActivity"
|
||||
@ -95,7 +95,7 @@
|
||||
|
||||
<activity android:name=".VerifyImportedIdentityActivity"
|
||||
android:theme="@style/Theme.Sherlock.Light.Dialog"
|
||||
android:label="Verify Imported Identity"
|
||||
android:label="@string/verify_imported_identity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<service android:enabled="true" android:name=".service.ApplicationMigrationService"/>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 789 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
@ -9,22 +9,22 @@
|
||||
<TextView android:id="@+id/description_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5px"
|
||||
android:text="You have received a message from someone who supports TextSecure encrypted sessions. Would you like to initiate a key exchange so you can communicate securely?"/>
|
||||
android:layout_marginBottom="5dip"
|
||||
android:text="@string/you_have_received_a_message_from_someone_who_supports_textsecure_encrypted_sessions_would_you_like_to_initiate_a_key_exchange_so_you_can_communicate_securely"/>
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginTop="10dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button android:id="@+id/initiate_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Initiate Exchange"
|
||||
android:text="@string/initiate_exchange"
|
||||
android:gravity="center"/>
|
||||
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:text="Cancel"
|
||||
android:text="@string/cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"/>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:textSize="12sp"
|
||||
android:text="Old passphrase:"
|
||||
android:text="@string/old_passphrase"
|
||||
android:padding="3dip" />
|
||||
|
||||
<EditText android:id="@+id/old_passphrase"
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="New passphrase:"
|
||||
android:text="@string/new_passphrase"
|
||||
android:textSize="12sp"
|
||||
android:padding="3dip" />
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="Repeat new passphrase:"
|
||||
android:text="@string/repeat_new_passphrase"
|
||||
android:textSize="12sp"
|
||||
android:padding="3dip" />
|
||||
|
||||
@ -51,13 +51,13 @@
|
||||
android:padding="10dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cancel"/>
|
||||
android:text="@string/cancel"/>
|
||||
|
||||
<Button android:id="@+id/ok_button"
|
||||
android:padding="10dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ok"/>
|
||||
android:text="@android:string/ok"/>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
|
@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2009, 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
android:paddingLeft="14dip"
|
||||
android:paddingRight="5dip"
|
||||
>
|
||||
|
||||
<ImageView android:id="@+id/presence"
|
||||
android:layout_width="32dip"
|
||||
android:layout_height="32dip"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
/>
|
||||
|
||||
<TextView android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="8dip"
|
||||
android:layout_marginTop="-8dip"
|
||||
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"
|
||||
android:visibility = "gone"
|
||||
/>
|
||||
|
||||
<TextView android:id="@+id/number"
|
||||
android:visibility = "gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:layout_toRightOf="@id/label"
|
||||
android:layout_alignBaseline="@id/label"
|
||||
android:layout_toLeftOf="@id/presence"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
/>
|
||||
|
||||
<TextView android:id="@+id/name"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="0dip"
|
||||
android:layout_above="@id/label"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_toLeftOf="@id/presence"
|
||||
android:layout_marginBottom="1dip"
|
||||
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center_vertical|left"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
@ -1,28 +1,8 @@
|
||||
<!--
|
||||
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="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- <EditText android:id="@+id/group_name"-->
|
||||
<!-- android:layout_width="fill_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:hint="Enter group name"-->
|
||||
<!-- android:layout_alignParentTop="true" />-->
|
||||
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
@ -32,10 +12,11 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<TextView android:id="@+id/emptyText"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="No contacts."
|
||||
android:text="@string/no_contacts"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingLeft="10dip"
|
||||
@ -44,20 +25,4 @@
|
||||
android:lineSpacingMultiplier="0.92"
|
||||
/>
|
||||
</ScrollView>
|
||||
|
||||
<!-- <Button android:id="@+id/create_button"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:padding="15dip"-->
|
||||
<!-- android:text="Create"-->
|
||||
<!-- android:layout_alignParentBottom="true"-->
|
||||
<!-- android:layout_alignParentLeft="true" />-->
|
||||
<!-- -->
|
||||
<!-- <Button android:id="@+id/cancel_button"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:padding="15dip"-->
|
||||
<!-- android:text="Cancel"-->
|
||||
<!-- android:layout_alignParentBottom="true"-->
|
||||
<!-- android:layout_alignParentRight="true" /> -->
|
||||
</LinearLayout>
|
@ -1,21 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2009, 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"
|
||||
|
@ -1,16 +1,3 @@
|
||||
<!--
|
||||
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"
|
||||
@ -20,18 +7,16 @@
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fastScrollEnabled="true"
|
||||
/>
|
||||
android:fastScrollEnabled="true" />
|
||||
|
||||
<ScrollView android:id="@android:id/empty"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fillViewport="true"
|
||||
>
|
||||
android:fillViewport="true">
|
||||
<TextView android:id="@+id/emptyText"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="No contacts."
|
||||
android:text="@string/no_contacts"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingLeft="10dip"
|
||||
|
@ -1,21 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2009, 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -1,16 +1,4 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
@ -20,18 +8,17 @@
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fastScrollEnabled="true"
|
||||
/>
|
||||
android:fastScrollEnabled="true" />
|
||||
|
||||
<ScrollView android:id="@android:id/empty"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fillViewport="true"
|
||||
>
|
||||
android:fillViewport="true" >
|
||||
|
||||
<TextView android:id="@+id/emptyText"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="No recent calls."
|
||||
android:text="@string/no_recent_calls"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingLeft="10dip"
|
||||
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 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="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fastScrollEnabled="true"
|
||||
/>
|
||||
|
||||
<ScrollView android:id="@android:id/empty"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fillViewport="true"
|
||||
>
|
||||
<TextView android:id="@+id/emptyText"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="No contacts."
|
||||
android:textSize="20sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingLeft="10dip"
|
||||
android:paddingRight="10dip"
|
||||
android:paddingTop="10dip"
|
||||
android:lineSpacingMultiplier="0.92"
|
||||
/>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
@ -59,26 +59,12 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/view_image_button"-->
|
||||
<!-- style="?android:attr/buttonStyleSmall"-->
|
||||
<!-- android:layout_width="100dip"-->
|
||||
<!-- android:layout_height="50dip"-->
|
||||
<!-- android:text="View" />-->
|
||||
<!-- -->
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/replace_image_button"-->
|
||||
<!-- style="?android:attr/buttonStyleSmall"-->
|
||||
<!-- android:layout_width="100dip"-->
|
||||
<!-- android:layout_height="50dip"-->
|
||||
<!-- android:text="Replace" />-->
|
||||
|
||||
<Button
|
||||
android:id="@+id/remove_image_button"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:layout_width="100dip"
|
||||
android:layout_height="50dip"
|
||||
android:text="Remove" />
|
||||
android:text="@string/remove" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -108,7 +94,7 @@
|
||||
android:autoText="true"
|
||||
android:capitalize="sentences"
|
||||
android:nextFocusRight="@+id/send_button"
|
||||
android:hint="Type message"
|
||||
android:hint="@string/type_message"
|
||||
android:maxLines="4"
|
||||
android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
|
||||
android:imeOptions="actionSend|flagNoEnterAction"
|
||||
@ -121,7 +107,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:nextFocusLeft="@+id/embedded_text_editor"
|
||||
android:text="Send"
|
||||
android:text="@string/send2"
|
||||
android:padding="8dip"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:text="Batch Selection Mode"
|
||||
android:text="@string/batch_selection_mode"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
@ -12,14 +12,14 @@
|
||||
android:paddingRight="16dip"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView android:text="Please choose a passphrase that will be used to locally encrypt your data. This should be a strong passphrase."
|
||||
<TextView android:text="@string/please_choose_a_passphrase_that_will_be_used_to_locally_encrypt_your_data_this_should_be_a_strong_passphrase"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dip"
|
||||
android:layout_marginBottom="10dip"/>
|
||||
|
||||
<TextView android:text="Passphrase:"
|
||||
<TextView android:text="@string/passphrase"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -37,7 +37,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_marginBottom="5dip"
|
||||
android:layout_marginTop="10dip"
|
||||
android:text="Repeat:"/>
|
||||
android:text="@string/repeat"/>
|
||||
|
||||
<EditText
|
||||
android:layout_height="wrap_content"
|
||||
@ -57,14 +57,14 @@
|
||||
<TableRow>
|
||||
<Button android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="Cancel"
|
||||
android:text="@string/cancel"
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_marginRight="15dip"
|
||||
android:layout_marginLeft="16dip"/>
|
||||
|
||||
<Button android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OK"
|
||||
android:text="@android:string/ok"
|
||||
android:id="@+id/ok_button"
|
||||
android:layout_marginRight="16dip"/>
|
||||
</TableRow>
|
||||
|
@ -1,22 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright (C) 2008 Esmertec AG.
|
||||
* Copyright (C) 2008 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"
|
||||
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:fadingEdgeLength="16dip"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
</RelativeLayout>
|
@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright (C) 2008 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:id="@+id/mms_download_controls"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button android:id="@+id/btn_download_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="Download"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView android:id="@+id/label_downloading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center"
|
||||
android:text="Downloading"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -23,14 +23,14 @@
|
||||
<TableRow>
|
||||
<Button android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="Cancel"
|
||||
android:text="@string/cancel"
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_marginRight="15dip"
|
||||
android:layout_marginLeft="16dip"/>
|
||||
|
||||
<Button android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OK"
|
||||
android:text="@android:string/ok"
|
||||
android:id="@+id/ok_button"
|
||||
android:layout_marginRight="16dip"/>
|
||||
</TableRow>
|
||||
|
@ -30,25 +30,25 @@
|
||||
<Button android:id="@+id/verify_session_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Session"
|
||||
android:text="@string/session"
|
||||
android:visibility="gone"
|
||||
android:gravity="center" />
|
||||
|
||||
<Button android:id="@+id/verify_identity_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Identities"
|
||||
android:text="@string/identities"
|
||||
android:visibility="gone"
|
||||
android:gravity="center" />
|
||||
|
||||
<Button android:id="@+id/ok_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Complete Exchange"
|
||||
android:text="@string/complete_exchange"
|
||||
android:gravity="center"/>
|
||||
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:text="Cancel"
|
||||
android:text="@android:string/cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"/>
|
||||
|
@ -11,15 +11,13 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="14dip"
|
||||
android:paddingRight="11dip"
|
||||
android:gravity="center_vertical"
|
||||
/>
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
<View android:id="@+id/divider"
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_toRightOf="@id/call_type_icon"
|
||||
android:layout_marginRight="11dip"
|
||||
/>
|
||||
android:layout_marginRight="11dip" />
|
||||
|
||||
<TextView android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
@ -28,10 +26,8 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="9dip"
|
||||
android:layout_marginTop="5dip"
|
||||
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
@ -40,12 +36,10 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="8dip"
|
||||
android:layout_marginTop="-10dip"
|
||||
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView android:id="@+id/number"
|
||||
android:layout_width="wrap_content"
|
||||
@ -55,11 +49,9 @@
|
||||
android:layout_toLeftOf="@id/date"
|
||||
android:layout_alignBaseline="@id/label"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
/>
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
|
||||
<CheckedTextView android:id="@+id/line1"
|
||||
@ -75,7 +67,6 @@
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:ellipsize="marquee"
|
||||
/>
|
||||
android:ellipsize="marquee"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -16,7 +16,7 @@
|
||||
android:capitalize="sentences"
|
||||
android:autoText="true"
|
||||
android:singleLine="true"
|
||||
android:hint="To"
|
||||
android:hint="@string/to"
|
||||
android:paddingRight="45dip"
|
||||
android:layout_width="fill_parent"/>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<TextView android:id="@id/android:empty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="You don't currently have any identity keys in your trust database."
|
||||
android:text="@string/you_don_t_currently_have_any_identity_keys_in_your_trust_database"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:padding="20dip" />
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:layout_marginTop="5dip"
|
||||
android:layout_marginBottom="5dip"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="Identity Name:" />
|
||||
android:text="@string/identity_name" />
|
||||
|
||||
<EditText android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
@ -30,14 +30,14 @@
|
||||
<TableRow>
|
||||
<Button android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="Cancel"
|
||||
android:text="@string/cancel"
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_marginRight="15dip"
|
||||
android:layout_marginLeft="16dip"/>
|
||||
|
||||
<Button android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OK"
|
||||
android:text="@android:string/ok"
|
||||
android:id="@+id/ok_button"
|
||||
android:layout_marginRight="16dip"/>
|
||||
</TableRow>
|
||||
|
@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<org.thoughtcrime.securesms.components.RecipientsPanel
|
||||
android:id="@+id/key_recipients"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
/>
|
||||
|
||||
<Button android:id="@+id/send_key_button"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/buttonStyle"
|
||||
android:layout_below="@id/key_recipients"
|
||||
android:layout_alignRight="@id/key_recipients"
|
||||
android:text="Send"
|
||||
/>
|
||||
|
||||
<Button android:id="@+id/cancel_key_button"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/buttonStyle"
|
||||
android:layout_toLeftOf="@id/send_key_button"
|
||||
android:layout_below="@id/key_recipients"
|
||||
android:text="Cancel"
|
||||
/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="Their identity (they read):"
|
||||
android:text="@string/their_identity_they_read"
|
||||
android:padding="7dip" />
|
||||
|
||||
<TextView
|
||||
@ -29,7 +29,7 @@
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Your identity (you read):"
|
||||
android:text="@string/your_identity_you_read"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:padding="7dip" />
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:textSize="12sp"
|
||||
android:text="Identity name:\n"
|
||||
android:text="@string/identity_name_n"
|
||||
android:padding="3dip" />
|
||||
<EditText
|
||||
android:id="@+id/identity_name"
|
||||
@ -22,7 +22,7 @@
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:textSize="12sp"
|
||||
android:text="Imported identity:\n"
|
||||
android:text="@string/imported_identity_n"
|
||||
android:padding="3dip" />
|
||||
<TextView
|
||||
android:textSize="20sp"
|
||||
@ -43,19 +43,19 @@
|
||||
android:padding="15dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Verified!"/>
|
||||
android:text="@string/verified5"/>
|
||||
|
||||
<Button android:id="@+id/compare_button"
|
||||
android:padding="15dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Compare"/>
|
||||
android:text="@string/compare5"/>
|
||||
|
||||
<Button android:id="@+id/cancel_button"
|
||||
android:padding="15dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cancel" />
|
||||
android:text="@string/cancel" />
|
||||
</LinearLayout>
|
||||
|
||||
</TableRow>
|
||||
|
@ -14,7 +14,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="They read this:"
|
||||
android:text="@string/they_read_this"
|
||||
android:padding="7dip" />
|
||||
|
||||
<TextView
|
||||
@ -31,7 +31,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="You read this:"
|
||||
android:text="@string/you_read_this"
|
||||
android:padding="7dip" />
|
||||
|
||||
<TextView
|
||||
|
@ -12,7 +12,7 @@
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="Identity:"
|
||||
android:text="@string/identity5"
|
||||
android:layout_marginRight="7dip" />
|
||||
<TextView
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
@ -34,14 +34,14 @@
|
||||
android:padding="5dip"
|
||||
android:layout_width="100dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QR Code" />
|
||||
android:text="@string/qr_code" />
|
||||
|
||||
<Button android:id="@+id/ok_button"
|
||||
android:layout_margin="10dip"
|
||||
android:padding="5dip"
|
||||
android:layout_width="100dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ok"/>
|
||||
android:text="@android:string/ok"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Finished"
|
||||
<item android:title="@string/menu_finished"
|
||||
android:id="@+id/menu_selection_finished"
|
||||
android:icon="@drawable/ic_menu_done_holo_dark"
|
||||
android:showAsAction="ifRoom"
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Select All"
|
||||
<item android:title="@string/menu_select_all"
|
||||
android:id="@+id/menu_select_all" />
|
||||
|
||||
<item android:title="Unselect All"
|
||||
<item android:title="@string/menu_unselect_all"
|
||||
android:id="@+id/menu_unselect_all" />
|
||||
</menu>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:title="Add attachment"
|
||||
<item android:title="@string/menu_add_attachment"
|
||||
android:id="@+id/menu_add_attachment"
|
||||
android:icon="@drawable/ic_menu_attach" />
|
||||
|
||||
<item android:title="Delete thread"
|
||||
<item android:title="@string/menu_delete_thread"
|
||||
android:id="@+id/menu_delete_thread"
|
||||
android:icon="@android:drawable/ic_menu_delete" />
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Send unencrypted"
|
||||
<item android:title="@string/menu_send_unencrypted"
|
||||
android:id="@+id/menu_context_send_unencrypted" />
|
||||
</menu>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:title="Call"
|
||||
<item android:title="@string/menu_call"
|
||||
android:id="@+id/menu_call"
|
||||
android:icon="@drawable/ic_menu_call"
|
||||
android:showAsAction="ifRoom" />
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Copy text"
|
||||
<item android:title="@string/menu_copy_text"
|
||||
android:id="@+id/menu_context_copy" />
|
||||
|
||||
<item android:title="Delete message"
|
||||
<item android:title="@string/menu_delete_message"
|
||||
android:id="@+id/menu_context_delete_message" />
|
||||
|
||||
<item android:title="Message details"
|
||||
<item android:title="@string/menu_message_details"
|
||||
android:id="@+id/menu_context_details" />
|
||||
|
||||
<item android:title="Forward message"
|
||||
<item android:title="@string/menu_forward_message"
|
||||
android:id="@+id/menu_context_forward" />
|
||||
</menu>
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:icon="@drawable/ic_menu_lock_holo_dark"
|
||||
android:showAsAction="ifRoom">
|
||||
<menu>
|
||||
<item android:title="Start Secure Session"
|
||||
<item android:title="@string/menu_start_secure_session"
|
||||
android:id="@+id/menu_start_secure_session" />
|
||||
|
||||
</menu>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:title="Search"
|
||||
<item android:title="@string/menu_search"
|
||||
android:id="@+id/menu_search"
|
||||
android:icon="@drawable/ic_menu_search_holo_dark"
|
||||
android:actionViewClass="android.widget.SearchView"
|
||||
|
@ -1,17 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:title="Delete Selected"
|
||||
<item android:title="@string/menu_delete_selected"
|
||||
android:id="@+id/menu_delete_selected"
|
||||
android:icon="@drawable/ic_menu_trash_holo_dark"
|
||||
android:showAsAction="ifRoom" />
|
||||
|
||||
<item android:title="Select All"
|
||||
<item android:title="@string/menu_select_all"
|
||||
android:id="@+id/menu_select_all"
|
||||
android:icon="@drawable/ic_menu_selectall_holo_dark" />
|
||||
|
||||
<!-- <item android:title="Unselect All" -->
|
||||
<!-- android:id="@+id/menu_unselect_all" -->
|
||||
<!-- android:icon="@android:drawable/ic_menu_revert" /> -->
|
||||
|
||||
</menu>
|
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Security"
|
||||
<item android:title="@string/menu_security"
|
||||
android:id="@+id/menu_security"
|
||||
android:icon="@drawable/ic_menu_lock_unverified_holo_dark"
|
||||
android:showAsAction="ifRoom">
|
||||
<menu>
|
||||
<item android:title="Verify Session"
|
||||
<item android:title="@string/menu_verify_session"
|
||||
android:id="@+id/menu_verify_session" />
|
||||
|
||||
<item android:title="Verify Recipient"
|
||||
<item android:title="@string/menu_verify_recipient"
|
||||
android:id="@+id/menu_verify_recipient"/>
|
||||
|
||||
<item android:title="Abort Secure Session"
|
||||
<item android:title="@string/menu_abort_secure_session"
|
||||
android:id="@+id/menu_abort_session"/>
|
||||
|
||||
</menu>
|
||||
|
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Security"
|
||||
<item android:title="@string/menu_security"
|
||||
android:id="@+id/menu_security"
|
||||
android:icon="@drawable/ic_menu_lock_verified_holo_dark"
|
||||
android:showAsAction="ifRoom">
|
||||
<menu>
|
||||
<item android:title="Verify Session"
|
||||
<item android:title="@string/menu_verify_session"
|
||||
android:id="@+id/menu_verify_session" />
|
||||
|
||||
<item android:title="Verify Recipient"
|
||||
<item android:title="@string/menu_verify_recipient"
|
||||
android:id="@+id/menu_verify_recipient"/>
|
||||
|
||||
<item android:title="Abort Secure Session"
|
||||
<item android:title="@string/menu_abort_secure_session"
|
||||
android:id="@+id/menu_abort_session"/>
|
||||
|
||||
</menu>
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:title="Compare"
|
||||
<item android:title="@string/menu_compare"
|
||||
android:id="@+id/menu_barcode"
|
||||
android:icon="@drawable/ic_menu_barcode"
|
||||
android:showAsAction="ifRoom">
|
||||
|
||||
<menu>
|
||||
<item android:title="Scan to compare"
|
||||
<item android:title="@string/menu_scan_to_compare"
|
||||
android:id="@+id/menu_scan"/>
|
||||
|
||||
<item android:title="Get scanned to compare"
|
||||
<item android:title="@string/menu_get_scanned_to_compare"
|
||||
android:id="@+id/menu_get_scanned"/>
|
||||
|
||||
</menu>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Unlock"
|
||||
<item android:title="@string/menu_unlock"
|
||||
android:id="@+id/menu_unlock"
|
||||
android:showAsAction="ifRoom" />
|
||||
|
||||
|
@ -1,28 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="New Message"
|
||||
<item android:title="@string/menu_new_message"
|
||||
android:id="@+id/menu_new_message"
|
||||
android:icon="@drawable/ic_menu_msg_compose_holo_dark"
|
||||
android:showAsAction="ifRoom" />
|
||||
|
||||
<item android:title="Settings"
|
||||
<item android:title="@string/menu_settings"
|
||||
android:id="@+id/menu_settings"
|
||||
android:icon="@android:drawable/ic_menu_preferences" />
|
||||
|
||||
<item android:title="Import/Export"
|
||||
<item android:title="@string/menu_import_export"
|
||||
android:icon="@android:drawable/ic_menu_save">
|
||||
<menu>
|
||||
<item android:title="Import"
|
||||
<item android:title="@string/menu_import"
|
||||
android:id="@+id/menu_import"
|
||||
android:icon="@android:drawable/ic_menu_revert" />
|
||||
|
||||
<item android:title="Export"
|
||||
<item android:title="@string/menu_export"
|
||||
android:id="@+id/menu_export"
|
||||
android:icon="@android:drawable/ic_menu_save" />
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item android:title="Clear Passphrase"
|
||||
<item android:title="@string/menu_clear_passphrase"
|
||||
android:id="@+id/menu_clear_passphrase"
|
||||
android:icon="@android:drawable/ic_menu_close_clear_cancel" />
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="Verified"
|
||||
<item android:title="@string/menu_verified"
|
||||
android:id="@+id/menu_session_verified"
|
||||
android:icon="@drawable/ic_menu_done_holo_dark"
|
||||
android:showAsAction="ifRoom" />
|
||||
|
@ -1,28 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Activity background color -->
|
||||
<drawable name="class_zero_background">#7f040000</drawable>
|
||||
|
||||
<!-- Widget background -->
|
||||
<drawable name="light_blue_background">#ffecfbff</drawable>
|
||||
<drawable name="white_background">#ffffffff</drawable>
|
||||
<drawable name="alert_background">#f0777700</drawable>
|
||||
|
||||
<!-- text color -->
|
||||
<drawable name="text_color">#ffffffff</drawable>
|
||||
<drawable name="text_color_red">#ffff0000</drawable>
|
||||
<drawable name="text_color_black">#ff000000</drawable>
|
||||
<drawable name="text_color_offwhite">#55ffffff</drawable>
|
||||
|
||||
<!-- Chat "sent time" text background -->
|
||||
<color name="timestamp_color">#bf000000</color>
|
||||
|
||||
<!-- For dark theme -->
|
||||
<drawable name="lightgrey_background">#ff2f2f2f</drawable>
|
||||
<drawable name="softgrey_background">#ff181818</drawable>
|
||||
|
||||
<!-- the background color used for unread conversation -->
|
||||
<color name="light_list_bgcolor">#ffeeeeee</color>
|
||||
|
||||
|
||||
</resources>
|
@ -3,4 +3,387 @@
|
||||
<string name="app_name">TextSecure</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
|
||||
<!-- ApplicationExportManager -->
|
||||
<string name="import_database_and_settings_title">Import Database and Settings?</string>
|
||||
<string name="import_database_and_settings_message">Import TextSecure database, keys, and settings from the SD Card?\n\nWARNING: This will clobber any existing messages, keys, and settings!</string>
|
||||
<string name="importing_database_and_keys">Importing Database and Keys</string>
|
||||
<string name="importing_your_sms_database_keys_and_settings">Importing your SMS database, keys, and settings...</string>
|
||||
<string name="export_database_question">Export Database?</string>
|
||||
<string name="export_textsecure_database_keys_and_settings_prompt">Export TextSecure database, keys, and settings to the SD Card?</string>
|
||||
<string name="exporting_database_and_keys">Exporting Database and Keys</string>
|
||||
<string name="exporting_your_sms_database_keys_and_settings">Exporting your SMS database, keys, and settings...</string>
|
||||
<string name="no_sd_card_found_exclamation">No SD card found!</string>
|
||||
<string name="error_exporting_to_sd_exclamation">Error exporting to SD!</string>
|
||||
<string name="import_successful_exclamation">Import Successful!</string>
|
||||
<string name="export_successful_exclamation">Export Successful!</string>
|
||||
|
||||
<!-- ApplicationMigrationManager -->
|
||||
<string name="migrating_database">Migrating Database</string>
|
||||
<string name="migrating_text_message_database">Migrating text message database...</string>
|
||||
<string name="copy_system_text_message_database_question">Copy System Text Message Database?</string>
|
||||
<string name="copy_system_text_message_database_explanation">TextSecure uses an encrypted database that is separate from the default system database. Would you like to copy your existing text messages into TextSecure\'s encrypted database? Your default system database will be unaffected.</string>
|
||||
<string name="copy">Copy</string>
|
||||
<string name="dont_copy">Don\'t copy</string>
|
||||
|
||||
<!-- ApplicationPreferencesActivity -->
|
||||
<string name="not_found_exclamation">Not found!</string>
|
||||
<string name="no_valid_identity_key_was_found_in_the_specified_contact">No valid identity key was found in the specified contact.</string>
|
||||
<string name="you_don_t_have_an_identity_key_exclamation">You don\'t have an identity key!</string>
|
||||
<string name="you_have_not_yet_defined_a_contact_for_yourself">You have not yet defined a contact for yourself! Select one in the Settings menu.</string>
|
||||
<string name="exported_to_contacts_database">Exported to contacts database!</string>
|
||||
<string name="you_need_to_have_entered_your_passphrase_before_importing_keys">You need to have entered your passphrase before importing keys...</string>
|
||||
<string name="you_need_to_have_entered_your_passphrase_before_managing_keys">You need to have entered your passphrase before managing keys...</string>
|
||||
<string name="you_havent_set_a_passphrase_yet">You haven\'t set a passphrase yet!</string>
|
||||
|
||||
<!-- ConversationItem -->
|
||||
<string name="message_size_d_kb">Message size: %d KB</string>
|
||||
<string name="expires_s">Expires: %s</string>
|
||||
<string name="error_sending_message">Error sending message</string>
|
||||
<string name="sending">Sending...</string>
|
||||
<string name="saving_attachment">Saving Attachment</string>
|
||||
<string name="saving_attachment_to_sd_card">Saving attachment to SD card...</string>
|
||||
<string name="save_to_sd_card">Save to SD Card?</string>
|
||||
<string name="this_media_has_been_stored_in_an_encrypted_database_warning">This media has been stored in an encrypted database. The version you save to the SD card will no longer be encrypted, would you like to continue?</string>
|
||||
<string name="error_while_saving_attachment_to_sd_card">Error while saving attachment to SD card!</string>
|
||||
<string name="success_exclamation">Success!</string>
|
||||
<string name="unable_to_write_to_sd_card_exclamation">Unable to write to SD Card!</string>
|
||||
<string name="view_secure_media_question">View secure media?</string>
|
||||
<string name="this_media_has_been_stored_in_an_encrypted_database_external_viewer_warning">This media has been stored in an encrypted database. Unfortunately, to view it with an external content viewer currently requires the data to be temporarily decrypted and written to disk. Are you sure that you would like to do this?</string>
|
||||
<string name="key_exchange_message2">Key exchange message</string>
|
||||
<string name="received_and_processed_key_exchange_message">Received and processed key exchange message.</string>
|
||||
<string name="error_received_stale_key_exchange_message">Error, received stale key exchange message.</string>
|
||||
<string name="received_key_exchange_message_click_to_process">Received key exchange message, click to process</string>
|
||||
|
||||
<!-- ConversationActivity -->
|
||||
<string name="initiate_secure_session_question">Initiate Secure Session?</string>
|
||||
<string name="initiate_secure_session_with_s_question">Initiate secure session with %s?</string>
|
||||
<string name="abort_secure_session_confirmation">Abort Secure Session Confirmation</string>
|
||||
<string name="are_you_sure_that_you_want_to_abort_this_secure_session_question">Are you sure that you want to abort this secure session?</string>
|
||||
<string name="delete_thread_confirmation">Delete Thread Confirmation</string>
|
||||
<string name="are_you_sure_that_you_want_to_permanently_delete_this_conversation_question">Are you sure that you want to permanently delete this conversation?</string>
|
||||
<string name="add_attachment">Add attachment</string>
|
||||
<string name="compose_message">Compose Message</string>
|
||||
<string name="sorry_there_was_an_error_setting_your_attachment">Sorry, there was an error setting your attachment.</string>
|
||||
<string name="sorry_the_selected_video_exceeds_message_size_restrictions">Sorry, the selected video exceeds message size restrictions.</string>
|
||||
<string name="sorry_the_selected_audio_exceeds_message_size_restrictions">Sorry, the selected audio exceeds message size restrictions.</string>
|
||||
<string name="recipient_is_not_a_valid_sms_or_email_address_exclamation">Recipient is not a valid SMS or email address!</string>
|
||||
<string name="message_is_empty_exclamation">Message is empty!</string>
|
||||
|
||||
<!-- ConversationFragment -->
|
||||
<string name="message_details">Message details</string>
|
||||
<string name="sender_s_transport_s_sent_received_s">Sender: %1$s\nTransport: %2$s\nSent/Received:%3$s</string>
|
||||
|
||||
<!-- ConversationListAdapter -->
|
||||
<string name="encrypted_message_enter_passphrase">"Encrypted message, enter passphrase... "</string>
|
||||
<string name="key_exchange_message">Key exchange message...</string>
|
||||
|
||||
<!-- ConversationListFragment -->
|
||||
<string name="delete_threads_question">Delete threads?</string>
|
||||
<string name="are_you_sure_you_wish_to_delete_all_selected_conversation_threads">Are you sure you wish to delete ALL selected conversation threads?</string>
|
||||
<string name="delete">Delete</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
|
||||
<!-- KeyScanningActivity -->
|
||||
<string name="no_scanned_key_found_exclamation">No scanned key found!</string>
|
||||
|
||||
<!-- PassphraseChangeActivity -->
|
||||
<string name="passphrases_dont_match_exclamation">Passphrases Don\'t Match!</string>
|
||||
<string name="incorrect_old_passphrase_exclamation">Incorrect old passphrase!</string>
|
||||
|
||||
<!-- PassphraseCreateActivity -->
|
||||
<string name="generating_keypair">Generating KeyPair</string>
|
||||
<string name="generating_a_local_encryption_keypair">Generating a local encryption keypair...</string>
|
||||
|
||||
<!-- PassphrasePromptActivity -->
|
||||
<string name="invalid_passphrase_exclamation">Invalid Passphrase!</string>
|
||||
|
||||
<!-- ReceiveKeyActivity -->
|
||||
<string name="error_you_have_received_a_corrupted_public_key">ERROR:\n\nYou have received a corrupted public key. This key can not be processed, please re-initiate a secure session.</string>
|
||||
<string name="error_you_have_received_a_public_key_from_an_unsupported_version_of_the_protocol">ERROR:\n\nYou have received a public key from an unsupported version of the protocol. This key can not be processed, please re-initiate a secure session.</string>
|
||||
<string name="this_key_exchange_message_does_not_include_an_identity_signature">This key exchange message does not include an identity signature.</string>
|
||||
<string name="this_key_exchange_message_includes_an_identity_signature_but_you_do_not_yet_trust_it">This key exchange message includes an identity signature, but you do not yet trust it.</string>
|
||||
<string name="this_key_exchange_message_includes_an_identity_signature_which_you_trust_for_s">This key exchange message includes an identity signature which you trust for: %s</string>
|
||||
<string name="this_is_the_key_that_you_sent_to_start_your_current_encrypted_session_with_s">This is the key that you sent to start your current encrypted session with %s</string>
|
||||
<string name="this_is_the_key_that_you_received_to_start_your_current_encrypted_session_with_s">This is the key that you received to start your current encrypted session with %s</string>
|
||||
<string name="you_have_received_a_key_exchange_message_from_s_warning_you_already_have_an_encrypted_session">You have received a Key Exchange message from %s.\n\nWARNING: You already have an encrypted session with this contact. If you choose to accept this key exchange message, it will destroy your existing session and you will have to re-authenticate. Would you like to complete this key exchange?</string>
|
||||
<string name="you_have_received_a_key_exchange_message_from_s_you_have_previously_initiated">You have received a Key Exchange message from %s. You have previously initiated a session with this contact, and by accepting this key you will complete the key exchange. Would you like to complete this key exchange?</string>
|
||||
<string name="you_have_initiated_a_key_exchange_message_with_s_but_have_not_yet_received_a_reply">You have initiated a Key Exchange message with %s but have not yet received a reply.</string>
|
||||
<string name="you_have_received_a_key_exchange_message_from_s_you_have_no_existing_session">You have received a Key Exchange message from %s. You have no existing session with this contact, would you like to complete this key exchange?</string>
|
||||
|
||||
<!-- ReviewIdentitiesActivity -->
|
||||
<string name="unable_to_view_corrupted_identity_key_exclamation">Unable to view corrupted identity key!</string>
|
||||
|
||||
<!-- SaveIdentityActivity -->
|
||||
<string name="you_must_specify_a_name_for_this_identity_exclamation">You must specify a name for this identity!</string>
|
||||
<string name="identity_name_exists_exclamation">Identity Name Exists!</string>
|
||||
<string name="an_identity_key_with_the_specified_name_already_exists">An identity key with the specified name already exists.</string>
|
||||
<string name="manage_identities">Manage Identities</string>
|
||||
|
||||
<!-- VerifyIdentityActivity -->
|
||||
<string name="mark_identity_verified_question">Mark Identity Verified?</string>
|
||||
<string name="are_you_sure_you_have_validated_the_recipients_identity_fingerprint_and_would_like_to_mark_it_as_verified">Are you sure you have validated the recipients\' identity fingerprint and would like to mark it as verified?</string>
|
||||
<string name="mark_verified">Mark Verified</string>
|
||||
<string name="you_do_not_have_an_identity_key">You do not have an identity key.</string>
|
||||
<string name="recipient_has_no_identity_key">Recipient has no identity key.</string>
|
||||
<string name="recipient_has_no_identity_key_exclamation">Recipient has no identity key!</string>
|
||||
<string name="scan_their_key_to_compare">Scan their key to compare</string>
|
||||
<string name="get_my_key_scanned">Get my key scanned</string>
|
||||
<string name="warning_the_scanned_key_does_not_match_please_check_the_fingerprint_text_carefully">WARNING, the scanned key DOES NOT match! Please check the fingerprint text carefully.</string>
|
||||
<string name="not_verified_exclamation">NOT Verified!</string>
|
||||
<string name="their_key_is_correct_it_is_also_necessary_to_verify_your_key_with_them_as_well">Their key is correct. It is also necessary to verify your key with them as well.</string>
|
||||
<string name="verified_exclamation">Verified!</string>
|
||||
|
||||
<!-- VerifyImportedIdentityActivity -->
|
||||
<string name="you_must_specify_a_name_for_this_contact_exclamation">You must specify a name for this contact!</string>
|
||||
<string name="save_identity_key_question">Save Identity Key?</string>
|
||||
<string name="error_saving_identity_key_exclamation">Error saving identity key!</string>
|
||||
<string name="this_identity_key_or_an_identity_key_with_the_same_name_already_exists_please_edit_your_key_database">This identity key or an identity key with the same name already exists. Please edit your key database.</string>
|
||||
<string name="scan_to_compare">Scan to compare</string>
|
||||
<string name="get_scanned_to_compare">Get scanned to compare</string>
|
||||
<string name="not_verified_exclamation2">NOT Verified!</string>
|
||||
<string name="warning_the_scanned_key_does_not_match_exclamation">WARNING, the scanned key DOES NOT match!</string>
|
||||
<string name="the_scanned_key_matches_exclamation">The scanned key matches!</string>
|
||||
<string name="verified_exclamation2">Verified!</string>
|
||||
<string name="are_you_sure_that_you_would_like_to_mark_this_as_a_valid_identity_key_for_all_future_correspondence_with_s">Are you sure that you would like to mark this as a valid identity key for all future correspondence with %s? You should only do this if you have actually verified the fingerprint.</string>
|
||||
|
||||
<!-- VerifyKeysActivity -->
|
||||
<string name="mark_session_verified_question">Mark Session Verified?</string>
|
||||
<string name="are_you_sure_that_you_have_validated_these_fingerprints_and_would_like_to_mark_this_session_as_verified">Are you sure that you have validated these fingerprints and would like to mark this session as verified?</string>
|
||||
<string name="mark_verified2">Mark Verified</string>
|
||||
<string name="get_my_fingerprint_scanned">Get my fingerprint scanned</string>
|
||||
<string name="scan_their_fingerprint">Scan their fingerprint</string>
|
||||
<string name="warning_the_scanned_key_does_not_match_please_check_the_fingerprint_text_carefully2">WARNING, the scanned key DOES NOT match! Please check the fingerprint text carefully.</string>
|
||||
<string name="not_verified_exclamation3">NOT Verified!</string>
|
||||
<string name="their_key_is_correct_it_is_also_necessary_to_get_your_fingerprint_scanned_as_well">Their key is correct. It is also necessary to get your fingerprint scanned as well.</string>
|
||||
<string name="verified_exclamation3">Verified!</string>
|
||||
|
||||
<!-- ViewIdentityActivity -->
|
||||
<string name="you_do_not_have_an_identity_key2">You do not have an identity key.</string>
|
||||
<string name="scan_to_compare2">Scan to compare</string>
|
||||
<string name="get_scanned_to_compare2">Get scanned to compare</string>
|
||||
<string name="warning_the_scanned_key_does_not_match_exclamation2">WARNING, the scanned key DOES NOT match!</string>
|
||||
<string name="not_verified_exclamation4">NOT Verified!</string>
|
||||
<string name="the_scanned_key_matches_exclamation2">The scanned key matches!</string>
|
||||
<string name="verified_exclamation4">Verified!</string>
|
||||
|
||||
<!-- KeyExchangeInitiator -->
|
||||
<string name="initiate_despite_existing_request_question">Initiate Despite Existing Request?</string>
|
||||
<string name="youve_already_sent_a_session_initiation_request_to_this_recipient_are_you_sure">You\'ve already sent a session initiation request to this recipient, are you sure you\'d like to send another? This will invalidate the first request.</string>
|
||||
<string name="send">Send</string>
|
||||
|
||||
<!-- MessageDisplayHelper -->
|
||||
<string name="bad_encrypted_message">Bad encrypted message...</string>
|
||||
<string name="decrypting_please_wait">Decrypting, please wait...</string>
|
||||
<string name="message_encrypted_for_non_existing_session">Message encrypted for non-existing session...</string>
|
||||
<string name="decryption_error_local_message_corrupted_mac_doesn_t_match_potential_tampering_question">Decryption error: local message corrupted, MAC doesn\'t match. Potential tampering?</string>
|
||||
|
||||
<!-- MmsDatabase -->
|
||||
<string name="connecting_to_mms_server">Connecting to MMS server...</string>
|
||||
<string name="downloading_mms">Downloading MMS...</string>
|
||||
<string name="mms_download_failed">MMS Download failed!</string>
|
||||
<string name="downloading">Downloading...</string>
|
||||
<string name="anonymous">Anonymous</string>
|
||||
|
||||
<!-- MmsMessageRecord -->
|
||||
<string name="decrypting_mms_please_wait">Decrypting MMS, please wait...</string>
|
||||
<string name="bad_encrypted_mms_message">Bad encrypted MMS message...</string>
|
||||
<string name="mms_message_encrypted_for_non_existing_session">MMS message encrypted for non-existing session...</string>
|
||||
|
||||
<!-- ApplicationMigrationService -->
|
||||
<string name="migrating">Migrating</string>
|
||||
<string name="migrating_system_text_messages">Migrating System Text Messages</string>
|
||||
|
||||
<!-- KeyCachingService -->
|
||||
<string name="textsecure_passphrase_cached">TextSecure Passphrase Cached</string>
|
||||
<string name="textsecure_cached">TextSecure Cached</string>
|
||||
|
||||
<!-- MessageNotifier -->
|
||||
<string name="_d_new_messages">(%d) New messages</string>
|
||||
<string name="_d_new_messages_most_recent_from_s">(%1$d) New messages, most recent from: %2$s</string>
|
||||
<string name="most_recent_from_s">Most recent from: %s</string>
|
||||
|
||||
<!-- auto_initiate_activity -->
|
||||
<string name="you_have_received_a_message_from_someone_who_supports_textsecure_encrypted_sessions_would_you_like_to_initiate_a_key_exchange_so_you_can_communicate_securely">You have received a message from someone who supports TextSecure encrypted sessions. Would you like to initiate a key exchange so you can communicate securely?</string>
|
||||
<string name="initiate_exchange">Initiate Exchange</string>
|
||||
|
||||
<!-- change_passphrase_activity -->
|
||||
<string name="old_passphrase">Old passphrase:</string>
|
||||
<string name="new_passphrase">New passphrase:</string>
|
||||
<string name="repeat_new_passphrase">Repeat new passphrase:</string>
|
||||
|
||||
<!-- contact_selection_group_activity -->
|
||||
<!-- contact_selection_list_activity -->
|
||||
<string name="no_contacts">No contacts.</string>
|
||||
|
||||
<!-- contact_selection_recent_activity -->
|
||||
<string name="no_recent_calls">No recent calls.</string>
|
||||
|
||||
<!-- conversation_activity -->
|
||||
<string name="type_message">Type message</string>
|
||||
<string name="send2">Send</string>
|
||||
<string name="remove">Remove</string>
|
||||
|
||||
<!-- conversation_fragment_cab -->
|
||||
<string name="batch_selection_mode">Batch Selection Mode</string>
|
||||
|
||||
<!-- create_passphrase_activity -->
|
||||
<string name="please_choose_a_passphrase_that_will_be_used_to_locally_encrypt_your_data_this_should_be_a_strong_passphrase">Please choose a passphrase that will be used to locally encrypt your data. This should be a strong passphrase.</string>
|
||||
<string name="passphrase">Passphrase:</string>
|
||||
<string name="repeat">Repeat:</string>
|
||||
|
||||
<!-- mms_download_view -->
|
||||
<string name="download">Download</string>
|
||||
<string name="downloading">Downloading</string>
|
||||
|
||||
<!-- receive_key_activity -->
|
||||
<string name="session">Session</string>
|
||||
<string name="identities">Identities</string>
|
||||
<string name="complete_exchange">Complete Exchange</string>
|
||||
|
||||
<!-- recipients_panel -->
|
||||
<string name="to">To</string>
|
||||
|
||||
<!-- review_identities -->
|
||||
<string name="you_don_t_currently_have_any_identity_keys_in_your_trust_database">You don\'t currently have any identity keys in your trust database.</string>
|
||||
|
||||
<!-- save_identity_activity -->
|
||||
<string name="identity_name">Identity Name:</string>
|
||||
|
||||
<!-- verify_identity_activity -->
|
||||
<string name="their_identity_they_read">Their identity (they read):</string>
|
||||
<string name="your_identity_you_read">Your identity (you read):</string>
|
||||
|
||||
<!-- verify_import_identity_activity -->
|
||||
<string name="identity_name_n">Identity name:\\n</string>
|
||||
<string name="imported_identity_n">Imported identity:\\n</string>
|
||||
<string name="verified5">Verified!</string>
|
||||
<string name="compare5">Compare</string>
|
||||
|
||||
<!-- verify_keys_activity -->
|
||||
<string name="they_read_this">They read this:</string>
|
||||
<string name="you_read_this">You read this:</string>
|
||||
|
||||
<!-- view_identity_activity -->
|
||||
<string name="identity5">Identity:</string>
|
||||
<string name="qr_code">QR Code</string>
|
||||
|
||||
<!-- AndroidManifest.xml -->
|
||||
|
||||
<string name="create_passphrase">Create Passphrase</string>
|
||||
<string name="enter_passphrase">Enter Passphrase</string>
|
||||
<string name="select_contacts">Select Contacts</string>
|
||||
<string name="textsecure_messaging_detected">TextSecure Messaging Detected</string>
|
||||
<string name="public_identity_key">Public Identity Key</string>
|
||||
<string name="change_passphrase2">Change Passphrase</string>
|
||||
<string name="verify_session">Verify Session</string>
|
||||
<string name="verify_identity">Verify Identity</string>
|
||||
<string name="save_identity">Save Identity</string>
|
||||
<string name="manage_identity_keys2">Manage Identity Keys</string>
|
||||
<string name="complete_key_exchange">Complete Key Exchange</string>
|
||||
<string name="verify_imported_identity">Verify Imported Identity</string>
|
||||
|
||||
<!-- preferences.xml -->
|
||||
|
||||
<string name="use_settings">Use Settings</string>
|
||||
<string name="use_textsecure_for_viewing_and_storing_all_incoming_text_messages">Use TextSecure for viewing and storing all incoming text messages</string>
|
||||
<string name="use_textsecure_for_viewing_and_storing_all_incoming_multimedia_messages">Use TextSecure for viewing and storing all incoming multimedia messages</string>
|
||||
<string name="input_settings">Input Settings</string>
|
||||
<string name="pressing_the_enter_key_will_send_text_messages">Pressing the enter key will send text messages</string>
|
||||
<string name="display_settings">Display Settings</string>
|
||||
<string name="choose_identity">Choose Identity</string>
|
||||
<string name="choose_your_contact_entry_from_the_contacts_list">Choose your contact entry from the contacts list.</string>
|
||||
<string name="encryption_settings">Encryption Settings</string>
|
||||
<string name="change_passphrase">Change Passphrase</string>
|
||||
<string name="change_my_passphrase">Change my passphrase</string>
|
||||
<string name="complete_key_exchanges">Complete Key Exchanges</string>
|
||||
<string name="automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key">Automatically complete key exchanges for new sessions or for existing sessions with the same identity key</string>
|
||||
<string name="include_a_whitespace_tag_at_the_end_of_every_non_encrypted_message">Include a whitespace tag at the end of every non-encrypted message</string>
|
||||
<string name="include_whitespace_tag">Include whitespace tag</string>
|
||||
<string name="sign_key_exchange_messages_with_identity_key">Sign key exchange messages with identity key</string>
|
||||
<string name="sign_key_exchange">Sign Key Exchange</string>
|
||||
<string name="forget_passphrase_from_memory_after_some_interval">Forget passphrase from memory after some interval</string>
|
||||
<string name="timeout_passphrase">Timeout passphrase</string>
|
||||
<string name="identity_key_settings">Identity Key Settings</string>
|
||||
<string name="view_my_identity_key">View my identity key</string>
|
||||
<string name="export_my_identity_key">Export my identity key</string>
|
||||
<string name="import_contacts_key">Import Contact\'s Key</string>
|
||||
<string name="import_an_identity_key_from_a_contact">Import an identity key from a contact</string>
|
||||
<string name="manage_identity_keys">Manage Identity Keys</string>
|
||||
<string name="manage_configured_identity_keys">Manage configured identity keys</string>
|
||||
<string name="notification_settings">Notification Settings</string>
|
||||
<string name="notifications">Notifications</string>
|
||||
<string name="display_message_notifications_in_status_bar">Display message notifications in status bar</string>
|
||||
<string name="led_color">LED Color</string>
|
||||
<string name="change_notification_led_color">Change notification LED color</string>
|
||||
<string name="select_led_color">Select LED Color</string>
|
||||
<string name="select_ringtone">Select ringtone</string>
|
||||
<string name="vibrate">Vibrate</string>
|
||||
<string name="also_vibrate_when_notified">Also vibrate when notified</string>
|
||||
|
||||
<!-- **************************************** -->
|
||||
<!-- menus -->
|
||||
<!-- **************************************** -->
|
||||
|
||||
<!-- contact_selection_list -->
|
||||
<string name="menu_select_all">Select All</string>
|
||||
<string name="menu_unselect_all">Unselect All</string>
|
||||
|
||||
<!-- contact_selection -->
|
||||
<string name="menu_finished">Finished</string>
|
||||
|
||||
<!-- conversation_button_context -->
|
||||
<string name="menu_send_unencrypted">Send unencrypted</string>
|
||||
|
||||
<!-- conversation_callable -->
|
||||
<string name="menu_call">Call</string>
|
||||
|
||||
<!-- conversation_context -->
|
||||
<string name="menu_message_details">Message details</string>
|
||||
<string name="menu_copy_text">Copy text</string>
|
||||
<string name="menu_delete_message">Delete message</string>
|
||||
<string name="menu_forward_message">Forward message</string>
|
||||
|
||||
<!-- conversation_insecure -->
|
||||
<string name="menu_start_secure_session">Start Secure Session</string>
|
||||
|
||||
<!-- conversation_list_batch -->
|
||||
<string name="menu_delete_selected">Delete Selected</string>
|
||||
<string name="menu_select_all">Select All</string>
|
||||
|
||||
<!-- conversation_list -->
|
||||
<string name="menu_search">Search</string>
|
||||
|
||||
<!-- conversation_secure_verified -->
|
||||
<!-- conversation_secure_unverified -->
|
||||
<string name="menu_security">Security</string>
|
||||
<string name="menu_verify_session">Verify Session</string>
|
||||
<string name="menu_verify_recipient">Verify Recipient</string>
|
||||
<string name="menu_abort_secure_session">Abort Secure Session</string>
|
||||
|
||||
<!-- conversation -->
|
||||
<string name="menu_add_attachment">Add attachment</string>
|
||||
<string name="menu_delete_thread">Delete thread</string>
|
||||
<string name="menu_compare">Compare</string>
|
||||
|
||||
<!-- key_scanning -->
|
||||
<string name="menu_get_scanned_to_compare">Get scanned to compare</string>
|
||||
<string name="menu_scan_to_compare">Scan to compare</string>
|
||||
|
||||
<!-- text_secure_locked -->
|
||||
<string name="menu_unlock">Unlock</string>
|
||||
|
||||
<!-- text_secure_normal -->
|
||||
<string name="menu_new_message">New Message</string>
|
||||
<string name="menu_settings">Settings</string>
|
||||
<string name="menu_import_export">Import/Export</string>
|
||||
<string name="menu_import">Import</string>
|
||||
<string name="menu_export">Export</string>
|
||||
<string name="menu_clear_passphrase">Clear Passphrase</string>
|
||||
|
||||
<!-- verify_keys -->
|
||||
<string name="menu_verified">Verified</string>
|
||||
|
||||
<!-- EOF -->
|
||||
|
||||
</resources>
|
||||
|
@ -18,59 +18,59 @@
|
||||
*/
|
||||
-->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="Use Settings">
|
||||
<PreferenceCategory android:title="@string/use_settings">
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:key="pref_all_sms"
|
||||
android:summary="Use TextSecure for viewing and storing all incoming text messages"
|
||||
android:summary="@string/use_textsecure_for_viewing_and_storing_all_incoming_text_messages"
|
||||
android:title="Use for all SMS" />
|
||||
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:key="pref_all_mms"
|
||||
android:summary="Use TextSecure for viewing and storing all incoming multimedia messages"
|
||||
android:summary="@string/use_textsecure_for_viewing_and_storing_all_incoming_multimedia_messages"
|
||||
android:title="Use for all MMS" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="Input Settings">
|
||||
<PreferenceCategory android:title="@string/input_settings">
|
||||
<CheckBoxPreference android:defaultValue="false"
|
||||
android:key="pref_enter_sends"
|
||||
android:summary="Pressing the enter key will send text messages"
|
||||
android:summary="@string/pressing_the_enter_key_will_send_text_messages"
|
||||
android:title="Enter Sends" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="Display Settings">
|
||||
<PreferenceCategory android:title="@string/display_settings">
|
||||
|
||||
<Preference android:key="pref_choose_identity"
|
||||
android:title="Choose Identity"
|
||||
android:summary="Choose your contact entry from the contacts list."/>
|
||||
android:title="@string/choose_identity"
|
||||
android:summary="@string/choose_your_contact_entry_from_the_contacts_list"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="Encryption Settings">
|
||||
<PreferenceCategory android:title="@string/encryption_settings">
|
||||
|
||||
<Preference android:key="pref_change_passphrase"
|
||||
android:title="Change Passphrase"
|
||||
android:summary="Change my passphrase"/>
|
||||
android:title="@string/change_passphrase"
|
||||
android:summary="@string/change_my_passphrase"/>
|
||||
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:key="pref_auto_complete_key_exchange"
|
||||
android:title="Complete Key Exchanges"
|
||||
android:summary="Automatically complete key exchanges for new sessions or for existing sessions with the same identity key" />
|
||||
android:title="@string/complete_key_exchanges"
|
||||
android:summary="@string/automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key" />
|
||||
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:key="pref_key_tag_whitespace"
|
||||
android:summary="Include a whitespace tag at the end of every non-encrypted message"
|
||||
android:title="Include whitespace tag" />
|
||||
android:summary="@string/include_a_whitespace_tag_at_the_end_of_every_non_encrypted_message"
|
||||
android:title="@string/include_whitespace_tag" />
|
||||
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:key="pref_send_identity_key"
|
||||
android:summary="Sign key exchange messages with identity key"
|
||||
android:title="Sign Key Exchange" />
|
||||
android:summary="@string/sign_key_exchange_messages_with_identity_key"
|
||||
android:title="@string/sign_key_exchange" />
|
||||
|
||||
<CheckBoxPreference android:defaultValue="false"
|
||||
android:key="pref_timeout_passphrase"
|
||||
android:summary="Forget passphrase from memory after some interval"
|
||||
android:title="Timeout passphrase" />
|
||||
android:summary="@string/forget_passphrase_from_memory_after_some_interval"
|
||||
android:title="@string/timeout_passphrase" />
|
||||
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.PassphraseTimeoutPreference
|
||||
@ -83,38 +83,38 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="Identity Key Settings">
|
||||
<PreferenceCategory android:title="@string/identity_key_settings">
|
||||
<Preference android:key="pref_view_identity"
|
||||
android:title="View My Identity Key"
|
||||
android:summary="View my identity key"/>
|
||||
android:title="@string/view_my_identity_key"
|
||||
android:summary="@string/view_my_identity_key"/>
|
||||
|
||||
<Preference android:key="pref_export_identity"
|
||||
android:title="Export My Identity Key"
|
||||
android:summary="Export my identity key"/>
|
||||
android:title="@string/export_my_identity_key"
|
||||
android:summary="@string/export_my_identity_key"/>
|
||||
|
||||
<Preference android:key="pref_import_identity"
|
||||
android:title="Import Contact's Key"
|
||||
android:summary="Import an identity key from a contact"/>
|
||||
android:title="@string/import_contacts_key"
|
||||
android:summary="@string/import_an_identity_key_from_a_contact"/>
|
||||
|
||||
<Preference android:key="pref_manage_identity"
|
||||
android:title="Manage Identity Keys"
|
||||
android:summary="Manage configured identity keys"/>
|
||||
android:title="@string/manage_identity_keys"
|
||||
android:summary="@string/manage_configured_identity_keys"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="Notification Settings">
|
||||
<PreferenceCategory android:title="@string/notification_settings">
|
||||
<CheckBoxPreference android:key="pref_key_enable_notifications"
|
||||
android:title="Notifications"
|
||||
android:summary="Display message notifications in status bar"
|
||||
android:title="@string/notifications"
|
||||
android:summary="@string/display_message_notifications_in_status_bar"
|
||||
android:defaultValue="true" />
|
||||
<ListPreference
|
||||
android:key="pref_led_color"
|
||||
android:defaultValue="green"
|
||||
android:title="LED Color"
|
||||
android:title="@string/led_color"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:summary="Change notification LED color"
|
||||
android:summary="@string/change_notification_led_color"
|
||||
android:entries="@array/pref_led_color_entries"
|
||||
android:entryValues="@array/pref_led_color_values"
|
||||
android:dialogTitle="Select LED Color" />
|
||||
android:dialogTitle="@string/select_led_color" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
|
||||
android:key="pref_led_blink"
|
||||
@ -130,14 +130,14 @@
|
||||
<RingtonePreference android:layout="?android:attr/preferenceLayoutChild"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_ringtone"
|
||||
android:title="Select ringtone"
|
||||
android:title="@string/select_ringtone"
|
||||
android:ringtoneType="notification"
|
||||
android:defaultValue="content://settings/system/notification_sound" />
|
||||
<CheckBoxPreference android:layout="?android:attr/preferenceLayoutChild"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_vibrate"
|
||||
android:defaultValue="true"
|
||||
android:title="Vibrate"
|
||||
android:summary="Also vibrate when notified" />
|
||||
android:title="@string/vibrate"
|
||||
android:summary="@string/also_vibrate_when_notified" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
@ -39,17 +39,16 @@ public class ApplicationExportManager extends Handler implements Runnable {
|
||||
|
||||
public void importDatabase() {
|
||||
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context);
|
||||
alertBuilder.setTitle("Import Database and Settings?");
|
||||
alertBuilder.setMessage("Import TextSecure database, keys, and settings from the SD Card?" +
|
||||
"\n\nWARNING: This will clobber any existing messages, keys, and " +
|
||||
"settings!");
|
||||
alertBuilder.setTitle(R.string.import_database_and_settings_title);
|
||||
alertBuilder.setMessage(R.string.import_database_and_settings_message);
|
||||
alertBuilder.setCancelable(false);
|
||||
alertBuilder.setPositiveButton("Import", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
task = TASK_IMPORT;
|
||||
progressDialog = new ProgressDialog(context);
|
||||
progressDialog.setTitle("Importing Database and Keys");
|
||||
progressDialog.setMessage("Importnig your SMS database, keys, and settings...");
|
||||
progressDialog.setTitle(context.getString(R.string.importing_database_and_keys));
|
||||
progressDialog.setMessage(context
|
||||
.getString(R.string.importing_your_sms_database_keys_and_settings));
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.setIndeterminate(true);
|
||||
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
@ -70,16 +69,17 @@ public class ApplicationExportManager extends Handler implements Runnable {
|
||||
public void exportDatabase() {
|
||||
Log.w("ApplicationExportManager", "Context: " + context);
|
||||
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context);
|
||||
alertBuilder.setTitle("Export Database?");
|
||||
alertBuilder.setMessage("Export TextSecure database, keys, and settings to the SD Card?");
|
||||
alertBuilder.setTitle(R.string.export_database_question);
|
||||
alertBuilder.setMessage(R.string.export_textsecure_database_keys_and_settings_prompt);
|
||||
alertBuilder.setCancelable(false);
|
||||
|
||||
alertBuilder.setPositiveButton("Export", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
task = TASK_EXPORT;
|
||||
progressDialog = new ProgressDialog(context);
|
||||
progressDialog.setTitle("Exporting Database and Keys");
|
||||
progressDialog.setMessage("Exporting your SMS database, keys, and settings...");
|
||||
progressDialog.setTitle(context.getString(R.string.exporting_database_and_keys));
|
||||
progressDialog.setMessage(context
|
||||
.getString(R.string.exporting_your_sms_database_keys_and_settings));
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.setIndeterminate(true);
|
||||
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
@ -117,18 +117,18 @@ public class ApplicationExportManager extends Handler implements Runnable {
|
||||
public void handleMessage(Message message) {
|
||||
switch (message.what) {
|
||||
case ERROR_NO_SD:
|
||||
Toast.makeText(context, "No SD card found!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(context, R.string.no_sd_card_found_exclamation, Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case ERROR_IO:
|
||||
Toast.makeText(context, "Error exporting to SD!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(context, R.string.error_exporting_to_sd_exclamation, Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case COMPLETE:
|
||||
switch (task) {
|
||||
case TASK_IMPORT:
|
||||
Toast.makeText(context, "Import Successful!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(context, R.string.import_successful_exclamation, Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case TASK_EXPORT:
|
||||
Toast.makeText(context, "Export Successful!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(context, R.string.export_successful_exclamation, Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -35,8 +35,8 @@ public class ApplicationMigrationManager extends Handler {
|
||||
|
||||
private void displayMigrationProgress() {
|
||||
progressDialog = new ProgressDialog(context);
|
||||
progressDialog.setTitle("Migrating Database");
|
||||
progressDialog.setMessage("Migrating text message database...");
|
||||
progressDialog.setTitle(context.getString(R.string.migrating_database));
|
||||
progressDialog.setMessage(context.getString(R.string.migrating_text_message_database));
|
||||
progressDialog.setMax(10000);
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.setIndeterminate(false);
|
||||
@ -51,14 +51,11 @@ public class ApplicationMigrationManager extends Handler {
|
||||
|
||||
private void displayMigrationPrompt() {
|
||||
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context);
|
||||
alertBuilder.setTitle("Copy System Text Message Database?");
|
||||
alertBuilder.setMessage("TextSecure uses an encrypted database that is " +
|
||||
"separate from the default system database. Would you like to " +
|
||||
"copy your existing text messages into TextSecure's encrypted " +
|
||||
"database? Your default system database will be unaffected.");
|
||||
alertBuilder.setTitle(R.string.copy_system_text_message_database_question);
|
||||
alertBuilder.setMessage(R.string.copy_system_text_message_database_explanation);
|
||||
alertBuilder.setCancelable(false);
|
||||
|
||||
alertBuilder.setPositiveButton("Copy", new DialogInterface.OnClickListener() {
|
||||
alertBuilder.setPositiveButton(R.string.copy, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
displayMigrationProgress();
|
||||
Intent intent = new Intent(context, ApplicationMigrationService.class);
|
||||
@ -68,7 +65,7 @@ public class ApplicationMigrationManager extends Handler {
|
||||
}
|
||||
});
|
||||
|
||||
alertBuilder.setNegativeButton("Don't copy", new DialogInterface.OnClickListener() {
|
||||
alertBuilder.setNegativeButton(R.string.dont_copy, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
context.getSharedPreferences("SecureSMS", Context.MODE_PRIVATE)
|
||||
.edit()
|
||||
|
@ -138,7 +138,10 @@ public class ApplicationPreferencesActivity extends SherlockPreferenceActivity {
|
||||
String contactName = ContactAccessor.getInstance().getNameFromContact(this, uri);
|
||||
|
||||
if (identityKey == null) {
|
||||
Dialogs.displayAlert(this, "Not found!", "No valid identity key was found in the specified contact.", android.R.drawable.ic_dialog_alert);
|
||||
Dialogs.displayAlert(this,
|
||||
getString(R.string.not_found_exclamation),
|
||||
getString(R.string.no_valid_identity_key_was_found_in_the_specified_contact),
|
||||
android.R.drawable.ic_dialog_alert);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -173,13 +176,15 @@ public class ApplicationPreferencesActivity extends SherlockPreferenceActivity {
|
||||
.getString(IDENTITY_PREF, null);
|
||||
|
||||
if (!IdentityKeyUtil.hasIdentityKey(ApplicationPreferencesActivity.this)) {
|
||||
Toast.makeText(ApplicationPreferencesActivity.this, "You don't have an identity key!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(ApplicationPreferencesActivity.this,
|
||||
R.string.you_don_t_have_an_identity_key_exclamation,
|
||||
Toast.LENGTH_LONG).show();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (contactUri == null) {
|
||||
Toast.makeText(ApplicationPreferencesActivity.this,
|
||||
"You have not yet defined a contact for yourself! Select one in the Settings menu.",
|
||||
R.string.you_have_not_yet_defined_a_contact_for_yourself,
|
||||
Toast.LENGTH_LONG).show();
|
||||
return true;
|
||||
}
|
||||
@ -187,7 +192,9 @@ public class ApplicationPreferencesActivity extends SherlockPreferenceActivity {
|
||||
ContactAccessor.getInstance().insertIdentityKey(ApplicationPreferencesActivity.this, Uri.parse(contactUri),
|
||||
IdentityKeyUtil.getIdentityKey(ApplicationPreferencesActivity.this));
|
||||
|
||||
Toast.makeText(ApplicationPreferencesActivity.this, "Exported to contacts database!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(ApplicationPreferencesActivity.this,
|
||||
R.string.exported_to_contacts_database,
|
||||
Toast.LENGTH_LONG).show();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -202,7 +209,7 @@ public class ApplicationPreferencesActivity extends SherlockPreferenceActivity {
|
||||
startActivityForResult(importIntent, IMPORT_IDENTITY_ID);
|
||||
} else {
|
||||
Toast.makeText(ApplicationPreferencesActivity.this,
|
||||
"You need to have entered your passphrase before importing keys...",
|
||||
R.string.you_need_to_have_entered_your_passphrase_before_importing_keys,
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@ -220,7 +227,7 @@ public class ApplicationPreferencesActivity extends SherlockPreferenceActivity {
|
||||
startActivity(manageIntent);
|
||||
} else {
|
||||
Toast.makeText(ApplicationPreferencesActivity.this,
|
||||
"You need to have entered your passphrase before managing keys...",
|
||||
R.string.you_need_to_have_entered_your_passphrase_before_managing_keys,
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@ -235,7 +242,9 @@ public class ApplicationPreferencesActivity extends SherlockPreferenceActivity {
|
||||
if (settings.getBoolean("passphrase_initialized", false)) {
|
||||
startActivity(new Intent(ApplicationPreferencesActivity.this, PassphraseChangeActivity.class));
|
||||
} else {
|
||||
Toast.makeText(ApplicationPreferencesActivity.this, "You haven't set a passphrase yet!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(ApplicationPreferencesActivity.this,
|
||||
R.string.you_havent_set_a_passphrase_yet,
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -260,10 +260,10 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
final Recipient recipient = getRecipients().getPrimaryRecipient();
|
||||
String recipientName = (recipient.getName() == null ? recipient.getNumber() : recipient.getName());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("Initiate Secure Session?");
|
||||
builder.setTitle(R.string.initiate_secure_session_question);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_info);
|
||||
builder.setCancelable(true);
|
||||
builder.setMessage("Initiate secure session with " + recipientName + "?");
|
||||
builder.setMessage(String.format(getString(R.string.initiate_secure_session_with_s_question), recipientName));
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
@ -278,10 +278,10 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
|
||||
private void handleAbortSecureSession() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("Abort Secure Session Confirmation");
|
||||
builder.setTitle(R.string.abort_secure_session_confirmation);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setCancelable(true);
|
||||
builder.setMessage("Are you sure that you want to abort this secure session?");
|
||||
builder.setMessage(R.string.are_you_sure_that_you_want_to_abort_this_secure_session_question);
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
@ -306,10 +306,10 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
|
||||
private void handleDeleteThread() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("Delete Thread Confirmation");
|
||||
builder.setTitle(R.string.delete_thread_confirmation);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setCancelable(true);
|
||||
builder.setMessage("Are you sure that you want to permanently delete this conversation?");
|
||||
builder.setMessage(R.string.are_you_sure_that_you_want_to_permanently_delete_this_conversation_question);
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
@ -327,7 +327,7 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
private void handleAddAttachment() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setIcon(R.drawable.ic_dialog_attach);
|
||||
builder.setTitle("Add attachment");
|
||||
builder.setTitle(R.string.add_attachment);
|
||||
builder.setAdapter(attachmentAdapter, new AttachmentTypeListener());
|
||||
builder.show();
|
||||
}
|
||||
@ -356,7 +356,7 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
subtitle = getRecipients().getPrimaryRecipient().getNumber();
|
||||
}
|
||||
} else {
|
||||
title = "Compose Message";
|
||||
title = getString(R.string.compose_message);
|
||||
subtitle = "";
|
||||
}
|
||||
|
||||
@ -473,7 +473,7 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
attachmentManager.setImage(imageUri);
|
||||
} catch (IOException e) {
|
||||
attachmentManager.clear();
|
||||
Toast.makeText(this, "Sorry, there was an error setting your attachment.",
|
||||
Toast.makeText(this, R.string.sorry_there_was_an_error_setting_your_attachment,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Log.w("ComposeMessageActivity", e);
|
||||
}
|
||||
@ -484,12 +484,12 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
attachmentManager.setVideo(videoUri);
|
||||
} catch (IOException e) {
|
||||
attachmentManager.clear();
|
||||
Toast.makeText(this, "Sorry, there was an error setting your attachment.",
|
||||
Toast.makeText(this, R.string.sorry_there_was_an_error_setting_your_attachment,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Log.w("ComposeMessageActivity", e);
|
||||
} catch (MediaTooLargeException e) {
|
||||
attachmentManager.clear();
|
||||
Toast.makeText(this, "Sorry, the selected video exceeds message size restrictions.",
|
||||
Toast.makeText(this, R.string.sorry_the_selected_video_exceeds_message_size_restrictions,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Log.w("ComposeMessageActivity", e);
|
||||
}
|
||||
@ -500,12 +500,12 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
attachmentManager.setAudio(audioUri);
|
||||
} catch (IOException e) {
|
||||
attachmentManager.clear();
|
||||
Toast.makeText(this, "Sorry, there was an error setting your attachment.",
|
||||
Toast.makeText(this, R.string.sorry_there_was_an_error_setting_your_attachment,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Log.w("ComposeMessageActivity", e);
|
||||
} catch (MediaTooLargeException e) {
|
||||
attachmentManager.clear();
|
||||
Toast.makeText(this, "Sorry, the selected audio exceeds message size restrictions.",
|
||||
Toast.makeText(this, R.string.sorry_the_selected_audio_exceeds_message_size_restrictions,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Log.w("ComposeMessageActivity", e);
|
||||
}
|
||||
@ -546,7 +546,7 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
String rawText = composeText.getText().toString();
|
||||
|
||||
if (rawText.length() < 1 && !attachmentManager.isAttachmentPresent())
|
||||
throw new InvalidMessageException("Message is empty!");
|
||||
throw new InvalidMessageException(getString(R.string.message_is_empty_exclamation));
|
||||
|
||||
if (!sendEncrypted && sp.getBoolean(ApplicationPreferencesActivity.WHITESPACE_PREF, true) && rawText.length() <= 145)
|
||||
rawText = rawText + " ";
|
||||
@ -600,10 +600,13 @@ public class ConversationActivity extends SherlockFragmentActivity
|
||||
sendComplete(recipients, allocatedThreadId);
|
||||
MessageNotifier.updateNotification(ConversationActivity.this, false);
|
||||
} catch (RecipientFormattingException ex) {
|
||||
Toast.makeText(ConversationActivity.this, "Recipient is not a valid SMS or email address!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(ConversationActivity.this,
|
||||
R.string.recipient_is_not_a_valid_sms_or_email_address_exclamation,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Log.w("compose", ex);
|
||||
} catch (InvalidMessageException ex) {
|
||||
Toast.makeText(ConversationActivity.this, "Message is empty!", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(ConversationActivity.this, R.string.message_is_empty_exclamation,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
Log.w("compose", ex);
|
||||
} catch (MmsException e) {
|
||||
Log.w("ComposeMessageActivity", e);
|
||||
|
@ -187,7 +187,7 @@ public class ConversationAdapter extends CursorAdapter {
|
||||
if (body == null)
|
||||
message.setBody("");
|
||||
else
|
||||
MessageDisplayHelper.setDecryptedMessageBody(body, message, masterCipher);
|
||||
MessageDisplayHelper.setDecryptedMessageBody(context, body, message, masterCipher);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -130,12 +130,13 @@ public class ConversationFragment extends SherlockListFragment
|
||||
|
||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("EEE MMM d, yyyy 'at' hh:mm:ss a zzz");
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setTitle("Message Details");
|
||||
builder.setTitle(R.string.message_details);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_info);
|
||||
builder.setCancelable(false);
|
||||
builder.setMessage("Sender: " + sender + "\nTransport: " + transport.toUpperCase() +
|
||||
"\nSent/Received: " + dateFormatter.format(new Date(date)));
|
||||
builder.setPositiveButton("Ok", null);
|
||||
builder.setMessage(String.format(getSherlockActivity().getString(R.string.sender_s_transport_s_sent_received_s),
|
||||
sender, transport.toUpperCase(),
|
||||
dateFormatter.format(new Date(date))));
|
||||
builder.setPositiveButton(android.R.string.ok, null);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
|
@ -149,8 +149,12 @@ public class ConversationItem extends LinearLayout {
|
||||
}
|
||||
|
||||
private void setMmsNotificationAttributes(MmsMessageRecord messageRecord) {
|
||||
String messageSize = "Message size: " + messageRecord.getMessageSize() + " KB";
|
||||
String expires = "Expires: " + DateUtils.getRelativeTimeSpanString(getContext(), messageRecord.getExpiration(), false);
|
||||
String messageSize = String.format(getContext().getString(R.string.message_size_d_kb),
|
||||
messageRecord.getMessageSize());
|
||||
String expires = String.format(getContext().getString(R.string.expires_s),
|
||||
DateUtils.getRelativeTimeSpanString(getContext(),
|
||||
messageRecord.getExpiration(),
|
||||
false));
|
||||
|
||||
dateText.setText(messageSize + "\n" + expires);
|
||||
|
||||
@ -158,7 +162,7 @@ public class ConversationItem extends LinearLayout {
|
||||
mmsDownloadButton.setVisibility(View.VISIBLE);
|
||||
mmsDownloadingLabel.setVisibility(View.GONE);
|
||||
} else {
|
||||
mmsDownloadingLabel.setText(MmsDatabase.Types.getLabelForStatus(messageRecord.getStatus()));
|
||||
mmsDownloadingLabel.setText(MmsDatabase.Types.getLabelForStatus(context, messageRecord.getStatus()));
|
||||
mmsDownloadButton.setVisibility(View.GONE);
|
||||
mmsDownloadingLabel.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -207,10 +211,10 @@ public class ConversationItem extends LinearLayout {
|
||||
private void setBodyText(MessageRecord messageRecord) {
|
||||
String body = messageRecord.getBody();
|
||||
|
||||
if (messageRecord.isKeyExchange() && messageRecord.isOutgoing()) body = "\nKey exchange message";
|
||||
else if (messageRecord.isProcessedKeyExchange() && !messageRecord.isOutgoing()) body = "\nReceived and processed key exchange message.";
|
||||
else if (messageRecord.isStaleKeyExchange()) body = "\nError, received stale key exchange message.";
|
||||
else if (messageRecord.isKeyExchange() && !messageRecord.isOutgoing()) body = "\nReceived key exchange message, click to process";
|
||||
if (messageRecord.isKeyExchange() && messageRecord.isOutgoing()) body = "\n" + getContext().getString(R.string.key_exchange_message2);
|
||||
else if (messageRecord.isProcessedKeyExchange() && !messageRecord.isOutgoing()) body = "\n" + getContext().getString(R.string.received_and_processed_key_exchange_message);
|
||||
else if (messageRecord.isStaleKeyExchange()) body = "\n" + getContext().getString(R.string.error_received_stale_key_exchange_message);
|
||||
else if (messageRecord.isKeyExchange() && !messageRecord.isOutgoing()) body = "\n" + getContext().getString(R.string.received_key_exchange_message_click_to_process);
|
||||
|
||||
bodyText.setText(body, TextView.BufferType.SPANNABLE);
|
||||
|
||||
@ -274,8 +278,8 @@ public class ConversationItem extends LinearLayout {
|
||||
mmsDownloadButton.setVisibility(View.GONE);
|
||||
mmsDownloadingLabel.setVisibility(View.GONE);
|
||||
|
||||
if (messageRecord.isFailed()) dateText.setText("Error sending message");
|
||||
else if (messageRecord.isPending()) dateText.setText("Sending...");
|
||||
if (messageRecord.isFailed()) dateText.setText(R.string.error_sending_message);
|
||||
else if (messageRecord.isPending()) dateText.setText(R.string.sending);
|
||||
else dateText.setText(DateUtils.getRelativeTimeSpanString(getContext(),
|
||||
messageRecord.getDate(),
|
||||
false));
|
||||
@ -358,8 +362,8 @@ public class ConversationItem extends LinearLayout {
|
||||
|
||||
private void saveToSdCard() {
|
||||
progressDialog = new ProgressDialog(context);
|
||||
progressDialog.setTitle("Saving Attachment");
|
||||
progressDialog.setMessage("Saving attachment to SD card...");
|
||||
progressDialog.setTitle(context.getString(R.string.saving_attachment));
|
||||
progressDialog.setMessage(context.getString(R.string.saving_attachment_to_sd_card));
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.setIndeterminate(true);
|
||||
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
@ -369,10 +373,10 @@ public class ConversationItem extends LinearLayout {
|
||||
|
||||
public boolean onLongClick(View v) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setTitle("Save to SD Card?");
|
||||
builder.setTitle(R.string.save_to_sd_card);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setCancelable(true);
|
||||
builder.setMessage("This media has been stored in an encrypted database. The version you save to the SD card will no longer be encrypted, would you like to continue?");
|
||||
builder.setMessage(R.string.this_media_has_been_stored_in_an_encrypted_database_warning);
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
saveToSdCard();
|
||||
@ -388,13 +392,16 @@ public class ConversationItem extends LinearLayout {
|
||||
public void handleMessage(Message message) {
|
||||
switch (message.what) {
|
||||
case FAILURE:
|
||||
Toast.makeText(context, "Error while saving attachment to SD card!", Toast.LENGTH_LONG);
|
||||
Toast.makeText(context, R.string.error_while_saving_attachment_to_sd_card,
|
||||
Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case SUCCESS:
|
||||
Toast.makeText(context, "Success!", Toast.LENGTH_LONG);
|
||||
Toast.makeText(context, R.string.success_exclamation,
|
||||
Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case WRITE_ACCESS_FAILURE:
|
||||
Toast.makeText(context, "Unable to write to SD Card!", Toast.LENGTH_LONG);
|
||||
Toast.makeText(context, R.string.unable_to_write_to_sd_card_exclamation,
|
||||
Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -428,10 +435,10 @@ public class ConversationItem extends LinearLayout {
|
||||
|
||||
public void onClick(View v) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setTitle("View secure media?");
|
||||
builder.setTitle(R.string.view_secure_media_question);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setCancelable(true);
|
||||
builder.setMessage("This media has been stored in an encrypted database. Unfortunately, to view it with an external content viewer currently requires the data to be temporarily decrypted and written to disk. Are you sure that you would like to do this?");
|
||||
builder.setMessage(R.string.this_media_has_been_stored_in_an_encrypted_database_external_viewer_warning);
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
fireIntent();
|
||||
|
@ -78,10 +78,10 @@ public class ConversationListAdapter extends CursorAdapter {
|
||||
if (body == null) body = "(No subject)";
|
||||
|
||||
if (body.startsWith(Prefix.SYMMETRIC_ENCRYPT) || body.startsWith(Prefix.ASYMMETRIC_ENCRYPT) || body.startsWith(Prefix.ASYMMETRIC_LOCAL_ENCRYPT)) {
|
||||
message.setBody("Encrypted message, enter passphrase... ");
|
||||
message.setBody(context.getString(R.string.encrypted_message_enter_passphrase));
|
||||
message.setEmphasis(true);
|
||||
} else if (body.startsWith(Prefix.KEY_EXCHANGE)) {
|
||||
message.setBody("Key exchange message...");
|
||||
message.setBody(context.getString(R.string.key_exchange_message));
|
||||
message.setEmphasis(true);
|
||||
} else {
|
||||
message.setBody(body);
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
@ -102,7 +103,8 @@ public class ConversationListFragment extends SherlockListFragment
|
||||
initializeListAdapter();
|
||||
}
|
||||
|
||||
private void initializeSearch(android.widget.SearchView searchView) {
|
||||
@SuppressLint({ "NewApi", "NewApi" })
|
||||
private void initializeSearch(android.widget.SearchView searchView) {
|
||||
searchView.setOnQueryTextListener(new android.widget.SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
@ -146,11 +148,11 @@ public class ConversationListFragment extends SherlockListFragment
|
||||
private void handleDeleteAllSelected() {
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());
|
||||
alert.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
alert.setTitle("Delete threads?");
|
||||
alert.setMessage("Are you sure you wish to delete ALL selected conversation threads?");
|
||||
alert.setTitle(R.string.delete_threads_question);
|
||||
alert.setMessage(R.string.are_you_sure_you_wish_to_delete_all_selected_conversation_threads);
|
||||
alert.setCancelable(true);
|
||||
|
||||
alert.setPositiveButton("Delete", new DialogInterface.OnClickListener() {
|
||||
alert.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Set<Long> selectedConversations = ((ConversationListAdapter)getListAdapter())
|
||||
.getBatchSelections();
|
||||
@ -162,7 +164,7 @@ public class ConversationListFragment extends SherlockListFragment
|
||||
}
|
||||
});
|
||||
|
||||
alert.setNegativeButton("Cancel", null);
|
||||
alert.setNegativeButton(R.string.cancel, null);
|
||||
alert.show();
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ public class ConversationListItem extends RelativeLayout {
|
||||
this.fromView.setText(formatFrom(recipients, message.getCount(), message.getRead()));
|
||||
|
||||
if (message.isKeyExchange())
|
||||
this.subjectView.setText("Key exchange message...", TextView.BufferType.SPANNABLE);
|
||||
this.subjectView.setText(R.string.key_exchange_message, TextView.BufferType.SPANNABLE);
|
||||
else
|
||||
this.subjectView.setText(message.getBody(), TextView.BufferType.SPANNABLE);
|
||||
|
||||
|
@ -16,15 +16,15 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.MasterCipher;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.crypto.MessageDisplayHelper;
|
||||
import org.thoughtcrime.securesms.database.MessageRecord;
|
||||
import org.thoughtcrime.securesms.database.ThreadDatabase;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
|
||||
/**
|
||||
* A ConversationListAdapter that decrypts encrypted message bodies.
|
||||
*
|
||||
@ -34,16 +34,18 @@ import android.database.Cursor;
|
||||
public class DecryptingConversationListAdapter extends ConversationListAdapter {
|
||||
|
||||
private final MasterCipher bodyCipher;
|
||||
private final Context context;
|
||||
|
||||
public DecryptingConversationListAdapter(Context context, Cursor cursor, MasterSecret masterSecret) {
|
||||
super(context, cursor);
|
||||
this.bodyCipher = new MasterCipher(masterSecret);
|
||||
this.context = context.getApplicationContext();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setBody(Cursor cursor, MessageRecord message) {
|
||||
String body = cursor.getString(cursor.getColumnIndexOrThrow(ThreadDatabase.SNIPPET));
|
||||
if (body == null || body.equals("")) body = "(No subject)";
|
||||
MessageDisplayHelper.setDecryptedMessageBody(body, message, bodyCipher);
|
||||
MessageDisplayHelper.setDecryptedMessageBody(context, body, message, bodyCipher);
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public abstract class KeyScanningActivity extends SherlockActivity {
|
||||
Dialogs.displayAlert(this, getNotVerifiedTitle(), getNotVerifiedMessage(), android.R.drawable.ic_dialog_alert);
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(this, "No scanned key found!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.no_scanned_key_found_exclamation, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,9 @@ public class PassphraseChangeActivity extends PassphraseActivity {
|
||||
|
||||
try {
|
||||
if (!passphrase.equals(passphraseRepeat)) {
|
||||
Toast.makeText(getApplicationContext(), "Passphrases Don't Match!", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getApplicationContext(),
|
||||
R.string.passphrases_dont_match_exclamation,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
this.newPassphrase.setText("");
|
||||
this.repeatPassphrase.setText("");
|
||||
} else {
|
||||
@ -86,7 +88,7 @@ public class PassphraseChangeActivity extends PassphraseActivity {
|
||||
setMasterSecret(masterSecret);
|
||||
}
|
||||
} catch (InvalidPassphraseException e) {
|
||||
Toast.makeText(this, "Incorrect old passphrase!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.incorrect_old_passphrase_exclamation, Toast.LENGTH_LONG).show();
|
||||
this.originalPassphrase.setText("");
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,8 @@ public class PassphraseCreateActivity extends PassphraseActivity {
|
||||
String passphraseRepeat = this.passphraseRepeatEdit.getText().toString();
|
||||
|
||||
if (!passphrase.equals(passphraseRepeat)) {
|
||||
Toast.makeText(getApplicationContext(), "Passphrases Don't Match!", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getApplicationContext(), R.string.passphrases_dont_match_exclamation,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
this.passphraseEdit.setText("");
|
||||
this.passphraseRepeatEdit.setText("");
|
||||
} else {
|
||||
@ -96,8 +97,8 @@ public class PassphraseCreateActivity extends PassphraseActivity {
|
||||
|
||||
public void generate() {
|
||||
progressDialog = new ProgressDialog(PassphraseCreateActivity.this);
|
||||
progressDialog.setTitle("Generating KeyPair");
|
||||
progressDialog.setMessage("Generating a local encryption keypair...");
|
||||
progressDialog.setTitle(R.string.generating_keypair);
|
||||
progressDialog.setMessage(getString(R.string.generating_a_local_encryption_keypair));
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.setIndeterminate(true);
|
||||
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
|
@ -67,7 +67,9 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
MemoryCleaner.clean(passphrase);
|
||||
setMasterSecret(masterSecret);
|
||||
} catch (InvalidPassphraseException ipe) {
|
||||
Toast.makeText(getApplicationContext(), "Invalid Passphrase!", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getApplicationContext(),
|
||||
R.string.invalid_passphrase_exclamation,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,14 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKey;
|
||||
import org.thoughtcrime.securesms.crypto.InvalidKeyException;
|
||||
import org.thoughtcrime.securesms.crypto.InvalidVersionException;
|
||||
@ -26,14 +34,6 @@ import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* Activity for displaying sent/received session keys.
|
||||
*
|
||||
@ -91,18 +91,18 @@ public class ReceiveKeyActivity extends Activity {
|
||||
}
|
||||
|
||||
private void initializeCorruptedKeyText() {
|
||||
descriptionText.setText("ERROR:\n\nYou have received a corrupted public key. This key can not be processed, please re-initiate a secure session.");
|
||||
descriptionText.setText(R.string.error_you_have_received_a_corrupted_public_key);
|
||||
confirmButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void initializeBadVersionText() {
|
||||
descriptionText.setText("ERROR:\n\nYou have received a public key from an unsupported version of the protocol. This key can not be processed, please re-initiate a secure session.");
|
||||
descriptionText.setText(R.string.error_you_have_received_a_public_key_from_an_unsupported_version_of_the_protocol);
|
||||
confirmButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void initializeSignatureText() {
|
||||
if (!keyExchangeMessage.hasIdentityKey()) {
|
||||
signatureText.setText("This key exchange message does not include an identity signature.");
|
||||
signatureText.setText(R.string.this_key_exchange_message_does_not_include_an_identity_signature);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -110,29 +110,25 @@ public class ReceiveKeyActivity extends Activity {
|
||||
String identityName = DatabaseFactory.getIdentityDatabase(this).getNameForIdentity(masterSecret, identityKey);
|
||||
|
||||
if (identityName == null) {
|
||||
signatureText.setText("This key exchange message includes an identity signature, but you do not yet trust it.");
|
||||
signatureText.setText(R.string.this_key_exchange_message_includes_an_identity_signature_but_you_do_not_yet_trust_it);
|
||||
} else {
|
||||
signatureText.setText("This key exchange message includes an identity signature which you trust for: " + identityName);
|
||||
signatureText.setText(String.format(getString(R.string.this_key_exchange_message_includes_an_identity_signature_which_you_trust_for_s), identityName));
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeTextForExistingSession() {
|
||||
if (keyExchangeProcessor.isRemoteKeyExchangeForExistingSession(keyExchangeMessage)) {
|
||||
descriptionText.setText("This is the key that you sent to start your current encrypted session with " + recipient.toShortString());
|
||||
descriptionText.setText(String.format(getString(R.string.this_is_the_key_that_you_sent_to_start_your_current_encrypted_session_with_s), recipient.toShortString()));
|
||||
this.confirmButton.setVisibility(View.GONE);
|
||||
this.verifySessionButton.setVisibility(View.VISIBLE);
|
||||
this.verifyIdentityButton.setVisibility(View.VISIBLE);
|
||||
} else if (keyExchangeProcessor.isLocalKeyExchangeForExistingSession(keyExchangeMessage)) {
|
||||
descriptionText.setText("This is the key that you received to start your current encrypted session with " + recipient.toShortString());
|
||||
descriptionText.setText(String.format(getString(R.string.this_is_the_key_that_you_received_to_start_your_current_encrypted_session_with_s), recipient.toShortString()));
|
||||
this.confirmButton.setVisibility(View.GONE);
|
||||
this.verifySessionButton.setVisibility(View.VISIBLE);
|
||||
this.verifyIdentityButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
descriptionText.setText("You have received a Key Exchange message from " + recipient.toShortString() + "." +
|
||||
"\n\nWARNING: You already have an encrypted session with this contact." +
|
||||
" If you choose to accept this key exchange message, it will destroy your " +
|
||||
"existing session and you will have to re-authenticate. Would you like to complete " +
|
||||
"this key exchange?");
|
||||
descriptionText.setText(String.format(getString(R.string.you_have_received_a_key_exchange_message_from_s_warning_you_already_have_an_encrypted_session), recipient.toShortString()));
|
||||
this.confirmButton.setVisibility(View.VISIBLE);
|
||||
this.verifyIdentityButton.setVisibility(View.GONE);
|
||||
this.verifySessionButton.setVisibility(View.GONE);
|
||||
@ -141,17 +137,11 @@ public class ReceiveKeyActivity extends Activity {
|
||||
|
||||
private void initializeTextForNewSession() {
|
||||
if (keyExchangeProcessor.hasInitiatedSession() && !this.sent)
|
||||
descriptionText.setText("You have received a Key Exchange message from " + recipient.toShortString() +
|
||||
". You have previously initiated a session with this contact, " +
|
||||
"and by accepting this key you will complete the key exchange. " +
|
||||
"Would you like to complete this key exchange?");
|
||||
descriptionText.setText(String.format(getString(R.string.you_have_received_a_key_exchange_message_from_s_you_have_previously_initiated), recipient.toShortString()));
|
||||
else if (keyExchangeProcessor.hasInitiatedSession() && this.sent)
|
||||
descriptionText.setText("You have initiated a Key Exchange message with " + recipient.toShortString() +
|
||||
" but have not yet received a reply.");
|
||||
descriptionText.setText(String.format(getString(R.string.you_have_initiated_a_key_exchange_message_with_s_but_have_not_yet_received_a_reply), recipient.toShortString()));
|
||||
else if (!keyExchangeProcessor.hasInitiatedSession() && !this.sent)
|
||||
descriptionText.setText("You have received a Key Exchange message from " + recipient.toShortString() +
|
||||
". You have no existing session with this contact, would you like " +
|
||||
"to complete this key exchange?");
|
||||
descriptionText.setText(String.format(getString(R.string.you_have_received_a_key_exchange_message_from_s_you_have_no_existing_session), recipient.toShortString()));
|
||||
}
|
||||
|
||||
private void initializeKey() throws InvalidKeyException, InvalidVersionException {
|
||||
@ -164,8 +154,8 @@ public class ReceiveKeyActivity extends Activity {
|
||||
this.signatureText = (TextView) findViewById(R.id.signature_text);
|
||||
this.confirmButton = (Button) findViewById(R.id.ok_button);
|
||||
this.cancelButton = (Button) findViewById(R.id.cancel_button);
|
||||
this.verifyIdentityButton = (Button)findViewById(R.id.verify_identity_button);
|
||||
this.verifySessionButton = (Button)findViewById(R.id.verify_session_button);
|
||||
this.verifyIdentityButton = (Button) findViewById(R.id.verify_identity_button);
|
||||
this.verifySessionButton = (Button) findViewById(R.id.verify_session_button);
|
||||
this.recipient = getIntent().getParcelableExtra("recipient");
|
||||
this.threadId = getIntent().getLongExtra("thread_id", -1);
|
||||
this.masterSecret = (MasterSecret)getIntent().getParcelableExtra("master_secret");
|
||||
|
@ -127,10 +127,10 @@ public class ReviewIdentitiesActivity extends SherlockListActivity {
|
||||
startActivity(viewIntent);
|
||||
} catch (InvalidKeyException ike) {
|
||||
Log.w("ReviewIdentitiesActivity", ike);
|
||||
Toast.makeText(this, "Unable to view corrupted identity key!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.unable_to_view_corrupted_identity_key_exclamation, Toast.LENGTH_LONG).show();
|
||||
} catch (IOException e) {
|
||||
Log.w("ReviewIdentitiesActivity", e);
|
||||
Toast.makeText(this, "Unable to view corrupted identity key!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.unable_to_view_corrupted_identity_key_exclamation, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,9 @@ public class SaveIdentityActivity extends SherlockActivity {
|
||||
private class OkListener implements View.OnClickListener {
|
||||
public void onClick(View v) {
|
||||
if (identityName.getText() == null || identityName.getText().toString().trim().length() == 0) {
|
||||
Toast.makeText(SaveIdentityActivity.this, "You must specify a name for this identity!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(SaveIdentityActivity.this,
|
||||
R.string.you_must_specify_a_name_for_this_identity_exclamation,
|
||||
Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -93,16 +95,16 @@ public class SaveIdentityActivity extends SherlockActivity {
|
||||
DatabaseFactory.getIdentityDatabase(SaveIdentityActivity.this).saveIdentity(masterSecret, identityKey, identityName.getText().toString());
|
||||
} catch (InvalidKeyException e) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(SaveIdentityActivity.this);
|
||||
builder.setTitle("Identity Name Exists!");
|
||||
builder.setMessage("An identity key with the specified name already exists.");
|
||||
builder.setPositiveButton("Manage Identities", new DialogInterface.OnClickListener() {
|
||||
builder.setTitle(R.string.identity_name_exists_exclamation);
|
||||
builder.setMessage(R.string.an_identity_key_with_the_specified_name_already_exists);
|
||||
builder.setPositiveButton(R.string.manage_identities, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Intent intent = new Intent(SaveIdentityActivity.this, ReviewIdentitiesActivity.class);
|
||||
intent.putExtra("master_secret", masterSecret);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("Cancel", null);
|
||||
builder.setNegativeButton(R.string.cancel, null);
|
||||
builder.show();
|
||||
return;
|
||||
}
|
||||
|
@ -62,11 +62,10 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
protected void handleVerified() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setTitle("Mark Identity Verified?");
|
||||
builder.setMessage("Are you sure you have validated the recipients' identity fingerprint " +
|
||||
"and would like to mark it as verified?");
|
||||
builder.setTitle(R.string.mark_identity_verified_question);
|
||||
builder.setMessage(R.string.are_you_sure_you_have_validated_the_recipients_identity_fingerprint_and_would_like_to_mark_it_as_verified);
|
||||
|
||||
builder.setPositiveButton("Mark Verified", new DialogInterface.OnClickListener() {
|
||||
builder.setPositiveButton(R.string.mark_verified, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
SessionRecord sessionRecord = new SessionRecord(VerifyIdentityActivity.this,
|
||||
@ -92,7 +91,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
|
||||
private void initializeLocalIdentityKey() {
|
||||
if (!IdentityKeyUtil.hasIdentityKey(this)) {
|
||||
localIdentityFingerprint.setText("You do not have an identity key.");
|
||||
localIdentityFingerprint.setText(R.string.you_do_not_have_an_identity_key);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -104,7 +103,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
IdentityKey identityKey = sessionRecord.getIdentityKey();
|
||||
|
||||
if (identityKey == null) {
|
||||
remoteIdentityFingerprint.setText("Recipient has no identity key.");
|
||||
remoteIdentityFingerprint.setText(R.string.recipient_has_no_identity_key);
|
||||
} else {
|
||||
remoteIdentityFingerprint.setText(identityKey.getFingerprint());
|
||||
}
|
||||
@ -125,7 +124,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
@Override
|
||||
protected void initiateDisplay() {
|
||||
if (!IdentityKeyUtil.hasIdentityKey(this)) {
|
||||
Toast.makeText(this, "You don't have an identity key!", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.you_don_t_have_an_identity_key_exclamation, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -138,7 +137,7 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
IdentityKey identityKey = sessionRecord.getIdentityKey();
|
||||
|
||||
if (identityKey == null) {
|
||||
Toast.makeText(this, "Recipient has no identity key!", Toast.LENGTH_LONG);
|
||||
Toast.makeText(this, R.string.recipient_has_no_identity_key_exclamation, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
super.initiateScan();
|
||||
}
|
||||
@ -146,12 +145,12 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
|
||||
@Override
|
||||
protected String getScanString() {
|
||||
return "Scan their key to compare";
|
||||
return getString(R.string.scan_their_key_to_compare);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDisplayString() {
|
||||
return "Get my key scanned";
|
||||
return getString(R.string.get_my_key_scanned);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -167,21 +166,21 @@ public class VerifyIdentityActivity extends KeyVerifyingActivity {
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedMessage() {
|
||||
return "WARNING, the scanned key DOES NOT match! Please check the fingerprint text carefully.";
|
||||
return getString(R.string.warning_the_scanned_key_does_not_match_please_check_the_fingerprint_text_carefully);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedTitle() {
|
||||
return "NOT Verified!";
|
||||
return getString(R.string.not_verified_exclamation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedMessage() {
|
||||
return "Their key is correct. It is also necessary to verify your key with them as well.";
|
||||
return getString(R.string.their_key_is_correct_it_is_also_necessary_to_verify_your_key_with_them_as_well);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedTitle() {
|
||||
return "Verified!";
|
||||
return getString(R.string.verified_exclamation);
|
||||
}
|
||||
}
|
||||
|
@ -16,13 +16,6 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKey;
|
||||
import org.thoughtcrime.securesms.crypto.InvalidKeyException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.util.Dialogs;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
@ -33,6 +26,13 @@ import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKey;
|
||||
import org.thoughtcrime.securesms.crypto.InvalidKeyException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.util.Dialogs;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
/**
|
||||
* Activity for verifying identities keys as they are imported.
|
||||
*
|
||||
@ -106,14 +106,16 @@ public class VerifyImportedIdentityActivity extends KeyScanningActivity {
|
||||
private class VerifiedButtonListener implements View.OnClickListener {
|
||||
public void onClick(View v) {
|
||||
if (identityName.getText() == null || identityName.getText().length() == 0) {
|
||||
Toast.makeText(VerifyImportedIdentityActivity.this, "You must specify a name for this contact!", Toast.LENGTH_LONG);
|
||||
Toast.makeText(VerifyImportedIdentityActivity.this,
|
||||
R.string.you_must_specify_a_name_for_this_contact_exclamation,
|
||||
Toast.LENGTH_LONG);
|
||||
return;
|
||||
}
|
||||
|
||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(VerifyImportedIdentityActivity.this);
|
||||
dialogBuilder.setTitle("Save Identity Key?");
|
||||
dialogBuilder.setTitle(R.string.save_identity_key_question);
|
||||
dialogBuilder.setIcon(android.R.drawable.ic_dialog_info);
|
||||
dialogBuilder.setMessage("Are you sure that you would like to mark this as a valid identity key for all future correspondence with " + identityName.getText() + "? You should only do this if you have actually verified the fingerprint.");
|
||||
dialogBuilder.setMessage(String.format(getString(R.string.are_you_sure_that_you_would_like_to_mark_this_as_a_valid_identity_key_for_all_future_correspondence_with_s), identityName.getText()));
|
||||
dialogBuilder.setCancelable(true);
|
||||
dialogBuilder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface arg0, int arg1) {
|
||||
@ -121,8 +123,9 @@ public class VerifyImportedIdentityActivity extends KeyScanningActivity {
|
||||
DatabaseFactory.getIdentityDatabase(VerifyImportedIdentityActivity.this).saveIdentity(masterSecret, identityKey, identityName.getText().toString());
|
||||
} catch (InvalidKeyException ike) {
|
||||
Log.w("VerifiedButtonListener", ike);
|
||||
Dialogs.displayAlert(VerifyImportedIdentityActivity.this, "Error saving identity key!",
|
||||
"This identity key or an identity key with the same name already exists. Please edit your key database.",
|
||||
Dialogs.displayAlert(VerifyImportedIdentityActivity.this,
|
||||
getString(R.string.error_saving_identity_key_exclamation),
|
||||
getString(R.string.this_identity_key_or_an_identity_key_with_the_same_name_already_exists_please_edit_your_key_database),
|
||||
android.R.drawable.ic_dialog_alert);
|
||||
return;
|
||||
}
|
||||
@ -137,12 +140,12 @@ public class VerifyImportedIdentityActivity extends KeyScanningActivity {
|
||||
|
||||
@Override
|
||||
protected String getScanString() {
|
||||
return "Scan to compare";
|
||||
return getString(R.string.scan_to_compare);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDisplayString() {
|
||||
return "Get scanned to compare";
|
||||
return getString(R.string.get_scanned_to_compare);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -157,21 +160,21 @@ public class VerifyImportedIdentityActivity extends KeyScanningActivity {
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedMessage() {
|
||||
return "WARNING, the scanned key DOES NOT match!";
|
||||
return getString(R.string.warning_the_scanned_key_does_not_match_exclamation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedTitle() {
|
||||
return "NOT Verified!";
|
||||
return getString(R.string.not_verified_exclamation2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedMessage() {
|
||||
return "The scanned key matches!";
|
||||
return getString(R.string.the_scanned_key_matches_exclamation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedTitle() {
|
||||
return "Verified!";
|
||||
return getString(R.string.verified_exclamation2);
|
||||
}
|
||||
}
|
||||
|
@ -64,10 +64,9 @@ public class VerifyKeysActivity extends KeyVerifyingActivity {
|
||||
protected void handleVerified() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setTitle("Mark Session Verified?");
|
||||
builder.setMessage("Are you sure that you have validated these fingerprints and " +
|
||||
"would like to mark this session as verified?");
|
||||
builder.setPositiveButton("Mark Verified", new DialogInterface.OnClickListener() {
|
||||
builder.setTitle(R.string.mark_session_verified_question);
|
||||
builder.setMessage(R.string.are_you_sure_that_you_have_validated_these_fingerprints_and_would_like_to_mark_this_session_as_verified);
|
||||
builder.setPositiveButton(R.string.mark_verified2, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
SessionRecord sessionRecord = new SessionRecord(VerifyKeysActivity.this, masterSecret,
|
||||
@ -78,7 +77,7 @@ public class VerifyKeysActivity extends KeyVerifyingActivity {
|
||||
}
|
||||
});
|
||||
|
||||
builder.setNegativeButton("Cancel", null);
|
||||
builder.setNegativeButton(R.string.cancel, null);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
@ -100,12 +99,12 @@ public class VerifyKeysActivity extends KeyVerifyingActivity {
|
||||
|
||||
@Override
|
||||
protected String getDisplayString() {
|
||||
return "Get my fingerprint scanned";
|
||||
return getString(R.string.get_my_fingerprint_scanned);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getScanString() {
|
||||
return "Scan their fingerprint";
|
||||
return getString(R.string.scan_their_fingerprint);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -120,22 +119,22 @@ public class VerifyKeysActivity extends KeyVerifyingActivity {
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedMessage() {
|
||||
return "WARNING, the scanned key DOES NOT match! Please check the fingerprint text carefully.";
|
||||
return getString(R.string.warning_the_scanned_key_does_not_match_please_check_the_fingerprint_text_carefully2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedTitle() {
|
||||
return "NOT Verified!";
|
||||
return getString(R.string.not_verified_exclamation3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedMessage() {
|
||||
return "Their key is correct. It is also necessary to get your fingerprint scanned as well.";
|
||||
return getString(R.string.their_key_is_correct_it_is_also_necessary_to_get_your_fingerprint_scanned_as_well);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedTitle() {
|
||||
return "Verified!";
|
||||
return getString(R.string.verified_exclamation3);
|
||||
}
|
||||
|
||||
private class FingerprintKey implements SerializableKey {
|
||||
|
@ -47,7 +47,7 @@ public class ViewIdentityActivity extends KeyScanningActivity {
|
||||
|
||||
private void initializeFingerprint() {
|
||||
if (identityKey == null) {
|
||||
identityFingerprint.setText("You do not have an identity key.");
|
||||
identityFingerprint.setText(R.string.you_do_not_have_an_identity_key2);
|
||||
} else {
|
||||
identityFingerprint.setText(identityKey.getFingerprint());
|
||||
}
|
||||
@ -79,12 +79,12 @@ public class ViewIdentityActivity extends KeyScanningActivity {
|
||||
|
||||
@Override
|
||||
protected String getScanString() {
|
||||
return "Scan to compare";
|
||||
return getString(R.string.scan_to_compare2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDisplayString() {
|
||||
return "Get scanned to compare";
|
||||
return getString(R.string.get_scanned_to_compare2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -99,21 +99,21 @@ public class ViewIdentityActivity extends KeyScanningActivity {
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedMessage() {
|
||||
return "WARNING, the scanned key DOES NOT match!";
|
||||
return getString(R.string.warning_the_scanned_key_does_not_match_exclamation2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNotVerifiedTitle() {
|
||||
return "NOT Verified!";
|
||||
return getString(R.string.not_verified_exclamation4);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedMessage() {
|
||||
return "The scanned key matches!";
|
||||
return getString(R.string.the_scanned_key_matches_exclamation2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getVerifiedTitle() {
|
||||
return "Verified!";
|
||||
return getString(R.string.verified_exclamation4);
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package org.thoughtcrime.securesms.crypto;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.database.LocalKeyRecord;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
@ -33,16 +34,16 @@ public class KeyExchangeInitiator {
|
||||
public static void initiate(final Context context, final MasterSecret masterSecret, final Recipient recipient, boolean promptOnExisting) {
|
||||
if (promptOnExisting && hasInitiatedSession(context, masterSecret, recipient)) {
|
||||
AlertDialog.Builder dialog = new AlertDialog.Builder(context);
|
||||
dialog.setTitle("Initiate Despite Existing Request?");
|
||||
dialog.setMessage("You've already sent a session initiation request to this recipient, are you sure you'd like to send another? This will invalidate the first request.");
|
||||
dialog.setTitle(R.string.initiate_despite_existing_request_question);
|
||||
dialog.setMessage(R.string.youve_already_sent_a_session_initiation_request_to_this_recipient_are_you_sure);
|
||||
dialog.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
dialog.setCancelable(true);
|
||||
dialog.setPositiveButton("Send", new DialogInterface.OnClickListener() {
|
||||
dialog.setPositiveButton(R.string.send, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
initiateKeyExchange(context, masterSecret, recipient);
|
||||
}
|
||||
});
|
||||
dialog.setNegativeButton("Cancel", null);
|
||||
dialog.setNegativeButton(R.string.cancel, null);
|
||||
dialog.show();
|
||||
} else {
|
||||
initiateKeyExchange(context, masterSecret, recipient);
|
||||
|
@ -16,14 +16,17 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.crypto;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.LinkedHashMap;
|
||||
import android.content.Context;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.database.MessageRecord;
|
||||
import org.thoughtcrime.securesms.database.SmsDatabase;
|
||||
import org.thoughtcrime.securesms.protocol.Prefix;
|
||||
import org.thoughtcrime.securesms.util.InvalidMessageException;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
public class MessageDisplayHelper {
|
||||
|
||||
private static final int MAX_CACHE_SIZE = 2000;
|
||||
@ -73,8 +76,9 @@ public class MessageDisplayHelper {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void setDecryptedMessageBody(String body, MessageRecord message, MasterCipher bodyCipher) {
|
||||
|
||||
public static void setDecryptedMessageBody(Context context, String body,
|
||||
MessageRecord message, MasterCipher bodyCipher)
|
||||
{
|
||||
try {
|
||||
if (body.startsWith(Prefix.SYMMETRIC_ENCRYPT)) {
|
||||
String cacheResult = checkCacheForBody(body);
|
||||
@ -88,13 +92,13 @@ public class MessageDisplayHelper {
|
||||
}
|
||||
|
||||
if (isUnreadableAsymmetricMessage(message.getType())) {
|
||||
message.setBody("Bad encrypted message...");
|
||||
message.setBody(context.getString(R.string.bad_encrypted_message));
|
||||
message.setEmphasis(true);
|
||||
} else if (isInProcessAsymmetricMessage(body, message.getType())) {
|
||||
message.setBody("Decrypting, please wait...");
|
||||
message.setBody(context.getString(R.string.decrypting_please_wait));
|
||||
message.setEmphasis(true);
|
||||
} else if (isRogueAsymmetricMessage(message.getType())) {
|
||||
message.setBody("Message encrypted for non-existent session...");
|
||||
message.setBody(context.getString(R.string.message_encrypted_for_non_existing_session));
|
||||
message.setEmphasis(true);
|
||||
} else if (isKeyExchange(body)) {
|
||||
message.setKeyExchange(true);
|
||||
@ -113,7 +117,7 @@ public class MessageDisplayHelper {
|
||||
message.setEmphasis(false);
|
||||
}
|
||||
} catch (InvalidMessageException ime) {
|
||||
message.setBody("Decryption error: local message corrupted, MAC doesn't match. Potential tampering?");
|
||||
message.setBody(context.getString(R.string.decryption_error_local_message_corrupted_mac_doesn_t_match_potential_tampering_question));
|
||||
message.setEmphasis(true);
|
||||
}
|
||||
}
|
||||
|
@ -16,19 +16,19 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.database;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteDatabase.CursorFactory;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.database.sqlite.SQLiteDatabase.CursorFactory;
|
||||
|
||||
public class CanonicalAddressDatabase {
|
||||
|
||||
private static final int DATABASE_VERSION = 1;
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.database;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CanonicalSessionMigrator {
|
||||
|
||||
private static void migrateSession(File sessionFile, File sessionsDirectory, long canonicalAddress) {
|
||||
|
@ -16,11 +16,8 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.database;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileChannel;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.InvalidKeyException;
|
||||
import org.thoughtcrime.securesms.crypto.KeyPair;
|
||||
@ -28,10 +25,12 @@ import org.thoughtcrime.securesms.crypto.KeyUtil;
|
||||
import org.thoughtcrime.securesms.crypto.MasterCipher;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.Hex;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileChannel;
|
||||
|
||||
public class LocalKeyRecord extends Record {
|
||||
|
||||
|
@ -16,10 +16,15 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.database;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientFactory;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientFormattingException;
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
@ -34,13 +39,10 @@ import ws.com.google.android.mms.pdu.PduBody;
|
||||
import ws.com.google.android.mms.pdu.PduHeaders;
|
||||
import ws.com.google.android.mms.pdu.RetrieveConf;
|
||||
import ws.com.google.android.mms.pdu.SendReq;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class MmsDatabase extends Database {
|
||||
|
||||
@ -148,7 +150,7 @@ public class MmsDatabase extends Database {
|
||||
if (encodedFrom != null)
|
||||
return new String(encodedFrom.getTextString(), CharacterSets.MIMENAME_ISO_8859_1);
|
||||
else
|
||||
return "Anonymous";
|
||||
return context.getString(R.string.anonymous);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
@ -557,16 +559,16 @@ public class MmsDatabase extends Database {
|
||||
return status == DOWNLOAD_INITIALIZED || status == DOWNLOAD_NO_CONNECTIVITY || status == DOWNLOAD_SOFT_FAILURE;
|
||||
}
|
||||
|
||||
public static String getLabelForStatus(int status) {
|
||||
public static String getLabelForStatus(Context context, int status) {
|
||||
Log.w("MmsDatabase", "Getting label for status: " + status);
|
||||
|
||||
switch (status) {
|
||||
case DOWNLOAD_CONNECTING: return "Connecting to MMS server...";
|
||||
case DOWNLOAD_INITIALIZED: return "Downloading MMS...";
|
||||
case DOWNLOAD_HARD_FAILURE: return "MMS Download failed!";
|
||||
case DOWNLOAD_CONNECTING: return context.getString(R.string.connecting_to_mms_server);
|
||||
case DOWNLOAD_INITIALIZED: return context.getString(R.string.downloading_mms);
|
||||
case DOWNLOAD_HARD_FAILURE: return context.getString(R.string.mms_download_failed);
|
||||
}
|
||||
|
||||
return "Downloading...";
|
||||
return context.getString(R.string.downloading);
|
||||
}
|
||||
|
||||
public static boolean isHardError(int status) {
|
||||
|
@ -16,13 +16,16 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.database;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import android.content.Context;
|
||||
|
||||
import org.thoughtcrime.securesms.ConversationItem;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.mms.Slide;
|
||||
import org.thoughtcrime.securesms.mms.SlideDeck;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class MmsMessageRecord extends MessageRecord {
|
||||
|
||||
private SlideDeck slideDeck;
|
||||
@ -34,13 +37,13 @@ public class MmsMessageRecord extends MessageRecord {
|
||||
private int status;
|
||||
private byte[] transactionId;
|
||||
|
||||
public MmsMessageRecord(MessageRecord record, SlideDeck slideDeck, long mailbox) {
|
||||
public MmsMessageRecord(Context context, MessageRecord record, SlideDeck slideDeck, long mailbox) {
|
||||
super(record);
|
||||
this.slideDeck = slideDeck;
|
||||
this.isNotification = false;
|
||||
this.mailbox = mailbox;
|
||||
|
||||
setBodyIfTextAvailable();
|
||||
setBodyIfTextAvailable(context);
|
||||
}
|
||||
|
||||
public MmsMessageRecord(MessageRecord record, byte[] contentLocation, long messageSize, long expiry, int status, byte[] transactionId) {
|
||||
@ -83,6 +86,7 @@ public class MmsMessageRecord extends MessageRecord {
|
||||
|
||||
// This is the double-dispatch pattern, don't refactor
|
||||
// this into the base class.
|
||||
@Override
|
||||
public void setOnConversationItem(ConversationItem item) {
|
||||
item.setMessageRecord(this);
|
||||
}
|
||||
@ -119,18 +123,19 @@ public class MmsMessageRecord extends MessageRecord {
|
||||
}
|
||||
}
|
||||
|
||||
private void setBodyIfTextAvailable() {
|
||||
private void setBodyIfTextAvailable(Context context) {
|
||||
switch ((int)mailbox) {
|
||||
case MmsDatabase.Types.MESSAGE_BOX_DECRYPTING_INBOX:
|
||||
setBody("Decrypting MMS, please wait...");
|
||||
setBody(context.getString(R.string.decrypting_mms_please_wait));
|
||||
setEmphasis(true);
|
||||
return;
|
||||
case MmsDatabase.Types.MESSAGE_BOX_DECRYPT_FAILED_INBOX:
|
||||
setBody("Bad encrypted MMS message...");
|
||||
setBody(context.getString(R.string.bad_encrypted_mms_message));
|
||||
setEmphasis(true);
|
||||
return;
|
||||
case MmsDatabase.Types.MESSAGE_BOX_NO_SESSION_INBOX:
|
||||
setBody("MMS message encrypted for non-existing session...");
|
||||
setBody(context
|
||||
.getString(R.string.mms_message_encrypted_for_non_existing_session));
|
||||
setEmphasis(true);
|
||||
return;
|
||||
}
|
||||
|
@ -16,19 +16,19 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.database;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileChannel;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKey;
|
||||
import org.thoughtcrime.securesms.crypto.InvalidKeyException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileChannel;
|
||||
|
||||
/**
|
||||
* A disk record representing a current session.
|
||||
|
@ -16,6 +16,9 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.mms;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.MessageRecord;
|
||||
@ -26,8 +29,6 @@ import ws.com.google.android.mms.MmsException;
|
||||
import ws.com.google.android.mms.pdu.MultimediaMessagePdu;
|
||||
import ws.com.google.android.mms.pdu.NotificationInd;
|
||||
import ws.com.google.android.mms.pdu.PduHeaders;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
public class MmsFactory {
|
||||
|
||||
@ -52,7 +53,7 @@ public class MmsFactory {
|
||||
MultimediaMessagePdu msg = database.getMediaMessage(record.getId());
|
||||
SlideDeck slideDeck = new SlideDeck(context, masterSecret, msg.getBody());
|
||||
|
||||
return new MmsMessageRecord(record, slideDeck, box);
|
||||
return new MmsMessageRecord(context, record, slideDeck, box);
|
||||
}
|
||||
|
||||
// private static void setBodyIfText(SlideModel slide, MessageRecord record) {
|
||||
|
@ -16,9 +16,6 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
@ -30,9 +27,12 @@ import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
|
||||
/**
|
||||
* List preference for LED blink pattern notification.
|
||||
|
@ -80,7 +80,7 @@ public class ApplicationMigrationService extends Service
|
||||
|
||||
private Notification initializeBackgroundNotification() {
|
||||
Intent intent = new Intent(this, ConversationListActivity.class);
|
||||
Notification notification = new Notification(R.drawable.icon, "Migrating",
|
||||
Notification notification = new Notification(R.drawable.icon, getString(R.string.migrating),
|
||||
System.currentTimeMillis());
|
||||
|
||||
notification.flags = notification.flags | Notification.FLAG_ONGOING_EVENT;
|
||||
@ -89,7 +89,7 @@ public class ApplicationMigrationService extends Service
|
||||
|
||||
notification.contentIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);
|
||||
notification.contentView.setImageViewResource(R.id.status_icon, R.drawable.icon);
|
||||
notification.contentView.setTextViewText(R.id.status_text, "Migrating System Text Messages");
|
||||
notification.contentView.setTextViewText(R.id.status_text, getString(R.string.migrating_system_text_messages));
|
||||
notification.contentView.setProgressBar(R.id.status_progress, 10000, 0, false);
|
||||
|
||||
stopForeground(true);
|
||||
|
@ -142,10 +142,13 @@ public class KeyCachingService extends Service {
|
||||
}
|
||||
|
||||
private void foregroundService() {
|
||||
Notification notification = new Notification(R.drawable.icon_cached, "TextSecure Passphrase Cached", System.currentTimeMillis());
|
||||
Notification notification = new Notification(R.drawable.icon_cached,
|
||||
getString(R.string.textsecure_passphrase_cached),
|
||||
System.currentTimeMillis());
|
||||
Intent intent = new Intent(this, ConversationListActivity.class);
|
||||
PendingIntent launchIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);
|
||||
notification.setLatestEventInfo(getApplicationContext(), "TextSecure Cached", "TextSecure Passphrase Cached", launchIntent);
|
||||
notification.setLatestEventInfo(getApplicationContext(), getString(R.string.textsecure_cached),
|
||||
getString(R.string.textsecure_passphrase_cached), launchIntent);
|
||||
|
||||
stopForeground(true);
|
||||
startForeground(SERVICE_RUNNING_ID, notification);
|
||||
|
@ -54,31 +54,27 @@ public class MessageNotifier {
|
||||
|
||||
public static final int NOTIFICATION_ID = 1338;
|
||||
|
||||
private static String buildTickerMessage(int count, Recipients recipients) {
|
||||
private static String buildTickerMessage(Context context, int count, Recipients recipients) {
|
||||
Recipient recipient = recipients.getPrimaryRecipient();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append('(');
|
||||
builder.append(count);
|
||||
builder.append(')');
|
||||
builder.append(" New messages");
|
||||
|
||||
if (recipient != null) {
|
||||
builder.append(", most recent from: ");
|
||||
builder.append(recipient.getName() == null ? recipient.getNumber() : recipient.getName());
|
||||
if (recipient == null) {
|
||||
return String.format(context.getString(R.string._d_new_messages), count);
|
||||
} else {
|
||||
return String.format(context.getString(R.string._d_new_messages_most_recent_from_s), count,
|
||||
recipient.getName() == null ? recipient.getNumber() : recipient.getName());
|
||||
}
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
private static String buildTitleMessage(Context context, int count) {
|
||||
return String.format(context.getString(R.string._d_new_messages), count);
|
||||
}
|
||||
|
||||
private static String buildTitleMessage(int count) {
|
||||
return "(" + count + ") New Messages";
|
||||
}
|
||||
|
||||
private static String buildSubtitleMessage(Recipients recipients) {
|
||||
private static String buildSubtitleMessage(Context context, Recipients recipients) {
|
||||
Recipient recipient = recipients.getPrimaryRecipient();
|
||||
|
||||
if (recipient != null) {
|
||||
return "Most recent from: " + (recipient.getName() == null ? recipient.getNumber() : recipient.getName());
|
||||
return String.format(context.getString(R.string.most_recent_from_s),
|
||||
(recipient.getName() == null ? recipient.getNumber() : recipient.getName()));
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -180,9 +176,9 @@ public class MessageNotifier {
|
||||
else if (c == null || !c.moveToFirst()) return;
|
||||
|
||||
Recipients recipients = getMostRecentRecipients(context, c);
|
||||
String ticker = buildTickerMessage(c.getCount(), recipients);
|
||||
String title = buildTitleMessage(c.getCount());
|
||||
String subtitle = buildSubtitleMessage(recipients);
|
||||
String ticker = buildTickerMessage(context, c.getCount(), recipients);
|
||||
String title = buildTitleMessage(context, c.getCount());
|
||||
String subtitle = buildSubtitleMessage(context, recipients);
|
||||
PendingIntent launchIntent = buildPendingIntent(context, c, recipients);
|
||||
|
||||
sendNotification(context, manager, launchIntent, ticker, title, subtitle, signal);
|
||||
|
@ -26,7 +26,7 @@ public class Dialogs {
|
||||
alertDialog.setTitle(title);
|
||||
alertDialog.setMessage(message);
|
||||
alertDialog.setIcon(icon);
|
||||
alertDialog.setPositiveButton("Ok", null);
|
||||
alertDialog.setPositiveButton(android.R.string.ok, null);
|
||||
alertDialog.show();
|
||||
}
|
||||
}
|
||||
|