File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
java/com/zfdang/touchhelper Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 4343 android : name =" .TouchHelperServiceReceiver"
4444 android : enabled =" true"
4545 android : exported =" true" >
46- <intent-filter >
46+ <intent-filter android : priority = " 90000 " >
4747 <action android : name =" android.intent.action.PACKAGE_ADDED" />
4848 <action android : name =" android.intent.action.PACKAGE_REMOVED" />
49- <!-- <action android:name="android.intent.action.USER_PRESENT" /> -- >
49+ <action android : name =" android.intent.action.USER_PRESENT" />
5050<!-- <action android:name="android.intent.action.SCREEN_ON" />-->
5151 <data android : scheme =" package" />
5252 </intent-filter >
Original file line number Diff line number Diff line change @@ -151,12 +151,12 @@ public void onInterrupt(){
151151 private void InstallReceiverAndHandler () {
152152 // install broadcast receiver for package add / remove; device unlock
153153 installReceiver = new TouchHelperServiceReceiver ();
154- IntentFilter filter_install = new IntentFilter ();
155- filter_install .addAction (Intent .ACTION_PACKAGE_ADDED );
156- filter_install .addAction (Intent .ACTION_PACKAGE_REMOVED );
157- filter_install .addAction (Intent .ACTION_USER_PRESENT );
158- filter_install .addDataScheme ("package" );
159- service .registerReceiver (installReceiver , filter_install );
154+ IntentFilter actions = new IntentFilter ();
155+ actions .addAction (Intent .ACTION_PACKAGE_ADDED );
156+ actions .addAction (Intent .ACTION_PACKAGE_REMOVED );
157+ actions .addAction (Intent .ACTION_USER_PRESENT );
158+ actions .addDataScheme ("package" );
159+ service .registerReceiver (installReceiver , actions );
160160
161161 // install handler to handle broadcast messages
162162 receiverHandler = new Handler (new Handler .Callback () {
You can’t perform that action at this time.
0 commit comments