[android-developers] The conflict between ActionBar's overflow menu and the common layout ImageButton

2013-07-19 Thread chenyu xu


Our project is on android ics 4.04, everything is normal except the device 
without hardware menu key. In dialpad interface(DialpadFragment), in the 
case of without hardware menu key, there is small three dots button show 
in the right-lower corner, but the dial button which located the some 
horizontal line is malfunction.

What I have tried:

   1. Hide the ActionBar, it's cool that the dial button is okay, but I 
   can't fix it like that.
   2. Using java reflect trick to set ViewConfiguration's 
   sHasPermanentMenuKey as true. It also work, but other tab can't show 
   overflow menu. That's also not the final solution.

I have seen that lots of devices without hard key is okay for this issue, I 
want to know how to solve it? Anyone could help me? Thanks very much!

-- 
-- 
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
--- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] How do I analysis native crash log

2012-02-02 Thread chenyu xu
I have got a crash log, I can locate the source of call stack like
below:

01-19 17:48:56.580 I/DEBUG   (  683):  #00  pc 00011dee  /
system/lib/libc.so
01-19 17:48:56.580 I/DEBUG   (  683):  #01  pc be1c  /
system/lib/libc.so

I use addr2line to identify that it was memory operating error:

_libc_android_abort
dlfree

But I dont't know who invoke dlfree function, I can see some
informations after the keyowrd stack:

01-19 17:48:56.590 I/DEBUG   (  683): stack:
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcb0  0718
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcb4  afd1455b  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcb8  afd405a0  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcbc  afd4054c  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcc0  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcc4  afd154e1  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcc8  0071
01-19 17:48:56.590 I/DEBUG   (  683): 100ffccc  afd1452d  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcd0  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcd4  afd40328  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcd8  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcdc  1728
01-19 17:48:56.590 I/DEBUG   (  683): 100ffce0  
01-19 17:48:56.590 I/DEBUG   (  683): 100ffce4  afd147cb  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffce8  df002777
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcec  e3a070ad
01-19 17:48:56.590 I/DEBUG   (  683): #00 100ffcf0  b4e8  [heap]
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcf4  c000
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcf8  afd418dc  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffcfc  afd10538  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd00  afd40328  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd04  fbdf
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd08  afd40328  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd0c  afd41724  /system/
lib/libc.so
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd10  b000  [heap]
01-19 17:48:56.590 I/DEBUG   (  683): 100ffd14  afd0be21  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): #01 100ffd18  afd40328  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd1c  afd0be21  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd20  0002
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd24  b4ee  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd28  c574  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd2c  b4e8  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd30  c574  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd34  0006
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd38  13fc
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd3c  af9059ff  /system/
lib/libcutils.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd40  b4e8  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd44  800056b5  /system/
lib/libaugusta-ril.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd48  100ffd6c
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd4c  b438  [heap]
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd50  ae6089bc  /system/
lib/libril.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd54  afd0cd81  /system/
lib/libc.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd58  800056b5  /system/
lib/libaugusta-ril.so
01-19 17:48:56.600 I/DEBUG   (  683): 100ffd5c  ae6042a3  /system/
lib/libril.so

I think it will be helpful to locate the problem, I don't know how to
use these data? Any one can tell me
how to calculate the location of call stack? Thanks very much!

-- 
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] About Contacts sorting problem

2011-12-26 Thread chenyu xu
Hello All:
 My company's tester report a bug that the user create a new
contact item whose 1st name is in Chinese , last name is in English,
for example:

First Name: 元璋
Last Name: Zhu.

Then this item is sorted outside the A-Z order, after the Z group( in
the case of sorting by first name). This item
should be in Y group. (元璋--yuanzhang).

After my investigation of source code, I find that I can't do nothing
in java code, including ContactProvider.apk and framework. I guess the
real sorting procedure is in SQLite native code. But I am confusing in
so many source code.
Some people could tell me how can I fix this bug? Please give me a
hint! Thanks very much!

Sincerely

-- 
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] Can I use some interfaces in framework?

2011-12-14 Thread chenyu xu
For example:
 I want to get the SIM card contacts storage information in Contacts
app, I used IccPhoneBook interface like this below:

   try {
IIccPhoneBook iccIpb = IIccPhoneBook.Stub.asInterface(
ServiceManager.getService(simphonebook));
if (iccIpb != null) {
 int size[] =
iccIpb.getAdnRecordsSize(IccConstants.EF_ADN);
}
} catch (RemoteException ex) {
// ignore it
}

What do you think of this solution? Someone told me that's bad
solution. Is there a better solution? Thanks very much!

-- 
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] About SIM card storage information

2011-12-08 Thread chenyu xu
I want to get the storage information about SIM card in Contacts app,

For example, show a dialog indicate that how many contacts has been used
and how many contacts does
the SIM card can storage.

I found that in framework, the function loadFromEF in IccProvider.java,
can get the capacity of the SIM card's
contacts, but I found that it is hard to use ContentProvider to get this
information. I want to find a perfect solution to implement
this feature, not destroy the beauty of Android's architecture. Anyone
could help me? Thanks very much.

Sincerely
Alexunder

-- 
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] About VCardComoser

2011-12-01 Thread chenyu xu
Hi All:

I am reading and debuging Contacts source code now. But I am
very confusing about ExportVCardActivity.java,
In ActualExportThread class, I can't see anything about the contacts'
data related to the VCardComoser object,
how do they combined the contacts' data and VCardComoser object? I
want to implement a filter that can filter
the contacts' data depend on some conditions, what should I do? Thanks
very much if someone could help me!


source code:
  VCardComposer composer = null;
try {
OutputStream outputStream = null;
try {
outputStream = new
FileOutputStream(mExportingFileName);
} catch (FileNotFoundException e) {
final String errorReason =
 
getString(R.string.fail_reason_could_not_open_file,
mExportingFileName, e.getMessage());
shouldCallFinish = false;
mHandler.post(new
ErrorReasonDisplayer(errorReason));
return;
}

// composer = new
VCardComposer(ExportVCardActivity.this, mVCardTypeStr, true);
int vcardType = VCardConfig.VCARD_TYPE_V30_GENERIC;
composer = new VCardComposer(ExportVCardActivity.this,
vcardType, true);

composer.addHandler(composer.new
HandlerForOutputStream(outputStream));

if (!composer.init()) {
final String errorReason =
composer.getErrorReason();
Log.e(LOG_TAG, initialization of vCard composer
failed:  + errorReason);
final String translatedErrorReason =
translateComposerError(errorReason);
mHandler.post(new ErrorReasonDisplayer(
 
getString(R.string.fail_reason_could_not_initialize_exporter,
translatedErrorReason)));
shouldCallFinish = false;
return;
}

int size = composer.getCount();

if (size == 0) {
mHandler.post(new ErrorReasonDisplayer(
 
getString(R.string.fail_reason_no_exportable_contact)));
shouldCallFinish = false;
return;
}

mProgressDialog.setProgressNumberFormat(
 
getString(R.string.exporting_contact_list_progress));
mProgressDialog.setMax(size);
mProgressDialog.setProgress(0);

while (!composer.isAfterLast()) {

-- 
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