WifiManager::getCountryCode() - Android Q&A, Help & Troubleshooting

i'm trying to getCountryCode() on a WifiManager insance, i.e.
WifiManager wifiManager = (WifiManager) getSystemService (Context.WIFI_SERVICE);
wifiManager.getCountryCode();
Although I set compileSdkVersion to 29 the compiler cannot find getCountryCode().
error: cannot find symbol
wifiManager.getCountryCode();
^
symbol: method getCountryCode()
location: variable wifiManager of type WifiManager
This symbol should be accessible, as stated here
https://android.googlesource.com/pl...i/java/android/net/wifi/WifiManager.java#1723
Does anyone of you know, why the compiler cannot resolve getCountryCode()?
Btw: setCountryCode() can't be found either whereas getConnectionInfo() can be resolved and used.

Related

[DEV] Building with Trackball Wake/Unlock

Hi, Ive been researching about building Gingerbread, I followed the guide on the forum, I wanted to add TB Wake on my nexus one (for Oxygen 2.3.2), I got this changes:
https://github.com/CyanogenMod/andr...mmit/88c07d2fd8419a287d6ed56ad6b1aab583b63ed3
https://github.com/CyanogenMod/andr...mmit/809be3bf813258434b98c0987e38d58b28edab6c
https://github.com/CyanogenMod/andr...mmit/17a5669474c01b0e49b8e1dd65e92c9c0a68e2ca
on several files (inputManager.cpp, inputdispatcher.cpp/header, inputdispatcher_test.cpp, inputReader.cpp, Lockscreen.java, phonewindowmanager.java).
At compile time I get this error:
Code:
target Java: TelephonyProvider (out/target/common/obj/APPS/TelephonyProvider_intermediates/classes)
frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java:341: cannot find symbol
symbol : variable TRACKBALL_WAKE_SCREEN
location: class android.provider.Settings.System
Settings.System.TRACKBALL_WAKE_SCREEN), false, this);
^
frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java:711: cannot find symbol
symbol : variable TRACKBALL_WAKE_SCREEN
location: class android.provider.Settings.System
Settings.System.TRACKBALL_WAKE_SCREEN, 0) == 1);
^
frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java:1897: cannot find symbol
symbol : variable isWakeKey
location: class com.android.internal.policy.impl.PhoneWindowManager
+ " isWakeKey=" +isWakeKey);
^
frameworks/base/policy/src/com/android/internal/policy/impl/LockScreen.java:99: cannot find symbol
symbol : variable TRACKBALL_UNLOCK_SCREEN
location: class android.provider.Settings.System
Settings.System.TRACKBALL_UNLOCK_SCREEN, 0) == 1);
^
frameworks/base/policy/src/com/android/internal/policy/impl/LockScreen.java:102: cannot find symbol
symbol : variable MENU_UNLOCK_SCREEN
location: class android.provider.Settings.System
Settings.System.MENU_UNLOCK_SCREEN, 0) == 1);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
5 errors
14 warnings
make: *** [out/target/common/obj/JAVA_LIBRARIES/android.policy_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: packages/providers/TelephonyProvider/src/com/android/providers/telephony/SmsProvider.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Could you give any hint, I see a lot of posts on what files to get TB Wake/Unlock that always involve only the above files, but I'm missing something, where I could define that system settings or where can I search
Hi ertoalb
OxygeN1mod already has the trackball wake feature?! You can find it in the display settings.
Sent from my Nexus One using xda premium
Hi, yeah I've used OxygeN1mod before, but I wanted to build the rom (with modifications) by myself, the TB Wake and FM radio (wich are present on N1mod rom)

[ISSUE] CM9 compiling errors

Hi. I'm trying to compile CM9 for my Galaxy Mini, but I always get these errors:
Code:
frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java:1485: cannot find symbol
symbol : variable config_symKeyShowsImePicker
location: class com.android.internal.R.bool
if (context.getResources().getBoolean(com.android.internal.R.bool.config_symKeyShowsImePicker)) {
^
frameworks/base/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java:127: cannot find symbol
symbol : variable config_cdma_dun_supported_types
location: class com.android.internal.R.array
com.android.internal.R.array.config_cdma_dun_supported_types);
^
frameworks/base/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java:884: cannot find symbol
symbol : variable config_smsSamsungCdmaAlternateMessageIDEncoding
location: class com.android.internal.R.bool
.getBoolean(com.android.internal.R.bool.config_smsSamsungCdmaAlternateMessageIDEncoding);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar] Error 41
[email protected] ~ $
Any solutions would be appreciated. Thanks.
i guess there are more errors on top of that...you could try to provide more output...i think you missed to checkout some repositories or so
Here's some more output: http://pastebin.com/pQy9T0uU

