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
d0a686fc
Commit
d0a686fc
authored
Apr 05, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some additional checks
parent
e8b3375d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
21 deletions
+36
-21
build.gradle
TMessagesProj/build.gradle
+1
-1
NativeLoader.java
...oj/src/main/java/org/telegram/messenger/NativeLoader.java
+24
-16
ChatActivity.java
...sagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+4
-1
LoginActivity.java
...agesProj/src/main/java/org/telegram/ui/LoginActivity.java
+0
-3
LoginActivitySmsView.java
...j/src/main/java/org/telegram/ui/LoginActivitySmsView.java
+7
-0
No files found.
TMessagesProj/build.gradle
View file @
d0a686fc
...
...
@@ -82,7 +82,7 @@ android {
defaultConfig
{
minSdkVersion
8
targetSdkVersion
19
versionCode
22
4
versionCode
22
5
versionName
"1.4.10"
}
}
TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java
View file @
d0a686fc
...
...
@@ -40,27 +40,35 @@ public class NativeLoader {
long
libSize
=
0
;
long
libSize2
=
0
;
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"armeabi-v7a"
))
{
folder
=
"armeabi-v7a"
;
libSize
=
sizes
[
1
];
libSize2
=
sizes
[
0
];
}
else
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"armeabi"
))
{
try
{
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"armeabi-v7a"
))
{
folder
=
"armeabi-v7a"
;
libSize
=
sizes
[
1
];
libSize2
=
sizes
[
0
];
}
else
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"armeabi"
))
{
folder
=
"armeabi"
;
libSize
=
sizes
[
0
];
libSize2
=
sizes
[
1
];
}
else
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"x86"
))
{
folder
=
"x86"
;
libSize
=
sizes
[
2
];
}
else
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"mips"
))
{
folder
=
"mips"
;
libSize
=
sizes
[
3
];
}
else
{
folder
=
"armeabi"
;
libSize
=
sizes
[
0
];
libSize2
=
sizes
[
1
];
FileLog
.
e
(
"tmessages"
,
"Unsupported arch: "
+
Build
.
CPU_ABI
);
}
}
catch
(
Exception
e
)
{
FileLog
.
e
(
"tmessages"
,
e
);
folder
=
"armeabi"
;
libSize
=
sizes
[
0
];
libSize2
=
sizes
[
1
];
}
else
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"x86"
))
{
folder
=
"x86"
;
libSize
=
sizes
[
2
];
}
else
if
(
Build
.
CPU_ABI
.
equalsIgnoreCase
(
"mips"
))
{
folder
=
"mips"
;
libSize
=
sizes
[
3
];
}
else
{
System
.
loadLibrary
(
"tmessages"
);
nativeLoaded
=
true
;
FileLog
.
e
(
"tmessages"
,
"Unsupported arch: "
+
Build
.
CPU_ABI
);
return
;
}
File
destFile
=
new
File
(
context
.
getApplicationInfo
().
nativeLibraryDir
+
"/libtmessages.so"
);
if
(
destFile
.
exists
()
&&
(
destFile
.
length
()
==
libSize
||
libSize2
!=
0
&&
destFile
.
length
()
==
libSize2
))
{
FileLog
.
d
(
"tmessages"
,
"Load normal lib"
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
View file @
d0a686fc
...
...
@@ -3424,7 +3424,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
break
;
}
case
attach_location:
{
if
(!
isGoogleMapsInstalled
())
{
if
(!
isGoogleMapsInstalled
()
||
parentActivity
==
null
)
{
return
true
;
}
LocationActivity
fragment
=
new
LocationActivity
();
...
...
@@ -3432,6 +3432,9 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
break
;
}
case
attach_document:
{
if
(
parentActivity
==
null
)
{
return
true
;
}
DocumentSelectActivity
fragment
=
new
DocumentSelectActivity
();
fragment
.
delegate
=
this
;
((
LaunchActivity
)
parentActivity
).
presentFragment
(
fragment
,
"document"
,
false
);
...
...
TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java
View file @
d0a686fc
...
...
@@ -45,9 +45,6 @@ public class LoginActivity extends ActionBarActivity implements SlideView.SlideV
((
LoginActivityPhoneView
)
views
[
0
]).
selectCountry
(
data
.
getStringExtra
(
"country"
));
}
}
// if (views[currentViewNum] instanceof LoginActivityRegisterView) {
// ((LoginActivityRegisterView)views[currentViewNum]).avatarUpdater.onActivityResult(requestCode, resultCode, data);
// }
}
@Override
...
...
TMessagesProj/src/main/java/org/telegram/ui/LoginActivitySmsView.java
View file @
d0a686fc
...
...
@@ -105,6 +105,9 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
@Override
public
void
setParams
(
Bundle
params
)
{
if
(
params
==
null
)
{
return
;
}
codeField
.
setText
(
""
);
Utilities
.
setWaitingForSms
(
true
);
NotificationCenter
.
getInstance
().
addObserver
(
this
,
998
);
...
...
@@ -116,6 +119,10 @@ public class LoginActivitySmsView extends SlideView implements NotificationCente
registered
=
params
.
getString
(
"registered"
);
time
=
params
.
getInt
(
"calltime"
);
if
(
phone
==
null
)
{
return
;
}
String
number
=
PhoneFormat
.
getInstance
().
format
(
phone
);
confirmTextView
.
setText
(
Html
.
fromHtml
(
String
.
format
(
ApplicationLoader
.
applicationContext
.
getResources
().
getString
(
R
.
string
.
SentSmsCode
)
+
" <b>%s</b>"
,
number
)));
...
...
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