Skip to content

Commit

Permalink
fixed persistentEnable = false , start :GuardService bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
247321453 committed Apr 15, 2019
1 parent 47772a0 commit b038c85
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,13 @@ static final IBinder proxyFetchHostPref(Context context) {
private static final IBinder proxyFetchHostBinder(Context context, String selection) {
//
Cursor cursor = null;
Uri uri;
if (HostConfigHelper.PERSISTENT_ENABLE) {
uri = ProcessPitProviderPersist.URI;
} else {
uri = ProcessPitProviderUI.buildUri(IPluginManager.PROCESS_UI);
}
try {
Uri uri = ProcessPitProviderPersist.URI;
cursor = context.getContentResolver().query(uri, PROJECTION_MAIN, selection, null, null);
if (cursor == null) {
if (LOG) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,23 @@

package com.qihoo360.replugin.component.process;

import android.database.Cursor;
import android.net.Uri;

import com.qihoo360.loader2.PluginProviderStub;
import com.qihoo360.replugin.helper.HostConfigHelper;

/**
* @author RePlugin Team
*/
public class ProcessPitProviderUI extends ProcessPitProviderBase {


@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
if (HostConfigHelper.PERSISTENT_ENABLE) {
return super.query(uri, projection, selection, selectionArgs, sortOrder);
}
return PluginProviderStub.stubMain(uri, projection, selection, selectionArgs, sortOrder);
}

}

0 comments on commit b038c85

Please sign in to comment.