[android-developers] Re: SecurityException in GMS 8.4.0

2016-07-19 Thread Gabor Peto
I came across the same issue today. Have you found a solution for the 
problem?

java.lang.SecurityException: Requesting code from com.google.android.gsf 
(with uid 10008) to be run in process 
com.viagogo.consumer.viagogo.playstore (with uid 10112)
   at 
android.app.ActivityThread.getPackageInfo(ActivityThread.java:1699)
   at 
android.app.ActivityThread.getPackageInfo(ActivityThread.java:1674)
   at 
android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2128)
   at 
android.app.ContextImpl.createPackageContext(ContextImpl.java:2115)
   at 
android.app.ActivityThread.installProvider(ActivityThread.java:4937)
   at 
android.app.ActivityThread.acquireProvider(ActivityThread.java:4600)
   at 
android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2439)
   at 
android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1442)
   at android.content.ContentResolver.query(ContentResolver.java:462)
   at android.content.ContentResolver.query(ContentResolver.java:422)
   at 
org.chromium.android_webview.AwDataReductionProxyManager.getProxySetting(AwDataReductionProxyManager.java:141)
   at 
org.chromium.android_webview.AwDataReductionProxyManager.isDataReductionProxyEnabled(AwDataReductionProxyManager.java:133)
   at 
org.chromium.android_webview.AwDataReductionProxyManager.access$100(AwDataReductionProxyManager.java:25)
   at 
org.chromium.android_webview.AwDataReductionProxyManager$2.run(AwDataReductionProxyManager.java:116)
   at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
   at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
   at java.lang.Thread.run(Thread.java:818)



On Monday, February 15, 2016 at 6:12:16 PM UTC, Sheng-Dean Chang wrote:
>
> Android 5.1.1; Support Library 23.1.1; GMS 8.4.0;
>
> We're seeing the following crash after upgrading to GMS 8.4.0.
>
> ```
>at java.lang.SecurityException: Requesting code from 
> com.google.android.gsf (with uid 10017) to be run in process 
> ask.me.if.you.need.more.details (with uid 10221)
>at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2294)
>at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2269)
>at 
> android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2694)
>at android.app.ContextImpl.createPackageContext(ContextImpl.java:2677)
>at android.app.ActivityThread.installProvider(ActivityThread.java:6351)
>at android.app.ActivityThread.acquireProvider(ActivityThread.java:6014)
>at 
> android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:3123)
>at 
> android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1495)
>at android.content.ContentResolver.query(ContentResolver.java:473)
>at android.content.ContentResolver.query(ContentResolver.java:433)
>at 
> org.chromium.android_webview.AwDataReductionProxyManager.getProxySetting(AwDataReductionProxyManager.java:140)
>at 
> org.chromium.android_webview.AwDataReductionProxyManager.isDataReductionProxyEnabled(AwDataReductionProxyManager.java:132)
>at 
> org.chromium.android_webview.AwDataReductionProxyManager.access$100(AwDataReductionProxyManager.java:25)
>at 
> org.chromium.android_webview.AwDataReductionProxyManager$2.run(AwDataReductionProxyManager.java:115)
>at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
>at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
>at java.lang.Thread.run(Thread.java:818)
> ```
>
> Would anyone happen to know what is the cause of this? How could one 
> circumvent the crash?
> Thanks. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/85caec03-49c4-4679-8bdb-f89f908b179f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Wifi Scanning code

2011-08-08 Thread Gabor T.
Here is my code:
package hu.wifx.droid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;
import android.view.View;
import java.util.List;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;

public class WifXActivity extends Activity {

TextView mText;
WifiManager mWifi;
ListScanResult wifiList;
StringBuilder _sb = new StringBuilder();


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Button btn1 = (Button) findViewById(R.id.btn1);
btn1.setOnClickListener(new View.OnClickListener()
{
public void onClick(View arg0)
{
// TODO Auto-generated method stub
StartTester();
}
});
}

public void StartTester()
{
//startActivity(new Intent(this, WIfiScanner.class));
IntentFilter i = new IntentFilter();
i.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);

mText = (TextView) findViewById(R.id.mainText);
mWifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
registerReceiver(new BroadcastReceiver(){
public void onReceive(Context c, Intent i) {
WifiManager w = (WifiManager)
c.getSystemService(Context.WIFI_SERVICE);
wifiList = w.getScanResults();

_sb = new StringBuilder();

for(int m = 0; m  wifiList.size(); m++)
{

_sb.append((wifiList.get(m)).toString());
_sb.append(\\n);
}

mText.setText(_sb);
}
}, i);

WifiManager WM = (WifiManager)
getSystemService(Context.WIFI_SERVICE);
WM.setWifiEnabled(true);
WM.startScan();
}
}

No errors,
but when I start the emulator and click on button1:The application has
stopped unexpectedly. 
Why?

Please help me!
Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Rotating and flipping sprites using texcoordinates issue

2010-01-20 Thread Gabor
Hi,

