Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect Android
Commits
17e9892c
Commit
17e9892c
authored
Mar 21, 2019
by
Nicolas Fella
Browse files
Fix showing callers number on Pie
parent
a8bc4f24
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/org/kde/kdeconnect/Plugins/TelephonyPlugin/TelephonyPlugin.java
View file @
17e9892c
...
...
@@ -108,15 +108,15 @@ public class TelephonyPlugin extends Plugin {
else
if
(
state
.
equals
(
TelephonyManager
.
EXTRA_STATE_OFFHOOK
))
intState
=
TelephonyManager
.
CALL_STATE_OFFHOOK
;
String
number
=
intent
.
getStringExtra
(
Intent
.
EXTRA_PHONE_NUMBER
);
if
(
number
==
null
)
number
=
intent
.
getStringExtra
(
TelephonyManager
.
EXTRA_INCOMING_NUMBER
);
// We will get a second broadcast with the phone number https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED
if
(!
intent
.
hasExtra
(
TelephonyManager
.
EXTRA_INCOMING_NUMBER
))
return
;
String
number
=
intent
.
getStringExtra
(
TelephonyManager
.
EXTRA_INCOMING_NUMBER
);
final
int
finalIntState
=
intState
;
final
String
finalNumber
=
number
;
if
(
finalIntState
!=
lastState
)
{
callBroadcastReceived
(
finalIntState
,
finalN
umber
);
callBroadcastReceived
(
finalIntState
,
n
umber
);
}
}
}
...
...
Write
Preview
Supports
Markdown
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