Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
fix session launch error in some special condition
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Jun 27, 2018
1 parent 07f7241 commit e2fb2f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,12 @@ func ServeHTTP(lis net.Listener, tunnel *TunnelProxy) error {
http.Error(w, err.Error(), http.StatusGone) // 410
return
}
if !strings.HasPrefix(mainActivity, packageName) {
// Refs: https://stackoverflow.com/questions/12131555/leading-dot-in-androidname-really-required
// MainActivity convert to .MainActivity
// com.example.app.MainActivity keep same
// app.MainActivity keep same
// So only words not contains dot, need to add prefix "."
if !strings.Contains(mainActivity, ".") {
mainActivity = "." + mainActivity
}

Expand Down

0 comments on commit e2fb2f4

Please sign in to comment.