I'm writing a 2D game using opengl. The I have some 512x512 textures
from which I'm cutting out sprites using texcoordinates. I'm flipping
and rotating the sprites using texcoordinates. On the emulator
transformed sprites work fine but on the G1 and every other device I
tried, except for Motorola Droid, I get some lines on the side. Any
ideas?

Thanks,
Gabor
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to get back result of the Activity (setResult) in a test?

2009-09-24 Thread Gabor

Hi,

I would like to verify the result of the Activity (setResult) if it is
the expected one or not.(or maybe to check the returned bundle)

in the Activity I have the following lines:
setResult(RESULT_OK);
finish();

I would like to test this Activity. (using for example
ActivityInstrumentationTestCase)
How can I get back the result in the test?

Thanks in advance.

Gabor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: EMMA Code coverage and JUnit

2009-09-02 Thread Gabor

Hi all,

Here are the steps how to create an emma instrumented APK in SDK!!!
(emma.jar is required !!!) You don't need to use android source tree
anymore.
- compile the source code
- instrument the code with emma
- generate android byte code
- create APK
- sign it

To run the test you have to create a new platform in the SDK (with
emma integrated), so do the following:
- from the source tree you have to create an emma integrated image.
(add emma.jar to init.rc and add the emma.jar path to the build/target/
product/core.mk)
- copy the android-1.5 platform to android-1.5-emma and overwrite the
imagas in the images folder.

Have fun!

Gabor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: EMMA Code coverage and JUnit

2009-08-27 Thread Gabor

Hi Santosh,

When you are starting the emulator it is ok to stop the booting
process, because there is no emma.jar file installed on the system.
The emulator tries to find the missing file every ~5 secs. So if you
are executing the adb remount  and adb sync it will continue booting
up. (it synchronizes the image and the build system directories. Emma
jar and the requiered project(s) will be copied to it. )

One more thing:
If you would like to boot the emulator immediately, you have to add
the emma.jar into the system.img file. To do that, add the following
lines at the and of the build/target/product/core.mk file:

PRODUCT_COPY_FILES += \
out/target/common/obj/JAVA_LIBRARIES/emma_intermediates/
javalib.jar:system/framework/emma.jar\

Note: add these lines to the file before the make ... command(s)

Gabor

On Aug 26, 3:39 am, santosh kumar santosh.1...@gmail.com wrote:
 Hi All,

 I have few questions about this.. plz clarify me..

 i want to generate code coverage for apidemos only...

 first i changed init.rc then i followed every thing which is mentioned
 in gobor mail..

 one thing i am not understanding... when i start the emulator,
 emulator is getting stucked with the boot up logo,

 i have seen some other artical... we need to run runtest.py?

 is it correct?

 why emulator is getting stucked?

 Thanks
 Santosh

 On Aug 26, 2:28 am, hari uppalapati hari.andr...@gmail.com wrote:

  hi
  i was not facing any issues with emulator.Only thing was my coverage.ec file
  was empty as my sdcard is not recognised.with the following steps the issues
  was resolved.If possible post the logcat o/p and also the steps followed.
  1) edit system/core/rootdir/Android.mk so that the copy_from variable on
  line 6 contains etc/vold.conf.
  copy_from := \
      etc/dbus.conf \
      etc/vold.conf \
      etc/init.goldfish.sh \
      etc/hosts

  2)copy vold.conf from (git://
  android.git.kernel.org/platform/vendor/htc/dream-open.git) to
  system/core/rootdir/etc/
       cp vendor/htc/dream-open/vold.conf system/core/rootdir/etc.
  regards
  Haritha

  On Tue, Aug 25, 2009 at 2:40 AM, santosh kumar 
  santosh.1...@gmail.comwrote:

   Hi All,

   what changes you have been done to vold.conf?

   and i followed the steps of gobor..

   but for me also, emulator is getting stucked..

   can you plz help me..

   On Aug 25, 2:23 am, Haritha hari.andr...@gmail.com wrote:
thanks everyone for posting info on emma coverage.I was also able to
generate coverage reports for custom tests with necessary changes to
vold.conf.
regards
Haritha

