• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

修订版6600676ab83cdc9c51a3b94f4bad14b7ca27ad88 (tree)
时间2014-08-27 19:18:42
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

add Reboot to poweroff menu

Ported from CyanogenMod.

更改概述

差异

--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -417,6 +417,7 @@ public interface WindowManagerPolicy {
417417
418418 public void shutdown(boolean confirm);
419419 public void rebootSafeMode(boolean confirm);
420+ public void reboot();
420421
421422 /**
422423 * Return the window manager lock needed to correctly call "Lw" methods.
Binary files /dev/null and b/core/res/res/drawable-hdpi/ic_lock_reboot.png differ
Binary files /dev/null and b/core/res/res/drawable-mdpi/ic_lock_reboot.png differ
Binary files /dev/null and b/core/res/res/drawable-xhdpi/ic_lock_reboot.png differ
--- /dev/null
+++ b/core/res/res/values-af/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Herlaai tablet</string>
18+ <string name="reboot_system" product="default">Herlaai foon</string>
19+ <string name="reboot_progress">Herlaai\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Jou tablet gaan herlaai.</string>
21+ <string name="reboot_confirm" product="default">Jou foon gaan herlaai.</string>
22+ <string name="global_action_reboot">Herlaai</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-ca/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Reinicia tauleta</string>
18+ <string name="reboot_system" product="default">Reinicia telèfon</string>
19+ <string name="reboot_progress">Reiniciant\u2026</string>
20+ <string name="reboot_confirm" product="tablet">La teva tauleta es reiniciarà.</string>
21+ <string name="reboot_confirm" product="default">El teu telèfon es reiniciarà.</string>
22+ <string name="global_action_reboot">Reinicia</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-cs/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Restartovat tablet</string>
18+ <string name="reboot_system" product="default">Restartovat telefon</string>
19+ <string name="reboot_progress">Restart\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Tablet bude restartován.</string>
21+ <string name="reboot_confirm" product="default">Telefon bude restartován.</string>
22+ <string name="global_action_reboot">Restartovat</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-da/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Genstart tablet</string>
18+ <string name="reboot_system" product="default">Genstart telefon</string>
19+ <string name="reboot_progress">Genstarter\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Din tablet vil genstarte.</string>
21+ <string name="reboot_confirm" product="default">Din telefon vil genstarte.</string>
22+ <string name="global_action_reboot">Genstart</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-de/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Tablet neu starten</string>
18+ <string name="reboot_system" product="default">Telefon neu starten</string>
19+ <string name="reboot_progress">Neu starten\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Tablet wird neu gestartet</string>
21+ <string name="reboot_confirm" product="default">Telefon wird neu gestartet</string>
22+ <string name="global_action_reboot">Neu starten</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-el/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Επανεκκίνηση tablet</string>
18+ <string name="reboot_system" product="default">Επανεκκίνηση τηλεφώνου</string>
19+ <string name="reboot_progress">Επανεκκίνηση\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Το tablet σας θα κάνει επανεκκίνηση.</string>
21+ <string name="reboot_confirm" product="default">Το τηλέφωνό σας θα κάνει επανεκκίνηση.</string>
22+ <string name="global_action_reboot">Επανεκκίνηση</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-es/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Reiniciar tablet</string>
18+ <string name="reboot_system" product="default">Reiniciar teléfono</string>
19+ <string name="reboot_progress">Reiniciando\u2026</string>
20+ <string name="reboot_confirm" product="tablet">El tablet se reiniciará.</string>
21+ <string name="reboot_confirm" product="default">El teléfono se reiniciará.</string>
22+ <string name="global_action_reboot">Reiniciar</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-fi/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Käynnistä tablet uudelleen</string>
18+ <string name="reboot_system" product="default">Käynnistä puhelin uudelleen</string>
19+ <string name="reboot_progress">Käynnistetään uudelleen\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Tablet käynnistyy uudelleen.</string>
21+ <string name="reboot_confirm" product="default">Puhelin käynnistyy uudelleen.</string>
22+ <string name="global_action_reboot">Käynnistä uudelleen</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-fr/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Redémarrage de la tablette</string>
18+ <string name="reboot_system" product="default">Redémarrage du téléphone</string>
19+ <string name="reboot_confirm" product="tablet">Votre tablette va redémarrer</string>
20+ <string name="reboot_confirm" product="default">Votre téléphone va redémarrer</string>
21+ <string name="reboot_progress">Redémarrage en cours\u2026</string>
22+ <string name="global_action_reboot">Redémarrer</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-hu/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Táblagép újraindítása</string>
18+ <string name="reboot_system" product="default">Telefon újraindítása</string>
19+ <string name="reboot_progress">Újraindítás\u2026</string>
20+ <string name="reboot_confirm" product="tablet">A táblagép újraindul.</string>
21+ <string name="reboot_confirm" product="default">A telefon újraindul.</string>
22+ <string name="global_action_reboot">Újraindítás</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-in/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Reboot tablet</string>
18+ <string name="reboot_system" product="default">Reboot ponsel</string>
19+ <string name="reboot_progress">Reboot\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Tablet Anda adalah direboot</string>
21+ <string name="reboot_confirm" product="default">Ponsel Anda adalah direboot</string>
22+ <string name="global_action_reboot">Reboot</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-it/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Riavvia tablet</string>
18+ <string name="reboot_system" product="default">Riavvia telefono</string>
19+ <string name="reboot_progress">Riavvio\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Il dispositivo verrà riavviato.</string>
21+ <string name="reboot_confirm" product="default">Il telefono verrà riavviato.</string>
22+ <string name="global_action_reboot">Riavvia</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-iw/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">הפעלת טאבלט מחדש</string>
18+ <string name="reboot_system" product="default">הפעלת טלפון מחדש</string>
19+ <string name="global_action_reboot">הפעלה מחדש</string>
20+ <string name="reboot_progress">מפעיל מחדש...</string>
21+ <string name="reboot_confirm" product="tablet">הטאבלט יופעל מחדש.</string>
22+ <string name="reboot_confirm" product="default">הטלפון יופעל מחדש.</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-ja/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_confirm" product="tablet">タブレットは再起動します。</string>
18+ <string name="reboot_confirm" product="default">携帯電話は再起動します。</string>
19+ <string name="reboot_system" product="tablet">タブレットを再起動</string>
20+ <string name="reboot_system" product="default">携帯電話を再起動</string>
21+ <string name="reboot_progress">再起動中\u2026</string>
22+ <string name="global_action_reboot">再起動</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-ko/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="global_action_reboot">다시 시작</string>
18+ <string name="reboot_system" product="tablet">태블릿 다시 시작</string>
19+ <string name="reboot_system" product="default">휴대전화 다시 시작</string>
20+ <string name="reboot_progress">다시 시작하는 중\u2026</string>
21+ <string name="reboot_confirm" product="tablet">태블릿이 다시 시작됩니다.</string>
22+ <string name="reboot_confirm" product="default">휴대전화가 다시 시작됩니다.</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-lt/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Perkrauti</string>
18+ <string name="reboot_system" product="default">Perkrauti</string>
19+ <string name="reboot_progress">Perkraunama\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Jūsų planšetinis kompiuteris persikraus.</string>
21+ <string name="reboot_confirm" product="default">Jūsų telefonas persikraus.</string>
22+ <string name="global_action_reboot">Perkrauti</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-nb/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Start nettbrett på nytt</string>
18+ <string name="reboot_system" product="default">Start telefon på nytt</string>
19+ <string name="reboot_progress">Starter på nytt\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Nettbrettet startes på nytt.</string>
21+ <string name="reboot_confirm" product="default">Telefonen startes på nytt.</string>
22+ <string name="global_action_reboot">Start på nytt</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-nl/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Tablet herstarten</string>
18+ <string name="reboot_system" product="default">Telefoon herstarten</string>
19+ <string name="reboot_progress">Herstarten\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Uw tablet wordt herstart.</string>
21+ <string name="reboot_confirm" product="default">Uw telefoon wordt herstart.</string>
22+ <string name="global_action_reboot">Herstarten</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-pl/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Uruchom ponownie tablet</string>
18+ <string name="reboot_system" product="default">Uruchom ponownie telefon</string>
19+ <string name="reboot_progress">Ponowne uruchamianie\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Tablet zostanie uruchomiony ponownie.</string>
21+ <string name="reboot_confirm" product="default">Telefon zostanie uruchomiony ponownie.</string>
22+ <string name="global_action_reboot">Uruchom ponownie</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-pt-rPT/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Reiniciar tablet</string>
18+ <string name="reboot_system" product="default">Reiniciar telemóvel</string>
19+ <string name="reboot_progress">A reiniciar\u2026</string>
20+ <string name="reboot_confirm" product="tablet">A sua tablet irá reiniciar.</string>
21+ <string name="reboot_confirm" product="default">O seu telemóvel irá reiniciar.</string>
22+ <string name="global_action_reboot">Reiniciar</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-pt/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Reiniciar tablet</string>
18+ <string name="reboot_system" product="default">Reiniciar telefone</string>
19+ <string name="reboot_progress">Reiniciando\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Seu tablet irá reiniciar.</string>
21+ <string name="reboot_confirm" product="default">Seu telefone irá reiniciar.</string>
22+ <string name="global_action_reboot">Reiniciar</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-ro/cm_strings.xml
@@ -0,0 +1,22 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">"Reporniţi tablet PC"</string>
18+ <string name="reboot_system" product="default">"Reporniţi telefonul"</string>
19+ <string name="reboot_progress">"Repornire..."</string>
20+ <string name="reboot_confirm" product="default">"Telefonul dvs. va reporni."</string>
21+ <string name="global_action_reboot">"Repornire"</string>
22+</resources>
--- /dev/null
+++ b/core/res/res/values-ru/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Перезагрузка планшета</string>
18+ <string name="reboot_system" product="default">Перезагрузка телефона</string>
19+ <string name="reboot_confirm" product="tablet">Ваш планшет будет перезагружен.</string>
20+ <string name="reboot_confirm" product="default">Ваш телефон будет перезагружен.</string>
21+ <string name="reboot_progress">Перезагрузка\u2026</string>
22+ <string name="global_action_reboot">Перезагрузка</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-sk/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Reštart tabletu</string>
18+ <string name="reboot_system" product="default">Reštart telefónu</string>
19+ <string name="reboot_progress">Reštartuje sa\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Váš tablet sa reštartuje.</string>
21+ <string name="reboot_confirm" product="default">Váš telefón sa reštartuje.</string>
22+ <string name="global_action_reboot">Reštartovať</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-sv/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Starta om surfplatta</string>
18+ <string name="reboot_system" product="default">Starta om telefon</string>
19+ <string name="reboot_progress">Startar om\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Din surfplatta kommer att startas om.</string>
21+ <string name="reboot_confirm" product="default">Din telefon kommer att startas om.</string>
22+ <string name="global_action_reboot">Omstart</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-tr/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Tableti Yeniden Başlat</string>
18+ <string name="reboot_system" product="default">Telefonu Yeniden Başlat</string>
19+ <string name="reboot_progress">Yeniden başlatılıyor\u2026</string>
20+ <string name="reboot_confirm" product="tablet">Tabletiniz yeniden başlatılacak.</string>
21+ <string name="reboot_confirm" product="default">Telefonunuz yeniden başlatılacak.</string>
22+ <string name="global_action_reboot">Yeniden başlat</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-uk/cm_strings.xml
@@ -0,0 +1,22 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">Перезавантаження планшету</string>
18+ <string name="reboot_system" product="default">Перезавантаження телефону</string>
19+ <string name="reboot_progress">Перезавантаження\u2026</string>
20+ <string name="reboot_confirm" product="default">Ваш телефон буде перезавантажено</string>
21+ <string name="global_action_reboot">Перезавантаження</string>
22+</resources>
--- /dev/null
+++ b/core/res/res/values-zh-rCN/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">重启平板</string>
18+ <string name="reboot_system" product="default">重启手机</string>
19+ <string name="reboot_progress">正在重启\u2026</string>
20+ <string name="reboot_confirm" product="tablet">您的平板电脑将会重启。</string>
21+ <string name="reboot_confirm" product="default">您的手机将会重启。</string>
22+ <string name="global_action_reboot">重启</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values-zh-rTW/cm_strings.xml
@@ -0,0 +1,23 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!-- Copyright (C) 2013 The CyanogenMod Project
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+-->
16+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
17+ <string name="reboot_system" product="tablet">重新啟動平板電腦</string>
18+ <string name="reboot_system" product="default">重新啟動手機</string>
19+ <string name="reboot_progress">正在重新啟動\u2026</string>
20+ <string name="reboot_confirm" product="tablet">您的平板電腦將會重新啟動。</string>
21+ <string name="reboot_confirm" product="default">您的手機將會重新啟動。</string>
22+ <string name="global_action_reboot">重新開機</string>
23+</resources>
--- /dev/null
+++ b/core/res/res/values/cm_strings.xml
@@ -0,0 +1,33 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+ Copyright (C) 2012-2014 The CyanogenMod Project
4+
5+ Licensed under the Apache License, Version 2.0 (the "License");
6+ you may not use this file except in compliance with the License.
7+ You may obtain a copy of the License at
8+
9+ http://www.apache.org/licenses/LICENSE-2.0
10+
11+ Unless required by applicable law or agreed to in writing, software
12+ distributed under the License is distributed on an "AS IS" BASIS,
13+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ See the License for the specific language governing permissions and
15+ limitations under the License.
16+-->
17+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
18+
19+ <!-- Button to reboot the phone, within the Phone Options dialog -->
20+ <string name="reboot_system" product="tablet">Reboot tablet</string>
21+ <string name="reboot_system" product="default">Reboot phone</string>
22+ <!-- Reboot Progress Dialog. This is shown if the user chooses to reboot the phone. -->
23+
24+ <!-- Reboot Progress Dialog. This is shown if the user chooses to reboot the phone. -->
25+ <string name="reboot_progress">Rebooting\u2026</string>
26+ <!-- Reboot Confirmation Dialog. When the user chooses to reboot the phone, there will be a confirmation dialog. This is the message. -->
27+ <string name="reboot_confirm" product="tablet">Your tablet will reboot.</string>
28+ <string name="reboot_confirm" product="default">Your phone will reboot.</string>
29+
30+ <!-- Label for item that reboots the device in phone options dialog -->
31+ <string name="global_action_reboot">Reboot</string>
32+
33+</resources>
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1758,4 +1758,13 @@
17581758 <java-symbol type="dimen" name="subtitle_shadow_radius" />
17591759 <java-symbol type="dimen" name="subtitle_shadow_offset" />
17601760 <java-symbol type="dimen" name="subtitle_outline_width" />
1761+
1762+ <!-- Reboot confirmation string -->
1763+ <java-symbol type="string" name="reboot_confirm" />
1764+
1765+ <!-- Power menu -->
1766+ <java-symbol type="string" name="global_action_reboot" />
1767+ <java-symbol type="string" name="reboot_system" />
1768+ <java-symbol type="string" name="reboot_progress" />
1769+ <java-symbol type="drawable" name="ic_lock_reboot" />
17611770 </resources>
--- a/policy/src/com/android/internal/policy/impl/GlobalActions.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java
@@ -263,6 +263,30 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
263263 }
264264 });
265265
266+ // second: reboot
267+ mItems.add(
268+ new SinglePressAction(
269+ com.android.internal.R.drawable.ic_lock_reboot,
270+ com.android.internal.R.string.global_action_reboot) {
271+
272+ public void onPress() {
273+ // reboot device
274+ mWindowManagerFuncs.reboot();
275+ }
276+
277+ public boolean onLongPress() {
278+ return true;
279+ }
280+
281+ public boolean showDuringKeyguard() {
282+ return true;
283+ }
284+
285+ public boolean showBeforeProvisioning() {
286+ return true;
287+ }
288+ });
289+
266290 // next: airplane mode
267291 mItems.add(mAirplaneModeOn);
268292
--- a/services/java/com/android/server/power/ShutdownThread.java
+++ b/services/java/com/android/server/power/ShutdownThread.java
@@ -116,11 +116,24 @@ public final class ShutdownThread extends Thread {
116116
117117 final int longPressBehavior = context.getResources().getInteger(
118118 com.android.internal.R.integer.config_longPressOnPowerBehavior);
119- final int resourceId = mRebootSafeMode
120- ? com.android.internal.R.string.reboot_safemode_confirm
121- : (longPressBehavior == 2
119+ final int resourceId;
120+ if (mRebootSafeMode) {
121+ resourceId = com.android.internal.R.string.reboot_safemode_confirm;
122+ } else if (mReboot) {
123+ resourceId = com.android.internal.R.string.reboot_confirm;
124+ } else {
125+ resourceId = (longPressBehavior == 2)
122126 ? com.android.internal.R.string.shutdown_confirm_question
123- : com.android.internal.R.string.shutdown_confirm);
127+ : com.android.internal.R.string.shutdown_confirm;
128+ }
129+ final int titleId;
130+ if (mRebootSafeMode) {
131+ titleId = com.android.internal.R.string.reboot_safemode_title;
132+ } else if (mReboot) {
133+ titleId = com.android.internal.R.string.reboot_system;
134+ } else {
135+ titleId = com.android.internal.R.string.power_off;
136+ }
124137
125138 Log.d(TAG, "Notifying thread to start shutdown longPressBehavior=" + longPressBehavior);
126139
@@ -130,9 +143,7 @@ public final class ShutdownThread extends Thread {
130143 sConfirmDialog.dismiss();
131144 }
132145 sConfirmDialog = new AlertDialog.Builder(context)
133- .setTitle(mRebootSafeMode
134- ? com.android.internal.R.string.reboot_safemode_title
135- : com.android.internal.R.string.power_off)
146+ .setTitle(titleId)
136147 .setMessage(resourceId)
137148 .setPositiveButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() {
138149 public void onClick(DialogInterface dialog, int which) {
@@ -213,8 +224,13 @@ public final class ShutdownThread extends Thread {
213224 // throw up an indeterminate system dialog to indicate radio is
214225 // shutting down.
215226 ProgressDialog pd = new ProgressDialog(context);
216- pd.setTitle(context.getText(com.android.internal.R.string.power_off));
217- pd.setMessage(context.getText(com.android.internal.R.string.shutdown_progress));
227+ if (mReboot) {
228+ pd.setTitle(context.getText(com.android.internal.R.string.reboot_system));
229+ pd.setMessage(context.getText(com.android.internal.R.string.reboot_progress));
230+ } else {
231+ pd.setTitle(context.getText(com.android.internal.R.string.power_off));
232+ pd.setMessage(context.getText(com.android.internal.R.string.shutdown_progress));
233+ }
218234 pd.setIndeterminate(true);
219235 pd.setCancelable(false);
220236 pd.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -5191,6 +5191,12 @@ public class WindowManagerService extends IWindowManager.Stub
51915191
51925192 // Called by window manager policy. Not exposed externally.
51935193 @Override
5194+ public void reboot() {
5195+ ShutdownThread.reboot(mContext, null, true);
5196+ }
5197+
5198+ // Called by window manager policy. Not exposed externally.
5199+ @Override
51945200 public void rebootSafeMode(boolean confirm) {
51955201 ShutdownThread.rebootSafeMode(mContext, confirm);
51965202 }