Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
majora-adr
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
majora
majora-adr
Commits
02f5bfc2
Commit
02f5bfc2
authored
Sep 11, 2021
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parents
Pipeline
#2433
canceled with stages
Changes
38
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1257 additions
and
0 deletions
+1257
-0
.gitignore
.gitignore
+48
-0
.gitignore
app/.gitignore
+1
-0
build.gradle
app/build.gradle
+56
-0
proguard-rules.pro
app/proguard-rules.pro
+21
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+35
-0
ClientIdentifier.java
...src/main/java/com/virjar/majora/adr/ClientIdentifier.java
+204
-0
KeepAliveService.java
...src/main/java/com/virjar/majora/adr/KeepAliveService.java
+135
-0
MainActivity.java
app/src/main/java/com/virjar/majora/adr/MainActivity.java
+28
-0
SettingsActivity.java
...src/main/java/com/virjar/majora/adr/SettingsActivity.java
+52
-0
TheApp.java
app/src/main/java/com/virjar/majora/adr/TheApp.java
+20
-0
ic_launcher_foreground.xml
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+34
-0
ic_launcher_background.xml
app/src/main/res/drawable/ic_launcher_background.xml
+170
-0
activity_main.xml
app/src/main/res/layout/activity_main.xml
+43
-0
activity_settings.xml
app/src/main/res/layout/activity_settings.xml
+7
-0
ic_launcher.xml
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+6
-0
ic_launcher_round.xml
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+6
-0
ic_launcher.png
app/src/main/res/mipmap-hdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
+0
-0
ic_launcher.png
app/src/main/res/mipmap-mdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
+0
-0
ic_launcher.png
app/src/main/res/mipmap-xhdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
+0
-0
ic_launcher.png
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
+0
-0
ic_launcher.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
+0
-0
colors.xml
app/src/main/res/values/colors.xml
+7
-0
strings.xml
app/src/main/res/values/strings.xml
+11
-0
styles.xml
app/src/main/res/values/styles.xml
+11
-0
pref_setting.xml
app/src/main/res/xml/pref_setting.xml
+25
-0
build.gradle
build.gradle
+63
-0
gradle.properties
gradle.properties
+17
-0
gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.jar
+0
-0
gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
+6
-0
gradlew
gradlew
+160
-0
gradlew.bat
gradlew.bat
+90
-0
hermes_key
script/hermes_key
+0
-0
settings.gradle
settings.gradle
+1
-0
No files found.
.gitignore
0 → 100644
View file @
02f5bfc2
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
# kdiff3 ignore
*.orig
# maven ignore
target/
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
*.iws
# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp
# system ignore
.DS_Store
Thumbs.db
*.apk
build/
apps/
ratelConfig.properties
script/dist
script/dist.zip
container-builder-repkg/src/main/resources/ratel_engine.properties
app/.gitignore
0 → 100644
View file @
02f5bfc2
/build
app/build.gradle
0 → 100644
View file @
02f5bfc2
apply
plugin:
'com.android.application'
android
{
compileSdkVersion
26
defaultConfig
{
applicationId
"com.virjar.majora.adr"
minSdkVersion
19
targetSdkVersion
26
versionCode
1
versionName
"1.0"
archivesBaseName
=
"Majora_${versionName}"
.
replace
(
' '
,
'_'
)
}
signingConfigs
{
release
{
storeFile
rootProject
.
file
(
'script/hermes_key'
)
storePassword
"hermes"
keyAlias
"hermes"
keyPassword
"hermes"
}
}
buildTypes
{
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'proguard-rules.pro'
signingConfig
signingConfigs
.
release
}
//debug ,也使用release的key,hermes代码无法在线调试,所以没有debug的意义
debug
{
signingConfig
signingConfigs
.
release
}
}
lintOptions
{
abortOnError
false
}
packagingOptions
{
exclude
'META-INF/INDEX.LIST'
exclude
'META-INF/io.netty.versions.properties'
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
'com.android.support:appcompat-v7:26.1.0'
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
implementation
'org.apache.commons:commons-lang3:3.6'
implementation
'commons-io:commons-io:2.6'
implementation
"com.virjar.majora:majora-sdk:1.0"
}
app/proguard-rules.pro
0 → 100644
View file @
02f5bfc2
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
app/src/main/AndroidManifest.xml
0 → 100644
View file @
02f5bfc2
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"com.virjar.majora.adr"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.READ_PHONE_STATE"
/>
<!-- 前台服务,保持安排的优先级 -->
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<application
android:name=
".TheApp"
android:allowBackup=
"false"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
tools:ignore=
"GoogleAppIndexingWarning"
>
<activity
android:name=
".MainActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<service
android:name=
"com.virjar.majora.adr.KeepAliveService"
android:enabled=
"true"
android:exported=
"false"
/>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/com/virjar/majora/adr/ClientIdentifier.java
0 → 100644
View file @
02f5bfc2
package
com
.
virjar
.
majora
.
adr
;
import
android.Manifest
;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.pm.PackageManager
;
import
android.os.Build
;
import
android.os.Process
;
import
android.telephony.TelephonyManager
;
import
android.text.TextUtils
;
import
com.virjar.majora.client.sdk.log.MajoraLogger
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.NetworkInterface
;
import
java.net.SocketException
;
import
java.util.Enumeration
;
import
java.util.Random
;
import
java.util.UUID
;
public
class
ClientIdentifier
{
private
static
final
String
clientIdFileName
=
"echo_client_id.txt"
;
private
static
final
String
UN_RESOLVE
=
"un_resolve_"
;
public
static
boolean
isAndroid
=
isAndroidEnv
();
private
static
String
clientIdInMemory
;
public
static
String
id
()
{
if
(
clientIdInMemory
!=
null
)
{
return
clientIdInMemory
;
}
// from cache file
File
file
=
resolveIdCacheFile
();
if
(
file
.
exists
())
{
try
{
String
s
=
readFile
(
file
);
if
(
s
!=
null
&&
!
s
.
isEmpty
()
&&
!
s
.
startsWith
(
UN_RESOLVE
))
{
clientIdInMemory
=
s
;
return
clientIdInMemory
;
}
}
catch
(
IOException
e
)
{
MajoraLogger
.
getLogger
().
error
(
"can not read id file: "
+
file
.
getAbsolutePath
(),
e
);
}
}
clientIdInMemory
=
generateClientId
()
+
"_"
+
new
Random
().
nextInt
(
10000
);
try
{
writeFile
(
file
,
clientIdInMemory
);
}
catch
(
IOException
e
)
{
MajoraLogger
.
getLogger
().
error
(
"can not write id file: "
+
file
.
getAbsolutePath
(),
e
);
}
return
clientIdInMemory
;
}
private
static
void
writeFile
(
File
file
,
String
data
)
throws
IOException
{
try
(
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
file
))
{
fileOutputStream
.
write
(
data
.
getBytes
());
}
}
private
static
String
readFile
(
File
file
)
throws
IOException
{
FileInputStream
stream
=
new
FileInputStream
(
file
);
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
copyStream
(
stream
,
byteArrayOutputStream
);
return
byteArrayOutputStream
.
toString
();
}
private
static
void
copyStream
(
InputStream
inputStream
,
OutputStream
outputStream
)
throws
IOException
{
byte
[]
buf
=
new
byte
[
2048
];
int
len
;
while
((
len
=
inputStream
.
read
(
buf
))
>
0
)
{
outputStream
.
write
(
buf
,
0
,
len
);
}
}
private
static
String
generateClientId
()
{
if
(
isAndroid
)
{
String
s
=
generateClientIdForAndroid
();
if
(
s
!=
null
&&
!
s
.
isEmpty
())
{
return
s
;
}
}
String
mac
=
generateClientIdForNormalJVM
();
if
(!
TextUtils
.
isEmpty
(
mac
))
{
return
mac
;
}
return
UN_RESOLVE
+
UUID
.
randomUUID
().
toString
();
}
private
static
String
generateClientIdForNormalJVM
()
{
try
{
Enumeration
<
NetworkInterface
>
networkInterfaces
=
NetworkInterface
.
getNetworkInterfaces
();
while
(
networkInterfaces
.
hasMoreElements
())
{
NetworkInterface
networkInterface
=
networkInterfaces
.
nextElement
();
if
(
networkInterface
.
isVirtual
())
{
continue
;
}
if
(
networkInterface
.
isLoopback
())
{
continue
;
}
byte
[]
hardwareAddress
=
networkInterface
.
getHardwareAddress
();
if
(
hardwareAddress
==
null
)
{
continue
;
}
return
parseByte
(
hardwareAddress
[
0
])
+
":"
+
parseByte
(
hardwareAddress
[
1
])
+
":"
+
parseByte
(
hardwareAddress
[
2
])
+
":"
+
parseByte
(
hardwareAddress
[
3
])
+
":"
+
parseByte
(
hardwareAddress
[
4
])
+
":"
+
parseByte
(
hardwareAddress
[
5
]);
}
return
null
;
}
catch
(
SocketException
e
)
{
return
null
;
}
}
private
static
String
parseByte
(
byte
b
)
{
int
intValue
;
if
(
b
>=
0
)
{
intValue
=
b
;
}
else
{
intValue
=
256
+
b
;
}
return
Integer
.
toHexString
(
intValue
);
}
private
static
String
generateClientIdForAndroid
()
{
Application
application
=
TheApp
.
getApplication
();
if
(
application
.
checkPermission
(
Manifest
.
permission
.
READ_PHONE_STATE
,
Process
.
myPid
(),
Process
.
myUid
())
==
PackageManager
.
PERMISSION_GRANTED
)
{
TelephonyManager
telephonyManager
=
(
TelephonyManager
)
application
.
getSystemService
(
Context
.
TELEPHONY_SERVICE
);
String
imei
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
imei
=
telephonyManager
.
getImei
();
}
else
{
imei
=
telephonyManager
.
getDeviceId
();
}
if
(!
TextUtils
.
isEmpty
(
imei
))
{
return
imei
;
}
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
String
serial
=
Build
.
getSerial
();
if
(!
TextUtils
.
isEmpty
(
serial
))
{
return
serial
;
}
}
}
else
{
MajoraLogger
.
getLogger
().
warn
(
"need permission :"
+
Manifest
.
permission
.
READ_PHONE_STATE
);
}
String
serial
=
Build
.
SERIAL
;
if
(
"unknown"
.
equalsIgnoreCase
(
serial
))
{
return
""
;
}
return
serial
;
}
private
static
File
resolveIdCacheFile
()
{
if
(
isAndroid
)
{
return
resolveAndroidCacheIdFile
();
}
return
resolveJvmEnvCacheIdFile
();
}
private
static
File
resolveJvmEnvCacheIdFile
()
{
String
userHome
=
System
.
getProperty
(
"user.home"
);
File
base
;
if
(
userHome
!=
null
&&
!
userHome
.
trim
().
isEmpty
())
{
base
=
new
File
(
userHome
);
}
else
{
base
=
new
File
(
"."
);
}
return
new
File
(
base
,
clientIdFileName
);
}
private
static
File
resolveAndroidCacheIdFile
()
{
Application
application
=
TheApp
.
getApplication
();
return
new
File
(
application
.
getFilesDir
(),
clientIdFileName
);
}
private
static
boolean
isAndroidEnv
()
{
try
{
Class
.
forName
(
"android.util.Log"
);
return
true
;
}
catch
(
Throwable
throwable
)
{
//ignore
}
return
false
;
}
}
app/src/main/java/com/virjar/majora/adr/KeepAliveService.java
0 → 100644
View file @
02f5bfc2
package
com
.
virjar
.
majora
.
adr
;
import
android.annotation.SuppressLint
;
import
android.app.Notification
;
import
android.app.NotificationChannel
;
import
android.app.NotificationManager
;
import
android.app.PendingIntent
;
import
android.app.Service
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.SharedPreferences
;
import
android.content.pm.PackageManager
;
import
android.graphics.Bitmap
;
import
android.graphics.Canvas
;
import
android.graphics.Color
;
import
android.graphics.PixelFormat
;
import
android.graphics.drawable.Drawable
;
import
android.os.Build
;
import
android.os.IBinder
;
import
android.preference.PreferenceManager
;
import
com.virjar.majora.client.sdk.client.MajoraClient
;
import
com.virjar.majora.client.sdk.log.MajoraLogger
;
import
static
android
.
app
.
PendingIntent
.
FLAG_UPDATE_CURRENT
;
public
class
KeepAliveService
extends
Service
{
private
static
boolean
start
=
false
;
public
static
void
startService
(
Context
context
)
{
if
(
start
)
{
return
;
}
setNotifyChannel
(
context
);
Intent
intent
=
new
Intent
(
context
,
KeepAliveService
.
class
);
context
.
startService
(
intent
);
}
private
static
void
setNotifyChannel
(
Context
context
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
O
)
{
return
;
}
String
packageName
=
context
.
getPackageName
();
@SuppressLint
(
"WrongConstant"
)
NotificationChannel
notificationChannel
=
new
NotificationChannel
(
packageName
+
":majora"
,
"channel"
,
NotificationManager
.
IMPORTANCE_HIGH
);
notificationChannel
.
enableLights
(
true
);
notificationChannel
.
setLightColor
(
Color
.
YELLOW
);
notificationChannel
.
setShowBadge
(
true
);
notificationChannel
.
setLockscreenVisibility
(
Notification
.
VISIBILITY_PUBLIC
);
NotificationManager
manager
=
(
NotificationManager
)
context
.
getSystemService
(
NOTIFICATION_SERVICE
);
if
(
manager
==
null
)
{
return
;
}
manager
.
createNotificationChannel
(
notificationChannel
);
}
private
void
onServiceStartupInternal
()
{
String
packageName
=
getPackageName
();
PackageManager
pm
=
getPackageManager
();
Intent
launchIntent
=
pm
.
getLaunchIntentForPackage
(
packageName
);
if
(
launchIntent
==
null
)
{
MajoraLogger
.
getLogger
()
.
warn
(
"no launchIntent for package: "
+
getPackageName
());
return
;
}
Bitmap
icon
;
try
{
icon
=
drawableToBitmap
(
pm
.
getPackageInfo
(
packageName
,
PackageManager
.
GET_META_DATA
)
.
applicationInfo
.
loadIcon
(
pm
)
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
throw
new
RuntimeException
(
e
);
}
Notification
.
Builder
builder
=
new
Notification
.
Builder
(
this
);
// 设置PendingIntent
builder
.
setContentIntent
(
PendingIntent
.
getActivity
(
this
,
0
,
launchIntent
,
FLAG_UPDATE_CURRENT
))
.
setLargeIcon
(
icon
)
.
setContentTitle
(
"majora service"
)
.
setContentText
(
"to make sure majora service alive"
)
.
setWhen
(
System
.
currentTimeMillis
());
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
builder
.
setChannelId
(
packageName
+
":majora"
);
}
Notification
notification
=
builder
.
build
();
notification
.
defaults
=
Notification
.
DEFAULT_SOUND
;
startForeground
(
110
,
notification
);
startProxyService
();
start
=
true
;
}
private
void
startProxyService
()
{
SharedPreferences
spf
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
String
serverHost
=
spf
.
getString
(
"server_host"
,
"majora.virjar.com"
);
int
serverPort
=
spf
.
getInt
(
"server_port"
,
5879
);
new
MajoraClient
(
serverHost
,
serverPort
,
ClientIdentifier
.
id
()).
startUp
();
}
// 5. Drawable----> Bitmap
public
static
Bitmap
drawableToBitmap
(
Drawable
drawable
)
{
// 获取 drawable 长宽
int
width
=
drawable
.
getIntrinsicWidth
();
int
heigh
=
drawable
.
getIntrinsicHeight
();
drawable
.
setBounds
(
0
,
0
,
width
,
heigh
);
// 获取drawable的颜色格式
Bitmap
.
Config
config
=
drawable
.
getOpacity
()
!=
PixelFormat
.
OPAQUE
?
Bitmap
.
Config
.
ARGB_8888
:
Bitmap
.
Config
.
RGB_565
;
// 创建bitmap
Bitmap
bitmap
=
Bitmap
.
createBitmap
(
width
,
heigh
,
config
);
// 创建bitmap画布
Canvas
canvas
=
new
Canvas
(
bitmap
);
// 将drawable 内容画到画布中
drawable
.
draw
(
canvas
);
return
bitmap
;
}
@Override
public
IBinder
onBind
(
Intent
intent
)
{
onServiceStartupInternal
();
return
null
;
}
@Override
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
onServiceStartupInternal
();
return
START_STICKY
;
}
}
app/src/main/java/com/virjar/majora/adr/MainActivity.java
0 → 100644
View file @
02f5bfc2
package
com
.
virjar
.
majora
.
adr
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.widget.Button
;
public
class
MainActivity
extends
Activity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
);
Button
btn
=
findViewById
(
R
.
id
.
goSetting
);
btn
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
SettingsActivity
.
go
(
MainActivity
.
this
);
}
});
}
}
app/src/main/java/com/virjar/majora/adr/SettingsActivity.java
0 → 100755
View file @
02f5bfc2
package
com
.
virjar
.
majora
.
adr
;
import
android.annotation.SuppressLint
;
import
android.annotation.TargetApi
;
import
android.app.FragmentManager
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.preference.PreferenceFragment
;
import
android.support.v7.app.AppCompatActivity
;
public
class
SettingsActivity
extends
AppCompatActivity
{
public
static
void
go
(
Context
context
)
{
Intent
intent
=
new
Intent
(
context
,
SettingsActivity
.
class
);
context
.
startActivity
(
intent
);
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_settings
);
if
(
savedInstanceState
==
null
)
{
SettingsFragment
mSettingsFragment
=
new
SettingsFragment
();
replaceFragment
(
R
.
id
.
settings_container
,
mSettingsFragment
);
}
}
@TargetApi
(
Build
.
VERSION_CODES
.
HONEYCOMB
)
public
void
replaceFragment
(
int
viewId
,
android
.
app
.
Fragment
fragment
)
{
FragmentManager
fragmentManager
=
getFragmentManager
();
fragmentManager
.
beginTransaction
().
replace
(
viewId
,
fragment
).
commit
();
}
/**
* A placeholder fragment containing a settings view.
*/
@SuppressLint
(
"WorldReadableFiles"
)
public
static
class
SettingsFragment
extends
PreferenceFragment
{
@Override
public
void
onCreate
(
final
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
addPreferencesFromResource
(
R
.
xml
.
pref_setting
);
}
}
}
app/src/main/java/com/virjar/majora/adr/TheApp.java
0 → 100644
View file @
02f5bfc2
package
com
.
virjar
.
majora
.
adr
;
import
android.app.Application
;
public
class
TheApp
extends
Application
{
private
static
TheApp
theApp
;
public
static
Application
getApplication
()
{
return
theApp
;
}
@Override
public
void
onCreate
()
{
super
.
onCreate
();
theApp
=
this
;
KeepAliveService
.
startService
(
this
);
}
}
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
0 → 100644
View file @
02f5bfc2
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:aapt=
"http://schemas.android.com/aapt"
android:width=
"108dp"
android:height=
"108dp"
android:viewportHeight=
"108"
android:viewportWidth=
"108"
>
<path
android:fillType=
"evenOdd"
android:pathData=
"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor=
"#00000000"
android:strokeWidth=
"1"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:endX=
"78.5885"
android:endY=
"90.9159"
android:startX=
"48.7653"
android:startY=
"61.0927"
android:type=
"linear"
>
<item
android:color=
"#44000000"
android:offset=
"0.0"
/>
<item
android:color=
"#00000000"
android:offset=
"1.0"
/>
</gradient>
</aapt:attr>
</path>
<path
android:fillColor=
"#FFFFFF"
android:fillType=
"nonZero"
android:pathData=
"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor=
"#00000000"
android:strokeWidth=
"1"
/>
</vector>
app/src/main/res/drawable/ic_launcher_background.xml
0 → 100644
View file @
02f5bfc2
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"108dp"
android:height=
"108dp"
android:viewportHeight=
"108"
android:viewportWidth=
"108"
>
<path
android:fillColor=
"#26A69A"
android:pathData=
"M0,0h108v108h-108z"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M9,0L9,108"
android:strokeColor=
"#33FFFFFF"
android:strokeWidth=
"0.8"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M19,0L19,108"
android:strokeColor=
"#33FFFFFF"
android:strokeWidth=
"0.8"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M29,0L29,108"
android:strokeColor=
"#33FFFFFF"
android:strokeWidth=
"0.8"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M39,0L39,108"
android:strokeColor=
"#33FFFFFF"
android:strokeWidth=
"0.8"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M49,0L49,108"
android:strokeColor=
"#33FFFFFF"
android:strokeWidth=
"0.8"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M59,0L59,108"
android:strokeColor=
"#33FFFFFF"
android:strokeWidth=
"0.8"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M69,0L69,108"
android:strokeColor=
"#33FFFFFF"
android:strokeWidth=
"0.8"
/>
<path
android:fillColor=
"#00000000"
android:pathData=
"M79,0L79,108"
android:strokeColor=
"#33FFFFFF"