android-framework

What are the list of android specific exceptions?

跟風遠走 提交于 2019-12-07 10:12:45
问题 I know some of exceptions are thrown by Android framework. Like ActivityNotFoundException , WindowManager.BadTokenException . But i am not aware of all other exceptions which are specific to android framework. Can anybody list possible android framework specific exceptions with a small description. Or suggest me blogs information which contains the required information. Thanks in advance. 回答1: http://developer.android.com/reference/java/lang/Exception.html I think here you can find it, "Known

Android Studio - “Android framework is detected in the project”

荒凉一梦 提交于 2019-12-07 02:03:59
问题 I am using Android Studio for development (I/O Preview 0.2.3) and have used AS since I started my current project. Every time I open the project I get the Frameworks detected: Android framework is detected in the project Configure message in the event log. I can click Configure and it sorts things out straight away but its happens every time I open the project. Its not really causing any issues, more of an annoyance than anything. Is there anyway of making AS remember that this is an Android

Is it beneficial to keep a member reference to system services in Android?

拟墨画扇 提交于 2019-12-05 23:02:49
Suppose I have an android Activity / Service that is using system services such as PowerManager, WifiManager, etc... Is it beneficial to have private members for keeping reference to those services once in the constructor or onCreate method instead of getting those service managers each and every time they are needed by calling getSystemService(...)`? If so, are those members safe to use in case one of those system services crash and restart? If they aren't safe, what is the right approach for handling such cases of service death? s it beneficial to have private members for keeping reference

How to register a OMX core for adding a new decoder

佐手、 提交于 2019-12-04 01:52:50
问题 I'm referring to the post: Android: How to integrate a decoder to multimedia framework Following it i have registered my new decoder (Which is currently not supported by Android) in media_codecs.xml . The Step 2 of the above post requires me to perform OMX core registration . However, Since i'm really new to this topic, i'm not able to follow the step 2. I have the working code of the decoder in C and is already ported to android. So i request if anybody can provide information on: A step-by

What is “android:” prefix mean in android framework-res module

江枫思渺然 提交于 2019-12-03 13:34:54
问题 I copy the this code from the styles.xml file in framework-res module <style name="Theme"> <item name="colorForeground">@android:color/bright_foreground_dark</item> <item name="colorForegroundInverse">@android:color/bright_foreground_dark_inverse</item> <item name="colorBackground">@android:color/background_dark</item> . <style name="Theme.Black"> <item name="android:windowBackground">@android:color/black</item> <item name="android:colorBackground">@android:color/black</item> </style> As you

Disabling SELinux in Android 5.0.1

你说的曾经没有我的故事 提交于 2019-12-03 08:41:43
I am trying to identify the configuration file where SELinux is set to Enforcing mode in Android Framework. Please do not reply just saying adb shell su 0 setenforce permissive I need the system to boot in permissive mode or have SELinux completely disabled at boot time. Thanks There are two ways that enforcing mode is set. On user builds, it will always be in enforcing. On eng or userdebug, you can control it. You can control it in the standard selinux way, by setting enforcing=1/0 on the kernel command line as outlined in Dan Walsh's blog: http://danwalsh.livejournal.com/10972.html The

NotificationListenerService stopping and can't be restarted without a reboot

有些话、适合烂在心里 提交于 2019-12-03 08:07:40
With android 4.4 I'm finding that some users are having the notificationListenerService I've implemented will just stop working. I've actually seen this myself too. I've never managed to capture any logcats around the time of it happening, but even going into the notification access section and switching off and back on the notification access doesn't help. Is there something that can cause this to happen. I'm not sure if my app is crashing and causing this, but even if so it seems the only way to restart the listener is to reboot the phone. Is there another way to start my app receiving

Building separate Android modules with dexpreopt disabled

守給你的承諾、 提交于 2019-12-02 23:52:05
For my thesis, I'm modifying the android framework and building the source (4.1.1 Jelly Bean). I can do a full build, but because this is very time consuming (I'm developing on a ubuntu 12.04 64bit virtual machine) I'd like to build separate modules. For example: When doing changes to the location modules, it should be possible to just build the changed module, and make a new system image: mmm frameworks/base make snod But this doesn't work. Every time I try to boot, the new system image won't boot because of: I/dalvikvm( 1696): DexOpt: mismatch dep signature for '/system/framework/framework

How to register a OMX core for adding a new decoder

白昼怎懂夜的黑 提交于 2019-12-01 10:47:59
I'm referring to the post: Android: How to integrate a decoder to multimedia framework Following it i have registered my new decoder (Which is currently not supported by Android) in media_codecs.xml . The Step 2 of the above post requires me to perform OMX core registration . However, Since i'm really new to this topic, i'm not able to follow the step 2. I have the working code of the decoder in C and is already ported to android. So i request if anybody can provide information on: A step-by-step guide to preform OMX code registration for a decoder that is currently not supported by android.

Add one android project as a library in AOSP App

浪尽此生 提交于 2019-11-30 11:09:52
问题 I want to add some features into Browser app by start an activity from another android application. It gives me package does not exist while I make the Main Project. Notice that I see the AndroidLib is built successfully into an out/target/product/generic/data/app/AndroidLib.apk Here are two android.mk files: AndroidLib(a normal Android App) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_STATIC_JAVA_LIBRARIES := \ google-ps \ android-support-v4 \ LOCAL_SRC_FILES := \ $(call all-java