Gallery2 build error

Need help in build. I am getting error in Gallery2 build.
Code:
packages/apps/Gallery2/src/com/android/gallery3d/app/AlbumSetPage.java:574: error: cannot find symbol
MenuItem moreItem = menu.findItem(R.id.action_more_image);
^
symbol: variable action_more_image
location: class id
packages/apps/Gallery2/src/com/android/gallery3d/app/AlbumSetPage.java:589: error: cannot find symbol
case R.id.action_more_image:
^
symbol: variable action_more_image
location: class id
http://pastebin.com/V5r9sb89
I am getting same error from last 20 days. I also tried to clear out folder.
Thanks in advance !

[DEV] CyanogenMod 13.0 development RPI2 (further work required - help needed)

READ THE WHOLE POST - THIS JUST FINISHED BUILDING
Hello all,
As there was a fair bit of interest in the cm-12.1 cyanogenmod stuff, even from myself, that seemed to be some bit of eye candy. Unfortunately no source was released thus far and not much further help to assist the rest of us so i thought I would give it a go.
Initially i thought i would look around for some other repo's thankfully Peyo-HD on github has actually done a bring up for android marshmallow (AOSP) for the device. I forked his source and set to work on doing some things for the device tree and get a build happening.
At present its seems to get pretty far, I have ran into an issue with SystemUI tests, it can safely be removed from frameworks/base. SO I forked the cyanogenmod repo and removed them.
https://github.com/Joshndroid/android_frameworks_base/tree/cm-13.0-rpi
Device tree source - https://github.com/Joshndroid/device_brcm_rpi2/tree/cm-13.0
kernel tree source - https://github.com/Joshndroid/kernel_rpi (could just use peyo-hd version as i havnt changed anything)
Essentially the only other thing that is required now is to manually remove the frameworks/base/services/telecomm folder. I doubt it should be a problem because the device does not have a modem for 3g/4g type signals.
Credits
Peyo-HD - initial marshmallow source (even though i haven’t actually attempted to build it, but alot of work had been done obviously)
Please dont just think you can plop this stuff in and expect it to work/build. The initial building is failing and from there debugging will probably need to occur once we can get it to build.
I put this up because i was keen to help out, and show the work that I have done in doing so and make it potentially easier for others to assist in getting this to work for our device.
feherneoh said:
Which manifest did you use? I would try getting it to work
Click to expand...
Click to collapse
Using this as cm source - repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
local manifests only need
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://github.com" name="gh" />
<!-- RPI2 files -->
<project name="Joshndroid/device_brcm_rpi2" path="device/brcm/rpi2" remote="gh" revision="cm-13.0" />
<project name="Joshndroid/kernel_rpi" path="kernel/rpi" remote="gh" revision="rpi2m" />
</manifest>
for kernel it is only using a prebuilt and not actually building from source at this time however am not 100% as im not getting far enough for the kernel to be pulled from the prebuilt location, i know that the kernel source is not defined within the device boardconfig.mk. It is actually listed within boardconfig.mk target_no_kernel := true
feherneoh said:
Thanks, syncing
Click to expand...
Click to collapse
No worries,
If you want to try and build the kernel inline in the boardconfig.mk delete the line
Code:
target_no_kernel := true
and add
Code:
TARGET_KERNEL_SOURCE := kernel/rpi
to the file...
i would recommend just trying to build and pass build errors then see how the kernle goes building in lines, could make it easier in the long run, but each to their own.
feherneoh said:
What lunch combo did you use?
EDIT:
I found it
I tried rpi2, but I need cm_rpi2
EDIT 2:
Got a completely different error, maybe they are currently patching these
Code:
vendor/cm/overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml:29: error: Resource at def_cm_stats_collection appears in overlay but not in the base package; use <add-resource> to add.
Click to expand...
Click to collapse
go to here - http://review.cyanogenmod.org/#/c/111336/
and cherrypick this commit into cd vendor/cm
this should fix your error, i have this in my cm-13.0 cherry-pick list. It would be the only one i have that is relevant to you
feherneoh said:
Already got that fixed
Now I have to enable kernel building because of required stuff in KERNEL_OBJ
Click to expand...
Click to collapse
The kernel should build, haven't had a chance to try myself today.
feherneoh said:
Will try it, but I work over ssh from my phone
Click to expand...
Click to collapse
I know your pain.. Tho I use team viewer to remote connect so much easier
feherneoh said:
Yeah, but I did not install X11 on my server
Which defconfig is for rpi2? I forgot that
Okay, building the kernel
Click to expand...
Click to collapse
Should be bcm2709
Alright,
So i have done some small changes and updated the device tree of cm-13.0
so it appears there need to be a different toolchain added. As outlined within the readme it specifys
# Build Kernel
$ cd kernel/rpi
$ ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2709_defconfig android/configs/android-base.cfg android/configs/android-recommended.cfg
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs
So i found the stock tool chain imported from another fellow and forked it. You will need to add this to your local_manifests.xml
Code:
<project name="Joshndroid/arm-cortex_a7-linux-gnueabihf" path="prebuilts/gcc/linux-x86/arm/arm-linux-gnueabihf-4.9.3" remote="gh" revision="gcc-4.9.3" />
the issue now is that you will get this error;
Code:
Using /home/joshndroid/cmarsh/kernel/rpi as source for kernel
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[3]: `include/generated/mach-types.h' is up to date.
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL /home/joshndroid/cmarsh/kernel/rpi/scripts/checksyscalls.sh
CHK include/generated/compile.h
LD arch/arm/net/built-in.o
/home/joshndroid/cmarsh/prebuilts/gcc/linux-x86/arm/arm-linux-gnueabihf-4.9.3/bin/arm-eabi-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
make[3]: *** [arch/arm/net/built-in.o] Error 127
make[2]: *** [arch/arm/net] Error 2
make[2]: Leaving directory `/home/joshndroid/cmarsh/out/target/product/rpi2/obj/KERNEL_OBJ'
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/joshndroid/cmarsh/kernel/rpi'
make: *** [TARGET_KERNEL_BINARIES] Error 2
just need to change the arm-eabi to arm-cortex_a7-linux-gnueabihf-
@feherneoh
so I’ve got a kernel built. (takes a while)
I worked out what the issue was. I was missing a .so that is only present in arch-linux it is essentially to do with flex, but i can't seem to find the package for it to download elsewhere so it seems that you have to manually obtain it and push it to your appropriate location ill explain as follows.
Firstly, the libfl.so.2 is referenced in this package - https://www.archlinux.org/packages/core/x86_64/flex/
I have attached a zipped copy of the lib for you to work with from the archlinux site (i followed some of this guide and used the libfl.so.2 - http://forum.xda-developers.com/nex...hells-core-kitkat-b45-stable-t2495373/page959 (i trusted it was not sketchy download).
Then do as follows
1. extract the lib to your downloads directory (assuming downloads)
Code:
sudo su
cp /home/<username>/Downloads/libfl.so.2.0.0 /usr/lib/libfl.so.2.0.0
chmod 755 /usr/lib/libfl.so.2.0.0
ln -s /usr/lib/libfl.so.2.0.0 /usr/lib/libfl.so.2
ln -s /usr/lib/libfl.so.2.0.0 /usr/lib/x86_64-linux-gnu/libfl.so.2 (<<< this is probably the most important one, this is what toolchain was complaining about)
note - in the linked xda page there is another command that i purposely did not move over because your system will already have it installed.
use this in conjunction with my previous post you should then be able to run "make bootimage" and get something usefull
See ending output here as confirmation
Code:
make[2]: Leaving directory `/home/joshndroid/cmarsh/out/target/product/rpi2/obj/KERNEL_OBJ'
make[1]: Leaving directory `/home/joshndroid/cmarsh/kernel/rpi'
mdpath=`find /home/joshndroid/cmarsh/out/target/product/rpi2/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/joshndroid/cmarsh/prebuilts/gcc/linux-x86/arm/arm-linux-gnueabihf-4.9.3/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/joshndroid/cmarsh/out/target/product/rpi2/system/lib/modules/; done; fi
mdpath=`find /home/joshndroid/cmarsh/out/target/product/rpi2/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
mdpath=`find /home/joshndroid/cmarsh/out/target/product/rpi2/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/joshndroid/cmarsh/prebuilts/gcc/linux-x86/arm/arm-linux-gnueabihf-4.9.3/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/joshndroid/cmarsh/out/target/product/rpi2/system/lib/modules/; done; fi
mdpath=`find /home/joshndroid/cmarsh/out/target/product/rpi2/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
target Prebuilt: (/home/joshndroid/cmarsh/out/target/product/rpi2/kernel)
target Strip: init (/home/joshndroid/cmarsh/out/target/product/rpi2/obj/EXECUTABLES/init_intermediates/init)
Install: /home/joshndroid/cmarsh/out/target/product/rpi2/root/init
target Strip: adbd (/home/joshndroid/cmarsh/out/target/product/rpi2/obj/EXECUTABLES/adbd_intermediates/adbd)
Install: /home/joshndroid/cmarsh/out/target/product/rpi2/root/sbin/adbd
target Strip: healthd (/home/joshndroid/cmarsh/out/target/product/rpi2/obj/EXECUTABLES/healthd_intermediates/healthd)
Install: /home/joshndroid/cmarsh/out/target/product/rpi2/root/sbin/healthd
Target ram disk: /home/joshndroid/cmarsh/out/target/product/rpi2/ramdisk.img
Target boot image: /home/joshndroid/cmarsh/out/target/product/rpi2/boot.img
Made boot image: /home/joshndroid/cmarsh/out/target/product/rpi2/boot.img
#### make completed successfully (21:24 (mm:ss)) ####
[email protected]:~/cmarsh$
I think if you got any errors with proguard for settings, you can use https://github.com/kumajaya/android...mmit/7bdeb432f50afab65f7680c9b0659371ef31af6f
You can manually delete the toolchain repos and point it to your own repo by the way in local_manifest
nick37332001 said:
I think if you got any errors with proguard for settings, you can use https://github.com/kumajaya/android...mmit/7bdeb432f50afab65f7680c9b0659371ef31af6f
You can manually delete the toolchain repos and point it to your own repo by the way in local_manifest
Click to expand...
Click to collapse
the idea is to be able to build it in line with my other devices. I dont want to have to have local_manifest modifications or keep second set of source because i changed one thing. I got it to work just like it should, in-line, with correct location finding and naming.
thanks for the commit i think that is the error i faced late last night before turning my machine off
joshndroid said:
the idea is to be able to build it in line with my other devices. I dont want to have to have local_manifest modifications or keep second set of source because i changed one thing. I got it to work just like it should, in-line, with correct location finding and naming.
thanks for the commit i think that is the error i faced late last night before turning my machine off
Click to expand...
Click to collapse
Which commit?
BTW, I pushed a new commit
And why build using Android TV?
nick37332001 said:
Which commit?
BTW, I pushed a new commit
And why build using Android TV?
Click to expand...
Click to collapse
The original repos have it listed as such. I also think it could be to do with aspects such as locks screen. I doubt you would have one for a TV that is always on. There is probably different overlay and layout to a normal device ide say
i think we may need to get brunch working.
I am getting the no rule to make target 'bacon.' stop
the reason i say this is because with the lunch command i think some of the cmsdk stuff is not being pulled across. I had the same issue with angler (Nexus 6p) in which i would get a keyguard.java error. I was using lunch command while seeing this error, much like i have been doing for rpi2. Once i was able to use brunch command, I was then able to get past this keyguard.java error and the build continued. Same thing has been happening with the rpi2 build. I just unsure of how to get the brunch command working. What i think is happening is the brunch command is allowing other cm-related aspects to continue to be pulled into the build config
edit; disregard. looking further into it the bacon refers to the flashable zip creation, for which we have no need for.
joshndroid said:
i think we may need to get brunch working.
I am getting the no rule to make target 'bacon.' stop
the reason i say this is because with the lunch command i think some of the cmsdk stuff is not being pulled across. I had the same issue with angler (Nexus 6p) in which i would get a keyguard.java error. I was using lunch command while seeing this error, much like i have been doing for rpi2. Once i was able to use brunch command, I was then able to get past this keyguard.java error and the build continued. Same thing has been happening with the rpi2 build. I just unsure of how to get the brunch command working. What i think is happening is the brunch command is allowing other cm-related aspects to continue to be pulled into the build config
edit; disregard. looking further into it the bacon refers to the flashable zip creation, for which we have no need for.
Click to expand...
Click to collapse
But then we can make recovery.img XDXD
nick37332001 said:
But then we can make recovery.img XDXD
Click to expand...
Click to collapse
Recovery is listed as not to be built in the boardconfig.mk
Think we will need to either come up with a way to disable lock screen all together or fix through the broken tests in cyanogenmod that seem to surround lock screen.. I tried reverting a few things to do with the lock screen within android_packages_apps_settings but as I reverted some things more errors just kept cropping up so I don't necessarily think that is going to fix our issue. Unsure of what another way may be
Sent from my Nexus 9 using Tapatalk
feherneoh said:
We should really wait until CM13 nightlies start appearing for officially supported devices
Click to expand...
Click to collapse
Nighties are poised to start very soon
As nightlies have started for some devices i thought i would try again.
I utilised the CM frameworks base and have run into an issue with systemUI tests in frameworks/base
http://pastebin.com/3f86nDwe
Code:
target SharedLib: libpac (/media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/obj/SHARED_LIBRARIES/libpac_intermediates/LINKED/libpac.so)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
target SharedLib: libttspico (/media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/obj/SHARED_LIBRARIES/libttspico_intermediates/LINKED/libttspico.so)
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:32: error: package android.support.v4.view does not exist
import android.support.v4.view.PagerAdapter;
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:33: error: package android.support.v4.view does not exist
import android.support.v4.view.ViewPager;
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/statusbar/KeyguardAffordanceView.java:34: error: package android.support.v7.graphics does not exist
import android.support.v7.graphics.Palette;
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/statusbar/KeyguardAffordanceView.java:52: error: package Palette does not exist
public class KeyguardAffordanceView extends ImageView implements Palette.PaletteAsyncListener {
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:6: error: package android.support.v4.view does not exist
import android.support.v4.view.ViewPager;
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:15: error: cannot find symbol
public class QSViewPager extends ViewPager {
^
symbol: class ViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:71: error: cannot find symbol
protected PagerAdapter mPagerAdapter;
^
symbol: class PagerAdapter
location: class QSDragPanel
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/statusbar/KeyguardAffordanceView.java:606: error: cannot find symbol
public void onGenerated(Palette palette) {
^
symbol: class Palette
location: class KeyguardAffordanceView
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/tuner/QsTuner.java:34: error: package android.support.v4.view does not exist
import android.support.v4.view.ViewPager;
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:124: error: no suitable method found for addView(QSViewPager)
addView(mViewPager);
^
method ViewGroup.addView(View,int,LayoutParams) is not applicable
(actual and formal argument lists differ in length)
method ViewGroup.addView(View,LayoutParams) is not applicable
(actual and formal argument lists differ in length)
method ViewGroup.addView(View,int,int) is not applicable
(actual and formal argument lists differ in length)
method ViewGroup.addView(View,int) is not applicable
(actual and formal argument lists differ in length)
method ViewGroup.addView(View) is not applicable
(actual argument QSViewPager cannot be converted to View by method invocation conversion)
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:142: error: cannot find symbol
mPagerAdapter = new PagerAdapter() {
^
symbol: class PagerAdapter
location: class QSDragPanel
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:181: error: package ViewPager does not exist
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:214: error: cannot find symbol
mViewPager.setCurrentItem(0);
^
symbol: method setCurrentItem(int)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:219: error: cannot find symbol
mViewPager.setOnDragListener(this);
^
symbol: method setOnDragListener(QSDragPanel)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:478: error: cannot find symbol
mViewPager.measure(exactly(width), MeasureSpec.UNSPECIFIED);
^
symbol: method measure(int,int)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:480: error: cannot find symbol
int h = brightnessHeight + mViewPager.getMeasuredHeight();
^
symbol: method getMeasuredHeight()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:513: error: cannot find symbol
final int dh = Math.max(mDetail.getMeasuredHeight(), mViewPager.getMeasuredHeight());
^
symbol: method getMeasuredHeight()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:514: error: cannot find symbol
mViewPager.layout(0, t + mQsPanelTop.getMeasuredHeight(), w, t + dh);
^
symbol: method layout(int,int,int,int)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:601: error: cannot find symbol
return mPages.get(mViewPager.getCurrentItem());
^
symbol: method getCurrentItem()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:649: error: cannot find symbol
&& !mViewPager.isFakeDragging()
^
symbol: method isFakeDragging()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:716: error: cannot find symbol
&& !mViewPager.isFakeDragging()
^
symbol: method isFakeDragging()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:737: error: cannot find symbol
if (mCurrentlyAnimating.isEmpty() && !mViewPager.isFakeDragging()) {
^
symbol: method isFakeDragging()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:738: error: bad operand types for binary operator '=='
if (v == mViewPager) {
^
first type: View
second type: QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:741: error: cannot find symbol
int width = mViewPager.getWidth();
^
symbol: method getWidth()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:744: error: cannot find symbol
if (mViewPager.canScrollHorizontally(-1)) {
^
symbol: method canScrollHorizontally(int)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:749: error: cannot find symbol
if (mViewPager.canScrollHorizontally(1)) {
^
symbol: method canScrollHorizontally(int)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:828: error: cannot find symbol
mLastTouchLocationY += mViewPager.getTop(); // we are in the threshold of the viewpager meow
^
symbol: method getTop()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:857: error: cannot find symbol
if (mDraggingRecord.destinationPage > mViewPager.getCurrentItem()) {
^
symbol: method getCurrentItem()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:859: error: cannot find symbol
} else if (mDraggingRecord.destinationPage < mViewPager.getCurrentItem()) {
^
symbol: method getCurrentItem()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:864: error: cannot find symbol
float destinationY = mDraggingRecord.destination.y + mViewPager.getTop();
^
symbol: method getTop()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:879: error: cannot find symbol
mViewPager.requestDisallowInterceptTouchEvent(false);
^
symbol: method requestDisallowInterceptTouchEvent(boolean)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:993: error: cannot find symbol
mViewPager.requestDisallowInterceptTouchEvent(true);
^
symbol: method requestDisallowInterceptTouchEvent(boolean)
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSDragPanel.java:1064: error: cannot find symbol
mViewPager.getAdapter().notifyDataSetChanged();
^
symbol: method getAdapter()
location: variable mViewPager of type QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/statusbar/KeyguardAffordanceView.java:179: error: cannot find symbol
Palette.generateAsync(((BitmapDrawable) getDrawable()).getBitmap(), this);
^
symbol: variable Palette
location: class KeyguardAffordanceView
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/statusbar/KeyguardAffordanceView.java:605: error: method does not override or implement a method from a supertype
@Override
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:29: error: cannot find symbol
for (int i = 0; i < getChildCount(); i++) {
^
symbol: method getChildCount()
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:30: error: cannot find symbol
View child = getChildAt(i);
^
symbol: method getChildAt(int)
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:31: error: cannot find symbol
child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
^
symbol: variable MeasureSpec
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:31: error: cannot find symbol
child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
^
symbol: variable MeasureSpec
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:35: error: cannot find symbol
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
^
symbol: variable MeasureSpec
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:35: error: cannot find symbol
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
^
symbol: variable MeasureSpec
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:36: error: cannot find symbol
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
^
symbol: variable super
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:26: error: method does not override or implement a method from a supertype
@Override
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:40: error: cannot find symbol
ValueAnimator animator = ValueAnimator.ofInt(0, getWidth());
^
symbol: method getWidth()
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:48: error: cannot find symbol
if (isFakeDragging()) {
^
symbol: method isFakeDragging()
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:49: error: cannot find symbol
endFakeDrag();
^
symbol: method endFakeDrag()
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:55: error: cannot find symbol
if (isFakeDragging()) {
^
symbol: method isFakeDragging()
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:56: error: cannot find symbol
endFakeDrag();
^
symbol: method endFakeDrag()
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:72: error: cannot find symbol
if (isFakeDragging()) {
^
symbol: method isFakeDragging()
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:76: error: cannot find symbol
fakeDragBy(dragOffset * (forward ? -1 : 1));
^
symbol: method fakeDragBy(int)
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:80: error: cannot find symbol
if (beginFakeDrag()) {
^
symbol: method beginFakeDrag()
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:91: error: cannot find symbol
return super.onInterceptTouchEvent(event);
^
symbol: variable super
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:88: error: method does not override or implement a method from a supertype
@Override
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:99: error: cannot find symbol
return super.onTouchEvent(event);
^
symbol: variable super
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:96: error: method does not override or implement a method from a supertype
@Override
^
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:108: error: cannot find symbol
if (getCurrentItem() > 0 && !mPagingEnabled) {
^
symbol: method getCurrentItem()
location: class QSViewPager
frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/qs/QSViewPager.java:110: error: cannot find symbol
setCurrentItem(0, true);
^
symbol: method setCurrentItem(int,boolean)
location: class QSViewPager
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
57 errors
make: *** [/media/joshndroid/ubuntufiles/cmrpi/out/target/common/obj/APPS/SystemUITests_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
DroidDoc took 18 sec. to write docs to /media/joshndroid/ubuntufiles/cmrpi/out/target/common/docs/system-api-stubs
DroidDoc took 17 sec. to write docs to /media/joshndroid/ubuntufiles/cmrpi/out/target/common/docs/api-stubs
make: Leaving directory `/media/joshndroid/ubuntufiles/cmrpi'
#### make failed to build some targets (07:57 (mm:ss)) ####
I wonder if there is a way to disable tests completely or atleast the tests that will be unnecessary
So ive had a bit of success today and managed to get a build completed. Note that it was not from a clean /out folder but it completed none the less
Code:
mdpath=`find /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
mdpath=`find /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /media/joshndroid/ubuntufiles/cmrpi/prebuilts/gcc/linux-x86/arm/arm-linux-gnueabihf-4.9.3/bin/arm-eabi-strip --strip-unneeded $i; mv $i /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system/lib/modules/; done; fi
mdpath=`find /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
make_ext4fs -T -1 -S /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/root/file_contexts -L system -l 536870912 -a system /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/obj/PACKAGING/systemimage_intermediates/system.img /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system
Creating filesystem with parameters:
Size: 536870912
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 2048
Label: system
Blocks: 131072
Block groups: 4
Reserved block group size: 31
Created filesystem with 3171/32768 inodes and 91696/131072 blocks
Install system fs image: /media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system.img
/media/joshndroid/ubuntufiles/cmrpi/out/target/product/rpi2/system.img+ maxsize=548110464 blocksize=4224 total=536870912 reserve=5537664
make: Leaving directory `/media/joshndroid/ubuntufiles/cmrpi'
#### make completed successfully (01:32 (mm:ss)) ####
[email protected]:/media/joshndroid/ubuntufiles/cmrpi$
EDIT - i have not pushed some things, but i had to disable tests in frameworks/base for systemui as well as remove telecomm package by deleting it (maybe we can disable it some other way). I'm going to push my changes and update first post to further signify build

Compile errors when building Cornerstone v4.3_r2.2

I'm trying to build this on my device, but I have some problems during the building process. First of all, I synced the AOSP 4.3_r2.2 source tree. Then I copied the entire cornerstone codes (from branch v4.3_r2.2) into the source tree. Then I start to build.
First, I got a lot of errors like these:
Code:
frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:920: error: Symbol 'ic_suggestions_delete' declared with <java-symbol> not defined
...
After compared a lot, I found lots of missing symbols seems only in public.xml. If I were right, I think these symbols should be defined in somewhere else, then be added into public.xml. So I just removed these by restore the public.xml to unmodified (git checkout).
And then when I ran building again, I got the error like this:
Code:
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:57: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:54: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
frameworks/base/services/java/com/android/server/wm/DimSurface.java:48: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimSurface.java:45: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
By looked into the AOSP source, I found the Surface.FX_SURFACE_DIM should be SurfaceControl.FX_SURFACE_DIM, and the WindowStateAnimator.SurfaceTrace constructor's parameter number is different. So I wonder whether am I use the "right" source tree of AOSP? If not, which version should I sync? Since there are so many differences than the codes in cornerstone.
Thanks.
popoalex said:
I'm trying to build this on my device, but I have some problems during the building process. First of all, I synced the AOSP 4.3_r2.2 source tree. Then I copied the entire cornerstone codes (from branch v4.3_r2.2) into the source tree. Then I start to build.
First, I got a lot of errors like these:
Code:
frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:920: error: Symbol 'ic_suggestions_delete' declared with <java-symbol> not defined
...
After compared a lot, I found lots of missing symbols seems only in public.xml. If I were right, I think these symbols should be defined in somewhere else, then be added into public.xml. So I just removed these by restore the public.xml to unmodified (git checkout).
And then when I ran building again, I got the error like this:
Code:
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:57: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:54: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
frameworks/base/services/java/com/android/server/wm/DimSurface.java:48: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimSurface.java:45: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
By looked into the AOSP source, I found the Surface.FX_SURFACE_DIM should be SurfaceControl.FX_SURFACE_DIM, and the WindowStateAnimator.SurfaceTrace constructor's parameter number is different. So I wonder whether am I use the "right" source tree of AOSP? If not, which version should I sync? Since there are so many differences than the codes in cornerstone.
Thanks.
Click to expand...
Click to collapse
Finally resolved the problem, by did these:
1. Removed the symbol definition from public.xml;
2. Replaced android.view.Surface with android.view.SurfaceControl, and WindowManagerService.DEFAULT_DIM_DURATION with WindowAnimator.DEFAULT_DIM_DURATION.

Categories

Resources