diff options
author | Selim Cinek <cinek@google.com> | 2014-08-19 15:44:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-16 04:36:39 +0000 |
commit | f86d4055fbb4a2aaf6e5269d8553a64784023b84 (patch) | |
tree | 84d89602f3160b78b288e29bc4b9a6f2d0962496 /packages | |
parent | 3eccbc270d03dd1dfc14b126c064a044c8582a06 (diff) | |
parent | 3f11dede31d36d2e8f62e9feee1bdbe2ef72a01b (diff) | |
download | frameworks_base-f86d4055fbb4a2aaf6e5269d8553a64784023b84.zip frameworks_base-f86d4055fbb4a2aaf6e5269d8553a64784023b84.tar.gz frameworks_base-f86d4055fbb4a2aaf6e5269d8553a64784023b84.tar.bz2 |
Merge "Removed bugreport tile code from Quick settings" into lmp-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/res/drawable/ic_qs_bugreport.xml | 25 | ||||
-rw-r--r-- | packages/SystemUI/res/values/strings.xml | 2 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java | 115 |
3 files changed, 0 insertions, 142 deletions
diff --git a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml b/packages/SystemUI/res/drawable/ic_qs_bugreport.xml deleted file mode 100644 index 0df1a96..0000000 --- a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml +++ /dev/null @@ -1,25 +0,0 @@ -<!-- -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="64dp" - android:height="64dp" - android:viewportWidth="24.0" - android:viewportHeight="24.0"> - - <path - android:fillColor="#FFFFFFFF" - android:pathData="M20.0,8.0l-2.8,0.0c-0.5,-0.8 -1.1,-1.5 -1.8,-2.0L17.0,4.4L15.6,3.0l-2.2,2.2C13.0,5.1 12.5,5.0 12.0,5.0s-1.0,0.1 -1.4,0.2L8.4,3.0L7.0,4.4L8.6,6.0C7.9,6.5 7.3,7.2 6.8,8.0L4.0,8.0l0.0,2.0l2.1,0.0C6.0,10.3 6.0,10.7 6.0,11.0l0.0,1.0L4.0,12.0l0.0,2.0l2.0,0.0l0.0,1.0c0.0,0.3 0.0,0.7 0.1,1.0L4.0,16.0l0.0,2.0l2.8,0.0c1.0,1.8 3.0,3.0 5.2,3.0s4.2,-1.2 5.2,-3.0L20.0,18.0l0.0,-2.0l-2.1,0.0c0.1,-0.3 0.1,-0.7 0.1,-1.0l0.0,-1.0l2.0,0.0l0.0,-2.0l-2.0,0.0l0.0,-1.0c0.0,-0.3 0.0,-0.7 -0.1,-1.0L20.0,10.0L20.0,8.0zM14.0,16.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,16.0zM14.0,12.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,12.0z"/> -</vector> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 446649d..1bd0561 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -668,8 +668,6 @@ <!-- Shows when people have clicked at the right edge of the screen to explain how to open the phone. In right-to-left languages, this is the opposite direction. [CHAR LIMIT=60] --> <string name="camera_hint">Swipe left for camera</string> - <string name="bugreport_tile_extended" translatable="false">%s\n%s (%s)</string> - <!-- Zen mode condition: no exit criteria. [CHAR LIMIT=NONE] --> <string name="zen_mode_forever">Indefinitely</string> diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java deleted file mode 100644 index a308e84..0000000 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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. - */ - -package com.android.systemui.qs.tiles; - -import android.app.ActivityManagerNative; -import android.app.AlertDialog; -import android.app.Dialog; -import android.content.DialogInterface; -import android.content.DialogInterface.OnClickListener; -import android.os.Build; -import android.os.RemoteException; -import android.provider.Settings.Global; -import android.view.WindowManager; -import android.view.WindowManagerGlobal; - -import com.android.systemui.R; -import com.android.systemui.qs.GlobalSetting; -import com.android.systemui.qs.QSTile; - -/** Quick settings tile: Bug report **/ -public class BugreportTile extends QSTile<QSTile.State> { - - private final GlobalSetting mSetting; - - public BugreportTile(Host host) { - super(host); - mSetting = new GlobalSetting(mContext, mHandler, Global.BUGREPORT_IN_POWER_MENU) { - @Override - protected void handleValueChanged(int value) { - handleRefreshState(null); - } - }; - } - - @Override - protected State newTileState() { - return new State(); - } - - @Override - public void setListening(boolean listening) { - mSetting.setListening(listening); - } - - @Override - protected void handleClick() { - mHandler.post(new Runnable() { - @Override - public void run() { - mHost.collapsePanels(); - mUiHandler.post(mShowDialog); - } - }); - } - - @Override - protected void handleUpdateState(State state, Object pushArg) { - state.visible = mSetting.getValue() != 0; - state.iconId = R.drawable.ic_qs_bugreport; - state.label = mContext.getString( - R.string.bugreport_tile_extended, - mContext.getString(com.android.internal.R.string.bugreport_title), - Build.VERSION.RELEASE, - Build.ID); - } - - private final Runnable mShowDialog = new Runnable() { - @Override - public void run() { - final AlertDialog.Builder builder = new AlertDialog.Builder(mContext); - builder.setPositiveButton(com.android.internal.R.string.report, new OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - if (which == DialogInterface.BUTTON_POSITIVE) { - // Add a little delay before executing, to give the - // dialog a chance to go away before it takes a - // screenshot. - mHandler.postDelayed(new Runnable() { - @Override public void run() { - try { - ActivityManagerNative.getDefault().requestBugReport(); - } catch (RemoteException e) { - } - } - }, 500); - } - } - }); - builder.setMessage(com.android.internal.R.string.bugreport_message); - builder.setTitle(com.android.internal.R.string.bugreport_title); - builder.setCancelable(true); - final Dialog dialog = builder.create(); - dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); - try { - WindowManagerGlobal.getWindowManagerService().dismissKeyguard(); - } catch (RemoteException e) { - } - dialog.show(); - } - }; -} |