Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apk
Commits
75d78218
Commit
75d78218
authored
Aug 29, 2018
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes
parent
5972d1d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
13 deletions
+25
-13
TextCell.java
...gesProj/src/main/java/org/telegram/ui/Cells/TextCell.java
+5
-1
ExternalActionActivity.java
...src/main/java/org/telegram/ui/ExternalActionActivity.java
+4
-6
LaunchActivity.java
...gesProj/src/main/java/org/telegram/ui/LaunchActivity.java
+4
-3
PassportActivity.java
...sProj/src/main/java/org/telegram/ui/PassportActivity.java
+11
-2
PrivacySettingsActivity.java
...rc/main/java/org/telegram/ui/PrivacySettingsActivity.java
+1
-1
No files found.
TMessagesProj/src/main/java/org/telegram/ui/Cells/TextCell.java
View file @
75d78218
...
...
@@ -88,7 +88,11 @@ public class TextCell extends FrameLayout {
valueTextView
.
layout
(
viewLeft
,
viewTop
,
viewLeft
+
valueTextView
.
getMeasuredWidth
(),
viewTop
+
valueTextView
.
getMeasuredHeight
());
viewTop
=
(
height
-
textView
.
getTextHeight
())
/
2
;
viewLeft
=
!
LocaleController
.
isRTL
?
AndroidUtilities
.
dp
(
71
)
:
AndroidUtilities
.
dp
(
24
);
if
(
LocaleController
.
isRTL
)
{
viewLeft
=
getMeasuredWidth
()
-
textView
.
getMeasuredWidth
()
-
AndroidUtilities
.
dp
(
71
);
}
else
{
viewLeft
=
AndroidUtilities
.
dp
(
71
);
}
textView
.
layout
(
viewLeft
,
viewTop
,
viewLeft
+
textView
.
getMeasuredWidth
(),
viewTop
+
textView
.
getMeasuredHeight
());
viewTop
=
AndroidUtilities
.
dp
(
5
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/ExternalActionActivity.java
View file @
75d78218
...
...
@@ -299,17 +299,15 @@ public class ExternalActionActivity extends Activity implements ActionBarLayout.
progressDialog
.
setCancelable
(
false
);
final
int
bot_id
=
intent
.
getIntExtra
(
"bot_id"
,
0
);
String
_payload
=
intent
.
getStringExtra
(
"nonce"
);
if
(
TextUtils
.
isEmpty
(
_payload
))
_payload
=
intent
.
getStringExtra
(
"payload"
);
final
String
payload
=
_payload
;
final
String
nonce
=
intent
.
getStringExtra
(
"nonce"
);
final
String
payload
=
intent
.
getStringExtra
(
"payload"
);
final
TLRPC
.
TL_account_getAuthorizationForm
req
=
new
TLRPC
.
TL_account_getAuthorizationForm
();
req
.
bot_id
=
bot_id
;
req
.
scope
=
intent
.
getStringExtra
(
"scope"
);
req
.
public_key
=
intent
.
getStringExtra
(
"public_key"
);
final
int
[]
requestId
=
{
0
};
if
(
bot_id
==
0
||
TextUtils
.
isEmpty
(
payload
)
||
TextUtils
.
isEmpty
(
req
.
scope
)
||
TextUtils
.
isEmpty
(
req
.
public_key
))
{
if
(
bot_id
==
0
||
TextUtils
.
isEmpty
(
payload
)
&&
TextUtils
.
isEmpty
(
nonce
)
||
TextUtils
.
isEmpty
(
req
.
scope
)
||
TextUtils
.
isEmpty
(
req
.
public_key
))
{
finish
();
return
false
;
}
...
...
@@ -328,7 +326,7 @@ public class ExternalActionActivity extends Activity implements ActionBarLayout.
if
(
response1
!=
null
)
{
TLRPC
.
TL_account_password
accountPassword
=
(
TLRPC
.
TL_account_password
)
response1
;
MessagesController
.
getInstance
(
intentAccount
).
putUsers
(
authorizationForm
.
users
,
false
);
PassportActivity
fragment
=
new
PassportActivity
(
PassportActivity
.
TYPE_PASSWORD
,
req
.
bot_id
,
req
.
scope
,
req
.
public_key
,
payload
,
null
,
authorizationForm
,
accountPassword
);
PassportActivity
fragment
=
new
PassportActivity
(
PassportActivity
.
TYPE_PASSWORD
,
req
.
bot_id
,
req
.
scope
,
req
.
public_key
,
payload
,
n
once
,
n
ull
,
authorizationForm
,
accountPassword
);
fragment
.
setNeedActivityResult
(
true
);
if
(
AndroidUtilities
.
isTablet
())
{
layersActionBarLayout
.
addFragmentToStack
(
fragment
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
View file @
75d78218
...
...
@@ -1123,7 +1123,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
auth
=
new
HashMap
<>();
String
scope
=
data
.
getQueryParameter
(
"scope"
);
if
(!
TextUtils
.
isEmpty
(
scope
)
&&
scope
.
startsWith
(
"{"
)
&&
scope
.
endsWith
(
"}"
))
{
auth
.
put
(
"
payload
"
,
data
.
getQueryParameter
(
"nonce"
));
auth
.
put
(
"
nonce
"
,
data
.
getQueryParameter
(
"nonce"
));
}
else
{
auth
.
put
(
"payload"
,
data
.
getQueryParameter
(
"payload"
));
}
...
...
@@ -1204,7 +1204,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
auth
=
new
HashMap
<>();
String
scope
=
data
.
getQueryParameter
(
"scope"
);
if
(!
TextUtils
.
isEmpty
(
scope
)
&&
scope
.
startsWith
(
"{"
)
&&
scope
.
endsWith
(
"}"
))
{
auth
.
put
(
"
payload
"
,
data
.
getQueryParameter
(
"nonce"
));
auth
.
put
(
"
nonce
"
,
data
.
getQueryParameter
(
"nonce"
));
}
else
{
auth
.
put
(
"payload"
,
data
.
getQueryParameter
(
"payload"
));
}
...
...
@@ -1767,6 +1767,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
return
;
}
final
String
payload
=
auth
.
get
(
"payload"
);
final
String
nonce
=
auth
.
get
(
"nonce"
);
final
String
callbackUrl
=
auth
.
get
(
"callback_url"
);
final
TLRPC
.
TL_account_getAuthorizationForm
req
=
new
TLRPC
.
TL_account_getAuthorizationForm
();
req
.
bot_id
=
bot_id
;
...
...
@@ -1785,7 +1786,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
if
(
response1
!=
null
)
{
TLRPC
.
TL_account_password
accountPassword
=
(
TLRPC
.
TL_account_password
)
response1
;
MessagesController
.
getInstance
(
intentAccount
).
putUsers
(
authorizationForm
.
users
,
false
);
presentFragment
(
new
PassportActivity
(
PassportActivity
.
TYPE_PASSWORD
,
req
.
bot_id
,
req
.
scope
,
req
.
public_key
,
payload
,
callbackUrl
,
authorizationForm
,
accountPassword
));
presentFragment
(
new
PassportActivity
(
PassportActivity
.
TYPE_PASSWORD
,
req
.
bot_id
,
req
.
scope
,
req
.
public_key
,
payload
,
nonce
,
callbackUrl
,
authorizationForm
,
accountPassword
));
}
}));
}
else
{
...
...
TMessagesProj/src/main/java/org/telegram/ui/PassportActivity.java
View file @
75d78218
...
...
@@ -189,6 +189,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
private
int
currentActivityType
;
private
int
currentBotId
;
private
String
currentPayload
;
private
String
currentNonce
;
private
boolean
useCurrentValue
;
private
String
currentScope
;
private
String
currentCallbackUrl
;
...
...
@@ -659,10 +660,11 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
}
public
PassportActivity
(
int
type
,
int
botId
,
String
scope
,
String
publicKey
,
String
payload
,
String
callbackUrl
,
TLRPC
.
TL_account_authorizationForm
form
,
TLRPC
.
TL_account_password
accountPassword
)
{
public
PassportActivity
(
int
type
,
int
botId
,
String
scope
,
String
publicKey
,
String
payload
,
String
nonce
,
String
callbackUrl
,
TLRPC
.
TL_account_authorizationForm
form
,
TLRPC
.
TL_account_password
accountPassword
)
{
this
(
type
,
form
,
accountPassword
,
null
,
null
,
null
,
null
,
null
,
null
);
currentBotId
=
botId
;
currentPayload
=
payload
;
currentNonce
=
nonce
;
currentScope
=
scope
;
currentPublicKey
=
publicKey
;
currentCallbackUrl
=
callbackUrl
;
...
...
@@ -1699,7 +1701,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
else
{
type
=
TYPE_REQUEST
;
}
PassportActivity
activity
=
new
PassportActivity
(
type
,
currentBotId
,
currentScope
,
currentPublicKey
,
currentPayload
,
currentCallbackUrl
,
currentForm
,
currentPassword
);
PassportActivity
activity
=
new
PassportActivity
(
type
,
currentBotId
,
currentScope
,
currentPublicKey
,
currentPayload
,
current
Nonce
,
current
CallbackUrl
,
currentForm
,
currentPassword
);
activity
.
currentEmail
=
currentEmail
;
activity
.
currentAccount
=
currentAccount
;
activity
.
saltedPassword
=
saltedPassword
;
...
...
@@ -2331,6 +2333,13 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
}
}
if
(
currentNonce
!=
null
)
{
try
{
result
.
put
(
"nonce"
,
currentNonce
);
}
catch
(
Exception
ignore
)
{
}
}
String
json
=
result
.
toString
();
EncryptionResult
encryptionResult
=
encryptData
(
AndroidUtilities
.
getStringBytes
(
json
));
...
...
TMessagesProj/src/main/java/org/telegram/ui/PrivacySettingsActivity.java
View file @
75d78218
...
...
@@ -386,7 +386,7 @@ public class PrivacySettingsActivity extends BaseFragment implements Notificatio
builder
.
setCustomView
(
linearLayout
);
showDialog
(
builder
.
create
());
}
else
if
(
position
==
passportRow
)
{
presentFragment
(
new
PassportActivity
(
PassportActivity
.
TYPE_PASSWORD
,
0
,
""
,
""
,
null
,
null
,
null
,
null
));
presentFragment
(
new
PassportActivity
(
PassportActivity
.
TYPE_PASSWORD
,
0
,
""
,
""
,
null
,
null
,
null
,
null
,
null
));
}
});
...
...
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