summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/AndroidManifest.xml4
-rw-r--r--packages/SystemUI/res/values-fr/strings.xml4
-rw-r--r--packages/SystemUI/res/values-ko/strings.xml6
-rw-r--r--packages/SystemUI/res/values-sk/strings.xml4
-rw-r--r--packages/SystemUI/res/values-tl/strings.xml2
-rw-r--r--packages/SystemUI/res/values-zh-rCN/strings.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java40
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/Constants.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/Recents.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java33
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java21
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java30
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java20
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogMotion.java8
27 files changed, 232 insertions, 62 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 7c56d63..b41e1ac 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -25,7 +25,8 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" />
+ <!-- Used to read storage for all users -->
+ <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INJECT_EVENTS" />
@@ -51,6 +52,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
+ <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.OVERRIDE_WIFI_CONFIG" />
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 286aa32..39f7a33 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -22,7 +22,7 @@
<string name="app_label" msgid="7164937344850004466">"Interface du système"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Effacer"</string>
<string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Supprimer de la liste"</string>
- <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informations sur l\'application"</string>
+ <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Infos application"</string>
<string name="status_bar_no_recent_apps" msgid="7374907845131203189">"Vos écrans récents s\'affichent ici"</string>
<string name="status_bar_accessibility_dismiss_recents" msgid="4576076075226540105">"Masquer les applications récentes"</string>
<plurals name="status_bar_accessibility_recent_apps" formatted="false" msgid="9138535907802238759">
@@ -298,7 +298,7 @@
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> au maximum"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Avertissement : <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="recents_empty_message" msgid="8682129509540827999">"Vos écrans récents s\'affichent ici"</string>
- <string name="recents_app_info_button_label" msgid="2890317189376000030">"Informations sur l\'application"</string>
+ <string name="recents_app_info_button_label" msgid="2890317189376000030">"Infos application"</string>
<string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"épinglage d\'écran"</string>
<string name="recents_search_bar_label" msgid="8074997400187836677">"rechercher"</string>
<string name="recents_launch_error_message" msgid="2969287838120550506">"Impossible de lancer <xliff:g id="APP">%s</xliff:g>."</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 18018d9..aac76c6 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -244,7 +244,7 @@
<string name="ethernet_label" msgid="7967563676324087464">"이더넷"</string>
<string name="quick_settings_dnd_label" msgid="8735855737575028208">"알림 일시중지"</string>
<string name="quick_settings_dnd_priority_label" msgid="483232950670692036">"중요 알림만"</string>
- <string name="quick_settings_dnd_alarms_label" msgid="2559229444312445858">"알람만 수신"</string>
+ <string name="quick_settings_dnd_alarms_label" msgid="2559229444312445858">"알람만"</string>
<string name="quick_settings_dnd_none_label" msgid="5025477807123029478">"모두 차단"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"블루투스"</string>
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"블루투스(<xliff:g id="NUMBER">%d</xliff:g>개의 기기)"</string>
@@ -326,10 +326,10 @@
<string name="interruption_level_none_with_warning" msgid="5114872171614161084">"전체 무음입니다. 이렇게 하면 스크린 리더도 무음으로 설정됩니다."</string>
<string name="interruption_level_none" msgid="6000083681244492992">"모두 차단"</string>
<string name="interruption_level_priority" msgid="6426766465363855505">"중요 알림만"</string>
- <string name="interruption_level_alarms" msgid="5226306993448328896">"알람만 수신"</string>
+ <string name="interruption_level_alarms" msgid="5226306993448328896">"알람만"</string>
<string name="interruption_level_none_twoline" msgid="3957581548190765889">"모두\n차단"</string>
<string name="interruption_level_priority_twoline" msgid="1564715335217164124">"중요 알림만\n허용"</string>
- <string name="interruption_level_alarms_twoline" msgid="3266909566410106146">"알람만\n수신"</string>
+ <string name="interruption_level_alarms_twoline" msgid="3266909566410106146">"알람만\n"</string>
<string name="keyguard_indication_charging_time" msgid="1757251776872835768">"충전 중(<xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g> 후 충전 완료)"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"사용자 전환"</string>
<string name="accessibility_multi_user_switch_switcher_with_current" msgid="8434880595284601601">"사용자 전환, 현재 사용자 <xliff:g id="CURRENT_USER_NAME">%s</xliff:g>"</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 65e0cd5..67a7418 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -65,8 +65,8 @@
<string name="usb_debugging_title" msgid="4513918393387141949">"Povoliť ladenie USB?"</string>
<string name="usb_debugging_message" msgid="2220143855912376496">"Digitálny odtlačok RSA počítača je:\n<xliff:g id="FINGERPRINT">%1$s</xliff:g>"</string>
<string name="usb_debugging_always" msgid="303335496705863070">"Vždy povoliť z tohto počítača"</string>
- <string name="usb_debugging_secondary_user_title" msgid="6353808721761220421">"Ladenie USB nie je povolené"</string>
- <string name="usb_debugging_secondary_user_message" msgid="6011931347142270156">"Používateľ, ktorý je práve prihlásený na tomto zariadení, nemôže zapnúť ladenie USB. Ak chcete použiť túto funkciu, prepnite na hlavného používateľa <xliff:g id="NAME">%s</xliff:g>."</string>
+ <string name="usb_debugging_secondary_user_title" msgid="6353808721761220421">"Ladenie cez USB nie je povolené"</string>
+ <string name="usb_debugging_secondary_user_message" msgid="6011931347142270156">"Používateľ, ktorý je práve prihlásený na tomto zariadení, nemôže zapnúť ladenie cez USB. Ak chcete použiť túto funkciu, prepnite na hlavného používateľa <xliff:g id="NAME">%s</xliff:g>."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"Priblížiť na celú obrazovku"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"Na celú obrazovku"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"Prebieha ukladanie snímky obrazovky..."</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 0d0ee09..26ebdcf 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -279,7 +279,7 @@
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="8790919884718619648">"I-invert ang mga kulay"</string>
- <string name="quick_settings_color_space_label" msgid="853443689745584770">"Mode ng pagtatama ng kulay"</string>
+ <string name="quick_settings_color_space_label" msgid="853443689745584770">"Correction mode ng kulay"</string>
<string name="quick_settings_more_settings" msgid="326112621462813682">"Marami pang setting"</string>
<string name="quick_settings_done" msgid="3402999958839153376">"Tapos na"</string>
<string name="quick_settings_connected" msgid="1722253542984847487">"Nakakonekta"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 618cf09..18aa25c 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -247,7 +247,7 @@
<string name="quick_settings_dnd_label" msgid="8735855737575028208">"勿扰"</string>
<string name="quick_settings_dnd_priority_label" msgid="483232950670692036">"仅限优先打扰"</string>
<string name="quick_settings_dnd_alarms_label" msgid="2559229444312445858">"仅限闹钟"</string>
- <string name="quick_settings_dnd_none_label" msgid="5025477807123029478">"完全静音"</string>
+ <string name="quick_settings_dnd_none_label" msgid="5025477807123029478">"完全阻止"</string>
<string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"蓝牙"</string>
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"蓝牙(<xliff:g id="NUMBER">%d</xliff:g> 台设备)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"蓝牙:关闭"</string>
@@ -326,7 +326,7 @@
<string name="voice_hint" msgid="8939888732119726665">"滑动图标即可打开语音助理"</string>
<string name="camera_hint" msgid="7939688436797157483">"滑动图标即可打开相机"</string>
<string name="interruption_level_none_with_warning" msgid="5114872171614161084">"完全静音。此模式也会将屏幕阅读器静音。"</string>
- <string name="interruption_level_none" msgid="6000083681244492992">"完全静音"</string>
+ <string name="interruption_level_none" msgid="6000083681244492992">"完全阻止"</string>
<string name="interruption_level_priority" msgid="6426766465363855505">"仅限优先打扰"</string>
<string name="interruption_level_alarms" msgid="5226306993448328896">"仅限闹钟"</string>
<string name="interruption_level_none_twoline" msgid="3957581548190765889">"完全\n静音"</string>
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index 6acd137..9f6d8df 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -38,7 +38,9 @@ import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.WindowManager;
+import java.io.FileDescriptor;
import java.io.IOException;
+import java.io.PrintWriter;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
@@ -147,6 +149,10 @@ public class ImageWallpaper extends WallpaperService {
private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0;
private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3;
+ private int mRotationAtLastSurfaceSizeUpdate = -1;
+ private int mDisplayWidthAtLastSurfaceSizeUpdate = -1;
+ private int mDisplayHeightAtLastSurfaceSizeUpdate = -1;
+
public DrawableEngine() {
super();
setFixedSizeAllowed(true);
@@ -315,6 +321,9 @@ public class ImageWallpaper extends WallpaperService {
if (newRotation != mLastRotation) {
// Update surface size (if necessary)
updateSurfaceSize(getSurfaceHolder(), displayInfo);
+ mRotationAtLastSurfaceSizeUpdate = newRotation;
+ mDisplayWidthAtLastSurfaceSizeUpdate = displayInfo.logicalWidth;
+ mDisplayHeightAtLastSurfaceSizeUpdate = displayInfo.logicalHeight;
}
SurfaceHolder sh = getSurfaceHolder();
final Rect frame = sh.getSurfaceFrame();
@@ -449,6 +458,37 @@ public class ImageWallpaper extends WallpaperService {
}
}
+ @Override
+ protected void dump(String prefix, FileDescriptor fd, PrintWriter out, String[] args) {
+ super.dump(prefix, fd, out, args);
+
+ out.print(prefix); out.println("ImageWallpaper.DrawableEngine:");
+ out.print(prefix); out.print(" mBackground="); out.print(mBackground);
+ out.print(" mBackgroundWidth="); out.print(mBackgroundWidth);
+ out.print(" mBackgroundHeight="); out.println(mBackgroundHeight);
+
+ out.print(prefix); out.print(" mLastRotation="); out.print(mLastRotation);
+ out.print(" mLastSurfaceWidth="); out.print(mLastSurfaceWidth);
+ out.print(" mLastSurfaceHeight="); out.println(mLastSurfaceHeight);
+
+ out.print(prefix); out.print(" mXOffset="); out.print(mXOffset);
+ out.print(" mYOffset="); out.println(mYOffset);
+
+ out.print(prefix); out.print(" mVisible="); out.print(mVisible);
+ out.print(" mRedrawNeeded="); out.print(mRedrawNeeded);
+ out.print(" mOffsetsChanged="); out.println(mOffsetsChanged);
+
+ out.print(prefix); out.print(" mLastXTranslation="); out.print(mLastXTranslation);
+ out.print(" mLastYTranslation="); out.print(mLastYTranslation);
+ out.print(" mScale="); out.println(mScale);
+
+ out.print(prefix); out.println(" DisplayInfo at last updateSurfaceSize:");
+ out.print(prefix);
+ out.print(" rotation="); out.print(mRotationAtLastSurfaceSizeUpdate);
+ out.print(" width="); out.print(mDisplayWidthAtLastSurfaceSizeUpdate);
+ out.print(" height="); out.println(mDisplayHeightAtLastSurfaceSizeUpdate);
+ }
+
private void drawWallpaperWithCanvas(SurfaceHolder sh, int w, int h, int left, int top) {
Canvas c = sh.lockCanvas();
if (c != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java b/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java
index 7eed7f2..e9a256c 100644
--- a/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java
+++ b/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java
@@ -92,7 +92,8 @@ public class RingtonePlayer extends SystemUI {
private IRingtonePlayer mCallback = new IRingtonePlayer.Stub() {
@Override
- public void play(IBinder token, Uri uri, AudioAttributes aa) throws RemoteException {
+ public void play(IBinder token, Uri uri, AudioAttributes aa, float volume, boolean looping)
+ throws RemoteException {
if (LOGD) {
Log.d(TAG, "play(token=" + token + ", uri=" + uri + ", uid="
+ Binder.getCallingUid() + ")");
@@ -107,6 +108,8 @@ public class RingtonePlayer extends SystemUI {
mClients.put(token, client);
}
}
+ client.mRingtone.setLooping(looping);
+ client.mRingtone.setVolume(volume);
client.mRingtone.play();
}
@@ -138,6 +141,19 @@ public class RingtonePlayer extends SystemUI {
}
@Override
+ public void setPlaybackProperties(IBinder token, float volume, boolean looping) {
+ Client client;
+ synchronized (mClients) {
+ client = mClients.get(token);
+ }
+ if (client != null) {
+ client.mRingtone.setVolume(volume);
+ client.mRingtone.setLooping(looping);
+ }
+ // else no client for token when setting playback properties but will be set at play()
+ }
+
+ @Override
public void playAsync(Uri uri, UserHandle user, boolean looping, AudioAttributes aa) {
if (LOGD) Log.d(TAG, "playAsync(uri=" + uri + ", user=" + user + ")");
if (Binder.getCallingUid() != Process.SYSTEM_UID) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
index c33ef7c..3bfff2f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
@@ -144,7 +144,7 @@ public class WifiTile extends QSTile<QSTile.SignalState> {
state.label = removeDoubleQuotes(cb.enabledDesc);
signalContentDescription = cb.wifiSignalContentDescription;
} else if (wifiNotConnected) {
- state.icon = ResourceIcon.get(R.drawable.ic_qs_wifi_0);
+ state.icon = ResourceIcon.get(R.drawable.ic_qs_wifi_full_0);
state.label = r.getString(R.string.quick_settings_wifi_label);
signalContentDescription = r.getString(R.string.accessibility_no_wifi);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Constants.java b/packages/SystemUI/src/com/android/systemui/recents/Constants.java
index 18c213d..a4acf83 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Constants.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Constants.java
@@ -20,6 +20,14 @@ package com.android.systemui.recents;
* Constants
*/
public class Constants {
+
+ public static class Metrics {
+ // DO NOT MODIFY THE ORDER OF THESE METRICS
+ public static final int DismissSourceKeyboard = 0;
+ public static final int DismissSourceSwipeGesture = 1;
+ public static final int DismissSourceHeaderButton = 2;
+ }
+
public static class DebugFlags {
// Enable this with any other debug flag to see more info
public static final boolean Verbose = false;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
index 6a45369..8c2ac88 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java
@@ -39,6 +39,8 @@ import android.util.MutableBoolean;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
+
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.RecentsComponent;
@@ -453,6 +455,9 @@ public class Recents extends SystemUI
return;
}
+ // Keep track of actually launched affiliated tasks
+ MetricsLogger.count(mContext, "overview_affiliated_task_launch", 1);
+
// Launch the task
if (toTask.isActive) {
// Bring an active task to the foreground
@@ -465,11 +470,15 @@ public class Recents extends SystemUI
@Override
public void showNextAffiliatedTask() {
+ // Keep track of when the affiliated task is triggered
+ MetricsLogger.count(mContext, "overview_affiliated_task_next", 1);
showRelativeAffiliatedTask(true);
}
@Override
public void showPrevAffiliatedTask() {
+ // Keep track of when the affiliated task is triggered
+ MetricsLogger.count(mContext, "overview_affiliated_task_prev", 1);
showRelativeAffiliatedTask(false);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index bf15c68..789457d 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -33,6 +33,8 @@ import android.view.View;
import android.view.ViewStub;
import android.widget.Toast;
+import com.android.internal.logging.MetricsConstants;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.recents.misc.Console;
@@ -224,6 +226,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
// Mark the task that is the launch target
int taskStackCount = stacks.size();
+ int launchTaskIndexInStack = 0;
if (mConfig.launchedToTaskId != -1) {
for (int i = 0; i < taskStackCount; i++) {
TaskStack stack = stacks.get(i);
@@ -233,6 +236,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
Task t = tasks.get(j);
if (t.key.id == mConfig.launchedToTaskId) {
t.isLaunchTarget = true;
+ launchTaskIndexInStack = tasks.size() - j - 1;
break;
}
}
@@ -259,6 +263,28 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
// Animate the SystemUI scrims into view
mScrimViews.prepareEnterRecentsAnimation();
+
+ // Keep track of whether we launched from the nav bar button or via alt-tab
+ if (mConfig.launchedWithAltTab) {
+ MetricsLogger.count(this, "overview_trigger_alttab", 1);
+ } else {
+ MetricsLogger.count(this, "overview_trigger_nav_btn", 1);
+ }
+ // Keep track of whether we launched from an app or from home
+ if (mConfig.launchedFromAppWithThumbnail) {
+ MetricsLogger.count(this, "overview_source_app", 1);
+ // If from an app, track the stack index of the app in the stack (for affiliated tasks)
+ MetricsLogger.histogram(this, "overview_source_app_index", launchTaskIndexInStack);
+ } else {
+ MetricsLogger.count(this, "overview_source_home", 1);
+ }
+ // Keep track of the total stack task count
+ int taskCount = 0;
+ for (int i = 0; i < stacks.size(); i++) {
+ TaskStack stack = stacks.get(i);
+ taskCount += stack.getTaskCount();
+ }
+ MetricsLogger.histogram(this, "overview_task_count", taskCount);
}
/** Dismisses recents if we are already visible and the intent is to toggle the recents view */
@@ -374,6 +400,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
@Override
protected void onStart() {
super.onStart();
+ MetricsLogger.visible(this, MetricsLogger.OVERVIEW_ACTIVITY);
RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
SystemServicesProxy ssp = loader.getSystemServicesProxy();
Recents.notifyVisibilityChanged(this, ssp, true);
@@ -414,6 +441,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
@Override
protected void onStop() {
super.onStop();
+ MetricsLogger.hidden(this, MetricsLogger.OVERVIEW_ACTIVITY);
RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
SystemServicesProxy ssp = loader.getSystemServicesProxy();
Recents.notifyVisibilityChanged(this, ssp, false);
@@ -498,6 +526,9 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
case KeyEvent.KEYCODE_DEL:
case KeyEvent.KEYCODE_FORWARD_DEL: {
mRecentsView.dismissFocusedTask();
+ // Keep track of deletions by keyboard
+ MetricsLogger.histogram(this, "overview_task_dismissed_source",
+ Constants.Metrics.DismissSourceKeyboard);
return true;
}
default:
@@ -591,6 +622,8 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
SystemServicesProxy ssp = loader.getSystemServicesProxy();
Recents.startScreenPinning(this, ssp);
+
+ MetricsLogger.count(this, "overview_screen_pinned", 1);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
index 6cb11b1..947c19c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
@@ -37,6 +37,7 @@ import android.view.WindowInsets;
import android.view.WindowManagerGlobal;
import android.widget.FrameLayout;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsAppWidgetHostView;
@@ -589,11 +590,22 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
if (mCb != null) {
mCb.onTaskLaunchFailed();
}
+
+ // Keep track of failed launches
+ MetricsLogger.count(getContext(), "overview_task_launch_failed", 1);
}
}
}
};
+ // Keep track of the index of the task launch
+ int taskIndexFromFront = 0;
+ int taskIndex = stack.indexOfTask(task);
+ if (taskIndex > -1) {
+ taskIndexFromFront = stack.getTaskCount() - taskIndex - 1;
+ }
+ MetricsLogger.histogram(getContext(), "overview_task_launch_index", taskIndexFromFront);
+
// Launch the app right away if there is no task view, otherwise, animate the icon out first
if (tv == null) {
launchRunnable.run();
@@ -644,6 +656,9 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
}
mCb.onAllTaskViewsDismissed();
+
+ // Keep track of all-deletions
+ MetricsLogger.count(getContext(), "overview_task_all_dismissed", 1);
}
/** Final callback after Recents is finally hidden. */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index ebfc796..abdebf3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -29,6 +29,8 @@ import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.FrameLayout;
+
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
@@ -1361,6 +1363,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
public void onTaskViewAppInfoClicked(TaskView tv) {
if (mCb != null) {
mCb.onTaskViewAppInfoClicked(tv.getTask());
+
+ // Keep track of app-info invocations
+ MetricsLogger.count(getContext(), "overview_app_info", 1);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
index 13bdbd2..78b3512 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
@@ -23,6 +23,7 @@ import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewParent;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsConfiguration;
@@ -452,6 +453,9 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
tv.setTouchEnabled(true);
// Remove the task view from the stack
mSv.onTaskViewDismissed(tv);
+ // Keep track of deletions by keyboard
+ MetricsLogger.histogram(tv.getContext(), "overview_task_dismissed_source",
+ Constants.Metrics.DismissSourceSwipeGesture);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 5906ef1..cbfe842 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -27,6 +27,7 @@ import android.view.View;
import android.view.ViewOutlineProvider;
import android.view.animation.AccelerateInterpolator;
import android.widget.FrameLayout;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
@@ -741,6 +742,9 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
}
} else if (v == mHeaderView.mDismissButton) {
dismissTask();
+ // Keep track of deletions by the dismiss button
+ MetricsLogger.histogram(getContext(), "overview_task_dismissed_source",
+ Constants.Metrics.DismissSourceHeaderButton);
} else if (v == mHeaderView.mMoveTaskButton) {
if (mCb != null) {
mCb.onTaskResize(tv);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
index 08a6603..ccec759 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
@@ -44,6 +44,7 @@ public abstract class ExpandableView extends FrameLayout {
private int mClipTopOptimization;
private static Rect mClipRect = new Rect();
private boolean mWillBeGone;
+ private int mMinClipTopAmount = 0;
public ExpandableView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -400,6 +401,14 @@ public abstract class ExpandableView extends FrameLayout {
mWillBeGone = willBeGone;
}
+ public int getMinClipTopAmount() {
+ return mMinClipTopAmount;
+ }
+
+ public void setMinClipTopAmount(int minClipTopAmount) {
+ mMinClipTopAmount = minClipTopAmount;
+ }
+
/**
* A listener notifying when {@link #getActualHeight} changes.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
index 0877ff9..6670ae0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
@@ -68,25 +68,11 @@ public class KeyguardAffordanceHelper {
private View mTargetedView;
private boolean mTouchSlopExeeded;
private AnimatorListenerAdapter mFlingEndListener = new AnimatorListenerAdapter() {
- public boolean mCancelled;
-
@Override
public void onAnimationEnd(Animator animation) {
mSwipeAnimator = null;
mSwipingInProgress = false;
- if (!mCancelled) {
- mTargetedView = null;
- }
- }
-
- @Override
- public void onAnimationCancel(Animator animation) {
- mCancelled = true;
- }
-
- @Override
- public void onAnimationStart(Animator animation) {
- mCancelled = false;
+ mTargetedView = null;
}
};
private Runnable mAnimationEndRunnable = new Runnable() {
@@ -290,7 +276,6 @@ public class KeyguardAffordanceHelper {
* Phase 2: Move back.
*/
private void startUnlockHintAnimationPhase2(boolean right, final Runnable onFinishedListener) {
- final KeyguardAffordanceView targetView = right ? mRightIcon : mLeftIcon;
ValueAnimator animator = getAnimatorToRadius(right, 0);
animator.addListener(new AnimatorListenerAdapter() {
@Override
@@ -513,9 +498,7 @@ public class KeyguardAffordanceHelper {
}
public void reset(boolean animate) {
- if (mSwipeAnimator != null) {
- mSwipeAnimator.cancel();
- }
+ cancelAnimation();
setTranslation(0.0f, true, animate);
mMotionCancelled = true;
if (mSwipingInProgress) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
index 7072dcb..950b162 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
@@ -25,8 +25,6 @@ import com.android.systemui.statusbar.StatusBarState;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
/**
* A class to handle notifications and their corresponding groups.
@@ -143,7 +141,7 @@ public class NotificationGroupManager {
return true;
}
NotificationGroup group = mGroupMap.get(sbn.getGroupKey());
- if (group != null && group.expanded) {
+ if (group != null && (group.expanded || group.summary == null)) {
return true;
}
return false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index a637e24..b996724 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -81,7 +81,6 @@ import android.view.MotionEvent;
import android.view.ThreadedRenderer;
import android.view.VelocityTracker;
import android.view.View;
-import android.view.ViewConfiguration;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewStub;
import android.view.WindowManager;
@@ -106,7 +105,6 @@ import com.android.systemui.EventLogConstants;
import com.android.systemui.EventLogTags;
import com.android.systemui.Prefs;
import com.android.systemui.R;
-import com.android.systemui.SwipeHelper;
import com.android.systemui.assist.AssistManager;
import com.android.systemui.doze.DozeHost;
import com.android.systemui.doze.DozeLog;
@@ -943,6 +941,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
addPostCollapseAction(new Runnable() {
@Override
public void run() {
+ mStackScroller.setDismissAllInProgress(false);
try {
mBarService.onClearAllNotifications(mCurrentUserId);
} catch (Exception ex) { }
@@ -957,12 +956,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
Runnable animationFinishAction = new Runnable() {
@Override
public void run() {
- mStackScroller.post(new Runnable() {
- @Override
- public void run() {
- mStackScroller.setDismissAllInProgress(false);
- }
- });
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
}
};
@@ -2145,11 +2138,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
private void runPostCollapseRunnables() {
- int size = mPostCollapseRunnables.size();
+ ArrayList<Runnable> clonedList = new ArrayList<>(mPostCollapseRunnables);
+ mPostCollapseRunnables.clear();
+ int size = clonedList.size();
for (int i = 0; i < size; i++) {
- mPostCollapseRunnables.get(i).run();
+ clonedList.get(i).run();
}
- mPostCollapseRunnables.clear();
+
}
Animator mScrollViewAnim, mClearButtonAnim;
@@ -2914,6 +2909,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
updateRowStates();
mIconController.updateResources();
mScreenPinningRequest.onConfigurationChanged();
+ mNetworkController.handleConfigurationChanged();
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index ff0e8a3..24e3c78 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -340,7 +340,6 @@ public class NetworkControllerImpl extends BroadcastReceiver
action.equals(ConnectivityManager.INET_CONDITION_ACTION)) {
updateConnectivity();
} else if (action.equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
- mConfig = Config.readConfig(mContext);
handleConfigurationChanged();
} else if (action.equals(Intent.ACTION_AIRPLANE_MODE_CHANGED)) {
refreshLocale();
@@ -374,8 +373,8 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
}
- @VisibleForTesting
- void handleConfigurationChanged() {
+ public void handleConfigurationChanged() {
+ mConfig = Config.readConfig(mContext);
for (MobileSignalController mobileSignalController : mMobileSignalControllers.values()) {
mobileSignalController.setConfiguration(mConfig);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
index 4a7ea96..3a97be6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
@@ -43,6 +43,7 @@ public class AmbientState {
private int mTopPadding;
private boolean mShadeExpanded;
private float mMaxHeadsUpTranslation;
+ private boolean mDismissAllInProgress;
public int getScrollY() {
return mScrollY;
@@ -183,4 +184,12 @@ public class AmbientState {
HeadsUpManager.HeadsUpEntry topEntry = mHeadsUpManager.getTopEntry();
return topEntry == null ? null : topEntry.entry.row;
}
+
+ public void setDismissAllInProgress(boolean dismissAllInProgress) {
+ mDismissAllInProgress = dismissAllInProgress;
+ }
+
+ public boolean isDismissAllInProgress() {
+ return mDismissAllInProgress;
+ }
}
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 7040864..0d89b21 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -773,8 +773,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
public boolean canChildBeDismissed(View v) {
- final View veto = v.findViewById(R.id.veto);
- return (veto != null && veto.getVisibility() != View.GONE);
+ return StackScrollAlgorithm.canChildBeDismissed(v);
}
@Override
@@ -1764,6 +1763,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void onViewAddedInternal(View child) {
+ updateHideSensitiveForChild(child);
mStackScrollAlgorithm.notifyChildrenChanged(this);
((ExpandableView) child).setOnHeightChangedListener(this);
generateAddAnimation(child, false /* fromMoreCard */);
@@ -1776,6 +1776,13 @@ public class NotificationStackScrollLayout extends ViewGroup
}
}
+ private void updateHideSensitiveForChild(View child) {
+ if (mAmbientState.isHideSensitive() && child instanceof ExpandableView) {
+ ExpandableView expandableView = (ExpandableView) child;
+ expandableView.setHideSensitiveForIntrinsicHeight(true);
+ }
+ }
+
public void notifyGroupChildRemoved(View row) {
onViewRemovedInternal(row);
}
@@ -2602,9 +2609,28 @@ public class NotificationStackScrollLayout extends ViewGroup
public void setDismissAllInProgress(boolean dismissAllInProgress) {
mDismissAllInProgress = dismissAllInProgress;
mDismissView.setDismissAllInProgress(dismissAllInProgress);
+ mAmbientState.setDismissAllInProgress(dismissAllInProgress);
if (dismissAllInProgress) {
disableClipOptimization();
}
+ handleDismissAllClipping();
+ }
+
+ private void handleDismissAllClipping() {
+ final int count = getChildCount();
+ boolean previousChildWillBeDismissed = false;
+ for (int i = 0; i < count; i++) {
+ ExpandableView child = (ExpandableView) getChildAt(i);
+ if (child.getVisibility() == GONE) {
+ continue;
+ }
+ if (mDismissAllInProgress && previousChildWillBeDismissed) {
+ child.setMinClipTopAmount(child.getClipTopAmount());
+ } else {
+ child.setMinClipTopAmount(0);
+ }
+ previousChildWillBeDismissed = canChildBeDismissed(child);
+ }
}
private void disableClipOptimization() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
index 5c604b6..5d2e5b7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
@@ -202,6 +202,7 @@ public class StackScrollAlgorithm {
private void updateClipping(StackScrollState resultState,
StackScrollAlgorithmState algorithmState, AmbientState ambientState) {
+ boolean dismissAllInProgress = ambientState.isDismissAllInProgress();
float previousNotificationEnd = 0;
float previousNotificationStart = 0;
boolean previousNotificationIsSwiped = false;
@@ -237,16 +238,29 @@ public class StackScrollAlgorithm {
updateChildClippingAndBackground(state, newHeight, clipHeight,
newHeight - (previousNotificationStart - newYTranslation));
+ if (dismissAllInProgress) {
+ state.clipTopAmount = Math.max(child.getMinClipTopAmount(), state.clipTopAmount);
+ }
+
if (!child.isTransparent()) {
// Only update the previous values if we are not transparent,
// otherwise we would clip to a transparent view.
- previousNotificationStart = newYTranslation + state.clipTopAmount * state.scale;
- previousNotificationEnd = newNotificationEnd;
- previousNotificationIsSwiped = ambientState.getDraggedViews().contains(child);
+ if ((dismissAllInProgress && canChildBeDismissed(child))) {
+ previousNotificationIsSwiped = true;
+ } else {
+ previousNotificationIsSwiped = ambientState.getDraggedViews().contains(child);
+ previousNotificationEnd = newNotificationEnd;
+ previousNotificationStart = newYTranslation + state.clipTopAmount * state.scale;
+ }
}
}
}
+ public static boolean canChildBeDismissed(View v) {
+ final View veto = v.findViewById(R.id.veto);
+ return (veto != null && veto.getVisibility() != View.GONE);
+ }
+
/**
* Updates the shadow outline and the clipping for a view.
*
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index 92cfaa1..180d918 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -499,8 +499,10 @@ public class StorageNotification extends SystemUI {
final PendingIntent intent;
if (privateVol != null && privateVol.getDisk() != null) {
intent = buildWizardReadyPendingIntent(privateVol.getDisk());
- } else {
+ } else if (privateVol != null) {
intent = buildVolumeSettingsPendingIntent(privateVol);
+ } else {
+ intent = null;
}
final Notification notif = new Notification.Builder(mContext)
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index 3964820..7836411 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -157,6 +157,7 @@ public class VolumeDialog {
lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
lp.y = res.getDimensionPixelSize(R.dimen.volume_offset_top);
lp.gravity = Gravity.TOP;
+ lp.windowAnimations = -1;
window.setAttributes(lp);
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
@@ -462,6 +463,9 @@ public class VolumeDialog {
}
protected void dismissH(int reason) {
+ if (mMotion.isAnimating()) {
+ return;
+ }
mHandler.removeMessages(H.DISMISS);
mHandler.removeMessages(H.SHOW);
if (!mShowing) return;
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogMotion.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogMotion.java
index 4bb1011..8144ea4 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogMotion.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogMotion.java
@@ -36,7 +36,6 @@ public class VolumeDialogMotion {
private static final float ANIMATION_SCALE = 1.0f;
private static final int PRE_DISMISS_DELAY = 50;
- private static final int POST_SHOW_DELAY = 200;
private final Dialog mDialog;
private final View mDialogView;
@@ -70,12 +69,7 @@ public class VolumeDialogMotion {
if (D.BUG) Log.d(TAG, "mDialog.onShow");
final int h = mDialogView.getHeight();
mDialogView.setTranslationY(-h);
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- startShowAnimation();
- }
- }, POST_SHOW_DELAY);
+ startShowAnimation();
}
});
}