On Aug 20, 6:08 am, Gabor gabor.andr...@googlemail.com wrote:

 Hi All,

 Finally, the emma code coverage measurement is working for me (for a
 custom project). So here are the steps what you need to make it work
 (I have tested it, with Java 1.5 on Ubuntu 8.04):

 mkdir android-src
 cd android-src
 repo init -u git://android.git.kernel.org/platform/manifest.git -b
 cupcake
 repo sync

 # Add emma.jar to the system/core/rootdir/init.rc
 sed 's/\/system\/framework\/core.jar:\/system\/framework\/ext.jar:/\/
 system\/framework\/core.jar:\/system\/framework\/ext.jar:\/system\/
 framework\/emma.jar:/' system/core/rootdir/init.rc  system/core/
 rootdir/init.rc.tmp
 mv system/core/rootdir/init.rc.tmp system/core/rootdir/init.rc

 # Rebuild the boot image
 make bootimage

 # To build the full system image
 make -j4

 # Set the PATH:
 export PATH=${PATH}:/_path_/android-src/out/host/linux-x86/bin/

 # Build the emma jar itself
 make emma

 # Setting the environment and additional bash commands. (like
 m,mm,mmm, choosecombo etc) Notice the space after the dot!
 . build/envsetup.sh

 # Set EMMA_INSTRUMENTATION to true
 export EMMA_INSTRUMENT=true

 # Copy your project to development/samples/_projectname_ or
 somewhere..:)
 # Based on the ApiDemo create an Android.mk file for the project
 directory and the project test directory
 # The LOCAL_INSTRUMENTATION_FOR value in test dir Android.mk has to be
 equal with the LOCAL_PACKAGE_NAME defined in the Android.mk in the
 main project dir.
 # Compile the Application would like to instrument
 mmm development/samples/_projectname_

 # Set the ANDROID_PRODUCT_OUT directory for the emulator to know the
 image location
 export ANDROID_PRODUCT_OUT=/_path_/android-src/out/target/product/
 generic

 # Start an emulator with a simulated sdcard:
 emulator -sdcard path to sdcard

 # Remount the drive - it is needed to have a writable drive. without
 that sync wont work
 adb remount

 # Synchronize the local content with the emulator
 adb sync

 adb shell
 # create directory: mkdir /etc/coverageresult

 # Executing tests
 adb shell am instrument -w -e coverage true -e coverageFile /etc/
 coverageresult/coverage.ec

[android-developers] Re: EMMA Code coverage and JUnit

2009-08-20 Thread Gabor

Hi All,

Finally, the emma code coverage measurement is working for me (for a
custom project). So here are the steps what you need to make it work
(I have tested it, with Java 1.5 on Ubuntu 8.04):

mkdir android-src
cd android-src
repo init -u git://android.git.kernel.org/platform/manifest.git -b
cupcake
repo sync

# Add emma.jar to the system/core/rootdir/init.rc
sed 's/\/system\/framework\/core.jar:\/system\/framework\/ext.jar:/\/
system\/framework\/core.jar:\/system\/framework\/ext.jar:\/system\/
framework\/emma.jar:/' system/core/rootdir/init.rc  system/core/
rootdir/init.rc.tmp
mv system/core/rootdir/init.rc.tmp system/core/rootdir/init.rc

# Rebuild the boot image
make bootimage

# To build the full system image
make -j4

# Set the PATH:
export PATH=${PATH}:/_path_/android-src/out/host/linux-x86/bin/

# Build the emma jar itself
make emma

# Setting the environment and additional bash commands. (like
m,mm,mmm, choosecombo etc) Notice the space after the dot!
. build/envsetup.sh

# Set EMMA_INSTRUMENTATION to true
export EMMA_INSTRUMENT=true

# Copy your project to development/samples/_projectname_ or
somewhere..:)
# Based on the ApiDemo create an Android.mk file for the project
directory and the project test directory
# The LOCAL_INSTRUMENTATION_FOR value in test dir Android.mk has to be
equal with the LOCAL_PACKAGE_NAME defined in the Android.mk in the
main project dir.
# Compile the Application would like to instrument
mmm development/samples/_projectname_

# Set the ANDROID_PRODUCT_OUT directory for the emulator to know the
image location
export ANDROID_PRODUCT_OUT=/_path_/android-src/out/target/product/
generic

# Start an emulator with a simulated sdcard:
emulator -sdcard path to sdcard

# Remount the drive - it is needed to have a writable drive. without
that sync wont work
adb remount

# Synchronize the local content with the emulator
adb sync

adb shell
# create directory: mkdir /etc/coverageresult

# Executing tests
adb shell am instrument -w -e coverage true -e coverageFile /etc/
coverageresult/coverage.ec hu.agsoftware.sample.tests/
android.test.InstrumentationTestRunner

# Dump a runtime coverage data file:
adb pull /etc/coverageresult/coverage.ec coverage.ec

# Generate a coverage report
java -cp external/emma/lib/emma.jar emma report -r html -in
coverage.ec -sp development/samples/_projectname_/src -in out/target/
common/obj/APPS/_projectname_intermediates/coverage.em

I hope it helps.

Gabor

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android.app.Instrumentation result bundle

2008-11-18 Thread Gabor Paller

Hi,

I play with the Instrumentation framework and I would like to return
some results from the Instrumentation instance to the activity that
launched the instrumentation by invoking startInstrumentation. I
thought that finish(int resultCode, Bundle results) in Instrumentation
class would result in the invocation of onActivityResult(int
requestCode, int resultCode, Intent data) in the activity that called
startInstrumentation but onActivityResult does not seem to be
invoked.

What do I do wrong? What do you recommend for returning results from
the Instrumentation instance?

Regards,
Gabor

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---