Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
scorpio
frameworks_base
Commits
1ff1d320
Commit
1ff1d320
authored
10 years ago
by
Santos Cordon
Committed by
Android (Google) Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Remove CallState and rename PRE_DIAL_WAIT"
parents
a09c5eed
e3c507b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
195 deletions
+15
-195
api/current.txt
api/current.txt
+1
-15
api/system-current.txt
api/system-current.txt
+2
-15
telecomm/java/android/telecom/Call.java
telecomm/java/android/telecom/Call.java
+12
-31
telecomm/java/android/telecom/CallState.java
telecomm/java/android/telecom/CallState.java
+0
-134
No files found.
api/current.txt
View file @
1ff1d320
...
...
@@ -30118,8 +30118,8 @@ package android.telecom {
field public static final int STATE_DISCONNECTING = 10; // 0xa
field public static final int STATE_HOLDING = 3; // 0x3
field public static final int STATE_NEW = 0; // 0x0
field public static final int STATE_PRE_DIAL_WAIT = 8; // 0x8
field public static final int STATE_RINGING = 2; // 0x2
field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
}
public static abstract class Call.Callback {
...
...
@@ -30179,20 +30179,6 @@ package android.telecom {
field public static final int CONFERENCE = 1; // 0x1
}
public final class CallState {
method public static java.lang.String toString(int);
field public static final int ABORTED = 8; // 0x8
field public static final int ACTIVE = 5; // 0x5
field public static final int CONNECTING = 1; // 0x1
field public static final int DIALING = 3; // 0x3
field public static final int DISCONNECTED = 7; // 0x7
field public static final int DISCONNECTING = 9; // 0x9
field public static final int NEW = 0; // 0x0
field public static final int ON_HOLD = 6; // 0x6
field public static final int PRE_DIAL_WAIT = 2; // 0x2
field public static final int RINGING = 4; // 0x4
}
public final class CameraCapabilities implements android.os.Parcelable {
ctor public CameraCapabilities(int, int);
method public int describeContents();
This diff is collapsed.
Click to expand it.
api/system-current.txt
View file @
1ff1d320
...
...
@@ -32224,8 +32224,9 @@ package android.telecom {
field public static final int STATE_DISCONNECTING = 10; // 0xa
field public static final int STATE_HOLDING = 3; // 0x3
field public static final int STATE_NEW = 0; // 0x0
field public static final int STATE_PRE_DIAL_WAIT = 8; // 0x8
field public static final
deprecated
int STATE_PRE_DIAL_WAIT = 8; // 0x8
field public static final int STATE_RINGING = 2; // 0x2
field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
}
public static abstract class Call.Callback {
...
...
@@ -32289,20 +32290,6 @@ package android.telecom {
field public static final int CONFERENCE = 1; // 0x1
}
public final class CallState {
method public static java.lang.String toString(int);
field public static final int ABORTED = 8; // 0x8
field public static final int ACTIVE = 5; // 0x5
field public static final int CONNECTING = 1; // 0x1
field public static final int DIALING = 3; // 0x3
field public static final int DISCONNECTED = 7; // 0x7
field public static final int DISCONNECTING = 9; // 0x9
field public static final int NEW = 0; // 0x0
field public static final int ON_HOLD = 6; // 0x6
field public static final int PRE_DIAL_WAIT = 2; // 0x2
field public static final int RINGING = 4; // 0x4
}
public final class CameraCapabilities implements android.os.Parcelable {
ctor public CameraCapabilities(int, int);
method public int describeContents();
This diff is collapsed.
Click to expand it.
telecomm/java/android/telecom/Call.java
View file @
1ff1d320
...
...
@@ -66,9 +66,18 @@ public final class Call {
public
static
final
int
STATE_DISCONNECTED
=
7
;
/**
* The state of an outgoing {@code Call}, but waiting for user input before proceeding.
* The state of an outgoing {@code Call} when waiting on user to select a
* {@link PhoneAccount} through which to place the call.
*/
public
static
final
int
STATE_PRE_DIAL_WAIT
=
8
;
public
static
final
int
STATE_SELECT_PHONE_ACCOUNT
=
8
;
/**
* @hide
* @deprecated use STATE_SELECT_PHONE_ACCOUNT.
*/
@Deprecated
@SystemApi
public
static
final
int
STATE_PRE_DIAL_WAIT
=
STATE_SELECT_PHONE_ACCOUNT
;
/**
* The initial state of an outgoing {@code Call}.
...
...
@@ -929,7 +938,7 @@ public final class Call {
mVideoCall
=
parcelableCall
.
getVideoCall
();
}
int
state
=
stateFromParcelableCallState
(
parcelableCall
.
getState
()
)
;
int
state
=
parcelableCall
.
getState
();
boolean
stateChanged
=
mState
!=
state
;
if
(
stateChanged
)
{
mState
=
state
;
...
...
@@ -1064,32 +1073,4 @@ public final class Call {
callback
.
onConferenceableCallsChanged
(
this
,
mUnmodifiableConferenceableCalls
);
}
}
private
int
stateFromParcelableCallState
(
int
parcelableCallState
)
{
switch
(
parcelableCallState
)
{
case
CallState
.
NEW
:
return
STATE_NEW
;
case
CallState
.
CONNECTING
:
return
STATE_CONNECTING
;
case
CallState
.
PRE_DIAL_WAIT
:
return
STATE_PRE_DIAL_WAIT
;
case
CallState
.
DIALING
:
return
STATE_DIALING
;
case
CallState
.
RINGING
:
return
STATE_RINGING
;
case
CallState
.
ACTIVE
:
return
STATE_ACTIVE
;
case
CallState
.
ON_HOLD
:
return
STATE_HOLDING
;
case
CallState
.
DISCONNECTED
:
return
STATE_DISCONNECTED
;
case
CallState
.
ABORTED
:
return
STATE_DISCONNECTED
;
case
CallState
.
DISCONNECTING
:
return
STATE_DISCONNECTING
;
default
:
Log
.
wtf
(
this
,
"Unrecognized CallState %s"
,
parcelableCallState
);
return
STATE_NEW
;
}
}
}
This diff is collapsed.
Click to expand it.
telecomm/java/android/telecom/CallState.java
deleted
100644 → 0
View file @
a09c5eed
/*
* Copyright 2014, 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.
*/
package
android.telecom
;
/**
* Defines call-state constants of the different states in which a call can exist. Although states
* have the notion of normal transitions, due to the volatile nature of telephony systems, code
* that uses these states should be resilient to unexpected state changes outside of what is
* considered traditional.
*/
public
final
class
CallState
{
private
CallState
()
{}
/**
* Indicates that a call is new and not connected. This is used as the default state internally
* within Telecom and should not be used between Telecom and call services. Call services are
* not expected to ever interact with NEW calls, but {@link InCallService}s will see calls in
* this state.
*/
public
static
final
int
NEW
=
0
;
/**
* The initial state of an outgoing {@code Call}.
* Common transitions are to {@link #DIALING} state for a successful call or
* {@link #DISCONNECTED} if it failed.
*/
public
static
final
int
CONNECTING
=
1
;
/**
* Indicates that the call is about to go into the outgoing and dialing state but is waiting for
* user input before it proceeds. For example, where no default {@link PhoneAccount} is set,
* this is the state where the InCallUI is waiting for the user to select a
* {@link PhoneAccount} to call from.
*/
public
static
final
int
PRE_DIAL_WAIT
=
2
;
/**
* Indicates that a call is outgoing and in the dialing state. A call transitions to this state
* once an outgoing call has begun (e.g., user presses the dial button in Dialer). Calls in this
* state usually transition to {@link #ACTIVE} if the call was answered or {@link #DISCONNECTED}
* if the call was disconnected somehow (e.g., failure or cancellation of the call by the user).
*/
public
static
final
int
DIALING
=
3
;
/**
* Indicates that a call is incoming and the user still has the option of answering, rejecting,
* or doing nothing with the call. This state is usually associated with some type of audible
* ringtone. Normal transitions are to {@link #ACTIVE} if answered or {@link #DISCONNECTED}
* otherwise.
*/
public
static
final
int
RINGING
=
4
;
/**
* Indicates that a call is currently connected to another party and a communication channel is
* open between them. The normal transition to this state is by the user answering a
* {@link #DIALING} call or a {@link #RINGING} call being answered by the other party.
*/
public
static
final
int
ACTIVE
=
5
;
/**
* Indicates that the call is currently on hold. In this state, the call is not terminated
* but no communication is allowed until the call is no longer on hold. The typical transition
* to this state is by the user putting an {@link #ACTIVE} call on hold by explicitly performing
* an action, such as clicking the hold button.
*/
public
static
final
int
ON_HOLD
=
6
;
/**
* Indicates that a call is currently disconnected. All states can transition to this state
* by the call service giving notice that the connection has been severed. When the user
* explicitly ends a call, it will not transition to this state until the call service confirms
* the disconnection or communication was lost to the call service currently responsible for
* this call (e.g., call service crashes).
*/
public
static
final
int
DISCONNECTED
=
7
;
/**
* Indicates that the call was attempted (mostly in the context of outgoing, at least at the
* time of writing) but cancelled before it was successfully connected.
*/
public
static
final
int
ABORTED
=
8
;
/**
* Indicates that the call is in the process of being disconnected and will transition next
* to a {@link #DISCONNECTED} state.
* <p>
* This state is not expected to be communicated from the Telephony layer, but will be reported
* to the InCall UI for calls where disconnection has been initiated by the user but the
* ConnectionService has confirmed the call as disconnected.
*/
public
static
final
int
DISCONNECTING
=
9
;
public
static
String
toString
(
int
callState
)
{
switch
(
callState
)
{
case
NEW:
return
"NEW"
;
case
CONNECTING:
return
"CONNECTING"
;
case
PRE_DIAL_WAIT:
return
"PRE_DIAL_WAIT"
;
case
DIALING:
return
"DIALING"
;
case
RINGING:
return
"RINGING"
;
case
ACTIVE:
return
"ACTIVE"
;
case
ON_HOLD:
return
"ON_HOLD"
;
case
DISCONNECTED:
return
"DISCONNECTED"
;
case
ABORTED:
return
"ABORTED"
;
case
DISCONNECTING:
return
"DISCONNECTING"
;
default
:
return
"UNKNOWN"
;
}
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment