Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
dff28d52
Commit
dff28d52
authored
13 years ago
by
Irfan Sheriff
Browse files
Options
Downloads
Patches
Plain Diff
Handle state transition for p2p enable reject
Bug: 5265878 Change-Id: Ifd0ecb98876ffe098af06d67226f312d2a3d49c7
parent
8b55e926
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wifi/java/android/net/wifi/p2p/WifiP2pService.java
+10
-3
10 additions, 3 deletions
wifi/java/android/net/wifi/p2p/WifiP2pService.java
with
10 additions
and
3 deletions
wifi/java/android/net/wifi/p2p/WifiP2pService.java
+
10
−
3
View file @
dff28d52
...
...
@@ -128,7 +128,9 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
public
static
final
int
GROUP_NEGOTIATION_TIMED_OUT
=
BASE
+
3
;
/* User accepted to disable Wi-Fi in order to enable p2p */
private
static
final
int
WIFI_DISABLE_USER_ACCEPT
=
BASE
+
11
;
private
static
final
int
WIFI_DISABLE_USER_ACCEPT
=
BASE
+
4
;
/* User rejected to disable Wi-Fi in order to enable p2p */
private
static
final
int
WIFI_DISABLE_USER_REJECT
=
BASE
+
5
;
private
final
boolean
mP2pSupported
;
private
final
String
mDeviceType
;
...
...
@@ -359,6 +361,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
break
;
// Ignore
case
WIFI_DISABLE_USER_ACCEPT:
case
WIFI_DISABLE_USER_REJECT:
case
GROUP_NEGOTIATION_TIMED_OUT:
break
;
default
:
...
...
@@ -457,8 +460,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
if
(
which
==
DialogInterface
.
BUTTON_POSITIVE
)
{
sendMessage
(
WIFI_DISABLE_USER_ACCEPT
);
}
else
{
logd
(
"User rejected enabling p2p"
);
//ignore
sendMessage
(
WIFI_DISABLE_USER_REJECT
);
}
}
};
...
...
@@ -509,6 +511,11 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
mWifiChannel
.
sendMessage
(
P2P_ENABLE_PENDING
);
transitionTo
(
mWaitForWifiDisableState
);
break
;
case
WIFI_DISABLE_USER_REJECT:
logd
(
"User rejected enabling p2p"
);
sendP2pStateChangedBroadcast
(
false
);
transitionTo
(
mP2pDisabledState
);
break
;
case
WifiP2pManager
.
ENABLE_P2P
:
case
WifiP2pManager
.
DISABLE_P2P
:
deferMessage
(
message
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment