Merge "Fix status icon reappearing for legacy activities" into lmp-dev

This commit is contained in:
Jorim Jaggi
2014-07-28 13:22:34 +00:00
committed by Android (Google) Code Review
24 changed files with 247 additions and 80 deletions

View File

@@ -1414,6 +1414,21 @@ public class Intent implements Parcelable, Cloneable {
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE";
/**
* Activity Action: Prompt the user to confirm credentials (pin, pattern or password)
* for the current user of the device. Launch this activity using
* {@link android.app.Activity#startActivityForResult(Intent, int)} and check if the
* result is {@link android.app.Activity#RESULT_OK} for a successful response to the
* challenge.<p/>
* This intent is handled by the system at a high priority and applications cannot intercept
* it.<p/>
* You can use {@link android.app.KeyguardManager#isKeyguardSecure()} to determine if the user will be
* prompted.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_CONFIRM_DEVICE_CREDENTIAL = "android.intent.action.CONFIRM_DEVICE_CREDENTIAL";
/**
* Specify whether the package should be uninstalled for all users.
* @hide because these should not be part of normal application flow.
@@ -3162,10 +3177,16 @@ public class Intent implements Parcelable, Cloneable {
/**
* A CharSequence dialog title to provide to the user when used with a
* {@link #ACTION_CHOOSER}.
* {@link #ACTION_CHOOSER} or {@link #ACTION_CONFIRM_DEVICE_CREDENTIAL}.
*/
public static final String EXTRA_TITLE = "android.intent.extra.TITLE";
/**
* A CharSequence description to provide to the user when used with
* {@link #ACTION_CONFIRM_DEVICE_CREDENTIAL}.
*/
public static final String EXTRA_DETAILS = "android.intent.extra.DETAILS";
/**
* A Parcelable[] of {@link Intent} or
* {@link android.content.pm.LabeledIntent} objects as set with

View File

@@ -130,6 +130,31 @@ public final class Settings {
public static final String ACTION_AIRPLANE_MODE_SETTINGS =
"android.settings.AIRPLANE_MODE_SETTINGS";
/**
* Activity Action: Modify Airplane mode settings using the users voice.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard against this.
* <p>
* This intent MUST be started using
* {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
* startVoiceActivity}.
* <p>
* To tell which state airplane mode should be set to, add the
* {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified.
* If there is no extra in this Intent, no changes will be made.
* <p>
* The activity should verify that
* {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
* modifying the setting.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE =
"android.settings.VOICE_CONTROL_AIRPLANE_MODE";
/**
* Activity Action: Show settings for accessibility modules.
* <p>
@@ -207,7 +232,6 @@ public final class Settings {
/**
* Activity Action: Show settings to allow configuration of Wi-Fi.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
@@ -779,6 +803,33 @@ public final class Settings {
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS";
/**
* Activity Action: Modify zen mode settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard against this.
* <p>
* This intent MUST be started using
* {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
* startVoiceActivity}.
* <p>
* To tell which state zen mode should be set to, add the
* {@link #EXTRA_ZEN_MODE_INTERRUPTION_STATE} extra to this Intent with the state specified.
* If there is no extra in this Intent, no changes will be made.
* <p>
* The Activity should verify that
* {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}.
* returns true before modifying the setting.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_VOICE_CONTROL_ZEN_MODE =
"android.settings.VOICE_CONTROL_ZEN_MODE";
/**
* Activity Action: Show the regulatory information screen for the device.
* <p>
@@ -891,6 +942,27 @@ public final class Settings {
public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
/**
* Activity Extra: Enable or disable Airplane Mode.
* <p>
* This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE}
* intent as a boolean.
*/
public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
/**
* Activity Extra: Modify the zen mode interruption state.
* <p>
* This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_ZEN_MODE}
* intent as an integer. The value should be one of
* {@link android.provider.Settings.Global#ZEN_MODE_OFF},
* {@link android.provider.Settings.Global#ZEN_MODE_IMPORTANT_INTERRUPTIONS},
* {@link android.provider.Settings.Global#ZEN_MODE_NO_INTERRUPTIONS}.
*
* @hide
*/
public static final String EXTRA_ZEN_MODE_INTERRUPTION_STATE = "zen_mode_interruption_state";
private static final String JID_RESOURCE_PREFIX = "android";
public static final String AUTHORITY = "settings";

View File

@@ -16,6 +16,9 @@
package android.webkit;
import android.app.AppGlobals;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Process;
import android.os.RemoteException;
@@ -100,9 +103,14 @@ public final class WebViewFactory {
private static Class<WebViewFactoryProvider> getFactoryClass() throws ClassNotFoundException {
try {
return (Class<WebViewFactoryProvider>) Class.forName(CHROMIUM_WEBVIEW_FACTORY);
} catch (ClassNotFoundException e) {
Log.e(LOGTAG, "Chromium WebView does not exist");
Context webViewContext = AppGlobals.getInitialApplication().createPackageContext(
getWebViewPackageName(),
Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
ClassLoader clazzLoader = webViewContext.getClassLoader();
return (Class<WebViewFactoryProvider>) Class.forName(CHROMIUM_WEBVIEW_FACTORY, true,
clazzLoader);
} catch (PackageManager.NameNotFoundException e) {
Log.e(LOGTAG, "Chromium WebView package does not exist");
return (Class<WebViewFactoryProvider>) Class.forName(NULL_WEBVIEW_FACTORY);
}
}