Add playstore assets and fix crash on some devices

This commit is contained in:
emanuele-f 2019-10-26 13:08:18 +02:00
parent dce44afe20
commit ab6083bc13
10 changed files with 10 additions and 7 deletions

View File

@ -191,13 +191,16 @@ public class MainActivity extends AppCompatActivity implements LoaderManager.Loa
PackageInfo p = packs.get(i);
if((p.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
String appName = p.applicationInfo.loadLabel(pm).toString();
Drawable icon = p.applicationInfo.loadIcon(pm);
String packages = p.applicationInfo.packageName;
int uid = p.applicationInfo.uid;
apps.add(new AppDescriptor(appName, icon, packages, uid));
Log.d("APPS", appName + " - " + packages + " [" + uid + "]");
if(!packages.equals("com.emanuelef.remote_capture")) {
String appName = p.applicationInfo.loadLabel(pm).toString();
Drawable icon = p.applicationInfo.loadIcon(pm);
int uid = p.applicationInfo.uid;
apps.add(new AppDescriptor(appName, icon, packages, uid));
Log.d("APPS", appName + " - " + packages + " [" + uid + "]");
}
}
}
return apps;

View File

@ -382,7 +382,7 @@ static void sendCaptureStats(vpnproxy_data_t *proxy) {
if(!midMethod)
__android_log_print(ANDROID_LOG_FATAL, VPN_TAG, "GetMethodID(sendCaptureStats) failed");
(*env)->CallObjectMethod(env, proxy->vpn_service, midMethod, stats->sent_bytes, stats->rcvd_bytes,
(*env)->CallVoidMethod(env, proxy->vpn_service, midMethod, stats->sent_bytes, stats->rcvd_bytes,
stats->sent_pkts, stats->rcvd_pkts);
}
@ -401,7 +401,7 @@ static void notifyServiceStatus(vpnproxy_data_t *proxy, const char *status) {
status_str = (*env)->NewStringUTF(env, status);
(*env)->CallObjectMethod(env, proxy->vpn_service, midMethod, status_str);
(*env)->CallVoidMethod(env, proxy->vpn_service, midMethod, status_str);
(*env)->DeleteLocalRef(env, status_str);
}

BIN
playstore/foreground.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB