Support for Signal calls.

Merge in RedPhone

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-09-09 13:54:29 -07:00
parent 3d4ae60d81
commit d83a3d71bc
2585 changed files with 803492 additions and 45 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/black"/>
</shape>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<!-- Layers used to render the in-call "Audio mode" compound button.
This is a multi-mode button:
- If no bluetooth headset is connected, it behaves like a simple
"compound button" that switches the speaker on and off. (This is why
the button itself is a ToggleButton instance.)
- But if a bluetooth headset is connected, this becomes a simple
action button (with no concept of a "checked" state) that brings
up a popup menu offering you a 3-way choice between earpiece /
speaker / bluetooth.
See InCallTouchUi.updateAudioButton() for the corresponding code. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The standard "compound button" background, used to distinguish
between the "checked" and "unchecked" states when this button is
simply an on/off toggle for the speaker.
(In states where the audio button *not* a toggle, we explicitly
hide this layer.) -->
<item android:id="@+id/compoundBackgroundItem"
android:drawable="@drawable/redphone_btn_compound_background" />
<!-- The little triangle that indicates that this isn't a plain
button, but will instead pop up a menu. This layer is *not*
shown when the audio button is simply an on/off toggle. -->
<!-- Use an explicit <bitmap> to avoid scaling the icon up to the full
size of the button. -->
<item android:id="@+id/moreIndicatorItem">
<bitmap android:src="@drawable/redphone_ic_more_indicator_holo_dark"
android:gravity="center" />
</item>
<!-- Finally, the button icon.
When the audio button is simply an on/off toggle for the speaker,
the icon is a "speakerphone" regardless of whether the speaker is
active. (Instead, the "on/off" indication comes from the
redphone_btn_compound_background selector.)
But when the audio button is connected to the 3-way popup menu,
we use the button's icon to indicate the current audio mode
(i.e. one of { earpiece (or wired headset) , speaker , bluetooth }).
Here we have separate layers for each possible foreground icon,
and in InCallTouchUi.updateAudioButton() we hide them all
*except* the one needed for the current state. -->
<!-- These all use an explicit <bitmap> to avoid scaling the icon up
to the full size of the button. -->
<!-- Bluetooth is active -->
<item android:id="@+id/bluetoothItem">
<bitmap android:src="@drawable/redphone_ic_sound_bluetooth_holo_dark"
android:gravity="center" />
</item>
<!-- Handset earpiece is active -->
<item android:id="@+id/handsetItem">
<bitmap android:src="@drawable/redphone_ic_sound_handset_holo_dark"
android:gravity="center" />
</item>
<!-- Speakerphone icon showing 'speaker on' state -->
<item android:id="@+id/speakerphoneOnItem">
<bitmap android:src="@drawable/redphone_ic_sound_speakerphone_holo_dark"
android:gravity="center" />
</item>
<!-- Speakerphone icon showing 'speaker off' state -->
<item android:id="@+id/speakerphoneOffItem">
<bitmap android:src="@drawable/redphone_ic_sound_off_speakerphone_holo_dark"
android:gravity="center" />
</item>
<!-- Generic "audio mode" icon. Looks almost identical to
ic_sound_speakerphone_holo_dark.png -->
<!-- TODO: is this actually needed? -->
<!--
<item android:id="@+id/soundItem">
<bitmap android:src="@drawable/ic_sound_holo_dark"
android:gravity="center" />
</item>
-->
</layer-list>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<!-- Background resource for "compound buttons" in the in-call UI.
These buttons have two states (checked and unchecked), and
show a blue bar along the bottom edge when checked. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/redphone_list_pressed_holo_dark" />
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/redphone_list_selector_focused_and_checked" />
<item android:state_focused="true"
android:drawable="@drawable/list_focused_holo" />
<item android:state_checked="true"
android:drawable="@drawable/redphone_ic_active_state_dialer_holo_dark" />
<item
android:drawable="@android:color/transparent" />
</selector>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<!-- Layers used to render the in-call "Mute" compound button. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The standard "compound button" background. -->
<item android:drawable="@drawable/redphone_btn_compound_background" />
<!-- ...and the actual icon on top. Use an explicit <bitmap> to avoid scaling
the icon up to the full size of the button. -->
<item>
<bitmap android:src="@drawable/redphone_ic_mute_holo_dark"
android:gravity="center" />
</item>
</layer-list>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/redphone_dial_background_texture"
android:tileMode="repeat" />

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/redphone_black_rectangle"/>
<item android:drawable="@drawable/redphone_dialpad_background"/>
</layer-list>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/redphone_endcall_background_texture"
android:tileMode="repeat" />

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<!-- Touch handle for the MultiWaveView widget on the incoming call screen -->
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:constantSize="true">
<item
android:state_enabled="true"
android:state_active="false"
android:state_focused="false"
android:drawable="@drawable/redphone_ic_in_call_touch_handle_normal" />
<!-- "Pressed" state uses the same simple "ring" image as on the lockscreen -->
<item
android:state_enabled="true"
android:state_active="true"
android:state_focused="false"
android:drawable="@drawable/redphone_ic_lockscreen_handle_pressed" />
</selector>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:constantSize="true">
<item
android:state_enabled="true"
android:state_active="false"
android:state_focused="false"
android:drawable="@drawable/redphone_ic_lockscreen_answer_normal" />
<item
android:state_enabled="true"
android:state_active="true"
android:state_focused="false"
android:drawable="@drawable/redphone_ic_lockscreen_answer_active" />
</selector>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:constantSize="true">
<item
android:state_enabled="true"
android:state_active="false"
android:state_focused="false"
android:drawable="@drawable/redphone_ic_lockscreen_decline_normal" />
<item
android:state_enabled="true"
android:state_active="true"
android:state_focused="false"
android:drawable="@drawable/redphone_ic_lockscreen_decline_activated" />
</selector>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/redphone_ic_active_state_dialer_holo_dark" />
<item android:drawable="@drawable/list_focused_holo" />
</layer-list>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->
<transition xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/redphone_list_pressed" />
<item android:drawable="@drawable/redphone_list_longpressed" />
</transition>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:state_focused="true"
android:state_enabled="false"
android:state_pressed="true"
android:drawable="@drawable/redphone_selector_disabled" />
<item android:state_focused="true"
android:state_enabled="false"
android:drawable="@drawable/redphone_selector_disabled" />
<item android:state_focused="true"
android:state_pressed="true"
android:drawable="@drawable/redphone_selector_background_transition" />
<item android:state_focused="false"
android:state_pressed="true"
android:drawable="@drawable/redphone_selector_background_transition" />
<item android:state_focused="true"
android:drawable="@drawable/redphone_list_focused" />
<item android:drawable="@color/transparent" />
</selector>

