diff options
60 files changed, 1157 insertions, 366 deletions
diff --git a/api/test-current.txt b/api/test-current.txt index 74e65d9a3ee9..13474c93e00f 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -5631,6 +5631,7 @@ package android.app { public class TimePickerDialog extends android.app.AlertDialog implements android.content.DialogInterface.OnClickListener android.widget.TimePicker.OnTimeChangedListener { ctor public TimePickerDialog(android.content.Context, android.app.TimePickerDialog.OnTimeSetListener, int, int, boolean); ctor public TimePickerDialog(android.content.Context, int, android.app.TimePickerDialog.OnTimeSetListener, int, int, boolean); + method public android.widget.TimePicker getTimePicker(); method public void onClick(android.content.DialogInterface, int); method public void onTimeChanged(android.widget.TimePicker, int, int); method public void updateTime(int, int); @@ -46605,6 +46606,7 @@ package android.widget { method public int getFirstDayOfWeek(); method public long getMaxDate(); method public long getMinDate(); + method public int getMode(); method public int getMonth(); method public deprecated boolean getSpinnersShown(); method public int getYear(); @@ -46615,6 +46617,8 @@ package android.widget { method public void setMinDate(long); method public deprecated void setSpinnersShown(boolean); method public void updateDate(int, int, int); + field public static final int MODE_CALENDAR = 2; // 0x2 + field public static final int MODE_SPINNER = 1; // 0x1 } public static abstract interface DatePicker.OnDateChangedListener { @@ -48379,6 +48383,7 @@ package android.widget { method public deprecated java.lang.Integer getCurrentMinute(); method public int getHour(); method public int getMinute(); + method public int getMode(); method public boolean is24HourView(); method public deprecated void setCurrentHour(java.lang.Integer); method public deprecated void setCurrentMinute(java.lang.Integer); @@ -48386,6 +48391,8 @@ package android.widget { method public void setIs24HourView(java.lang.Boolean); method public void setMinute(int); method public void setOnTimeChangedListener(android.widget.TimePicker.OnTimeChangedListener); + field public static final int MODE_CLOCK = 2; // 0x2 + field public static final int MODE_SPINNER = 1; // 0x1 } public static abstract interface TimePicker.OnTimeChangedListener { diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index d9492cbd2911..1f41c291e3ef 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -5010,9 +5010,7 @@ public final class ActivityThread { int uid = Process.myUid(); String[] packages = getPackageManager().getPackagesForUid(uid); - // If there are several packages in this application we won't - // initialize the graphics disk caches - if (packages != null && packages.length == 1) { + if (packages != null) { ThreadedRenderer.setupDiskCache(cacheDir); RenderScriptCacheDir.setupDiskCache(cacheDir); } diff --git a/core/java/android/app/TimePickerDialog.java b/core/java/android/app/TimePickerDialog.java index aca07636e26e..3f467a01bee2 100644 --- a/core/java/android/app/TimePickerDialog.java +++ b/core/java/android/app/TimePickerDialog.java @@ -16,6 +16,7 @@ package android.app; +import android.annotation.TestApi; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; @@ -91,6 +92,12 @@ public class TimePickerDialog extends AlertDialog implements OnClickListener, /** * Creates a new time picker dialog with the specified theme. + * <p> + * The theme is overlaid on top of the theme of the parent {@code context}. + * If {@code themeResId} is 0, the dialog will be inflated using the theme + * specified by the + * {@link android.R.attr#timePickerDialogTheme android:timePickerDialogTheme} + * attribute on the parent {@code context}'s theme. * * @param context the parent context * @param themeResId the resource ID of the theme to apply to this dialog @@ -109,11 +116,6 @@ public class TimePickerDialog extends AlertDialog implements OnClickListener, mIs24HourView = is24HourView; final Context themeContext = getContext(); - - - final TypedValue outValue = new TypedValue(); - context.getTheme().resolveAttribute(R.attr.timePickerDialogTheme, outValue, true); - final LayoutInflater inflater = LayoutInflater.from(themeContext); final View view = inflater.inflate(R.layout.time_picker_dialog, null); setView(view); @@ -128,6 +130,15 @@ public class TimePickerDialog extends AlertDialog implements OnClickListener, mTimePicker.setOnTimeChangedListener(this); } + /** + * @return the time picker displayed in the dialog + * @hide For testing only. + */ + @TestApi + public TimePicker getTimePicker() { + return mTimePicker; + } + @Override public void onTimeChanged(TimePicker view, int hourOfDay, int minute) { /* do nothing */ diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 8f626df8d580..c9b03cc2db02 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -44,7 +44,6 @@ import android.net.ConnectivityManager; import android.net.Uri; import android.net.wifi.WifiManager; import android.os.BatteryManager; -import android.os.Binder; import android.os.Bundle; import android.os.DropBoxManager; import android.os.IBinder; @@ -1284,6 +1283,19 @@ public final class Settings { = "android.settings.VR_LISTENER_SETTINGS"; /** + * Activity Action: Show Storage Manager settings. + * <p> + * Input: Nothing. + * <p> + * Output: Nothing. + * + * @hide + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_STORAGE_MANAGER_SETTINGS + = "android.settings.STORAGE_MANAGER_SETTINGS"; + + /** * Activity Action: Allows user to select current webview implementation. * <p> * Input: Nothing. @@ -8335,6 +8347,13 @@ public final class Settings { public static final String CALL_AUTO_RETRY = "call_auto_retry"; /** + * A setting that can be read whether the emergency affordance is currently needed. + * The value is a boolean (1 or 0). + * @hide + */ + public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed"; + + /** * See RIL_PreferredNetworkType in ril.h * @hide */ diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java index e958fbef563d..94505d37310d 100644 --- a/core/java/android/service/dreams/DreamService.java +++ b/core/java/android/service/dreams/DreamService.java @@ -27,6 +27,7 @@ import android.graphics.PixelFormat; import android.graphics.drawable.ColorDrawable; import android.os.Handler; import android.os.IBinder; +import android.os.IRemoteCallback; import android.os.PowerManager; import android.os.RemoteException; import android.os.ServiceManager; @@ -192,9 +193,6 @@ public class DreamService extends Service implements Window.Callback { private boolean mDebug = false; - private PowerManager.WakeLock mWakeLock; - private boolean mWakeLockAcquired; - public DreamService() { mSandman = IDreamManager.Stub.asInterface(ServiceManager.getService(DREAM_SERVICE)); } @@ -789,8 +787,6 @@ public class DreamService extends Service implements Window.Callback { public void onCreate() { if (mDebug) Slog.v(TAG, "onCreate()"); super.onCreate(); - mWakeLock = getSystemService(PowerManager.class) - .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "DreamService"); } /** @@ -830,21 +826,9 @@ public class DreamService extends Service implements Window.Callback { @Override public final IBinder onBind(Intent intent) { if (mDebug) Slog.v(TAG, "onBind() intent = " + intent); - - // Need to stay awake until we dispatch onDreamingStarted. This is released either in - // attach() or onDestroy(). - mWakeLock.acquire(5000); - mWakeLockAcquired = true; return new DreamServiceWrapper(); } - private void releaseWakeLockIfNeeded() { - if (mWakeLockAcquired) { - mWakeLock.release(); - mWakeLockAcquired = false; - } - } - /** * Stops the dream and detaches from the window. * <p> @@ -921,8 +905,6 @@ public class DreamService extends Service implements Window.Callback { detach(); super.onDestroy(); - - releaseWakeLockIfNeeded(); // for acquire in onBind() } // end public api @@ -961,90 +943,94 @@ public class DreamService extends Service implements Window.Callback { * Must run on mHandler. * * @param windowToken A window token that will allow a window to be created in the correct layer. + * @param started A callback that will be invoked once onDreamingStarted has completed. */ - private final void attach(IBinder windowToken, boolean canDoze) { - try { - if (mWindowToken != null) { - Slog.e(TAG, "attach() called when already attached with token=" + mWindowToken); - return; - } - if (mFinished || mWaking) { - Slog.w(TAG, "attach() called after dream already finished"); - try { - mSandman.finishSelf(windowToken, true /*immediate*/); - } catch (RemoteException ex) { - // system server died - } - return; + private final void attach(IBinder windowToken, boolean canDoze, IRemoteCallback started) { + if (mWindowToken != null) { + Slog.e(TAG, "attach() called when already attached with token=" + mWindowToken); + return; + } + if (mFinished || mWaking) { + Slog.w(TAG, "attach() called after dream already finished"); + try { + mSandman.finishSelf(windowToken, true /*immediate*/); + } catch (RemoteException ex) { + // system server died } + return; + } - mWindowToken = windowToken; - mCanDoze = canDoze; - if (mWindowless && !mCanDoze) { - throw new IllegalStateException("Only doze dreams can be windowless"); - } - if (!mWindowless) { - mWindow = new PhoneWindow(this); - mWindow.setCallback(this); - mWindow.requestFeature(Window.FEATURE_NO_TITLE); - mWindow.setBackgroundDrawable(new ColorDrawable(0xFF000000)); - mWindow.setFormat(PixelFormat.OPAQUE); - - if (mDebug) { - Slog.v(TAG, String.format("Attaching window token: %s to window of type %s", - windowToken, WindowManager.LayoutParams.TYPE_DREAM)); - } + mWindowToken = windowToken; + mCanDoze = canDoze; + if (mWindowless && !mCanDoze) { + throw new IllegalStateException("Only doze dreams can be windowless"); + } + if (!mWindowless) { + mWindow = new PhoneWindow(this); + mWindow.setCallback(this); + mWindow.requestFeature(Window.FEATURE_NO_TITLE); + mWindow.setBackgroundDrawable(new ColorDrawable(0xFF000000)); + mWindow.setFormat(PixelFormat.OPAQUE); - WindowManager.LayoutParams lp = mWindow.getAttributes(); - lp.type = WindowManager.LayoutParams.TYPE_DREAM; - lp.token = windowToken; - lp.windowAnimations = com.android.internal.R.style.Animation_Dream; - lp.flags |= (WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN - | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR - | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED - | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD - | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON - | (mFullscreen ? WindowManager.LayoutParams.FLAG_FULLSCREEN : 0) - | (mScreenBright ? WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON : 0) - ); - mWindow.setAttributes(lp); - // Workaround: Currently low-profile and in-window system bar backgrounds don't go - // along well. Dreams usually don't need such bars anyways, so disable them by default. - mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - mWindow.setWindowManager(null, windowToken, "dream", true); - - applySystemUiVisibilityFlags( - (mLowProfile ? View.SYSTEM_UI_FLAG_LOW_PROFILE : 0), - View.SYSTEM_UI_FLAG_LOW_PROFILE); + if (mDebug) Slog.v(TAG, String.format("Attaching window token: %s to window of type %s", + windowToken, WindowManager.LayoutParams.TYPE_DREAM)); - try { - getWindowManager().addView(mWindow.getDecorView(), mWindow.getAttributes()); - } catch (WindowManager.BadTokenException ex) { - // This can happen because the dream manager service will remove the token - // immediately without necessarily waiting for the dream to start. - // We should receive a finish message soon. - Slog.i(TAG, "attach() called after window token already removed, dream will " - + "finish soon"); - mWindow = null; - return; - } + WindowManager.LayoutParams lp = mWindow.getAttributes(); + lp.type = WindowManager.LayoutParams.TYPE_DREAM; + lp.token = windowToken; + lp.windowAnimations = com.android.internal.R.style.Animation_Dream; + lp.flags |= ( WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN + | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR + | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED + | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD + | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON + | (mFullscreen ? WindowManager.LayoutParams.FLAG_FULLSCREEN : 0) + | (mScreenBright ? WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON : 0) + ); + mWindow.setAttributes(lp); + // Workaround: Currently low-profile and in-window system bar backgrounds don't go + // along well. Dreams usually don't need such bars anyways, so disable them by default. + mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + mWindow.setWindowManager(null, windowToken, "dream", true); + + applySystemUiVisibilityFlags( + (mLowProfile ? View.SYSTEM_UI_FLAG_LOW_PROFILE : 0), + View.SYSTEM_UI_FLAG_LOW_PROFILE); + + try { + getWindowManager().addView(mWindow.getDecorView(), mWindow.getAttributes()); + } catch (WindowManager.BadTokenException ex) { + // This can happen because the dream manager service will remove the token + // immediately without necessarily waiting for the dream to start. + // We should receive a finish message soon. + Slog.i(TAG, "attach() called after window token already removed, dream will " + + "finish soon"); + mWindow = null; + return; } - // We need to defer calling onDreamingStarted until after onWindowAttached, - // which is posted to the handler by addView, so we post onDreamingStarted - // to the handler also. Need to watch out here in case detach occurs before - // this callback is invoked. - mHandler.post(mWakeLock.wrap(() -> { + } + // We need to defer calling onDreamingStarted until after onWindowAttached, + // which is posted to the handler by addView, so we post onDreamingStarted + // to the handler also. Need to watch out here in case detach occurs before + // this callback is invoked. + mHandler.post(new Runnable() { + @Override + public void run() { if (mWindow != null || mWindowless) { - if (mDebug) { - Slog.v(TAG, "Calling onDreamingStarted()"); - } + if (mDebug) Slog.v(TAG, "Calling onDreamingStarted()"); mStarted = true; - onDreamingStarted(); + try { + onDreamingStarted(); + } finally { + try { + started.sendResult(null); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } } - })); - } finally { - releaseWakeLockIfNeeded(); // for acquire in onBind - } + } + }); } private boolean getWindowFlagValue(int flag, boolean defaultValue) { @@ -1116,11 +1102,12 @@ public class DreamService extends Service implements Window.Callback { private final class DreamServiceWrapper extends IDreamService.Stub { @Override - public void attach(final IBinder windowToken, final boolean canDoze) { + public void attach(final IBinder windowToken, final boolean canDoze, + IRemoteCallback started) { mHandler.post(new Runnable() { @Override public void run() { - DreamService.this.attach(windowToken, canDoze); + DreamService.this.attach(windowToken, canDoze, started); } }); } diff --git a/core/java/android/service/dreams/IDreamService.aidl b/core/java/android/service/dreams/IDreamService.aidl index 9bb18044e3ea..ce0435498917 100644 --- a/core/java/android/service/dreams/IDreamService.aidl +++ b/core/java/android/service/dreams/IDreamService.aidl @@ -16,11 +16,13 @@ package android.service.dreams; +import android.os.IRemoteCallback; + /** * @hide */ oneway interface IDreamService { - void attach(IBinder windowToken, boolean canDoze); + void attach(IBinder windowToken, boolean canDoze, IRemoteCallback started); void detach(); void wakeUp(); } diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 326415211dc1..972208363933 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -8059,7 +8059,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * Set the enabled state of this view. + * Set the visibility state of this view. * * @param visibility One of {@link #VISIBLE}, {@link #INVISIBLE}, or {@link #GONE}. * @attr ref android.R.styleable#View_visibility diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java index 8613f9989abc..54818a1f7a6c 100644 --- a/core/java/android/widget/DatePicker.java +++ b/core/java/android/widget/DatePicker.java @@ -18,7 +18,9 @@ package android.widget; import com.android.internal.R; +import android.annotation.IntDef; import android.annotation.Nullable; +import android.annotation.TestApi; import android.annotation.Widget; import android.content.Context; import android.content.res.Configuration; @@ -32,6 +34,8 @@ import android.util.SparseArray; import android.view.View; import android.view.accessibility.AccessibilityEvent; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.util.Locale; /** @@ -75,11 +79,36 @@ import java.util.Locale; */ @Widget public class DatePicker extends FrameLayout { - private static final int MODE_SPINNER = 1; - private static final int MODE_CALENDAR = 2; + /** + * Presentation mode for the Holo-style date picker that uses a set of + * {@link android.widget.NumberPicker}s. + * + * @see #getMode() + * @hide Visible for testing only. + */ + @TestApi + public static final int MODE_SPINNER = 1; + + /** + * Presentation mode for the Material-style date picker that uses a + * calendar. + * + * @see #getMode() + * @hide Visible for testing only. + */ + @TestApi + public static final int MODE_CALENDAR = 2; + + /** @hide */ + @IntDef({MODE_SPINNER, MODE_CALENDAR}) + @Retention(RetentionPolicy.SOURCE) + public @interface DatePickerMode {} private final DatePickerDelegate mDelegate; + @DatePickerMode + private final int mMode; + /** * The callback used to indicate the user changed the date. */ @@ -114,11 +143,20 @@ public class DatePicker extends FrameLayout { final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.DatePicker, defStyleAttr, defStyleRes); - final int mode = a.getInt(R.styleable.DatePicker_datePickerMode, MODE_SPINNER); + final boolean isDialogMode = a.getBoolean(R.styleable.DatePicker_dialogMode, false); + final int requestedMode = a.getInt(R.styleable.DatePicker_datePickerMode, MODE_SPINNER); final int firstDayOfWeek = a.getInt(R.styleable.DatePicker_firstDayOfWeek, 0); a.recycle(); - switch (mode) { + if (requestedMode == MODE_CALENDAR && isDialogMode) { + // You want MODE_CALENDAR? YOU CAN'T HANDLE MODE_CALENDAR! Well, + // maybe you can depending on your screen size. Let's check... + mMode = context.getResources().getInteger(R.integer.date_picker_mode); + } else { + mMode = requestedMode; + } + + switch (mMode) { case MODE_CALENDAR: mDelegate = createCalendarUIDelegate(context, attrs, defStyleAttr, defStyleRes); break; @@ -145,6 +183,18 @@ public class DatePicker extends FrameLayout { } /** + * @return the picker's presentation mode, one of {@link #MODE_CALENDAR} or + * {@link #MODE_SPINNER} + * @attr ref android.R.styleable#DatePicker_datePickerMode + * @hide Visible for testing only. + */ + @DatePickerMode + @TestApi + public int getMode() { + return mMode; + } + + /** * Initialize the state. If the provided values designate an inconsistent * date the values are normalized before updating the spinners. * diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index c4a17715896c..a01d65a1df20 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -65,6 +65,9 @@ import com.android.internal.R; * {@link #setSwitchTextAppearance(android.content.Context, int) switchTextAppearance} and * the related setSwitchTypeface() methods control that of the thumb. * + * <p>{@link android.support.v7.widget.SwitchCompat} is a version of + * the Switch widget which runs on devices back to API 7.</p> + * * <p>See the <a href="{@docRoot}guide/topics/ui/controls/togglebutton.html">Toggle Buttons</a> * guide.</p> * diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index d3cb7425fe35..f8daa8823d21 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -3234,6 +3234,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * Sets the text color for all the states (normal, selected, * focused) to be this color. * + * @param color A color value in the form 0xAARRGGBB. + * Do not pass a resource ID. To get a color value from a resource ID, call + * {@link android.support.v4.content.ContextCompat#getColor(Context, int) getColor}. + * * @see #setTextColor(ColorStateList) * @see #getTextColors() * diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java index 10959780683a..a1c854bd8f63 100644 --- a/core/java/android/widget/TimePicker.java +++ b/core/java/android/widget/TimePicker.java @@ -18,8 +18,10 @@ package android.widget; import com.android.internal.R; +import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; +import android.annotation.TestApi; import android.annotation.Widget; import android.content.Context; import android.content.res.TypedArray; @@ -30,6 +32,8 @@ import android.util.MathUtils; import android.view.View; import android.view.accessibility.AccessibilityEvent; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.util.Locale; import libcore.icu.LocaleData; @@ -45,11 +49,36 @@ import libcore.icu.LocaleData; */ @Widget public class TimePicker extends FrameLayout { - private static final int MODE_SPINNER = 1; - private static final int MODE_CLOCK = 2; + /** + * Presentation mode for the Holo-style time picker that uses a set of + * {@link android.widget.NumberPicker}s. + * + * @see #getMode() + * @hide Visible for testing only. + */ + @TestApi + public static final int MODE_SPINNER = 1; + + /** + * Presentation mode for the Material-style time picker that uses a clock + * face. + * + * @see #getMode() + * @hide Visible for testing only. + */ + @TestApi + public static final int MODE_CLOCK = 2; + + /** @hide */ + @IntDef({MODE_SPINNER, MODE_CLOCK}) + @Retention(RetentionPolicy.SOURCE) + public @interface TimePickerMode {} private final TimePickerDelegate mDelegate; + @TimePickerMode + private final int mMode; + /** * The callback interface used to indicate the time has been adjusted. */ @@ -80,10 +109,19 @@ public class TimePicker extends FrameLayout { final TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.TimePicker, defStyleAttr, defStyleRes); - final int mode = a.getInt(R.styleable.TimePicker_timePickerMode, MODE_SPINNER); + final boolean isDialogMode = a.getBoolean(R.styleable.TimePicker_dialogMode, false); + final int requestedMode = a.getInt(R.styleable.TimePicker_timePickerMode, MODE_SPINNER); a.recycle(); - switch (mode) { + if (requestedMode == MODE_CLOCK && isDialogMode) { + // You want MODE_CLOCK? YOU CAN'T HANDLE MODE_CLOCK! Well, maybe + // you can depending on your screen size. Let's check... + mMode = context.getResources().getInteger(R.integer.time_picker_mode); + } else { + mMode = requestedMode; + } + + switch (mMode) { case MODE_CLOCK: mDelegate = new TimePickerClockDelegate( this, context, attrs, defStyleAttr, defStyleRes); @@ -97,6 +135,18 @@ public class TimePicker extends FrameLayout { } /** + * @return the picker's presentation mode, one of {@link #MODE_CLOCK} or + * {@link #MODE_SPINNER} + * @attr ref android.R.styleable#TimePicker_timePickerMode + * @hide Visible for testing only. + */ + @TimePickerMode + @TestApi + public int getMode() { + return mMode; + } + + /** * Sets the currently selected hour using 24-hour time. * * @param hour the hour to set, in the range (0-23) diff --git a/core/java/com/android/internal/app/ResolverComparator.java b/core/java/com/android/internal/app/ResolverComparator.java index 03a3a3821f6a..4d4c7ceb1655 100644 --- a/core/java/com/android/internal/app/ResolverComparator.java +++ b/core/java/com/android/internal/app/ResolverComparator.java @@ -157,7 +157,10 @@ class ResolverComparator implements Comparator<ResolvedComponentInfo> { // We want to put the one targeted to another user at the end of the dialog. if (lhs.targetUserId != UserHandle.USER_CURRENT) { - return 1; + return rhs.targetUserId != UserHandle.USER_CURRENT ? 0 : 1; + } + if (rhs.targetUserId != UserHandle.USER_CURRENT) { + return -1; } if (mHttp) { diff --git a/core/java/com/android/internal/policy/EmergencyAffordanceManager.java b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java new file mode 100644 index 000000000000..bed7c1ba4ed3 --- /dev/null +++ b/core/java/com/android/internal/policy/EmergencyAffordanceManager.java @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.internal.policy; + +import android.content.Context; +import android.content.Intent; +import android.net.Uri; +import android.os.Build; +import android.provider.Settings; + +/** + * A class that manages emergency affordances and enables immediate calling to emergency services + */ +public class EmergencyAffordanceManager { + + public static final boolean ENABLED = true; + + /** + * Global setting override with the number to call with the emergency affordance. + * @hide + */ + private static final String EMERGENCY_CALL_NUMBER_SETTING = "emergency_affordance_number"; + + /** + * Global setting, whether the emergency affordance should be shown regardless of device state. + * The value is a boolean (1 or 0). + * @hide + */ + private static final String FORCE_EMERGENCY_AFFORDANCE_SETTING = "force_emergency_affordance"; + + private final Context mContext; + + public EmergencyAffordanceManager(Context context) { + mContext = context; + } + + /** + * perform an emergency call. + */ + public final void performEmergencyCall() { + performEmergencyCall(mContext); + } + + private static Uri getPhoneUri(Context context) { + String number = context.getResources().getString( + com.android.internal.R.string.config_emergency_call_number); + if (Build.IS_DEBUGGABLE) { + String override = Settings.Global.getString( + context.getContentResolver(), EMERGENCY_CALL_NUMBER_SETTING); + if (override != null) { + number = override; + } + } + return Uri.fromParts("tel", number, null); + } + + private static void performEmergencyCall(Context context) { + Intent intent = new Intent(Intent.ACTION_CALL_EMERGENCY); + intent.setData(getPhoneUri(context)); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(intent); + } + + /** + * @return whether emergency affordance should be active. + */ + public boolean needsEmergencyAffordance() { + if (!ENABLED) { + return false; + } + if (forceShowing()) { + return true; + } + return isEmergencyAffordanceNeeded(); + } + + private boolean isEmergencyAffordanceNeeded() { + return Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.EMERGENCY_AFFORDANCE_NEEDED, 0) != 0; + } + + + private boolean forceShowing() { + return Settings.Global.getInt(mContext.getContentResolver(), + FORCE_EMERGENCY_AFFORDANCE_SETTING, 0) != 0; + } +} diff --git a/core/java/com/android/internal/widget/ImageFloatingTextView.java b/core/java/com/android/internal/widget/ImageFloatingTextView.java index 926ebd158b50..358be604f847 100644 --- a/core/java/com/android/internal/widget/ImageFloatingTextView.java +++ b/core/java/com/android/internal/widget/ImageFloatingTextView.java @@ -40,6 +40,9 @@ public class ImageFloatingTextView extends TextView { /** Number of lines from the top to indent */ private int mIndentLines; + /** Resolved layout direction */ + private int mResolvedDirection = LAYOUT_DIRECTION_UNDEFINED; + public ImageFloatingTextView(Context context) { this(context, null); } @@ -82,7 +85,7 @@ public class ImageFloatingTextView extends TextView { margins[i] = endMargin; } } - if (getLayoutDirection() == LAYOUT_DIRECTION_RTL) { + if (mResolvedDirection == LAYOUT_DIRECTION_RTL) { builder.setIndents(margins, null); } else { builder.setIndents(null, margins); @@ -91,6 +94,19 @@ public class ImageFloatingTextView extends TextView { return builder.build(); } + @Override + public void onRtlPropertiesChanged(int layoutDirection) { + super.onRtlPropertiesChanged(layoutDirection); + + if (layoutDirection != mResolvedDirection && isLayoutDirectionResolved()) { + mResolvedDirection = layoutDirection; + if (mIndentLines > 0) { + // Invalidate layout. + setHint(getHint()); + } + } + } + @RemotableViewMethod public void setHasImage(boolean hasImage) { setNumIndentLines(hasImage ? 2 : 0); diff --git a/core/res/res/drawable/emergency_icon.xml b/core/res/res/drawable/emergency_icon.xml new file mode 100644 index 000000000000..b2ffa2b4481c --- /dev/null +++ b/core/res/res/drawable/emergency_icon.xml @@ -0,0 +1,40 @@ +<!-- +Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24.0dp" + android:height="24.0dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0" + android:tint="?attr/colorControlNormal"> + <path + android:fillColor="#FF000000" + android:pathData="M6.8,17.3C5.3,15.9 4.5,14.0 4.5,12.0c0.0,-2.0 0.8,-3.8 2.1,-5.2l1.4,1.4c-1.0,1.0 -1.6,2.4 -1.6,3.8c0.0,1.5 0.6,2.9 1.6,3.9L6.8,17.3z"/> + <path + android:fillColor="#FF000000" + android:pathData="M3.3,20.2C1.2,18.0 0.0,15.1 0.0,12.0c0.0,-3.1 1.2,-6.0 3.3,-8.2l1.4,1.4C3.0,7.0 2.0,9.4 2.0,12.0s1.0,5.0 2.7,6.9L3.3,20.2z"/> + <path + android:fillColor="#FF000000" + android:pathData="M17.2,17.3l-1.4,-1.4c1.1,-1.0 1.6,-2.4 1.6,-3.9c0.0,-1.4 -0.6,-2.8 -1.6,-3.8l1.4,-1.4c1.4,1.4 2.1,3.3 2.1,5.2C19.5,14.0 18.7,15.9 17.2,17.3z"/> + <path + android:fillColor="#FF000000" + android:pathData="M20.7,20.2l-1.4,-1.4C21.0,17.0 22.0,14.6 22.0,12.0c0.0,-2.6 -1.0,-5.0 -2.7,-6.9l1.4,-1.4C22.8,6.0 24.0,8.9 24.0,12.0C24.0,15.1 22.8,18.0 20.7,20.2z"/> + <path + android:fillColor="#FF000000" + android:pathData="M11.0,15.0l2.0,0.0l0.0,2.0l-2.0,0.0z"/> + <path + android:fillColor="#FF000000" + android:pathData="M11.0,7.0l2.0,0.0l0.0,6.0l-2.0,0.0z"/> +</vector> diff --git a/core/res/res/layout-sw600dp/date_picker_dialog.xml b/core/res/res/layout-sw600dp/date_picker_dialog.xml index 5e3ca14dd96c..cd6af463b8ff 100644 --- a/core/res/res/layout-sw600dp/date_picker_dialog.xml +++ b/core/res/res/layout-sw600dp/date_picker_dialog.xml @@ -22,4 +22,4 @@ android:layout_height="wrap_content" android:spinnersShown="true" android:calendarViewShown="true" - android:datePickerMode="@integer/date_picker_mode" /> + android:dialogMode="true" /> diff --git a/core/res/res/layout/date_picker_dialog.xml b/core/res/res/layout/date_picker_dialog.xml index 8f36e95a15c6..32a7360b3c3b 100644 --- a/core/res/res/layout/date_picker_dialog.xml +++ b/core/res/res/layout/date_picker_dialog.xml @@ -22,4 +22,4 @@ android:layout_height="wrap_content" android:spinnersShown="true" android:calendarViewShown="false" - android:datePickerMode="@integer/date_picker_mode" /> + android:dialogMode="true" /> diff --git a/core/res/res/layout/time_picker_dialog.xml b/core/res/res/layout/time_picker_dialog.xml index d1f3902bd2d2..ada18d16adb8 100644 --- a/core/res/res/layout/time_picker_dialog.xml +++ b/core/res/res/layout/time_picker_dialog.xml @@ -22,4 +22,4 @@ android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:timePickerMode="@integer/time_picker_mode" /> + android:dialogMode="true" /> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 0a96ba399396..30a1a28617e5 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -4839,6 +4839,11 @@ i <!-- The list year's selected circle color in the list. {@deprecated No longer displayed.} --> <attr name="yearListSelectorColor" format="color" /> + + <!-- @hide Whether this time picker is being displayed within a dialog, + in which case it may ignore the requested time picker mode due to + space considerations. --> + <attr name="dialogMode" format="boolean" /> </declare-styleable> <declare-styleable name="TwoLineListItem"> @@ -5167,6 +5172,11 @@ i <!-- The background color state list for the AM/PM selectors. {@deprecated Use headerBackground instead.}--> <attr name="amPmBackgroundColor" format="color" /> + + <!-- @hide Whether this time picker is being displayed within a dialog, + in which case it may ignore the requested time picker mode due to + space considerations. --> + <attr name="dialogMode" /> </declare-styleable> <!-- ========================= --> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 9881fe37df8f..18467ae3a11e 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2526,6 +2526,16 @@ <!-- True if the device supports system navigation keys. --> <bool name="config_supportSystemNavigationKeys">false</bool> + <!-- emergency call number for the emergency affordance --> + <string name="config_emergency_call_number" translatable="false">112</string> + + <!-- Do not translate. Mcc codes whose existence trigger the presence of emergency + affordances--> + <integer-array name="config_emergency_mcc_codes" translatable="false"> + <item>404</item> + <item>405</item> + </integer-array> + <!-- Package name for the device provisioning package. --> <string name="config_deviceProvisioningPackage"></string> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index d0107e161707..3cfb74cd0c42 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -486,6 +486,9 @@ <!-- TODO: promote to separate string--> <string name="global_action_restart" translatable="false">@string/sim_restart_button</string> + <!-- label for item that starts emergency call --> + <string name="global_action_emergency">Emergency</string> + <!-- label for item that generates a bug report in the phone options dialog --> <string name="global_action_bug_report">Bug report</string> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 8ca9ef66cd62..b03a61663f98 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2664,6 +2664,10 @@ <java-symbol type="string" name="lockscreen_storage_locked" /> + <java-symbol type="string" name="global_action_emergency" /> + <java-symbol type="string" name="config_emergency_call_number" /> + <java-symbol type="array" name="config_emergency_mcc_codes" /> + <!-- Used for MimeIconUtils. --> <java-symbol type="drawable" name="ic_doc_apk" /> <java-symbol type="drawable" name="ic_doc_audio" /> @@ -2700,7 +2704,13 @@ <java-symbol type="drawable" name="ic_restart" /> + <java-symbol type="drawable" name="emergency_icon" /> + <java-symbol type="array" name="config_convert_to_emergency_number_map" /> <java-symbol type="array" name="config_nonBlockableNotificationPackages" /> + + <!-- Screen-size-dependent modes for picker dialogs. --> + <java-symbol type="integer" name="time_picker_mode" /> + <java-symbol type="integer" name="date_picker_mode" /> </resources> diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd index 26ae59f9d336..0cf517b4740e 100755 --- a/docs/html/guide/topics/manifest/uses-feature-element.jd +++ b/docs/html/guide/topics/manifest/uses-feature-element.jd @@ -512,10 +512,11 @@ You can find your unsigned <code>.apk</code> in the <li>Next, locate the <code>aapt</code> tool, if it is not already in your PATH. If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the -<code><<em>SDK</em>>/platform-tools/</code> directory. +<code><<em>SDK</em>>/build-tools/<<em>tools version number</em>></code> +directory. <p class="note"><strong>Note:</strong> You must use the version of -<code>aapt</code> that is provided for the latest Platform-Tools component available. If -you do not have the latest Platform-Tools component, download it using the <a +<code>aapt</code> that is provided for the latest Build-Tools component available. If +you do not have the latest Build-Tools component, download it using the <a href="{@docRoot}studio/intro/update.html">Android SDK Manager</a>. </p></li> <li>Run <code>aapt</code> using this syntax: </li> diff --git a/docs/html/guide/topics/ui/controls/togglebutton.jd b/docs/html/guide/topics/ui/controls/togglebutton.jd index e0549ecb28f4..181647c21849 100644 --- a/docs/html/guide/topics/ui/controls/togglebutton.jd +++ b/docs/html/guide/topics/ui/controls/togglebutton.jd @@ -14,6 +14,7 @@ page.tags=switch,togglebutton <ol> <li>{@link android.widget.ToggleButton}</li> <li>{@link android.widget.Switch}</li> + <li>{@link android.support.v7.widget.SwitchCompat}</li> <li>{@link android.widget.CompoundButton}</li> </ol> </div> @@ -21,9 +22,12 @@ page.tags=switch,togglebutton <p>A toggle button allows the user to change a setting between two states.</p> -<p>You can add a basic toggle button to your layout with the {@link android.widget.ToggleButton} -object. Android 4.0 (API level 14) introduces another kind of toggle button called a switch that -provides a slider control, which you can add with a {@link android.widget.Switch} object.</p> +<p>You can add a basic toggle button to your layout with the +{@link android.widget.ToggleButton} object. Android 4.0 (API level 14) +introduces another kind of toggle button called a switch that provides a slider +control, which you can add with a {@link android.widget.Switch} object. +{@link android.support.v7.widget.SwitchCompat} is a version of the Switch +widget which runs on devices back to API 7.</p> <p> If you need to change a button's state yourself, you can use the {@link diff --git a/docs/html/images/tools/sdk-manager-support-libs.png b/docs/html/images/tools/sdk-manager-support-libs.png Binary files differdeleted file mode 100644 index cb4cea5795a6..000000000000 --- a/docs/html/images/tools/sdk-manager-support-libs.png +++ /dev/null diff --git a/docs/html/images/tools/studio-sdk-manager-packages.png b/docs/html/images/tools/studio-sdk-manager-packages.png Binary files differdeleted file mode 100644 index 79ea912e183a..000000000000 --- a/docs/html/images/tools/studio-sdk-manager-packages.png +++ /dev/null diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java index 8d411453b5ae..0474df7bd89c 100644 --- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java +++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java @@ -28,13 +28,16 @@ import android.os.UserHandle; import android.telecom.TelecomManager; import android.util.AttributeSet; import android.util.Slog; +import android.view.MotionEvent; import android.view.View; +import android.view.ViewConfiguration; import android.widget.Button; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.internal.telephony.IccCardConstants.State; import com.android.internal.widget.LockPatternUtils; +import com.android.internal.policy.EmergencyAffordanceManager; /** * This class implements a smart emergency button that updates itself based @@ -51,7 +54,10 @@ public class EmergencyButton extends Button { | Intent.FLAG_ACTIVITY_CLEAR_TOP); private static final String LOG_TAG = "EmergencyButton"; + private final EmergencyAffordanceManager mEmergencyAffordanceManager; + private int mDownX; + private int mDownY; KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @Override @@ -64,6 +70,7 @@ public class EmergencyButton extends Button { updateEmergencyCallButton(); } }; + private boolean mLongPressWasDragged; public interface EmergencyButtonCallback { public void onEmergencyButtonClickedWhenInCall(); @@ -86,6 +93,7 @@ public class EmergencyButton extends Button { com.android.internal.R.bool.config_voice_capable); mEnableEmergencyCallWhileSimLocked = mContext.getResources().getBoolean( com.android.internal.R.bool.config_enable_emergency_call_while_sim_locked); + mEmergencyAffordanceManager = new EmergencyAffordanceManager(context); } @Override @@ -110,10 +118,45 @@ public class EmergencyButton extends Button { takeEmergencyCallAction(); } }); + setOnLongClickListener(new OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + if (!mLongPressWasDragged + && mEmergencyAffordanceManager.needsEmergencyAffordance()) { + mEmergencyAffordanceManager.performEmergencyCall(); + return true; + } + return false; + } + }); updateEmergencyCallButton(); } @Override + public boolean onTouchEvent(MotionEvent event) { + final int x = (int) event.getX(); + final int y = (int) event.getY(); + if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { + mDownX = x; + mDownY = y; + mLongPressWasDragged = false; + } else { + final int xDiff = Math.abs(x - mDownX); + final int yDiff = Math.abs(y - mDownY); + int touchSlop = ViewConfiguration.get(mContext).getScaledTouchSlop(); + if (Math.abs(yDiff) > touchSlop || Math.abs(xDiff) > touchSlop) { + mLongPressWasDragged = true; + } + } + return super.onTouchEvent(event); + } + + @Override + public boolean performLongClick() { + return super.performLongClick(); + } + + @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); updateEmergencyCallButton(); diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml index 682af8bd536f..08e5164fb252 100644 --- a/packages/SettingsLib/res/values/strings.xml +++ b/packages/SettingsLib/res/values/strings.xml @@ -64,8 +64,10 @@ <string name="wifi_disabled_password_failure">Authentication problem</string> <!-- Summary for the remembered network but currently not in range. --> <string name="wifi_not_in_range">Not in range</string> + <!-- Summary for the network but no internet connection was detected. --> + <string name="wifi_no_internet_no_reconnect">No Internet Access Detected, won\'t automatically reconnect.</string> <!-- Summary for the remembered network but no internet connection was detected. --> - <string name="wifi_no_internet">No Internet Access Detected, won\'t automatically reconnect.</string> + <string name="wifi_no_internet">No Internet Access.</string> <!-- Summary for saved networks --> <string name="saved_network">Saved by <xliff:g id="name">%1$s</xliff:g></string> diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java index 92f1b18c9444..b63752c22521 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java @@ -409,7 +409,10 @@ public class AccessPoint implements Comparable<AccessPoint> { String format = mContext.getString(R.string.available_via_passpoint); summary.append(String.format(format, config.providerFriendlyName)); } else if (config != null && config.hasNoInternetAccess()) { - summary.append(mContext.getString(R.string.wifi_no_internet)); + int messageID = config.getNetworkSelectionStatus().isNetworkPermanentlyDisabled() + ? R.string.wifi_no_internet_no_reconnect + : R.string.wifi_no_internet; + summary.append(mContext.getString(messageID)); } else if (config != null && !config.getNetworkSelectionStatus().isNetworkEnabled()) { WifiConfiguration.NetworkSelectionStatus networkStatus = config.getNetworkSelectionStatus(); diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_0.xml b/packages/SystemUI/res/drawable/ic_qs_signal_0.xml index b78d3bf1c35d..f63dfb12e203 100644 --- a/packages/SystemUI/res/drawable/ic_qs_signal_0.xml +++ b/packages/SystemUI/res/drawable/ic_qs_signal_0.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,15 +15,17 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="32.0dp" - android:height="32.0dp" + android:width="32dp" + android:height="32dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> + <path + android:pathData="M17.700001,8.000000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z" + android:fillColor="#4DFFFFFF"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_1.xml b/packages/SystemUI/res/drawable/ic_qs_signal_1.xml index e055de77ebe5..7fb423e5fc84 100644 --- a/packages/SystemUI/res/drawable/ic_qs_signal_1.xml +++ b/packages/SystemUI/res/drawable/ic_qs_signal_1.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,18 +15,20 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="32.0dp" - android:height="32.0dp" + android:width="32dp" + android:height="32dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M10.0,14.6l-8.0,8.0l8.0,0.0l0,-8z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.7,20.0l2.0,0.0l0.0,2.0l-2.0,0.0z"/> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.7,10.0l2.0,0.0l0.0,8.1l-2.0,0.0z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="#FFFFFF"/> + android:fillColor="#4DFFFFFF" + android:pathData="M17.7,8.0l4.299999,0.0 0.0,-6.0 -20.0,20.0 15.700001,0.0z"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M10.1,13.9l-8.1,8.1 8.1,0.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_2.xml b/packages/SystemUI/res/drawable/ic_qs_signal_2.xml index 8a488170e438..3358d65b68e6 100644 --- a/packages/SystemUI/res/drawable/ic_qs_signal_2.xml +++ b/packages/SystemUI/res/drawable/ic_qs_signal_2.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,18 +15,20 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="32.0dp" - android:height="32.0dp" + android:width="32dp" + android:height="32dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M14.0,10.6l-12.0,12.0l12.0,0.0L14.0,10.6z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M13.900000,10.000000l-11.900000,12.000000 11.900000,0.000000z"/> + <path + android:pathData="M17.700001,8.000000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z" + android:fillColor="#4DFFFFFF"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_3.xml b/packages/SystemUI/res/drawable/ic_qs_signal_3.xml index 39cc94cad4db..63838a93c686 100644 --- a/packages/SystemUI/res/drawable/ic_qs_signal_3.xml +++ b/packages/SystemUI/res/drawable/ic_qs_signal_3.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,18 +15,20 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="32.0dp" - android:height="32.0dp" + android:width="32dp" + android:height="32dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,19.900000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,9.900000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> <path - android:pathData="M14.1,14.1l2.9,0.0 0.0,-6.5 -15.0,15.0 12.1,0.0z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M16.700001,7.200000l-14.700001,14.700000 14.700001,0.000000z"/> + <path + android:pathData="M17.700001,7.900000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z" + android:fillColor="#4DFFFFFF"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_4.xml b/packages/SystemUI/res/drawable/ic_qs_signal_4.xml index 012e95e985ce..76690cc2adce 100644 --- a/packages/SystemUI/res/drawable/ic_qs_signal_4.xml +++ b/packages/SystemUI/res/drawable/ic_qs_signal_4.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,14 +15,17 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="32.0dp" - android:height="32.0dp" + android:width="32dp" + android:height="32dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M2.000000,22.000000l15.700001,0.000000 0.000000,-14.000000 4.299999,0.000000 0.000000,-6.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_0.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_0.xml index e6f929265709..50c427e24c9b 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_0.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_0.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,15 +14,17 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24.0dp" - android:height="24.0dp" - android:viewportWidth="24.0" + android:width="32.0dp" + android:height="29.5dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#4DFFFFFF" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.200000,-1.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.799999,-1.800001z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml index d423ccb2d5e2..a2d11a09aab8 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,18 +14,20 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24.0dp" - android:height="24.0dp" - android:viewportWidth="24.0" + android:width="32.0dp" + android:height="29.5dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,13.2c-0.1,0.0 -0.3,-0.1 -0.4,-0.1c-0.1,0.0 -0.3,0.0 -0.4,-0.1c-0.3,0.0 -0.6,-0.1 -0.9,-0.1c0.0,0.0 0.0,0.0 -0.1,0.0c0.0,0.0 0.0,0.0 0.0,0.0s0.0,0.0 0.0,0.0c0.0,0.0 0.0,0.0 -0.1,0.0c-0.3,0.0 -0.6,0.0 -0.9,0.1c-0.1,0.0 -0.3,0.0 -0.4,0.1c-0.2,0.0 -0.3,0.1 -0.5,0.1c-0.2,0.0 -0.3,0.1 -0.5,0.1c-0.1,0.0 -0.1,0.0 -0.2,0.1c-1.6,0.5 -2.7,1.3 -2.8,1.5l5.3,6.6l0.0,0.0l0.0,0.0l0.0,0.0l0.0,0.0l1.8,-2.2L13.700002,13.2z" - android:fillColor="#FFFFFF"/> + android:fillColor="#4DFFFFFF" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M13.000000,22.000000l5.500000,-6.800000c-0.200000,-0.200000 -2.300000,-1.900000 -5.500000,-1.900000s-5.300000,1.800000 -5.500000,1.900000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.799999,-1.800001z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml index 1982130fb1c6..f2043fc4bcaf 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,18 +14,20 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24.0dp" - android:height="24.0dp" - android:viewportWidth="24.0" + android:width="32.0dp" + android:height="29.5dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l4.9,0.0c-1.0,-0.7 -3.4,-2.2 -6.7,-2.2c-4.1,0.0 -6.9,2.2 -7.2,2.5l7.2,9.0l0.0,0.0l0.0,0.0l1.8,-2.2L13.800001,12.2z" - android:fillColor="#FFFFFF"/> + android:fillColor="#4DFFFFFF" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.000000,11.600000c-1.300000,-0.700000 -3.400000,-1.600000 -6.000000,-1.600000c-4.400000,0.000000 -7.300000,2.400000 -7.600000,2.700000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,11.600000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.800001,1.9 -1.800001,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.9,-1.800001z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml index b35011181a86..b7a4f4c81ec8 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,18 +14,20 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24.0dp" - android:height="24.0dp" - android:viewportWidth="24.0" + android:width="32.0dp" + android:height="29.5dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l5.7,0.0l1.0,-1.2C20.0,10.6 16.8,8.0 12.0,8.0s-8.0,2.6 -8.5,3.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="#FFFFFF"/> + android:fillColor="#4DFFFFFF" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.000000,8.600000c-1.600000,-0.700000 -3.600000,-1.300000 -6.000000,-1.300000c-5.300000,0.000000 -8.900000,3.000000 -9.200000,3.200000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.600000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.9,-1.800001z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml index 136a00435430..35a9138b31d2 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,14 +14,17 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24.0dp" - android:height="24.0dp" - android:viewportWidth="24.0" + android:width="32.0dp" + android:height="29.5dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.9,-1.800001z" - android:fillColor="#FFFFFF"/> + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml index 8bc872a99951..643c4f919d1b 100644 --- a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml +++ b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,14 +15,17 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="17.0dp" - android:height="17.0dp" + android:width="17dp" + android:height="17dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="?attr/fillColor"/> + android:pathData="M17.700001,8.000000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z" + android:fillColor="?attr/backgroundColor"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml index 8fa7630b0fae..64781c367227 100644 --- a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml +++ b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,17 +15,20 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="17.0dp" - android:height="17.0dp" + android:width="17dp" + android:height="17dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M10.0,14.6l-8.0,8.0l8.0,0.0l0,-8z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.7,20.0l2.0,0.0l0.0,2.0l-2.0,0.0z"/> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.7,10.0l2.0,0.0l0.0,8.1l-2.0,0.0z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/backgroundColor" + android:pathData="M17.7,8.0l4.299999,0.0 0.0,-6.0 -20.0,20.0 15.700001,0.0z"/> + <path + android:fillColor="?attr/fillColor" + android:pathData="M10.1,13.9l-8.1,8.1 8.1,0.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml index 2a660a39d510..eb2be08af5f1 100644 --- a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml +++ b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,17 +15,20 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="17.0dp" - android:height="17.0dp" + android:width="17dp" + android:height="17dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M14.0,10.6l-12.0,12.0l12.0,0.0L14.0,10.6z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/fillColor" + android:pathData="M13.900000,10.000000l-11.900000,12.000000 11.900000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="?attr/fillColor"/> + android:pathData="M17.700001,8.000000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z" + android:fillColor="?attr/backgroundColor"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml index 9e0a43353eea..22afad085231 100644 --- a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml +++ b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,17 +15,20 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="17.0dp" - android:height="17.0dp" + android:width="17dp" + android:height="17dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,19.900000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,9.900000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M16.700001,7.200000l-14.700001,14.700000 14.700001,0.000000z"/> <path - android:pathData="M14.1,14.1l2.9,0.0 0.0,-6.5 -15.0,15.0 12.1,0.0z" - android:fillColor="?attr/fillColor"/> + android:pathData="M17.700001,7.900000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z" + android:fillColor="?attr/backgroundColor"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml index 01f670311750..d1e866dfefb3 100644 --- a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml +++ b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,14 +15,18 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" - android:width="17.0dp" - android:height="17.0dp" + android:width="17dp" + android:height="17dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> + + <path + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> <path - android:pathData="M14.1,14.1l7.9,0.0 0.0,-11.5 -20.0,20.0 12.1,0.0z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> <path - android:pathData="M21.9,17.0l-1.1,-1.1 -1.9,1.9 -1.9,-1.9 -1.1,1.1 1.9,1.9 -1.9,1.9 1.1,1.1 1.9,-1.9 1.9,1.9 1.1,-1.1 -1.9,-1.9z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M2.000000,22.000000l15.700001,0.000000 0.000000,-14.000000 4.299999,0.000000 0.000000,-6.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml index 2de2e3640879..7f1b715e9a78 100644 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,13 +15,16 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18.41dp" - android:height="18.41dp" - android:viewportWidth="24.0" + android:height="17dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/backgroundColor" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.200000,-1.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.799999,-1.800001z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml index 144a7c1074e0..acd89bea9ea8 100644 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,16 +15,19 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18.41dp" - android:height="18.41dp" - android:viewportWidth="24.0" + android:height="17dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,13.2c-0.1,0.0 -0.3,-0.1 -0.4,-0.1c-0.1,0.0 -0.3,0.0 -0.4,-0.1c-0.3,0.0 -0.6,-0.1 -0.9,-0.1c0.0,0.0 0.0,0.0 -0.1,0.0c0.0,0.0 0.0,0.0 0.0,0.0s0.0,0.0 0.0,0.0c0.0,0.0 0.0,0.0 -0.1,0.0c-0.3,0.0 -0.6,0.0 -0.9,0.1c-0.1,0.0 -0.3,0.0 -0.4,0.1c-0.2,0.0 -0.3,0.1 -0.5,0.1c-0.2,0.0 -0.3,0.1 -0.5,0.1c-0.1,0.0 -0.1,0.0 -0.2,0.1c-1.6,0.5 -2.7,1.3 -2.8,1.5l5.3,6.6l0.0,0.0l0.0,0.0l0.0,0.0l0.0,0.0l1.8,-2.2L13.700002,13.2z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/backgroundColor" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M13.000000,22.000000l5.500000,-6.800000c-0.200000,-0.200000 -2.300000,-1.900000 -5.500000,-1.900000s-5.300000,1.800000 -5.500000,1.900000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.799999,-1.800001z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml index 6b7f71268162..f33b25c6261b 100644 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,16 +15,19 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18.41dp" - android:height="18.41dp" - android:viewportWidth="24.0" + android:height="17dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l4.9,0.0c-1.0,-0.7 -3.4,-2.2 -6.7,-2.2c-4.1,0.0 -6.9,2.2 -7.2,2.5l7.2,9.0l0.0,0.0l0.0,0.0l1.8,-2.2L13.800001,12.2z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/backgroundColor" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M19.000000,11.600000c-1.300000,-0.700000 -3.400000,-1.600000 -6.000000,-1.600000c-4.400000,0.000000 -7.300000,2.400000 -7.600000,2.700000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,11.600000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.800001,1.9 -1.800001,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.9,-1.800001z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml index d34b4debc5ee..09d2e5037bc9 100644 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,16 +15,19 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18.41dp" - android:height="18.41dp" - android:viewportWidth="24.0" + android:height="17dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l5.7,0.0l1.0,-1.2C20.0,10.6 16.8,8.0 12.0,8.0s-8.0,2.6 -8.5,3.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/backgroundColor" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="?attr/backgroundColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M19.000000,8.600000c-1.600000,-0.700000 -3.600000,-1.300000 -6.000000,-1.300000c-5.300000,0.000000 -8.900000,3.000000 -9.200000,3.200000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.600000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.9,-1.800001z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/fillColor" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml index 570135639183..fb1f584250e4 100644 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml @@ -1,7 +1,7 @@ <!-- - Copyright (C) 2016 The Android Open Source Project +Copyright (C) 2014 The Android Open Source Project - Licensed under the Apache License, Version 2.0 (the "License"); + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,13 +15,16 @@ --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18.41dp" - android:height="18.41dp" - android:viewportWidth="24.0" + android:height="17dp" + android:viewportWidth="26.0" android:viewportHeight="24.0"> <path - android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/> <path - android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.9,-1.800001z" - android:fillColor="?attr/fillColor"/> + android:fillColor="?attr/singleToneColor" + android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/> + <path + android:fillColor="?attr/singleToneColor" + android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/> </vector> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 8d44048b9582..71f40f1ac4dc 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -100,7 +100,7 @@ <!-- The default tiles to display in QuickSettings --> <string name="quick_settings_tiles_default" translatable="false"> - wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,location + wifi,cell,battery,dnd,flashlight,rotation,bt,airplane </string> <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" --> diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java index ec4f447d3a38..4edcb4b337ae 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java @@ -159,18 +159,15 @@ public class DozeService extends DreamService { // Ask the host to get things ready to start dozing. // Once ready, we call startDozing() at which point the CPU may suspend // and we will need to acquire a wakelock to do work. - mHost.startDozing(new Runnable() { - @Override - public void run() { - if (mDreaming) { - startDozing(); + mHost.startDozing(mWakeLock.wrap(() -> { + if (mDreaming) { + startDozing(); - // From this point until onDreamingStopped we will need to hold a - // wakelock whenever we are doing work. Note that we never call - // stopDozing because can we just keep dozing until the bitter end. - } + // From this point until onDreamingStopped we will need to hold a + // wakelock whenever we are doing work. Note that we never call + // stopDozing because can we just keep dozing until the bitter end. } - }); + })); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java index a63eabc8ad85..c7b6aea9c392 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java @@ -115,6 +115,12 @@ public class DataUsageDetailView extends LinearLayout { final TextView infoBottom = (TextView) findViewById(R.id.usage_info_bottom_text); infoBottom.setVisibility(bottom != null ? View.VISIBLE : View.GONE); infoBottom.setText(bottom); + boolean showLevel = info.warningLevel > 0 || info.limitLevel > 0; + graph.setVisibility(showLevel ? View.VISIBLE : View.GONE); + if (!showLevel) { + infoTop.setVisibility(View.GONE); + } + } private String formatBytes(long bytes) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java index e35ef4469773..bc4654823f77 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java @@ -593,6 +593,9 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView public void onAnimationEnd(Animator animation) { updateBackground(); mBackgroundAnimator = null; + if (mFadeInFromDarkAnimator == null) { + mDimmedBackgroundFadeInAmount = -1; + } } }); mBackgroundAnimator.addUpdateListener(mBackgroundVisibilityUpdater); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 5f4bd1d7c240..3e339d8b2940 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -130,7 +130,7 @@ public class NotificationStackScrollLayout extends ViewGroup private boolean mIsBeingDragged; private int mLastMotionY; private int mDownX; - private int mActivePointerId; + private int mActivePointerId = INVALID_POINTER; private boolean mTouchIsClick; private float mInitialTouchX; private float mInitialTouchY; @@ -4140,13 +4140,11 @@ public class NotificationStackScrollLayout extends ViewGroup final int rx = (int) ev.getRawX(); final int ry = (int) ev.getRawY(); - getLocationOnScreen(mTempInt2); - int[] location = new int[2]; - view.getLocationOnScreen(location); - final int x = location[0] - mTempInt2[0]; - final int y = location[1] - mTempInt2[1]; + view.getLocationOnScreen(mTempInt2); + final int x = mTempInt2[0]; + final int y = mTempInt2[1]; Rect rect = new Rect(x, y, x + view.getWidth(), y + height); - if (!rect.contains((int) rx, (int) ry)) { + if (!rect.contains(rx, ry)) { // Touch was outside visible guts / gear notification, close what's visible mPhoneStatusBar.dismissPopups(-1, -1, true /* resetGear */, true /* animate */); } diff --git a/services/core/java/com/android/server/dreams/DreamController.java b/services/core/java/com/android/server/dreams/DreamController.java index 9fa93f4b8a6c..3072f4387fb9 100644 --- a/services/core/java/com/android/server/dreams/DreamController.java +++ b/services/core/java/com/android/server/dreams/DreamController.java @@ -24,8 +24,10 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.Binder; +import android.os.Bundle; import android.os.Handler; import android.os.IBinder; +import android.os.IRemoteCallback; import android.os.PowerManager; import android.os.RemoteException; import android.os.IBinder.DeathRecipient; @@ -253,7 +255,8 @@ final class DreamController { private void attach(IDreamService service) { try { service.asBinder().linkToDeath(mCurrentDream, 0); - service.attach(mCurrentDream.mToken, mCurrentDream.mCanDoze); + service.attach(mCurrentDream.mToken, mCurrentDream.mCanDoze, + mCurrentDream.mDreamingStartedCallback); } catch (RemoteException ex) { Slog.e(TAG, "The dream service died unexpectedly.", ex); stopDream(true /*immediate*/); @@ -298,10 +301,10 @@ final class DreamController { mCanDoze = canDoze; mUserId = userId; mWakeLock = wakeLock; - // Hold the lock while we're waiting for the service to connect. Released either when - // DreamService connects (and is then responsible for keeping the device awake) or - // dreaming stops. + // Hold the lock while we're waiting for the service to connect and start dreaming. + // Released after the service has started dreaming, we stop dreaming, or it timed out. mWakeLock.acquire(); + mHandler.postDelayed(mReleaseWakeLockIfNeeded, 10000); } // May be called on any thread. @@ -324,25 +327,17 @@ final class DreamController { mHandler.post(new Runnable() { @Override public void run() { - try { - mConnected = true; - if (mCurrentDream == DreamRecord.this && mService == null) { - attach(IDreamService.Stub.asInterface(service)); - } - } finally { + mConnected = true; + if (mCurrentDream == DreamRecord.this && mService == null) { + attach(IDreamService.Stub.asInterface(service)); + // Wake lock will be released once dreaming starts. + } else { releaseWakeLockIfNeeded(); } } }); } - private void releaseWakeLockIfNeeded() { - if (mWakeLock != null) { - mWakeLock.release(); - mWakeLock = null; - } - } - // May be called on any thread. @Override public void onServiceDisconnected(ComponentName name) { @@ -356,5 +351,23 @@ final class DreamController { } }); } + + void releaseWakeLockIfNeeded() { + if (mWakeLock != null) { + mWakeLock.release(); + mWakeLock = null; + mHandler.removeCallbacks(mReleaseWakeLockIfNeeded); + } + } + + final Runnable mReleaseWakeLockIfNeeded = this::releaseWakeLockIfNeeded; + + final IRemoteCallback mDreamingStartedCallback = new IRemoteCallback.Stub() { + // May be called on any thread. + @Override + public void sendResult(Bundle data) throws RemoteException { + mHandler.post(mReleaseWakeLockIfNeeded); + } + }; } }
\ No newline at end of file diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java new file mode 100644 index 000000000000..cca9f10c630b --- /dev/null +++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java @@ -0,0 +1,312 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.server.emergency; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.Handler; +import android.os.HandlerThread; +import android.os.Looper; +import android.os.Message; +import android.provider.Settings; +import android.telephony.CellInfo; +import android.telephony.CellInfoGsm; +import android.telephony.CellInfoLte; +import android.telephony.CellInfoWcdma; +import android.telephony.CellLocation; +import android.telephony.PhoneStateListener; +import android.telephony.SubscriptionInfo; +import android.telephony.SubscriptionManager; +import android.telephony.TelephonyManager; + +import com.android.server.SystemService; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * A service that listens to connectivity and SIM card changes and determines if the emergency mode + * should be enabled + */ +public class EmergencyAffordanceService extends SystemService { + + private static final String TAG = "EmergencyAffordanceService"; + + private static final int NUM_SCANS_UNTIL_ABORT = 4; + + private static final int INITIALIZE_STATE = 1; + private static final int CELL_INFO_STATE_CHANGED = 2; + private static final int SUBSCRIPTION_CHANGED = 3; + + /** + * Global setting, whether the last scan of the sim cards reveal that a sim was inserted that + * requires the emergency affordance. The value is a boolean (1 or 0). + * @hide + */ + private static final String EMERGENCY_SIM_INSERTED_SETTING = "emergency_sim_inserted_before"; + + private final Context mContext; + private final ArrayList<Integer> mEmergencyCallMccNumbers; + + private final Object mLock = new Object(); + + private TelephonyManager mTelephonyManager; + private SubscriptionManager mSubscriptionManager; + private boolean mEmergencyAffordanceNeeded; + private MyHandler mHandler; + private int mScansCompleted; + private PhoneStateListener mPhoneStateListener = new PhoneStateListener() { + @Override + public void onCellInfoChanged(List<CellInfo> cellInfo) { + if (!isEmergencyAffordanceNeeded()) { + requestCellScan(); + } + } + + @Override + public void onCellLocationChanged(CellLocation location) { + if (!isEmergencyAffordanceNeeded()) { + requestCellScan(); + } + } + }; + private BroadcastReceiver mAirplaneModeReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + if (Settings.Global.getInt(context.getContentResolver(), + Settings.Global.AIRPLANE_MODE_ON, 0) == 0) { + startScanning(); + requestCellScan(); + } + } + }; + private boolean mSimNeedsEmergencyAffordance; + private boolean mNetworkNeedsEmergencyAffordance; + + private void requestCellScan() { + mHandler.obtainMessage(CELL_INFO_STATE_CHANGED).sendToTarget(); + } + + private SubscriptionManager.OnSubscriptionsChangedListener mSubscriptionChangedListener + = new SubscriptionManager.OnSubscriptionsChangedListener() { + @Override + public void onSubscriptionsChanged() { + mHandler.obtainMessage(SUBSCRIPTION_CHANGED).sendToTarget(); + } + }; + + public EmergencyAffordanceService(Context context) { + super(context); + mContext = context; + int[] numbers = context.getResources().getIntArray( + com.android.internal.R.array.config_emergency_mcc_codes); + mEmergencyCallMccNumbers = new ArrayList<>(numbers.length); + for (int i = 0; i < numbers.length; i++) { + mEmergencyCallMccNumbers.add(numbers[i]); + } + } + + private void updateEmergencyAffordanceNeeded() { + synchronized (mLock) { + mEmergencyAffordanceNeeded = mSimNeedsEmergencyAffordance || + mNetworkNeedsEmergencyAffordance; + Settings.Global.putInt(mContext.getContentResolver(), + Settings.Global.EMERGENCY_AFFORDANCE_NEEDED, + mEmergencyAffordanceNeeded ? 1 : 0); + if (mEmergencyAffordanceNeeded) { + stopScanning(); + } + } + } + + private void stopScanning() { + synchronized (mLock) { + mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); + mScansCompleted = 0; + } + } + + private boolean isEmergencyAffordanceNeeded() { + synchronized (mLock) { + return mEmergencyAffordanceNeeded; + } + } + + @Override + public void onStart() { + } + + @Override + public void onBootPhase(int phase) { + if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) { + mTelephonyManager = mContext.getSystemService(TelephonyManager.class); + mSubscriptionManager = SubscriptionManager.from(mContext); + HandlerThread thread = new HandlerThread(TAG); + thread.start(); + mHandler = new MyHandler(thread.getLooper()); + mHandler.obtainMessage(INITIALIZE_STATE).sendToTarget(); + startScanning(); + IntentFilter filter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED); + mContext.registerReceiver(mAirplaneModeReceiver, filter); + mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionChangedListener); + } + } + + private void startScanning() { + mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_INFO + | PhoneStateListener.LISTEN_CELL_LOCATION); + } + + /** Handler to do the heavier work on */ + private class MyHandler extends Handler { + + public MyHandler(Looper l) { + super(l); + } + + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case INITIALIZE_STATE: + handleInitializeState(); + break; + case CELL_INFO_STATE_CHANGED: + handleUpdateCellInfo(); + break; + case SUBSCRIPTION_CHANGED: + handleUpdateSimSubscriptionInfo(); + break; + } + } + } + + private void handleInitializeState() { + if (handleUpdateSimSubscriptionInfo()) { + return; + } + if (handleUpdateCellInfo()) { + return; + } + updateEmergencyAffordanceNeeded(); + } + + private boolean handleUpdateSimSubscriptionInfo() { + boolean neededBefore = simNeededAffordanceBefore(); + boolean neededNow = neededBefore; + List<SubscriptionInfo> activeSubscriptionInfoList = + mSubscriptionManager.getActiveSubscriptionInfoList(); + if (activeSubscriptionInfoList == null) { + return neededNow; + } + for (SubscriptionInfo info : activeSubscriptionInfoList) { + int mcc = info.getMcc(); + if (mccRequiresEmergencyAffordance(mcc)) { + neededNow = true; + break; + } else if (mcc != 0 && mcc != Integer.MAX_VALUE){ + // a Sim with a different mcc code was found + neededNow = false; + } + String simOperator = mTelephonyManager.getSimOperator(info.getSubscriptionId()); + mcc = 0; + if (simOperator != null && simOperator.length() >= 3) { + mcc = Integer.parseInt(simOperator.substring(0, 3)); + } + if (mcc != 0) { + if (mccRequiresEmergencyAffordance(mcc)) { + neededNow = true; + break; + } else { + // a Sim with a different mcc code was found + neededNow = false; + } + } + } + if (neededNow != neededBefore) { + setSimNeedsEmergencyAffordance(neededNow); + } + return neededNow; + } + + private void setSimNeedsEmergencyAffordance(boolean simNeedsEmergencyAffordance) { + mSimNeedsEmergencyAffordance = simNeedsEmergencyAffordance; + Settings.Global.putInt(mContext.getContentResolver(), + EMERGENCY_SIM_INSERTED_SETTING, + simNeedsEmergencyAffordance ? 1 : 0); + updateEmergencyAffordanceNeeded(); + } + + private boolean simNeededAffordanceBefore() { + return Settings.Global.getInt(mContext.getContentResolver(), + "emergency_sim_inserted_before", 0) != 0; + } + + private boolean handleUpdateCellInfo() { + List<CellInfo> cellInfos = mTelephonyManager.getAllCellInfo(); + if (cellInfos == null) { + return false; + } + boolean stopScanningAfterScan = false; + for (CellInfo cellInfo : cellInfos) { + int mcc = 0; + if (cellInfo instanceof CellInfoGsm) { + mcc = ((CellInfoGsm) cellInfo).getCellIdentity().getMcc(); + } else if (cellInfo instanceof CellInfoLte) { + mcc = ((CellInfoLte) cellInfo).getCellIdentity().getMcc(); + } else if (cellInfo instanceof CellInfoWcdma) { + mcc = ((CellInfoWcdma) cellInfo).getCellIdentity().getMcc(); + } + if (mccRequiresEmergencyAffordance(mcc)) { + setNetworkNeedsEmergencyAffordance(true); + return true; + } else if (mcc != 0 && mcc != Integer.MAX_VALUE) { + // we found an mcc that isn't in the list, abort + stopScanningAfterScan = true; + } + } + if (stopScanningAfterScan) { + stopScanning(); + } else { + onCellScanFinishedUnsuccessful(); + } + setNetworkNeedsEmergencyAffordance(false); + return false; + } + + private void setNetworkNeedsEmergencyAffordance(boolean needsAffordance) { + synchronized (mLock) { + mNetworkNeedsEmergencyAffordance = needsAffordance; + updateEmergencyAffordanceNeeded(); + } + } + + private void onCellScanFinishedUnsuccessful() { + synchronized (mLock) { + mScansCompleted++; + if (mScansCompleted >= NUM_SCANS_UNTIL_ABORT) { + stopScanning(); + } + } + } + + private boolean mccRequiresEmergencyAffordance(int mcc) { + return mEmergencyCallMccNumbers.contains(mcc); + } +} diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java index bb91f76ecf30..a8bd4d289616 100644 --- a/services/core/java/com/android/server/policy/GlobalActions.java +++ b/services/core/java/com/android/server/policy/GlobalActions.java @@ -20,6 +20,7 @@ import com.android.internal.app.AlertController; import com.android.internal.app.AlertController.AlertParams; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto.MetricsEvent; +import com.android.internal.policy.EmergencyAffordanceManager; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.telephony.TelephonyProperties; import com.android.internal.R; @@ -27,7 +28,6 @@ import com.android.internal.widget.LockPatternUtils; import android.app.ActivityManager; import android.app.ActivityManagerNative; -import android.app.AlertDialog; import android.app.Dialog; import android.content.BroadcastReceiver; import android.content.Context; @@ -125,6 +125,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac private boolean mHasTelephony; private boolean mHasVibrator; private final boolean mShowSilentToggle; + private final EmergencyAffordanceManager mEmergencyAffordanceManager; /** * @param context everything needs a context :( @@ -159,6 +160,8 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac mShowSilentToggle = SHOW_SILENT_TOGGLE && !mContext.getResources().getBoolean( com.android.internal.R.bool.config_useFixedVolume); + + mEmergencyAffordanceManager = new EmergencyAffordanceManager(context); } /** @@ -308,6 +311,10 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac addedKeys.add(actionKey); } + if (mEmergencyAffordanceManager.needsEmergencyAffordance()) { + mItems.add(getEmergencyAction()); + } + mAdapter = new MyAdapter(); AlertParams params = new AlertParams(mContext); @@ -493,6 +500,26 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac }; } + private Action getEmergencyAction() { + return new SinglePressAction(com.android.internal.R.drawable.emergency_icon, + R.string.global_action_emergency) { + @Override + public void onPress() { + mEmergencyAffordanceManager.performEmergencyCall(); + } + + @Override + public boolean showDuringKeyguard() { + return true; + } + + @Override + public boolean showBeforeProvisioning() { + return true; + } + }; + } + private Action getAssistAction() { return new SinglePressAction(com.android.internal.R.drawable.ic_action_assist_focused, R.string.global_action_assist) { diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 0c0fe8b9d4f3..c2ffa9bbab15 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -3029,8 +3029,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { throw new IllegalStateException(e); } if (ai == null) { - throw new IllegalStateException("Couldn't find package to remove admin " - + packageName + " " + userHandle); + throw new IllegalStateException("Couldn't find package: " + + packageName + " on user " + userHandle); } return (ai.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0; } diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 61d5066b8ada..7ebdd3109a2c 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -16,7 +16,6 @@ package com.android.server; -import android.app.ActivityManagerNative; import android.app.ActivityThread; import android.app.INotificationManager; import android.app.usage.UsageStatsManagerInternal; @@ -32,7 +31,6 @@ import android.os.Build; import android.os.Environment; import android.os.FactoryTest; import android.os.FileUtils; -import android.os.IPowerManager; import android.os.Looper; import android.os.PowerManager; import android.os.RemoteException; @@ -55,6 +53,7 @@ import com.android.internal.app.NightDisplayController; import com.android.internal.os.BinderInternal; import com.android.internal.os.SamplingProfilerIntegration; import com.android.internal.os.ZygoteInit; +import com.android.internal.policy.EmergencyAffordanceManager; import com.android.internal.widget.ILockSettings; import com.android.server.accessibility.AccessibilityManagerService; import com.android.server.am.ActivityManagerService; @@ -67,6 +66,7 @@ import com.android.server.devicepolicy.DevicePolicyManagerService; import com.android.server.display.DisplayManagerService; import com.android.server.display.NightDisplayService; import com.android.server.dreams.DreamManagerService; +import com.android.server.emergency.EmergencyAffordanceService; import com.android.server.fingerprint.FingerprintService; import com.android.server.hdmi.HdmiControlService; import com.android.server.input.InputManagerService; @@ -1085,6 +1085,11 @@ public final class SystemServer { Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER); } + if (!disableNetwork && !disableNonCoreServices && EmergencyAffordanceManager.ENABLED) { + // EmergencyMode sevice + mSystemServiceManager.startService(EmergencyAffordanceService.class); + } + if (!disableNonCoreServices) { // Dreams (interactive idle-time views, a/k/a screen savers, and doze mode) mSystemServiceManager.startService(DreamManagerService.class); diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java index c80ca6c996a2..b4b74b3ec10a 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java @@ -131,7 +131,7 @@ public abstract class DpmTestBase extends AndroidTestCase { doReturn(ai).when(mMockContext.ipackageManager).getApplicationInfo( eq(admin.getPackageName()), - eq(PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS), + anyInt(), eq(UserHandle.getUserId(packageUid))); // Set up queryBroadcastReceivers(). |