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
585ba77e
Commit
585ba77e
authored
Mar 24, 2014
by
DrKLO
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if native lib loaded before opening db
parent
d8c2966e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
MessagesStorage.java
...src/main/java/org/telegram/messenger/MessagesStorage.java
+2
-0
NativeLoader.java
...oj/src/main/java/org/telegram/messenger/NativeLoader.java
+8
-1
No files found.
TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java
View file @
585ba77e
...
...
@@ -62,6 +62,8 @@ public class MessagesStorage {
}
public
void
openDatabase
()
{
NativeLoader
.
initNativeLibs
(
ApplicationLoader
.
applicationContext
);
cacheFile
=
new
File
(
ApplicationLoader
.
applicationContext
.
getFilesDir
(),
"cache4.db"
);
SharedPreferences
preferences
=
ApplicationLoader
.
applicationContext
.
getSharedPreferences
(
"dbconfig"
,
Context
.
MODE_PRIVATE
);
...
...
TMessagesProj/src/main/java/org/telegram/messenger/NativeLoader.java
View file @
585ba77e
...
...
@@ -28,7 +28,14 @@ public class NativeLoader {
0
,
//mips
};
public
static
void
initNativeLibs
(
Context
context
)
{
private
static
volatile
boolean
nativeLoaded
=
false
;
public
static
synchronized
void
initNativeLibs
(
Context
context
)
{
if
(
nativeLoaded
)
{
return
;
}
nativeLoaded
=
true
;
if
(
Build
.
VERSION
.
SDK_INT
>=
9
)
{
try
{
String
folder
=
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