155
res/layout/redphone.xml Normal file
View File

@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 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.
-->
<!-- In-call state of the Phone UI. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<org.thoughtcrime.redphone.ui.CallScreen android:id="@+id/callScreen"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<!-- Main frame containing all in-call UI elements.
This is a FrameLayout with 2 children:
(1) inCallPanel: the main set of in-call UI elements
(2) manageConferencePanel: the "Manage conference" UI
Exactly one of these is visible at any given moment. -->
<!-- <FrameLayout android:id="@+id/mainFrame" -->
<!-- android:layout_width="fill_parent" -->
<!-- android:layout_height="fill_parent" -->
<!-- android:layout_weight="1" -->
<!-- android:paddingTop="10dip" -->
<!-- android:paddingLeft="6dip" -->
<!-- android:paddingRight="6dip" -->
<!-- > -->
<!-- (1) inCallPanel: the main set of in-call UI elements -->
<!-- <RelativeLayout android:id="@+id/inCallPanel" -->
<!-- android:layout_width="fill_parent" -->
<!-- android:layout_height="fill_parent" -->
<!-- > -->
<!-- <org.thoughtcrime.redphone.ui.CallCard xmlns:android="http://schemas.android.com/apk/res/android" -->
<!-- android:id="@+id/callCard" -->
<!-- android:layout_width="fill_parent" -->
<!-- android:layout_height="fill_parent" /> -->
<!--
<Button android:id="@+id/answerButton"
android:visibility="gone"
android:layout_width="120px"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_margin="30px"
android:padding="20px"
android:textSize="22px"
android:text="Answer" />
<Button android:id="@+id/denyButton"
android:visibility="gone"
android:layout_width="120px"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="30px"
android:padding="20px"
android:textSize="22px"
android:text="Deny" />
<SeekBar android:id="@+id/seek"
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="40px"
android:max="100"
android:progress="0"
android:paddingLeft="10px"
android:paddingRight="10px"
android:layout_alignParentBottom="true"
android:layout_margin="30px"
android:thumb="@drawable/slider" />
<TextView android:id="@+id/seekText"
android:visibility="gone"
android:text="Slide to unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_margin="40px"
/>
-->
<!-- The hint about the Menu button, anchored to the bottom of
the screen. This is used only in landscape mode (see
updateMenuButtonHint()); in portrait mode we use the
menuButtonHint built-in to the CallCard. -->
<!-- <TextView android:id="@+id/menuButtonHint" -->
<!-- android:text="Press Menu for call options \u2022 Use keyboard to dial" -->
<!-- android:textAppearance="?android:attr/textAppearanceMedium" -->
<!-- android:textColor="?android:attr/textColorSecondary" -->
<!-- android:layout_width="fill_parent" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:gravity="center" -->
<!-- android:visibility="gone" -->
<!-- android:layout_alignParentBottom="true" -->
<!-- /> -->
<!-- </RelativeLayout> -->
<!-- </FrameLayout> -->
<!-- The sliding drawer control containing the DTMF dialpad.
Note this isn't a child of mainFrame, which ensures that it'll be
able to use the full width of the screen. (And a SlidingDrawer
widget needs to be be a direct child of a FrameLayout anyway.)
In portrait mode, this is visible; in landscape mode, this is
just an empty layout.-->
<!--
<include layout="@layout/dtmf_twelve_key_dialer"/>
-->
<!-- Finally, the "touch lock" overlay, drawn on top of the DTMF
dialpad (after some delay) to prevent false touches from
triggering DTMF tones. (When the overlay is up, you need to
double-tap the "lock" icon to unlock the dialpad.) -->
<!-- <RelativeLayout android:id="@+id/touchLockOverlay" -->
<!-- android:layout_width="fill_parent" -->
<!-- android:layout_height="fill_parent" -->
<!-- android:visibility="gone" -->
<!-- android:background="#8000" -->
<!-- > -->
<!-- Layout note: we could use android:layout_centerInParent="true"
here to center the lock icon exactly in the middle of the screen.
But it actually looks better to have the lock roughly in the
middle of the dialpad key area, so instead we position it a
fixed distance from the bottom of the screen. -->
<!-- <TextView android:id="@+id/touchLockIcon" -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:gravity="center" -->
<!-- android:layout_alignParentBottom="true" -->
<!-- android:layout_centerHorizontal="true" -->
<!-- android:layout_marginBottom="70dip" -->
<!-- android:text="Double-tap\nto unlock" -->
<!-- android:textAppearance="?android:attr/textAppearanceLarge" -->
<!-- android:background="@drawable/dialpad_lock" -->
<!-- /> -->
<!-- </RelativeLayout> -->
</FrameLayout>

