Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7431b771
authored
Mar 17, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
迁移MainActivity的包名,保证能从旧应用升级到重构版应用(守护服务安装完毕后会通过MainActivity的包名来启动主应用)
parent
3c5f689c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
5 deletions
+9
-5
app/src/main/AndroidManifest.xml
+1
-1
app/src/main/assets/Daemon.apk
+0
-0
app/src/main/java/com/bgycc/smartcanteen/activity/MainActivity.java
+4
-1
app/src/main/java/com/bgycc/smartcanteen/broadcast/BootBroadcast.java
+2
-1
app/src/main/java/com/bgycc/smartcanteen/utils/InstallManager.java
+1
-1
daemon/src/main/java/com/bgycc/smartcanteen/daemon/DaemonService.java
+1
-1
No files found.
app/src/main/AndroidManifest.xml
View file @
7431b771
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:name=
".RootApp"
android:name=
".RootApp"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".MainActivity"
<activity
android:name=
".
activity.
MainActivity"
android:launchMode=
"singleInstance"
android:launchMode=
"singleInstance"
android:screenOrientation=
"landscape"
>
android:screenOrientation=
"landscape"
>
<intent-filter>
<intent-filter>
...
...
app/src/main/assets/Daemon.apk
0 → 100644
View file @
7431b771
File added
app/src/main/java/com/bgycc/smartcanteen/MainActivity.java
→
app/src/main/java/com/bgycc/smartcanteen/
activity/
MainActivity.java
View file @
7431b771
package
com
.
bgycc
.
smartcanteen
;
package
com
.
bgycc
.
smartcanteen
.
activity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.lifecycle.ViewModelProvider
;
import
androidx.lifecycle.ViewModelProvider
;
...
@@ -21,6 +21,9 @@ import android.widget.ImageView;
...
@@ -21,6 +21,9 @@ import android.widget.ImageView;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.bgycc.smartcanteen.BuildConfig
;
import
com.bgycc.smartcanteen.Injection
;
import
com.bgycc.smartcanteen.R
;
import
com.bgycc.smartcanteen.entity.PayData
;
import
com.bgycc.smartcanteen.entity.PayData
;
import
com.bgycc.smartcanteen.executor.SCTaskExecutor
;
import
com.bgycc.smartcanteen.executor.SCTaskExecutor
;
import
com.bgycc.smartcanteen.socket.SCWebSocketClient
;
import
com.bgycc.smartcanteen.socket.SCWebSocketClient
;
...
...
app/src/main/java/com/bgycc/smartcanteen/broadcast/BootBroadcast.java
View file @
7431b771
...
@@ -5,8 +5,9 @@ import android.content.BroadcastReceiver;
...
@@ -5,8 +5,9 @@ import android.content.BroadcastReceiver;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
com.bgycc.smartcanteen.MainActivity
;
import
com.bgycc.smartcanteen.
activity.
MainActivity
;
// 开机广播,保证设备启动后应用能被主动唤起
public
class
BootBroadcast
extends
BroadcastReceiver
{
public
class
BootBroadcast
extends
BroadcastReceiver
{
@SuppressLint
(
"UnsafeProtectedBroadcastReceiver"
)
@SuppressLint
(
"UnsafeProtectedBroadcastReceiver"
)
@Override
@Override
...
...
app/src/main/java/com/bgycc/smartcanteen/utils/InstallManager.java
View file @
7431b771
...
@@ -5,7 +5,7 @@ import android.content.Intent;
...
@@ -5,7 +5,7 @@ import android.content.Intent;
import
android.os.Build
;
import
android.os.Build
;
import
com.bgycc.smartcanteen.BuildConfig
;
import
com.bgycc.smartcanteen.BuildConfig
;
import
com.bgycc.smartcanteen.MainActivity
;
import
com.bgycc.smartcanteen.
activity.
MainActivity
;
import
com.blankj.utilcode.util.AppUtils
;
import
com.blankj.utilcode.util.AppUtils
;
import
com.blankj.utilcode.util.FileUtils
;
import
com.blankj.utilcode.util.FileUtils
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.LogUtils
;
...
...
daemon/src/main/java/com/bgycc/smartcanteen/daemon/DaemonService.java
View file @
7431b771
...
@@ -22,7 +22,7 @@ public class DaemonService extends Service {
...
@@ -22,7 +22,7 @@ public class DaemonService extends Service {
// 主应用package name
// 主应用package name
private
static
final
String
MAIN_PACKAGE_NAME
=
"com.bgycc.smartcanteen"
;
private
static
final
String
MAIN_PACKAGE_NAME
=
"com.bgycc.smartcanteen"
;
// 主应用类名称
// 主应用类名称
private
static
final
String
MAIN_ACTIVITY_NAME
=
"com.bgycc.smartcanteen.MainActivity"
;
private
static
final
String
MAIN_ACTIVITY_NAME
=
"com.bgycc.smartcanteen.
activity.
MainActivity"
;
@Override
@Override
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
...
...
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