about late resume, when PowerManagerService write on to /sys/power/state to call late resume

by Dianne Hackborn » Wed, 21 Apr 2010 06:47:43 GMT


Sponsored Links
 



Sorry, that isn't true.  If the process running the VM has permission to
access the file, then the Java code can access it.  Android doesn't use the
VM to enforce this (or most) kinds of security.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--



Other Threads

1. Can a native application use java methods in TelephonyManager using getSystemService()

Hi
   I am currently working on porting a application written in C in
android platform. I need to know that can i invoke/call the
getSystemService from the C application using invocaton interface by
JNI.

Meaning using a .java file which will interact with the interace
provided by the android.telephony.TelephonyManager.java for using
getCallState() and other mehthods.

I want to know if this is feasible?

Thanks for your time.


--~--~---------~--~----~------------~-------~--~----~

2. How to use CheckBox as children in ExpandableList?

I would like to have expandable text categories which reveal children
that are checkable entries.
I've used the "simple_list_item_multiple_choice" layout for the
childLayout argument of SimpleExpandableListAdapter.

The activity shows up correctly, but when a child item is clicked, the
check box will not toggle.

I haven taken code from List11.java and ExpandableList3.java from the
ApiDemos project.

====================================================
package com.kostmo.android.test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.app.ExpandableListActivity;
import android.os.Bundle;
import android.widget.ExpandableListAdapter;
import android.widget.ListView;
import android.widget.SimpleExpandableListAdapter;


public class ExpandableFeatureSelector extends ExpandableListActivity
{
    private static final String NAME = "NAME";

    private ExpandableListAdapter mAdapter;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        List<Map<String, String>> groupData = new
ArrayList<Map<String, String>>();
        List<List<Map<String, String>>> childData = new
ArrayList<List<Map<String, String>>>();

        for (String database_name : AvailableCategories) {
            Map<String, String> curGroupMap = new HashMap<String,
String>();
            groupData.add(curGroupMap);
            curGroupMap.put(NAME, database_name);

            List<Map<String, String>> children = new
ArrayList<Map<String, String>>();
            for (String download_option : AvailableFeatures) {
                Map<String, String> curChildMap = new HashMap<String,
String>();
                children.add(curChildMap);
                curChildMap.put(NAME, download_option);
            }
            childData.add(children);
        }

        mAdapter = new SimpleExpandableListAdapter(
                this,
                groupData,
                android.R.layout.simple_expandable_list_item_1,
                new String[] { NAME },
                new int[] { android.R.id.text1 },
                childData,
                android.R.layout.simple_list_item_multiple_choice,
                new String[] { NAME },
                new int[] { android.R.id.text1 }
                );
        setListAdapter(mAdapter);


        final ListView listView = getExpandableListView();
        listView.setItemsCanFocus(false);
        listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
    }

    private static final String[] AvailableCategories = new String[] {
        "Books", "Clothes", "Cars"
    };

    private static final String[] AvailableFeatures = new String[] {
        "Damaged", "Used"
    };
}

====================================================
--~--~---------~--~----~------------~-------~--~----~

3. Android SDK 1.6 and ADC2

4. Help me with the Great Android Developer Survey- win prizes

5. Can you use the BSD licenses as your app's EULA ?

6. How can I get an instance of the WebViewClient for the Browser application?

7. after launch Gallery, file pushed to sdcard has length 0