View File

@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 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.
-->
<!-- XML resource file for the *children* of a CallCard used in the Phone app.
The CallCard itself is a subclass of FrameLayout, and its (single)
child is the LinearLayout found here. (In the CallCard constructor,
we inflate this file and add it as a child.)
Note that the CallCard is technically the size of the full screen (since
our parent container is full-screen, and the layout_width and layout_height
here are both "match_parent"), but we manually adjust its bottom margin
in CallCard.updateCallInfoLayout() to make sure it doesn't overlap with
the onscreen buttons from incall_touch_ui.xml. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/call_info_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<!-- "Call info" block #1, for the foreground call. -->
<RelativeLayout android:id="@+id/call_info_1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
>
<!-- Contact photo for call_info_1 -->
<ImageView android:id="@+id/photo"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top|center_horizontal"
android:scaleType="centerCrop"
/>
<!-- "Call Banner" for call #1, the foregound or ringing call.
The "call banner" is a block of info about a single call,
including the contact name, phone number, call time counter,
and other status info. This info is shown as a "banner"
overlaid across the top of contact photo. -->
<RelativeLayout android:id="@+id/call_banner_1"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="80dp"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:background="@color/textsecure_primary"
>
<!-- Name (or the phone number, if we don't have a name to display). -->
<TextView android:id="@+id/name"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="50sp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF"
android:singleLine="true"
/>
<!-- Label (like "Mobile" or "Work", if present) and phone number, side by side -->
<LinearLayout android:id="@+id/labelAndNumber"
android:layout_below="@id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="50sp"
android:orientation="horizontal"
>
<TextView android:id="@+id/phoneNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:singleLine="true"
/>
<TextView android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:textAllCaps="true"
android:singleLine="true"
android:layout_marginLeft="6dip"
/>
</LinearLayout>
<!-- Elapsed time indication for a call in progress. -->
<TextView android:id="@+id/elapsedTime"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF"
android:singleLine="true"
/>
<!-- Call type indication: a special label and/or branding
for certain kinds of calls (like "Internet call" for a SIP call.) -->
<TextView android:id="@+id/callTypeLabel"
android:layout_below="@id/labelAndNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:maxLines="1"
android:ellipsize="end"
android:visibility="visible"
android:text="RedPhone Call"
/>
<!-- Social status (currently unused) -->
<TextView android:id="@+id/socialStatus"
android:layout_below="@id/callTypeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:maxLines="2"
android:ellipsize="end"
/>
</RelativeLayout> <!-- End of call_banner for call_info #1. -->
<!-- "Inset" photo used with "id/photo" above:
When the contact photo is a lo-res thumbnail, id/photo
contains a scaled-up but *blurred* version of the photo, and
*this* ImageView is overlaid on top as a smaller, unblurred
inset. (See InCallContactPhoto.java.)
The top of the inset is vertically aligned with the bottom
of the call banner. (Note that means that in states where the
"call state label" is visible, the label (see below) will overlap
the top of the inset photo.) -->
<ImageView android:id="@+id/insetPhoto"
android:layout_below="@id/call_banner_1"
android:layout_width="180dp"
android:layout_height="180dp"
android:scaleType="centerCrop"
android:layout_marginLeft="0dp"
/>
<!-- The "call state label": In some states, this shows a special
indication like "Dialing" or "Incoming call" or "Call ended".
It's unused for the normal case of an active ongoing call. -->
<!-- This is visually part of the call banner, but it's not actually
part of the "call_banner_1" RelativeLayout since it needs a
different background color. -->
<TextView android:id="@+id/callStateLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/call_banner_1"
android:gravity="right"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingRight="24dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
android:textAllCaps="true"
android:background="#8033b5e5"
/>
</RelativeLayout>
</LinearLayout>

View File

@@ -0,0 +1,282 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 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.
-->
<!-- In-call onscreen touch UI elements, used on some platforms.
This layout is a fullscreen overlay, drawn on top of the
non-touch-sensitive parts of the in-call UI (i.e. the call card).
The top-level View here is a FrameLayout with 2 children:
(1) incomingCallWidget: the UI displayed while an incoming call is ringing
(2) inCallControls: the widgets visible while a regular call (or calls) is in progress
Exactly one of these is visible at any given moment.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!--
(1) incomingCallWidget: the UI displayed while an incoming call is ringing.
See InCallTouchUi.showIncomingCallWidget().
Layout notes:
- Use an opaque black background since we need to cover up
a bit of the bottom of the contact photo
- The verticalOffset value gets us a little extra space above
the topmost "Respond by SMS" icon
- The negative layout_marginBottom shifts us slightly downward;
we're already aligned with the bottom of the screen, but we
don't have an icon in the downward direction so the whole
bottom area of this widget is just wasted space.
-->
<org.thoughtcrime.redphone.util.multiwaveview.MultiWaveView
android:id="@+id/incomingCallWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="-46dp"
android:background="@android:color/black"
android:visibility="gone"
/>
<TextView android:id="@+id/redphone_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/incomingCallWidget"
android:gravity="center"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#A0000000"
android:textAllCaps="true"
android:background="#ccf0a621"
android:text="Signal Call"/>
<!--
(2) inCallControls: the widgets visible while a regular call
(or calls) is in progress
-->
<RelativeLayout android:id="@+id/inCallControls"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:visibility="gone"
>
<!-- Main cluster of onscreen buttons on the lower part of the screen. -->
<LinearLayout android:id="@+id/bottomButtons"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/sas"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#FFFFFF"
android:background="#a0000000"
android:gravity="center"
android:padding="20dip"
android:singleLine="true"
android:visibility="gone"/>
<!--<LinearLayout android:id="@+id/confirm_wrapper"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_alignParentRight="true"-->
<!--android:layout_alignTop="@id/sas"-->
<!--android:layout_alignBottom="@id/sas"-->
<!--android:background="@drawable/redphone_dialpad_dark_background">-->
<!--<ImageButton android:id="@+id/confirm_sas"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="fill_parent"-->
<!--android:gravity="center"-->
<!--android:layout_gravity="center"-->
<!--android:paddingRight="10dip"-->
<!--android:paddingLeft="10dip"-->
<!--android:contentDescription="verify sas"-->
<!--android:src="@drawable/ic_check_light"-->
<!--android:background="@drawable/selectable_item_background"/>-->
<!--</LinearLayout>-->
</RelativeLayout>
<!-- Row 2: The "End call" button. -->
<!-- This is in its own LinearLayout purely so that the whole row
can have a background drawable distinct from the image itself. -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/redphone_end_call_background">
<ImageButton android:id="@+id/endButton"
android:layout_width="match_parent"
android:layout_height="76dp"
android:layout_weight="1"
android:src="@drawable/redphone_ic_end_call"
android:background="@drawable/selectable_item_background"
android:contentDescription="end call"/>
</LinearLayout>
<!-- android:background="?android:attr/selectableItemBackground" -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/redphone_dialpad_dark_background"
android:paddingLeft="@dimen/button_cluster_side_padding"
android:paddingRight="@dimen/button_cluster_side_padding"
>
<!-- This row has either 4 or 5 buttons, depending on
whether the device supports "Hold" (i.e. 4 buttons on
CDMA devices, 5 buttons on GSM devices.) The buttons
are interspersed with 'layout_weight="1"' placeholder
views so that they'll be spaced evenly in both cases.
But note there are a couple of *pairs* of buttons that share a
single "slot", namely Hold/Swap and Add/Merge. For these, the
code in InCallTouchUi is responsible for making sure that at any
point exactly one of the pair is VISIBLE and the other is
GONE. -->
<View
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<!-- "Dialpad" -->
<!-- This is a "compound button": it has checked and unchecked states. -->
<!-- <ToggleButton android:id="@+id/dialpadButton" -->
<!-- style="@style/InCallCompoundButton" -->
<!-- android:background="@drawable/btn_compound_dialpad" -->
<!-- android:contentDescription="@string/onscreenShowDialpadText" -->
<!-- /> -->
<!-- <View -->
<!-- android:layout_width="0dp" -->
<!-- android:layout_weight="1" -->
<!-- android:layout_height="match_parent" /> -->
<!-- "Audio mode" -->
<!-- This is a multi-mode button that can behave either like a
simple "compound button" with two states *or* like an
action button that brings up a popup menu; see
redphone_btn_compound_audio.xmlaudio.xml and InCallTouchUi.updateAudioButton()
for the full details. -->
<!--<org.thoughtcrime.redphone.ui.StateListenerView-->
<!--android:id="@+id/menuAttachment"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="0dp"/>-->
<View android:id="@+id/menuAttachment"
android:layout_width="0dp"
android:layout_height="0dp"/>
<ToggleButton android:id="@+id/audioButton"
style="@style/InCallCompoundButton"
android:background="@drawable/redphone_btn_compound_audio"
android:contentDescription="Audio"
/>
<View
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<!-- "Mute" -->
<!-- This is a "compound button": it has checked and unchecked states. -->
<ToggleButton android:id="@+id/muteButton"
style="@style/InCallCompoundButton"
android:background="@drawable/redphone_btn_compound_mute"
android:contentDescription="Mute"
/>
<View
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<!-- This slot is either "Hold" or "Swap", depending on
the state of the call. One or the other of these
must always be set to GONE. -->
<!-- "Hold" -->
<!-- This is a "compound button": it has checked and unchecked states. -->
<!-- <ToggleButton android:id="@+id/holdButton" -->
<!-- style="@style/InCallCompoundButton" -->
<!-- android:background="@drawable/btn_compound_hold" -->
<!-- android:contentDescription="@string/onscreenHoldText" -->
<!-- /> -->
<!-- "Swap" (or "Manage calls" in some CDMA states) -->
<!-- <ImageButton android:id="@+id/swapButton" -->
<!-- style="@style/InCallButton" -->
<!-- android:src="@drawable/ic_incall_switch_holo_dark" -->
<!-- android:contentDescription="@string/onscreenSwapCallsText" -->
<!-- /> -->
<!-- <View android:id="@+id/holdSwapSpacer" -->
<!-- android:layout_width="0dp" -->
<!-- android:layout_weight="1" -->
<!-- android:layout_height="match_parent" /> -->
<!-- This slot is either "Add" or "Merge", depending on
the state of the call. One or the other of these
must always be set to GONE. -->
<!-- "Add Call" -->
<!-- <ImageButton android:id="@+id/addButton" -->
<!-- style="@style/InCallButton" -->
<!-- android:src="@drawable/ic_add_contact_holo_dark" -->
<!-- android:contentDescription="@string/onscreenAddCallText" -->
<!-- /> -->
<!-- "Merge calls" -->
<!-- This button is used only on GSM devices, where we know
that "Add" and "Merge" are never available at the same time.
The "Merge" button for CDMA devices is "cdmaMergeButton" above. -->
<!-- <ImageButton android:id="@+id/mergeButton" -->
<!-- style="@style/InCallButton" -->
<!-- android:src="@drawable/ic_merge_holo_dark" -->
<!-- android:contentDescription="@string/onscreenMergeCallsText" -->
<!-- /> -->
<!-- <View -->
<!-- android:layout_width="0dp" -->
<!-- android:layout_weight="1" -->
<!-- android:layout_height="match_parent" /> -->
</LinearLayout>
<!-- Row 3: The main batch of in-call buttons:
Dialpad / Audio mode / Mute / Hold / Add call
Visible in all states except while an incoming call is
ringing. -->
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/incall_screen"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.thoughtcrime.redphone.ui.CallCard android:id="@+id/callCard"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<org.thoughtcrime.redphone.ui.CallControls android:id="@+id/callControls"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</FrameLayout>

BIN
res/raw/redphone.store Normal file

Binary file not shown.

BIN
res/raw/redphone_busy.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -208,4 +208,29 @@
</string-array>
<string-array name="pref_media_download_roaming_default" />
<!-- RedPhone -->
<array name="incoming_call_widget_targets">
<item>@drawable/redphone_ic_lockscreen_answer</item>
<!-- <item>@drawable/ic_lockscreen_send_sms</item> -->
<item>@null</item>
<item>@drawable/redphone_ic_lockscreen_decline</item>
<item>@null</item>
</array>
<array name="incoming_call_widget_target_descriptions">
<item>"Answer"</item>
<item>"Send SMS"</item>
<item>"Decline"</item>
<item>@null</item>"
</array>
<array name="incoming_call_widget_direction_descriptions">
<item>"Right"</item>
<item>"Up"</item>
<item>"Left"</item>
<item>@null</item>
</array>
</resources>

Some files were not shown because too many files have changed in this diff Show More